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 BACD3A0543 for ; Tue, 21 Jun 2022 10:06:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B572042820; Tue, 21 Jun 2022 10:06:50 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2078.outbound.protection.outlook.com [40.107.100.78]) by mails.dpdk.org (Postfix) with ESMTP id 8D8EE40151 for ; Tue, 21 Jun 2022 10:06:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bc+NfbUl9NwnB44d8u1ojkSifbJskkud5p6PCEieiuBs4th+gCnE13dbqWTbxJ0GR+kpP41McisYJiK2kSbdjTBH5K44h9bnJfGKgEDdi9mCY/9fFsSePd1t4SeNJze5R4R/7mqkrfoSRNo0L6V3JnN3qBobkSboxAKu/l+8tFy+VjTt1aTGu6BaJvA0OeWw/AvNOGmTM/GTMSdEf3jNK5C7YNmmKpEC35M8AJiUVFUi4yBHULavgxKo1V6+9gGZu/KavQFa+Fz4ltBOXFzU9SUkfTvtmVjDk7Lzrs6VIxslp/zTpTXHb+9pUnhO4eYEJ8rwxSa62jgg5bEDMdqjMw== 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=Dd1umRP87Uy0o8wfJlbcF0HRefg6qYJponB0/K054g8=; b=isNKP7BhizNLoCulnMxS1HqS/BlcwUhtuel6PXJtFJquIxBUDmNBXnB4wOOFR5AzeytTDvoBrbGxvbLnHxLk2Ks+OpFhh3r9YaUwNWOxyDFnpe+4K9Sk/uCwCn/rlzIHZlr+jHG2lGQ+xx63jRNPzlrak8eVH78NAYInMuiX1BmsDtUvOONcNwYHhoKhuAQAzFwGQLWVSVH1ZKJ7jqyN7Spz0CBCGgCbbMhV/aHoWp3Xb6V2HzrQfLb/yhMfSvsGzFBzN9hDBmikBmWr1nBtHJyL4KDxDRViwTzB5fVwwyE9b1CCyIIAKV/k9xVb/IggQJuxQwDTW4zWCJD6qCPVCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) 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=Dd1umRP87Uy0o8wfJlbcF0HRefg6qYJponB0/K054g8=; b=R9htV8dQEVQ26dCJLmdl1l3Y1RRuJC7cSURZ8Lk/xBdTvOJyzswg19gC2IqpNRFVLZdiiau+btyR3Ub6T0XkuxHJ5tRp7CcJmn8LPXA/9anY/popbdbMaqzagpW+pngWwojBS3Y8a5SC0oiuS8qsMaUBJaBv1vWog0KcsTEK6rQW8E9u6LizbqjjBjjJqljE5dMT52Fg7PItFmBMBNPHT8hMeW4Ij6Dh3I/Pib5HMbuB1u4Gu0znwznlf3Nn2ZM37xR9fhJT1uL94QeyatlwxyER/xIwKNZ0d/Vh5ycoDASGiKESjarDN2xeD2q6wwMF6rQRLIlmYHSvcStruwb8hA== Received: from BN0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:408:e6::14) by BL1PR12MB5048.namprd12.prod.outlook.com (2603:10b6:208:30a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:06:46 +0000 Received: from BN8NAM11FT067.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e6:cafe::df) by BN0PR03CA0009.outlook.office365.com (2603:10b6:408:e6::14) 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:06:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT067.mail.protection.outlook.com (10.13.177.159) 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:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:45 +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:43 -0700 From: Xueming Li To: Huisong Li CC: Min Hu , dpdk stable Subject: patch 'net/hns3: remove unnecessary RSS switch' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:46 +0300 Message-ID: <20220621080301.2315720-41-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: c471bc03-30af-43d3-aa92-08da535cfc2a X-MS-TrafficTypeDiagnostic: BL1PR12MB5048: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: nSgqe8mkbaQqW00kU6w/fmc7iAxP3dSvB+yhHUwefqXRFrTCKb7LhFT0BV+LfTKW5QTelZRCAmUOw2eG4ZY0xIZx3Zg19hlyr5ogaNis6Dcbd67ZmkLkbQfPeDZpZ1ywWF6vLElWBgWSzg4+ConprZxgRloRqMDERcjQDlPvnmIQWv3IJ5vGiEScJX1f27sL5S4V4Gg3kCs0NEs/f/OPJ/+fH0P04ddQfg3qfAGcB48e5V9ZxoLPV06kPj0vtx2EVtSZTc5hSi5qLUFi3dn0+vuNxgSGfkD+AxMDSeNPyBln/Ul5tEH42xazZ8ZOx5AuCPrVGo/ANZl8rSRU2Ax+ILkd2sbibcrQnn8lHGnX7VxN1kGL7DiCXfhN5KSKhdaUUOrQnidcIsqmdYNe8IHIONShks1kMnQzPAwq2TCeU18dF9QU8/qp+BB/uoH6Z6YjCT4n1v126aBfgMfT/4wz2OuiCSnMEvqVCHpzODplIPz6Z72kVgAM8+jzyJEw2dF+GcK2W0fMfheoU5BJALEJp2AzgxJi8DhV7bscJerEJPzgC84ZvdoMUaaUt26BKS8mfQjKgsUFBVZZJlPtKb+qpyQE6gDkLAnl1QOv4TzwyOaGEgzJLW37InRQhCp5u6opPboQlPyaKncl2kX6B/xXSuUbuHM3jWTMWdWMR1CTrurP4OeLDSCkbODFbcA/djCxnhNKkXNaU+pZzUmFKiYOEGRWDddKRGHRA2wg5axXXZyP9pH0NjlKUCEBgBAws8V0/BXpAA19UE7pLdPUnV5tMQ9qcppX+J9BCOi7h+//xjtwaCDZoqjY0CSBgYdcrUIQohOz0JNiXa+q68t+3mn5+Q== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(136003)(346002)(39860400002)(376002)(46966006)(36840700001)(40470700004)(55016003)(16526019)(2906002)(1076003)(41300700001)(47076005)(82740400003)(40480700001)(70586007)(40460700003)(7696005)(8676002)(70206006)(82310400005)(316002)(83380400001)(6286002)(26005)(81166007)(4326008)(2616005)(336012)(36860700001)(8936002)(36756003)(54906003)(6916009)(186003)(86362001)(5660300002)(356005)(53546011)(966005)(478600001)(426003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:45.7379 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c471bc03-30af-43d3-aa92-08da535cfc2a 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT067.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5048 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/c72194a754339c9ce03b1ee109c48c19f63d8f06 Thanks. Xueming Li --- >From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 6 Apr 2022 14:57:01 +0800 Subject: [PATCH] net/hns3: remove unnecessary RSS switch Cc: Xueming Li [ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ] Whether the RSS is enabled depends on RTE_ETH_MQ_RX_RSS_FLAG and packet tuple are enabled. So the RSS switch is unnecessary. Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed") Fixes: fd8196838763 ("net/hns3: fix configuring device with RSS enabled") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 2 -- drivers/net/hns3/hns3_ethdev.h | 1 - drivers/net/hns3/hns3_ethdev_vf.c | 2 -- drivers/net/hns3/hns3_flow.c | 1 - drivers/net/hns3/hns3_rss.c | 3 --- 5 files changed, 9 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 8a19a77f81..ee436ff5ec 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2394,7 +2394,6 @@ hns3_dev_configure(struct rte_eth_dev *dev) if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; rss_conf = conf->rx_adv_conf.rss_conf; - hw->rss_dis_flag = false; if (rss_conf.rss_key == NULL) { rss_conf.rss_key = rss_cfg->key; rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE; @@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) hw->mac.media_type = cfg.media_type; hw->rss_size_max = cfg.rss_size_max; - hw->rss_dis_flag = false; memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN); hw->mac.phy_addr = cfg.phy_addr; hw->num_tx_desc = cfg.tqp_desc_num; diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 5717f54441..de0084c352 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -450,7 +450,6 @@ struct hns3_hw { /* The configuration info of RSS */ struct hns3_rss_conf rss_info; - bool rss_dis_flag; /* disable rss flag. true: disable, false: enable */ uint16_t rss_ind_tbl_size; uint16_t rss_key_size; diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index b0db01993b..c1cf7a8c60 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -816,7 +816,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) /* When RSS is not configured, redirect the packet queue 0 */ if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; - hw->rss_dis_flag = false; rss_conf = conf->rx_adv_conf.rss_conf; if (rss_conf.rss_key == NULL) { rss_conf.rss_key = rss_cfg->key; @@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw) int ret; hw->mac.media_type = HNS3_MEDIA_TYPE_NONE; - hw->rss_dis_flag = false; /* Get device capability */ ret = hns3vf_get_capability(hw); diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 3fbaa5f1c5..3d30070ee3 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw) ret = hns3_set_rss_tuple_by_rss_hf(hw, 0); if (ret) return ret; - hw->rss_dis_flag = true; return 0; } diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index e38de80eec..50c4f21da3 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -381,9 +381,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, uint8_t *key = rss_conf->rss_key; int ret; - 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); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.135612187 +0800 +++ 0040-net-hns3-remove-unnecessary-RSS-switch.patch 2022-06-21 15:37:49.034451240 +0800 @@ -1 +1 @@ -From ec1691494273ef4f9cb60ed24099196de1ce0cc4 Mon Sep 17 00:00:00 2001 +From c72194a754339c9ce03b1ee109c48c19f63d8f06 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ec1691494273ef4f9cb60ed24099196de1ce0cc4 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 4d5a595aab..0b565a5614 100644 +index 8a19a77f81..ee436ff5ec 100644 @@ -27,3 +29,3 @@ -@@ -2018,7 +2018,6 @@ hns3_dev_configure(struct rte_eth_dev *dev) - if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) { - conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; +@@ -2394,7 +2394,6 @@ hns3_dev_configure(struct rte_eth_dev *dev) + if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { + conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; @@ -32,4 +34,4 @@ - ret = hns3_dev_rss_hash_update(dev, &rss_conf); - if (ret) - goto cfg_err; -@@ -2824,7 +2823,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) + if (rss_conf.rss_key == NULL) { + rss_conf.rss_key = rss_cfg->key; + rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE; +@@ -3160,7 +3159,6 @@ hns3_get_board_configuration(struct hns3_hw *hw) @@ -42 +44 @@ - hw->dcb_info.num_pg = 1; + hw->num_tx_desc = cfg.tqp_desc_num; @@ -44 +46 @@ -index bb6ddd97ba..5e8a746514 100644 +index 5717f54441..de0084c352 100644 @@ -47 +49 @@ -@@ -526,7 +526,6 @@ struct hns3_hw { +@@ -450,7 +450,6 @@ struct hns3_hw { @@ -56 +58 @@ -index f641e0dc36..589de0ab3a 100644 +index b0db01993b..c1cf7a8c60 100644 @@ -59 +61 @@ -@@ -495,7 +495,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) +@@ -816,7 +816,6 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) @@ -61,2 +63,2 @@ - if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) { - conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; + if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) { + conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; @@ -65,3 +67,3 @@ - ret = hns3_dev_rss_hash_update(dev, &rss_conf); - if (ret) -@@ -997,7 +996,6 @@ hns3vf_get_configuration(struct hns3_hw *hw) + if (rss_conf.rss_key == NULL) { + rss_conf.rss_key = rss_cfg->key; +@@ -1395,7 +1394,6 @@ hns3vf_get_configuration(struct hns3_hw *hw) @@ -76 +78 @@ -index 317f91fc71..86ebbf69b6 100644 +index 3fbaa5f1c5..3d30070ee3 100644 @@ -79 +81 @@ -@@ -1449,7 +1449,6 @@ hns3_disable_rss(struct hns3_hw *hw) +@@ -1416,7 +1416,6 @@ hns3_disable_rss(struct hns3_hw *hw) @@ -88 +90 @@ -index e149c16bfe..d376486a1d 100644 +index e38de80eec..50c4f21da3 100644