]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Initialize CVQ vringh only once
authorEli Cohen <elic@nvidia.com>
Mon, 13 Jun 2022 07:59:58 +0000 (10:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:33 +0000 (21:24 +0200)
commit03ca05d9f8f30a5a41ac2be85b4ba6c357d00f63
treecb295b2f094e73ff8fa8d788dedbf97e3a4443de
parent042da5295823a86fd5d3863ab114fc6e5bcffd2a
vdpa/mlx5: Initialize CVQ vringh only once

[ Upstream commit 901733b5e0fde33dc6024eca77625cc7fcd2db35 ]

Currently, CVQ vringh is initialized inside setup_virtqueues() which is
called every time a memory update is done. This is undesirable since it
resets all the context of the vring, including the available and used
indices.

Move the initialization to mlx5_vdpa_set_status() when
VIRTIO_CONFIG_S_DRIVER_OK is set.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220613075958.511064-2-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vdpa/mlx5/net/mlx5_vnet.c