igb: add statistic indicating number of skipped Tx timestamps
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 May 2017 17:28:59 +0000 (10:28 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 6 Jun 2017 08:02:05 +0000 (01:02 -0700)
The igb driver can only handle one Tx timestamp request at a time.
This means it is possible for an application timestamp request to be
ignored.

There is no easy way for an administrator to determine if this occurred.
Add a new statistic which tracks this, tx_hwtstamp_skipped.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c

index bf9bf9056d0c8f320872507f18e3dc92bfa3e875..be35edcf6b083f815d18ad611a079b47ea6ec0c4 100644 (file)
@@ -563,6 +563,7 @@ struct igb_adapter {
        struct cyclecounter cc;
        struct timecounter tc;
        u32 tx_hwtstamp_timeouts;
+       u32 tx_hwtstamp_skipped;
        u32 rx_hwtstamp_cleared;
        bool pps_sys_wrap_on;
 
index 0efb62db6efdd0fa2bfa7d531343790a3156f2be..8730f7cbce68218ef74a83f5c1c635dd4086d86b 100644 (file)
@@ -90,6 +90,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
        IGB_STAT("os2bmc_tx_by_host", stats.o2bspc),
        IGB_STAT("os2bmc_rx_by_host", stats.b2ogprc),
        IGB_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
+       IGB_STAT("tx_hwtstamp_skipped", tx_hwtstamp_skipped),
        IGB_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
 };
 
index fefa46120cbcecc0006ad58feda85783fbdaf703..06b81a609fa0430a05fc61666f7c4161cd21cfd2 100644 (file)
@@ -5388,6 +5388,8 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
                        adapter->ptp_tx_start = jiffies;
                        if (adapter->hw.mac.type == e1000_82576)
                                schedule_work(&adapter->ptp_tx_work);
+               } else {
+                       adapter->tx_hwtstamp_skipped++;
                }
        }