]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vdpa/mlx5: Don't reset VQs more than necessary
authorDragos Tatulea <dtatulea@nvidia.com>
Wed, 26 Jun 2024 10:26:59 +0000 (13:26 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jul 2024 12:42:50 +0000 (08:42 -0400)
commit2638134f710364c9e696a155bf16c6847959b1d9
treebf79c317bdcf8e8ab74e89fd7902f247f87fa69a
parent0fe963d6fc162cd8c9b6c82205ea62e69088c063
vdpa/mlx5: Don't reset VQs more than necessary

The vdpa device can be reset many times in sequence without any
significant state changes in between. Previously this was not a problem:
VQs were torn down only on first reset. But after VQ pre-creation was
introduced, each reset will delete and re-create the hardware VQs and
their associated resources.

To solve this problem, avoid resetting hardware VQs if the VQs are still
in a blank state.

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-23-560c491078df@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/net/mlx5_vnet.c