ethtool: update tsinfo statistics attribute docs with correct type
Subsystems (4)
PATCH 1/1 ethtool: update tsinfo statistics attribute docs with correct type
nla_put_uint can either write a u32 or u64 netlink attribute value. The size depends on whether the value can be represented with a u32 or requires a u64. Use a uint annotation in various documentation to represent this.
---
Notes:
Reasoning:
I discovered this inaccuracy while working on ethtool patches for implementing support for the statistics. Used the rst initially to base the types and then realized we went with uint when I noticed incorrect netlink message parsing due to using the incorrect size per attribute.
Documentation/networking/ethtool-netlink.rst | 6 +++--- include/uapi/linux/ethtool_netlink.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
Documentation/networking/ethtool-netlink.rst +3 -3
@@ -1254,9 +1254,9 @@ would be empty (no bit set). Additional hardware timestamping statistics response contents: ===================================== ====== =================================== - ``ETHTOOL_A_TS_STAT_TX_PKTS`` u64 Packets with Tx HW timestamps - ``ETHTOOL_A_TS_STAT_TX_LOST`` u64 Tx HW timestamp not arrived count - ``ETHTOOL_A_TS_STAT_TX_ERR`` u64 HW error request Tx timestamp count + ``ETHTOOL_A_TS_STAT_TX_PKTS`` uint Packets with Tx HW timestamps + ``ETHTOOL_A_TS_STAT_TX_LOST`` uint Tx HW timestamp not arrived count + ``ETHTOOL_A_TS_STAT_TX_ERR`` uint HW error request Tx timestamp count ===================================== ====== =================================== CABLE_TEST
include/uapi/linux/ethtool_netlink.h +3 -3
@@ -488,9 +488,9 @@ enum {enum {ETHTOOL_A_TS_STAT_UNSPEC , -ETHTOOL_A_TS_STAT_TX_PKTS ,/* u64 */ -ETHTOOL_A_TS_STAT_TX_LOST ,/* u64 */ -ETHTOOL_A_TS_STAT_TX_ERR ,/* u64 */ +ETHTOOL_A_TS_STAT_TX_PKTS ,/* uint */ +ETHTOOL_A_TS_STAT_TX_LOST ,/* uint */ +ETHTOOL_A_TS_STAT_TX_ERR ,/* uint */ /* add new constants above here */ __ETHTOOL_A_TS_STAT_CNT,
Signature · 1 line
2.42.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 9 Apr 2024 16:25:16 -0700 you wrote:
nla_put_uintcan either write a u32 or u64 netlink attribute value. The size depends on whether the value can be represented with a u32 or requires a u64. Use a uint annotation in various documentation to represent this.Signed-off-by Rahul Rameshbabu <[email protected]>---
[...]
Here is the summary with links:
- [net-next,v1] ethtool: update tsinfo statistics attribute docs with correct type
https://git.kernel.org/netdev/net-next/c/65f35aa76c0e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html