selftests: udpgso: Pull up network setup into shell script
authorJakub Sitnicki <jakub@cloudflare.com>
Wed, 7 Feb 2024 20:35:22 +0000 (21:35 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Feb 2024 20:56:49 +0000 (12:56 -0800)
commitd45f5fa8b4aeaf24d2d5911cb459aeb74bada52c
tree8d35386c05bf6c448b960c20c3335402f2b5ae7c
parent32b803334f0b0abc07be72d257a6b04c6b9aaced
selftests: udpgso: Pull up network setup into shell script

udpgso regression test configures routing and device MTU directly through
uAPI (Netlink, ioctl) to do its job. While there is nothing wrong with it,
it takes more effort than doing it from shell.

Looking forward, we would like to extend the udpgso regression tests to
cover the EIO corner case [1], once it gets addressed. That will require a
dummy device and device feature manipulation to set it up. Which means more
Netlink code.

So, in preparation, pull out network configuration into the shell script
part of the test, so it is easily extendable in the future.

Also, because it now easy to setup routing, add a second local IPv6
address. Because the second address is not managed by the kernel, we can
"replace" the corresponding local route with a reduced-MTU one. This
unblocks the disabled "ipv6 connected" test case. Add a similar setup for
IPv4 for symmetry.

[1] https://lore.kernel.org/netdev/87jzqsld6q.fsf@cloudflare.com/

Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/r/20240207-jakub-krn-635-v3-1-3dfa3da8a7d3@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/udpgso.c
tools/testing/selftests/net/udpgso.sh