From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Jakub Kicinski <kuba@kernel.org>,
donald.hunter@gmail.com, sdf@fomichev.me, razor@blackwall.org,
daniel@iogearbox.net
Subject: [PATCH net-next] netlink: specs: netdev: clarify Tx queue stats
Date: Fri, 13 Nov 2026 09:38:02 -0800 [thread overview]
Message-ID: <20261113173802.272995-1-kuba@kernel.org> (raw)
AI has been complaining during mpnic review that we don't count
the offload stats on completion. This is expected. We don't want
to force drivers to fully re-interpret the skb on completion just
to get slightly more accurate values of informational offload
counters. It's fine to update those as we produce the send queue
descriptors.
This was always the intent: the tx-packets / tx-bytes docs
explicitly call out that the packets must have been successfully
sent, while the offload counters say nothing to this effect.
The checksum counter doc does use past tense which is probably
what threw reviewers off. Rephrase it.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: donald.hunter@gmail.com
CC: sdf@fomichev.me
CC: razor@blackwall.org
CC: daniel@iogearbox.net
---
Documentation/netlink/specs/netdev.yaml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
index 4303593e5003..0de7f93f0c4c 100644
--- a/Documentation/netlink/specs/netdev.yaml
+++ b/Documentation/netlink/specs/netdev.yaml
@@ -378,6 +378,11 @@ doc: >-
up to the total number of events, will only be reported for currently
active objects, and will likely report the number of events since last
reconfiguration.
+ Basic Tx counters (`tx-packets` and `tx-bytes`) count only packets which
+ successfully reached the device, while offload-related counters
+ (e.g. `tx-needs-csum`, `tx-hw-gso-packets`) may be incremented at
+ submission time, and so may include packets which never reached
+ the device (e.g. dropped due to a queue flush or reconfiguration).
attributes:
-
name: ifindex
@@ -510,9 +515,8 @@ doc: >-
-
name: tx-needs-csum
doc: |
- Number of packets that required the device to calculate the checksum.
- This counter includes the number of GSO wire packets for which device
- calculated the L4 checksum.
+ Number of packets which requested the device to fill in the checksum.
+ For GSO packets, this counter counts wire packets.
type: uint
-
name: tx-hw-gso-packets
--
2.56.0
reply other threads:[~2026-11-13 17:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261113173802.272995-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.org \
--cc=sdf@fomichev.me \
/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