netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] selftests/net: add container ping test
@ 2025-11-23  0:51 David Wei
  2025-11-23  0:51 ` [PATCH net-next v2 1/5] selftests/net: parametrise iou-zcrx.py with ksft_variants David Wei
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: David Wei @ 2025-11-23  0:51 UTC (permalink / raw)
  To: netdev
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Daniel Borkmann

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


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

end of thread, other threads:[~2025-11-24 18:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-23  0:51 [PATCH net-next v2 0/5] selftests/net: add container ping test David Wei
2025-11-23  0:51 ` [PATCH net-next v2 1/5] selftests/net: parametrise iou-zcrx.py with ksft_variants David Wei
2025-11-23  0:51 ` [PATCH net-next v2 2/5] selftests/net: add bpf skb forwarding program David Wei
2025-11-23  0:51 ` [PATCH net-next v2 3/5] selftests/net: add LOCAL_PREFIX_V{4,6} env to HW selftests David Wei
2025-11-24 17:32   ` Jakub Kicinski
2025-11-24 18:06     ` David Wei
2025-11-23  0:51 ` [PATCH net-next v2 4/5] selftests/net: add env for container based tests David Wei
2025-11-23  0:51 ` [PATCH net-next v2 5/5] selftests/net: add a netkit netns ping test David Wei

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