From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBB093CAE66 for ; Tue, 2 Jun 2026 09:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780393267; cv=none; b=GLwI/mBXD5O5KBbF6U4Jvgnf2dHKhIW1kHE8nmrDoa8n0qvNwbJfiZqAZwDq6RuzPbSu0WcF4ZVoG1pXodsAp7vo69081F8W3cG3UlPlsY759TA2SWFQPWyHf/akcavn7J5oPRygb2xBfq/NH9rkLuQnH55RJn33Yzazd002t2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780393267; c=relaxed/simple; bh=NfyjXcXPVZPF7w6Bcme5G+ASurpWWQTb1BYBNJKEMuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RFFd5HpQT1YzTMhfJ1fA5Pg9mWK9zuXOcpWkCgHsguUoEPNK0iMoNGKT0vrVdud6wRO3XmU9L3Y5QmnqDauVroulIb6DxsOq7UiVVMdMpSCAjAvqCCDuUOJslTnoQc7EPeXeOd+zc5/bBB4eYsRYYdHs1EnJ+XrPyz5lij8qKVc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im; spf=pass smtp.mailfrom=fastmail.im; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b=emoxUgaK; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=AsYFfrlz; arc=none smtp.client-ip=202.12.124.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.im header.i=@fastmail.im header.b="emoxUgaK"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="AsYFfrlz" Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id D8C381D0011E; Tue, 2 Jun 2026 05:41:04 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Tue, 02 Jun 2026 05:41:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.im; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1780393264; x= 1780479664; bh=q45lDLMJsqLmY/ucK1IYEGTdKCA/4/17rWNxl6f9Ca0=; b=e moxUgaKdY7aDvlYEZGkXRW8zqmNMK57fD6rj/RDkmFredaVpKpMwTcgeaGAOq2uR WEgGCrAQTaSlRGaHrM4RoB524Tnud7lMLn8GESNqxBasfKwaKW6pWLljhXUN7LCf u6IyoUqT/+D9wHhT5v/tew5xfsRyq5vw4ht2YJ31r7IbhWutqSrucqt8uNPCOOyM kjfxGtvYTa7kfRr39rFkQUX2gAj8feopkPX2TPqn5ZjFXuNchP4TwDERkFCiit0K fHbe/oTW8FMQIEwqXUVb37zz+lHw3kWgRvM6NZ7nV/6le0dy5CD9DyJVEIIpO5ns hmTEquWKLpppHPPvBQFnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1780393264; x=1780479664; bh=q 45lDLM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pR03KpbsawgvUDZdtUMS6CrzVeLZbnsvk7/vYg X-ME-Proxy: Feedback-ID: i559e4809:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Jun 2026 05:41:03 -0400 (EDT) From: Alice Mikityanska To: Daniel Borkmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xin Long , Willem de Bruijn , Willem de Bruijn , David Ahern , Nikolay Aleksandrov Cc: Shuah Khan , Stanislav Fomichev , Andrew Lunn , Simon Horman , Florian Westphal , netdev@vger.kernel.org, Alice Mikityanska Subject: [PATCH net-next v6 08/11] udp: Set length in UDP header to 0 for big GSO packets Date: Tue, 2 Jun 2026 11:39:28 +0200 Message-ID: <20260602093931.516281-9-alice.kernel@fastmail.im> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260602093931.516281-1-alice.kernel@fastmail.im> References: <20260602093931.516281-1-alice.kernel@fastmail.im> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Alice Mikityanska skb->len may be bigger than 65535 in UDP-based tunnels that have BIG TCP enabled. If GSO aggregates packets that large, set the length in the UDP header to 0, so that tcpdump can print such packets properly (treating them as RFC 2675 jumbograms). Later in the pipeline, __udp_gso_segment will set uh->len to the size of individual packets. Signed-off-by: Alice Mikityanska Reviewed-by: Willem de Bruijn --- net/ipv4/udp_tunnel_core.c | 2 +- net/ipv6/ip6_udp_tunnel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c index 0fccb38f074d..a128fe85620d 100644 --- a/net/ipv4/udp_tunnel_core.c +++ b/net/ipv4/udp_tunnel_core.c @@ -178,7 +178,7 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb uh->dest = dst_port; uh->source = src_port; - udp_set_len_short(uh, skb->len); + udp_set_len(uh, skb->len); memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c index dcff7fb16ff6..32525a051a6f 100644 --- a/net/ipv6/ip6_udp_tunnel.c +++ b/net/ipv6/ip6_udp_tunnel.c @@ -93,7 +93,7 @@ void udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, uh->dest = dst_port; uh->source = src_port; - udp_set_len_short(uh, skb->len); + udp_set_len(uh, skb->len); skb_dst_set(skb, dst); -- 2.54.0