netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/3] netdev-genl: Add an xsk attribute to queues
@ 2025-02-07  3:08 Joe Damato
  2025-02-07  3:08 ` [PATCH net-next v4 1/3] netlink: Add nla_put_empty_nest helper Joe Damato
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Joe Damato @ 2025-02-07  3:08 UTC (permalink / raw)
  To: netdev
  Cc: pabeni, edumazet, sridhar.samudrala, Joe Damato,
	Alexei Starovoitov, Andrew Lunn,
	open list:XDP (eXpress Data Path):Keyword:(?:b|_)xdp(?:b|_),
	Daniel Borkmann, Daniel Jurgens, David S. Miller, David Wei,
	Donald Hunter, Jakub Kicinski, Jesper Dangaard Brouer,
	John Fastabend, open list, open list:KERNEL SELFTEST FRAMEWORK,
	Martin Karsten, Mina Almasry, Shuah Khan, Simon Horman,
	Stanislav Fomichev, Xuan Zhuo

Greetings:

Welcome to v4. Small functional change, which makes the code cleaner
(see changelog) and tests pass on my machine with mlx5 and netdevsim.

This is an attempt to followup on something Jakub asked me about [1],
adding an xsk attribute to queues and more clearly documenting which
queues are linked to NAPIs...

After the RFC [2], Jakub suggested creating an empty nest for queues
which have a pool, so I've adjusted this version to work that way.

The nest can be extended in the future to express attributes about XSK
as needed. Queues which are not used for AF_XDP do not have the xsk
attribute present.

I've run the included test on:
  - my mlx5 machine (via NETIF=)
  - without setting NETIF

And the test seems to pass in both cases.

Thanks,
Joe

[1]: https://lore.kernel.org/netdev/20250113143109.60afa59a@kernel.org/
[2]: https://lore.kernel.org/netdev/20250129172431.65773-1-jdamato@fastly.com/

v4:
  - Add patch 1, as suggested by Jakub, which adds an empty nest helper.
  - Use the helper in patch 2, which makes the code cleaner and prevents
    a possible bug.

v3: https://lore.kernel.org/netdev/20250204191108.161046-1-jdamato@fastly.com/
  - Change comment format in patch 2 to avoid kdoc warnings. No other
    changes.

v2: https://lore.kernel.org/all/20250203185828.19334-1-jdamato@fastly.com/
  - Switched from RFC to actual submission now that net-next is open
  - Adjusted patch 1 to include an empty nest as suggested by Jakub
  - Adjusted patch 2 to update the test based on changes to patch 1, and
    to incorporate some Python feedback from Jakub :)

rfc: https://lore.kernel.org/netdev/20250129172431.65773-1-jdamato@fastly.com/


Joe Damato (3):
  netlink: Add nla_put_empty_nest helper
  netdev-genl: Add an XSK attribute to queues
  selftests: drv-net: Test queue xsk attribute

 Documentation/netlink/specs/netdev.yaml       | 13 ++-
 include/net/netlink.h                         | 15 ++++
 include/uapi/linux/netdev.h                   |  6 ++
 net/core/netdev-genl.c                        | 12 +++
 tools/include/uapi/linux/netdev.h             |  6 ++
 .../testing/selftests/drivers/net/.gitignore  |  2 +
 tools/testing/selftests/drivers/net/Makefile  |  3 +
 tools/testing/selftests/drivers/net/queues.py | 35 +++++++-
 .../selftests/drivers/net/xdp_helper.c        | 89 +++++++++++++++++++
 9 files changed, 178 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/.gitignore
 create mode 100644 tools/testing/selftests/drivers/net/xdp_helper.c


base-commit: f3eba8edd885db439f4bfaa2cf9d766bad1ae6c5
-- 
2.43.0


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

end of thread, other threads:[~2025-02-08  4:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07  3:08 [PATCH net-next v4 0/3] netdev-genl: Add an xsk attribute to queues Joe Damato
2025-02-07  3:08 ` [PATCH net-next v4 1/3] netlink: Add nla_put_empty_nest helper Joe Damato
2025-02-07  3:08 ` [PATCH net-next v4 2/3] netdev-genl: Add an XSK attribute to queues Joe Damato
2025-02-07 13:30   ` Simon Horman
2025-02-07 17:24     ` Joe Damato
2025-02-08  4:02   ` kernel test robot
2025-02-07  3:08 ` [PATCH net-next v4 3/3] selftests: drv-net: Test queue xsk attribute Joe Damato

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