All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Damato <joe@dama.to>
To: Narcisa Vasile <narcisav.kernel@gmail.com>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Coco Li <lixiaoyan@google.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v2] eth: bnxt: split TX buffers that don't fit in a single BD
Date: Tue, 1 Dec 2026 11:35:19 -0800	[thread overview]
Message-ID: <aw8hd3g3MPOv72O2@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20261201030158.28732-1-narcisav.kernel@gmail.com>

On Mon, Nov 30, 2026 at 07:01:58PM -0800, Narcisa Vasile wrote:
> The TX BD length field is 16 bits wide. Since BIG TCP raised
> tso_max_size to GSO_MAX_SIZE, skbs can exceed 64KB.
> A single frag can be 64KB or larger, e.g. with MSG_ZEROCOPY from a huge
> page or in the case of a frag filling a whole 64KB page on arm64.
> 
> The driver silently truncates the length of these oversized buffers.
> For example, a 65536 byte frag becomes a zero length BD, so the NIC sends
> malformed LSO packets or stalls the TX queue.
> 
> Split these buffers over multiple BDs, at the largest 4KB multiple that
> fits a BD (0xF000), so that a 64KB frag (e.g. a full page on 64KB-page
> systems) becomes 60KB + 4KB rather than ending with a 1-byte BD.
> 
> Splitting can add up to 8 BDs to a GSO_MAX_SIZE skb. Raise the minimum
> TX ring size (BNXT_MIN_TX_DESC_CNT) and the point at which the TX queue
> is stopped, so that a packet of the largest size always fits. With
> MAX_SKB_FRAGS at 17, the minimum TX ring size grows from 19 to 27 BDs.
> 
> With CONFIG_MAX_SKB_FRAGS raised above the default, an skb can need more
> data BDs than a packet can have, either because splitting added BDs or
> because it has more than TX_MAX_FRAGS frags. Clear the GSO features of
> such skbs in bnxt_features_check() so the stack segments them, instead
> of dropping or linearizing them in bnxt_start_xmit().

nit: is the commit message above stale since the v2 removed the check?
 
> Found by enabling BIG TCP on a Broadcom NIC host.
> Tested on x86_64 with the tso.py selftest and with tcp_mmap sending
> MSG_ZEROCOPY BIG TCP traffic with frags larger than 64KB.
> 
> Fixes: b6488b161ab2 ("bnxt: Use generic HBH removal helper in tx path")

idk how backports work but IIUC the patch relies on behavior introduced by
commit 3cb430e62c83 ("net: bnxt: Use dma_unmap_len for TX completion
unmapping"), so i think if this is backported to trees before that commit it
might introduce a new bug.

so i think (?) it can only be backported to 7.1 but not further back.

maybe the commit message should say that and add a CC line for stable to
let them know it can only be backported as far back as 7.1.

As an example check [1].

[1]: https://lore.kernel.org/netdev/20260518-b4-unix-recv-wait-hotfix-v2-1-83e29ce8ad31@google.com/

All the above said:

Reviewed-by: Joe Damato <joe@dama.to>


      parent reply	other threads:[~2026-12-01 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  3:01 [PATCH net v2] eth: bnxt: split TX buffers that don't fit in a single BD Narcisa Vasile
2026-12-01 19:16 ` Michael Chan
2026-12-01 19:35 ` Joe Damato [this message]

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=aw8hd3g3MPOv72O2@devvm20253.cco0.facebook.com \
    --to=joe@dama.to \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=lixiaoyan@google.com \
    --cc=michael.chan@broadcom.com \
    --cc=narcisav.kernel@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=sdf@fomichev.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.