From: David Wei <dw@davidwei.uk>
To: netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Joe Damato <joe@dama.to>, Wei Wang <weibunny@meta.com>,
Bobby Eshleman <bobbyeshleman@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Nikolay Aleksandrov <razor@blackwall.org>
Subject: [PATCH net-next 0/4] selftests/net: add netkit container env and test
Date: Tue, 10 Feb 2026 12:04:15 -0800 [thread overview]
Message-ID: <20260210200419.3555944-1-dw@davidwei.uk> (raw)
Add a new Python selftest env NetDrvContEnv that sets up a pair of
netkit netdevs, with one inside of a netns, and a bpf prog that forwards
skbs from NETIF to the netkit inside the netns.
+-------------+ +----------------------------+
| INIT NS | | TEST NS |
| +---------+ | | +------------------------+ |
| | NETIF | | bpf | | Netkit | |
| | |-|--------|>| nk_guest | |
| +---------+ | | | {LOCAL_PREFIX_V6}::2:2 | |
| +---------+ | | +------------------------+ |
| | Netkit | | +----------------------------+
| | nk_host | |
| +---------+ |
+-------------+
I will use this series for queue leasing selftests. Include a basic ping
test in this series as demonstration.
David Wei (4):
selftests/net: Add bpf skb forwarding program
selftests/net: Export Netlink class via lib.py
selftests/net: Add env for container based tests
selftests/net: Add netkit container ping test
.../testing/selftests/drivers/net/README.rst | 19 ++
.../testing/selftests/drivers/net/hw/Makefile | 1 +
tools/testing/selftests/drivers/net/hw/config | 3 +
.../drivers/net/hw/lib/py/__init__.py | 7 +-
.../selftests/drivers/net/hw/nk_forward.bpf.c | 49 ++++++
.../selftests/drivers/net/hw/nk_netns.py | 23 +++
.../selftests/drivers/net/lib/py/__init__.py | 11 +-
.../selftests/drivers/net/lib/py/env.py | 163 ++++++++++++++++++
.../testing/selftests/net/lib/py/__init__.py | 4 +-
tools/testing/selftests/net/lib/py/ynl.py | 4 +-
10 files changed, 272 insertions(+), 12 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
next reply other threads:[~2026-02-10 20:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 20:04 David Wei [this message]
2026-02-10 20:04 ` [PATCH net-next 1/4] selftests/net: Add bpf skb forwarding program David Wei
2026-02-10 20:04 ` [PATCH net-next 2/4] selftests/net: Export Netlink class via lib.py David Wei
2026-02-11 16:12 ` Bobby Eshleman
2026-02-10 20:04 ` [PATCH net-next 3/4] selftests/net: Add env for container based tests David Wei
2026-02-11 17:43 ` Bobby Eshleman
2026-02-10 20:04 ` [PATCH net-next 4/4] selftests/net: Add netkit container ping test David Wei
2026-02-11 17:53 ` Bobby Eshleman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260210200419.3555944-1-dw@davidwei.uk \
--to=dw@davidwei.uk \
--cc=andrew+netdev@lunn.ch \
--cc=bobbyeshleman@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=sdf@fomichev.me \
--cc=weibunny@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox