netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] docs: networking: clarify expectation of persistent stats
@ 2025-08-25 13:47 Naveen Mamindlapalli
  2025-08-27  0:44 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Naveen Mamindlapalli @ 2025-08-25 13:47 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, horms, corbet, andrew
  Cc: netdev, linux-doc, linux-kernel, Naveen Mamindlapalli

This update clarifies the requirement for preserving statistics across
interface up/down cycles, noting that some drivers may not support this
due to inherent limitations. It also outlines the potential effects on
monitoring and observability tools.

Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
---
 Documentation/networking/statistics.rst | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/statistics.rst b/Documentation/networking/statistics.rst
index 518284e287b0..857b08d633f7 100644
--- a/Documentation/networking/statistics.rst
+++ b/Documentation/networking/statistics.rst
@@ -222,8 +222,18 @@ Retrieving ethtool statistics is a multi-syscall process, drivers are advised
 to keep the number of statistics constant to avoid race conditions with
 user space trying to read them.
 
-Statistics must persist across routine operations like bringing the interface
-down and up.
+Statistics are expected to persist across routine operations like bringing the
+interface down and up. This includes both standard interface statistics and
+driver-defined statistics reported via `ethtool -S`.
+
+However, this behavior is not always strictly followed, and some drivers do
+reset these counters to zero when the device is closed and reopened. This can
+lead to misinterpretation of network behavior by monitoring tools, such as
+SNMP, that expect monotonically increasing counters.
+
+Driver authors are expected to preserve statistics across interface down/up
+cycles to ensure consistent reporting and better integration with monitoring
+tools that consume these statistics.
 
 Kernel-internal data structures
 -------------------------------
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-05 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 13:47 [PATCH net-next] docs: networking: clarify expectation of persistent stats Naveen Mamindlapalli
2025-08-27  0:44 ` Jakub Kicinski
2025-09-05 11:04   ` Naveen Mamindlapalli
2025-09-05 23:07     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).