From: Tiwei Bie Date: Tue, 23 Oct 2018 06:07:49 +0000 (+0800) Subject: vhost: fix vector filling for packed ring X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=16b9e38e74147fb004fa112c055b2fd500403b36;p=dpdk.git vhost: fix vector filling for packed ring We should return the length of the buffers described by the current descriptor chain after filling the buffer vector. So we need to zero the *len first. Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index f8794ee198..1c31c05625 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -521,6 +521,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq, return -1; *desc_count = 0; + *len = 0; while (1) { if (unlikely(vec_id >= BUF_VECTOR_MAX))