From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 51B82239 for ; Fri, 15 Dec 2017 13:48:09 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D92D320C1B; Fri, 15 Dec 2017 07:48:08 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 15 Dec 2017 07:48:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=g2O/qV1F+iX6Yma+H6PSMoAYDXcBco407a3bpMlbLTw=; b=q/CWl89k sxZ4NA3WOEMPBHl9a57UsPtk0D+VOtpBi03q5MmKT7UJe3IDqlOTqyrmgpLcKNwY qQDUHiLH3uegRnKsTfei5Nu82zDjEDbGMq+f7QVvh55yIQoseUofbtUZsN9Lm1rt xo+uBb12pEk7AJVaGLw7tvlCo5rv1wwUzPhIR304cI/oRLe21YV+hefohziEwaN5 epX7ITSYmnIxURKuL/dDseb0CHWmmsHmxSS72yyo6T9alewvOusANsETIOP4eASD Bly7ofD9USAXDF9AcLUv1sULtG8F8OrlRtvdNxM7uoDGpYkgyorOEwQ//zWGihPl obn2dsWctVEy6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=g2O/qV1F+iX6Yma+H6PSMoAYDXcBc o407a3bpMlbLTw=; b=jOe2N9CG5R1Kbj200mrIzUPbxext7e0xZemaxwapLPRNd Ms3rMPAlG/UjSnapPy7X2PlTU7ooSrgolpCLANMpjtKs036W4MbHJXJZIbyBggNB cK5qZcIB2whpwe6FhRGvktwRwr2PfYrPjResr7MaMJ2mwXSp9XH4Kc8DZD6BVBW2 XziRbJ+VB7TdfRyXCa5N/3Y4a4ieGm5QvfBmHtxcUdMbNQWQ0x8rZ3tBJQxpj9Yk 1np48TNdqOvXHzVCX+CEz11P3yePE4gD9+TZcnFwmm1KrB5lMW+bb1LdSB2LFUz2 QfZfYByUOBUcc9NUH1cacyq738K6dYZun2EGFmJAw== X-ME-Sender: Received: from yliu-mob (unknown [218.64.213.205]) by mail.messagingengine.com (Postfix) with ESMTPA id A81FD243B8; Fri, 15 Dec 2017 07:48:07 -0500 (EST) Date: Fri, 15 Dec 2017 20:48:04 +0800 From: Yuanhan Liu To: "Loftus, Ciara" Cc: "Chen, Junjie J" , "dev@dpdk.org" , Maxime Coquelin Message-ID: <20171215124804.GB2439@yliu-mob> References: <1513183856-5639-1-git-send-email-junjie.j.chen@intel.com> <90d47113-c379-8523-2eab-671a15e59de2@redhat.com> <74F120C019F4A64C9B78E802F6AD4CC278E577C9@IRSMSX106.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC278E577C9@IRSMSX106.ger.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH] vhost: fix dequeue zero copy not work with virtio1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 12:48:09 -0000 On Fri, Dec 15, 2017 at 10:33:41AM +0000, Loftus, Ciara wrote: > > > > Hi Junjie, > > > > On 12/13/2017 05:50 PM, Junjie Chen wrote: > > > 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. > > > > > > Signed-off-by: Junjie Chen > > > --- > > > 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; > > > > > > /* > > > > > > > Thanks for fixing this. > > > > Reviewed-by: Maxime Coquelin > > > > Maxime > > Thanks for the fix. Can this be considered for the stable branch? Yes, I think so. Applied to dpdk-next-virtio, with Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Cc: stable@dpdk.org Thanks. --yliu