mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
net/mlx5: Simplify eswitch mode check
Provide mlx5_core device instead of "priv" pointer while checking eswith mode. Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
This commit is contained in:
@@ -138,13 +138,6 @@ static int mlx5_ib_create_counters(struct ib_counters *counters,
|
||||
}
|
||||
|
||||
|
||||
static bool is_mdev_switchdev_mode(const struct mlx5_core_dev *mdev)
|
||||
{
|
||||
return MLX5_ESWITCH_MANAGER(mdev) &&
|
||||
mlx5_ib_eswitch_mode(mdev->priv.eswitch) ==
|
||||
MLX5_ESWITCH_OFFLOADS;
|
||||
}
|
||||
|
||||
static const struct mlx5_ib_counters *get_counters(struct mlx5_ib_dev *dev,
|
||||
u8 port_num)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user