]> 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)
commit56fc6cadac591251cec758dbec86094a78f825b3
treeeec235cddd3fd5cc02581fa4159654f9b83a224b
parent98278bf5c05ee8c426617d3afbcfec5e56410c10
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