]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Bridge, obtain core device from eswitch instead of priv
authorVlad Buslov <vladbu@nvidia.com>
Sun, 18 Jul 2021 15:55:45 +0000 (18:55 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 16 Aug 2021 23:17:30 +0000 (16:17 -0700)
commitf2e9c6414e1bae3d6d894f108a50b0d7dcb19077
tree7d8c739457b4ca9b541e16f74895c0fca49d28d9
parentdd37c808813caedae324351eca4da50b00fc7ad4
net/mlx5: Bridge, obtain core device from eswitch instead of priv

Following patches in series will pass bond device to bridge, which means
the code can't assume the device is mlx5 representor. Moreover, the core
device can be easily obtained from eswitch instance, so there is no reason
for more complex code that obtains struct mlx5_priv from net_device in
order to use its mdev. Refactor the code to use esw->dev instead of
priv->mdev.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c