* [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns
@ 2026-10-26 12:06 Eva Kurchatova
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Eva Kurchatova @ 2026-10-26 12:06 UTC (permalink / raw)
To: khorenko; +Cc: devel
Patchset for task https://virtuozzo.atlassian.net/browse/VSTOR-151678
This patchset replaces the kernel patch that was declined upstream, on
the grounds that the kselftest itself should use a separate netns.
Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Link: https://lore.kernel.org/netdev/CAF=yD-LZSec9g_0bBgrcQvq2OO1BrxMSRHH=uU7eamCmWcTO_A@mail.gmail.com/
Eva Kurchatova (2):
selftests: net: veth: check UDP GRO forwarding on forwarded traffic
Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation"
net/ipv4/udp_offload.c | 2 +-
tools/testing/selftests/net/veth.sh | 26 ++++++++++++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic
2026-10-26 12:06 [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Eva Kurchatova
@ 2026-10-26 12:06 ` Eva Kurchatova
2026-10-26 12:13 ` no-reply
2026-10-27 17:24 ` Konstantin Khorenko
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation" Eva Kurchatova
2026-10-27 17:24 ` [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Konstantin Khorenko
2 siblings, 2 replies; 8+ messages in thread
From: Eva Kurchatova @ 2026-10-26 12:06 UTC (permalink / raw)
To: khorenko; +Cc: devel
The rx-udp-gro-forwarding checks fail with "got 10 packets, expected 1"
on a host where something has a UDP tunnel socket, a vxlan say, and
pass on a host where nothing does. Since commit 36707061d6ba ("udp:
allow forwarding of plain (non-fraglisted) UDP GRO packets") the
feature aggregates only datagrams GRO finds no socket for, and GRO
looks the socket up only once a tunnel socket exists on the host; the
checks send to a socket in the receiving namespace, so they pass only
while nothing looks it up.
This tree made them pass by changing the kernel instead, in commit
8ce3afeec4ca ("udp: let rx-udp-gro-forwarding aggregate under
encapsulation"), which upstream did not take.
Let the destination forward the datagrams to a receiver in a namespace
behind it: no local socket is found there, tunnel or not, and the
checks count what the destination receives as before.
Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Link: https://lore.kernel.org/netdev/CAF=yD-LZSec9g_0bBgrcQvq2OO1BrxMSRHH=uU7eamCmWcTO_A@mail.gmail.com/
https://virtuozzo.atlassian.net/browse/VSTOR-151678
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/net/veth.sh | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
index 6bb7dfaa30b6..42b472e1425f 100755
--- a/tools/testing/selftests/net/veth.sh
+++ b/tools/testing/selftests/net/veth.sh
@@ -9,10 +9,15 @@ readonly DST=1
readonly DST_NAT=100
readonly NS_SRC=$BASE$SRC
readonly NS_DST=$BASE$DST
+# The receiver of the GRO checks, behind the destination
+readonly RCV=3
+readonly NS_RCV=$BASE$RCV
# "baremetal" network used for raw UDP traffic
readonly BM_NET_V4=192.168.1.
readonly BM_NET_V6=2001:db8::
+# Network between the destination and the receiver
+readonly RCV_NET_V4=192.168.2.
readonly CPUS=`nproc`
ret=0
@@ -24,7 +29,7 @@ cleanup() {
[ -n "${jobs}" ] && kill -1 ${jobs} 2>/dev/null
rm -f $STATS
- for ns in $NS_SRC $NS_DST; do
+ for ns in $NS_SRC $NS_DST $NS_RCV; do
ip netns del $ns 2>/dev/null
done
}
@@ -46,6 +51,17 @@ create_ns() {
ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
done
+
+ # Forwarded, the datagrams find no local socket, whatever tunnel the host has
+ ip netns add $NS_RCV
+ ip -n $NS_RCV link set dev lo up
+ ip link add name fwd$DST type veth peer name fwd$RCV
+ ip link set dev fwd$DST netns $NS_DST up
+ ip link set dev fwd$RCV netns $NS_RCV up
+ ip -n $NS_DST addr add dev fwd$DST $RCV_NET_V4$DST/24
+ ip -n $NS_RCV addr add dev fwd$RCV $RCV_NET_V4$RCV/24
+ ip netns exec $NS_DST sysctl -wq net.ipv4.ip_forward=1
+ ip -n $NS_RCV route add default via $RCV_NET_V4$DST
}
__chk_flag() {
@@ -101,15 +117,17 @@ chk_gro() {
local msg="$1"
local expected=$2
- ip netns exec $BASE$SRC ping -qc 1 $BM_NET_V4$DST >/dev/null
+ # Taking veth$SRC down drops the route, so set it for every check
+ ip -n $NS_SRC route replace ${RCV_NET_V4}0/24 via $BM_NET_V4$DST
+ ip netns exec $BASE$SRC ping -qc 1 $RCV_NET_V4$RCV >/dev/null
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 &
+ ip netns exec $NS_RCV ./udpgso_bench_rx -C 1000 -R 10 &
local spid=$!
sleep 0.1
- ip netns exec $NS_SRC ./udpgso_bench_tx -4 -s 13000 -S 1300 -M 1 -D $BM_NET_V4$DST
+ ip netns exec $NS_SRC ./udpgso_bench_tx -4 -s 13000 -S 1300 -M 1 -D $RCV_NET_V4$RCV
local retc=$?
wait $spid
local rets=$?
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation"
2026-10-26 12:06 [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Eva Kurchatova
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
@ 2026-10-26 12:06 ` Eva Kurchatova
2026-10-26 12:11 ` no-reply
2026-10-27 17:25 ` Konstantin Khorenko
2026-10-27 17:24 ` [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Konstantin Khorenko
2 siblings, 2 replies; 8+ messages in thread
From: Eva Kurchatova @ 2026-10-26 12:06 UTC (permalink / raw)
To: khorenko; +Cc: devel
This reverts commit 8ce3afeec4cab80d99076986395ac93e891d1df6.
The change made rx-udp-gro-forwarding aggregate for a socket the lookup
found, which the feature never meant: it is for packets no local socket
takes. A found tunnel socket without its own GRO, wireguard or L2TP, had
its packets aggregated and segmented again on delivery, work the host
never did before. The veth.sh checks it was made for expect local
delivery aggregated, which only happens where nothing looks the socket
up; the test was wrong there, not the kernel, and the previous patch
fixes the test. Withdrawn upstream on the same grounds.
Link: https://lore.kernel.org/netdev/179180161935.434549.5518274080541032248@kernel.org/
https://virtuozzo.atlassian.net/browse/VSTOR-151678
Feature: fix ms/udp
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/ipv4/udp_offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 375273572ecb..4245522d4201 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -650,7 +650,7 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
if (skb->dev->features & NETIF_F_GRO_FRAGLIST)
NAPI_GRO_CB(skb)->is_flist = sk ? !udp_test_bit(GRO_ENABLED, sk) : 1;
- if ((skb->dev->features & NETIF_F_GRO_UDP_FWD) ||
+ if ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
(sk && udp_test_bit(GRO_ENABLED, sk)) || NAPI_GRO_CB(skb)->is_flist)
return call_gro_receive(udp_gro_receive_segment, head, skb);
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation"
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation" Eva Kurchatova
@ 2026-10-26 12:11 ` no-reply
2026-10-27 17:25 ` Konstantin Khorenko
1 sibling, 0 replies; 8+ messages in thread
From: no-reply @ 2026-10-26 12:11 UTC (permalink / raw)
To: khorenko, Eva Kurchatova; +Cc: devel
> This reverts commit 8ce3afeec4cab80d99076986395ac93e891d1df6.
>
> The change made rx-udp-gro-forwarding aggregate for a socket the lookup
> found, which the feature never meant: it is for packets no local socket
> takes. A found tunnel socket without its own GRO, wireguard or L2TP, had
> its packets aggregated and segmented again on delivery, work the host
> never did before. The veth.sh checks it was made for expect local
> delivery aggregated, which only happens where nothing looks the socket
> up; the test was wrong there, not the kernel, and the previous patch
> fixes the test. Withdrawn upstream on the same grounds.
>
> Link: https://lore.kernel.org/netdev/179180161935.434549.5518274080541032248@kernel.org/
> https://virtuozzo.atlassian.net/browse/VSTOR-151678
> Feature: fix ms/udp
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261026120854.600354-1-eva.kurchatova@virtuozzo.com?part=2
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
@ 2026-10-26 12:13 ` no-reply
2026-10-27 17:24 ` Konstantin Khorenko
1 sibling, 0 replies; 8+ messages in thread
From: no-reply @ 2026-10-26 12:13 UTC (permalink / raw)
To: Eva Kurchatova, khorenko; +Cc: devel
> The rx-udp-gro-forwarding checks fail with "got 10 packets, expected 1"
> on a host where something has a UDP tunnel socket, a vxlan say, and
> pass on a host where nothing does. Since commit 36707061d6ba ("udp:
> allow forwarding of plain (non-fraglisted) UDP GRO packets") the
> feature aggregates only datagrams GRO finds no socket for, and GRO
> looks the socket up only once a tunnel socket exists on the host; the
> checks send to a socket in the receiving namespace, so they pass only
> while nothing looks it up.
> This tree made them pass by changing the kernel instead, in commit
> 8ce3afeec4ca ("udp: let rx-udp-gro-forwarding aggregate under
> encapsulation"), which upstream did not take.
>
> Let the destination forward the datagrams to a receiver in a namespace
> behind it: no local socket is found there, tunnel or not, and the
> checks count what the destination receives as before.
>
> Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Link: https://lore.kernel.org/netdev/CAF=yD-LZSec9g_0bBgrcQvq2OO1BrxMSRHH=uU7eamCmWcTO_A@mail.gmail.com/
> https://virtuozzo.atlassian.net/browse/VSTOR-151678
> Feature: fix selftests
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261026120854.600354-1-eva.kurchatova@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns
2026-10-26 12:06 [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Eva Kurchatova
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation" Eva Kurchatova
@ 2026-10-27 17:24 ` Konstantin Khorenko
2 siblings, 0 replies; 8+ messages in thread
From: Konstantin Khorenko @ 2026-10-27 17:24 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On 10/26/26 13:06, Eva Kurchatova wrote:
> This patchset replaces the kernel patch that was declined upstream, on
> the grounds that the kselftest itself should use a separate netns.
Thanks. Small fixes in patch 1 only, I'll send v2.
Checked on a test node, vxlan up in a separate netns:
- old veth.sh, kernel without 8ce3afeec4ca: "got 10 packets, expected 1"
- new veth.sh: passes with and without 8ce3afeec4ca, with and without
the vxlan
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
2026-10-26 12:13 ` no-reply
@ 2026-10-27 17:24 ` Konstantin Khorenko
1 sibling, 0 replies; 8+ messages in thread
From: Konstantin Khorenko @ 2026-10-27 17:24 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On 10/26/26 13:06, Eva Kurchatova wrote:
> pass on a host where nothing does. Since commit 36707061d6ba ("udp:
> allow forwarding of plain (non-fraglisted) UDP GRO packets") the
> feature aggregates only datagrams GRO finds no socket for, and GRO
> looks the socket up only once a tunnel socket exists on the host; the
The lookup behind the static key comes from f2e9de210d50 ("udp: gro
behind static key"), not from 36707061d6ba. And not only tunnels turn
it on: setsockopt(UDP_GRO) does too, in any netns.
> while nothing looks it up.
> This tree made them pass by changing the kernel instead, in commit
> 8ce3afeec4ca ("udp: let rx-udp-gro-forwarding aggregate under
Blank line missing before this paragraph. checkpatch also wants
"commit 8ce3afeec4ca" on one line.
> +# The receiver of the GRO checks, behind the destination
> +readonly RCV=3
[...]
> +# Network between the destination and the receiver
> +readonly RCV_NET_V4=192.168.2.
Both comments restate the names, dropped.
> + # Forwarded, the datagrams find no local socket, whatever tunnel the host has
"whatever the host runs": not only tunnels, see above.
> + ip link add name fwd$DST type veth peer name fwd$RCV
> + ip link set dev fwd$DST netns $NS_DST up
> + ip link set dev fwd$RCV netns $NS_RCV up
Better create the pair right in the namespaces, so no fwd1/fwd3 ever
appears in init_net:
ip -n $NS_DST link add name fwd$DST type veth peer name fwd$RCV netns $NS_RCV
ip -n $NS_DST link set dev fwd$DST up
ip -n $NS_RCV link set dev fwd$RCV up
All fixed in v2.
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation"
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation" Eva Kurchatova
2026-10-26 12:11 ` no-reply
@ 2026-10-27 17:25 ` Konstantin Khorenko
1 sibling, 0 replies; 8+ messages in thread
From: Konstantin Khorenko @ 2026-10-27 17:25 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On 10/26/26 13:06, Eva Kurchatova wrote:
> This reverts commit 8ce3afeec4cab80d99076986395ac93e891d1df6.
Reviewed-by: Konstantin Khorenko <khorenko@virtuozzo.com>
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-27 17:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 12:06 [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Eva Kurchatova
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic Eva Kurchatova
2026-10-26 12:13 ` no-reply
2026-10-27 17:24 ` Konstantin Khorenko
2026-10-26 12:06 ` [Devel] [PATCH hci-8.1 2/2] Revert "udp: let rx-udp-gro-forwarding aggregate under encapsulation" Eva Kurchatova
2026-10-26 12:11 ` no-reply
2026-10-27 17:25 ` Konstantin Khorenko
2026-10-27 17:24 ` [Devel] [PATCH hci-8.1 0/2] selftests: net: veth: run under separate netns Konstantin Khorenko
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.