From: Joe Damato <joe@dama.to>
To: michael.chan@broadcom.com
Cc: Narcisa Vasile <narcisav.kernel@gmail.com>,
netdev-bot+sashiko@kernel.org, kuba@kernel.org,
pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] eth: bnxt: report TX HW GSO queue stats
Date: Mon, 30 Nov 2026 13:03:11 -0800 [thread overview]
Message-ID: <aw3kj/qRbgjuNIRA@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20261120154835.0f56c410@kernel.org>
On Fri, Nov 20, 2026 at 03:48:35PM -0800, Jakub Kicinski wrote:
> On Thu, 19 Nov 2026 20:48:03 -0800 Narcisa Vasile wrote:
> > > [Severity: Medium]
> > > Can this over-count wire packets for GSO skbs that were sent through the
> > > TX push path?
> > >
> > > This block runs before the is_push early-out. It treats every completed
> > > skb with skb_is_gso() && !is_sw_gso as segmented by the hardware.
> > > However, the push path gate in bnxt_start_xmit() does not exclude GSO
> > > skbs:
> > >
> > > if (free_size == bp->tx_ring_size && length <= bp->tx_push_thresh &&
> > > skb_frags_readable(skb) && !lflags) {
> > >
> > > The push BDs never set TX_BD_FLAGS_LSO or tx_bd_mss, so the NIC sends
> > > the skb as a single frame.
> > >
> > > Take an idle ring with tx_push_thresh at 164 and a GSO skb of 164 bytes
> > > or less. Two examples are TCP with a peer-advertised MSS of 48 and 96
> > > bytes of payload, or UDP_SEGMENT with gso_size=8 and 80 bytes of
> > > payload. Either skb would be counted as 1 hw_gso_packet plus gso_segs
> > > hw_gso_wire_packets, even though only one frame went on the wire.
> > >
> > > tso.py reads these counters, so could this give misleading results
> > > there? Fixing the push path issue described below would also fix this.
> >
> > This couldn't give misleading results there, since no GSO skb in tso.py
> > can be 164 bytes or less, so none can take the push path.
>
> Fair, but UDP segmentation may sneak in there. I will check with Joe.
> Either way, I agree that this is orthogonal.
OK, so with the small mss USO tests that were just applied [1] I ran the test
on both a thor1 with SW USO and a thor2 with HW USO and the test passed in
both cases.
It seems like the FW on both devices do not advertise TX push.
@Michael, do any devices with recent FW support the push path? If so, I think
HW USO might need a patch to avoid the issue mentioned above, maybe something
like:
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -606,7 +606,7 @@ static netdev_tx_t bnxt_start_xmit(struc
lflags |= cpu_to_le32(TX_BD_FLAGS_NO_CRC);
if (free_size == bp->tx_ring_size && length <= bp->tx_push_thresh &&
- skb_frags_readable(skb) && !lflags) {
+ !skb_is_gso(skb) && skb_frags_readable(skb) && !lflags) {
It looks to me that the SW USO path is unaffected, so this could only affect
HW USO (I think).
Are there any devices which support HW USO and also TX push? If not, then no
reason to submit a patch for this.
[1]: https://lore.kernel.org/netdev/20261125013838.3823834-1-joe@dama.to/
next prev parent reply other threads:[~2026-11-30 21:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 20:43 Narcisa Vasile
2026-11-18 8:44 ` netdev-bot+sashiko
2026-11-20 4:48 ` Narcisa Vasile
2026-11-20 23:48 ` Jakub Kicinski
2026-11-24 20:34 ` Joe Damato
2026-11-24 21:48 ` Narcisa Vasile
2026-11-30 21:03 ` Joe Damato [this message]
2026-11-30 21:28 ` Michael Chan
2026-11-21 0:00 ` 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=aw3kj/qRbgjuNIRA@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=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=narcisav.kernel@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@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
all inboxes | Powered by JetHome®