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 EEFEB4301F for ; Thu, 10 Aug 2023 02:02:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7C0840FAE; Thu, 10 Aug 2023 02:02:12 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2064.outbound.protection.outlook.com [40.107.223.64]) by mails.dpdk.org (Postfix) with ESMTP id F364040DD8 for ; Thu, 10 Aug 2023 02:02:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E9AONiPHLdLh0kS3vVfVvgwsKAGuFXerOUTPL9hsUtBKzqFnrrqQ3fXMekPpEFv77KPH0h5KsXZOIvsFT6NrXGSqHj8pyVEXjOTD3ZMzJxBbaFCsXENsdcRYc2+yyj5GvMgg1QwuDa/XOGd7U9xkIefaYk/+ARvrj9AQN/vJk0hWw+BQyV1ruLHkujPxt68w1Q1O2aVp51Z4ukK587AqDtgMNNnqxMBlgHU2nzuR1lMkoXLzgSahdmkk5+u+8b65FmvN0vXQcYYiVxAhm3rs/UuFMdvE4d7blU63vQtKyGoOsJrF8J6a9eswteYmeGPZ/QJ5OVHIa6DdnGJ/P67beQ== 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=HQECMIohbAr5cDUrfD2nmm3Q4SF95ipfzcIEcGDLsFo=; b=oBPNHhY8s5OEQCJh/EElG3OxeXqWEEKhSzxXQ9ZRuM22dlKYSsUME6rHlgopMF/sSHBFCt8WJRW7SDlXOXy8uxK+LMh1olf7DH0hKcAhlrvqt5LGPvajzGXq9ykM75DBKWGnA+t2JS0HQ8x46ASTi6yj3HwMTMH/KBvW6FfdBLp8Npw0vg3vg54qW3ybM5gJtKP+3B2TVeKD687Zt0tfeIkOTVNbKuYRPhiV4A2ybfZ3/aUW06GnQJXsxZUgPzSbKssThnV7QdpTUGgJFb0DAYiEh0gDzso51Efs1LZ+NKpciKlZnZebwGpVP7lpHqZPL1flAYSbWLMzaI47k+fYsg== 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 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=HQECMIohbAr5cDUrfD2nmm3Q4SF95ipfzcIEcGDLsFo=; b=Wrp3ogK8JDmDbCPOGVxolKb8LQ3p7Ul4mlsJwUX6TEVLNrIhE+i1oUkXbNZ8/J47diZYsFmCwqsQnlSBU2jldnwVkZ2D0D4517nv4+Rzv8Mjv+nTpxTWQe2lz8DLMSJLiNzb+5107J89Zw6c4KxxC44VrInoHPPc1Lty+PbyoAtjgEzT3QzYruLmZU8KSSUfkk7E5NHyNChO9oiC/f4fJC302g2TdauR6kmrmNi35gsYvbnIFoFTD36IE1X+cRBo00cLD9CakMZywYdhBkpgosoAJKxXhfDOrI5qCkqHvyjKukBjL0j2Kt4dvXtzzzB8OphtwOTJdYNFmvIJyob/xg== Received: from CYZPR20CA0016.namprd20.prod.outlook.com (2603:10b6:930:a2::15) by SA1PR12MB7412.namprd12.prod.outlook.com (2603:10b6:806:2b2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 00:02:08 +0000 Received: from CY4PEPF0000E9D2.namprd03.prod.outlook.com (2603:10b6:930:a2:cafe::a4) by CYZPR20CA0016.outlook.office365.com (2603:10b6:930:a2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Thu, 10 Aug 2023 00:02:08 +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 CY4PEPF0000E9D2.mail.protection.outlook.com (10.167.241.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Thu, 10 Aug 2023 00:02:07 +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; Wed, 9 Aug 2023 17:01:58 -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; Wed, 9 Aug 2023 17:01:56 -0700 From: Xueming Li To: Bing Zhao CC: Ori Kam , dpdk stable Subject: patch 'net/mlx5: fix error set in Tx representor tagging' has been queued to stable release 22.11.3 Date: Thu, 10 Aug 2023 07:58:53 +0800 Message-ID: <20230809235947.1187-21-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809235947.1187-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> <20230809235947.1187-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: CY4PEPF0000E9D2:EE_|SA1PR12MB7412:EE_ X-MS-Office365-Filtering-Correlation-Id: 63b3d65d-3366-440d-6b9c-08db993509d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JfIsGAUA8FPOz2eov7oxSSM0JRf7lMj6V2dugNfrLmD24WVrnEnAxfwe060GrJaG2VEjOVlGaTPowqsuAJUQMUiH1Q1P48fqKUQF/Qo4GfkWHwpV0MUAL51wrObnAXMAVgbv6HRMApeG/c41x3l8V2h1qRczVL3Zjrs2PcsHV2HZZ/26PI3sdMjfPfhivOTbs175RHg05Pzj7jD4JR9HAcXlo1ihuLGiTU7slKqPvBa59uEq/NqiWyqT+9a/L+ClcXoB6ZMW2rwH5aaTf8dh15xlOb1EsVXsynWEWq92rYos3IErNyBIH0HeWWJyfg61I0wmNmTqXUVtKUu9NTAMwfgQXHI7poaVbab+F/R3ZqnykYrdD8kOIT/E+4EwylWa28FpWcE7MPbRgS3cu1bdVnzK7TkBkvM+ofsAODNWiwJcJ0r7aG6/fyrIrrZ/fLYfvbKxaZnTim0R5/ZGDyv/NoY+MwLWoyx2565s77jKWdAbabKmYRIwtVtQC21R7Ie/1NQZLBEkQKXIRT37q+dgwePX2Vdlb8402d70frHcZbC0/TGXDfG6GKDOpmPmog/8r+jWiRtu8UivTEedPCN0l7lgxN73PkLM1g8dO2kLW6szvG0BQrpVIrwfXwEVgHWhzr3rQV5PrFtgWbgwzeDXoe9Nlc6GApQqIPd0Rg4Qh+sUEWdrD3EtoJFaVc42EFtPqetNXkwSFSnT/6MAmtjhJS2A81qByb4kwcdApOp8iY9eV3CtQ/urRt6pRSAE4qEjAGKtoNR0YDY41dzGdOI9Sw== 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)(376002)(39860400002)(346002)(396003)(136003)(186006)(451199021)(82310400008)(1800799006)(36840700001)(46966006)(40470700004)(36860700001)(316002)(966005)(478600001)(2906002)(5660300002)(426003)(41300700001)(16526019)(86362001)(82740400003)(6666004)(7696005)(8936002)(8676002)(6862004)(6636002)(53546011)(26005)(4326008)(40460700003)(1076003)(47076005)(70206006)(70586007)(37006003)(54906003)(55016003)(336012)(6286002)(40480700001)(83380400001)(40140700001)(356005)(2616005)(36756003)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 00:02:07.8989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63b3d65d-3366-440d-6b9c-08db993509d8 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: CY4PEPF0000E9D2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7412 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/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/commit/?h=22.11-staging&id=0a632c40ee7dcbfc4688c7e52cc54a353e290050 Thanks. Xueming Li --- >From 0a632c40ee7dcbfc4688c7e52cc54a353e290050 Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Fri, 30 Jun 2023 12:13:14 +0300 Subject: [PATCH] net/mlx5: fix error set in Tx representor tagging Cc: Xueming Li [ upstream commit 39ea353caf9bd0e671a2ad600a70608cf11c1898 ] In the previous implementation, the error information was not set when there was a failure during the initialization. The pointer from the user should be passed to the called functions to be set properly before returning. Fixes: 483181f7b6dd ("net/mlx5: support device control of representor matching") Signed-off-by: Bing Zhao Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow_hw.c | 42 +++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index ea0159406f..60afc268bc 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -5295,12 +5295,14 @@ flow_hw_free_vport_actions(struct mlx5_priv *priv) * * @param dev * Pointer to Ethernet device. + * @param[out] error + * Pointer to error structure. * * @return * Pointer to pattern template on success. NULL otherwise, and rte_errno is set. */ static struct rte_flow_pattern_template * -flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev) +flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev, struct rte_flow_error *error) { struct rte_flow_pattern_template_attr attr = { .relaxed_matching = 0, @@ -5319,7 +5321,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev) }, }; - return flow_hw_pattern_template_create(dev, &attr, items, NULL); + return flow_hw_pattern_template_create(dev, &attr, items, error); } static __rte_always_inline uint32_t @@ -5377,12 +5379,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action, * * @param dev * Pointer to Ethernet device. + * @param[out] error + * Pointer to error structure. * * @return * Pointer to actions template on success. NULL otherwise, and rte_errno is set. */ static struct rte_flow_actions_template * -flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) +flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev, + struct rte_flow_error *error) { uint32_t tag_mask = flow_hw_tx_tag_regc_mask(dev); uint32_t tag_value = flow_hw_tx_tag_regc_value(dev); @@ -5468,7 +5473,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) NULL, NULL); idx++; MLX5_ASSERT(idx <= RTE_DIM(actions_v)); - return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, NULL); + return flow_hw_actions_template_create(dev, &attr, actions_v, actions_m, error); } static void @@ -5497,12 +5502,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev) * * @param dev * Pointer to Ethernet device. + * @param[out] error + * Pointer to error structure. * * @return * 0 on success, negative errno value otherwise. */ static int -flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev) +flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev, struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; struct rte_flow_template_table_attr attr = { @@ -5520,20 +5527,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev) MLX5_ASSERT(priv->sh->config.dv_esw_en); MLX5_ASSERT(priv->sh->config.repr_matching); - priv->hw_tx_repr_tagging_pt = flow_hw_create_tx_repr_sq_pattern_tmpl(dev); + priv->hw_tx_repr_tagging_pt = + flow_hw_create_tx_repr_sq_pattern_tmpl(dev, error); if (!priv->hw_tx_repr_tagging_pt) - goto error; - priv->hw_tx_repr_tagging_at = flow_hw_create_tx_repr_tag_jump_acts_tmpl(dev); + goto err; + priv->hw_tx_repr_tagging_at = + flow_hw_create_tx_repr_tag_jump_acts_tmpl(dev, error); if (!priv->hw_tx_repr_tagging_at) - goto error; + goto err; priv->hw_tx_repr_tagging_tbl = flow_hw_table_create(dev, &cfg, &priv->hw_tx_repr_tagging_pt, 1, &priv->hw_tx_repr_tagging_at, 1, - NULL); + error); if (!priv->hw_tx_repr_tagging_tbl) - goto error; + goto err; return 0; -error: +err: flow_hw_cleanup_tx_repr_tagging(dev); return -rte_errno; } @@ -6860,8 +6869,7 @@ flow_hw_configure(struct rte_eth_dev *dev, goto err; } - memcpy(_queue_attr, queue_attr, - sizeof(void *) * nb_queue); + memcpy(_queue_attr, queue_attr, sizeof(void *) * nb_queue); _queue_attr[nb_queue] = &ctrl_queue_attr; priv->acts_ipool = mlx5_ipool_create(&cfg); if (!priv->acts_ipool) @@ -6976,11 +6984,9 @@ flow_hw_configure(struct rte_eth_dev *dev, goto err; } if (priv->sh->config.dv_esw_en && priv->sh->config.repr_matching) { - ret = flow_hw_setup_tx_repr_tagging(dev); - if (ret) { - rte_errno = -ret; + ret = flow_hw_setup_tx_repr_tagging(dev, error); + if (ret) goto err; - } } if (is_proxy) { ret = flow_hw_create_vport_actions(priv); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-08-09 21:51:20.052060700 +0800 +++ 0074-net-mlx5-fix-error-set-in-Tx-representor-tagging.patch 2023-08-09 21:51:18.224352000 +0800 @@ -1 +1 @@ -From 39ea353caf9bd0e671a2ad600a70608cf11c1898 Mon Sep 17 00:00:00 2001 +From 0a632c40ee7dcbfc4688c7e52cc54a353e290050 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 39ea353caf9bd0e671a2ad600a70608cf11c1898 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -18,2 +20,2 @@ - drivers/net/mlx5/mlx5_flow_hw.c | 44 +++++++++++++++++++-------------- - 1 file changed, 25 insertions(+), 19 deletions(-) + drivers/net/mlx5/mlx5_flow_hw.c | 42 +++++++++++++++++++-------------- + 1 file changed, 24 insertions(+), 18 deletions(-) @@ -22 +24 @@ -index a0c7956626..697da91f03 100644 +index ea0159406f..60afc268bc 100644 @@ -25 +27 @@ -@@ -5965,12 +5965,14 @@ flow_hw_destroy_send_to_kernel_action(struct mlx5_priv *priv) +@@ -5295,12 +5295,14 @@ flow_hw_free_vport_actions(struct mlx5_priv *priv) @@ -41 +43 @@ -@@ -5989,7 +5991,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev) +@@ -5319,7 +5321,7 @@ flow_hw_create_tx_repr_sq_pattern_tmpl(struct rte_eth_dev *dev) @@ -50 +52 @@ -@@ -6047,12 +6049,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action, +@@ -5377,12 +5379,15 @@ flow_hw_update_action_mask(struct rte_flow_action *action, @@ -67 +69 @@ -@@ -6141,7 +6146,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) +@@ -5468,7 +5473,7 @@ flow_hw_create_tx_repr_tag_jump_acts_tmpl(struct rte_eth_dev *dev) @@ -76 +78 @@ -@@ -6170,12 +6175,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev) +@@ -5497,12 +5502,14 @@ flow_hw_cleanup_tx_repr_tagging(struct rte_eth_dev *dev) @@ -92 +94 @@ -@@ -6193,20 +6200,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev) +@@ -5520,20 +5527,22 @@ flow_hw_setup_tx_repr_tagging(struct rte_eth_dev *dev) @@ -122 +124 @@ -@@ -7638,8 +7647,7 @@ flow_hw_configure(struct rte_eth_dev *dev, +@@ -6860,8 +6869,7 @@ flow_hw_configure(struct rte_eth_dev *dev, @@ -132,10 +134 @@ -@@ -7732,7 +7740,7 @@ flow_hw_configure(struct rte_eth_dev *dev, - MLX5_ASSERT(rte_eth_dev_is_valid_port(port_attr->host_port_id)); - if (is_proxy) { - DRV_LOG(ERR, "cross vHCA shared mode not supported " -- " for E-Switch confgiurations"); -+ "for E-Switch confgiurations"); - rte_errno = ENOTSUP; - goto err; - } -@@ -7816,11 +7824,9 @@ flow_hw_configure(struct rte_eth_dev *dev, +@@ -6976,11 +6984,9 @@ flow_hw_configure(struct rte_eth_dev *dev,