Class: Nl::Linux::Netdev::AsyncOperations

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

Instance Method Summary collapse

Instance Method Details

#do_bind_rx(**args) ⇒ Nl::Async::Future<Messages::DoBindRxReply>

Bind dmabuf to netdev

Requires CAP_NET_ADMIN in the user namespace owning the network namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    netdev ifindex to bind the dmabuf to.

  • queues (Array<AttributeSets::QueueId, Hash<Symbol, Object>>) —

    receive queues to bind the dmabuf to.

  • fd (Integer) —

    dmabuf file descriptor to bind.

Returns:

See Also:



3365
3366
3367
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3365

def do_bind_rx(**args)
  @exchange.call(:"do", Messages::DoBindRxRequest, Messages::DoBindRxReply, args)
end

#do_bind_tx(**args) ⇒ Nl::Async::Future<Messages::DoBindTxReply>

Bind dmabuf to netdev for TX

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    netdev ifindex to bind the dmabuf to.

  • fd (Integer) —

    dmabuf file descriptor to bind.

Returns:

See Also:



3392
3393
3394
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3392

def do_bind_tx(**args)
  @exchange.call(:"do", Messages::DoBindTxRequest, Messages::DoBindTxReply, args)
end

#do_dev_get(**args) ⇒ Nl::Async::Future<Messages::DoDevGetReply>

Get / dump information about a netdev.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    netdev ifindex

Returns:

See Also:



3244
3245
3246
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3244

def do_dev_get(**args)
  @exchange.call(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
end

#do_napi_get(**args) ⇒ Nl::Async::Future<Messages::DoNapiGetReply>

Get information about NAPI instances configured on the system.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    ID of the NAPI instance.

Returns:

See Also:



3328
3329
3330
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3328

def do_napi_get(**args)
  @exchange.call(:"do", Messages::DoNapiGetRequest, Messages::DoNapiGetReply, args)
end

#do_napi_set(**args) ⇒ Nl::Async::Future<void>

Set configurable NAPI instance settings.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    ID of the NAPI instance.

  • defer_hard_irqs (Integer) —

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

  • 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.

  • irq_suspend_timeout (Integer) —

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

  • 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:

See Also:



3382
3383
3384
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3382

def do_napi_set(**args)
  @exchange.call(:"do", Messages::DoNapiSetRequest, nil, args)
end

#do_page_pool_get(**args) ⇒ Nl::Async::Future<Messages::DoPagePoolGetReply>

Get / dump information about Page Pools. Only Page Pools associated by the driver with a net_device can be listed. ifindex will not be reported if the net_device no longer exists.

Parameters:

  • args (Hash)

Options Hash (**args):

  • id (Integer) —

    Unique ID of a Page Pool instance.

Returns:

See Also:



3264
3265
3266
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3264

def do_page_pool_get(**args)
  @exchange.call(:"do", Messages::DoPagePoolGetRequest, Messages::DoPagePoolGetReply, args)
end

#do_page_pool_stats_get(**args) ⇒ Nl::Async::Future<Messages::DoPagePoolStatsGetReply>

Get page pool statistics.

Parameters:

  • args (Hash)

Options Hash (**args):

Returns:

See Also:



3288
3289
3290
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3288

def do_page_pool_stats_get(**args)
  @exchange.call(:"do", Messages::DoPagePoolStatsGetRequest, Messages::DoPagePoolStatsGetReply, args)
end

#do_queue_create(**args) ⇒ Nl::Async::Future<Messages::DoQueueCreateReply>

Create a new queue for the given netdevice. Whether this operation is supported depends on the device and the driver.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    ifindex of the netdevice to which the queue belongs.

  • 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.

  • lease (AttributeSets::Lease, Hash<Symbol, Object>) —

    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:



3412
3413
3414
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3412

def do_queue_create(**args)
  @exchange.call(:"do", Messages::DoQueueCreateRequest, Messages::DoQueueCreateReply, args)
end

#do_queue_get(**args) ⇒ Nl::Async::Future<Messages::DoQueueGetReply>

Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).

Parameters:

  • args (Hash)

Options Hash (**args):

  • 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.

  • ifindex (Integer) —

    ifindex of the netdevice to which the queue belongs.

  • 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:

See Also:



3310
3311
3312
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3310

def do_queue_get(**args)
  @exchange.call(:"do", Messages::DoQueueGetRequest, Messages::DoQueueGetReply, args)
end

#dump_dev_get(**args) ⇒ Nl::Async::Stream<Messages::DumpDevGetReply>

Get / dump information about a netdev.

Parameters:

  • args (Hash)

Returns:

See Also:



3252
3253
3254
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3252

def dump_dev_get(**args)
  @exchange.call(:"dump", Messages::DumpDevGetRequest, Messages::DumpDevGetReply, args)
end

#dump_napi_get(**args) ⇒ Nl::Async::Stream<Messages::DumpNapiGetReply>

Get information about NAPI instances configured on the system.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    ifindex of the netdevice to which NAPI instance belongs.

Returns:

See Also:



3337
3338
3339
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3337

def dump_napi_get(**args)
  @exchange.call(:"dump", Messages::DumpNapiGetRequest, Messages::DumpNapiGetReply, args)
end

#dump_page_pool_get(**args) ⇒ Nl::Async::Stream<Messages::DumpPagePoolGetReply>

Get / dump information about Page Pools. Only Page Pools associated by the driver with a net_device can be listed. ifindex will not be reported if the net_device no longer exists.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    ifindex of the netdev to which the pool belongs. May not be reported if the page pool was allocated for a netdev which got destroyed already (page pools may outlast their netdevs because they wait for all memory to be returned).

Returns:

See Also:



3279
3280
3281
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3279

def dump_page_pool_get(**args)
  @exchange.call(:"dump", Messages::DumpPagePoolGetRequest, Messages::DumpPagePoolGetReply, args)
end

#dump_page_pool_stats_get(**args) ⇒ Nl::Async::Stream<Messages::DumpPagePoolStatsGetReply>

Get page pool statistics.

Parameters:

  • args (Hash)

Options Hash (**args):

Returns:

See Also:



3297
3298
3299
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3297

def dump_page_pool_stats_get(**args)
  @exchange.call(:"dump", Messages::DumpPagePoolStatsGetRequest, Messages::DumpPagePoolStatsGetReply, args)
end

#dump_qstats_get(**args) ⇒ Nl::Async::Stream<Messages::DumpQstatsGetReply>

Get / dump fine grained statistics. Which statistics are reported depends on the device and the driver, and whether the driver stores software counters per-queue.

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    ifindex of the netdevice to which stats belong.

  • scope (Integer) —

    What object type should be used to iterate over the stats.

    Known flags are defined in Flags::QstatsScope.

Returns:

See Also:



3352
3353
3354
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3352

def dump_qstats_get(**args)
  @exchange.call(:"dump", Messages::DumpQstatsGetRequest, Messages::DumpQstatsGetReply, args)
end

#dump_queue_get(**args) ⇒ Nl::Async::Stream<Messages::DumpQueueGetReply>

Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).

Parameters:

  • args (Hash)

Options Hash (**args):

  • ifindex (Integer) —

    ifindex of the netdevice to which the queue belongs.

Returns:

See Also:



3319
3320
3321
# File 'nl-linux/generated/nl/linux/netdev.rb', line 3319

def dump_queue_get(**args)
  @exchange.call(:"dump", Messages::DumpQueueGetRequest, Messages::DumpQueueGetReply, args)
end