patch 'net/mlx5: fix error reporting on masked indirect actions' has been queued to stable release 22.11.11
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed Nov 12 17:52:55 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.11
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/14/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6ce9b5e9f48a11dd8e2f9b19cbb078be3a1cd0ac
Thanks.
Luca Boccassi
---
>From 6ce9b5e9f48a11dd8e2f9b19cbb078be3a1cd0ac Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski at nvidia.com>
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 <dsosnowski at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
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 b54df8f432..e3f6e1aa3a 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -764,7 +764,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;
@@ -781,8 +782,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:
@@ -790,15 +793,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:
@@ -806,13 +816,19 @@ 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;
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;
}
@@ -1376,8 +1392,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, actions - action_start, action_pos))
+ if (flow_hw_shared_action_translate(dev, actions, acts,
+ actions - action_start, action_pos, &sub_error))
goto err;
} else if (__flow_hw_act_data_general_append
(priv, acts, actions->type,
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-11-12 16:20:42.543299424 +0000
+++ 0041-net-mlx5-fix-error-reporting-on-masked-indirect-acti.patch 2025-11-12 16:20:41.003718817 +0000
@@ -1 +1 @@
-From 1d961316d9f541c6679dcd519a40a667f9885f30 Mon Sep 17 00:00:00 2001
+From 6ce9b5e9f48a11dd8e2f9b19cbb078be3a1cd0ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d961316d9f541c6679dcd519a40a667f9885f30 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -33 +34 @@
-index 1755f2cffc..4d85fffb8f 100644
+index b54df8f432..e3f6e1aa3a 100644
@@ -36 +37 @@
-@@ -1321,7 +1321,8 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -764,7 +764,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,
+@@ -781,8 +782,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,
+@@ -790,15 +793,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,
+@@ -806,13 +816,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -101,3 +101,0 @@
- case MLX5_INDIRECT_ACTION_TYPE_QUOTA:
- flow_hw_construct_quota(priv, &acts->rule_acts[action_dst], idx);
- break;
@@ -113 +111 @@
-@@ -2536,8 +2552,8 @@ __flow_hw_translate_actions_template(struct rte_eth_dev *dev,
+@@ -1376,8 +1392,8 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
@@ -118 +116 @@
-- (dev, actions, acts, src_pos, dr_pos))
+- (dev, actions, acts, actions - action_start, action_pos))
@@ -120 +118 @@
-+ src_pos, dr_pos, &sub_error))
++ actions - action_start, action_pos, &sub_error))
@@ -122,2 +120,2 @@
- } else if (__flow_hw_act_data_indirect_append
- (priv, acts, RTE_FLOW_ACTION_TYPE_INDIRECT,
+ } else if (__flow_hw_act_data_general_append
+ (priv, acts, actions->type,
More information about the stable
mailing list