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: sta...@dpdk.org Signed-off-by: Alex Vesker <va...@nvidia.com> Reviewed-by: Erez Shitrit <ere...@nvidia.com> Acked-by: Matan Azrad ma...@nvidia.com --- 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