[PATCH] vhost: fix net control virtqueue used length
Maxime Coquelin
maxime.coquelin at redhat.com
Fri Jun 13 10:07:47 CEST 2025
On 6/5/25 1:35 PM, Eugenio Pérez wrote:
> By the standard this is the number of bytes written.
>
> Fixes: 474f4d7840ad ("vhost: add control virtqueue")
> Cc: stable at dpdk.org
>
> Signed-off-by: Eugenio Pérez <eperezma at redhat.com>
> ---
> lib/vhost/virtio_net_ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/vhost/virtio_net_ctrl.c b/lib/vhost/virtio_net_ctrl.c
> index 63c0a06b4f..603a8db728 100644
> --- a/lib/vhost/virtio_net_ctrl.c
> +++ b/lib/vhost/virtio_net_ctrl.c
> @@ -229,7 +229,7 @@ virtio_net_ctrl_push(struct virtio_net *dev, struct virtio_net_ctrl_elem *ctrl_e
>
> used_elem = &cvq->used->ring[cvq->last_used_idx & (cvq->size - 1)];
> used_elem->id = ctrl_elem->head_idx;
> - used_elem->len = ctrl_elem->n_descs;
> + used_elem->len = sizeof(*ctrl_elem->desc_ack);
>
> cvq->last_used_idx++;
>
Applied to next-virtio/for-net-next.
Thanks,
Maxime
More information about the dev
mailing list