[PATCH 4/7] net/mlx5: fix the return value of vport action

Bing Zhao bingz at nvidia.com
Fri Jun 30 08:33:29 CEST 2023


The "rte_flow_error" should be set in case a invalid pointer access
to the message member.

Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Cc: dsosnowski at nvidia.com

Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Ori Kam <orika at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 6683bcbc7f..87584c1e94 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7830,7 +7830,8 @@ flow_hw_configure(struct rte_eth_dev *dev,
 	if (is_proxy) {
 		ret = flow_hw_create_vport_actions(priv);
 		if (ret) {
-			rte_errno = -ret;
+			rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					   NULL, "Failed to create vport actions.");
 			goto err;
 		}
 		ret = flow_hw_create_ctrl_tables(dev);
-- 
2.34.1



More information about the dev mailing list