netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	davem@davemloft.net, netdev@vger.kernel.org,  pabeni@redhat.com,
	pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com,
	 Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [PATCH net 2/3] bnxt_en: Set TSO max segs on devices with limits
Date: Thu, 20 Jun 2024 10:11:17 +0200	[thread overview]
Message-ID: <CANn89iJNF76m675MVz0f1eOjkGwGohj7jPBds6X061wz3dkO4w@mail.gmail.com> (raw)
In-Reply-To: <20240619171301.6fefef59@kernel.org>

On Thu, Jun 20, 2024 at 2:13 AM Jakub Kicinski <kuba@kernel.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

  parent reply	other threads:[~2024-06-20  8:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 21:53 [PATCH net 0/3] bnxt_en: Bug fixes for net Michael Chan
2024-06-18 21:53 ` [PATCH net 1/3] bnxt_en: Update firmware interface to 1.10.3.44 Michael Chan
2024-06-19 20:02   ` Simon Horman
2024-06-18 21:53 ` [PATCH net 2/3] bnxt_en: Set TSO max segs on devices with limits Michael Chan
2024-06-20  0:13   ` Jakub Kicinski
2024-06-20  6:50     ` Michael Chan
2024-06-20 13:45       ` Jakub Kicinski
2024-06-20  8:11     ` Eric Dumazet [this message]
2024-06-18 21:53 ` [PATCH net 3/3] bnxt_en: Restore PTP tx_avail count in case of skb_pad() error Michael Chan
2024-06-19 20:02   ` Simon Horman
2024-06-19 20:04     ` Simon Horman
2024-06-20 14:00 ` [PATCH net 0/3] bnxt_en: Bug fixes for net patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANn89iJNF76m675MVz0f1eOjkGwGohj7jPBds6X061wz3dkO4w@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).