Class: Nl::Linux::Netdev::AttributeSets::Queue

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

Defined Under Namespace

Classes: Attribute, Dmabuf, Id, Ifindex, IoUring, Lease, NapiId, Type, Xsk

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:



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

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

.by_type(type) ⇒ Attribute

Looks up Attribute class by type value.

Parameters:

  • type (Integer)

Returns:



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

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

Instance Method Details

#dmabuf ⇒ Integer

ID of the dmabuf attached to this queue, if any.

Returns:

  • (Integer)

See Also:



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

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

#id ⇒ Integer

Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.

Returns:

  • (Integer)

See Also:



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

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

#ifindex ⇒ Integer

ifindex of the netdevice to which the queue belongs.

Returns:

  • (Integer)

See Also:



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

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

#io_uring ⇒ AttributeSets::IoUringProviderInfo

io_uring memory provider information.



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

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

#lease ⇒ AttributeSets::Lease

A queue from a virtual device can have a lease which refers to another queue from a physical device. This is useful for memory providers and AF_XDP operations which take an ifindex and queue id to allow applications to bind against virtual devices in containers.

Returns:

See Also:



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

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

#napi_id ⇒ Integer

ID of the NAPI instance which services this queue.

Returns:

  • (Integer)

See Also:



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

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

#type ⇒ Integer

Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.

Known enum values are defined in Enums::QueueType.

Returns:

  • (Integer)

See Also:



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

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

#xsk ⇒ AttributeSets::XskInfo

XSK information for this queue, if any.

Returns:

See Also:



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

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