lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANXQDtYy2JziaaVi=Cqt+gAJNt4NjFFs8NbhrS=RBV61ORwinA@mail.gmail.com>
Date: Fri, 28 Nov 2025 23:59:34 +0530
From: Bhargava Chenna Marreddy <bhargava.marreddy@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com, 
	andrew+netdev@...n.ch, horms@...nel.org, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, michael.chan@...adcom.com, 
	pavan.chebbi@...adcom.com, vsrama-krishna.nemani@...adcom.com, 
	vikas.gupta@...adcom.com, 
	Rajashekar Hudumula <rajashekar.hudumula@...adcom.com>
Subject: Re: [v3, net-next 10/12] bng_en: Add initial support for ethtool
 stats display

On Fri, Nov 28, 2025 at 8:43 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Thu, 27 Nov 2025 01:19:29 +0530 Bhargava Marreddy wrote:
> > +static const char * const bnge_ring_rx_stats_str[] = {
> > +     "rx_ucast_packets",
> > +     "rx_mcast_packets",
> > +     "rx_bcast_packets",
> > +     "rx_discards",
> > +     "rx_errors",
> > +     "rx_ucast_bytes",
> > +     "rx_mcast_bytes",
> > +     "rx_bcast_bytes",
> > +};
> > +
> > +static const char * const bnge_ring_tx_stats_str[] = {
> > +     "tx_ucast_packets",
> > +     "tx_mcast_packets",
> > +     "tx_bcast_packets",
> > +     "tx_errors",
> > +     "tx_discards",
> > +     "tx_ucast_bytes",
> > +     "tx_mcast_bytes",
> > +     "tx_bcast_bytes",
> > +};
> > +
> > +static const char * const bnge_ring_tpa_stats_str[] = {
> > +     "tpa_packets",
> > +     "tpa_bytes",
> > +     "tpa_events",
> > +     "tpa_aborts",
> > +};
> > +
> > +static const char * const bnge_ring_tpa2_stats_str[] = {
> > +     "rx_tpa_eligible_pkt",
> > +     "rx_tpa_eligible_bytes",
> > +     "rx_tpa_pkt",
> > +     "rx_tpa_bytes",
> > +     "rx_tpa_errors",
> > +     "rx_tpa_events",
> > +};
> > +
> > +static const char * const bnge_rx_sw_stats_str[] = {
> > +     "rx_l4_csum_errors",
> > +     "rx_resets",
> > +     "rx_buf_errors",
> > +};
>
> We do not allow duplicating standard stats in ethtool -S any more.

There are several hw counters ring-level, function-level, port-level
etc. which we
currently expose via ethtool exactly as is.
For the standard stats (via .ndo_get_stats64), we usually add
individual ring-level
and port-level counters.

Same stat string we see on both ethtool and standard will be populated
with different counters.

For Ex:
In the case of ethtool, rx_errors = ctx_hw_stats->rx_error_pkts;
    # ethtool  -S eno12399np0 | grep rx_errors
         [0]: rx_errors: 0
         [1]: rx_errors: 0

In the case of standard, rx_errors = (rx_false_carrier_frames + rx_jbr_frames);
    # cat /sys/devices/pci0000:21/0000:21:01.0/0000:22:00.1/net/eno12409np1/statistics/rx_errors
    0

Do you think ethtool and standard stats should have different
stat‑strings rather than matching?

Thanks,
Bhargava Marreddy

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