From: Narcisa Vasile <narcisav.kernel@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: narcisav.kernel@gmail.com, michael.chan@broadcom.com,
pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@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: Thu, 19 Nov 2026 20:48:03 -0800 [thread overview]
Message-ID: <av/RAwaDfiQnPmbF@gmail.com> (raw)
In-Reply-To: <179499144094.3136.198428718668517773@kernel.org>
On Wed, Nov 18, 2026 at 08:44:00AM +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issue(s) to consider.
>
> Critical: 0 · High: 0 (1) · Medium: 1 · Low: 1
>
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > index 6846a27bfef4c..1a7a93bf684ac 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > @@ -869,6 +869,11 @@ static bool __bnxt_tx_int(struct bnxt *bp, struct bnxt_tx_ring_info *txr,
> > cons = NEXT_TX(cons);
> > tx_pkts++;
> > tx_bytes += skb->len;
> > + if (skb_is_gso(skb) && !tx_buf->is_sw_gso) {
> > + txr->tx_hw_gso_packets++;
> > + txr->tx_hw_gso_wire_packets +=
> > + skb_shinfo(skb)->gso_segs;
> > + }
> > tx_buf->skb = NULL;
> > tx_buf->is_ts_pkt = 0;
>
> [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.
> [Severity: High]
> This is a pre-existing issue and was not introduced by this patch, but
> should bnxt_start_xmit() keep GSO skbs out of the push path?
>
This patch doesn't introduce the push path issue (the high severity one).
The medium severity issue is a symptom of this pre-existing high one.
Both need a GSO skb of 164 bytes or less sent on an idle TX ring to manifest.
If the preexisting push path bug is ever hit, the stats added by this patch
would cause hw_gso_wire_packets to be over-reported by gso_segs - 1 for the
skbs which take the push path.
I think this patch can be merged as is.
If it's worth fixing, the push path issue can be addressed independently
with a one line change in bnxt_start_xmit(). With that fix in place, the
stats would also report correctly, with no other change needed.
>
> --
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116204313.23023-1-narcisav.kernel%40gmail.com
prev parent reply other threads:[~2026-11-20 4:48 UTC|newest]
Thread overview: 3+ 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 [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=av/RAwaDfiQnPmbF@gmail.com \
--to=narcisav.kernel@gmail.com \
--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=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®