[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJNF76m675MVz0f1eOjkGwGohj7jPBds6X061wz3dkO4w@mail.gmail.com>
Date: Thu, 20 Jun 2024 10:11:17 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Michael Chan <michael.chan@...adcom.com>, davem@...emloft.net, netdev@...r.kernel.org,
pabeni@...hat.com, pavan.chebbi@...adcom.com, andrew.gospodarek@...adcom.com,
Ajit Khaparde <ajit.khaparde@...adcom.com>, Somnath Kotur <somnath.kotur@...adcom.com>
Subject: Re: [PATCH net 2/3] bnxt_en: Set TSO max segs on devices with limits
On Thu, Jun 20, 2024 at 2:13 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Tue, 18 Jun 2024 14:53:12 -0700 Michael Chan wrote:
> > Firmware will now advertise a non-zero TSO max segments if the
> > device has a limit. 0 means no limit. The latest 5760X chip
> > (early revs) has a limit of 2047 that cannot be exceeded. If
> > exceeded, the chip will send out just a small number of segments.
>
> If we're only going to see 0 or 2047 pulling in the FW interface update
> and depending on newer FW version isn't a great way to fix this, IMHO.
>
> TCP has min MSS of 500+ bytes, so 2k segments gives us 1MB LSO at min
> legitimate segment size, right? So this is really just a protection
> against bugs in the TCP stack, letting MSS slide below 100.
>
TCP default MSS is 536 (if no MSS attribute is present in SYN or
SYNACK packets)
But the minimal payload size per segment is 8
#define TCP_MIN_SND_MSS 48
#define TCP_MIN_GSO_SIZE (TCP_MIN_SND_MSS - MAX_TCP_OPTION_SPACE)
> For a fix I'd just hardcode this to 2047 or even just 1k, and pull in
> the new FW interface to make it configurable in net-next.
> --
> pw-bot: cr
Powered by blists - more mailing lists