[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b1158b1a-ac31-4703-bac1-dfe3ab7aeb98@nvidia.com>
Date: Tue, 15 Jul 2025 18:31:32 +0300
From: Gal Pressman <gal@...dia.com>
To: Christoph Paasch <cpaasch@...nai.com>
Cc: Saeed Mahameed <saeedm@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
Mark Bloch <mbloch@...dia.com>, Leon Romanovsky <leon@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Amir Vadai <amirv@...lanox.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org
Subject: Re: [PATCH net] net/mlx5: Correctly set gso_size when LRO is used
On 14/07/2025 19:54, Christoph Paasch wrote:
> On Mon, Jul 14, 2025 at 1:24 AM Gal Pressman <gal@...dia.com> wrote:
>>
>> Hi Christoph,
>>
>> On 10/07/2025 21:26, christoph.paasch@...il.com wrote:
>>> From: Christoph Paasch <cpaasch@...nai.com>
>>>
>>> gso_size is expected by the networking stack to be the size of the
>>> payload (thus, not including ethernet/IP/TCP-headers). However, cqe_bcnt
>>> is the full sized frame (including the headers). Dividing cqe_bcnt by
>>> lro_num_seg will then give incorrect results.
>>>
>>> For example, running a bpftrace higher up in the TCP-stack
>>> (tcp_event_data_recv), we commonly have gso_size set to 1450 or 1451 even
>>> though in reality the payload was only 1448 bytes.
>> Other than introspecting the wrong gso_size value, is there a functional
>> breakage that can be observed?
>
> I wouldn't call it "functional breakage", but definitely unintended
> consequences / lower perf :
> - In tcp_measure_rcv_mss() len will be for example 1450, but. rcv_mss
> will be 1448 (because tp->advmss is 1448). Thus, we will always
> recompute scaling_ratio each time an LRO-packet is received.
> - In tcp_gro_receive, it will interfere with the decision whether or
> not to flush and thus potentially result in less gro'ed packets.
Thanks!
Please put that in the commit message.
Powered by blists - more mailing lists