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 1DF4E428F8 for ; Sun, 9 Apr 2023 17:33:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14132427EE; Sun, 9 Apr 2023 17:33:10 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2083.outbound.protection.outlook.com [40.107.243.83]) by mails.dpdk.org (Postfix) with ESMTP id D632A40EDE for ; Sun, 9 Apr 2023 17:33:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BlQAKuudHzSaoSBBZUhErbNi8kknUvZ4fzkj+aE39CsvmzFgIGTibTtWAlg7HfmQFjFMZ/fpyI2bCNmHABPncAIi6xfz1zEgfaqMJrOafT4ZbFDUFTQpYLiQfSCTqErYLgNxpkzIn4kWUgc8ffPqMnpQuQbMtyxK1sfgl2VeYs9EQwE7Syg6UcBHLfA1u8oPtPUORGY0XQHcDZp7Zkn4PYhVv3v5tF1AfZ0StsRBI/ViQnOhZql0NbYwaq+aVwPw64F8debenb9RZN+Zx1jkAGA5VuhFEWUyAfm5BfpQ1siKPXXY+CobJFVz45CNDFWie50E7bDUCbCZTcnhanmUBg== 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=uTDU1L0ppRz4iyuJpDqYpImyKBsEoDmuc+yc9ybKi0w=; b=O1ga9VHxLcuHLIWjPqlsz4vo/ePv/l/WdYYmuUYngPZBcI/TnCtjz3eUDxYJUz5B30ckRZRKKDL20mFjhKawp3CQiEFg2khu/eOyvIYxhVa9E59EBS/i2eDi2O35tU6U9nQfV4qkm4tKuF0HkYjB97UOAqy2YQOXkB2+BqG7Amc8JLtIGtEiwP8/YKaGVxCfiwxDA2ePdo+CjJrTYtuW4VQpj6ZsCg2258IdNLH7palAwt1IskfjP8NLq2IAOebKoHlTAYa053PnhEe3mfvFNhkjM9IJl9ZHbeDzNc7GquaxJd6xSBDrnV4lwTturL+MovUPyIM5iUCG616md0GStQ== 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=uTDU1L0ppRz4iyuJpDqYpImyKBsEoDmuc+yc9ybKi0w=; b=tyyUWThjq/R6+6eUXpsU23JJojWW33K9fMAp3PEJzloRfEYbvCmXFznob/Stf4hBAGkvQJu+LfCwOmcW7XZcD7LpV5XnqBudNf6WFS5OtW9SEj+dZc1zf4T9p/XFVVqa6WrnSeZ8LN2ZBrI0E42kHwGad0fwXkRvq3vzfIWFnH9hSvQChdNNjA+wKMV/VeBCRu03/gvU3DFCbkp9lhHabnZ9PLdP1O51sAD2DMW8eueKi8z/777G3AA51vE07VW6Q21p1wCmLflqce4UiUIfTRAQX1kERWNxN10f8p0DgwPm7DXpA/NTtCgCKW0BMCTgaIyJY3pq3bUxEJ5ediUOfw== Received: from BN9PR03CA0437.namprd03.prod.outlook.com (2603:10b6:408:113::22) by SJ2PR12MB8808.namprd12.prod.outlook.com (2603:10b6:a03:4d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.30; Sun, 9 Apr 2023 15:33:07 +0000 Received: from BN8NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:408:113:cafe::d8) by BN9PR03CA0437.outlook.office365.com (2603:10b6:408:113::22) 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:33:06 +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 BN8NAM11FT028.mail.protection.outlook.com (10.13.176.225) 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:33:05 +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:59 -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:57 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: separate flow RSS config from RSS conf' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:33 +0800 Message-ID: <20230409152529.5308-86-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: BN8NAM11FT028:EE_|SJ2PR12MB8808:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a582702-52e0-4ca7-7087-08db390fb6ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xaEA2fIbe8u6i9lZ0/CcpfLtT+rnVtKBn80yI6f73mLZNgwMv+dMAVp8uLv0Apu6HgZ/3Zg5OumeJV8jvnOjweARoxFtrrVTKxdfEf6X0Ktjq7Sfxsy8Nw7bHUeBp4L4pf8YFQkmP1jhqq/E9SBazksrqHKqm8OeH+aBWne3IBXHWELeZxrkQ1ZdzamqndoMSh4ZlAzeMRsec88eHGN3MWZYhHta+EwD0xeYkMNc1vlgQ4BJb835ce+QiM3VbArGIuhh4RH1vha5uQpIsbqAX0y/AVCfakmaK7RZcNJ7yrpaJb+UUmDFF6zPnEP5rdoceGHdILd7J3E2a9J/VriVpvkk4RLzboiGFz//rx+kdyt6EREAAAptF1DdIeThuQ8k6PXtmHGRC2WQTv9L5OL0JHzS4NbBt077HeJE/avElPNtEZ0wiDGSesVoWdRr1JuzBDpmz9fwB4uDsKcB3Of6ZCNng5UAtutBIgjRhPc8iXvxsoTyMw47I+Q5uBmAhkAa8C/uSFxNopqIocHjy+3ZaSaWcWpP8o8aL+qbgWfjcKFOs7cjrk3sOzU0qSzRS0RrS6yhVnzuATezeeNspCmjZB1NQc3yP7bRqiASNZbiQHXCq0OkoAps3sZDyygXTtQrQiajY/vg54YDvgui/J2NzikTjjrZ56WclzAX9XUSa07RPdWjbzwJnf3vliy0gD3F3caG0Xt6nTg3wpsAAt08rOmVDi2Mbj8AalncrzCAmsJKTqbORKaBHLnApeQsWQlq43bwzO6PzOl2mwbimrmeno+tEoNSJVbuz0HhTp0TpXG41dhCUD5UklZ+m6l0RBubnB6jcTLKSGJDpLBn68u+RjG+kuoQJWXd4gKc9gTqVN4= 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)(376002)(136003)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(1076003)(356005)(7636003)(5660300002)(53546011)(966005)(7696005)(2616005)(26005)(82740400003)(47076005)(6286002)(16526019)(426003)(336012)(36860700001)(2906002)(186003)(6666004)(36756003)(54906003)(83380400001)(40460700003)(86362001)(55016003)(316002)(478600001)(8676002)(41300700001)(8936002)(82310400005)(4326008)(40480700001)(70586007)(6916009)(70206006)(20673002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:33:05.7267 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a582702-52e0-4ca7-7087-08db390fb6ec 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: BN8NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8808 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/7307f965753b81d990afab475900ff1922f2269e Thanks. Xueming Li --- >From 7307f965753b81d990afab475900ff1922f2269e Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:16 +0800 Subject: [PATCH] net/hns3: separate flow RSS config from RSS conf Cc: Xueming Li [ upstream commit b93ad0cc7677881911e5fc3baa89e0a0bbd73c48 ] Some RSS fields in struct hns3_rss_conf (e.g. conf, queue, valid) are only used when create RSS flow rule, which is unnecessary for RSS configuration information from ethdev ops. This patch removes these fields from hns3_rss_conf and add a new struct hns3_flow_rss_conf as rte flow RSS filter list node element. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 23 ++++++++++++----------- drivers/net/hns3/hns3_flow.h | 10 +++++++++- drivers/net/hns3/hns3_rss.h | 5 ----- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index f073adebb6..b1189455ec 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1359,7 +1359,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev, { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; - struct hns3_rss_conf *rss_conf = &hw->rss_info; const struct rte_flow_action_rss *rss; const struct rte_flow_action *act; uint32_t act_index = 0; @@ -1374,7 +1373,7 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev, act, "no valid queues"); } - if (rss->queue_num > RTE_DIM(rss_conf->queue)) + if (rss->queue_num > HNS3_RSS_QUEUES_BUFFER_NUM) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION_CONF, act, "queue number configured exceeds " @@ -1439,7 +1438,7 @@ hns3_disable_rss(struct hns3_hw *hw) } static int -hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_rss_conf *rss_conf, +hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_flow_rss_conf *rss_conf, uint8_t *hash_algo) { const uint8_t hash_func_map[] = { @@ -1466,8 +1465,8 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_rss_conf *rss_conf, * rte_flow_hash_algo) when this rule is delivered. */ if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) && - *hash_algo != rss_conf->rte_flow_hash_algo) - *hash_algo = rss_conf->rte_flow_hash_algo; + *hash_algo != rss_conf->hash_algo) + *hash_algo = rss_conf->hash_algo; return 0; } @@ -1478,7 +1477,7 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_rss_conf *rss_conf, } static int -hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_rss_conf *conf) +hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_flow_rss_conf *conf) { struct rte_flow_action_rss *rss_config = &conf->conf; uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0}; @@ -1503,7 +1502,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_rss_conf *conf) hw->rss_key_size); if (ret) return ret; - conf->rte_flow_hash_algo = hash_algo; + conf->hash_algo = hash_algo; /* Filter the unsupported flow types */ flow_types = rss_config->types ? @@ -1545,7 +1544,8 @@ hns3_update_indir_table(struct hns3_hw *hw, } static int -hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) +hns3_reset_rss_filter(struct hns3_hw *hw, + const struct hns3_flow_rss_conf *conf) { int ret; @@ -1560,7 +1560,7 @@ hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf) } static int -hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf) +hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_flow_rss_conf *conf) { struct rte_flow_action_rss *rss_act; uint16_t num; @@ -1669,7 +1669,8 @@ hns3_rss_action_is_dup(struct hns3_hw *hw, } static int -hns3_flow_parse_rss(struct rte_eth_dev *dev, struct hns3_rss_conf *conf) +hns3_flow_parse_rss(struct rte_eth_dev *dev, + struct hns3_flow_rss_conf *conf) { struct hns3_adapter *hns = dev->data->dev_private; struct hns3_hw *hw = &hns->hw; @@ -1739,8 +1740,8 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev, struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); const struct rte_flow_action_rss *rss_act; struct hns3_rss_conf_ele *rss_filter_ptr; + struct hns3_flow_rss_conf *new_conf; struct hns3_rss_conf_ele *filter_ptr; - struct hns3_rss_conf *new_conf; int ret; rss_filter_ptr = rte_zmalloc("hns3 rss filter", diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h index e4b2fdf2e6..90126f2b6e 100644 --- a/drivers/net/hns3/hns3_flow.h +++ b/drivers/net/hns3/hns3_flow.h @@ -24,10 +24,18 @@ struct rte_flow { uint32_t counter_id; }; +struct hns3_flow_rss_conf { + struct rte_flow_action_rss conf; + uint8_t hash_algo; + uint8_t key[HNS3_RSS_KEY_SIZE_MAX]; /* Hash key */ + uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */ + bool valid; /* check if RSS rule is valid */ +}; + /* rss filter list structure */ struct hns3_rss_conf_ele { TAILQ_ENTRY(hns3_rss_conf_ele) entries; - struct hns3_rss_conf filter_info; + struct hns3_flow_rss_conf filter_info; }; /* hns3_flow memory list structure */ diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index cc0bb8431d..d19730c69c 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -40,15 +40,10 @@ /* Same as the Max queue num under TC */ #define HNS3_RSS_QUEUES_BUFFER_NUM 512 struct hns3_rss_conf { - /* RSS parameters :algorithm, flow_types, key, queue */ - struct rte_flow_action_rss conf; uint64_t rss_hf; uint8_t hash_algo; /* hash function type defined by hardware */ - uint8_t rte_flow_hash_algo; uint8_t key[HNS3_RSS_KEY_SIZE_MAX]; /* Hash key */ uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX]; - uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */ - bool valid; /* check if RSS rule is valid */ /* * For IPv6 SCTP packets type, check whether the NIC hardware support * RSS hash using the src/dst port as the input tuple. For Kunpeng920 -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.946049800 +0800 +++ 0085-net-hns3-separate-flow-RSS-config-from-RSS-conf.patch 2023-04-09 21:45:38.699042200 +0800 @@ -1 +1 @@ -From b93ad0cc7677881911e5fc3baa89e0a0bbd73c48 Mon Sep 17 00:00:00 2001 +From 7307f965753b81d990afab475900ff1922f2269e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b93ad0cc7677881911e5fc3baa89e0a0bbd73c48 ] @@ -13,2 +15,0 @@ -Cc: stable@dpdk.org - @@ -24 +25 @@ -index 527874df44..89374816aa 100644 +index f073adebb6..b1189455ec 100644