* [PATCH] vhost: fix net control virtqueue used length
@ 2025-06-05 11:35 Eugenio Pérez
2025-06-12 15:44 ` Maxime Coquelin
2025-06-13 8:07 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: Eugenio Pérez @ 2025-06-05 11:35 UTC (permalink / raw)
To: dev; +Cc: David Marchand, Maxime Coquelin, Chenbo Xia, stable
By the standard this is the number of bytes written.
Fixes: 474f4d7840ad ("vhost: add control virtqueue")
Cc: stable@dpdk.org
Signed-off-by: Eugenio Pérez <eperezma@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++;
--
2.49.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vhost: fix net control virtqueue used length
2025-06-05 11:35 [PATCH] vhost: fix net control virtqueue used length Eugenio Pérez
@ 2025-06-12 15:44 ` Maxime Coquelin
2025-06-13 8:07 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2025-06-12 15:44 UTC (permalink / raw)
To: Eugenio Pérez, dev; +Cc: David Marchand, Chenbo Xia, stable
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@dpdk.org
>
> Signed-off-by: Eugenio Pérez <eperezma@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++;
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vhost: fix net control virtqueue used length
2025-06-05 11:35 [PATCH] vhost: fix net control virtqueue used length Eugenio Pérez
2025-06-12 15:44 ` Maxime Coquelin
@ 2025-06-13 8:07 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2025-06-13 8:07 UTC (permalink / raw)
To: Eugenio Pérez, dev; +Cc: David Marchand, Chenbo Xia, stable
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@dpdk.org
>
> Signed-off-by: Eugenio Pérez <eperezma@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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-13 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-05 11:35 [PATCH] vhost: fix net control virtqueue used length Eugenio Pérez
2025-06-12 15:44 ` Maxime Coquelin
2025-06-13 8:07 ` Maxime Coquelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).