From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05629A04DD for ; Wed, 28 Oct 2020 11:49:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F1E802C2A; Wed, 28 Oct 2020 11:49:49 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 7FED8CA12 for ; Wed, 28 Oct 2020 11:49:46 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id g12so5122509wrp.10 for ; Wed, 28 Oct 2020 03:49:46 -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=H2Ze9JqlraCwuwllXNpSmIf2JpiOZHCAsW8IY7W59Ck=; b=nRSXw3Zdns7EFsa9GZEcXdD21904VOgURA9fUXmHRI/MXJFzwcNaewnRMJu+jbszYu bGfzahlo1c7lVqo9trXScINmfLEsNgleygAajNlBDBlfYpqnvaq2uA6kizgwQ44YiIMT 7dl/VoT1SXF+mngwy/bs047BrEZAcvOGrz434G1y5l0TJFfwGip2zxHBwldldO9c7Z6b aaBL3KIvmqHbDs1rijA7Y3Dl7xcyDz6Rx5xeRBXvVzBmZcrTp+5VQuzzcEOmbNpajlKe 9wN717lzx2FZiNPUiGG877ZbWFnHpMyn2t2qMKn6BVmYJNBXcqlkI8mAjVy0vUP3/Y0+ z6oA== 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=H2Ze9JqlraCwuwllXNpSmIf2JpiOZHCAsW8IY7W59Ck=; b=pEtS9skZdGZzvBd5Z20VJ5meHk7Lr1Yd6wcLmkj3CibPjNyQki5HgQTcVldI+yKoY7 BsDYd/MS/ZCzQkagM6rIVUPHy34IpssKM6UpCLHX/9sgM2OFkK2hiOG50iHKgYrpj6yn ZBZ+QheTVzBLidcT3rrQmdCRLSscsBvlqpKMPgedHTBVhck8HTtV0ydpc2gUW672EOQe QoGmYnAdakRsfp0Ohzcr0KkUW8vkpYw4j12Oo8wDmyBiO82zdmCAKYs1xGlJYhWTTGt9 ylIb5CLRIfxBp2m7NPbfSRbCl5DVhC7OES6derpw0mq1Zd97HQxGIoFzF8j2YU9Ehd4Q Ghgw== X-Gm-Message-State: AOAM533XB7d6hL5gA4CwbQjzEL7oQO/txenOG2zZJMSPDYGTARX5s69B fUTfRUH+G16SCcIx8TS4yHs= X-Google-Smtp-Source: ABdhPJxZkPpmCSXKYzu0DEhOJw9Sq6hNf3VnwnRaGRXj+YQnTYYXB2ZHMLCpJjB2VVHoupQc+kPdAw== X-Received: by 2002:a05:6000:108:: with SMTP id o8mr8056826wrx.256.1603882186256; Wed, 28 Oct 2020 03:49:46 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g8sm6270577wma.36.2020.10.28.03.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:49:45 -0700 (PDT) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Wed, 28 Oct 2020 10:43:49 +0000 Message-Id: <20201028104606.3504127-70-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 19.11.6 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/30/20. 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. Thanks. Luca Boccassi --- >From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 22 Sep 2020 11:04:16 +0530 Subject: [PATCH] net/bnxt: fix link status during device recovery [ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ] Driver should not send the phy_cfg request to bring link down during reset recovery. If the driver sends the phy_cfg request in recovery process, then FW needs to re-establish the link which in turn increases the recovery time based on PHY type and link partners. Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index d6afd03e56..bbfe883c15 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) bnxt_cancel_fw_health_check(bp); - bnxt_dev_set_link_down_op(eth_dev); + /* Do not bring link down during reset recovery */ + if (!is_bnxt_in_error(bp)) + bnxt_dev_set_link_down_op(eth_dev); /* Wait for link to be reset and the async notification to process. * During reset recovery, there is no need to wait and @@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index) static void bnxt_dev_cleanup(struct bnxt *bp) { - bnxt_set_hwrm_link_config(bp, false); + bp->eth_dev->data->dev_link.link_status = 0; bp->link_info.link_up = 0; if (bp->eth_dev->data->dev_started) bnxt_dev_stop_op(bp->eth_dev); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:13.947167689 +0000 +++ 0070-net-bnxt-fix-link-status-during-device-recovery.patch 2020-10-28 10:35:11.556830789 +0000 @@ -1,15 +1,16 @@ -From 6fcd0de92298f61b8f96ba170db9e81923019626 Mon Sep 17 00:00:00 2001 +From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 22 Sep 2020 11:04:16 +0530 Subject: [PATCH] net/bnxt: fix link status during device recovery +[ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ] + Driver should not send the phy_cfg request to bring link down during reset recovery. If the driver sends the phy_cfg request in recovery process, then FW needs to re-establish the link which in turn increases the recovery time based on PHY type and link partners. Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur @@ -19,10 +20,10 @@ 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c -index 05e9a6abbf..e0afaac694 100644 +index d6afd03e56..bbfe883c15 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c -@@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) +@@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) bnxt_cancel_fw_health_check(bp); @@ -33,13 +34,13 @@ /* Wait for link to be reset and the async notification to process. * During reset recovery, there is no need to wait and -@@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index) +@@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index) static void bnxt_dev_cleanup(struct bnxt *bp) { - bnxt_set_hwrm_link_config(bp, false); + bp->eth_dev->data->dev_link.link_status = 0; - bp->link_info->link_up = 0; + bp->link_info.link_up = 0; if (bp->eth_dev->data->dev_started) bnxt_dev_stop_op(bp->eth_dev); --