Skip to content

Commit

Permalink
IB/mlx5: Rename RoCE related helpers to reflect being Eth ones
Browse files Browse the repository at this point in the history
This is a pre-step towards having mlx5 IB device also over Eth ports where
RoCE is not supported. We change the roce enable/disable and roce_lag
init/fini function names to have _eth instead of _roce.

This patch doesn't change any functionality.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Or Gerlitz authored and Doug Ledford committed Dec 13, 2016
1 parent d012f5d commit 45f95ac
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/infiniband/hw/mlx5/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ static void get_dev_fw_str(struct ib_device *ibdev, char *str,
fw_rev_min(dev->mdev), fw_rev_sub(dev->mdev));
}

static int mlx5_roce_lag_init(struct mlx5_ib_dev *dev)
static int mlx5_eth_lag_init(struct mlx5_ib_dev *dev)
{
struct mlx5_core_dev *mdev = dev->mdev;
struct mlx5_flow_namespace *ns = mlx5_get_flow_namespace(mdev,
Expand Down Expand Up @@ -2831,7 +2831,7 @@ static int mlx5_roce_lag_init(struct mlx5_ib_dev *dev)
return err;
}

static void mlx5_roce_lag_cleanup(struct mlx5_ib_dev *dev)
static void mlx5_eth_lag_cleanup(struct mlx5_ib_dev *dev)
{
struct mlx5_core_dev *mdev = dev->mdev;

Expand Down Expand Up @@ -2865,7 +2865,7 @@ static void mlx5_remove_netdev_notifier(struct mlx5_ib_dev *dev)
}
}

static int mlx5_enable_roce(struct mlx5_ib_dev *dev)
static int mlx5_enable_eth(struct mlx5_ib_dev *dev)
{
int err;

Expand All @@ -2877,7 +2877,7 @@ static int mlx5_enable_roce(struct mlx5_ib_dev *dev)
if (err)
goto err_unregister_netdevice_notifier;

err = mlx5_roce_lag_init(dev);
err = mlx5_eth_lag_init(dev);
if (err)
goto err_disable_roce;

Expand All @@ -2891,9 +2891,9 @@ static int mlx5_enable_roce(struct mlx5_ib_dev *dev)
return err;
}

static void mlx5_disable_roce(struct mlx5_ib_dev *dev)
static void mlx5_disable_eth(struct mlx5_ib_dev *dev)
{
mlx5_roce_lag_cleanup(dev);
mlx5_eth_lag_cleanup(dev);
mlx5_nic_vport_disable_roce(dev->mdev);
}

Expand Down Expand Up @@ -3199,14 +3199,14 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
spin_lock_init(&dev->reset_flow_resource_lock);

if (ll == IB_LINK_LAYER_ETHERNET) {
err = mlx5_enable_roce(dev);
err = mlx5_enable_eth(dev);
if (err)
goto err_dealloc;
}

err = create_dev_resources(&dev->devr);
if (err)
goto err_disable_roce;
goto err_disable_eth;

err = mlx5_ib_odp_init_one(dev);
if (err)
Expand Down Expand Up @@ -3250,9 +3250,9 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
err_rsrc:
destroy_dev_resources(&dev->devr);

err_disable_roce:
err_disable_eth:
if (ll == IB_LINK_LAYER_ETHERNET) {
mlx5_disable_roce(dev);
mlx5_disable_eth(dev);
mlx5_remove_netdev_notifier(dev);
}

Expand All @@ -3277,7 +3277,7 @@ static void mlx5_ib_remove(struct mlx5_core_dev *mdev, void *context)
mlx5_ib_odp_remove_one(dev);
destroy_dev_resources(&dev->devr);
if (ll == IB_LINK_LAYER_ETHERNET)
mlx5_disable_roce(dev);
mlx5_disable_eth(dev);
kfree(dev->port);
ib_dealloc_device(&dev->ib_dev);
}
Expand Down

0 comments on commit 45f95ac

Please sign in to comment.