Skip to contentSkip to conversation

amt: mark relay data as a UDP tunnel packet, with a selftest

PATCH Superseded Omar Ramadan 2 participants 7 messages Oct 2 – Oct 4

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover amt: mark relay data as a UDP tunnel packet, with a selftest

amt_send_multicast_data() never calls udp_tunnel_handle_offloads(), unlike other UDP tunnels. With tx checksum offload on the amt device (off by default), a UDP_SEGMENT burst through the relay is dropped before patch 1 and delivered after it. Patch 2 adds the selftest.

This follows Eric Dumazet's suggestion on my withdrawn [PATCH net] "amt:
do not offer software GSO on the amt device":
https://lore.kernel.org/all/[email protected]/

Not touched: amt advertises NETIF_F_GSO_FRAGLIST and skb_copy_expand() refuses such skbs with a WARN_ON_ONCE(). I have not reproduced it, and it would be a separate fix.

v2:
- shorten the changelogs, add Suggested-by, and move the testing notes below the "---" (Eric); patch 1's code is unchanged, one comment is corrected
- patch 2: fix the shellcheck and 80-column checkpatch findings reported by the netdev CI, skip when AF_PACKET is not available (v1 reported no result and exit 0), add CONFIG_PACKET to the config, drop dead options and code
v1: https://lore.kernel.org/all/[email protected]/

Omar Ramadan (2):
amt: mark relay data as a UDP tunnel packet before sending it
selftests: net: add an amt test for UDP_SEGMENT through the relay

 drivers/net/amt.c                      |  10 +
 tools/testing/selftests/net/.gitignore |   1 +
 tools/testing/selftests/net/Makefile   |   2 +
 tools/testing/selftests/net/amt_gso.c  | 457 +++++++++++++++++++++++++
 tools/testing/selftests/net/amt_gso.sh | 269 +++++++++++++++
 tools/testing/selftests/net/config     |   1 +
 6 files changed, 740 insertions(+)
 create mode 100644 tools/testing/selftests/net/amt_gso.c
 create mode 100755 tools/testing/selftests/net/amt_gso.sh
Signature · 1 line
2.50.1 (Apple Git-155)
#1 lore raw

PATCH v2 1/2 amt: mark relay data as a UDP tunnel packet before sending it

amt_send_multicast_data() encapsulates the multicast packet in AMT + UDP + IP headers, but unlike other UDP tunnels it never calls udp_tunnel_handle_offloads().

If tx checksum offload is enabled on the amt device (off by default), GSO packets (e.g. from a UDP_SEGMENT sender) reach amt_dev_xmit() unsegmented. They are then sent with neither skb->encapsulation nor SKB_GSO_UDP_TUNNEL_CSUM set, and the lower device drops them:
__udp_gso_segment() fails because csum_start does not match the (outer) transport header.

Call udp_tunnel_handle_offloads(skb, true), as other UDP tunnels do. udp_csum is true because udp_tunnel_xmit_skb() is called with nocheck == false.

Also reset the mac header of the copy before recording the inner headers. amt_dev_xmit() pulled the Ethernet header without moving mac_header, so inner_mac_header would point 14 bytes before the inner IP header. That makes tnl_hlen negative in __skb_udp_tunnel_segment().

---

Notes (v2):
Found by an LLM-assisted review of drivers/net/amt.c. Reproduced with the selftest in patch 2 (x86_64 KVM guest, CONFIG_DEBUG_NET=y), tx offload on, UDP_SEGMENT bursts of 8 x 1200 + 100 bytes, IPv4 and IPv6 inner traffic, 40 runs per kernel on net-next eb0c18404c89 and 20 with this version of the selftest on 071876fd5048:

- before: 0 of 900 datagrams delivered and tx_dropped +100 on the relay's egress device, in every case
- after: 900 of 900 delivered, no drops and no UDP checksum errors at the gateway, in every case
- with only the skb_reset_mac_header() call removed (two runs, an earlier version of the selftest), the packets are still dropped and DEBUG_NET warns in skb_udp_tunnel_segment()
- tx offload off, and non-GSO datagrams with it on, work before and after; amt.sh passes with the patch

