]> asedeno.scripts.mit.edu Git - linux.git/commit
test: add msg_zerocopy test
authorWillem de Bruijn <willemb@google.com>
Thu, 3 Aug 2017 20:29:45 +0000 (16:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2017 04:37:30 +0000 (21:37 -0700)
commit07b65c5b31ce477c3ced6e3541fd2331338be214
treea3fa2da0af407268ef4daeb7d7e797df554a2e29
parentf214f915e7db99091f1312c48b30928c1e0c90b7
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>
tools/testing/selftests/net/.gitignore
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/msg_zerocopy.c [new file with mode: 0644]
tools/testing/selftests/net/msg_zerocopy.sh [new file with mode: 0755]