All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues
@ 2025-01-29 17:24 Joe Damato
  2025-01-29 17:24 ` [RFC net-next 1/2] netdev-genl: Add an XSK " Joe Damato
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Joe Damato @ 2025-01-29 17:24 UTC (permalink / raw)
  To: netdev
  Cc: sridhar.samudrala, Joe Damato, Alexei Starovoitov,
	Amritha Nambiar, Andrew Lunn,
	open list:XDP (eXpress Data Path):Keyword:(?:b|_)xdp(?:b|_),
	Daniel Borkmann, David S. Miller, Donald Hunter, Eric Dumazet,
	Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend, open list,
	open list:KERNEL SELFTEST FRAMEWORK, Martin Karsten, Mina Almasry,
	Paolo Abeni, Shuah Khan, Simon Horman, Stanislav Fomichev,
	Xuan Zhuo

Greetings:

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

But:

1. I couldn't pick a good "thing" to expose as "xsk", so I chose 0 or 1.
   Happy to take suggestions on what might be better to expose for the
   xsk queue attribute.

2. I create a silly C helper program to create an XDP socket in order to
   add a new test to queues.py. I'm not particularly good at python
   programming, so there's probably a better way to do this. Notably,
   python does not seem to have a socket.AF_XDP, so I needed the C
   helper to make a socket and bind it to a queue to perform the test.

Tested this on my mlx5 machine and the test seems to pass.

Happy to take any suggestions / feedback on this one; sorry in advance
if I missed many obvious better ways to do things.

Thanks,
Joe

[1]: https://lore.kernel.org/netdev/20250113143109.60afa59a@kernel.org/

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

 Documentation/netlink/specs/netdev.yaml       | 10 ++-
 include/uapi/linux/netdev.h                   |  1 +
 net/core/netdev-genl.c                        |  6 ++
 tools/include/uapi/linux/netdev.h             |  1 +
 tools/testing/selftests/drivers/.gitignore    |  1 +
 tools/testing/selftests/drivers/net/Makefile  |  3 +
 tools/testing/selftests/drivers/net/queues.py | 32 ++++++-
 .../selftests/drivers/net/xdp_helper.c        | 90 +++++++++++++++++++
 8 files changed, 141 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/xdp_helper.c


base-commit: 0ad9617c78acbc71373fb341a6f75d4012b01d69
-- 
2.25.1


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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 17:24 [RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues Joe Damato
2025-01-29 17:24 ` [RFC net-next 1/2] netdev-genl: Add an XSK " Joe Damato
2025-01-30  1:52   ` kernel test robot
2025-01-30  1:52   ` Jakub Kicinski
2025-01-30 16:26     ` Joe Damato
2025-01-30 18:06     ` Joe Damato
2025-01-30 18:13       ` Jakub Kicinski
2025-01-30  6:23   ` kernel test robot
2025-01-29 17:24 ` [RFC net-next 2/2] selftests: drv-net: Test queue xsk attribute Joe Damato
2025-01-30  2:07   ` Jakub Kicinski
2025-01-30 16:29     ` Joe Damato
2025-01-29 17:34 ` [RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues Joe Damato

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.