Not tested here: hardware UDP tunnel segmentation offload, hardware checksumming of a non-GSO CHECKSUM_PARTIAL packet (it now leaves amt with skb->encapsulation set, as with other UDP tunnels; the selftest's egress device has tx offload off), a forwarded GRO packet as the GSO source, KASAN (the netdev CI's debug kernel ran v1), sparse, udp_csum == false, and amt.sh on the unpatched kernel.

 drivers/net/amt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/net/amt.c +10 -0
index 0277e4c..a8236d4 100644
@@ -1078,7 +1078,17 @@ static void amt_send_multicast_data(struct amt_dev *amt,
 	if (!skb)
 		return;
 
+	/* amt_dev_xmit() pulled the Ethernet header without moving the mac
+	 * header. The tunnelled payload has no link-layer header, so the
+	 * inner mac header must coincide with the inner IP header.
+	 */
+	skb_reset_mac_header(skb);
 	skb_reset_inner_headers(skb);
+	if (udp_tunnel_handle_offloads(skb, true)) {
+		kfree_skb(skb);
+		return;
+	}
+
 	memset(&fl4, 0, sizeof(struct flowi4));
 	fl4.flowi4_oif         = amt->stream_dev->ifindex;
 	fl4.daddr              = tunnel->ip4;
Signature · 1 line
2.50.1 (Apple Git-155)
#2 lore raw

Re: [PATCH net-next v2 1/2] amt: mark relay data as a UDP tunnel packet before sending it

Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you…

Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit fixes a user-visible bug but has no Fixes: trailer.

Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but fraglist GSO skbs that reach the AMT relay unsegmented, the same situation the…

--

amt: mark relay data as a UDP tunnel packet before sending it

This patch makes amt_send_multicast_data() call udp_tunnel_handle_offloads(skb, true), so GSO packets relayed with tx checksum offload enabled are marked as UDP tunnel packets. It also resets the mac header of the copied skb before recording the inner headers, so inner_mac_header lines up with the inner IP header.

Quoted 3 lines

[Severity: Low]
Should this have a Fixes: tag?

The send path being fixed was added by commit cbc21dc1cfe9 ("amt: add data plane of amt interface"). That commit introduced amt_send_multicast_data() with skb_copy_expand(), skb_reset_inner_headers() and udp_tunnel_xmit_skb(), but no udp_tunnel_handle_offloads().

Suggested trailer:

Fixes cbc21dc1cfe9 ("amt: add data plane of amt interface")

The notes say this was tested on net-next. Since it fixes packet loss that users can see, should it target net instead?

drivers/net/amt.c static void amt_send_multicast_data(struct amt_dev *amt, · line 1080

Quoted 8 lines
drivers/net/amt.c +0 -0
index 0277e4cac39bd..a8236d40c2e70 100644
@@ -1078,7 +1078,17 @@ static void amt_send_multicast_data(struct amt_dev *amt,
 	if (!skb)
 		return;
 

[Severity: High]
This is a pre-existing issue, but it is closely related to this patch. Fraglist GSO skbs can reach the relay unsegmented in the same way, yet they never get to the new udp_tunnel_handle_offloads() call. The skb_copy_expand() just above rejects them first:

net/core/skbuff.c:skb_copy_expand() {
    ...
	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
		return NULL;
    ...
}

amt_link_setup() advertises fraglist GSO:

	dev->features		|= NETIF_F_GSO_SOFTWARE;
	dev->hw_features	|= NETIF_F_SG | NETIF_F_HW_CSUM;
	dev->hw_features	|= NETIF_F_FRAGLIST | NETIF_F_RXCSUM;
	dev->hw_features	|= NETIF_F_GSO_SOFTWARE;

NETIF_F_GSO_SOFTWARE includes NETIF_F_GSO_FRAGLIST and NETIF_F_GSO_UDP_L4.

Suppose the relay's ingress device has rx-gro-list enabled. For forwarded multicast there is no local socket, so udp_gro_receive() sets is_flist. The result is an skb with gso_type
SKB_GSO_UDP_L4 | SKB_GSO_FRAGLIST and a frag_list.

ipmr then forwards it to the amt vif. ipmr_prepare_xmit() only drops oversized skbs when DF is set, and the sender controls DF.

Now suppose tx-checksumming and tx-scatter-gather-fraglist are enabled on amt. skb_gso_ok() then returns true, so validate_xmit_skb() leaves the skb unsegmented, and the path becomes:

amt_dev_xmit()
amt_send_multicast_data()

    skb_copy_expand()
      WARN_ON_ONCE(... SKB_GSO_FRAGLIST)
      return NULL

The function then returns without any drop accounting. Once those non-default offloads are on, can ordinary remote multicast traffic trigger this WARN? With panic_on_warn, that would panic the relay.

The notes list "a forwarded GRO packet as the GSO source" as untested. Would it make sense to also stop advertising NETIF_F_GSO_FRAGLIST and NETIF_F_FRAGLIST on amt? Another option is to segment or linearize fraglist skbs before the copy.

Quoted 11 lines
drivers/net/amt.c +10 -0
+	/* amt_dev_xmit() pulled the Ethernet header without moving the mac
+	 * header. The tunnelled payload has no link-layer header, so the
+	 * inner mac header must coincide with the inner IP header.
+	 */
+	skb_reset_mac_header(skb);
 	skb_reset_inner_headers(skb);
+	if (udp_tunnel_handle_offloads(skb, true)) {
+		kfree_skb(skb);
+		return;
+	}
+

[ ... ]

Signature · 1 line
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261002212458.34247-1-omar%40blockcast.net
#3 lore raw

Re: [PATCH net-next v2 1/2] amt: mark relay data as a UDP tunnel packet before sending it

Quoted 1 line · Sashiko

Should this have a Fixes: tag?

No, on purpose. Eric asked for this to go to net-next, since the bug needs a non-default setting:

"Note that tx checksum offload is off by default on amt, so the bug would not trigger by default."
"A better fix would be (for net-next) to call udp_tunnel_handle_offloads() in amt_send_multicast_data() like other UDP tunnels do"

https://lore.kernel.org/all/CAL4Wiiqw_7Mxa5W1EQgw2=KpJNNxG=cBLXsHvpio29GvD1UKZg@mail.gmail.com/

Quoted 1 line

This is a pre-existing issue, but it is closely related to this patch.

I have not reproduced it; so far this comes from reading the code. It would need rx-gro-list on the relay's ingress device, and tx checksumming plus tx-scatter-gather-fraglist on the amt device (all three off by default), and a GRO aggregate that passes ipmr's DF/MTU check. It predates this patch, and the cover letter already lists it as not touched and untested. I will send a separate fix for it once I have reproduced it.

#4 lore raw

PATCH v2 2/2 selftests: net: add an amt test for UDP_SEGMENT through the relay

In reply to Omar Ramadan

Add amt_gso.sh and its helper amt_gso. The test sends a UDP_SEGMENT burst from the relay namespace through an amt relay and gateway to a listener, with tx checksum offload off on the amt device (a control:
the core segments the burst before the driver) and on (the GSO skb reaches amt_dev_xmit()). It checks that the listener gets every datagram intact, that a GSO skb really reached the driver, that nothing larger than the MTU was put on the wire, and that the relay's egress device and the gateway report no drops or checksum errors.

The verdict needs AF_PACKET captures: add CONFIG_PACKET to the config, and skip when they are not available.

Assisted-by LLM

---

Notes (v2):
New in v2: the test skips when AF_PACKET is not available (without CONFIG_PACKET or CAP_NET_RAW the v1 test printed no result and exited 0), and dead options and code are gone. It gave the expected result in 20 of 20 runs per kernel on net-next 071876fd5048 (v1: 40 of 40 on eb0c18404c89), in a 4-vCPU KVM guest on a busy host: unpatched, only the two tx-on UDP_SEGMENT cases fail; patched, all six pass. An earlier draft failed in about 3 of 25 runs on a loaded guest because the receiver gave up waiting for the first datagram (inferred from the counters); it now waits up to 15 s for it, but the test may still be flaky elsewhere.

 tools/testing/selftests/net/.gitignore |   1 +
 tools/testing/selftests/net/Makefile   |   2 +
 tools/testing/selftests/net/amt_gso.c  | 457 +++++++++++++++++++++++++
 tools/testing/selftests/net/amt_gso.sh | 269 +++++++++++++++
 tools/testing/selftests/net/config     |   1 +
 5 files changed, 730 insertions(+)
 create mode 100644 tools/testing/selftests/net/amt_gso.c
 create mode 100755 tools/testing/selftests/net/amt_gso.sh
tools/testing/selftests/net/.gitignore +1 -0
index dacd36e..489d37b 100644
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
+amt_gso
 bind_bhash
 bind_timewait
 bind_wildcard
tools/testing/selftests/net/Makefile +2 -0
index cab3f2c..9af0d17 100644
@@ -9,6 +9,7 @@ CFLAGS += -I../
 TEST_PROGS := \
 	altnames.sh \
 	amt.sh \
+	amt_gso.sh \
 	arp_ndisc_evict_nocarrier.sh \
 	arp_ndisc_untracked_subnets.sh \
 	bareudp.sh \
@@ -143,6 +144,7 @@ TEST_PROGS_EXTENDED := \
 # end of TEST_PROGS_EXTENDED
 
 TEST_GEN_FILES := \
+	amt_gso \
 	bind_bhash \
 	cmsg_sender \
 	fin_ack_lat \
tools/testing/selftests/net/amt_gso.c new file +457 -0

457 lines not on this page · raw message

tools/testing/selftests/net/amt_gso.sh new file +269 -0

269 lines not on this page · raw message

tools/testing/selftests/net/config +1 -0
index 737e7e6..8f23da4 100644
@@ -117,6 +117,7 @@ CONFIG_NFT_COMPAT=m
 CONFIG_NFT_NAT=m
 CONFIG_NUMA=y
 CONFIG_OPENVSWITCH=m
+CONFIG_PACKET=y
 CONFIG_PAGE_POOL_STATS=y
 CONFIG_PSAMPLE=m
 CONFIG_RPS=y
Signature · 1 line
2.50.1 (Apple Git-155)
#5 lore raw

Re: [PATCH net-next v2 2/2] selftests: net: add an amt test for UDP_SEGMENT through the relay

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider.

Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 4

If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough).

- [Medium] If a capture fails, its checks pass anyway.
- [Low] The commit message says the test checks that "the relay's egress device and the gateway report no drops or checksum errors".
- [Low] wait_tunnel() (amt_gso.sh:126-142) counts the tunnel as up only when a relayed, non-GSO probe reaches the listener.
- [Low] The READY handshakes are not enforced.
- [Low] do_send() computes total = c->cnt * c->seg + c->tail (amt_gso.c:138) in unsigned int and only checks total > MAX_DGRAM…

--

selftests: net: add an amt test for UDP_SEGMENT through the relay

This adds amt_gso.sh and its C helper amt_gso. The test sends a UDP_SEGMENT burst from the relay namespace through an amt relay and gateway to a listener, with tx offload on the amtr device off and on.

It checks delivery on the listener and uses AF_PACKET captures to check frame sizes, both those handed to amt_dev_xmit() and those put on the wire. CONFIG_PACKET is added to the net selftests config.

Quoted 6 lines
tools/testing/selftests/net/amt_gso.c new file +0 -0
new file mode 100644
index 0000000000000..eebf3ecb94979
@@ -0,0 +1,457 @@

[ ... ]

tools/testing/selftests/net/amt_gso.c line 142

Quoted 13 lines
tools/testing/selftests/net/amt_gso.c new file +13 -0
+static int do_send(const struct cfg *c)
+{
+	static uint8_t buf[MAX_DGRAM];
+	struct sockaddr_storage dst, src;
+	socklen_t dlen, slen;
+	unsigned int total, ifindex, i;
+	int fd, ttl = 8, zero = 0;
+
+	total = c->cnt * c->seg + c->tail;
+	if (total > MAX_DGRAM ||
+	    (c->tail && c->tail < sizeof(struct chunk_hdr)) ||
+	    c->seg < sizeof(struct chunk_hdr))
+		error(2, 0, "bad sizes");

[Severity: Low]
Can this multiplication wrap before the total > MAX_DGRAM check runs? cnt, seg, tail and num all come from atoi() with no range checks. For example, -s 65536 -c 65536 gives a total equal to tail, and -s 1200 -c 3579140 gives 704.

fill_dgram() ignores total and writes cnt chunks of seg bytes into the static buffer:

	for (i = 0; i < n; i++) {
		unsigned int len = chunk_len(c, i);
		...
		buf += len;
	}

Would that overflow buf[MAX_DGRAM] in do_send()? Also, chunk_hdr.len is a uint16_t, so any seg above 65535 is silently truncated.

do_recv() has the same pattern:

	unsigned int per = chunks_per_dgram(c), expected = c->num * per;
	...
	seen = calloc(expected ? expected : 1, 1);
	...
	if (seen[h.seq * per + h.idx]++) {

If c->num * per wraps, can seen[] end up too small? The index is only bounded by h.seq < c->num and h.idx < per, not by the allocation size.

amt_gso.sh only passes small fixed values, so this only applies when the helper is run by hand with large arguments.

[ ... ]

Quoted 6 lines
tools/testing/selftests/net/amt_gso.sh new file +0 -0
new file mode 100755
index 0000000000000..3c37cb59d9b02
@@ -0,0 +1,269 @@

[ ... ]

tools/testing/selftests/net/amt_gso.sh line 136

Quoted 13 lines
tools/testing/selftests/net/amt_gso.sh new file +13 -0
+# Send one single-datagram probe every second until the listener sees it,
+# which means that discovery, request and update are done for this group.
+wait_tunnel()
+{
+	local fam=$1 v6="" grp=$GRP4 src=$SRC4 port=4999 i
+
+	[ "$fam" = 6 ] && { v6=-6; grp=$GRP6; src=$SRC6; port=6999; }
+
+	for i in $(seq 40); do
+		ip netns exec "$LISTENER" $AMT_GSO recv $v6 -p $port \
+			"${PROBE_OPTS[@]}" -T 1 >"$TMPD/probe.out" &
+		local pid=$!
+		busywait 5000 grep -q READY "$TMPD/probe.out"

[Severity: Low]
Can this grep match a stale READY? probe.out is never removed, either between iterations or between the IPv4 and IPv6 calls. The truncating open for the redirection happens in the background child after fork.

If the parent's grep runs before the new child has truncated the file and bound its socket, the probe goes to nobody. recv then waits out its 1 second idle timeout, exits 1, and the iteration is wasted.

The busywait return value is also ignored here and in run_burst():

	for f in recv amtr gw; do
		busywait 5000 grep -q READY "$TMPD/$f.out"
	done

If one of the helpers is not ready within 5 seconds, the burst is sent anyway. Could that cause a spurious listener failure? Could a sniffer also get SIGTERM before its handler is installed and exit without a report?

Quoted 6 lines
tools/testing/selftests/net/amt_gso.sh new file +6 -0
+		ip netns exec "$RELAY" $AMT_GSO send $v6 -I amtr -g $grp \
+			-b $src -p $port "${PROBE_OPTS[@]}"
+		wait $pid && return 0
+	done
+	return 1
+}

[ ... ]

tools/testing/selftests/net/amt_gso.sh line 189

Quoted 6 lines
tools/testing/selftests/net/amt_gso.sh new file +6 -0
+	wait $pid_r
+	RECV_RC=$?
+	# The receiver is done, so every frame the captures will see is already
+	# queued on their sockets. Ask them to drain it and report.
+	kill -TERM $pid_a $pid_g
+	wait $pid_a $pid_g

[Severity: Medium]
What happens here if one of the sniffers has already died? The exit status is discarded. With two PIDs, wait only returns the status of the last one anyway.

do_sniff() exits through error(2, ...) when recvfrom() fails or poll() fails with something other than EINTR. It also dies with no output if SIGTERM arrives before this line runs:

	signal(SIGTERM, sniff_sig);

In that case field() turns the missing key into 0:

	echo "${val:-0}"

so big and lost both read as 0 for the amtr capture.

In the control and plain datagram cases, would check_err $((big != 0)) and the lost check then pass with no capture behind them? In the tx-on UDP_SEGMENT cases, the result becomes a skip ("no GSO skb reached amt_dev_xmit()") rather than an error.

A failed gw capture is still caught indirectly by gwn != EXPECT. A failed amtr capture does not seem to be caught at all.

Quoted 9 lines
tools/testing/selftests/net/amt_gso.sh new file +9 -0
+
+	DROPS=$(($(dev_stat "$RELAY" relay_gw tx_dropped) - DROP0))
+	TXP=$(($(dev_stat "$RELAY" relay_gw tx_packets) - TXP0))
+	CSUMERR=$(($(csum_errors) - CSUM0))
+	GRX=$(($(dev_stat "$GATEWAY" amtg rx_packets) - GRX0))
+	LRX=$(($(dev_stat "$LISTENER" l_gw rx_packets) - LRX0))
+	GRXD=$(($(dev_stat "$GATEWAY" amtg rx_dropped) - GRXD0))
+	EXPECT=$((NUM * (cnt + (tail ? 1 : 0))))
+}

[ ... ]

tools/testing/selftests/net/amt_gso.sh line 230

Quoted 10 lines
tools/testing/selftests/net/amt_gso.sh new file +10 -0
+	stats="relay_gw tx +$TXP drop +$DROPS; gw csum_err +$CSUMERR"
+	stats="$stats; amtg rx +$GRX drop +$GRXD; listener rx +$LRX"
+	log_info "$name: $stats"
+
+	check_err $(($(field "$TMPD/amtr.out" lost) + \
+		     $(field "$TMPD/gw.out" lost) != 0)) \
+		"a packet capture lost frames, the verdict is unreliable"
+	check_err $RECV_RC "listener did not get every datagram intact"
+	check_err $((DROPS != 0)) "relay_gw dropped $DROPS packets"
+	check_err $((CSUMERR != 0)) "gateway counted $CSUMERR csum errors"

[Severity: Low]
The commit message says the test checks:

"that the relay's egress device and the gateway report no drops or checksum errors."

GRXD is sampled in run_burst() but only printed in the log_info line above. No check_err uses it, so a nonzero rx_dropped on amtg never fails a case.

Some of those drops have nothing to do with the tested data. For example, amt_membership_query_handler() in drivers/net/amt.c does this on a failed query delivery:

	amt->dev->stats.rx_dropped++;

so a case can pass with GRXD > 0. TXP, GRX and LRX are also computed but only logged.

Should GRXD be passed to check_err, or should the commit message be reworded to match what is actually checked?

The commit message also only describes the UDP_SEGMENT cases with tx offload off and on. It does not mention the two "plain datagrams, amt tx offload on" cases.

[ ... ]

tools/testing/selftests/net/amt_gso.sh line 260

Quoted 4 lines
tools/testing/selftests/net/amt_gso.sh new file +4 -0
+setup_topology
+
+wait_tunnel 4 || skip_all "IPv4 AMT tunnel did not come up"
+wait_tunnel 6 || skip_all "IPv6 AMT tunnel did not come up"

[Severity: Low]
wait_tunnel() only succeeds when a relayed probe reaches the listener. That probe goes through amt_send_multicast_data(). The preceding commit "amt: mark relay data as a UDP tunnel packet before sending it" makes that function run this on every relayed packet:

	if (udp_tunnel_handle_offloads(skb, true)) {
		kfree_skb(skb);
		return;
	}

If relay data forwarding breaks completely, every probe is lost and the whole test exits with KSFT_SKIP. Should that be reported as a failure instead, given that this is the data path the test is meant to cover?

The existing amt.sh would still report FAIL for its IPv4/IPv6 multicast forwarding cases, so the gap is limited to this test's own verdict.

[ ... ]

Signature · 1 line
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261002212458.34247-1-omar%40blockcast.net
#6 lore raw

Re: [PATCH net-next v2 2/2] selftests: net: add an amt test for UDP_SEGMENT through the relay

Quoted 1 line · Sashiko

What happens here if one of the sniffers has already died?

Agreed, that is a real hole. A sniffer that finishes normally always prints its report and exits 0, so v3 waits for each capture on its own and fails the case if either one exits nonzero. A tx-on UDP_SEGMENT case in which no GSO skb reaches the driver now fails instead of skipping.

Quoted 2 lines

Should GRXD be passed to check_err, or should the commit message be reworded to match what is actually checked?

Fixed: v3 checks amtg rx_dropped, and the changelog mentions the plain datagram cases.

Quoted 1 line

The busywait return value is also ignored here and in run_burst():

Fixed in run_burst(): a helper that never prints READY fails the case. wait_tunnel() still ignores it on purpose, since a missed READY only costs one of the 40 tries, and probe.out is now removed before each try, so a stale READY cannot match.

Quoted 1 line

Can this multiplication wrap before the total > MAX_DGRAM check runs?

Fixed: main() now rejects sizes that would overflow the buffer or the seen[] array, for both send and recv.

Quoted 2 lines

Should that be reported as a failure instead, given that this is the data path the test is meant to cover?

Yes. A tunnel that never comes up is now a FAIL, not a SKIP.

pw-bot: cr