Skip to content

Commit 07b65c5

Browse files
wdebruijdavem330
authored andcommitted
test: add msg_zerocopy test
Introduce regression test for msg_zerocopy feature. Send traffic from one process to another with and without zerocopy. Evaluate tcp, udp, raw and packet sockets, including variants - udp: corking and corking with mixed copy/zerocopy calls - raw: with and without hdrincl - packet: at both raw and dgram level Test on both ipv4 and ipv6, optionally with ethtool changes to disable scatter-gather, tx checksum or tso offload. All of these can affect zerocopy behavior. The regression test can be run on a single machine if over a veth pair. Then skb_orphan_frags_rx must be modified to be identical to skb_orphan_frags to allow forwarding zerocopy locally. The msg_zerocopy.sh script will setup the veth pair in network namespaces and run all tests. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f214f91 commit 07b65c5

File tree

4 files changed

+811
-1
lines changed

4 files changed

+811
-1
lines changed

tools/testing/selftests/net/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
msg_zerocopy
12
socket
23
psock_fanout
34
psock_tpacket

tools/testing/selftests/net/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh
77
TEST_GEN_FILES = socket
88
TEST_GEN_FILES += psock_fanout psock_tpacket
99
TEST_GEN_FILES += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
10-
TEST_GEN_FILES += reuseport_dualstack
10+
TEST_GEN_FILES += reuseport_dualstack msg_zerocopy
1111

1212
include ../lib.mk
1313

0 commit comments

Comments
 (0)