summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium/thunder/nic.h
diff options
context:
space:
mode:
authorSunil Goutham <sgoutham@cavium.com>2015-07-29 16:49:43 +0300
committerDavid S. Miller <davem@davemloft.net>2015-07-29 23:52:32 -0700
commit3d7a8aaad8720edb301d40d4a9d7fa906c76ba34 (patch)
tree6af5878f42360abf458a630aad9f5bd5db811bcf /drivers/net/ethernet/cavium/thunder/nic.h
parent74840b83bd59ee51c591714470c6629ac18f424a (diff)
downloadlwn-3d7a8aaad8720edb301d40d4a9d7fa906c76ba34.tar.gz
lwn-3d7a8aaad8720edb301d40d4a9d7fa906c76ba34.zip
net: thunderx: Set watchdog timeout value
If a txq (SQ) remains in stopped state after this timeout its considered as stuck and interface is reinited. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/nic.h')
-rw-r--r--drivers/net/ethernet/cavium/thunder/nic.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index a0be076eba83..8aee250904ec 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -125,6 +125,15 @@
*/
#define NICPF_CLK_PER_INT_TICK 2
+/* Time to wait before we decide that a SQ is stuck.
+ *
+ * Since both pkt rx and tx notifications are done with same CQ,
+ * when packets are being received at very high rate (eg: L2 forwarding)
+ * then freeing transmitted skbs will be delayed and watchdog
+ * will kick in, resetting interface. Hence keeping this value high.
+ */
+#define NICVF_TX_TIMEOUT (50 * HZ)
+
struct nicvf_cq_poll {
u8 cq_idx; /* Completion queue index */
struct napi_struct napi;