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: packetdrill: pass send_omit_free to MSG_ZEROCOPY tests

The --send_omit_free flag is needed for TCP zero copy tests, to ensure
that packetdrill doesn't free the send() buffer after the send() call.

Fixes: 1e42f73fd3c2 ("selftests/net: packetdrill: import tcp/zerocopy")
Closes: https://lore.kernel.org/netdev/20251124071831.4cbbf412@kernel.org/
Suggested-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20251125234029.1320984-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Willem de Bruijn and committed by
Jakub Kicinski
c01a6e5b af7273cc

+29
+4
tools/testing/selftests/net/packetdrill/tcp_syscall_bad_arg_sendmsg-empty-iov.pkt
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // Test that we correctly skip zero-length IOVs. 3 + 4 + --send_omit_free // do not reuse send buffers with zerocopy 5 + 3 6 `./defaults.sh` 7 + 4 8 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 5 9 +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0 6 10 +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_basic.pkt
··· 4 4 // send a packet with MSG_ZEROCOPY and receive the notification ID 5 5 // repeat and verify IDs are consecutive 6 6 7 + --send_omit_free // do not reuse send buffers with zerocopy 8 + 7 9 `./defaults.sh` 8 10 9 11 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_batch.pkt
··· 3 3 // 4 4 // send multiple packets, then read one range of all notifications. 5 5 6 + --send_omit_free // do not reuse send buffers with zerocopy 7 + 6 8 `./defaults.sh` 7 9 8 10 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_client.pkt
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // Minimal client-side zerocopy test 3 3 4 + --send_omit_free // do not reuse send buffers with zerocopy 5 + 4 6 `./defaults.sh` 5 7 6 8 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_closed.pkt
··· 7 7 // First send on a closed socket and wait for (absent) notification. 8 8 // Then connect and send and verify that notification nr. is zero. 9 9 10 + --send_omit_free // do not reuse send buffers with zerocopy 11 + 10 12 `./defaults.sh` 11 13 12 14 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4
+3
tools/testing/selftests/net/packetdrill/tcp_zerocopy_epoll_edge.pkt
··· 7 7 // fire two sends with MSG_ZEROCOPY and receive the acks. confirm that EPOLLERR 8 8 // is correctly fired only once, when EPOLLET is set. send another packet with 9 9 // MSG_ZEROCOPY. confirm that EPOLLERR is correctly fired again only once. 10 + 11 + --send_omit_free // do not reuse send buffers with zerocopy 12 + 10 13 `./defaults.sh` 11 14 12 15 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+3
tools/testing/selftests/net/packetdrill/tcp_zerocopy_epoll_exclusive.pkt
··· 8 8 // fire two sends with MSG_ZEROCOPY and receive the acks. confirm that EPOLLERR 9 9 // is correctly fired only once, when EPOLLET is set. send another packet with 10 10 // MSG_ZEROCOPY. confirm that EPOLLERR is correctly fired again only once. 11 + 12 + --send_omit_free // do not reuse send buffers with zerocopy 13 + 11 14 `./defaults.sh` 12 15 13 16 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+3
tools/testing/selftests/net/packetdrill/tcp_zerocopy_epoll_oneshot.pkt
··· 8 8 // is correctly fired only once, when EPOLLONESHOT is set. send another packet 9 9 // with MSG_ZEROCOPY. confirm that EPOLLERR is not fired. Rearm the FD and 10 10 // confirm that EPOLLERR is correctly set. 11 + 12 + --send_omit_free // do not reuse send buffers with zerocopy 13 + 11 14 `./defaults.sh` 12 15 13 16 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_fastopen-client.pkt
··· 8 8 // one will have no data in the initial send. On return 0 the 9 9 // zerocopy notification counter is not incremented. Verify this too. 10 10 11 + --send_omit_free // do not reuse send buffers with zerocopy 12 + 11 13 `./defaults.sh` 12 14 13 15 // Send a FastOpen request, no cookie yet so no data in SYN
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_fastopen-server.pkt
··· 4 4 // send data with MSG_FASTOPEN | MSG_ZEROCOPY and verify that the 5 5 // kernel returns the notification ID. 6 6 7 + --send_omit_free // do not reuse send buffers with zerocopy 8 + 7 9 `./defaults.sh 8 10 ./set_sysctls.py /proc/sys/net/ipv4/tcp_fastopen=0x207` 9 11
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_maxfrags.pkt
··· 7 7 // because each iovec element becomes a frag 8 8 // 3) the PSH bit is set on an skb when it runs out of fragments 9 9 10 + --send_omit_free // do not reuse send buffers with zerocopy 11 + 10 12 `./defaults.sh` 11 13 12 14 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2
tools/testing/selftests/net/packetdrill/tcp_zerocopy_small.pkt
··· 4 4 // verify that SO_EE_CODE_ZEROCOPY_COPIED is set on zerocopy 5 5 // packets of all sizes, including the smallest payload, 1B. 6 6 7 + --send_omit_free // do not reuse send buffers with zerocopy 8 + 7 9 `./defaults.sh` 8 10 9 11 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3