Session

Netlink APIs to Expose/Configure Netdev Objects

Speakers

Amritha Nambiar
Sridhar Samudrala

Label

Nuts and Bolts

Session Type

Talk

Contents

Description

Netlink protocol specifications in YAML with genetlink family has now been widely used for subsystems such as devlink, ethtool, DPLL, FOU etc. The introduction of a genetlink spec-compatible family (netdev-genl) for netdevices has made it possible to have a truly generic netlink interface to configure netdev objects. Currently, the netdev-genl interface is used to expose the XDP features supported by a NIC. In this paper, we will discuss extending the netdev-genl interface to support additional netdev objects such as queue and NAPI.

Queues as netlink objects enables exposing per queue attributes (example, NAPI instance servicing the queue, stats, memory model etc.). This could be followed up with commands such as get/set/create queues etc. for multiple usecases (RSS context handling, Rx zerocopy, XDP).

NAPI instance as netlink object can be used to export NAPI information supported by the device. Exposing NAPI attributes (such as NAPI id, NAPI device, interrupt number associated with the NAPI instance, PID of the NAPI thread) to the userspace serves multiple usecases. Example, adjusting the NAPI thread priorities and SMP affinity. Additionally, one could also configure NAPI pollers to queues from the userspace. This could be used to limit the number of NAPI instances by configuring a poller to be shared among queues that are on an interrupt vector.