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 187DEA0543 for ; Tue, 21 Jun 2022 10:07:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 127A340151; Tue, 21 Jun 2022 10:07:41 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2076.outbound.protection.outlook.com [40.107.237.76]) by mails.dpdk.org (Postfix) with ESMTP id 0269F40151 for ; Tue, 21 Jun 2022 10:07:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aihxrTqOSa4KjP2ZZF8Fyq3EEiABIrgsNx/vgXQ1jrKoQI5DvAJPQe50WA029m1DIplUMWoi1Ijm/GN/laAlu+yZb7G8NE5dJg768U58lW8w83nhxWzUc3qF8uHuFx8dHjBfSF1t3fmnbiYB5MACukr89hTCKDy4Pmls5AYuE2uMMHeIMMD3rL5JZmhDkXMddIvUOEqjj454t1AoDiKB5XMcl046rhXPimxAIUO7Kci4CGbH1uCsZDLlXlj/WvruDW5iEjhwRgTEKxQkFi0QxJDb4o7GI4v2+PbJMuyJp1GMVkFO8g7zlmnoyazmVNc/EAmZWy6ue4q+MweNUI97Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yOtl/j3ypCV/gXsbIAsYglK5ouM7t0415bxiVaqF8Xc=; b=dWMQuODMekvY5UUb6CvFeJb0bXH+joyDpOQ24nwIYuLYApLoCf/XyhwNodJZnQ3TEoHsZ92gfSlsYzjdPd1OcYJKt2+Ak6BTLoikBj9ywXehR2z+iGoXuW/lbpqWL6VK3Phxm1ST460Miq3TPOZyTtzt/Q95/ME6XGOnO4Qaakk7Tsck18BQDVokJ+odWRnHPx2wGRfRkNmfhq1GZMUSlqe0sGy2EM3Un014tqzAybrWCSjk3VcFtRp6bqV6quXMH5eoLCNB4eAOL8w+tLVL1gKFt3sSmyrizZfGHztUx3SVQcz07ychf87JRUjARJMjWSa7RTRU5yOHxP57uWCzUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yOtl/j3ypCV/gXsbIAsYglK5ouM7t0415bxiVaqF8Xc=; b=NAKbt3+XBY+PFo2gaXd4ZJk2JFICPH/4RTn9RThYjIbL5PHg64cy80yKjfQW7d+W2N+ODdOlVLYaNStren+tV4CLhnaxz9PJmLUuYDtSm959p4my9MyKuiU5JphRIwPdAfW4g6MBewWey+biG3nLhE5x0N0hg5IXKJbRz0urKrBEReA7ZieDSdNGnWlQI8HJur11ix81M/gSaBctivt3GpMeNGLMHOZf0AQY3OENiVQMoczEyokR7QhZPSxXAtYFsluNffQFfdsl5SoT+HDVRf+OAYZYaCF+eXYB+exYbt2nJUfk3vqUWocFGhGagK4MtmRLG4nx8vEGXe4XB/IDRg== Received: from MWHPR08CA0037.namprd08.prod.outlook.com (2603:10b6:300:c0::11) by BN8PR12MB4626.namprd12.prod.outlook.com (2603:10b6:408:72::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.13; Tue, 21 Jun 2022 08:07:38 +0000 Received: from CO1NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:300:c0:cafe::3a) by MWHPR08CA0037.outlook.office365.com (2603:10b6:300:c0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:07:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT059.mail.protection.outlook.com (10.13.174.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:07:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:07:37 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:07:35 -0700 From: Xueming Li To: Kalesh AP CC: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: fix link status when port is stopped' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:56 +0300 Message-ID: <20220621080301.2315720-51-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55f54de8-1079-4d11-effe-08da535d1b22 X-MS-TrafficTypeDiagnostic: BN8PR12MB4626:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ssfwC7OIwsjXOHSd7IBPrDlZb2yITmZcxpN1lHmsuJiT3nOB2/MtVXtIH69Hv7W1hhjIx9+g/BbEubLhQ8ypOT7Dpm5wGen+wJYzDdvD7LNTZj5/5+sZyd0JxkTgp+vFCIGOwJwYkxvUbO2K4uFsDG66TdEPqaQmX9jt7M8UNIg0o7GHJOstyYKgvBYD3LmCaXYMewuUX1PI3duB0Vkg1AWTiCJnomD6qdBxurUIy47e7vxPgjeB7eq9bLhyprbRHZSfguvIJoMwUsIxovBNnAtWoFZQAwdgSGAo/F1dNJ9Dq3etR385vwLNaRPxzUJwnb6yLlQPSaYDcZk9V1YnzsIX8blE69VCKArlafsnLMcvI7fPsnLieuKOhx8kGT7N3+E8pdsMzclaKpfaIwGLFbB3PZu1PvLKs6HAMZGK9tZyxytDl+yYAADdDGr+0yNAui9jiF9BzEWsRkOiagB5QLtLeVUrtxwVnNGcOfhv5kEASB2mAwocCno/xkxwTKzKpB7umFi5Mnuge6e7jJ7jmUNnorpfD60jebpK1xDFtWNtQE1fbyjd7BbWiDg5YI6DMLqqYMmhjdn1qOxWVSfzKFZlwnA0f7Wyia0Gs9I2wkTRR1aMd8oX2IywbjkfUlFzJYGyjRAZ3EkWe3sgaE0thLnVikJFvgcR2yU7iDAAQCBYDO8EZ00wQJcp4OP/xX06WQVA7Cxlh137wKEtRGdWWS+dm2gvdlMil6eXv8ons9n5CupnoLpILFiJdnAo6i5xYe+hQu0eSdsWSBGJrhYms2FM/a1U8l9BUDiBYCtja1I4sHqciRJAROnNcimifq0P42yHN4K1YfSm4RVssFHxBcZFh3bicupS95DBLG02yh4= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(396003)(376002)(39860400002)(46966006)(36840700001)(40470700004)(41300700001)(6916009)(36860700001)(40460700003)(16526019)(5660300002)(86362001)(7696005)(82740400003)(81166007)(6666004)(2616005)(356005)(53546011)(6286002)(82310400005)(26005)(47076005)(966005)(2906002)(8676002)(336012)(4326008)(83380400001)(426003)(55016003)(36756003)(40480700001)(70206006)(8936002)(478600001)(186003)(70586007)(316002)(1076003)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:07:37.7591 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55f54de8-1079-4d11-effe-08da535d1b22 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB4626 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 Hi, FYI, your patch has been queued to stable release 20.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 06/23/22. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/c105904aaa91b24a6c5708693eb6623426a828ba Thanks. Xueming Li --- >From c105904aaa91b24a6c5708693eb6623426a828ba Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 27 Apr 2022 20:28:18 +0530 Subject: [PATCH] net/bnxt: fix link status when port is stopped Cc: Xueming Li [ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ] Driver forces link down during port stop. But device is not obliged link down in certain scenarios, even when forced. In that case, subsequent link queries returns link as up. Fixed to return link status as down when port is stopped. Driver is already doing that for VF/NPAR/MH functions. Fixes: c09f57b49c13 ("net/bnxt: add start/stop/link update operations") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 742a020cae..e3fd3dcb7e 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1774,6 +1774,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) if (bp->link_info == NULL) goto out; + /* Only single function PF can bring the phy down. + * In certain scenarios, device is not obliged link down even when forced. + * When port is stopped, report link down in those cases. + */ + if (!eth_dev->data->dev_started && + (!BNXT_SINGLE_PF(bp) || bnxt_force_link_config(bp))) + goto out; + do { /* Retrieve link info from hardware */ rc = bnxt_get_hwrm_link_config(bp, &new); @@ -1791,12 +1799,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) rte_delay_ms(BNXT_LINK_WAIT_INTERVAL); } while (cnt--); - /* Only single function PF can bring phy down. - * When port is stopped, report link down for VF/MH/NPAR functions. - */ - if (!BNXT_SINGLE_PF(bp) && !eth_dev->data->dev_started) - memset(&new, 0, sizeof(new)); - out: /* Timed out or success */ if (new.link_status != eth_dev->data->dev_link.link_status || -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.594442042 +0800 +++ 0050-net-bnxt-fix-link-status-when-port-is-stopped.patch 2022-06-21 15:37:49.067784691 +0800 @@ -1 +1 @@ -From 7b6eba8856ce3088a759d8e14bb0b73872f65526 Mon Sep 17 00:00:00 2001 +From c105904aaa91b24a6c5708693eb6623426a828ba Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7b6eba8856ce3088a759d8e14bb0b73872f65526 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 1904db93c4..69f1117ffa 100644 +index 742a020cae..e3fd3dcb7e 100644 @@ -26 +28 @@ -@@ -1826,6 +1826,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) +@@ -1774,6 +1774,14 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) @@ -41 +43 @@ -@@ -1843,12 +1851,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) +@@ -1791,12 +1799,6 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)