Commit b5a498ba authored by Michael Guralnik's avatar Michael Guralnik Committed by Saeed Mahameed

IB/mlx5: Rename profile and init methods

Rename uplink_rep_profile and its unique init and cleanup stages to
suit its upcoming use as the profile when RoCE is disabled.
Signed-off-by: default avatarMichael Guralnik <michaelgur@mellanox.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent cc9defcb
...@@ -35,7 +35,7 @@ mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) ...@@ -35,7 +35,7 @@ mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
int vport_index; int vport_index;
if (rep->vport == MLX5_VPORT_UPLINK) if (rep->vport == MLX5_VPORT_UPLINK)
profile = &uplink_rep_profile; profile = &raw_eth_profile;
else else
return mlx5_ib_set_vport_rep(dev, rep); return mlx5_ib_set_vport_rep(dev, rep);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "mlx5_ib.h" #include "mlx5_ib.h"
#ifdef CONFIG_MLX5_ESWITCH #ifdef CONFIG_MLX5_ESWITCH
extern const struct mlx5_ib_profile uplink_rep_profile; extern const struct mlx5_ib_profile raw_eth_profile;
u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw); u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw);
struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw, struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
......
...@@ -6444,7 +6444,7 @@ static const struct ib_device_ops mlx5_ib_dev_port_rep_ops = { ...@@ -6444,7 +6444,7 @@ static const struct ib_device_ops mlx5_ib_dev_port_rep_ops = {
.query_port = mlx5_ib_rep_query_port, .query_port = mlx5_ib_rep_query_port,
}; };
static int mlx5_ib_stage_rep_non_default_cb(struct mlx5_ib_dev *dev) static int mlx5_ib_stage_raw_eth_non_default_cb(struct mlx5_ib_dev *dev)
{ {
ib_set_device_ops(&dev->ib_dev, &mlx5_ib_dev_port_rep_ops); ib_set_device_ops(&dev->ib_dev, &mlx5_ib_dev_port_rep_ops);
return 0; return 0;
...@@ -6484,7 +6484,7 @@ static void mlx5_ib_stage_common_roce_cleanup(struct mlx5_ib_dev *dev) ...@@ -6484,7 +6484,7 @@ static void mlx5_ib_stage_common_roce_cleanup(struct mlx5_ib_dev *dev)
mlx5_remove_netdev_notifier(dev, port_num); mlx5_remove_netdev_notifier(dev, port_num);
} }
static int mlx5_ib_stage_rep_roce_init(struct mlx5_ib_dev *dev) static int mlx5_ib_stage_raw_eth_roce_init(struct mlx5_ib_dev *dev)
{ {
struct mlx5_core_dev *mdev = dev->mdev; struct mlx5_core_dev *mdev = dev->mdev;
enum rdma_link_layer ll; enum rdma_link_layer ll;
...@@ -6500,7 +6500,7 @@ static int mlx5_ib_stage_rep_roce_init(struct mlx5_ib_dev *dev) ...@@ -6500,7 +6500,7 @@ static int mlx5_ib_stage_rep_roce_init(struct mlx5_ib_dev *dev)
return err; return err;
} }
static void mlx5_ib_stage_rep_roce_cleanup(struct mlx5_ib_dev *dev) static void mlx5_ib_stage_raw_eth_roce_cleanup(struct mlx5_ib_dev *dev)
{ {
mlx5_ib_stage_common_roce_cleanup(dev); mlx5_ib_stage_common_roce_cleanup(dev);
} }
...@@ -6807,7 +6807,7 @@ static const struct mlx5_ib_profile pf_profile = { ...@@ -6807,7 +6807,7 @@ static const struct mlx5_ib_profile pf_profile = {
mlx5_ib_stage_delay_drop_cleanup), mlx5_ib_stage_delay_drop_cleanup),
}; };
const struct mlx5_ib_profile uplink_rep_profile = { const struct mlx5_ib_profile raw_eth_profile = {
STAGE_CREATE(MLX5_IB_STAGE_INIT, STAGE_CREATE(MLX5_IB_STAGE_INIT,
mlx5_ib_stage_init_init, mlx5_ib_stage_init_init,
mlx5_ib_stage_init_cleanup), mlx5_ib_stage_init_cleanup),
...@@ -6818,11 +6818,11 @@ const struct mlx5_ib_profile uplink_rep_profile = { ...@@ -6818,11 +6818,11 @@ const struct mlx5_ib_profile uplink_rep_profile = {
mlx5_ib_stage_caps_init, mlx5_ib_stage_caps_init,
NULL), NULL),
STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB, STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB,
mlx5_ib_stage_rep_non_default_cb, mlx5_ib_stage_raw_eth_non_default_cb,
NULL), NULL),
STAGE_CREATE(MLX5_IB_STAGE_ROCE, STAGE_CREATE(MLX5_IB_STAGE_ROCE,
mlx5_ib_stage_rep_roce_init, mlx5_ib_stage_raw_eth_roce_init,
mlx5_ib_stage_rep_roce_cleanup), mlx5_ib_stage_raw_eth_roce_cleanup),
STAGE_CREATE(MLX5_IB_STAGE_SRQ, STAGE_CREATE(MLX5_IB_STAGE_SRQ,
mlx5_init_srq_table, mlx5_init_srq_table,
mlx5_cleanup_srq_table), mlx5_cleanup_srq_table),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment