The rte_errno should be set to a positive error value
while the ret of the function should return a negative
value this aligns code to other mlx5dr API functions.
Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer")
Cc: [email protected]
Signed-off-by: Alex Vesker <[email protected]>
Reviewed-by: Erez Shitrit <[email protected]>
Acked-by: Matan Azrad [email protected]
---
drivers/net/mlx5/hws/mlx5dr_send.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c
b/drivers/net/mlx5/hws/mlx5dr_send.c
index 51aaf5c8e2..d650c55124 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.c
+++ b/drivers/net/mlx5/hws/mlx5dr_send.c
@@ -1007,8 +1007,8 @@ int mlx5dr_send_queue_action(struct mlx5dr_context *ctx,
break;
default:
- rte_errno = -EINVAL;
- return rte_errno;
+ rte_errno = EINVAL;
+ return -rte_errno;
}
return 0;
--
2.18.1