On Thu, Feb 5, 2026 at 2:07 PM Jakub Kicinski <[email protected]> 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 <[email protected]> > --- > @@ -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);
smime.p7s
Description: S/MIME Cryptographic Signature
