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>
Subject: Re: [PATCH net-next v3 5/5] ionic: Add .get_fec_stats ethtool handler
Date: Mon, 18 May 2026 17:22:54 -0700 [thread overview]
Message-ID: <20260518172254.4163f226@kernel.org> (raw)
In-Reply-To: <70a655a0-4e43-4b8a-8e7c-f4436e2a8f1f@amd.com>
On Mon, 18 May 2026 17:06:25 -0700 Eric Joyner wrote:
> Sorry, what I wrote should've said "there's no proper/good way to do this by
> only making changes in software".
>
> You're right that the firmware knows; to that end I'm almost done changing the
> firmware to act similarly to how this interface distinguishes valid statistics,
> and have the firmware report "-1" for these new extra stats if the hardware
> doesn't actually collect the stat.
Plumbing Linux hacks into FW is definitely not my favorite :S
The way we use -1 in the kernel is a local hack which is never
meant to escape the kernel.
If you want to do something similar with your FW - please make sure you
add your local defines, and code which _explicitly_ interprets -1
coming out of FW to the driver is "not set". IOW don't user ETHTOOL
defines or assign the FW-reported value directly to the uAPI stat.
Otherwise, if we change the hack kernel uses to distinguish "unset"
values and ionic would break.
prev parent reply other threads:[~2026-05-19 0:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 22:44 [PATCH net-next v3 0/5] Expose more port stats to ethtool Eric Joyner
2026-05-12 22:44 ` [PATCH net-next v3 1/5] ionic: Small improvements in devcmd retry logic Eric Joyner
2026-05-15 1:26 ` Jakub Kicinski
2026-05-19 0:01 ` Eric Joyner
2026-05-19 0:23 ` Jakub Kicinski
2026-05-12 22:44 ` [PATCH net-next v3 2/5] ionic: Get "link_down_count" ext link stat from firmware Eric Joyner
2026-05-15 1:27 ` Jakub Kicinski
2026-05-12 22:44 ` [PATCH net-next v3 3/5] ionic: Update ionic_if.h with new extra port stats structure Eric Joyner
2026-05-12 22:44 ` [PATCH net-next v3 4/5] ionic: Report rx_bits_phy stat to ethtool Eric Joyner
2026-05-12 22:44 ` [PATCH net-next v3 5/5] ionic: Add .get_fec_stats ethtool handler Eric Joyner
2026-05-15 1:32 ` Jakub Kicinski
2026-05-15 19:59 ` Eric Joyner
2026-05-15 23:02 ` Jakub Kicinski
2026-05-19 0:06 ` Eric Joyner
2026-05-19 0:22 ` Jakub Kicinski [this message]
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=20260518172254.4163f226@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=netdev@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.