linux/net/ethtool
Vadim Fedorenko 89e281ebff ethtool: init tsinfo stats if requested
Statistic values should be set to ETHTOOL_STAT_NOT_SET even if the
device doesn't support statistics. Otherwise zeros will be returned as
if they are proper values:

host# ethtool -I -T lo
Time stamping parameters for lo:
Capabilities:
	software-transmit
	software-receive
	software-system-clock
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none
Statistics:
  tx_pkts: 0
  tx_lost: 0
  tx_err: 0

Fixes: 0e9c127729 ("ethtool: add interface to read Tx hardware timestamping statistics")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Link: https://lore.kernel.org/r/20240530040814.1014446-1-vadfed@meta.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-01 15:11:09 -07:00
..
bitset.c Revert "ethtool: Fix mod state of verbose no_mask bitset" 2023-10-19 09:27:12 -07:00
bitset.h ethtool: add ethnl_parse_bitset() helper 2020-03-12 15:32:32 -07:00
cabletest.c Revert "Introduce PHY listing and link_topology tracking" 2024-01-04 16:05:47 -08:00
channels.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
coalesce.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
common.c ethtool: remove ethtool_eee_use_linkmodes 2024-03-06 20:40:20 -08:00
common.h ethtool: remove ethtool_eee_use_linkmodes 2024-03-06 20:40:20 -08:00
debug.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
eee.c net: ethtool: eee: Remove legacy _u32 from keee 2024-02-28 12:18:05 +00:00
eeprom.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
features.c ethtool: netlink: Add missing ethnl_ops_begin/complete 2024-01-18 13:21:06 +01:00
fec.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
ioctl.c ethtool: ignore unused/unreliable fields in set_eee op 2024-03-05 19:07:13 -08:00
linkinfo.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
linkmodes.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
linkstate.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
Makefile Revert "Introduce PHY listing and link_topology tracking" 2024-01-04 16:05:47 -08:00
mm.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
module.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
netlink.c net: revert partially applied PHY topology series 2024-05-13 18:35:02 -07:00
netlink.h net: revert partially applied PHY topology series 2024-05-13 18:35:02 -07:00
pause.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
phc_vclocks.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
plca.c Revert "Introduce PHY listing and link_topology tracking" 2024-01-04 16:05:47 -08:00
privflags.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
pse-pd.c net: ethtool: pse-pd: Expand pse commands with the PSE PoE interface 2024-04-18 18:27:02 -07:00
rings.c ethtool: add SET for TCP_DATA_SPLIT ringparam 2023-12-13 18:22:02 -08:00
rss.c net: ethtool: add support for symmetric-xor RSS hash 2023-12-13 22:07:16 -08:00
stats.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00
strset.c Revert "Introduce PHY listing and link_topology tracking" 2024-01-04 16:05:47 -08:00
tsinfo.c ethtool: init tsinfo stats if requested 2024-06-01 15:11:09 -07:00
tunnels.c genetlink: use attrs from struct genl_info 2023-08-15 15:00:45 -07:00
wol.c ethtool: netlink: always pass genl_info to .prepare_data 2023-08-15 15:01:03 -07:00