mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 23:00:21 +00:00
vdpa/mlx5: Iterate over active VQs during suspend/resume
No need to iterate over max number of VQs. Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Acked-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Message-Id: <20240626-stage-vdpa-vq-precreate-v2-5-560c491078df@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ad80739262
commit
34bd86c720
@ -1504,7 +1504,7 @@ static void suspend_vqs(struct mlx5_vdpa_net *ndev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ndev->mvdev.max_vqs; i++)
|
||||
for (i = 0; i < ndev->cur_num_vqs; i++)
|
||||
suspend_vq(ndev, &ndev->vqs[i]);
|
||||
}
|
||||
|
||||
@ -1522,7 +1522,7 @@ static void resume_vq(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mv
|
||||
|
||||
static void resume_vqs(struct mlx5_vdpa_net *ndev)
|
||||
{
|
||||
for (int i = 0; i < ndev->mvdev.max_vqs; i++)
|
||||
for (int i = 0; i < ndev->cur_num_vqs; i++)
|
||||
resume_vq(ndev, &ndev->vqs[i]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user