patch 'net/mlx5: fix flow template indirect action failure' has been queued to stable release 22.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Jun 25 01:58:59 CEST 2024
Hi,
FYI, your patch has been queued to stable release 22.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 06/27/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://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/42e1eb6a45859dbc9b51f80ef7344747dfbaef78
Thanks.
Luca Boccassi
---
>From 42e1eb6a45859dbc9b51f80ef7344747dfbaef78 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Sun, 26 May 2024 16:22:44 +0300
Subject: [PATCH] net/mlx5: fix flow template indirect action failure
[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]
For indirect action type, on error case the function jumped to err
but returned zero cause rte_errno was not initialized before the jump.
It caused no error in table creation.
In case reaching an error, if rte_errno is not initialized,
it will be set to EINVAL.
Now table creation should fail if the translate of the action fails.
Added driver log warnings so it can be easy to track failure on shared
actions translate.
Fixes: 7ab3962d2d2b ("net/mlx5: add indirect HW steering action")
Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Suanming Mou <suanmingm at nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fd3e51bf0d..5333495a59 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -769,15 +769,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
if (!shared_rss || __flow_hw_act_data_shared_rss_append
(priv, acts,
(enum rte_flow_action_type)MLX5_RTE_FLOW_ACTION_TYPE_RSS,
- action_src, action_dst, idx, shared_rss))
+ action_src, action_dst, idx, shared_rss)) {
+ DRV_LOG(WARNING, "Indirect RSS action index %d translate failed", act_idx);
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_COUNT:
if (__flow_hw_act_data_shared_cnt_append(priv, acts,
(enum rte_flow_action_type)
MLX5_RTE_FLOW_ACTION_TYPE_COUNT,
- action_src, action_dst, act_idx))
+ action_src, action_dst, act_idx)) {
+ DRV_LOG(WARNING, "Indirect count action translate failed");
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_AGE:
/* Not supported, prevent by validate function. */
@@ -785,15 +789,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
break;
case MLX5_INDIRECT_ACTION_TYPE_CT:
if (flow_hw_ct_compile(dev, MLX5_HW_INV_QUEUE,
- idx, &acts->rule_acts[action_dst]))
+ idx, &acts->rule_acts[action_dst])) {
+ DRV_LOG(WARNING, "Indirect CT action translate failed");
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_METER_MARK:
if (__flow_hw_act_data_shared_mtr_append(priv, acts,
(enum rte_flow_action_type)
MLX5_RTE_FLOW_ACTION_TYPE_METER_MARK,
- action_src, action_dst, idx))
+ action_src, action_dst, idx)) {
+ DRV_LOG(WARNING, "Indirect meter mark action translate failed");
return -1;
+ }
break;
default:
DRV_LOG(WARNING, "Unsupported shared action type:%d", type);
@@ -1758,6 +1766,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
}
return 0;
err:
+ /* If rte_errno was not initialized and reached error state. */
+ if (!rte_errno)
+ rte_errno = EINVAL;
err = rte_errno;
__flow_hw_action_template_destroy(dev, acts);
return rte_flow_error_set(error, err,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.314201284 +0100
+++ 0073-net-mlx5-fix-flow-template-indirect-action-failure.patch 2024-06-25 00:22:13.265187280 +0100
@@ -1 +1 @@
-From b79ac509105a2cf9fce1734a6798632a0414cd1c Mon Sep 17 00:00:00 2001
+From 42e1eb6a45859dbc9b51f80ef7344747dfbaef78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index d9140dbf23..463f7b87a3 100644
+index fd3e51bf0d..5333495a59 100644
@@ -29 +30 @@
-@@ -1106,15 +1106,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -769,15 +769,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -51 +52 @@
-@@ -1122,15 +1126,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -785,15 +789,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -71,3 +72,3 @@
- case MLX5_INDIRECT_ACTION_TYPE_QUOTA:
- flow_hw_construct_quota(priv, &acts->rule_acts[action_dst], idx);
-@@ -2645,6 +2653,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
+ default:
+ DRV_LOG(WARNING, "Unsupported shared action type:%d", type);
+@@ -1758,6 +1766,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
More information about the stable
mailing list