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: sta...@dpdk.org

Signed-off-by: Eugenio Pérez <epere...@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.coque...@redhat.com>

Thanks,
Maxime

Reply via email to