Skip to content

Commit 18feb87

Browse files
Govindarajulu Varadarajandavem330
authored andcommitted
enic: add wq clean up budget
In case of tx clean up, we set '-1' as budget. This means clean up until wq is empty or till (1 << 32) pkts are cleaned. Under heavy load this will run for long time and cause "watchdog: BUG: soft lockup - CPU#25 stuck for 21s!" warning. This patch sets wq clean up budget to 256. Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 66364bd commit 18feb87

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/net/ethernet/cisco/enic/enic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
#define ENIC_CQ_MAX (ENIC_WQ_MAX + ENIC_RQ_MAX)
4444
#define ENIC_INTR_MAX (ENIC_CQ_MAX + 2)
4545

46+
#define ENIC_WQ_NAPI_BUDGET 256
47+
4648
#define ENIC_AIC_LARGE_PKT_DIFF 3
4749

4850
struct enic_msix_entry {

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ static int enic_poll(struct napi_struct *napi, int budget)
15001500
unsigned int cq_wq = enic_cq_wq(enic, 0);
15011501
unsigned int intr = enic_legacy_io_intr();
15021502
unsigned int rq_work_to_do = budget;
1503-
unsigned int wq_work_to_do = -1; /* no limit */
1503+
unsigned int wq_work_to_do = ENIC_WQ_NAPI_BUDGET;
15041504
unsigned int work_done, rq_work_done = 0, wq_work_done;
15051505
int err;
15061506

@@ -1598,7 +1598,7 @@ static int enic_poll_msix_wq(struct napi_struct *napi, int budget)
15981598
struct vnic_wq *wq = &enic->wq[wq_index];
15991599
unsigned int cq;
16001600
unsigned int intr;
1601-
unsigned int wq_work_to_do = -1; /* clean all desc possible */
1601+
unsigned int wq_work_to_do = ENIC_WQ_NAPI_BUDGET;
16021602
unsigned int wq_work_done;
16031603
unsigned int wq_irq;
16041604

0 commit comments

Comments
 (0)