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 5CF08A0543 for ; Tue, 21 Jun 2022 10:06:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5732340151; Tue, 21 Jun 2022 10:06:27 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2089.outbound.protection.outlook.com [40.107.92.89]) by mails.dpdk.org (Postfix) with ESMTP id F28144280E for ; Tue, 21 Jun 2022 10:06:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JHWYydtK3ZslF3uyad5P+vNj3T/bedOrNVQ0j1WrfcnbcSGVXpmaWthmyXGPK+Cq4dCLJQvvlEkHv/kiUOOBVOOTVhAHNG3Pfj1p1B79OS/SkqizfZHgPwZV21Oo4QsgTwmFFqXqbjuCyMUTE8NisU3PxZfp3Y1hiM98hBUacYWquc65QuLJrIOb4jupuUzSBfP0+lBeZtowd6YPjonlSCdl3DvF9ils5IXQXexyNjiJzxq1qDYiEkStZ8q4P2wQEahGUIza9qAMzZrfZCYyvCZrng54cOhXF8HNiGAz1cKmS434yAeT1JcJl5LqcWjZJLfkDuOTRWB/4DUOtyA03A== 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=R6Uy83tY34qjk2YTENr7+DrhYbhijeJ180aear3Yd38=; b=XxcXs7eEBTh2nn+RRgHHuPPUoGz8aX50AtJVee2GGDY3pjfjaoJRyAGgI+janF3kg3DKbeKeJELOqxfWQNLwwogEwWgs9aM1fcH1fhGafLHQI0/b1v52Bp3UaJHzg37oesPoKBcDQwG8GKAu9l9TDTlobhoYn025GM4cAmzPr+I31NKh1SenIQenOCK3wpOH9y8fNwoONtB4j7Ut/8dOY8o6gYsPVt/aGISwB1a8ChDSR1RXLC5qQiklXtiIWssMpdWfGOGruCp6932X7j90si0Z8rEGHcTNetNH8CrjvWzOHlwH8w7sOF4NSAqj3/IZoa9o0NeYQtXaO+pXco8LkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org 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=R6Uy83tY34qjk2YTENr7+DrhYbhijeJ180aear3Yd38=; b=UjJqbLaDzVTZrzDn4QY2VmhRfhYiD4yHn8BIcYs8+hejiOly7fI+1L98sW50fgrxhf9YkBYjV0DgjcxSNAGmvY8IdCK+5L8aPRq6DSzUz7IGKb36s02wjPTDIPobGUtni03k2JVnCFwSoty3ZU6E/qjpgeeaAs4KKhcfEDO5wv5ArznI38uJnjClUrTbWz3DynQAnrIlZyyliQqBhWEZIlsk3jVtJHl5Hqf4Uq5so/MjmcfR9rN68LTHy0K3h2hxla5PVZgU9yDV6OTjF4FoEGWi0lQFI7ey6v7gP8/TshK4OPjefZOlT+Sn/S1gkbsdGBqrAUXRfihqAfqtq0CzGA== Received: from DM6PR02CA0165.namprd02.prod.outlook.com (2603:10b6:5:332::32) by SN6PR12MB2736.namprd12.prod.outlook.com (2603:10b6:805:75::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Tue, 21 Jun 2022 08:06:24 +0000 Received: from DM6NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:5:332:cafe::a0) by DM6PR02CA0165.outlook.office365.com (2603:10b6:5:332::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15 via Frontend Transport; Tue, 21 Jun 2022 08:06:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT009.mail.protection.outlook.com (10.13.173.20) 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:06:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:23 +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:06:21 -0700 From: Xueming Li To: Huisong Li CC: Min Hu , dpdk stable Subject: patch 'net/hns3: fix rollback on RSS hash update' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:44 +0300 Message-ID: <20220621080301.2315720-39-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: 0c9b0dd0-edb2-4ce0-b589-08da535cef27 X-MS-TrafficTypeDiagnostic: SN6PR12MB2736: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: WRj31RNHyH+LcgJvnNK0SPM4HzqJgc09yUSpRMNaQpsLJt63FTfwJeBw1Kfvq0/AHwQpRH8QbelMtERGrH8BOtDpWsJPMLTM3Ri216RwF4+jMmVdjeUDr09X4zu5ThMkReCpb1wrOATugyNjUHP8nThqL4EpUJcXIMLOFqKOHo5n6RQWbQ/7zK9e3+Qg1ChJXb6c4wwxdBsqL0wxa0o9akYTATuKdqMxUPL6tqoaccVaEd7fdRySJqOqKVCS5Fms86lPxVOo6SrM2oU+mB3BFNH2YYN7U/m9tLCveU7bI0RhZnbJEIpIpP37uuJ+9YygtpGabfNK16yTw9KpmEGRunT2rrHP6URTpgnNX7bSVDf2/4VmtvLPwEkDEN34Ybt1Z4ZGJ5NPpToHqsz29A6ArTbQ4ZY6z7SSBENzqIk45NbNDXF8ytVuznVfQiygfJ4xgk0Zd/W6jOwpI6N/29uUV9v2IzAeBq+oPj+ruLr3u5eW4QspMA9Y7alURN1AjalB8zyIBZgITHeH3bhDo78/ME4i/+b1ovD6cJUAn2Uf7K07z2GGdvDyqq2fiBXlmx9nTARtmf8rBogYQ+8JPdnT7kTU9EhLNKjmUHUG+Woi/6FOdmWoyaZ07Noza7wRaMpMmYfq5UyRiwSwhYOUxgh6UfaZMMF40kRlaY9f+q76yp24Hb37tRj+S9snin9fZlmqy5iRoFhI3QU7YysdZFleNAflpk/n24llQcDRZp4Xo+rW4FxVnXrF8mjkAtLhw2lr32miVgUXV43b2tFH7vG4biLfHThRafySnnTr0bSaE513WO5yVGm4Q6Fk2+rnrCkyAfac/3bxSAgCXHjbf4VbQBf4dJlT7JQdWsY8eZnrZZ8= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(376002)(136003)(39860400002)(46966006)(40470700004)(36840700001)(40480700001)(86362001)(83380400001)(40460700003)(81166007)(55016003)(82740400003)(356005)(6666004)(316002)(36860700001)(2906002)(70586007)(70206006)(4326008)(36756003)(82310400005)(15650500001)(8676002)(966005)(53546011)(47076005)(336012)(7696005)(5660300002)(478600001)(8936002)(16526019)(54906003)(6916009)(186003)(41300700001)(6286002)(426003)(26005)(1076003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:23.9550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c9b0dd0-edb2-4ce0-b589-08da535cef27 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.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2736 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/7bce9bbfb8909f703238dbb031834a8f267dfba1 Thanks. Xueming Li --- >From 7bce9bbfb8909f703238dbb031834a8f267dfba1 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Thu, 5 May 2022 20:27:06 +0800 Subject: [PATCH] net/hns3: fix rollback on RSS hash update Cc: Xueming Li [ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ] The RSS tuple isn't restored when RSS key length is invalid or setting algo key failed. This patch fixes it. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_rss.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 7d104d59d5..df25a33e06 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -376,9 +376,9 @@ int hns3_dev_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf) { - struct hns3_adapter *hns = dev->data->dev_private; - struct hns3_hw *hw = &hns->hw; + struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets; + uint64_t rss_hf_bk = hw->rss_info.conf.types; uint8_t key_len = rss_conf->rss_key_len; uint64_t rss_hf = rss_conf->rss_hf; uint8_t *key = rss_conf->rss_key; @@ -387,27 +387,29 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, if (hw->rss_dis_flag) return -EINVAL; + if (key && key_len != HNS3_RSS_KEY_SIZE) { + hns3_err(hw, "the hash key len(%u) is invalid, must be %u", + key_len, HNS3_RSS_KEY_SIZE); + return -EINVAL; + } + rte_spinlock_lock(&hw->lock); ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf); if (ret) - goto conf_err; + goto set_tuple_fail; if (key) { - if (key_len != HNS3_RSS_KEY_SIZE) { - hns3_err(hw, "The hash key len(%u) is invalid", - key_len); - ret = -EINVAL; - goto conf_err; - } ret = hns3_set_rss_algo_key(hw, key); if (ret) - goto conf_err; + goto set_algo_key_fail; } rte_spinlock_unlock(&hw->lock); return 0; -conf_err: +set_algo_key_fail: + (void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk); +set_tuple_fail: rte_spinlock_unlock(&hw->lock); return ret; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.049397422 +0800 +++ 0038-net-hns3-fix-rollback-on-RSS-hash-update.patch 2022-06-21 15:37:49.024451205 +0800 @@ -1 +1 @@ -From 07f64b5f576a779c8c3df4ba45ad70c306dcb562 Mon Sep 17 00:00:00 2001 +From 7bce9bbfb8909f703238dbb031834a8f267dfba1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 07f64b5f576a779c8c3df4ba45ad70c306dcb562 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 1c703952b9..4b2c24ace4 100644 +index 7d104d59d5..df25a33e06 100644 @@ -57 +59 @@ - ret = hns3_rss_set_algo_key(hw, key); + ret = hns3_set_rss_algo_key(hw, key);