From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v3 1/1] selftests: net: skip the veth GRO checks where they cannot run
Date: Wed, 30 Sep 2026 15:51:44 +0200 [thread overview]
Message-ID: <179077630438.3598112.6223753507691542141.b4-review@b4> (raw)
In-Reply-To: <20260928193506.549055-2-eva.kurchatova@virtuozzo.com>
> The three rx-udp-gro-forwarding checks in veth.sh count 10 packets
> where they expect 1 on a host that has a vxlan or another UDP tunnel,
> in any namespace, and pass on a host that has none.
>
> Any UDP encapsulation socket on the machine moves UDP GRO to the socket
> lookup path, see commit f2e9de210d50 ("udp: gro behind static key"),
> and rx-udp-gro-forwarding is then not consulted at all, see commit
> 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO
> packets"). The switch is global, so the test namespaces do not help,
> and nothing the test can set brings the device flag back.
>
> Skip those three checks when UDP encapsulation is in use: a vxlan,
> geneve or bareudp device, a fou port or an l2tp tunnel in any
> namespace, or a socket on the vxlan or geneve port.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-139651
> Feature: fix selftests
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
>
> diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
> index 6bb7dfaa30b6a..3fcd63f93be72 100755
> --- a/tools/testing/selftests/net/veth.sh
> +++ b/tools/testing/selftests/net/veth.sh
> @@ -97,6 +97,42 @@ chk_channels() {
> fi
> }
>
> +udp_encap_in_use() {
> + local ns cmd t
> +
> + for ns in "" `ip netns list 2>/dev/null | awk '{print $1}'`; do
> + if [ -n "$ns" ]; then
> + cmd="ip netns exec $ns"
> + else
> + cmd=""
> + fi
> +
> + for t in vxlan geneve bareudp; do
> + $cmd ip -o link show type $t 2>/dev/null | \
> + grep -q . && return 0
> + done
> + $cmd ip fou show 2>/dev/null | grep -q . && return 0
> + $cmd ip l2tp show tunnel 2>/dev/null | grep -q . && return 0
> + $cmd ss -uapn 2>/dev/null | \
> + grep -qE ':(4789|6081)([^0-9]|$)' && return 0
> + done
> + return 1
> +}
> +
> +# Only meaningful where nothing else has turned udp_encap_needed_key on
> +chk_gro_fwd() {
> + local msg="$1"
> + local expected=$2
> +
> + if [ $UDP_ENCAP -ne 0 ]; then
Bug: chk_gro_fwd skips the checks on a clean host and runs them on a host with a tunnel.
udp_encap_in_use returns 0 when encapsulation is found, so UDP_ENCAP=$? yields 0 = "in use". The top level gets this
right:
[ $UDP_ENCAP -eq 0 ] && \
echo "UDP encapsulation in use, forwarding tests will be skipped"
but the helper has it backwards:
if [ $UDP_ENCAP -ne 0 ]; then
...
echo " skip - UDP encapsulation in use"
-ne 0 is true when there is no encapsulation.
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-09-30 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 19:33 [Devel] [PATCH hci-8.1 v3 0/1] " Eva Kurchatova
2026-09-28 19:33 ` [Devel] [PATCH hci-8.1 v3 1/1] " Eva Kurchatova
2026-09-30 13:51 ` Konstantin Khorenko [this message]
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=179077630438.3598112.6223753507691542141.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@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.