diff options
author | Mark Bloch <markb@mellanox.com> | 2018-01-23 14:24:13 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-02-23 23:36:39 +0300 |
commit | c5447c70594b6a8e1e62a9dd9373813cb38f1c69 (patch) | |
tree | 54ddc5661098fc02d327acb484a8afd7a092bd89 /drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | |
parent | b5ca15ad7e6189f39dff73d786e41d2a507f7b8b (diff) | |
download | linux-c5447c70594b6a8e1e62a9dd9373813cb38f1c69.tar.xz |
net/mlx5: E-Switch, Reload IB interface when switching devlink modes
Up until this point it wasn't possible to activate IB representors
when switching to switchdev mode, remove this limitation.
We trigger reload of the PF IB interface in order to make sure that
already allocated resources are invalid and new resources will be opened
correctly with all the limitations of switchdev mode applied (only raw
packet capabilities, without RoCE). We also move the remove/add to a
place where the E-Switch mode is set/unset to better control when to
trigger this action, this will allow the IB side to start in the correct
mode.
For better code reuse, create a function which reloads an interface and
export it.
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h index ee1a42a078ee..4e25f2b2e0bc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h @@ -201,4 +201,5 @@ static inline int mlx5_lag_is_lacp_owner(struct mlx5_core_dev *dev) int mlx5_lag_allow(struct mlx5_core_dev *dev); int mlx5_lag_forbid(struct mlx5_core_dev *dev); +void mlx5_reload_interface(struct mlx5_core_dev *mdev, int protocol); #endif /* __MLX5_CORE_H__ */ |