Class: Nl::Linux::Netdev::AttributeSets::Napi

Inherits:
AttributeSet
  • Object
show all
Defined in:
nl-linux/generated/nl/linux/netdev.rb

Defined Under Namespace

Classes: Attribute, DeferHardIrqs, GroFlushTimeout, Id, Ifindex, Irq, IrqSuspendTimeout, Pid, Threaded

Constant Summary

Constants inherited from AttributeSet

AttributeSet::SELECTOR_NAMES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AttributeSet

#<<, #[], build_attributes, decode, #encode, #initialize

Constructor Details

This class inherits a constructor from Nl::AttributeSet

Class Method Details

.by_name(name) ⇒ Attribute

Looks up Attribute class by name.

Parameters:

  • name (Symbol)

Returns:



754
# File 'nl-linux/generated/nl/linux/netdev.rb', line 754

def by_name(name); BY_NAME.fetch(name); end

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



760
# File 'nl-linux/generated/nl/linux/netdev.rb', line 760

def by_type(type); BY_TYPE.fetch(type); end

Instance Method Details

#defer_hard_irqs ⇒ Integer

The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.

Returns:

  • (Integer)

See Also:



730
# File 'nl-linux/generated/nl/linux/netdev.rb', line 730

def defer_hard_irqs; self[:"defer_hard_irqs"]&.value; end

#gro_flush_timeout ⇒ Integer

The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.

Returns:

  • (Integer)

See Also:



735
# File 'nl-linux/generated/nl/linux/netdev.rb', line 735

def gro_flush_timeout; self[:"gro_flush_timeout"]&.value; end

#id ⇒ Integer

ID of the NAPI instance.

Returns:

  • (Integer)

See Also:



715
# File 'nl-linux/generated/nl/linux/netdev.rb', line 715

def id; self[:"id"]&.value; end

#ifindex ⇒ Integer

ifindex of the netdevice to which NAPI instance belongs.

Returns:

  • (Integer)

See Also:



710
# File 'nl-linux/generated/nl/linux/netdev.rb', line 710

def ifindex; self[:"ifindex"]&.value; end

#irq ⇒ Integer

The associated interrupt vector number for the napi

Returns:

  • (Integer)

See Also:



720
# File 'nl-linux/generated/nl/linux/netdev.rb', line 720

def irq; self[:"irq"]&.value; end

#irq_suspend_timeout ⇒ Integer

The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events

Returns:

  • (Integer)

See Also:



740
# File 'nl-linux/generated/nl/linux/netdev.rb', line 740

def irq_suspend_timeout; self[:"irq_suspend_timeout"]&.value; end

#pid ⇒ Integer

PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.

Returns:

  • (Integer)

See Also:



725
# File 'nl-linux/generated/nl/linux/netdev.rb', line 725

def pid; self[:"pid"]&.value; end

#threaded ⇒ Integer

Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.

Known enum values are defined in Enums::NapiThreaded.

Returns:

  • (Integer)

See Also:



747
# File 'nl-linux/generated/nl/linux/netdev.rb', line 747

def threaded; self[:"threaded"]&.value; end