Thread (1 message) 1 message, 1 author, 2021-12-03

Re: [PATCH 7/7] vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps()

From: Jason Wang <hidden>
Date: 2021-12-03 02:37:53

On Thu, Dec 2, 2021 at 3:58 AM Eli Cohen [off-list ref] wrote:
Restore ndev->cur_num_vqs to the original value in case change_num_qps()
fails.

Fixes: 52893733f2c5 ("vdpa/mlx5: Add multiqueue support")
Signed-off-by: Eli Cohen <redacted>
Acked-by: Jason Wang <redacted>
quoted hunk
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 81a602ff68b5..baeff15d4b95 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1552,6 +1552,8 @@ static int change_num_qps(struct mlx5_vdpa_dev *mvdev, int newqps)
        for (--i; i >= cur_qps; --i)
                teardown_vq(ndev, &ndev->vqs[i]);

+       ndev->cur_num_vqs = 2 * cur_qps;
+
        return err;
 }

--
2.33.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help