[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251123005108.3694230-1-dw@davidwei.uk>
Date: Sat, 22 Nov 2025 16:51:03 -0800
From: David Wei <dw@...idwei.uk>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>
Subject: [PATCH net-next v2 0/5] selftests/net: add container ping test
This patchset is mostly prep work for adding a data path test for netkit
bind queue API used by iou zcrx and AF_XDP.
Use ksft_variants in iou-zcrx.py to run the same test cases with both
single queue or RSS. With changes in v2 this is a bit of an unrelated
drive by change but I'll keep it in this series.
Add a new test env NetDrvContEnv that sets up a container based test
with a netkit pair. This only works with netkit for now, but can be
extended to support e.g. veth.
The netdev core cannot forward net_iovs, and so to get skbs containing
net_iovs into a container, add a basic bpf tc/ingress prog to forward
skbs into a netkit pair.
For a remote to talk to the netns netkit, it needs a publicly routable
IP. Add a new env var LOCAL_PREFIX_V{4,6} that defines such a prefix.
Finally, add a basic ping test that brings everything together.
v2:
- remove ksft_run suffix, MemPrvEnv, rand_ifname, bpf C loader
- implement NetDrvContEnv
- redo nk_netns.py ping test
- fix docs
David Wei (5):
selftests/net: parametrise iou-zcrx.py with ksft_variants
selftests/net: add bpf skb forwarding program
selftests/net: add LOCAL_PREFIX_V{4,6} env to HW selftests
selftests/net: add env for container based tests
selftests/net: add a netkit netns ping test
.../testing/selftests/drivers/net/README.rst | 7 +
.../selftests/drivers/net/hw/.gitignore | 2 +
.../testing/selftests/drivers/net/hw/Makefile | 1 +
.../selftests/drivers/net/hw/iou-zcrx.py | 162 ++++++++----------
.../drivers/net/hw/lib/py/__init__.py | 5 +-
.../selftests/drivers/net/hw/nk_forward.bpf.c | 49 ++++++
.../selftests/drivers/net/hw/nk_netns.py | 23 +++
.../selftests/drivers/net/lib/py/__init__.py | 5 +-
.../selftests/drivers/net/lib/py/env.py | 106 +++++++++++-
9 files changed, 266 insertions(+), 94 deletions(-)
create mode 100644 tools/testing/selftests/drivers/net/hw/nk_forward.bpf.c
create mode 100755 tools/testing/selftests/drivers/net/hw/nk_netns.py
--
2.47.3
Powered by blists - more mailing lists