* [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring
@ 2018-10-23 6:07 Tiwei Bie
2018-10-23 8:19 ` Maxime Coquelin
2018-10-23 9:41 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: Tiwei Bie @ 2018-10-23 6:07 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev; +Cc: stable
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 <tiwei.bie@intel.com>
---
lib/librte_vhost/virtio_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 48228f16b..4e6c35d56 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))
--
2.19.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring
2018-10-23 6:07 [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring Tiwei Bie
@ 2018-10-23 8:19 ` Maxime Coquelin
2018-10-23 9:41 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2018-10-23 8:19 UTC (permalink / raw)
To: Tiwei Bie, zhihong.wang, dev; +Cc: stable
Hi Tiwei,
On 10/23/2018 08:07 AM, Tiwei Bie wrote:
> 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 <tiwei.bie@intel.com>
> ---
> lib/librte_vhost/virtio_net.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index 48228f16b..4e6c35d56 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))
>
Good catch, I guess I didn't felt into that bug because my test-cases
were too simple (single descriptor were enough).
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring
2018-10-23 6:07 [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring Tiwei Bie
2018-10-23 8:19 ` Maxime Coquelin
@ 2018-10-23 9:41 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2018-10-23 9:41 UTC (permalink / raw)
To: Tiwei Bie, zhihong.wang, dev; +Cc: stable
On 10/23/2018 08:07 AM, Tiwei Bie wrote:
> 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 <tiwei.bie@intel.com>
> ---
> lib/librte_vhost/virtio_net.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index 48228f16b..4e6c35d56 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))
>
Applied to dpdk-next-virtio/master
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-23 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 6:07 [dpdk-dev] [PATCH] vhost: fix vector filling for packed ring Tiwei Bie
2018-10-23 8:19 ` Maxime Coquelin
2018-10-23 9:41 ` 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).