OSDN Git Service

net/mlx5e: Remove mlx5e_priv usage from mlx5e_build_*tir_ctx*()
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Tue, 6 Apr 2021 07:23:26 +0000 (10:23 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 26 Jul 2021 16:50:39 +0000 (09:50 -0700)
commit983c9da2b1e1aa25a56bfb0715bf728f61c54e8b
treeeec235cddd3fd5cc02581fa4159654f9b83a224b
parent093d4bc1731dfe4ec209d3534608a38436331586
net/mlx5e: Remove mlx5e_priv usage from mlx5e_build_*tir_ctx*()

The functions that build TIR context for TIR create and modify commands
used to depend on struct mlx5e_priv and fetch some values directly from
different places. It increased coupling of code and the chance of weird
misbehavior due to hidden complex dependencies.

As the first step, this commit removes the priv parameter from these
functions. Instead, the necessary values are passed directly.

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c