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 B8633428F8 for ; Sun, 9 Apr 2023 17:32:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B277542B8E; Sun, 9 Apr 2023 17:32:48 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2057.outbound.protection.outlook.com [40.107.95.57]) by mails.dpdk.org (Postfix) with ESMTP id 6C68F40A80 for ; Sun, 9 Apr 2023 17:32:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4vOZXd60gPeuqRPqgJZQrP1gtB+l7Q+mae6K1WyEjpv59fnjrlE0XlAf7wrKauD2gXGUT4glFjsD7Hm/OAhmU02sVBWFr5/T7228c+5Dpuwa/pSBsgafasKze3XXt13lQTjGgqluyOx55Lddy3ratS9pXcryH9qXEyJe4harOFR1FlXKDZaMOwvuTw2f1bq4b9iwffN5VJdoar63hF2tFDetbBu4a/bwcqwfmdAgYUY4EP2jOZgMi5B1FUxCMtfRgP78GnUwKT/Udrq0vf0gRDvxfxZ+JktgNDAlsVlBVPhrtVC1YktbF2tE0pbLvOQ/0NOCWl4NNMvNrWVp7UMmg== 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=btCzh1yVQswz9bg3LXMrTsqxHqepwJMzJt8ONpPz/3w=; b=fbtU3OGxG2pPxcY1Bkv9H8qa1g7c2j6XneGNE3UojZZ8Mu6JH+gWj+KuFwJNJWLeJEBhtwjOWM4AlhOEmSg0a+uCnD505cF/yUyDOlNmgvcQGpKftTiYt52ONvvEYOorYybazSc408gnnJRs9/8tTLTY9Amjk6DqZIDaWlgSdSj+MsN1DZptT8iHglEwCIgjfIJdiCVb+XQ5QVynXGkSVA0Hs6rWHvae2DvuMvFLno2kaY+PyAlpQm/EDBSCvQWjQsnI0s4J4khrKyvZe8k53ZAZyYW2l8SDuCm0GDW7KtdBqffznfBLUsHBIHsDARWfkwsiLU7+Vvm1TOfIMYEevQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.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=btCzh1yVQswz9bg3LXMrTsqxHqepwJMzJt8ONpPz/3w=; b=sXa9UL333hbk2y1yYmDjr8Iwq6AjV7F17MgUOu1k1CKKEDIQvVfmBvBi7qH9a3zlW6gMG9sON6/qq3Jwwzvv+mSkDp/c7h5GkZ2xNvODTkvj6yifRZ2cgicAXlQpygsgcl1W1OS+jUFY87jDTVsyioWOxEKHZbJtrqIVpmtrRp7EUz45MoVtqZGanm6kdChyahg3aylpzvvsvWbm7/s3jFHn12xbyl3WV1Jj0A521jZinzfGmSOgImmdSj2w8UwkjCJAcyiIbhSVsX+Tq5U+4J3No5/4Ww6dzc09rLkqUOHc70cBx5DgNOW5HVGeQkKIGRFj2W3OEnIewNF+iIHU6w== Received: from MW4PR03CA0256.namprd03.prod.outlook.com (2603:10b6:303:b4::21) by MW4PR12MB7312.namprd12.prod.outlook.com (2603:10b6:303:21a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Sun, 9 Apr 2023 15:32:44 +0000 Received: from CO1NAM11FT079.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b4:cafe::73) by MW4PR03CA0256.outlook.office365.com (2603:10b6:303:b4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.39 via Frontend Transport; Sun, 9 Apr 2023 15:32:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT079.mail.protection.outlook.com (10.13.175.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:32:43 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:32:37 -0700 Received: from nvidia.com (10.126.230.37) 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.37; Sun, 9 Apr 2023 08:32:35 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: use new RSS rule to configure hardware' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:30 +0800 Message-ID: <20230409152529.5308-83-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT079:EE_|MW4PR12MB7312:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b1d7cc8-c3fd-448f-7e39-08db390fa9af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zv+cUOiKNeRK5/70aUcx7b6LoSwZUsxAXzt9kJO+l9yepJ4e+ud0BrhCXQJGfLbX+gM1HPYFFJUbUldiS6VBJcx3M2DhJQ9yljUIn+O+kU0ijH2Cf/YRx7yuHZfYsWO8f4Vu+juE2eLsU/+Rnp5CKWB7h1ogdt8WcyTmcPxoZhhFI8Af/z+WDp9nFtF2uyQRcmokxfPTgPnHPdRdkBpHLuLEHgwhlFW/BdCjmweYEHQHtXwNP5tPGkCQ9F+GNWyKMyZ0o90InftM7sx+pvSsEOGO7nT4nq9B1uJpco4aN9GfoqMrLGm5MjKXvoZpG9Vab5MiT3YBhAWWwoCYbV9MPmoB3ocWPOI8tJgYCk5ppL1aB9JyzebY9jY1ZRE0LlIOsDeCStLxaWNUrTf+FMtLxcmmcDIJVXDG95ldna+JkEylxBNuQ2Jm5nPCG1TmaWsA617mKGeFbtsyLVVGi9JZR7RCVEzAn2OXV2NQ4oVFDG+2PM3XP1ufXoGnKidezwudCVusN0H5yj3CapBHx3xELRPbE7+TFwmWW846G5ghQQq+RODfQDhMtkfWDjMUuydTnfvNQpBqf5UnSb44fYPrQCf3xcj7DjXzMiZ4djBkr7990IPJWTOHz63igRh+jadtoimkRYzKv5SAYkJxCsk53YYBJDGdxLu7d8QDl3irsvEHYcfWheBB71mVWmLvPiU1i1ZcY4yoDFehlsH8tAFYkoMtbNOt2LUvz25n+xkkG+F0iE67f8oTHzRW3aFxm26PdsEVN4Org5c6Pc+lDcLveySVtlMeNOq2U4STev7V/WsRyeW+0jIGpTQb/6uFPirIXpeKmBzP6IJl5m7BKvD6og== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199021)(40470700004)(36840700001)(46966006)(478600001)(7696005)(54906003)(316002)(53546011)(1076003)(26005)(16526019)(6286002)(186003)(6666004)(966005)(2906002)(4326008)(70586007)(70206006)(5660300002)(8676002)(6916009)(41300700001)(8936002)(82310400005)(7636003)(356005)(82740400003)(55016003)(86362001)(40480700001)(36756003)(40460700003)(47076005)(83380400001)(2616005)(426003)(336012)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:32:43.6263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b1d7cc8-c3fd-448f-7e39-08db390fa9af X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT079.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7312 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 22.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 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/fc620e6832269de904be747ec52a1b0f12d58bb8 Thanks. Xueming Li --- >From fc620e6832269de904be747ec52a1b0f12d58bb8 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:13 +0800 Subject: [PATCH] net/hns3: use new RSS rule to configure hardware Cc: Xueming Li [ upstream commit 218a119a08e01f203f92b46334b6b2f03ff9765d ] Remove redundant assignment and directly use new RSS rule to configure hardware. Additionally, considering that the new rule configuration may need to be modified, the 'const' of input parameter about it is removed. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 52 ++++++++++++++---------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 80dda63afe..3ac5279538 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1482,6 +1482,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) { uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0}; bool use_default_key = false; + uint64_t flow_types; uint8_t hash_algo; int ret; @@ -1501,10 +1502,18 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) hw->rss_key_size); if (ret) return ret; - hw->rss_info.rte_flow_hash_algo = hash_algo; - ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types); + /* Filter the unsupported flow types */ + flow_types = rss_config->types ? + rss_config->types & HNS3_ETH_RSS_SUPPORT : + hw->rss_info.rss_hf; + if (flow_types != rss_config->types) + hns3_warn(hw, "modified RSS types based on hardware support," + " requested:0x%" PRIx64 " configured:0x%" PRIx64, + rss_config->types, flow_types); + + ret = hns3_set_rss_tuple_by_rss_hf(hw, flow_types); if (ret) hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret); @@ -1550,48 +1559,27 @@ hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) } static int -hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) +hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf) { - uint64_t flow_types; + struct rte_flow_action_rss *rss_act; uint16_t num; int ret; - struct rte_flow_action_rss rss_flow_conf = { - .func = conf->conf.func, - .level = conf->conf.level, - .types = conf->conf.types, - .key_len = conf->conf.key_len, - .queue_num = conf->conf.queue_num, - .key = conf->conf.key_len ? - (void *)(uintptr_t)conf->conf.key : NULL, - .queue = conf->conf.queue, - }; - + rss_act = &conf->conf; /* Set rx queues to use */ - num = RTE_MIN(hw->data->nb_rx_queues, rss_flow_conf.queue_num); - if (rss_flow_conf.queue_num > num) + num = RTE_MIN(hw->data->nb_rx_queues, rss_act->queue_num); + if (rss_act->queue_num > num) hns3_warn(hw, "Config queue numbers %u are beyond the scope of truncated", - rss_flow_conf.queue_num); + rss_act->queue_num); hns3_info(hw, "Max of contiguous %u PF queues are configured", num); if (num) { - ret = hns3_update_indir_table(hw, &rss_flow_conf, num); + ret = hns3_update_indir_table(hw, rss_act, num); if (ret) return ret; } - /* Filter the unsupported flow types */ - flow_types = conf->conf.types ? - rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT : - hw->rss_info.rss_hf; - if (flow_types != rss_flow_conf.types) - hns3_warn(hw, "modified RSS types based on hardware support," - " requested:0x%" PRIx64 " configured:0x%" PRIx64, - rss_flow_conf.types, flow_types); - /* Update the useful flow types */ - rss_flow_conf.types = flow_types; - /* Set hash algorithm and flow types by the user's config */ - return hns3_hw_rss_hash_set(hw, &rss_flow_conf); + return hns3_hw_rss_hash_set(hw, rss_act); } static int @@ -1680,7 +1668,7 @@ hns3_rss_action_is_dup(struct hns3_hw *hw, } static int -hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf) +hns3_flow_parse_rss(struct rte_eth_dev *dev, struct hns3_rss_conf *conf) { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.871733600 +0800 +++ 0082-net-hns3-use-new-RSS-rule-to-configure-hardware.patch 2023-04-09 21:45:38.699042200 +0800 @@ -1 +1 @@ -From 218a119a08e01f203f92b46334b6b2f03ff9765d Mon Sep 17 00:00:00 2001 +From fc620e6832269de904be747ec52a1b0f12d58bb8 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 218a119a08e01f203f92b46334b6b2f03ff9765d ] @@ -10,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -19 +20 @@ -index 4da98d7adc..3700d073b1 100644 +index 80dda63afe..3ac5279538 100644