Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Joyner <eric.joyner@amd.com>
Cc: <netdev@vger.kernel.org>, Brett Creeley <brett.creeley@amd.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	"Nikhil P . Rao" <nikhil.rao@amd.com>,
	Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net-next v5 5/5] ionic: Add .get_fec_stats ethtool handler
Date: Mon, 15 Jun 2026 18:27:32 -0700	[thread overview]
Message-ID: <20260615182732.7d28e31a@kernel.org> (raw)
In-Reply-To: <20260614205303.48088-6-eric.joyner@amd.com>

On Sun, 14 Jun 2026 13:53:03 -0700 Eric Joyner wrote:
> +		if (fec_cw_err_bin != IONIC_STAT_INVALID)
> +			hist->values[i].sum = le64_to_cpu(fec_cw_err_bin);
> +		else
> +			hist->values[i].sum = 0;

Setting the sum to zero is very much against the API contract with
ethtool, no? Since we are just digging ourselves out of a whole with
the link down events maybe let's be more strict going forward. :S

I think mlx5 had a similar problem of not knowing bucket count.
You can put the bucket table in some driver struct and populate it 
at runtime.

Looking at this scheme, tho, I think the ethtool core is buggy for
mlx5 :/ We should make a copy of the hist table, because we write 
the Netlink attrs after releasing the locks. Another call may start
already and make the driver write its table in parallel.

Please send a fix for that if you can, or LMK if not, I'll chase
one of the people involved in adding the fec stats.

I'll apply the first 4 patches here in the meantime.

  reply	other threads:[~2026-06-16  1:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14 20:52 [PATCH net-next v5 0/5] ionic: Expose more port stats to ethtool Eric Joyner
2026-06-14 20:52 ` [PATCH net-next v5 1/5] ionic: Fix check in ionic_get_link_ext_stats Eric Joyner
2026-06-14 20:53 ` [PATCH net-next v5 2/5] ionic: Update ionic_if.h with new extra port stats Eric Joyner
2026-06-14 20:53 ` [PATCH net-next v5 3/5] ionic: Report "rx_bits_phy" stat to ethtool Eric Joyner
2026-06-14 20:53 ` [PATCH net-next v5 4/5] ionic: Get "link_down_count" ext link stat from firmware Eric Joyner
2026-06-14 20:53 ` [PATCH net-next v5 5/5] ionic: Add .get_fec_stats ethtool handler Eric Joyner
2026-06-16  1:27   ` Jakub Kicinski [this message]
2026-06-16  1:30 ` [PATCH net-next v5 0/5] ionic: Expose more port stats to ethtool patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260615182732.7d28e31a@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.joyner@amd.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikhil.rao@amd.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox