Re: [PATCH net-next] eth: bnxt: report TX HW GSO queue stats
From: Joe Damato
Date: Tue Nov 24 2026 - 15:34:38 EST
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.
I think this is a bug, yea.
I think HW USO can hit it. A small gso_size with UDP_SEGMENT can fit under the
push threshold and that skbw ould go out unsegmented. I think this would
affect Thor2 devices that have HW USO.
I don't think SW USO is affected, though, since it segments before the push
path.
I'm gonna update uso.py to test a small MSS which should trigger this on a
thor2 nic.
Narcisa were you planning to send a fix for this bug? If not, I can, but I
didn't want to step on your toes if you were about to send something :)