[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLinY4qNTf-pPQZ4R3efm8F4EnAiZsOqPknLcc32qTaiHUw@mail.gmail.com>
Date: Thu, 5 Feb 2026 14:44:53 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org, shuah@...nel.org,
willemb@...gle.com, petrm@...dia.com, donald.hunter@...il.com,
pavan.chebbi@...adcom.com, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 1/9] eth: bnxt: gather and report HW-GRO stats
On Thu, Feb 5, 2026 at 2:07 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Count and report HW-GRO stats as seen by the kernel.
> The device stats for GRO seem to not reflect the reality,
> perhaps they count sessions which did not actually result
> in any aggregation.
Yes, the HW count includes single packets without additional
aggregations. In the driver, when we see only 1 segment, we treat it
as a non GRO packet. That's likely the discrepancy you're seeing.
Also, for completeness, should we count LRO packets as well?
> Also they count wire packets, so we
> have to count super-frames, anyway.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> @@ -1804,7 +1804,8 @@ static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp,
> struct bnxt_tpa_info *tpa_info,
> struct rx_tpa_end_cmp *tpa_end,
> struct rx_tpa_end_cmp_ext *tpa_end1,
> - struct sk_buff *skb)
> + struct sk_buff *skb,
> + struct bnxt_rx_sw_stats *rx_stats)
> {
> #ifdef CONFIG_INET
> int payload_off;
> @@ -1814,6 +1815,11 @@ static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp,
> if (segs == 1)
> return skb;
>
> + if (bp->dev->features & NETIF_F_GRO_HW) {
If we enter this function, NETIF_F_GRO_HW should always be true.
> + rx_stats->rx_hw_gro_packets++;
> + rx_stats->rx_hw_gro_wire_packets += segs;
> + }
> +
> NAPI_GRO_CB(skb)->count = segs;
> skb_shinfo(skb)->gso_size =
> le32_to_cpu(tpa_end1->rx_tpa_end_cmp_seg_len);
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)
Powered by blists - more mailing lists