From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 9604A8045D for ; Mon, 26 Oct 2026 12:10:27 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69QC9A7H010257; Mon, 26 Oct 2026 15:09:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69QC9A7H010257 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="CD6WHkbL" Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69QC8wOP010228 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 26 Oct 2026 15:08:58 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69QC8wOP010228 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4870142f030so1804695f8f.2 for ; Mon, 26 Oct 2026 05:08:58 -0700 (PDT) X-Gm-Message-State: AFq9FYLTEn2/IJ/l10JvAT7rkRVNvTFjMVsFGdPVNvQITpC7veTAfS4C kzfO9i+P8ewBcSZ/GhzuN2xaWFn3KRrlk7W5vymbeshl918Qwr/OcCiwkTBcY3vsukKRveeS2EJ QFfk6cMnvKEL2jU15mxZA8Iv3enQh7U11OlbaSaRHVRzQUZ0mYX5h+g== X-Gm-Gg: AYBFou2gGUL3iLGqv06a0Kg85BthJM87fdzCmJp8Kv65ojsROMW6NUzEKUuJB53hFLZ pkyp9kCSFL314UlHdFxliUinu56XebPzxJbzK3pPnbBzDLFU0zA/Z11ElGE9EdDM1tIgavvKn1g uQlvlWIafqayjkBBz1hAZUG7u1AdeoYyHg6Jy0LBHFPoMuRnxd36MwQmQDy81rs+boOA/2/kjg3 Kd0tMzE5PJmf01wmjrA4tzKgMbONntJKp99uTqfntp7756i8WQpi5rlvj3QschiEVXAVP9sATYr Bg62dSxuLlra/Z5OVmU5TbBo7vNPfzZFIu7h14GAFKRc4SpAYaTBwZxXSkv/ndytdAzyagZtq4Z ogH/vTa5V2kMWLazrn+nyhJTM X-Received: by 2002:a05:6000:481b:b0:48e:82f:48fc with SMTP id ffacd0b85a97d-48e3eb971ccmr13617554f8f.31.1793016537706; Mon, 26 Oct 2026 05:08:57 -0700 (PDT) X-Received: by 2002:a05:6000:481b:b0:48e:82f:48fc with SMTP id ffacd0b85a97d-48e3eb971ccmr13617456f8f.31.1793016536917; Mon, 26 Oct 2026 05:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793016536; cv=none; d=google.com; s=arc-20260327; b=ogVUtzYf84enicwBYmNfsemW/DQ2i1vOplgj1DFcDa6/32vPBfOip+3ahMZoRfFdgc MC4s5by6QgBbU4YnaQwTQvkA7KtKNmSO1CHF3EP5m7BYNzwcEtxnF7g/H8xA+gcuukFi 4zE/XpZyvtYCPvpmvLPvV7Hf1RsiXQl2LrO7m0X8McCHydd1VF7NpD4wKnhJWaLD9Yy3 XN7MT81nXP15O90QRehpG5w/dLmjSs+ZBw+wjWp58FFxvOQPxKsCG+poOyEIDQgtrIh2 Fgg4WJTJ0Ui1MyFwy+95B8xTjMehilsmwk6gPtnOe8M8lB41hkvfq4fJQViATDdR4iky 7inQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IhR4L1AEBgpKruLwUb15UQ+SqbASottdiyJGn6a+nZw=; fh=WpT6aB7RBAGHZeWZzqAr71yzRFbPTYkPWKsRagLn48Q=; b=Fw2M0XTvfFHucX6oEG4fQpsv/CpQUXPJupHJZvGW+KNVnLDIjkc+DomR97+0/jcANn LOHRlDMYgVDWjle2iHwxvrfneNOLw7ECZRT85jxDlavff2YF3rUdR05QW8T6u072VFap eglkk19TEQGJykoBHfSxU3C4hAhs6MNfRrjG+zCTBBndK7xC5fDT0+gvP0dvPM/K6pZf vQf1OPcSa+P8LzGelYwrZO6JJM3h6mPF+K+gYp7k5Agrb7gqABn6JjKCkpy+PEN48D44 4M65yIP++s4+4BKy+KhCmKkLmfCSn10F5YmKB9Wv4YBimiJ5N12QjJmqsqIuYWMe6jEZ UWBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=CD6WHkbL; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e3ed0c717si14355610f8f.327.2026.10.26.05.08.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 05:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=CD6WHkbL; spf=pass (google.com: domain of eva.kurchatova@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=eva.kurchatova@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=IhR4L1AEBgpKruLwUb15UQ+SqbASottdiyJGn6a+nZw=; b=CD6WHkbL1ND2 3Hwu5uAu13MCp1jfkUvZzMoMcf8Y/YV9S4CiLC8SYcSgqgdol0M52XGth346PV4GwlzucaEW40lNc NCRv3jSOHqnHC/Tx25ejWwKuo9FAq+qg4Pi6DWSqfcslZwhLATfR8j3CDX0MM6Ec3dzUnIdGG6XXU 2L3ntD1fkonovISsv6KWXvjl7Ej6aYLWmBOIRgcVhsjKzfxhZerAySoRB0oQ+/y2KZj9QCNBiFXqJ kMIsZl1JcvGsrJOGx+phsayH0MKO/xTHLzT+oQxKE2xvLhaE6WXBe/DyL58zOVlRW0HMNogR99e8k iUr1Qj7wflzIBHlqmzCjBw==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=LekKit-T14) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xLJRp-001qcQ-1d; Mon, 26 Oct 2026 13:08:48 +0100 From: Eva Kurchatova To: khorenko@virtuozzo.com Date: Mon, 26 Oct 2026 14:06:24 +0200 Message-ID: <20261026120854.600354-2-eva.kurchatova@virtuozzo.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026120854.600354-1-eva.kurchatova@virtuozzo.com> References: <20261026120854.600354-1-eva.kurchatova@virtuozzo.com> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 1/2] selftests: net: veth: check UDP GRO forwarding on forwarded traffic X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org 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 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 --- 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