Thread (8 messages) 8 messages, 3 authors, 2026-02-05

Re: [PATCH net-next 2/5] net/mlx5e: Report hw_gro_packets and hw_gro_bytes netdev stats

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-05 05:23:36
Also in: linux-rdma, lkml

On Wed, 4 Feb 2026 21:33:12 +0200 Tariq Toukan wrote:
+	stats->hw_gro_packets =
+		rq_stats->gro_packets + xskrq_stats->gro_packets;
+	stats->hw_gro_bytes = rq_stats->gro_bytes + xskrq_stats->gro_bytes;
Doesn't look right.. 

mlx5e_shampo_flush_skb(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe, bool match) 
{                                                                               
        struct sk_buff *skb = rq->hw_gro_data->skb;                             
        struct mlx5e_rq_stats *stats = rq->stats;                               
        u16 gro_count = NAPI_GRO_CB(skb)->count;                                
                                                                                
        if (likely(skb_shinfo(skb)->nr_frags))                                  
                mlx5e_shampo_align_fragment(skb, rq->mpwqe.log_stride_sz);      
        if (gro_count > 1) {                                                    
                stats->gro_skbs++;                                              
                stats->gro_packets += gro_count;       

And:
      -
        name: rx-hw-gro-packets
        doc: |
          Number of packets that were coalesced from smaller packets by the
          device. Counts only packets coalesced with the HW-GRO netdevice
          feature, LRO-coalesced packets are not counted.

      -
        name: rx-hw-gro-wire-packets
        doc: |
          Number of packets that were coalesced to bigger packetss with the
          HW-GRO netdevice feature. LRO-coalesced packets are not counted.
        type: uint

Your gro_packets are "gro-wire-packets" and "gro-packets" are your
gro_skbs.

I really wish the AI was clever enough to catch uAPI mis-reading :(
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help