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 5E510470E5 for ; Thu, 25 Dec 2025 10:24:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E32E540648; Thu, 25 Dec 2025 10:23:53 +0100 (CET) Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011056.outbound.protection.outlook.com [52.101.62.56]) by mails.dpdk.org (Postfix) with ESMTP id 416E340648 for ; Thu, 25 Dec 2025 10:23:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FFOef+4fEC6zWUBrvS77qw8ws8niEXtu9NaTAkDt4JgSO2elVmJ/7F0PoeCgv3nEs5rLlC8xtkrQlOwBu/y99FqDlD7vvz4vE3uAYyIG2FM17hUw4lKtRJeFfoii6HdKg787QYeGuQoSuvdXGp1jMGRyDFyh3e+UvvKJMNKZbKIzCA0Rk/mMYcIc+ubfWzbCf4Fmxb70oHsgT1GhOpvwSWslYg0xiL8UQjbe4LjseICzMUziJGsFiOcROvJ7+/IOQ4fdqBcgTetONutPtnhiDmBOz1KxSTaxSybdOBqY0mq7OwuPUQ0qWsTJaeKnuVC4HeI39Vluv2unPE9IO9idRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=yDKHVks0SUs196gp56uWXVix3twFYSAuI3iGaKXPljw=; b=ApkFbMqXXagZjlr2XG9DsMI+BaO13w5+H0lMdi2gd9fPaBJFIFwzg5Or5QNQFBMLJINY1T2IFeL6/10hP2rJZCtMq6KEflLWK4tdF1EhQCb3X3aB8ju9lpi7UJH01HDzil/lesxCd2lV6id/o2I1g3h9Ypg97i2TmmlDYajfIJTBysxcDDzIDa65o+JpkxujVUv0aGJ0t+KvYrV5NzebMzQMTQLDnLI4GlsfnsS4Ft9I71YWdG4Xvv0yX/ITH7IIkDTtjLpQ+43uGVTHG80Ke7LCeh500yEJIhwn0acguHCShpvg9//ZgSWwrzq/sd0GxXnK4QCHaLjE/cFgt0spIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=yDKHVks0SUs196gp56uWXVix3twFYSAuI3iGaKXPljw=; b=bthsbH8EIna9Ug7U55AwUnisR/+zFoijlSTL/AdmyUt4sq/1tg/CvERgCAEFSg16Rb0hd9wigoIgPRNeFuKeaCyCDhVHfHPt9SuESSpo2wENrRu49xUJcMlxlZaWt91aOOpA3ZwgVOHz/UdGXnNxB+24Dp28m8wkEfrejipNLfkDPj6VbAHPKY7XqZE+M49jkmqZ79eSdy0RJ5UrgFhV9ONP4km4xzWEbrHTylODieQfF7CUg+KtU66+D/4zRv/AFmnvCeeSeDTdqOnMg0ukO+GT/+weUMEHjdeqZSpmk7cIFpPpb/uUQFQAX7YyZTJrKosh2PJzi/mpmQmOpyVQ4Q== Received: from SA9PR13CA0134.namprd13.prod.outlook.com (2603:10b6:806:27::19) by DS2PR12MB9749.namprd12.prod.outlook.com (2603:10b6:8:2b9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:23:49 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:27:cafe::52) by SA9PR13CA0134.outlook.office365.com (2603:10b6:806:27::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9478.2 via Frontend Transport; Thu, 25 Dec 2025 09:23:48 +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 SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:23:48 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) 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.2562.20; Thu, 25 Dec 2025 01:23:38 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:38 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:23:37 -0800 From: Shani Peretz To: Dariusz Sosnowski CC: Bing Zhao , dpdk stable Subject: patch 'net/mlx5: fix error reporting on masked indirect actions' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:18:20 +0200 Message-ID: <20251225091938.345892-59-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|DS2PR12MB9749:EE_ X-MS-Office365-Filtering-Correlation-Id: d8f260aa-9942-4193-72c1-08de43974fbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?oiZc9zODZq6WXBwDJuUPb9Ge7JgqzkYbpHgEJppx+FqNPwOvqbs0ALUGQeBZ?= =?us-ascii?Q?KGDfEN8YCgxdmpLrNJyvfesY1XRlqarHtaYZKFZ7GScMGxF0eFwS3Ppd0uN7?= =?us-ascii?Q?ccaBTVbjs1k7Erf6wqTPPq8g2ge1nWrGOS/WNyqpBx1deMEaekH/hWxQQrru?= =?us-ascii?Q?h7oqCt4oCUbcyz8vc7MhppEFrAAMtYOKf8ONF8TzUY63kYEFnh+A44XnRkwr?= =?us-ascii?Q?TGX7iLd3I70zFFLrCJtkZy/PRh0CipqQltKV8w3S2QAyCqBLdfZLIw1cOt4f?= =?us-ascii?Q?1veYg842fqRc5uwxovXEe0/XqWlfdUJjFrfHK587bJ3lfzL8FZIjRk6V7bJU?= =?us-ascii?Q?omqikrpbXkOWuxSUqdeWP1BqsQwWnW3AVsrUc810BktRGyW/YcS/ITfmh0Gh?= =?us-ascii?Q?tRHSDrHM5bbUdCz4MjjolQJFAn+UaaPNLM+JMPp9XjA0A1BQjYtJ8KV9h8D7?= =?us-ascii?Q?CsZYPkEVaUInLbk0PnIFPnhw5+c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ascii?Q?qxmYqWG1v0qnQz26hd6KwkVdn7GjOJZiCon5vRJ+Ww45tjBwABg78RhyIGFo?= =?us-ascii?Q?ybksnemL5ySPM2FofXbN59w16cO+2JWp4J5vxJIFGRbvo+Izb7TBEV0B/zXk?= =?us-ascii?Q?7esLqTuzqoJOVUfcQ8NS0U+UiRvnYLWRtywyt+mCzeG4yF9eGCAFrryfI4KR?= =?us-ascii?Q?pVLMKnlzf5uA2n7p4PBz/HezYPCnRg0VuC0QFPuN?= 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:(13230040)(82310400026)(36860700013)(376014)(1800799024)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:23:48.8562 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8f260aa-9942-4193-72c1-08de43974fbb 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: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS2PR12MB9749 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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://github.com/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/24cc92d2711738927230d5348a38e4234eff3675 Thanks. Shani --- >From 24cc92d2711738927230d5348a38e4234eff3675 Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Wed, 5 Nov 2025 17:52:54 +0100 Subject: [PATCH] net/mlx5: fix error reporting on masked indirect actions [ upstream commit 1d961316d9f541c6679dcd519a40a667f9885f30 ] Whenever masked indirect actions in actions template were handled by mlx5 PMD and user passed incorrect action configuration, the specific errors were not returned through rte_flow_error struct. Existing logs also used WARNING log level, which made debugging a bit harder. This patch fixes error reporting for masked indirect actions, during flow actions translation done in HWS mode: - Replace "return -1" with error reporting through rte_flow_error. - Change log level from WARNING to ERR. - Add more information to log messages (port index and action handle). Fixes: 7ab3962d2d2b ("net/mlx5: add indirect HW steering action") Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS") Fixes: 463170a7c934 ("net/mlx5: support connection tracking with HWS") Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS") Signed-off-by: Dariusz Sosnowski Acked-by: Bing Zhao --- drivers/net/mlx5/mlx5_flow_hw.c | 42 +++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 320aa479f6..59a3e71855 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -1012,7 +1012,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, const struct rte_flow_action *action, struct mlx5_hw_actions *acts, uint16_t action_src, - uint16_t action_dst) + uint16_t action_dst, + struct rte_flow_error *error) { struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_shared_action_rss *shared_rss; @@ -1029,8 +1030,10 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, (priv, acts, (enum rte_flow_action_type)MLX5_RTE_FLOW_ACTION_TYPE_RSS, action_src, action_dst, idx, shared_rss)) { - DRV_LOG(WARNING, "Indirect RSS action index %d translate failed", act_idx); - return -1; + DRV_LOG(ERR, "port %u Indirect RSS action (handle %p) translate failed", + dev->data->port_id, action->conf); + return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, + action, "Indirect RSS action translate failed"); } break; case MLX5_INDIRECT_ACTION_TYPE_COUNT: @@ -1038,15 +1041,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, (enum rte_flow_action_type) MLX5_RTE_FLOW_ACTION_TYPE_COUNT, action_src, action_dst, act_idx)) { - DRV_LOG(WARNING, "Indirect count action translate failed"); - return -1; + DRV_LOG(ERR, + "port %u Indirect count action (handle %p) " + "translate failed", + dev->data->port_id, action->conf); + return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, + action, + "Indirect count action translate failed"); } break; case MLX5_INDIRECT_ACTION_TYPE_CT: if (flow_hw_ct_compile(dev, MLX5_HW_INV_QUEUE, idx, &acts->rule_acts[action_dst])) { - DRV_LOG(WARNING, "Indirect CT action translate failed"); - return -1; + DRV_LOG(ERR, "port %u Indirect CT action (handle %p) translate failed", + dev->data->port_id, action->conf); + return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, + action, "Indirect CT action translate failed"); } break; case MLX5_INDIRECT_ACTION_TYPE_METER_MARK: @@ -1054,16 +1064,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, (enum rte_flow_action_type) MLX5_RTE_FLOW_ACTION_TYPE_METER_MARK, action_src, action_dst, idx)) { - DRV_LOG(WARNING, "Indirect meter mark action translate failed"); - return -1; + DRV_LOG(ERR, + "port %u Indirect meter mark action (handle %p) " + "translate failed", + dev->data->port_id, action->conf); + return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, + action, + "Indirect meter mark action translate failed"); } break; case MLX5_INDIRECT_ACTION_TYPE_QUOTA: flow_hw_construct_quota(priv, &acts->rule_acts[action_dst], idx); break; default: - DRV_LOG(WARNING, "Unsupported shared action type:%d", type); - break; + DRV_LOG(ERR, "Unsupported shared action type: %d", type); + return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, + "Unsupported shared action type"); } return 0; } @@ -2162,8 +2178,8 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev, goto err; } if (actions->conf && masks->conf) { - if (flow_hw_shared_action_translate - (dev, actions, acts, src_pos, dr_pos)) + if (flow_hw_shared_action_translate(dev, actions, acts, + src_pos, dr_pos, &sub_error)) goto err; } else if (__flow_hw_act_data_general_append (priv, acts, RTE_FLOW_ACTION_TYPE_INDIRECT, -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:39.324406536 +0200 +++ 0059-net-mlx5-fix-error-reporting-on-masked-indirect-acti.patch 2025-12-25 11:16:35.981997000 +0200 @@ -1 +1 @@ -From 1d961316d9f541c6679dcd519a40a667f9885f30 Mon Sep 17 00:00:00 2001 +From 24cc92d2711738927230d5348a38e4234eff3675 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1d961316d9f541c6679dcd519a40a667f9885f30 ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index 1755f2cffc..4d85fffb8f 100644 +index 320aa479f6..59a3e71855 100644 @@ -36 +37 @@ -@@ -1321,7 +1321,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1012,7 +1012,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -46 +47 @@ -@@ -1338,8 +1339,10 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1029,8 +1030,10 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -59 +60 @@ -@@ -1347,15 +1350,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1038,15 +1041,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -86 +87 @@ -@@ -1363,16 +1373,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1054,16 +1064,22 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -113 +114 @@ -@@ -2536,8 +2552,8 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev, +@@ -2162,8 +2178,8 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev, @@ -122 +123 @@ - } else if (__flow_hw_act_data_indirect_append + } else if (__flow_hw_act_data_general_append