netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH v2 0/9] Introduce NAPI queues support
@ 2023-08-21 23:25 Amritha Nambiar
  2023-08-21 23:25 ` [net-next PATCH v2 1/9] net: Introduce new fields for napi and queue associations Amritha Nambiar
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Amritha Nambiar @ 2023-08-21 23:25 UTC (permalink / raw)
  To: netdev, kuba, davem; +Cc: sridhar.samudrala, amritha.nambiar

Introduce support for associating NAPI instances with
corresponding RX and TX queue set. Add the capability
to export NAPI information supported by the device.
Extend the netdev_genl generic netlink family for netdev
with NAPI data. The NAPI fields exposed are:
- NAPI id
- NAPI device ifindex
- queue/queue-set (both RX and TX) associated with each
  NAPI instance
- Interrupt number associated with the NAPI instance
- PID for the NAPI thread

This series only supports 'get' ability for retrieving
certain NAPI attributes. The 'set' ability for setting
queue[s] associated with a NAPI instance via netdev-genl
will be submitted as a separate patch series.

Previous discussion at:
https://lore.kernel.org/netdev/c8476530638a5f4381d64db0e024ed49c2db3b02.camel@gmail.com/T/#m00999652a8b4731fbdb7bf698d2e3666c65a60e7

$ ./cli.py --spec netdev.yaml --do napi-get --json='{"napi-id": 385}'
{'ifindex': 12,
 'irq': 291,
 'napi-id': 385,
 'pid': 3614,
 'rx-queues': [0],
 'tx-queues': [0]}

$ ./cli.py --spec netdev.yaml --dump napi-get --json='{"ifindex": 12}'
[{'ifindex': 12,
  'irq': 294,
  'napi-id': 596,
  'pid': 12361,
  'rx-queues': [3],
  'tx-queues': [3]},
 {'ifindex': 12,
  'irq': 293,
  'napi-id': 595,
  'pid': 12360,
  'rx-queues': [2],
  'tx-queues': [2]},
 {'ifindex': 12,
  'irq': 292,
  'napi-id': 594,
  'pid': 12359,
  'rx-queues': [1],
  'tx-queues': [1]},
 {'ifindex': 12,
  'irq': 291,
  'napi-id': 593,
  'pid': 12358,
  'rx-queues': [0],
  'tx-queues': [0]}]

v2 -> v1
* Removed multi-attr nest for NAPI object
* Added support for flat/individual NAPI objects
* Changed 'do' command to take napi-id as argument
* Supported filtered 'dump' (dump with ifindex for a netdev and dump for
  all netdevs)

RFC -> v1
* Changed to separate 'napi_get' command
* Added support to expose interrupt and PID for the NAPI
* Used list of netdev queue structs
* Split patches further and fixed code style and errors

---

Amritha Nambiar (9):
      net: Introduce new fields for napi and queue associations
      ice: Add support in the driver for associating napi with queue[s]
      netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI
      net: Move kernel helpers for queue index outside sysfs
      netdev-genl: Add netlink framework functions for napi
      netdev-genl: spec: Add irq in netdev netlink YAML spec
      net: Add NAPI IRQ support
      netdev-genl: spec: Add PID in netdev netlink YAML spec
      netdev-genl: Add PID for the NAPI thread


 Documentation/netlink/specs/netdev.yaml   |   52 ++++++++
 drivers/net/ethernet/intel/ice/ice_lib.c  |   60 ++++++++++
 drivers/net/ethernet/intel/ice/ice_lib.h  |    4 +
 drivers/net/ethernet/intel/ice/ice_main.c |    4 -
 include/linux/netdevice.h                 |   34 +++++
 include/net/netdev_rx_queue.h             |    7 +
 include/uapi/linux/netdev.h               |   13 ++
 net/core/dev.c                            |   53 ++++++++
 net/core/net-sysfs.c                      |   11 --
 net/core/netdev-genl-gen.c                |   24 ++++
 net/core/netdev-genl-gen.h                |    2 
 net/core/netdev-genl.c                    |  182 +++++++++++++++++++++++++++++
 tools/include/uapi/linux/netdev.h         |   13 ++
 tools/net/ynl/generated/netdev-user.c     |  177 ++++++++++++++++++++++++++++
 tools/net/ynl/generated/netdev-user.h     |   83 +++++++++++++
 tools/net/ynl/ynl-gen-c.py                |    2 
 16 files changed, 704 insertions(+), 17 deletions(-)

--

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

end of thread, other threads:[~2023-08-24 23:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-21 23:25 [net-next PATCH v2 0/9] Introduce NAPI queues support Amritha Nambiar
2023-08-21 23:25 ` [net-next PATCH v2 1/9] net: Introduce new fields for napi and queue associations Amritha Nambiar
2023-08-21 23:25 ` [net-next PATCH v2 2/9] ice: Add support in the driver for associating napi with queue[s] Amritha Nambiar
2023-08-21 23:25 ` [net-next PATCH v2 3/9] netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI Amritha Nambiar
2023-08-23  0:39   ` Jakub Kicinski
2023-08-24  0:46     ` Nambiar, Amritha
2023-08-24  1:34       ` Jakub Kicinski
2023-08-24 22:26         ` Nambiar, Amritha
2023-08-24 23:55           ` Jakub Kicinski
2023-08-21 23:25 ` [net-next PATCH v2 4/9] net: Move kernel helpers for queue index outside sysfs Amritha Nambiar
2023-08-23  0:40   ` Jakub Kicinski
2023-08-23 23:57     ` Nambiar, Amritha
2023-08-21 23:25 ` [net-next PATCH v2 5/9] netdev-genl: Add netlink framework functions for napi Amritha Nambiar
2023-08-23  0:51   ` Jakub Kicinski
2023-08-23 23:53     ` Nambiar, Amritha
2023-08-21 23:25 ` [net-next PATCH v2 6/9] netdev-genl: spec: Add irq in netdev netlink YAML spec Amritha Nambiar
2023-08-21 23:25 ` [net-next PATCH v2 7/9] net: Add NAPI IRQ support Amritha Nambiar
2023-08-23  0:52   ` Jakub Kicinski
2023-08-23 23:49     ` Nambiar, Amritha
2023-08-21 23:25 ` [net-next PATCH v2 8/9] netdev-genl: spec: Add PID in netdev netlink YAML spec Amritha Nambiar
2023-08-21 23:25 ` [net-next PATCH v2 9/9] netdev-genl: Add PID for the NAPI thread Amritha Nambiar
2023-08-23 10:24 ` [net-next PATCH v2 0/9] Introduce NAPI queues support David Laight
2023-08-23 23:49   ` Nambiar, Amritha

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