From: Eric Joyner <eric.joyner@amd.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, brett.creeley@amd.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com
Subject: Re: [PATCH net-next v3 2/5] ionic: Get "link_down_count" ext link stat from firmware
Date: Tue, 9 Jun 2026 15:18:06 -0700 [thread overview]
Message-ID: <49231399-e8ca-4f68-99ab-729444567c7c@amd.com> (raw)
In-Reply-To: <20260609142640.261b7d87@kernel.org>
On 6/9/2026 2:26 PM, Jakub Kicinski wrote:
>> Is this a big enough issue to deal with? Is link really going to go down
>> sixty-five thousand times while the driver is loaded? I guess we could have a
>> running tally, but that seems like more effort than this is worth.
>
> Seems unlikely indeed, but drivers routinely deal with such wrapping.
> It's like 5 lines of code, no?
>
> u16 val = le16_to_cpu(...
>
> if ((u16)stats->link_down_events > val)
> stats->link_down_events += BIT(16);
> stats->link_down_events &= 0xffff0000;
> stats->link_down_events |= val;
>
>
> This is also not great, operationally. Monitoring systems may expect
> counters to start from 0 after boot (IIUC you're saying that unless
> the card goes thru a full reset we'll keep the value from previous
> boot).
>
Yep, that is what I've observed. I now wonder if the previous solution of having
the driver calculate this statistic may have been an attempt to bypass these
concerns.
Maybe I should go back to the original version, and have the firmware stat just
be an extra entry in "ethtool -S" for additional info?
- Eric
next prev parent reply other threads:[~2026-06-09 22:18 UTC|newest]
Thread overview: 19+ 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-06-09 18:00 ` Eric Joyner
2026-06-09 21:26 ` Jakub Kicinski
2026-06-09 22:18 ` Eric Joyner [this message]
2026-06-09 22:26 ` Eric Joyner
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
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=49231399-e8ca-4f68-99ab-729444567c7c@amd.com \
--to=eric.joyner@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox