Re: [PATCH net] bnx2x: fix header length calculation for encapsulated TSO
From: Simon Horman
Date: Thu Oct 15 2026 - 07:28:46 EST
On Fri, Oct 09, 2026 at 08:30:18PM +0300, George Melikov via B4 Relay wrote:
> From: George Melikov <mail@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> Assisted-by: LLM
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>