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 26603428F8 for ; Sun, 9 Apr 2023 17:32:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2027040EDE; Sun, 9 Apr 2023 17:32:55 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by mails.dpdk.org (Postfix) with ESMTP id 412C240A80 for ; Sun, 9 Apr 2023 17:32:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXJbet0UvmeJRjAh7fqhS0XwcdURjMEghKG4OZGz/9cenPk08lr1P8bgvyg1gdtZ55tRvGgb1iRivmoquYn7+TlaAgyrDUbz/AmwX/unS5z+0xeER5JUEmDxIVnm8hQDHpfRLUctDQtKNgBVsFld/ZVneiVgFawrHOF6Y/gmsOSxgHITPAbxUmJZxqp4qzhiCWhc3U/q6RAiLXUI6d+YETzrM9c/6HRRlVmi1EQ6SkB0cAmt6gOmkwfqpjDkeszOyhC9O21T5PtB6f2WUyb7M4Ckf/yJepKv+iDoaoA7ZUHp77G633n2pVA3bMjEWXA+TmJLPfkAn4HYpNorGCxkSQ== 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=wGRnPQl4XrSZpV0isvZ4+350vi41twLlRk623zBmnuU=; b=nZNf+spAj8zsrqwAvl6lQrgRogfPBNYWliJWAf0xOGEXUkhGUsIxLuyvdyI7nSU8yKUPwtPBZTvm8oyFWVTFjQ4tWF9BpNiXkgJ5Vr0uC7b1RUTdiZA2tr1Egw+Gp8WT7WODZ44roE57LS32tFqPlX3+JdTpy+0YL5uoV7q1et/XgxmVmZOPV8KvKHwkWl5S9H9kPToOSQfJI+SPFsPhdeqd6QVBv5WlVv3qjTXUxjuwmn+ejO7SFPNFE/3xVS9tPBz0JWFwIqeENi1dGhBg2/cQuH5NJKEpM99rd0EaLTffDV2RpcAaC2jhXUIV3OWGODAiqP58RIkhg+CjP8/0gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=wGRnPQl4XrSZpV0isvZ4+350vi41twLlRk623zBmnuU=; b=Aa2gHAkuqfQ3dtPbNtItOVRiIj0m5PdB/Um/O4GQtskfd32/GN0Mk/1rW97YgkWd9GuErDgdRgryopaqqzn26Aw2MTZU3nAblREtfLGYJ5zcKC7I9zeYw6B0igob8WMqq6nQ2/SW2FBThnrWp3jj1S44Zlmj+SLxxDLbpFPEygqOqXImTt7KeBoJWQzUbyDU2vUBE3YZlVom9n4OFA9cjDCmQXBttC7v9Zq5F0IFmEYPxRgTrSX/pjl30nXc/jYuwdcukr2poJNSZlq0/vPQpLXUPOcF3h424rZm3XtfNwJq+luVv1j3ATeIoxziavtK5lxWyOkl0O45iwwGaBumOQ== Received: from BN9PR03CA0989.namprd03.prod.outlook.com (2603:10b6:408:109::34) by DM4PR12MB6590.namprd12.prod.outlook.com (2603:10b6:8:8f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Sun, 9 Apr 2023 15:32:51 +0000 Received: from BN8NAM11FT097.eop-nam11.prod.protection.outlook.com (2603:10b6:408:109:cafe::b1) by BN9PR03CA0989.outlook.office365.com (2603:10b6:408:109::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:32:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT097.mail.protection.outlook.com (10.13.176.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.20 via Frontend Transport; Sun, 9 Apr 2023 15:32:49 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) 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:35 -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:34 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: separate setting and clearing RSS rule' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:29 +0800 Message-ID: <20230409152529.5308-82-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: BN8NAM11FT097:EE_|DM4PR12MB6590:EE_ X-MS-Office365-Filtering-Correlation-Id: 7be8a9e2-edcf-446f-fa84-08db390fad88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hkI8QpZTkv1yfhPIMzH6qHuqQgb5Cbg6cAfIooRw2amXvS6AImLPd8tfLeL4/39O2e/Ha6F98qbHm8vnAhrG08pOOo0g0T+c34IeXQzoz+l9mZWvsyEf8NRvfSo4Mfif+CDCvpW/J/oiZ0TPhWB3GVxfefrDHP2yaIyRETZDJ/CvHjTXBEgKIhyjqj0pZYDCDOlT41zwL6/CHKk53JEEefT6gE1dpjIiofSs1CJGrEwOUvm5knX7emvpCDHh3tnMFkrobMDwW+QHFrHLO5Q6QjLBL3t3PaTciEL0pdpE6rGDRw95HvxzhWh6VKcZ0d3lE24BURvsdyCV3c74bEsMTO7SaphdpxXeB5FhR3NaZ4+0e4ICsbdHVfxCsSz8Z3DcEJWfKC7FGC4dBEawAdsTr4fpO1JqOFgTZMmKk3PQqKWOFBrCY/u/G81EllfLyAR5jORaEQdjraluM5SLrX2EGZeIQXvDDgkIGENN503722BS8IUcU8kM+XRRIc2MDzfC5294sLZQ92Bh2f8jDg50S3oeCTNJKGgB/GJkBfCDkoV3j4Tvm2zRxMKd6KorykR3WgEU4IOMRx+NOTwTmnPVu98j38l5x45HN7/VFs/umk1lbgpHgcwhLbb8YnhuT/HOBqdp45VF5iPTKqvqYE8Swmdgmo6yCHD1NiA264lP+ptEwRcEt4SYcQWKFGS0bwUmtSWnYel4d8XkrLUTOrgskzC2oHqyWbshtPxGcpCzLaZOJ6swkX0/1PgV+PC9uKT3P8kenneHNj1cAfq8KMZ1JDNXVNdLAVN6hXGtcD9PJ5dO62B4lSQMRBSBSCwV/aMSZGC6QFFB1gxgyJqcd/AB7Q== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199021)(36840700001)(40470700004)(46966006)(478600001)(7696005)(6666004)(54906003)(316002)(1076003)(26005)(53546011)(16526019)(6286002)(186003)(966005)(2906002)(70586007)(70206006)(8676002)(6916009)(4326008)(41300700001)(8936002)(5660300002)(82310400005)(356005)(82740400003)(7636003)(86362001)(55016003)(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:49.9754 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7be8a9e2-edcf-446f-fa84-08db390fad88 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT097.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6590 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/a2804bcc0c88c29a509bf72ce063eac2537e4e05 Thanks. Xueming Li --- >From a2804bcc0c88c29a509bf72ce063eac2537e4e05 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:12 +0800 Subject: [PATCH] net/hns3: separate setting and clearing RSS rule Cc: Xueming Li [ upstream commit 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 ] Separate the setting and clearing of RSS rule. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 46 +++++++++++++++++------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 9e51891bd9..80dda63afe 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1535,8 +1535,22 @@ hns3_update_indir_table(struct hns3_hw *hw, } static int -hns3_config_rss_filter(struct hns3_hw *hw, - const struct hns3_rss_conf *conf, bool add) +hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) +{ + int ret; + + if (!conf->valid) + return 0; + + ret = hns3_disable_rss(hw); + if (ret) + hns3_err(hw, "RSS disable failed(%d)", ret); + + return ret; +} + +static int +hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) { uint64_t flow_types; uint16_t num; @@ -1553,19 +1567,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, .queue = conf->conf.queue, }; - if (!add) { - if (!conf->valid) - return 0; - - ret = hns3_disable_rss(hw); - if (ret) { - hns3_err(hw, "RSS disable failed(%d)", ret); - return ret; - } - - return 0; - } - /* 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) @@ -1606,8 +1607,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev) rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list); while (rss_filter_ptr) { TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries); - ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, - false); + ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info); if (ret) rss_rule_fail_cnt++; else @@ -1636,7 +1636,7 @@ hns3_restore_rss_filter(struct hns3_hw *hw) if (!filter->filter_info.valid) continue; - ret = hns3_config_rss_filter(hw, &filter->filter_info, true); + ret = hns3_config_rss_filter(hw, &filter->filter_info); if (ret != 0) { hns3_err(hw, "restore RSS filter failed, ret=%d", ret); goto out; @@ -1680,8 +1680,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, bool add) +hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf) { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; @@ -1691,7 +1690,7 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev, return -EINVAL; } - return hns3_config_rss_filter(hw, conf, add); + return hns3_config_rss_filter(hw, conf); } static int @@ -1778,7 +1777,7 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev, } } - ret = hns3_flow_parse_rss(dev, new_conf, true); + ret = hns3_flow_parse_rss(dev, new_conf); if (ret != 0) { rte_free(rss_filter_ptr); return ret; @@ -1961,8 +1960,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, break; case RTE_ETH_FILTER_HASH: rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule; - ret = hns3_config_rss_filter(hw, &rss_filter_ptr->filter_info, - false); + ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info); if (ret) return rte_flow_error_set(error, EIO, RTE_FLOW_ERROR_TYPE_HANDLE, -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.850079600 +0800 +++ 0081-net-hns3-separate-setting-and-clearing-RSS-rule.patch 2023-04-09 21:45:38.699042200 +0800 @@ -1 +1 @@ -From 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 Mon Sep 17 00:00:00 2001 +From a2804bcc0c88c29a509bf72ce063eac2537e4e05 Mon Sep 17 00:00:00 2001 @@ -4,0 +5 @@ +Cc: Xueming Li @@ -6 +7 @@ -Separate the setting and clearing of RSS rule. +[ upstream commit 1c3aeb2be4b8ef8b18846883ebbb9320f62cf097 ] @@ -8 +9 @@ -Cc: stable@dpdk.org +Separate the setting and clearing of RSS rule. @@ -17 +18 @@ -index 21e00e515e..4da98d7adc 100644 +index 9e51891bd9..80dda63afe 100644