Re: [PATCH net 3/3] net/mlx5e: Account for netdev stats in ndo_get_stats64
From: Gal Pressman <hidden>
Date: 2026-01-28 11:28:25
Also in:
linux-rdma, lkml
From: Gal Pressman <hidden>
Date: 2026-01-28 11:28:25
Also in:
linux-rdma, lkml
On 28/01/2026 5:52, Jakub Kicinski wrote:
On Mon, 26 Jan 2026 09:14:55 +0200 Tariq Toukan wrote:quoted
The driver's ndo_get_stats64 callback is only reporting mlx5 counters, without accounting for the netdev stats, causing errors from the network stack to be invisible in statistics.I cooked up a patch to fix this generically in the core... but I can't actually find any "errors from the network stack" that are accounted to dev->stats. Could you be more specific about the issues you were seeing?
My original motivation was identifying packet drops in the GRE stack, specifically in gre_rcv() after an error in gre_parse_header() (in my case, due to a checksum error). Currently, these packets are silently dropped. I have additional patches that increment the rx_dropped/rx_crc_errors counters in that path, which exposed the issue, but they haven't been submitted yet. However, you are right that it's hard to find existing dev->stats increments, the use case this currently fixes is an error in __bpf_redirect_neigh_v4()/__bpf_redirect_neigh_v6().