]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/net: Add netkit container tests
authorDavid Wei <dw@davidwei.uk>
Thu, 15 Jan 2026 08:26:03 +0000 (09:26 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 20 Jan 2026 10:58:50 +0000 (11:58 +0100)
commit931420a2fc363817c92990fa14eb1bdec024ce04
tree1a19c67570e38e8c1754b06bbc75bf3a8d0ebbf4
parentab771c938d9a57d510bb70c565c9388b10494090
selftests/net: Add netkit container tests

Add two tests using NetDrvContEnv. One basic test that sets up a netkit
pair, with one end in a netns. Use LOCAL_PREFIX_V6 and nk_forward BPF
program to ping from a remote host to the netkit in netns.

Second is a selftest for netkit queue leasing, using io_uring zero copy
test binary inside of a netns with netkit. This checks that memory
providers can be bound against virtual queues in a netkit within a
netns that are leasing from a physical netdev in the default netns.

Signed-off-by: David Wei <dw@davidwei.uk>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20260115082603.219152-17-daniel@iogearbox.net
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/hw/Makefile
tools/testing/selftests/drivers/net/hw/nk_netns.py [new file with mode: 0755]
tools/testing/selftests/drivers/net/hw/nk_qlease.py [new file with mode: 0755]