diff options
author | Sudarsana Reddy Kalluru <skalluru@marvell.com> | 2019-05-27 20:21:33 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-29 00:01:30 -0700 |
commit | 9adebac37e7d26c5cd73776a0279574afe3f410b (patch) | |
tree | de67505141d52178f9d6ba8bf50c6aa062a6a321 /drivers/net/ethernet/qlogic/qede/qede_ethtool.c | |
parent | qed: Reduce the severity of ptp debug message. (diff) | |
download | linux-stable-9adebac37e7d26c5cd73776a0279574afe3f410b.tar.xz linux-stable-9adebac37e7d26c5cd73776a0279574afe3f410b.zip |
qede: Handle infinite driver spinning for Tx timestamp.
In PTP Tx implementation, driver kept scheduling a poll thread until the
timestamp is available. In the error scenarios (e.g. app requesting the
timestamp for non-ptp packet), this thread kept waiting for the timestamp
forever. This patch add changes to report such scenario as an error and
terminate the thread. Added a timeout of 2 seconds i.e., max time to wait
for Tx timestamp. Added a stat value ptp_skip_txts for reporting the number
of packets for which Tx timestamping is skipped.
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qede/qede_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 8911a97ab0ca..e85f9fef930c 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -174,6 +174,7 @@ static const struct { QEDE_STAT(coalesced_bytes), QEDE_STAT(link_change_count), + QEDE_STAT(ptp_skip_txts), }; #define QEDE_NUM_STATS ARRAY_SIZE(qede_stats_arr) |