From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9227AA0C47 for ; Mon, 26 Jul 2021 15:54:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D68F410EE; Mon, 26 Jul 2021 15:54:11 +0200 (CEST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id E172940DDA for ; Mon, 26 Jul 2021 15:54:09 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id r2so11239384wrl.1 for ; Mon, 26 Jul 2021 06:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HYDYdnp4Y58KK58sQ9urIFaSd61vjbVRFq4TfxL2bJI=; b=mEI7o0Tby7vxuQEDQRi5b8hS4E6KSYT0ImsTi620pBoYRXYBXWZr+jyEzN3GIMj0Tj /iI2VONRMeBY9d3T7gk6W+Dbdwwf4GmekOMqBeDEkL+f21EXvw7Lz5voUbCay731R7tN iAigZTjE+UVL0YCuZwKn1F5qgqkKHoraIOgLYiabxtTC77eD9DkUckYVKsF+FKA896p3 kwa9p6oIoV9q1omjrIfgVWO30E1WOHcUOiQo80UotZ1lrJ4z4cq6kQRzbJhE5Uxkc6S1 j8NpkONHJit37SitqRDXxq1EzopwIk65Mb8+WWmcG4q7HhgR9zrZYB8MDlYFFMZrUi+c 9qsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HYDYdnp4Y58KK58sQ9urIFaSd61vjbVRFq4TfxL2bJI=; b=SbBN2/eezqGXBBJJcUwk2Ckn9CB4fjR/4IaiT2ZsChDlUGI3CmZoGvXqnaU7mFcSZk rSiUVyERXUwILuXIeFNyugqHNZ3zlwlA23ZQ9eJyXcfJplyOIl9w6HlwHYuLELWJ27yG Sy3rSEkatMJPlEX9FKw1WxGGehGl8v805VJhGWD26coCRL4FflALJU25LbJCS2VpguQv V5hJOm7j9hZfRoAPtONvHkzABb/5YXFjGqDGfCWkWdptZFURKUVizDiY4sMM/74FAG2w /M4cOhEcQOI4R+nEc7xlyH3TJDrCnOIeT473CithdnSpHVUTYhTjTS2xoQojUlimTrPb 8ZKA== X-Gm-Message-State: AOAM530ENnpjomLvND2wvz2/ER2Alb83/A4UlSnush2ZLidB1Yy7Jczf YkaR54We+VlGdOdYpPAEZ6w= X-Google-Smtp-Source: ABdhPJyoDzmI3PKIBlOG62DRlvy3xMR+7303pXM8A/i15CrMxSOkZUCtaqvNHvc8vXONcLBv/wxl/w== X-Received: by 2002:a5d:4b48:: with SMTP id w8mr2538776wrs.109.1627307649675; Mon, 26 Jul 2021 06:54:09 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p9sm41645238wrx.59.2021.07.26.06.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:09 -0700 (PDT) From: luca.boccassi@gmail.com To: Weifeng Li Cc: Ajit Khaparde , dpdk stable Date: Mon, 26 Jul 2021 14:52:37 +0100 Message-Id: <20210726135322.149850-14-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix nested lock during bonding' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Ajit Khaparde --- 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@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) {