From: Andrew Lunn <andrew@lunn.ch>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: "Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Simek, Michal" <michal.simek@amd.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Katakam, Harini" <harini.katakam@amd.com>
Subject: Re: [PATCH net-next v4 2/2] net: xilinx: axienet: Add statistics support
Date: Tue, 20 Aug 2024 22:23:12 +0200 [thread overview]
Message-ID: <98441cee-193d-404c-8dc5-9cf2061ce2e4@lunn.ch> (raw)
In-Reply-To: <b7f66966-f97a-4890-b452-2a8a5e20b953@linux.dev>
> > Is that a standard convention to retain/persist counter values across
> > link up/down?
>
> IEEE 802.3 section 30.2.1 says
>
> | All counters defined in this specification are assumed to be
> | wrap-around counters. Wrap-around counters are those that
> | automatically go from their maximum value (or final value) to zero and
> | continue to operate. These unsigned counters do not provide for any
> | explicit means to return them to their minimum (zero), i.e., reset.
>
> And get_eth_mac_stats implements these counters for Linux. So I would
> say that resetting the counters on link up/down would be non-conformant.
>
> Other drivers also preserve stats across link up/down. For example,
> MACB/GEM doesn't reset it stats either. And keeping the stats is also
> more friendly for users and monitoring tools.
Agreed.
Some driver get this wrong, and clear them. But as a reviewer, it try
to spot this.
Andrew
next prev parent reply other threads:[~2024-08-20 20:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 17:53 [PATCH net-next v4 0/2] " Sean Anderson
2024-08-20 17:53 ` [PATCH net-next v4 1/2] net: xilinx: axienet: Report RxRject as rx_dropped Sean Anderson
2024-08-20 18:33 ` Pandey, Radhey Shyam
2024-08-20 17:53 ` [PATCH net-next v4 2/2] net: xilinx: axienet: Add statistics support Sean Anderson
2024-08-20 19:04 ` Pandey, Radhey Shyam
2024-08-20 20:02 ` Sean Anderson
2024-08-20 20:23 ` Andrew Lunn [this message]
2024-08-22 1:00 ` [PATCH net-next v4 0/2] " 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=98441cee-193d-404c-8dc5-9cf2061ce2e4@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=harini.katakam@amd.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=sean.anderson@linux.dev \
/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
all inboxes | Powered by JetHome®