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

Message ID 20230630063329.432508-1-bingz@nvidia.com (mailing list archive)
State Superseded, archived
Headers
Series None |

Commit Message

Bing Zhao June 30, 2023, 6:33 a.m. UTC
  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@nvidia.com

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

Patch

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);