]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix errno update in shared context creation
authorMichael Baum <michaelba@nvidia.com>
Mon, 14 Feb 2022 09:34:55 +0000 (11:34 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 21 Feb 2022 10:36:40 +0000 (11:36 +0100)
commit6be4c57add872cfd5f430977a1be2701a951ef90
treea9908efabd459db3d4773682af5faddf3ccccfcc
parentce12974cce72b416135d16a5fa1f4d41cd1d4163
net/mlx5: fix errno update in shared context creation

The mlx5_alloc_shared_dev_ctx() function has a local variable named
"err" which contains the errno value in case of failure.

When functions called by this function are failed, this variable is
updated with their return value (that should be a positive errno value).
However, some functions doesn't update errno value by themselves or
return negative errno value. If one of them fails, the "err" variable
contains negative value what cause to assertion failure.

This patch updates all functions uses by mlx5_alloc_shared_dev_ctx()
function to update rte_errno and take this value instead of "err" value.

Fixes: 5dfa003db53f ("common/mlx5: fix post doorbell barrier")
Fixes: 5d55a494f4e6 ("net/mlx5: split multi-thread flow handling per OS")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_flow_os.c
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/windows/mlx5_flow_os.c
drivers/net/mlx5/windows/mlx5_os.c