Commit c01a6e5b authored by Willem de Bruijn's avatar Willem de Bruijn Committed by Jakub Kicinski
Browse files

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: 1e42f73f ("selftests/net: packetdrill: import tcp/zerocopy")
Closes: https://lore.kernel.org/netdev/20251124071831.4cbbf412@kernel.org/


Suggested-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20251125234029.1320984-1-willemdebruijn.kernel@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent af7273cc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// Test that we correctly skip zero-length IOVs.

--send_omit_free	// do not reuse send buffers with zerocopy

`./defaults.sh`

    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
   +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
// send a packet with MSG_ZEROCOPY and receive the notification ID
// repeat and verify IDs are consecutive

--send_omit_free	// do not reuse send buffers with zerocopy

`./defaults.sh`

    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@
//
// send multiple packets, then read one range of all notifications.

--send_omit_free	// do not reuse send buffers with zerocopy

`./defaults.sh`

    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+2 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
// Minimal client-side zerocopy test

--send_omit_free	// do not reuse send buffers with zerocopy

`./defaults.sh`

    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
// First send on a closed socket and wait for (absent) notification.
// Then connect and send and verify that notification nr. is zero.

--send_omit_free	// do not reuse send buffers with zerocopy

`./defaults.sh`

    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 4
Loading