[dpdk-stable] patch 'net/bnx2x: fix call to link handling periodic function' has been queued to LTS release 16.11.9

Luca Boccassi bluca at debian.org
Mon Oct 15 13:51:32 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/17/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Luca Boccassi

---
>From 87a99237fe9f9d2d00ce55c7d45670cda37edc69 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody at cavium.com>
Date: Sat, 29 Sep 2018 05:42:40 +0000
Subject: [PATCH] net/bnx2x: fix call to link handling periodic function

[ upstream commit 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f ]

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")

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

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 794670f1ad..d3733f7a35 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -122,8 +122,11 @@ static __rte_unused void
 bnx2x_interrupt_handler(__rte_unused struct rte_intr_handle *handle, void *param)
 {
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+	struct bnx2x_softc *sc = dev->data->dev_private;
 
+	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(&(dev->pci_dev->intr_handle));
 }
 
-- 
2.19.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-10-15 12:48:34.930601744 +0100
+++ 0012-net-bnx2x-fix-call-to-link-handling-periodic-functio.patch	2018-10-15 12:48:34.561096017 +0100
@@ -1,8 +1,10 @@
-From 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f Mon Sep 17 00:00:00 2001
+From 87a99237fe9f9d2d00ce55c7d45670cda37edc69 Mon Sep 17 00:00:00 2001
 From: Rasesh Mody <rasesh.mody at cavium.com>
 Date: Sat, 29 Sep 2018 05:42:40 +0000
 Subject: [PATCH] net/bnx2x: fix call to link handling periodic function
 
+[ upstream commit 0f6ebeee2402441b20e45ea27f0ff2a4fc2c165f ]
+
 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.
@@ -11,25 +13,26 @@
 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(+)
+ drivers/net/bnx2x/bnx2x_ethdev.c | 3 +++
+ 1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
-index ae2e60a060..0057843b5d 100644
+index 794670f1ad..d3733f7a35 100644
 --- a/drivers/net/bnx2x/bnx2x_ethdev.c
 +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
-@@ -131,7 +131,9 @@ bnx2x_interrupt_handler(void *param)
- 
- 	PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled");
+@@ -122,8 +122,11 @@ static __rte_unused void
+ bnx2x_interrupt_handler(__rte_unused struct rte_intr_handle *handle, void *param)
+ {
+ 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
++	struct bnx2x_softc *sc = dev->data->dev_private;
  
 +	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);
+ 	rte_intr_enable(&(dev->pci_dev->intr_handle));
  }
  
 -- 


More information about the stable mailing list