[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADg4-L9EWE2ch5j5KqJk+hwC5X6yPxAERbjiPuLN+ApADHD6qg@mail.gmail.com>
Date: Mon, 14 Jul 2025 09:54:47 -0700
From: Christoph Paasch <cpaasch@...nai.com>
To: Gal Pressman <gal@...dia.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 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.
Christoph
Powered by blists - more mailing lists