In some cases in debug it misses the error info.
Fix to update the error structure.

Fixes: 654ebd8cb7a3 ("net/mlx5: support flow table resizing")
Cc: sta...@dpdk.org

Signed-off-by: Maayan Kashani <mkash...@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnow...@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ec047e855e3..1820b79d229 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -3615,7 +3615,8 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
 
                mp_segment = mlx5_multi_pattern_segment_find(table, 
flow->res_idx);
                if (!mp_segment || !mp_segment->mhdr_action)
-                       return -1;
+                       return rte_flow_error_set(error, EINVAL, 
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+                                                 NULL, "No modify header 
action found");
                rule_acts[pos].action = mp_segment->mhdr_action;
                /* offset is relative to DR action */
                rule_acts[pos].modify_header.offset =
@@ -3946,8 +3947,8 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
 
 error:
        flow_hw_release_actions(dev, queue, flow);
-       rte_errno = EINVAL;
-       return -rte_errno;
+       return rte_flow_error_set(error, EINVAL, 
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+                                 NULL, "Action construction failed");
 }
 
 static const struct rte_flow_item *
-- 
2.21.0

Reply via email to