e1000e: add statistic indicating number of skipped Tx timestamps
The e1000e 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>
This commit is contained in:
parent
74344e32fc
commit
cff5714145
|
@ -268,6 +268,7 @@ struct e1000_adapter {
|
|||
u32 tx_fifo_size;
|
||||
u32 tx_dma_failed;
|
||||
u32 tx_hwtstamp_timeouts;
|
||||
u32 tx_hwtstamp_skipped;
|
||||
|
||||
/* Rx */
|
||||
bool (*clean_rx)(struct e1000_ring *ring, int *work_done,
|
||||
|
|
|
@ -105,6 +105,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
|
|||
E1000_STAT("uncorr_ecc_errors", uncorr_errors),
|
||||
E1000_STAT("corr_ecc_errors", corr_errors),
|
||||
E1000_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
|
||||
E1000_STAT("tx_hwtstamp_skipped", tx_hwtstamp_skipped),
|
||||
};
|
||||
|
||||
#define E1000_GLOBAL_STATS_LEN ARRAY_SIZE(e1000_gstrings_stats)
|
||||
|
|
|
@ -5867,13 +5867,16 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
|||
nr_frags);
|
||||
if (count) {
|
||||
if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
|
||||
(adapter->flags & FLAG_HAS_HW_TIMESTAMP) &&
|
||||
!adapter->tx_hwtstamp_skb) {
|
||||
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
|
||||
tx_flags |= E1000_TX_FLAGS_HWTSTAMP;
|
||||
adapter->tx_hwtstamp_skb = skb_get(skb);
|
||||
adapter->tx_hwtstamp_start = jiffies;
|
||||
schedule_work(&adapter->tx_hwtstamp_work);
|
||||
(adapter->flags & FLAG_HAS_HW_TIMESTAMP)) {
|
||||
if (!adapter->tx_hwtstamp_skb) {
|
||||
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
|
||||
tx_flags |= E1000_TX_FLAGS_HWTSTAMP;
|
||||
adapter->tx_hwtstamp_skb = skb_get(skb);
|
||||
adapter->tx_hwtstamp_start = jiffies;
|
||||
schedule_work(&adapter->tx_hwtstamp_work);
|
||||
} else {
|
||||
adapter->tx_hwtstamp_skipped++;
|
||||
}
|
||||
}
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
|
|
Loading…
Reference in New Issue