From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH vz10 4/7] selftests: net: make the veth GRO checks independent of host tunnels
Date: Tue, 1 Sep 2026 01:48:22 +0300 [thread overview]
Message-ID: <20260831224850.1642265-4-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20260831224850.1642265-1-eva.kurchatova@virtuozzo.com>
Three aggregation checks report 10 packets where they want 1 on a host
that has a vxlan, and pass on a host that does not. The kernel is doing
what it is written to do.
udp4_gro_receive() looks up the receiving socket only when
udp_encap_needed_key is on, and that key is global: any UDP
encapsulation socket on the machine, in any namespace, turns it on.
udp_gro_receive() then aggregates for a packet that has no socket, or
for a socket that asked for UDP GRO, and consults NETIF_F_GRO_UDP_FWD
only in the first case. So with a vxlan somewhere on the box the lookup
finds the test's own receiver, and rx-udp-gro-forwarding never gets a
say.
Ask for UDP GRO on the receiving socket, which makes the aggregation
happen either way. Where no encapsulation socket exists the lookup
still does not happen and the device flag still decides, so what the
checks cover there does not change.
https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/net/veth.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
index 6bb7dfaa30b6..b95167f0b4c2 100755
--- a/tools/testing/selftests/net/veth.sh
+++ b/tools/testing/selftests/net/veth.sh
@@ -105,7 +105,15 @@ chk_gro() {
NSTAT_HISTORY=$STATS ip netns exec $NS_DST nstat -n
printf "%-60s" "$msg"
- ip netns exec $BASE$DST ./udpgso_bench_rx -C 1000 -R 10 &
+ # -G makes the receiving socket ask for UDP GRO. Without it the
+ # aggregation checks depend on no UDP encapsulation socket existing
+ # anywhere on the machine: udp4_gro_receive() only looks up the
+ # socket when udp_encap_needed_key is on, and that key is global.
+ # With a vxlan on the host the lookup finds this receiver, and
+ # NETIF_F_GRO_UDP_FWD is then not consulted at all, so nothing is
+ # aggregated. On a machine without such a socket the lookup does
+ # not happen and the device flag still decides, as before.
+ ip netns exec $BASE$DST ./udpgso_bench_rx -G -C 1000 -R 10 &
local spid=$!
sleep 0.1
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-08-31 22:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 22:48 [Devel] [PATCH vz10 1/7] ms/vxlan: do not reuse cached ip_hdr() value after skb_tunnel_check_pmtu() Eva Kurchatova
2026-08-31 22:48 ` [Devel] [PATCH vz10 2/7] selftests: net: run the fdb and bind tests in their own netns Eva Kurchatova
2026-08-31 22:48 ` [Devel] [PATCH vz10 3/7] selftests: net: skip what this kernel and iproute2 do not have Eva Kurchatova
2026-08-31 22:48 ` Eva Kurchatova [this message]
2026-08-31 22:48 ` [Devel] [PATCH vz10 5/7] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Eva Kurchatova
2026-08-31 22:48 ` [Devel] [PATCH vz10 6/7] selftests: net: mark test_ingress_egress_chaining.sh executable Eva Kurchatova
2026-08-31 22:48 ` [Devel] [PATCH vz10 7/7] selftests: net: let the bridged PMTU tests take the ICMP they ask for Eva Kurchatova
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=20260831224850.1642265-4-eva.kurchatova@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.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.