Commit 4a19f294 authored by Dragos Tatulea's avatar Dragos Tatulea Committed by Michael S. Tsirkin

vdpa/mlx5: Rename init_mvqs

Function is used to set default values, so name it accordingly.
Signed-off-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20240626-stage-vdpa-vq-precreate-v2-9-560c491078df@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarEugenio Pérez <eperezma@redhat.com>
parent e5bcbd1d
...@@ -155,7 +155,7 @@ static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx) ...@@ -155,7 +155,7 @@ static bool is_index_valid(struct mlx5_vdpa_dev *mvdev, u16 idx)
} }
static void free_fixed_resources(struct mlx5_vdpa_net *ndev); static void free_fixed_resources(struct mlx5_vdpa_net *ndev);
static void init_mvqs(struct mlx5_vdpa_net *ndev); static void mvqs_set_defaults(struct mlx5_vdpa_net *ndev);
static int setup_vq_resources(struct mlx5_vdpa_net *ndev); static int setup_vq_resources(struct mlx5_vdpa_net *ndev);
static void teardown_vq_resources(struct mlx5_vdpa_net *ndev); static void teardown_vq_resources(struct mlx5_vdpa_net *ndev);
...@@ -2810,7 +2810,7 @@ static void restore_channels_info(struct mlx5_vdpa_net *ndev) ...@@ -2810,7 +2810,7 @@ static void restore_channels_info(struct mlx5_vdpa_net *ndev)
int i; int i;
mlx5_clear_vqs(ndev); mlx5_clear_vqs(ndev);
init_mvqs(ndev); mvqs_set_defaults(ndev);
for (i = 0; i < ndev->mvdev.max_vqs; i++) { for (i = 0; i < ndev->mvdev.max_vqs; i++) {
mvq = &ndev->vqs[i]; mvq = &ndev->vqs[i];
ri = &mvq->ri; ri = &mvq->ri;
...@@ -3023,7 +3023,7 @@ static int mlx5_vdpa_compat_reset(struct vdpa_device *vdev, u32 flags) ...@@ -3023,7 +3023,7 @@ static int mlx5_vdpa_compat_reset(struct vdpa_device *vdev, u32 flags)
down_write(&ndev->reslock); down_write(&ndev->reslock);
unregister_link_notifier(ndev); unregister_link_notifier(ndev);
teardown_vq_resources(ndev); teardown_vq_resources(ndev);
init_mvqs(ndev); mvqs_set_defaults(ndev);
if (flags & VDPA_RESET_F_CLEAN_MAP) if (flags & VDPA_RESET_F_CLEAN_MAP)
mlx5_vdpa_destroy_mr_resources(&ndev->mvdev); mlx5_vdpa_destroy_mr_resources(&ndev->mvdev);
...@@ -3485,7 +3485,7 @@ static void free_fixed_resources(struct mlx5_vdpa_net *ndev) ...@@ -3485,7 +3485,7 @@ static void free_fixed_resources(struct mlx5_vdpa_net *ndev)
res->valid = false; res->valid = false;
} }
static void init_mvqs(struct mlx5_vdpa_net *ndev) static void mvqs_set_defaults(struct mlx5_vdpa_net *ndev)
{ {
struct mlx5_vdpa_virtqueue *mvq; struct mlx5_vdpa_virtqueue *mvq;
int i; int i;
...@@ -3635,7 +3635,7 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name, ...@@ -3635,7 +3635,7 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
} }
ndev->cur_num_vqs = MLX5V_DEFAULT_VQ_COUNT; ndev->cur_num_vqs = MLX5V_DEFAULT_VQ_COUNT;
init_mvqs(ndev); mvqs_set_defaults(ndev);
allocate_irqs(ndev); allocate_irqs(ndev);
init_rwsem(&ndev->reslock); init_rwsem(&ndev->reslock);
config = &ndev->config; config = &ndev->config;
......
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