]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: add statistic indicating number of skipped Tx timestamps
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 May 2017 17:28:58 +0000 (10:28 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
The i40e 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>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit 2955faca0403a4f6029d589f60ff44be09f24859)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c

index dfcbc40423276d22d9d97d3c0a922101808bc0b1..69a22d8c615710bff56f33028aeebe734b2150d8 100644 (file)
@@ -511,6 +511,7 @@ struct i40e_pf {
        struct mutex tmreg_lock; /* Used to protect the SYSTIME registers. */
        u64 ptp_base_adj;
        u32 tx_hwtstamp_timeouts;
+       u32 tx_hwtstamp_skipped;
        u32 rx_hwtstamp_cleared;
        u32 latch_event_flags;
        spinlock_t ptp_rx_lock; /* Used to protect Rx timestamp registers. */
index 2a07a05df639cb30f8343af3a5d35f594637167f..6d20c0079d37daf7bd359052c704625482a33656 100644 (file)
@@ -147,6 +147,7 @@ static const struct i40e_stats i40e_gstrings_stats[] = {
        I40E_PF_STAT("VF_admin_queue_requests", vf_aq_requests),
        I40E_PF_STAT("arq_overflows", arq_overflows),
        I40E_PF_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
+       I40E_PF_STAT("tx_hwtstamp_skipped", tx_hwtstamp_skipped),
        I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
        I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
        I40E_PF_STAT("fdir_atr_tunnel_match", stats.fd_atr_tunnel_match),
index edf0d613e754a036763218362e8aac8cbb2dbc4f..cc895fc149921e39c6c08153e97c8b1cae125f65 100644 (file)
@@ -2568,6 +2568,7 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
                skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
                pf->ptp_tx_skb = skb_get(skb);
        } else {
+               pf->tx_hwtstamp_skipped++;
                return 0;
        }