[dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' has been queued to LTS release 17.11.1

Yuanhan Liu yliu at fridaylinux.org
Wed Jan 24 16:32:15 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4e3a3edf297b981d35c63e7a0a7c6286cfae3ee4 Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen at intel.com>
Date: Wed, 13 Dec 2017 11:50:56 -0500
Subject: [PATCH] vhost: fix dequeue zero copy with virtio1

[ upstream commit 803aeecef123877764aac56270180e920aea8863 ]

This fix dequeue zero copy can not work with Qemu
version >= 2.7. Since from Qemu 2.7 virtio device
use virtio-1 protocol, the zero copy code path
forget to add offset to buffer address.

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")

Signed-off-by: Junjie Chen <junjie.j.chen at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Yuanhan Liu <yliu at fridaylinux.org>
---
 lib/librte_vhost/virtio_net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 6fee16e..79d80f7 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -977,7 +977,8 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
 					desc->addr + desc_offset, cpy_len)))) {
 			cur->data_len = cpy_len;
 			cur->data_off = 0;
-			cur->buf_addr = (void *)(uintptr_t)desc_addr;
+			cur->buf_addr = (void *)(uintptr_t)(desc_addr
+				+ desc_offset);
 			cur->buf_iova = hpa;
 
 			/*
-- 
2.7.4



More information about the stable mailing list