Article View: linux.kernel.netdev
Article #3444Re: [PATCH] udp: let rx-udp-gro-forwarding aggregate under encapsulation
From: Willem de Bruijn
Date: Thu, 15 Oct 2026 02:56
Date: Thu, 15 Oct 2026 02:56
56 lines
10522 bytes
10522 bytes
Eva Kurchatova wrote:
> The rx-udp-gro-forwarding checks of the veth kselftest fail with "got
> 10 packets, expected 1" on a host where something uses UDP
> encapsulation, a vxlan say, and pass on a host where nothing does.
Uses encapsulation in the same network namespace as where the test
runs? If different namespaces, the socket lookup should fail and
thus the behavior be the same as on a host without a tunnel.
In general, I think the fix here, if any, is to address the flakiness
of the test, not to change the lookup behavior, which is as is
intentionally.
> Since commit f2e9de210d50 ("udp: gro behind static key") the receiving
> socket is looked up only once a tunnel socket exists, and commit
> 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO
> packets") takes "no socket found" for "forwarded" and aggregates only
> then. So the device setting works on a host without a tunnel and stops
> working with one.
These heuristics were chosen for a reason:
to avoid expensive coalescing + resegmenting if packets are likely to
hit a normal (i.e., without UDP_GRO) local UDP socket.
> Aggregate whenever the device asks, socket found or not. That is what
> every host without a tunnel has done all along: a local socket without
without a tunnel, or with a tunnel?
> UDP_GRO gets the packets resegmented on delivery, and a tunnel socket
> keeps its own receive path.
>
> Fixes: 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets")
> 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 cf07c3c6611a..d4e0e6bb9959 100644
> --- a/net/ipv4/udp_offload.c
> +++ b/net/ipv4/udp_offload.c
> @@ -804,7 +804,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 ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
> + if ((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
>
Technical Details
Message-ID:
<willemdebruijn.kernel.2f0d78527930f@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346530-linux-kernel-netdev=dewy.ruReferences:
<20261008163817.2983484-1-eva.kurchatova@virtuozzo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346530-linux-kernel-netdev=dewy.ru
From: willemdebruijn.kernel@gmail.com (Willem de Bruijn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] udp: let rx-udp-gro-forwarding aggregate under
encapsulation
Date: Wed, 14 Oct 2026 22:56:50 -0400
Organization: Usenet Network
Message-ID: <willemdebruijn.kernel.2f0d78527930f@gmail.com>
References: <20261008163817.2983484-1-eva.kurchatova@virtuozzo.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="2437904"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rNVnKVhZWWW0k13qDO62l0GNM0g= sha256:Rj5iNjGCvw8tnEw4NLDg0cvdOD9ilEhlxB3vFVwdTwA=
sha1:i2bU9EY5bEgy6kbtjiCwvHnn7h4= sha256:pgJ0gSqlPxMPYUiE6J+Uu2U+xhvU+jKzxcVsEe0tYO4=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id EE3BA11023B; Thu, 15 Oct 2026 05:57:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.847
X-Spam-Status: No, score=-0.847 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
FSL_HELO_FAKE=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 6hBVQSebBeqh;
Thu, 15 Oct 2026 05:57:05 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-346530-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 59A2F1101E6; Thu, 15 Oct 2026 05:56:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sto.lore.kernel.org (Postfix) with ESMTP id 44485607AFB; Thu, 15 Oct 2026 02:56:55 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B0B63D953B;
Thu, 15 Oct 2026 02:56:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="h8KLspHI"
X-Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28A363B14C2
for <netdev@vger.kernel.org>; Thu, 15 Oct 2026 02:56:52 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.179
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1792033014; cv=none; b=dJcMPIc6eEGOtDvX7k2U92Jber77RnWOSt23t6kSTrOSDloLDrVGADGpEMkw8s9/78ScIvfNJHxMeXqe/ShSeY1wUx0pcNvka837kmGZVixcwvldORA0U+Tf9ipuJDZUtAZwZdSAiowX7U5U6eOLpEACQoe8uOqZ7Sk9OhP2OOk=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1792033014; c=relaxed/simple;
bh=Ik3XO3cvIHw8bldp6m6yNBXukW/O+5KtzSL7EbNcoyY=;
h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:
MIME-Version:Content-Type; b=NNFuudHyQq5i9MN8EUPWu9jx25ogfUmz9FK+D0+B0MN4uPIlaojciBZeEd9TK0z8vwsnxVvItnIowBM7nHzqe/wgwiwnDzgTfnRyULNjFHAktLYWTtfImBDerZAawP4QaW9fePfHrZaWQT9hjwkyatFscExxqA9W7UFhT55RKPQ=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=h8KLspHI; arc=none smtp.client-ip=209.85.221.179
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-5e948e56b8eso912711e0c.2
for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 19:56:52 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792033012; x=1792637812; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:mime-version:subject
:references:in-reply-to:message-id:cc:to:from:date:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=TNTxQfUgCJOsnMTQyE07oReChsZlTt8qxDE8Jve+7bo=;
b=h8KLspHItMLT1Ts0hdrDVycYy9gSI1JtuQyniz71hkHseexIH9uLoyvLEK+tJlPeSy
jazmb2XFviCJCPme+In4kTDP5AJEtLxNU2PRwcAdXJOA7ofSUeX3+hF5R3N5gRU82+k4
g1GVgi0HWsvOwHCYUkgOVrOn0SjKTCZaXmH3YRbaz1qkZTpMU1d3z4RsyUfYF4D8alTt
fon97SYhVVkdw3GjgLxZPsTp2I8BtIxePE6BsQed76aXeZL7S14wWz2MrAmDceBQgPhS
G1oneyMRPB0QDvzcufeCjnbLtqW8hKzjenp8uZ3BN779KN2QGWnZxcZLgZaxMt1VvciD
428g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792033012; x=1792637812;
h=content-transfer-encoding:content-type:mime-version:subject
:references:in-reply-to:message-id:cc:to:from:date:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=TNTxQfUgCJOsnMTQyE07oReChsZlTt8qxDE8Jve+7bo=;
b=oi2HT4I4ErVLPYZ3UveMoNy0ZGkXkCrZxO0A8UuZCjcuEzoqVvVZnuFFMb5d7Yxlsk
ZJE6WiwmFvox0P6a1yqKq5cWCYOAJunM3eov9K8gi9aITTZQ3ge6Z1Md2KHcu2VCQmer
kdwf3/xt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FNa3WfNL0Uul
X-Received: by 2002:a05:6102:5487:b0:7a8:46fb:eb3e with SMTP id ada2fe7eead31-7cb373e517amr5965316137.36.1792033011887;
Wed, 14 Oct 2026 19:56:51 -0700 (PDT)
X-Received: from gmail.com (111.46.245.35.bc.googleusercontent.com. [35.245.46.111])
by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5e91cab4a97sm12938054e0c.6.2026.10.14.19.56.51
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 14 Oct 2026 19:56:51 -0700 (PDT)
X-Cc: linux-kernel@vger.kernel.org,
Eva Kurchatova <eva.kurchatova@virtuozzo.com>,
netdev@vger.kernel.org
X-In-Reply-To: <20261008163817.2983484-1-eva.kurchatova@virtuozzo.com>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>