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 00D9F43E57 for ; Sat, 13 Apr 2024 14:59:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF45340E68; Sat, 13 Apr 2024 14:59:40 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2069.outbound.protection.outlook.com [40.107.223.69]) by mails.dpdk.org (Postfix) with ESMTP id 515CD40294 for ; Sat, 13 Apr 2024 14:59:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jQuyOI6nyhQAJUnb+3aVCvwz+NbYX7oOnKE2paaKmu1mpNcaaFhSih3MahYAPpFnVLfPL7cn8PbAlN5zc643fYq88PESHj/T9JMdpbDa/lh0jW7ECVwuutwtEgJOiF1NWqNz4Q+klfgIIUSkSJDHPiBbTiHlm2ABM072azgUztncWrqooK4+zw25ie7hceAaZ+nMlSHjZEm2pwZSUB2Rv/JkNmnZXLx7LPWWqQx4gYSyX/Q88U/0VQW9PJNd/KE5Cfhu7te+7wsI/063w9evUXMFl5YNtFq6NfDSSDTFNqA1nH6lBp+F9zpms5+j9rlzV0zSTGEMy01xcM6kqJJaGg== 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=hJyvyHCkw3KdTELgxvYrR7dljGGsWmrl8kU5dGG1rE8=; b=Ha2PDCmndP8WL9xQb6uC2oUJLu6YWq/u1Lz4PJonNdOGu/CCZWVN0IYbsm8IXJOByfayg9XlGM9BFdPmiDw5hlTxpbu+bOOJTjVFyj2hBZduhOG4QJJaDkA8fS07/ZbnfvqlBWTe6FW930N4sNqjCuXx7nFDZEbrqzFFK39IDrTr451wdo7fFZDcbi8JCM6z9uToaENMthYrC38+gdlohs10rgkekFTFl5SJpjU7oFAHewGC1bZeqSrcg7khpPrlBkpb297cPGj74mM4ZmdXbFu9tu1fTxvOs+udlLOENXEDkJlc4ZaJQcOjWK2MX2C5CwyVeM3AnU1cz5t33UOdxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=hJyvyHCkw3KdTELgxvYrR7dljGGsWmrl8kU5dGG1rE8=; b=PBtf5fS0aJNwf/5VMgsIcgx53T6Hop1GxLVbG5YUx2fKN+TMooBprb8ZVVb/n+HYKE/Qwu/DteFgDtYzSvdTM2pz/Q1lv956/3dmuK7NYEeOgfTsGP9J5MFrlPzg8eEt9YwyniwF90pP+xPrFw0TQ8hxBxMbuEMo3ZniQwrPp+uqMj9WU/oUK5I899dw+WpmKfa3BSGYpFWyh5BrbHQ7PBdJWcyB613ezF43FTqNEsDSsJZnTinaf5OcDsmoQqJ737azOCYp84KYjQ3gZFqbaMK1CT+vwxsF8Uw/0sPs+HaedEiFbtf+7hh0k/m9NHyqpAfRB2l3nWAPMdTLnCaTcQ== Received: from MW4PR03CA0268.namprd03.prod.outlook.com (2603:10b6:303:b4::33) by PH7PR12MB6859.namprd12.prod.outlook.com (2603:10b6:510:1b5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.56; Sat, 13 Apr 2024 12:59:33 +0000 Received: from MWH0EPF000A672F.namprd04.prod.outlook.com (2603:10b6:303:b4:cafe::66) by MW4PR03CA0268.outlook.office365.com (2603:10b6:303:b4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.21 via Frontend Transport; Sat, 13 Apr 2024 12:59:33 +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 MWH0EPF000A672F.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:59:33 +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.41; Sat, 13 Apr 2024 05:59:22 -0700 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.1258.12; Sat, 13 Apr 2024 05:59:20 -0700 From: Xueming Li To: Alex Vesker CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5/hws: fix direct index insert on depend WQE' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:42 +0800 Message-ID: <20240413125005.725659-102-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000A672F:EE_|PH7PR12MB6859:EE_ X-MS-Office365-Filtering-Correlation-Id: a9c6a231-0d8e-4a57-1e78-08dc5bb99099 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m+KRq1ukIXAs8mNhnjChf7gLz6hNClf7mkrT0orUj6iqPAc864i1iCl+ipuFtbI/lhnehFyPXf297MXWLXIPvNWSqtbz8J5xRSk47+nTcn3nQbqhsjg2FVetxFH2GV3IgZ5LMJCYdX+E8WGX0SPiZAlvmXjo6K6U3hwSkbjtvMeR49YPdQrSxrE2LC/F4oTJ8JidZVFZR3qi7u9T/31ZZlnAej2vI5Deb47DFF3dMMQpuig17V5sT1BvzuKWRFcketPCCD0qurGiFLqOuftONc0T9oAGBIwMatp4NeRYwuOjDZZILW5o8sw1aO1cqkP2Hv2KUe71pBcFi8Ze4IAJ23kubmIiuTojPXFncCFiQY1WyehbgA2deJzFl5PzJdsNzvygyFH7SRekTG7lard7gxHMnM8kRLJ8MYHFRP+2r0CbxHHk8BATqEBbZolNHCJ2e3xObPmn0BXFn6SWdK5ehXO+mbzal0wORPaFlKU1TAXpGGNooagkUaEVCqVkb5RNLshIrSEUgtPyk76VNhxchQp+mnoUC1FpYHc3+Pl9L0BtoIvWHvzER1sb7rBnDxuOZltlRk7JdEM8WTIxCWo+7FHwPmqe7Zsqrlwga5W4AgVmVLWiSURS+PEDMTJOItBapdhSgdNZSlKgEdCbWcjFST6wX5YPoVg+/tUIyRDRJOjuJVKALr9/5pgqbObqugxpSLcXdCPyuglPxJZjRDAJmdJPBtlTnwnCF+u3MLv8EZqxiWofiMIdKadatnIBukb9 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:(13230031)(36860700004)(82310400014)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:59:33.1861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9c6a231-0d8e-4a57-1e78-08dc5bb99099 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: MWH0EPF000A672F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6859 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 23.11.1 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/15/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3735e8e88c770b49a1588263b2ff5c6bf8b1d9a9 Thanks. Xueming Li --- >From 3735e8e88c770b49a1588263b2ff5c6bf8b1d9a9 Mon Sep 17 00:00:00 2001 From: Alex Vesker Date: Wed, 6 Mar 2024 21:21:47 +0100 Subject: [PATCH] net/mlx5/hws: fix direct index insert on depend WQE Cc: Xueming Li [ upstream commit e28392b3adab117a00e780a508049fd3df3d1492 ] In case a depend WQE was required and direct index was needed we would not set the direct index on the dep_wqe. This leads to incorrect insertion to index zero. Fixes: 38b5bf6452a6 ("net/mlx5/hws: support insert/distribute RTC properties") Signed-off-by: Alex Vesker Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/hws/mlx5dr_rule.c | 15 ++++++++------- drivers/net/mlx5/hws/mlx5dr_send.c | 1 + drivers/net/mlx5/hws/mlx5dr_send.h | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c index e39137a6ee..77245ad97d 100644 --- a/drivers/net/mlx5/hws/mlx5dr_rule.c +++ b/drivers/net/mlx5/hws/mlx5dr_rule.c @@ -58,14 +58,16 @@ static void mlx5dr_rule_init_dep_wqe(struct mlx5dr_send_ring_dep_wqe *dep_wqe, struct mlx5dr_rule *rule, const struct rte_flow_item *items, struct mlx5dr_match_template *mt, - void *user_data) + struct mlx5dr_rule_attr *attr) { struct mlx5dr_matcher *matcher = rule->matcher; struct mlx5dr_table *tbl = matcher->tbl; bool skip_rx, skip_tx; dep_wqe->rule = rule; - dep_wqe->user_data = user_data; + dep_wqe->user_data = attr->user_data; + dep_wqe->direct_index = mlx5dr_matcher_is_insert_by_idx(matcher) ? + attr->rule_idx : 0; if (!items) { /* rule update */ dep_wqe->rtc_0 = rule->rtc_0; @@ -292,8 +294,8 @@ static int mlx5dr_rule_create_hws_fw_wqe(struct mlx5dr_rule *rule, } mlx5dr_rule_create_init(rule, &ste_attr, &apply, false); - mlx5dr_rule_init_dep_wqe(&match_wqe, rule, items, mt, attr->user_data); - mlx5dr_rule_init_dep_wqe(&range_wqe, rule, items, mt, attr->user_data); + mlx5dr_rule_init_dep_wqe(&match_wqe, rule, items, mt, attr); + mlx5dr_rule_init_dep_wqe(&range_wqe, rule, items, mt, attr); ste_attr.direct_index = 0; ste_attr.rtc_0 = match_wqe.rtc_0; @@ -398,7 +400,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, * dep_wqe buffers (ctrl, data) are also reused for all STE writes. */ dep_wqe = mlx5dr_send_add_new_dep_wqe(queue); - mlx5dr_rule_init_dep_wqe(dep_wqe, rule, items, mt, attr->user_data); + mlx5dr_rule_init_dep_wqe(dep_wqe, rule, items, mt, attr); ste_attr.wqe_ctrl = &dep_wqe->wqe_ctrl; ste_attr.wqe_data = &dep_wqe->wqe_data; @@ -460,8 +462,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, ste_attr.used_id_rtc_1 = &rule->rtc_1; ste_attr.retry_rtc_0 = dep_wqe->retry_rtc_0; ste_attr.retry_rtc_1 = dep_wqe->retry_rtc_1; - ste_attr.direct_index = mlx5dr_matcher_is_insert_by_idx(matcher) ? - attr->rule_idx : 0; + ste_attr.direct_index = dep_wqe->direct_index; } else { apply.next_direct_idx = --ste_attr.direct_index; } diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index 622d574bfa..4c279ba42a 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.c +++ b/drivers/net/mlx5/hws/mlx5dr_send.c @@ -50,6 +50,7 @@ void mlx5dr_send_all_dep_wqe(struct mlx5dr_send_engine *queue) ste_attr.used_id_rtc_1 = &dep_wqe->rule->rtc_1; ste_attr.wqe_ctrl = &dep_wqe->wqe_ctrl; ste_attr.wqe_data = &dep_wqe->wqe_data; + ste_attr.direct_index = dep_wqe->direct_index; mlx5dr_send_ste(queue, &ste_attr); diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h index c1e8616f7e..c4eaea52ab 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.h +++ b/drivers/net/mlx5/hws/mlx5dr_send.h @@ -106,6 +106,7 @@ struct mlx5dr_send_ring_dep_wqe { uint32_t rtc_1; uint32_t retry_rtc_0; uint32_t retry_rtc_1; + uint32_t direct_index; void *user_data; }; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:08.143061923 +0800 +++ 0102-net-mlx5-hws-fix-direct-index-insert-on-depend-WQE.patch 2024-04-13 20:43:05.097753801 +0800 @@ -1 +1 @@ -From e28392b3adab117a00e780a508049fd3df3d1492 Mon Sep 17 00:00:00 2001 +From 3735e8e88c770b49a1588263b2ff5c6bf8b1d9a9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e28392b3adab117a00e780a508049fd3df3d1492 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index aa00c54e53..f14e1e6ecd 100644 +index e39137a6ee..77245ad97d 100644 @@ -44 +46 @@ -@@ -374,8 +376,8 @@ static int mlx5dr_rule_create_hws_fw_wqe(struct mlx5dr_rule *rule, +@@ -292,8 +294,8 @@ static int mlx5dr_rule_create_hws_fw_wqe(struct mlx5dr_rule *rule, @@ -55 +57 @@ -@@ -482,7 +484,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, +@@ -398,7 +400,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, @@ -64 +66 @@ -@@ -544,8 +546,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, +@@ -460,8 +462,7 @@ static int mlx5dr_rule_create_hws(struct mlx5dr_rule *rule, @@ -75 +77 @@ -index 64138279a1..f749401c6f 100644 +index 622d574bfa..4c279ba42a 100644