Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: relocate gro and toeplitz tests to drivers/net

The GRO test can run on a real device or a veth.
The Toeplitz hash test can only run on a real device.
Move them from net/ to drivers/net/ and drivers/net/hw/ respectively.

There are two scripts which set up the environment for these tests
setup_loopback.sh and setup_veth.sh. Move those scripts to net/lib.
The paths to the setup files are a little ugly but they will be
deleted shortly.

toeplitz_client.sh is not a test in itself, but rather a helper
to send traffic, so add it to TEST_FILES rather than TEST_PROGS.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20251120021024.2944527-6-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+17 -15
+1
tools/testing/selftests/drivers/net/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 + gro 2 3 napi_id_helper 3 4 psp_responder
+2
tools/testing/selftests/drivers/net/Makefile
··· 6 6 ../../net/lib.sh \ 7 7 8 8 TEST_GEN_FILES := \ 9 + gro \ 9 10 napi_id_helper \ 10 11 # end of TEST_GEN_FILES 11 12 12 13 TEST_PROGS := \ 14 + gro.sh \ 13 15 hds.py \ 14 16 napi_id.py \ 15 17 napi_threaded.py \
+1
tools/testing/selftests/drivers/net/hw/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 iou-zcrx 3 3 ncdevmem 4 + toeplitz
+6 -1
tools/testing/selftests/drivers/net/hw/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0+ OR MIT 2 2 3 - TEST_GEN_FILES = iou-zcrx 3 + TEST_GEN_FILES := \ 4 + iou-zcrx \ 5 + toeplitz \ 6 + # end of TEST_GEN_FILES 4 7 5 8 TEST_PROGS = \ 6 9 csum.py \ ··· 24 21 rss_ctx.py \ 25 22 rss_flow_label.py \ 26 23 rss_input_xfrm.py \ 24 + toeplitz.sh \ 27 25 tso.py \ 28 26 xsk_reconfig.py \ 29 27 # 30 28 31 29 TEST_FILES := \ 32 30 ethtool_lib.sh \ 31 + toeplitz_client.sh \ 33 32 # 34 33 35 34 TEST_INCLUDES := \
-2
tools/testing/selftests/net/.gitignore
··· 7 7 diag_uid 8 8 epoll_busy_poll 9 9 fin_ack_lat 10 - gro 11 10 hwtstamp_config 12 11 io_uring_zerocopy_tx 13 12 ioam6_parser ··· 56 57 tfo 57 58 timestamping 58 59 tls 59 - toeplitz 60 60 tools 61 61 tun 62 62 txring_overwrite
-7
tools/testing/selftests/net/Makefile
··· 38 38 fq_band_pktlimit.sh \ 39 39 gre_gso.sh \ 40 40 gre_ipv6_lladdr.sh \ 41 - gro.sh \ 42 41 icmp.sh \ 43 42 icmp_redirect.sh \ 44 43 io_uring_zerocopy_tx.sh \ ··· 120 121 # end of TEST_PROGS 121 122 122 123 TEST_PROGS_EXTENDED := \ 123 - toeplitz.sh \ 124 - toeplitz_client.sh \ 125 124 xfrm_policy_add_speed.sh \ 126 125 # end of TEST_PROGS_EXTENDED 127 126 ··· 127 130 bind_bhash \ 128 131 cmsg_sender \ 129 132 fin_ack_lat \ 130 - gro \ 131 133 hwtstamp_config \ 132 134 io_uring_zerocopy_tx \ 133 135 ioam6_parser \ ··· 155 159 tcp_mmap \ 156 160 tfo \ 157 161 timestamping \ 158 - toeplitz \ 159 162 txring_overwrite \ 160 163 txtimestamp \ 161 164 udpgso \ ··· 188 193 in_netns.sh \ 189 194 lib.sh \ 190 195 settings \ 191 - setup_loopback.sh \ 192 - setup_veth.sh \ 193 196 # end of TEST_FILES 194 197 195 198 # YNL files, must be before "include ..lib.mk"
+1 -1
tools/testing/selftests/net/gro.c tools/testing/selftests/drivers/net/gro.c
··· 57 57 #include <string.h> 58 58 #include <unistd.h> 59 59 60 - #include "../kselftest.h" 60 + #include "../../kselftest.h" 61 61 62 62 #define DPORT 8000 63 63 #define SPORT 1500
+2 -2
tools/testing/selftests/net/gro.sh tools/testing/selftests/drivers/net/gro.sh
··· 90 90 done 91 91 92 92 if [ -n "$dev" ]; then 93 - source setup_loopback.sh 93 + source $(dirname $0)/../../net/lib/setup_loopback.sh 94 94 else 95 - source setup_veth.sh 95 + source $(dirname $0)/../../net/lib/setup_veth.sh 96 96 fi 97 97 98 98 setup
+2
tools/testing/selftests/net/lib/Makefile
··· 8 8 TEST_FILES := \ 9 9 ../../../../net/ynl \ 10 10 ../../../../../Documentation/netlink/specs \ 11 + setup_loopback.sh \ 12 + setup_veth.sh \ 11 13 # end of TEST_FILES 12 14 13 15 TEST_GEN_FILES := \
tools/testing/selftests/net/setup_loopback.sh tools/testing/selftests/net/lib/setup_loopback.sh
tools/testing/selftests/net/setup_veth.sh tools/testing/selftests/net/lib/setup_veth.sh
+1 -1
tools/testing/selftests/net/toeplitz.c tools/testing/selftests/drivers/net/hw/toeplitz.c
··· 52 52 #include <sys/types.h> 53 53 #include <unistd.h> 54 54 55 - #include "../kselftest.h" 55 + #include "../../../kselftest.h" 56 56 57 57 #define TOEPLITZ_KEY_MIN_LEN 40 58 58 #define TOEPLITZ_KEY_MAX_LEN 60
+1 -1
tools/testing/selftests/net/toeplitz.sh tools/testing/selftests/drivers/net/hw/toeplitz.sh
··· 11 11 # invoke as ./toeplitz.sh (-i <iface>) -u|-t -4|-6 \ 12 12 # [(-rss -irq_prefix <irq-pattern-prefix>)|(-rps <rps_map>)] 13 13 14 - source setup_loopback.sh 14 + source $(dirname $0)/../../../net/lib/setup_loopback.sh 15 15 readonly SERVER_IP4="192.168.1.200/24" 16 16 readonly SERVER_IP6="fda8::1/64" 17 17 readonly SERVER_MAC="aa:00:00:00:00:02"
tools/testing/selftests/net/toeplitz_client.sh tools/testing/selftests/drivers/net/hw/toeplitz_client.sh