]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc68bfa0e124d877df4cc67e8ddf8e607eaa553e9
treeeec235cddd3fd5cc02581fa4159654f9b83a224b
parent195925f7e76002f51a702bc2f72150d437c20237
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