[dpdk-stable] [PATCH v2 4/5] net/bnx2x: fix call to link handling periodic function

Mody, Rasesh Rasesh.Mody at cavium.com
Sat Sep 29 07:42:40 CEST 2018


If link handling periodic function is allowed to be called in interrupt
context, the periodic function can get called too frequently and exhaust
the retry credits to check link status.

This change makes sure link handling periodic function is not called in
interrupt context.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable at dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody at cavium.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index ae2e60a..0057843 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -131,7 +131,9 @@ struct rte_bnx2x_xstats_name_off {
 
 	PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled");
 
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP);
 	bnx2x_interrupt_action(dev);
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
 	rte_intr_enable(&sc->pci_dev->intr_handle);
 }
 
-- 
1.7.10.3



More information about the stable mailing list