From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, Willem de Bruijn <willemb@google.com>
Cc: netdev@vger.kernel.org
Subject: Re: [TEST] tcp_zerocopy_maxfrags.pkt fails
Date: Mon, 24 Nov 2025 11:29:31 -0500 [thread overview]
Message-ID: <willemdebruijn.kernel.1fe4306a89d08@gmail.com> (raw)
In-Reply-To: <20251124071831.4cbbf412@kernel.org>
Jakub Kicinski wrote:
> Hi Willem!
>
> I migrated netdev CI to our own infra now, and the slightly faster,
> Fedora-based system is failing tcp_zerocopy_maxfrags.pkt:
>
> # tcp_zerocopy_maxfrags.pkt:56: error handling packet: incorrect outbound data payload
> # script packet: 1.000237 P. 36:37(1) ack 1
> # actual packet: 1.000235 P. 36:37(1) ack 1 win 1050
> # not ok 1 ipv4
> # tcp_zerocopy_maxfrags.pkt:56: error handling packet: incorrect outbound data payload
> # script packet: 1.000209 P. 36:37(1) ack 1
> # actual packet: 1.000208 P. 36:37(1) ack 1 win 1050
> # not ok 2 ipv6
> # # Totals: pass:0 fail:2 xfail:0 xpass:0 skip:0 error:0
>
> https://netdev-ctrl.bots.linux.dev/logs/vmksft/packetdrill/results/399942/13-tcp-zerocopy-maxfrags-pkt/stdout
>
> This happens on both debug and non-debug kernel (tho on the former
> the failure is masked due to MACHINE_SLOW).
That's an odd error.
The test send an msg_iov of 18 1 byte fragments. And verifies that
only 17 fit in one packet, followed by a single 1 byte packet. The
test does not explicitly initialize payload, but trusts packetdrill
to handle that. Relevant snippet below.
Packetdrill complains about payload contents. That error is only
generated by the below check in run_packet.c. Pretty straightforward.
Packetdrill agrees that the packet is one byte long. The win argument
is optional on outgoing packets, not relevant to the failure.
So somehow the data in that frag got overwritten in the short window
between when it was injected into the kernel and when it was observed?
Seems so unlikely.
Sorry, I'm a bit at a loss at least initially as to the cause.
----
// send a zerocopy iov of 18 elements:
+1 sendmsg(4, {msg_name(...)=...,
msg_iov(18)=[{..., 1}, {..., 1}, {..., 1}, {..., 1},
{..., 1}, {..., 1}, {..., 1}, {..., 1},
{..., 1}, {..., 1}, {..., 1}, {..., 1},
{..., 1}, {..., 1}, {..., 1}, {..., 1},
{..., 1}, {..., 1}],
msg_flags=0}, MSG_ZEROCOPY) = 18
// verify that it is split in one skb of 17 frags + 1 of 1 frag
// verify that both have the PSH bit set
+0 > P. 19:36(17) ack 1
+0 < . 1:1(0) ack 36 win 257
+0 > P. 36:37(1) ack 1
+0 < . 1:1(0) ack 37 win 257
----
/* Verify TCP/UDP payload matches expected value. */
static int verify_outbound_live_payload(
struct packet *actual_packet,
struct packet *script_packet, char **error)
{
/* Diff the TCP/UDP data payloads. We've already implicitly
* checked their length by checking the IP and TCP/UDP headers.
*/
assert(packet_payload_len(actual_packet) ==
packet_payload_len(script_packet));
if (memcmp(packet_payload(script_packet),
packet_payload(actual_packet),
packet_payload_len(script_packet)) != 0) {
asprintf(error, "incorrect outbound data payload");
return STATUS_ERR;
}
return STATUS_OK;
}
next prev parent reply other threads:[~2025-11-24 16:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 15:18 [TEST] tcp_zerocopy_maxfrags.pkt fails Jakub Kicinski
2025-11-24 16:29 ` Willem de Bruijn [this message]
2025-11-24 16:38 ` Neal Cardwell
2025-11-25 19:49 ` Willem de Bruijn
2025-11-25 20:31 ` Neal Cardwell
2025-11-25 20:44 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=willemdebruijn.kernel.1fe4306a89d08@gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.