[dpdk-stable] patch 'net/bnxt: fix nested lock during bonding' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:37 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3f2f6be303b95da063fce45a6f6e10c6b0af87d9

Thanks.

Luca Boccassi

---
>From 3f2f6be303b95da063fce45a6f6e10c6b0af87d9 Mon Sep 17 00:00:00 2001
From: Weifeng Li <liweifeng96 at 126.com>
Date: Sat, 3 Jul 2021 06:20:42 -0400
Subject: [PATCH] net/bnxt: fix nested lock during bonding

[ upstream commit 8117f5f61a7399fb160cc48d05daf6e0aac734f8 ]

Bnxt PMD registers LSC callback (bond_ethdev_lsc_event_callback) when
working at bond mode. This callback will dead lock when LSC
interrupt triggered.

lsc interrupt ->
bnxt_handle_async_event ->
bnxt_link_update_op ->
bond_ethdev_lsc_event_callback (lsc_lock) ->
bnxt_link_update_op ->
bond_ethdev_lsc_event_callback (lsc_lock dead lock)

Fixes: c2faa1d1969e ("net/bnxt: add support for LSC interrupt event")

Signed-off-by: Weifeng Li <liweifeng96 at 126.com>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c    | 2 ++
 drivers/net/bnxt/bnxt_ethdev.c | 5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index ee96ae81bf..7bfda01b2c 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -109,6 +109,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
 		/* FALLTHROUGH */
 		bnxt_link_update_op(bp->eth_dev, 0);
+		rte_eth_dev_callback_process(bp->eth_dev,
+			RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
 		PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fce5e3a628..8afe72bd96 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1766,11 +1766,6 @@ out:
 	if (new.link_status != eth_dev->data->dev_link.link_status ||
 	new.link_speed != eth_dev->data->dev_link.link_speed) {
 		rte_eth_linkstatus_set(eth_dev, &new);
-
-		rte_eth_dev_callback_process(eth_dev,
-					     RTE_ETH_EVENT_INTR_LSC,
-					     NULL);
-
 		bnxt_print_link_info(eth_dev);
 	}
 
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:16.636737512 +0100
+++ 0014-net-bnxt-fix-nested-lock-during-bonding.patch	2021-07-26 13:53:15.829292202 +0100
@@ -1 +1 @@
-From 8117f5f61a7399fb160cc48d05daf6e0aac734f8 Mon Sep 17 00:00:00 2001
+From 3f2f6be303b95da063fce45a6f6e10c6b0af87d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8117f5f61a7399fb160cc48d05daf6e0aac734f8 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 2c7fd78c3d..f4c9c72664 100644
+index ee96ae81bf..7bfda01b2c 100644
@@ -31 +32 @@
-@@ -111,6 +111,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
+@@ -109,6 +109,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -41 +42 @@
-index ee69296926..19d52fa82b 100644
+index fce5e3a628..8afe72bd96 100644
@@ -44 +45 @@
-@@ -1843,11 +1843,6 @@ out:
+@@ -1766,11 +1766,6 @@ out:
@@ -46 +47 @@
- 	    new.link_speed != eth_dev->data->dev_link.link_speed) {
+ 	new.link_speed != eth_dev->data->dev_link.link_speed) {


More information about the stable mailing list