Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dragos Tatulea and committed by
Michael S. Tsirkin
34bd86c7 ad807392

+2 -2
+2 -2
drivers/vdpa/mlx5/net/mlx5_vnet.c
··· 1504 1504 { 1505 1505 int i; 1506 1506 1507 - for (i = 0; i < ndev->mvdev.max_vqs; i++) 1507 + for (i = 0; i < ndev->cur_num_vqs; i++) 1508 1508 suspend_vq(ndev, &ndev->vqs[i]); 1509 1509 } 1510 1510 ··· 1522 1522 1523 1523 static void resume_vqs(struct mlx5_vdpa_net *ndev) 1524 1524 { 1525 - for (int i = 0; i < ndev->mvdev.max_vqs; i++) 1525 + for (int i = 0; i < ndev->cur_num_vqs; i++) 1526 1526 resume_vq(ndev, &ndev->vqs[i]); 1527 1527 } 1528 1528