diff options
author | Sudarsana Reddy Kalluru <skalluru@marvell.com> | 2019-05-28 05:21:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-29 09:01:30 +0200 |
commit | 9adebac37e7d26c5cd73776a0279574afe3f410b (patch) | |
tree | de67505141d52178f9d6ba8bf50c6aa062a6a321 /drivers/net/ethernet/qlogic/qede/qede.h | |
parent | qed: Reduce the severity of ptp debug message. (diff) | |
download | linux-9adebac37e7d26c5cd73776a0279574afe3f410b.tar.xz linux-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.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede.h b/drivers/net/ethernet/qlogic/qede/qede.h index 92fe226980fd..b972ab07c18b 100644 --- a/drivers/net/ethernet/qlogic/qede/qede.h +++ b/drivers/net/ethernet/qlogic/qede/qede.h @@ -92,6 +92,7 @@ struct qede_stats_common { u64 non_coalesced_pkts; u64 coalesced_bytes; u64 link_change_count; + u64 ptp_skip_txts; /* port */ u64 rx_64_byte_packets; @@ -189,6 +190,7 @@ struct qede_dev { const struct qed_eth_ops *ops; struct qede_ptp *ptp; + u64 ptp_skip_txts; struct qed_dev_eth_info dev_info; #define QEDE_MAX_RSS_CNT(edev) ((edev)->dev_info.num_queues) |