Re: [PATCH net-next 2/5] net/mlx5e: Report hw_gro_packets and hw_gro_bytes netdev stats
From: Gal Pressman
Date: Thu Feb 05 2026 - 02:43:55 EST
On 05/02/2026 7:23, Jakub Kicinski wrote:
> 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.
You're absolutely right, thanks Jakub!
>
> I really wish the AI was clever enough to catch uAPI mis-reading :(