[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250129172431.65773-1-jdamato@fastly.com>
Date: Wed, 29 Jan 2025 17:24:23 +0000
From: Joe Damato <jdamato@...tly.com>
To: netdev@...r.kernel.org
Cc: sridhar.samudrala@...el.com,
Joe Damato <jdamato@...tly.com>,
Alexei Starovoitov <ast@...nel.org>,
Amritha Nambiar <amritha.nambiar@...el.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
bpf@...r.kernel.org (open list:XDP (eXpress Data Path):Keyword:(?:\b|_)xdp(?:\b|_)),
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Donald Hunter <donald.hunter@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
linux-kernel@...r.kernel.org (open list),
linux-kselftest@...r.kernel.org (open list:KERNEL SELFTEST FRAMEWORK),
Martin Karsten <mkarsten@...terloo.ca>,
Mina Almasry <almasrymina@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Simon Horman <horms@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Subject: [RFC net-next 0/2] netdevgenl: Add an xsk attribute to queues
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
Powered by blists - more mailing lists