summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2018-11-07 16:34:52 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-12-17 11:03:27 -0800
commitaec002f6f82cbfb39f92605614a88dd7a200a766 (patch)
tree90343cc5c6e919693df6ad397902c96989253dad /drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
parent13e509a4c1949855ddd5ef2e23bafdfb27b8337a (diff)
net/mlx5e: Uninstantiate esw manager vport netdev on switchdev mode
Now, when we have a dedicated uplink representor, the netdev instance set over the esw manager vport (PF) is of no-use. As such, remove it once we're on switchdev mode and get it back to life when off switchdev. This is done by reloading the Ethernet interface as well (we already do that for the IB interface) from the eswitch code while going in/out of switchdev mode. The Eth add/remove entries are modified to act differently when called in switchdev mode. In this case we only deal with registration of the eth vport representors. The rep netdevices are created from the eswitch call to load the registered eth representors. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rep.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_rep.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
index bb2d2484eb64..5645d3cef1bb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
@@ -162,8 +162,8 @@ struct mlx5e_rep_sq {
};
void *mlx5e_alloc_nic_rep_priv(struct mlx5_core_dev *mdev);
-void mlx5e_rep_register_vport_reps(struct mlx5e_priv *priv);
-void mlx5e_rep_unregister_vport_reps(struct mlx5e_priv *priv);
+void mlx5e_rep_register_vport_reps(struct mlx5_core_dev *mdev);
+void mlx5e_rep_unregister_vport_reps(struct mlx5_core_dev *mdev);
bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv);
int mlx5e_add_sqs_fwd_rules(struct mlx5e_priv *priv);
void mlx5e_remove_sqs_fwd_rules(struct mlx5e_priv *priv);
@@ -177,8 +177,6 @@ void mlx5e_rep_encap_entry_detach(struct mlx5e_priv *priv,
void mlx5e_rep_queue_neigh_stats_work(struct mlx5e_priv *priv);
#else /* CONFIG_MLX5_ESWITCH */
-static inline void mlx5e_rep_register_vport_reps(struct mlx5e_priv *priv) {}
-static inline void mlx5e_rep_unregister_vport_reps(struct mlx5e_priv *priv) {}
static inline bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv) { return false; }
static inline int mlx5e_add_sqs_fwd_rules(struct mlx5e_priv *priv) { return 0; }
static inline void mlx5e_remove_sqs_fwd_rules(struct mlx5e_priv *priv) {}