[PATCH] vhost: fix net control virtqueue used length
Eugenio Pérez
eperezma at redhat.com
Thu Jun 5 13:35:34 CEST 2025
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++;
--
2.49.0
More information about the dev
mailing list