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 EF78948B69 for ; Fri, 21 Nov 2025 12:23:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8F75402D7; Fri, 21 Nov 2025 12:23:34 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id AB7C3402E0 for ; Fri, 21 Nov 2025 12:23:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LdlK8IXr98TsqL0oNJyu/zUg7k9+9Hql/UwolhKD7T4=; b=Funau3q4de25vFL0Vy3n/OwpWMChFW+VZWkm0F2MkGWm31w5J95YtuU6qnyIb9lnHDt+7X s7FicsUL3kvuABMBTlbyYC9TQPTAM+0CN2unN44lQUkAUdkLvQaJmVKRZkftEycETPJE93 h3AMIUTcxoAwT10xCeiUK1jEmlKue5Q= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-QVDM2_ZYMXiHc4cyT2l2MA-1; Fri, 21 Nov 2025 06:23:31 -0500 X-MC-Unique: QVDM2_ZYMXiHc4cyT2l2MA-1 X-Mimecast-MFC-AGG-ID: QVDM2_ZYMXiHc4cyT2l2MA_1763724210 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CFF25195608E; Fri, 21 Nov 2025 11:23:30 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5EDAF30044DB; Fri, 21 Nov 2025 11:23:29 +0000 (UTC) From: Kevin Traynor 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 24.11.4 Date: Fri, 21 Nov 2025 11:20:37 +0000 Message-ID: <20251121112128.485623-53-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7SXpa6ZfUmnTz3XwC2oTpbjsrQoxO4SqB0DulJRqVmM_1763724210 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/bd8a9fa033ac7275ae7b3c87227c272e8056d20d Thanks. Kevin --- >From bd8a9fa033ac7275ae7b3c87227c272e8056d20d 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 25cd973a57..667472800f 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -1288,5 +1288,6 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, 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; @@ -1305,6 +1306,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, (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; @@ -1314,6 +1317,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, 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; @@ -1321,6 +1329,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, 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; @@ -1330,6 +1340,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, 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; @@ -1338,6 +1353,7 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, 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; @@ -2501,6 +2517,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev, } 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_indirect_append -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.283160308 +0000 +++ 0053-net-mlx5-fix-error-reporting-on-masked-indirect-acti.patch 2025-11-21 11:05:09.520201412 +0000 @@ -1 +1 @@ -From 1d961316d9f541c6679dcd519a40a667f9885f30 Mon Sep 17 00:00:00 2001 +From bd8a9fa033ac7275ae7b3c87227c272e8056d20d 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 25cd973a57..667472800f 100644 @@ -36 +37 @@ -@@ -1322,5 +1322,6 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1288,5 +1288,6 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -44 +45 @@ -@@ -1339,6 +1340,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1305,6 +1306,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -55 +56 @@ -@@ -1348,6 +1351,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1314,6 +1317,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -69 +70 @@ -@@ -1355,6 +1363,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1321,6 +1329,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -80 +81 @@ -@@ -1364,6 +1374,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1330,6 +1340,11 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -94 +95 @@ -@@ -1372,6 +1387,7 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, +@@ -1338,6 +1353,7 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev, @@ -104 +105 @@ -@@ -2537,6 +2553,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev, +@@ -2501,6 +2517,6 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,