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 7CD94A0A0E for ; Mon, 10 May 2021 18:21:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B894003E; Mon, 10 May 2021 18:21:33 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) by mails.dpdk.org (Postfix) with ESMTP id 9B78E4003E for ; Mon, 10 May 2021 18:21:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dtj365lk0lTxPz9HpIsfe97/FJSfVQ2vMB70lxaDRDUMS7d5ZN3Imwd/AYamgV3VRHfzxTmNW6DaOxsWDL6Rah8LTxpJBB0IZwrJn1e5u39CFzoZl1WppCfppo0to6z8QrMoRjwm8zCmK5WkFXSABsoAfAEqbhmKAR3nz4vzhhaADal8liY/A2+Wx5GgipddOAdY1STxreml+4K05ujbV+0NwcDd5rnG8XgoN0x0TaB5bVYsAlCa//DqYK37meRC7lD5P/+cDr14nqVNbO9FA53i20oFsN8103cbtlK/FahUBxKp195wNyVQnT/3ekYZJC2jrUFfFq8/TTrdfM/mIg== 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-SenderADCheck; bh=kkmFVvYdxGEPSw3wZN0B2/7gBhycf+lVZslu59NHq58=; b=j32ilsrLGkKTrf+UWQbrIYaoQLBORqoZ6pnWas4bmSQENeR9ZMuOlA8KlV4NWEG8Gex7FTR1YJ7CMF0+sxHe/JyGtOaIz6xENf8DqmDIwbQEr5vI6CI5/HNmjnoAlxXGGe6aKOx5hZdYU/BDOUDGm2ivkdvtDLZtmxO6GXAiCpWuj7T8eMShgx6uTWXNoA9laTHVloRO1xjL+RAuaHf38TGZGUplEGB4rFw03sO8ShJhBRt2G5A3zV5W+1pGEK7KfEdYOboxD3l5xLJuMr/Dz7wDuT4nBWQxbo08/HRD80gLVLDh08uM0FKf7HzqsFWD/i5eznvT91CDBCuufOyecg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=kkmFVvYdxGEPSw3wZN0B2/7gBhycf+lVZslu59NHq58=; b=cbw9GY1GddnRpe6jY7/5aqczran9sCJMYIAmQbSaBHqp+HyVlJ9LKMIZspqwU+K9IrxALD+hA4+tqbFTYihCxH+5AvTm4jhPOVgCjaMvluzY8B77Vls98hfmSHZe9N1+NBwitGASOcyY+H8uRSHxyw3Z1fItNSTS4huKJzJ4+kS7oIPeW47SIwxR3V3198TTF3hTZgESEomPX3pWbx7ViJJOlVRkbM8hflX6PSMr1xykOqgHM6qucrLFnyYb/jOjsnZpY9H9D469XANVpE3JIWGE2I9eoGlWE2LDE+X1Y/5wEaxlb4Exd0u5qYuen069Vm6izTjlnVPdWWs2kBNBmw== Received: from BN6PR16CA0002.namprd16.prod.outlook.com (2603:10b6:404:f5::12) by CH2PR12MB4151.namprd12.prod.outlook.com (2603:10b6:610:78::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:21:30 +0000 Received: from BN8NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:404:f5:cafe::84) by BN6PR16CA0002.outlook.office365.com (2603:10b6:404:f5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Mon, 10 May 2021 16:21:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT043.mail.protection.outlook.com (10.13.177.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:21:29 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:21:18 +0000 From: Xueming Li To: Chengchang Tang CC: Luca Boccassi , Min Hu , dpdk stable Date: Tue, 11 May 2021 00:02:10 +0800 Message-ID: <20210510160258.30982-181-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 086ccafd-f8bd-46de-491d-08d913cfab34 X-MS-TrafficTypeDiagnostic: CH2PR12MB4151: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 43L9mkbSv6AIwJjN8gdSA+HoHsQo9VDaSnNm3P3oaCeiw+vTBJ42V3LjPaGhct3mWK0cc6VSol2k5mMbamj88+3NcUk2UDeB+kjJM5Fdwo5ZequGdAQJW+2oo3fuXqLTxP2kw8ev5hFKu+NpvFgA4GSUj8m9gdd3TB4mb7l1aMnyTihyNZXYmDOwOiXWdbt0Zt/xLikhmjYB49vIoxqwKTDZYtYa14rvcYLHGnGD/jpZxhaZ6auOFjlkhDoqVVxB7uIku5czauYKcWode2tFUvx/SpOcHhDIy/sUxK6dC35xZgmAwXPfNgXQOxKTx/x9oK1Jn2iaj1a2YTFexKu3W6tTQLvcePcuB1I6sOwXDS9cn/mqvo5e9Go54ICebbaW/RI05m31GfyQhnZYRNCx7XPrRN7QY5wxxnDC3oKtjGUmC51p/nyP5U8AbJss8GFIbkiuEONn7QGBbn7sk8ZCD1LnEM+N8H8ewVWYtT0xvnNOBuemBwzlBWozJUvBL0aG3GtyWL3Ow8hFihCBc9uYpdOtCnSO3pnJycQHo/7LznVnBmKemzlAYK9G955GqQvOeyK/n4nkHE0mGLGTGfEoKepgFtCZq9Lv9x7F1gT2siMVKMn7Y0Z2KVd8TNniGndG2cgv2/BD4nFk9KoZyVNLZnCwWs9k32Rz4DHyVaB60RDKxIHDb5zSaDeMsV8LllKXdATMdmk3hIdfTTf+2dZqtRV1bcXHCJaphD6Pey0W+coVpxw37zM5zH3Eq371I7m8VJtGCz+zAoOBWpvZXuqXcw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(346002)(376002)(39860400002)(396003)(36840700001)(46966006)(26005)(966005)(1076003)(53546011)(36860700001)(55016002)(47076005)(6286002)(36756003)(7696005)(6916009)(8676002)(2616005)(426003)(316002)(478600001)(16526019)(4326008)(2906002)(8936002)(6666004)(83380400001)(54906003)(70586007)(70206006)(86362001)(82740400003)(5660300002)(356005)(7636003)(36906005)(82310400003)(186003)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:21:29.9225 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 086ccafd-f8bd-46de-491d-08d913cfab34 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4151 Subject: [dpdk-stable] patch 'net/hns3: fix configure FEC when concurrent with reset' has been queued to stable release 20.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/41111ae6237945405a1d8689eafc8e54cd815461 Thanks. Xueming Li --- >From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001 From: Chengchang Tang Date: Sat, 10 Apr 2021 09:11:20 +0800 Subject: [PATCH] net/hns3: fix configure FEC when concurrent with reset Cc: Luca Boccassi [ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ] Currently, after the reset is complete, the PMD restores the FEC according to the FEC configuration reserved in the driver. If there is a concurrency between the FEC setup operation and the restore operation after a reset, the FEC status of the last hardware may be unknown. This patch adds the step of obtaining the lock when setting the FEC to avoid concurrency between restore operation and setting operation. Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC") Signed-off-by: Chengchang Tang Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index b90ee642d6..023b7d6912 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode) return -EINVAL; } + rte_spinlock_lock(&hw->lock); ret = hns3_set_fec_hw(hw, mode); - if (ret) + if (ret) { + rte_spinlock_unlock(&hw->lock); return ret; + } pf->fec_mode = mode; + rte_spinlock_unlock(&hw->lock); + return 0; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:31.260521800 +0800 +++ 0182-net-hns3-fix-configure-FEC-when-concurrent-with-rese.patch 2021-05-10 23:59:26.620000000 +0800 @@ -1 +1 @@ -From 6d360284dffe51f852fc373058bfb274b9b8982c Mon Sep 17 00:00:00 2001 +From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 53a0b545ce..846e5a27c2 100644 +index b90ee642d6..023b7d6912 100644 @@ -27 +29 @@ -@@ -6433,11 +6433,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode) +@@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)