🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3565

Re: [PATCH net] bnx2x: fix header length calculation for encapsulated TSO

#3565
From: Simon Horman
Date: Thu, 15 Oct 2026 11:22
28 lines
6953 bytes
On Fri, Oct 09, 2026 at 08:30:18PM +0300, George Melikov via B4 Relay wrote:
> From: George Melikov <mail@gmelikov.ru>
> 
> Commit 80bfab79b835 ("net: adopt skb_network_offset() and similar helpers")
> replaced the difference between the inner transport header and the outer
> network header with skb_inner_transport_offset().
> The helper is relative to skb->data, so the new calculation incorrectly
> includes the outer Ethernet header in fw_ip_hdr_to_payload_w.
> 
> On a BCM57810 transmitting TCP over VXLAN with an outer MTU of 1500,
> hardware segmentation emits packets declaring an outer IPv4 total length
> of 1514 while the actual IP packet is only 1500 bytes long. The receiver
> drops these malformed packets, severely degrading TCP connectivity.
> 
> Subtract skb_network_offset() to restore the original calculation of the
> length from the outer network header to the inner TCP payload.
> 
> Reproduced with plain kernel VXLAN and one TCP flow on kernel
> 7.0.0-31-generic: 50 of 200 captured packets had an invalid outer IP length
> with the original driver, versus none with this fix. Disabling TSO/GSO on
> the test VXLAN device also eliminated the error with the original driver.
> 
> Fixes: 80bfab79b835 ("net: adopt skb_network_offset() and similar helpers")
> Signed-off-by: George Melikov <mail@gmelikov.ru>
> Assisted-by: LLM

Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID: <20261015112221.GG83879@horms.kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346705-linux-kernel-netdev=dewy.ru
References: <20261009-bnx2x-tso-fix-v1-1-1ebea422422d@gmelikov.ru>

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-346705-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] bnx2x: fix header length calculation for
 encapsulated TSO
Date: Thu, 15 Oct 2026 12:22:21 +0100
Organization: Usenet Network
Message-ID: <20261015112221.GG83879@horms.kernel.org>
References: <20261009-bnx2x-tso-fix-v1-1-1ebea422422d@gmelikov.ru>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2517600"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:0SZJD332Q7X2EbifziMEe6oe75M= sha256:12KDDm7lcnfM8ETvlVhomdKz9noOaVE+pIPsq/LTYcs=
	sha1:quTqTkwrBGt+xhSPF5GxzQdxXI8= sha256:D//dRGYbyUPkL51DbdfT7qJcmt6Zw4zw726GQOnZ4RM=
Content-Disposition: inline
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 DF5571102E6; Thu, 15 Oct 2026 14:27:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, 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=kernel.org
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 H-Z0KqYsXgve;
	Thu, 15 Oct 2026 14:27:21 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346705-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 49DB81102A3; Thu, 15 Oct 2026 14:27:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id C9F3C24346; Thu, 15 Oct 2026 11:22:37 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id DA6554FDE6D;
	Thu, 15 Oct 2026 11:22:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ce0UlVOr"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 AA98B502D70;
	Thu, 15 Oct 2026 11:22:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792063356; cv=none; b=LRt2VrWXEN9XD/NAibVpRDgUAUMEBbrx0Sft2bkMLcBmPeTTGkrfRRB5SIxDcVur01M2HxhOY2gVJi1Bdoi/c7p2NHtbC3kB601fIhdf4iJ5OFTmO091XGhtebvEQs8QLzznadYqFNxeoapd4HI03RgzPonh9mralWN7jIUNHrI=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792063356; c=relaxed/simple;
	bh=aMxJHIWlVQlSshgv/y9UUCL7CLcqpL9m3f0H/p2ZYsc=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=V50rbMeuc6wzkKpfrc65jZapVOzgFW8+Vcww8p8NCWpc3nmgUIu8TgeLXRaFGpWThWoV/ak7lEJ1C4pX0tyLtSq28QDqCSQo5jgYjD/tDpxn/3A0vWa/VawjAYEBYLtdOx5lwYiWlN2YSKjj0c09lDha36fD1f1POz1nfyA8W7E=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ce0UlVOr; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE041F000C4;
	Thu, 15 Oct 2026 11:22:23 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792063345;
	bh=0bZqwPG1wq/RthV+cWbRM5Z37j8aa7pr5Ny6doQT6s8=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=Ce0UlVOratY16ZBAbkQpvDIb2sdp+racO2JI7oiOCzsN/+AmqSLEit7LJutDcTmlJ
	 XOJWIB69NqilrTxR5TwojHtZPqk4UQYU+HdffWOoGN4YMIxrQ1k61AqS8uxNjqaWvx
	 0AWGJ/GFo44vQkpkh6ZRTmLIZG+SitDzJ1Bey1tnGFVbJiLkVyNzsjVMRLatBxlRBY
	 VLfLHFG63dCVqhuW3Pn6GVOzDvrSx+rQGCaBvfWjBgY7i25ToxYB5wH5FLp8Y0JmVl
	 Mf7Wg4SlwZwFmDjmSl2c65Z0lOK15Bv7PqKD45TWymoXzsj873oNeYa/iwzabH9gzp
	 /qb9I6VPYhiJg==
X-Cc: Sudarsana Kalluru <skalluru@marvell.com>,
	Manish Chopra <manishc@marvell.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Edward Cree <ecree.xilinx@gmail.com>, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
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>
X-In-Reply-To: <20261009-bnx2x-tso-fix-v1-1-1ebea422422d@gmelikov.ru>