netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] Add support to do threaded napi busy poll
@ 2025-01-02 19:12 Samiullah Khawaja
  2025-01-02 19:12 ` [PATCH net-next 1/3] Add support to set napi threaded for individual napi Samiullah Khawaja
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Samiullah Khawaja @ 2025-01-02 19:12 UTC (permalink / raw)
  To: Jakub Kicinski, David S . Miller , Eric Dumazet, Paolo Abeni
  Cc: netdev, skhawaja

Extend the already existing support of threaded napi poll to do continuous
busypolling.

This is used for doing continuous polling of napi to fetch descriptors from
backing RX/TX queues for low latency applications. Allow enabling of threaded
busypoll using netlink so this can be enabled on a set of dedicated napis for
low latency applications.

Currently threaded napi is only enabled at device level using sysfs. Add
support to enable/disable threaded mode for a napi individually. This can be
done using the netlink interface. Add `set_threaded` op in netlink spec that
allows setting the `threaded` attribute of a napi.

Extend the threaded attribute in napi struct to add an option to enable
continuous busy polling. Extend the netlink and sysfs interface to allow
enabled/disabling threaded busypolling at device or individual napi level.

Once threaded busypoll on a napi is enabled, depending on the application
requirements the polling thread can be moved to dedicated cores. We used this
for AF_XDP usecases to fetch packets from RX queues to reduce latency.

Samiullah Khawaja (3):
  Add support to set napi threaded for individual napi
  net: Create separate gro_flush helper function
  Extend napi threaded polling to allow kthread based busy polling

 Documentation/ABI/testing/sysfs-class-net     |   3 +-
 Documentation/netlink/specs/netdev.yaml       |  20 +++
 .../net/ethernet/atheros/atl1c/atl1c_main.c   |   2 +-
 include/linux/netdevice.h                     |  29 ++++-
 include/uapi/linux/netdev.h                   |   2 +
 net/core/dev.c                                | 122 ++++++++++++++----
 net/core/net-sysfs.c                          |   2 +-
 net/core/netdev-genl-gen.c                    |  13 ++
 net/core/netdev-genl-gen.h                    |   2 +
 net/core/netdev-genl.c                        |  37 ++++++
 tools/include/uapi/linux/netdev.h             |   2 +
 11 files changed, 205 insertions(+), 29 deletions(-)

-- 
2.47.1.613.gc27f4b7a9f-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-01-16  0:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 19:12 [PATCH net-next 0/3] Add support to do threaded napi busy poll Samiullah Khawaja
2025-01-02 19:12 ` [PATCH net-next 1/3] Add support to set napi threaded for individual napi Samiullah Khawaja
2025-01-02 21:15   ` Stanislav Fomichev
2025-01-02 19:12 ` [PATCH net-next 2/3] net: Create separate gro_flush helper function Samiullah Khawaja
2025-01-02 19:12 ` [PATCH net-next 3/3] Extend napi threaded polling to allow kthread based busy polling Samiullah Khawaja
2025-01-02 21:16   ` Samudrala, Sridhar
2025-01-02 21:28   ` Stanislav Fomichev
2025-01-03  1:05   ` kernel test robot
2025-01-03  8:11   ` kernel test robot
2025-01-03  8:12   ` kernel test robot
2025-01-02 21:30 ` [PATCH net-next 0/3] Add support to do threaded napi busy poll Stanislav Fomichev
2025-01-02 21:56 ` David Laight
2025-01-03  0:47 ` Jakub Kicinski
2025-01-08 19:25   ` Joe Damato
2025-01-08 21:18     ` Samiullah Khawaja
2025-01-08 21:53       ` Martin Karsten
2025-01-15 22:35         ` Samiullah Khawaja
2025-01-16  0:28           ` Martin Karsten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).