Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795027081; b=I/4OTEB1t1f06Thb0OYtAgGIWyKym/PDFl/yNB8R2gWM636gfHzcOSFRUQwhU3gaqb8e /yFikTi3kyBVY5B0VWA22A7JdMdu5KshMapiaZRTPkaKqvnQjVWsHPP/uFlZ8x5boroAf 09ju0IY3WAXv+PnC21JT5YmVP4ac4NREk5BddvOxCIMTrQ5QkXsCTVLDDDZKefZwOaTZ/ jiyZe+gRm5juAnUGNkUPbpTe51hWBUEVIPGAfypy7e9YRtw/ySy5fRPWHEAWkm/+42NL9 8MXCJNlzRODcmDnRPAZKDBxmbN0me1zjp0bxqll/WZ1IDIlSMy7bx/3rgN/DdghzQtw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795027081; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=0RxuNXTEgqybIIKarM+LUVK890k/V9tw6VFEF7Qmc1A=; b=ZVpx58WVS6bnY4twyIu/AGHD+h1jBuKyAhC1hmgfwd6uBj/IakGcZg9n47+ywWcETzHi ovdQ6Z/fokbIt2n+z/4Ncp6x7MLgs6pYZYQZ8YyV9MWIM04ISsCwIY+eefuTIF0rpnpSz NkGlMQBIrMyIzKDT6jz1IA884M7Qh5iGPdmUOML878ebQyjWdDrYFZeZq5FV/jupC8USk JGUy1vlemZVQed/SffKu5wp/y5u41mNipYLBhdgLMhKuNW09j46aZhdsgL3krAC4W6A4d 1FpP/RhzNmHvEV89qZdzhJt+C2dwyaRrp1yk7IFBtaaFwjn2T/e0L90lx6ssFBPCcxg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XkE4pl3s; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ADC7606A31C; Wed, 18 Nov 2026 18:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XkE4pl3s Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8749E1F000C4; Wed, 18 Nov 2026 18:38:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795027080; bh=0RxuNXTEgqybIIKarM+LUVK890k/V9tw6VFEF7Qmc1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XkE4pl3sJU7yvz76h6zAmFNF1FuQOtD1aS4mFyObSR+AkGt0bRZS7OJNfNVo/v87b Qwcf+FL38A43DzzosV8jT+EoiRNRRZnpmjcRe1NQsjrgepxrBEz1G3ch34IeilchCw sH73Ns8zxzTlHjMfgnphQGgJmi0tJVDL8pqTXSUA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, George Melikov , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.18 1663/2151] bnx2x: fix header length calculation for encapsulated TSO Date: Wed, 18 Nov 2026 15:56:38 +0100 Message-ID: <20261118150222.419646335@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150121.603863898@linuxfoundation.org> References: <20261118150121.603863898@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: George Melikov [ Upstream commit 4fc1d5bb448dfab391a96f949d02ad03ad8cda5c ] 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 Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261009-bnx2x-tso-fix-v1-1-1ebea422422d@gmelikov.ru Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 445e80a681fe6..4920b4b37f5a8 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -3666,7 +3666,8 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb, u8 outerip_off, outerip_len = 0; /* from outer IP to transport */ - hlen_w = skb_inner_transport_offset(skb) >> 1; + hlen_w = (skb_inner_transport_offset(skb) - + skb_network_offset(skb)) >> 1; /* transport len */ hlen_w += inner_tcp_hdrlen(skb) >> 1; -- 2.53.0