]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftest: tun: Add helpers for GSO over UDP tunnel
authorXu Du <xudu@redhat.com>
Wed, 21 Jan 2026 10:04:58 +0000 (18:04 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Jan 2026 19:43:28 +0000 (11:43 -0800)
commit24e59f26eef2c806a8dbb94859aaf7af28197148
treeb74f780758b1646a5384043d709147824846252c
parent82cfdcfa201057861ec8a60ca9354d2c4c67bd68
selftest: tun: Add helpers for GSO over UDP tunnel

In preparation for testing GSO over UDP tunnels, enhance the test
infrastructure to support a more complex data path involving a TUN
device and a GENEVE udp tunnel.

This patch introduces a dedicated setup/teardown topology that creates
both a GENEVE tunnel interface and a TUN interface. The TUN device acts
as the VTEP (Virtual Tunnel Endpoint), allowing it to send and receive
virtio-net packets. This setup effectively tests the kernel's data path
for encapsulated traffic.

Note that after adding a new address to the UDP tunnel, we need to wait
a bit until the associated route is available.

Additionally, a new data structure is defined to manage test parameters.
This structure is designed to be extensible, allowing different test
data and configurations to be easily added in subsequent patches.

Signed-off-by: Xu Du <xudu@redhat.com>
Link: https://patch.msgid.link/b5787b8c269f43ce11e1756f1691cc7fd9a1e901.1768979440.git.xudu@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/tun.c