]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
igbvf: add tx_timeout_count to ethtool statistics
authorKohei Enju <enjuk@amazon.com>
Thu, 12 Jun 2025 16:16:26 +0000 (01:16 +0900)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 3 Jul 2025 16:39:04 +0000 (09:39 -0700)
Add `tx_timeout_count` to ethtool statistics to provide visibility into
transmit timeout events, bringing igbvf in line with other Intel
ethernet drivers.

Currently `tx_timeout_count` is incremented in igbvf_watchdog_task() and
igbvf_tx_timeout() but is not exposed to userspace nor used elsewhere in
the driver.

Before:
  # ethtool -S ens5 | grep tx
       tx_packets: 43
       tx_bytes: 4408
       tx_restart_queue: 0

After:
  # ethtool -S ens5 | grep tx
       tx_packets: 41
       tx_bytes: 4241
       tx_restart_queue: 0
       tx_timeout_count: 0

Tested-by: Kohei Enju <enjuk@amazon.com>
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igbvf/ethtool.c

index 83b97989a6bdc74f8cd46edd930c44ff3abac77b..773895c663fdf80a07a4863b8210fff26b9d122a 100644 (file)
@@ -33,6 +33,7 @@ static const struct igbvf_stats igbvf_gstrings_stats[] = {
        { "lbrx_bytes", IGBVF_STAT(stats.gorlbc, stats.base_gorlbc) },
        { "lbrx_packets", IGBVF_STAT(stats.gprlbc, stats.base_gprlbc) },
        { "tx_restart_queue", IGBVF_STAT(restart_queue, zero_base) },
+       { "tx_timeout_count", IGBVF_STAT(tx_timeout_count, zero_base) },
        { "rx_long_byte_count", IGBVF_STAT(stats.gorc, stats.base_gorc) },
        { "rx_csum_offload_good", IGBVF_STAT(hw_csum_good, zero_base) },
        { "rx_csum_offload_errors", IGBVF_STAT(hw_csum_err, zero_base) },