Skip to content

Commit 3d7a8aa

Browse files
Sunil Gouthamdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Aleksey Makarov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 74840b8 commit 3d7a8aa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/net/ethernet/cavium/thunder/nic.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@
125125
*/
126126
#define NICPF_CLK_PER_INT_TICK 2
127127

128+
/* Time to wait before we decide that a SQ is stuck.
129+
*
130+
* Since both pkt rx and tx notifications are done with same CQ,
131+
* when packets are being received at very high rate (eg: L2 forwarding)
132+
* then freeing transmitted skbs will be delayed and watchdog
133+
* will kick in, resetting interface. Hence keeping this value high.
134+
*/
135+
#define NICVF_TX_TIMEOUT (50 * HZ)
136+
128137
struct nicvf_cq_poll {
129138
u8 cq_idx; /* Completion queue index */
130139
struct napi_struct napi;

drivers/net/ethernet/cavium/thunder/nicvf_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,7 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
12931293
netdev->hw_features = netdev->features;
12941294

12951295
netdev->netdev_ops = &nicvf_netdev_ops;
1296+
netdev->watchdog_timeo = NICVF_TX_TIMEOUT;
12961297

12971298
INIT_WORK(&nic->reset_task, nicvf_reset_task);
12981299

0 commit comments

Comments
 (0)