Subject: Re: [PATCH net-next v6 10/10] bng_en: add support for ethtool -S stats display

From: Jakub Kicinski <[email-masked]>
Date: Thu, 12 Mar 2026 19:22:51 -0700

On Tue, 10 Mar 2026 20:10:44 +0530 Bhargava Marreddy wrote:
> Implement the legacy ethtool statistics interface (.get_sset_count,
> .get_strings, and .get_ethtool_stats) to provide per-queue and
> port-level visibility.
> 
> A. Exclusions:
>   To comply with the "no duplication" policy, excluded all stats already
>   covered by rtnl_link_stats64.
>   For ex:
>   1. tx_err
>   2. tx_fifo_underruns
>   3. tx_total_collisions
> 
> B. Retained Stats Analysis:
>   Retained the counters which provide unique per-queue granularity or
>   represent different hardware events:
> 
>   1. rxqN_errors
>   2. txqN_errors
> 
>    These provide per-ring visibility for debugging.
>    While they look similar to ndo_get_stats64's [rx/tx]_errors counters,
>    they map to different hardware sources:
>    For ex:
>    - ethtool rxqN_errors: ctx_hw_stats->rx_error_pkts (per-ring)
>    - ndo_get_stats64 rx_errors: (rx_port_stats->rx_false_carrier_frames +
>      rx_jbr_frames) (per-port)

Still a lot of stuff here that has standard APIs. Here is random 4:
 - oom_discards
 - rx_total_frames
 - link_down_event
 - rx_fec_corrected_blocks
Please explain what the per-ring errors and discards are exactly.