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 105A541D44 for ; Mon, 27 Feb 2023 08:12:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B3C540A84; Mon, 27 Feb 2023 08:12:28 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 0DA7540ED6 for ; Mon, 27 Feb 2023 08:12:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L6QndQPLu18K7auOnFMOp+eW7T/to5mUCJVQGPkNygS3RgtjbA2sO7xER02219z/co9wIJc9T3pCN7fXnalkkNSxQ7CrIoCSX9gPaqDpMT6rqvd8vU6TARartbiH9DQFIU0Me1ft5VNowK+S0OOOlwS32G5ts+QhORZTcrAx7uJJkGL7DpL9T1twQxxrbKrMVBtPrKPHQbRxEZZbabQx1k4S+McG+0/2UOK6UZ85wQBo15RGO5AFyxgphOQmF/otKnDXhMxwXwwmQEGpNQrVUuGPSkCbu1ziLMNVAqijJiQIU+gqIk0VrVCv/ZNqszqBzu3pq3rj2V5PcTBrXE1Vjw== 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=+yOTQbXtvIGeDEMFLsClKWuzBaxmw/qyoT22dXn8E4w=; b=gEUOxccl4EdX22CF8+Hu+0M9DoMZMBQ4maCR/ROJJxwCyXDviFnIKHVRGi8e/1SfqM5anBjIEdURkE90IDq0ouFdgdc+hDMqr0ahYpzpTpfxAyZXXnvOU5rZi7NNJD9GqfZBXt2z0bVwKo9CGSGQmJaZo+s3oewH8qFH/KWvOWn5FzoitDwUdKiTFTVJWbothCDuepkzp/LzGKtfuO5OZ7nmObcQCV4xQopZMCfit2j/5aRVkiNWf9bMdUKmzI6KrlxRRoM/31xj1R4if37yRYhEYFvRaLrbmjSPNgBFfTmIJDQeBFGHdbwYImes4VtI6Y5K5gkZ/6hPp+hB/Znn9w== 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=+yOTQbXtvIGeDEMFLsClKWuzBaxmw/qyoT22dXn8E4w=; b=ogzAxiRM6QQWtyrdZQE1v1wWgMF7vxlVD6J0QloHtind60pnLnLTl0Z8mAWrerMGz5BymT6zIhKSFMwclCvhDR+oDIWAOvOWv31wSYW94N5mm8xj+mrxalSex50BbZRq2BhodVcvM4JiuRTghe3h56yRd/a0qlJurxwExvOkvGZTExnMGdicav7p7Y60Ch06iMTkBsf0cnvRlf+RV/v7T3zWnwpQ3Sep/AvftcbyNvxtPRrXM+QHKsgpbx6SneEdspPDlHPVaHalyKJ0Y1fSWnc/v4xtcnZwQwCBbM1wc9mWZt6BlzZ1C9FcyS217xgEo2aBxxBj+F7egCgxhxnWBQ== Received: from MN2PR20CA0014.namprd20.prod.outlook.com (2603:10b6:208:e8::27) by DM8PR12MB5448.namprd12.prod.outlook.com (2603:10b6:8:27::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.28; Mon, 27 Feb 2023 07:12:24 +0000 Received: from BL02EPF00010206.namprd05.prod.outlook.com (2603:10b6:208:e8:cafe::49) by MN2PR20CA0014.outlook.office365.com (2603:10b6:208:e8::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.28 via Frontend Transport; Mon, 27 Feb 2023 07:12:24 +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 BL02EPF00010206.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 07:12:23 +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.36; Sun, 26 Feb 2023 23:12:08 -0800 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, 26 Feb 2023 23:12:05 -0800 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: use RSS filter list to check duplicated rule' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:00:09 +0800 Message-ID: <20230227070107.15664-101-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00010206:EE_|DM8PR12MB5448:EE_ X-MS-Office365-Filtering-Correlation-Id: a8197563-0703-401c-930d-08db1891f92b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QQ06e+jdr4Cm1g+pIcBQNFfVxTj9M49j2ymNlMyLqB4e0Ezy/Y1UG2yvIhiIskpZYnWm9wtZjx7YEPrsqsImVqPP24I5ZoK5XFx03cJinF8X53VphmgaHp9J5/jqi6enFwCvP4lsNaXqkW9GTjPbBV6qhum38mrKxoQJy8/BPZCuL8PBtf18SevUdT5u7DhmcywFSAy9KHi+PKRBCQNm0xkGmXo5x+erEmKxRgntBMmx3NcOBuQaaHNhseCOc9aIyrgLuLfE0Sip6ROr2RO14dVxjcJe77gXB3e+iMF+1x3AWahEJmzO4UTstwK4q1U5OWj8oS1X8MrkXKfFHpYImmXC68BU45zqghsGnLnjK+rwiPQL6cmTWp826hajzsXsPX9H6/Q2NH43zTetX3LQ/KJX7k02CP323WJld74kMb09LWcxGp5PfXZBe4zxw0RvJZzIm9S5gYySt5915DaAmJz5kszGxkzHugkZgeNHaL7/U5mbljAKZVZIOzZ+p0wj08po9KHBX4PCDyUw9gzfdeLezxgvjLnujbEHvLHav5SlYnahz9QhbyTV7E9rW9G/xkuP8dA8APfasOvm1S+wcUzo3ziGpBsyKFriVq5aUm45Y8e2HabgHtF67P7vIt9GpEjmLknsbyell3s/YvN4O3LF/p3Qm857DUPA6eVZ/BYkBGv9dTAUaWA2Fijtej2LVwPvGIni1lisOPM7oI/9V66HpVtYs6m3PcB/w4ArpAixDlrXal+WzzU6qzRfDGXnj1w5TeiLcZrBP/ILzvu+gM0zVylPBVQ0FTOiRjnp8Vo= 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:(13230025)(4636009)(39860400002)(346002)(136003)(396003)(376002)(451199018)(36840700001)(46966006)(40470700004)(36756003)(40460700003)(316002)(54906003)(966005)(478600001)(5660300002)(2906002)(8936002)(7696005)(70586007)(70206006)(8676002)(6916009)(4326008)(41300700001)(7636003)(82740400003)(36860700001)(356005)(86362001)(55016003)(40480700001)(6286002)(186003)(26005)(16526019)(53546011)(83380400001)(1076003)(82310400005)(2616005)(336012)(426003)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:12:23.0888 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8197563-0703-401c-930d-08db1891f92b 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: BL02EPF00010206.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5448 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 03/01/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/commit/?h=22.11-staging&id=d45c8fe41594c5d7f35ec66e73201a7f62a4153d Thanks. Xueming Li --- >From d45c8fe41594c5d7f35ec66e73201a7f62a4153d Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 31 Jan 2023 21:02:56 +0800 Subject: [PATCH] net/hns3: use RSS filter list to check duplicated rule Cc: Xueming Li [ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ] All rules from user are saved in RSS filter list, so use RSS filter list to check duplicated rule. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index c338eab049..303275ae93 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1300,7 +1300,7 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, !memcmp(comp->key, with->key, with->key_len); return (func_is_same && rss_key_is_same && - comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) && + comp->types == with->types && comp->level == with->level && comp->queue_num == with->queue_num && !memcmp(comp->queue, with->queue, @@ -1596,15 +1596,7 @@ hns3_config_rss_filter(struct hns3_hw *hw, } /* Set hash algorithm and flow types by the user's config */ - ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf); - if (ret) - return ret; - - ret = hns3_rss_conf_copy(rss_info, &rss_flow_conf); - if (ret) - hns3_err(hw, "RSS config init fail(%d)", ret); - - return ret; + return hns3_hw_rss_hash_set(hw, &rss_flow_conf); } static int @@ -1676,17 +1668,32 @@ hns3_restore_filter(struct hns3_adapter *hns) return hns3_restore_rss_filter(hw); } +static bool +hns3_rss_action_is_dup(struct hns3_hw *hw, + const struct rte_flow_action_rss *act) +{ + struct hns3_rss_conf_ele *filter; + + TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) { + if (!filter->filter_info.valid) + continue; + + if (hns3_action_rss_same(&filter->filter_info.conf, act)) + return true; + } + + return false; +} + static int hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf, bool add) { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; - bool ret; - ret = hns3_action_rss_same(&hw->rss_info.conf, &conf->conf); - if (ret) { - hns3_err(hw, "Enter duplicate RSS configuration : %d", ret); + if (hns3_rss_action_is_dup(hw, &conf->conf)) { + hns3_err(hw, "duplicate RSS configuration"); return -EINVAL; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:44.156250400 +0800 +++ 0102-net-hns3-use-RSS-filter-list-to-check-duplicated-rul.patch 2023-02-27 14:08:40.839237000 +0800 @@ -1 +1 @@ -From 6afde23d843ecf67453eaf69924bd79873f6f207 Mon Sep 17 00:00:00 2001 +From d45c8fe41594c5d7f35ec66e73201a7f62a4153d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6afde23d843ecf67453eaf69924bd79873f6f207 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 5711757684..4cca675c53 100644 +index c338eab049..303275ae93 100644