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 31314A0C3F for ; Sat, 12 Jun 2021 01:16:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27DCF4003F; Sat, 12 Jun 2021 01:16:29 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2045.outbound.protection.outlook.com [40.107.92.45]) by mails.dpdk.org (Postfix) with ESMTP id A0E684003F for ; Sat, 12 Jun 2021 01:16:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lIGutIZcV1MbyhNEigvzWttnArcpKT9du1mePVWcTd4bZJw2ZzW0cMd8GNVSpTtg5vNoH+zf+E4PBluGM0B7NgYSfpyVgflnjWJYbMYyi/acxoY92oVR4ioWAML1ti8nYGXK+SuvgZGqlAeD/mdKrymDf/d0Uboo/GHZ/Q5D4Yg55jRSf8jx1Pi1JFptwaRIB20qgv9/X1wIWp0j9akmuO7txgSoiBIN6TkhixzWapeh2GyD0V2OIB4It7USe0tjCpu/mCMJXuLvDru7Ck2qkkWs3Ij39NtDHOXhpoF2AJPRVeJdE3OdE7MNbXw111/gZaNSxRAyYmJpTXAjM/Omqg== 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=M/Z9Ib2sAX5oZj54CH8Gs8D42//eyj3wEJmCRF2/I8g=; b=RkUmJRqNoSbDA4ctLylgxkPcCH68HCJvWhoKqpNxiKp3Ro5muguO2IUWvZ78/JarpRiS4SYVxu1DNZdeExGa9v5RhKIIHHLIgv4luehDdiGMR6J9X0DQG97Z7WDG08Z3Cxb6F+qlWI4Czsn6G9X1RA05FT/qEuUyb6P46Dq+aXRMGd6Ural18y7xutahZ+wZ4L4OGBRuSrIgVNf07t0G/kJEMI744Eo0Wkor+2Vs53fRQai0iRGKumJaHK6gPvlbh5hWH8mjo1X4jFJQF02CRj96paLHdyQph3uT1bflY7zTIrCeFX1cNyBGs0r3B06H04MANEIfVow1p309AWOpfw== 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=M/Z9Ib2sAX5oZj54CH8Gs8D42//eyj3wEJmCRF2/I8g=; b=tzDbTUgV2IzS3g4RH1x+DLMiMjkQ1ycsTbrVMBz/eo3bU56otKSOhVEoF0D9Y1wWZnEO/SdCZM17qrCSGTeGprrDgmrRH4h5HifNvU+wJBqD4EziB9lBMRK73zVaXDPQMzCExxrTG5GJVv5GaQno9sDFmp/YGMY0xYB6TjxUPB4Adcd50wyCZlk2Tyi5xrQ3Q+/QkKKPpdQ+apH1LLD9VLcspGgCdxRYuYeiuyO0UUcnA+m4QmLo77QjSDLhPkC5Sl2jb4qhoChBTfSaZproGrzOqqqSnjmfTcOmqBWBzdf/q7qKDPpYHAWIao9kI0sfmLG/wVIk589zxaR19p3wWA== Received: from BN9PR03CA0787.namprd03.prod.outlook.com (2603:10b6:408:13f::12) by MN2PR12MB4047.namprd12.prod.outlook.com (2603:10b6:208:1de::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Fri, 11 Jun 2021 23:16:26 +0000 Received: from BN8NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::bc) by BN9PR03CA0787.outlook.office365.com (2603:10b6:408:13f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Fri, 11 Jun 2021 23:16:26 +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 BN8NAM11FT005.mail.protection.outlook.com (10.13.176.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:16:25 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:16:23 +0000 From: Xueming Li To: Hongbo Zheng CC: Luca Boccassi , Min Hu , dpdk stable Date: Sat, 12 Jun 2021 07:03:35 +0800 Message-ID: <20210611230433.8208-121-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f507bbcb-e926-4e03-89e5-08d92d2eef83 X-MS-TrafficTypeDiagnostic: MN2PR12MB4047: 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: 1XN8fKw8yuyf0EZDoRDcrrAb5NJXJ64DhiLCUu7acqp6LYW4Tg3sJLzHYmVt5y4N8ZAB8mloDPAS1flAasTTpTOuqzzq6BHWNnUfT1agfi+JtTvTpqfdctyq0n5htkiLOwoF2P5/KVLPiPpRt+Rxlfg5obLdTvRJNtJPPL1Hr1UhbEKY9cNzFNGTNFTWt0u8DHuNGXTiCRD0FzC+pgB3WKPFHqznMTXYjYv1Hc2oq8k+zTn5KMNtFw5BGNIBuxZPPMdpzbONu/uuxJ3W2yBBoYRudYVGvV4MU3UofLpEMnwQS/oq141GWCVwxJUAw89T7Arvn3AUW+XNSWkX1s/JzW4HwsuOejjIAjIUtMyKbyMZZwkzyLz+m+Ir5KSjQC/4dIICxVVfBL00JFKiKLqt1ZchBdDWPF9ZAw4ff019Moj5DlC817+4ZL+WSicg+BKyc9C7MYN57/oYILycSOlCvEii68K6XRLP7iQzVUs76yN8wXj4g659Jn/XlIPpoi2wawuqvL5WtVHNqzut4zQbvsNrearsuf0ZOcIG6xjYh6TVVy01/ozf1zvT4ChIqbRO/fboQhR/whYRkc4EQLYK5F+jeit37BiFkR+t3mETbooePM6rmYXH4M6ykaaQr2ivg5dM7bYURcv4D91LNsQTOJaOxUqEBLvK/y6HLRrlSdmuvHnodQmek+C4gkCktBXn8GQ/qadZFata8ZKXI7Yu2bjSXvEE1sl5UQQ+PfYBY1gzY2BWk+WkueaCicW4UVgM0j/ES1EefJuVXUCTM8VdJZ+xHhOzpFaxXQRazCEoJfMnHRf+K+KkZcjYV51SuVTs 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)(396003)(39860400002)(36840700001)(46966006)(15650500001)(478600001)(16526019)(36860700001)(336012)(966005)(316002)(55016002)(47076005)(36906005)(4326008)(5660300002)(82310400003)(426003)(6666004)(86362001)(1076003)(26005)(8676002)(186003)(36756003)(2906002)(6916009)(7636003)(70206006)(8936002)(83380400001)(53546011)(54906003)(70586007)(2616005)(7696005)(82740400003)(6286002)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:16:25.7987 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f507bbcb-e926-4e03-89e5-08d92d2eef83 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: BN8NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4047 Subject: [dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' 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 06/14/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/8e72b7a2eef263261b09d36dd750a78a4e7cc09f Thanks. Xueming Li --- >From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001 From: Hongbo Zheng Date: Fri, 7 May 2021 17:08:17 +0800 Subject: [PATCH] net/hns3: fix VF alive notification after config restore Cc: Luca Boccassi [ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ] Currently in the VF reset scenario, the VF performs the set alive operation before restoring the configuration completed, which may cause the hardware to work in an abnormal state. This patch fix this problem by set VF alive after restoring the configuration is completed. Fixes: a5475d61fa34 ("net/hns3: support VF") Signed-off-by: Hongbo Zheng Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 235beea14d..d18313c330 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns) goto err_init_hardware; } - ret = hns3vf_set_alive(hw, true); - if (ret) { - PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret); - goto err_init_hardware; - } - return 0; err_init_hardware: @@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev) hns3_set_default_rss_args(hw); + ret = hns3vf_set_alive(hw, true); + if (ret) { + PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret); + goto err_set_tc_queue; + } + return 0; err_set_tc_queue: @@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns) hns3_info(hw, "hns3vf dev restart successful!"); } else if (hw->adapter_state == HNS3_NIC_STOPPING) hw->adapter_state = HNS3_NIC_CONFIGURED; + + ret = hns3vf_set_alive(hw, true); + if (ret) { + hns3_err(hw, "failed to VF send alive to PF: %d", ret); + goto err_vlan_table; + } + return 0; err_vlan_table: -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:53:59.697821400 +0800 +++ 0121-net-hns3-fix-VF-alive-notification-after-config-rest.patch 2021-06-12 06:53:56.520000000 +0800 @@ -1 +1 @@ -From 9c552087dc81d95a0bdbfef1be796a0c9656acee Mon Sep 17 00:00:00 2001 +From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 71f3f95877..536ed463ef 100644 +index 235beea14d..d18313c330 100644 @@ -26 +28 @@ -@@ -1891,12 +1891,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns) +@@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns) @@ -39 +41 @@ -@@ -1995,6 +1989,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev) +@@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev) @@ -41 +43 @@ - hns3_rss_set_default_args(hw); + hns3_set_default_rss_args(hw); @@ -52 +54 @@ -@@ -2706,6 +2706,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns) +@@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)