[EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev reset
Shiva Shankar Kommula
kshankar at marvell.com
Fri Sep 6 12:14:40 CEST 2024
Hello Maxime,
could you please review the following change ?
Thanks
> Subject: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev
> reset
>
> When the virtio device is reinitialized during ethdev reconfiguration, all the
> virtio rings are recreated and repopulated on the device. Accordingly, reset the
> used index counter value back to zero. Signed-off-by: Kommula Shiva Shankar
> <kshankar@ marvell. com>
> When the virtio device is reinitialized during ethdev reconfiguration, all the
> virtio rings are recreated and repopulated on the device.
> Accordingly, reset the used index counter value back to zero.
>
> Signed-off-by: Kommula Shiva Shankar <kshankar at marvell.com>
> ---
> drivers/net/virtio/virtio_user_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
> b/drivers/net/virtio/virtio_user_ethdev.c
> index ae6593ba0b..d60c7e188c 100644
> --- a/drivers/net/virtio/virtio_user_ethdev.c
> +++ b/drivers/net/virtio/virtio_user_ethdev.c
> @@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue
> *vq,
> vring->device = (void *)(uintptr_t)used_addr;
> dev->packed_queues[queue_idx].avail_wrap_counter = true;
> dev->packed_queues[queue_idx].used_wrap_counter = true;
> + dev->packed_queues[queue_idx].used_idx = 0;
>
> for (i = 0; i < vring->num; i++)
> vring->desc[i].flags = 0;
> --
> 2.43.0
More information about the dev
mailing list