From: Yuanhan Liu <yliu@fridaylinux.org>
To: "Loftus, Ciara" <ciara.loftus@intel.com>
Cc: "Chen, Junjie J" <junjie.j.chen@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: fix dequeue zero copy not work with virtio1
Date: Fri, 15 Dec 2017 20:48:04 +0800 [thread overview]
Message-ID: <20171215124804.GB2439@yliu-mob> (raw)
In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC278E577C9@IRSMSX106.ger.corp.intel.com>
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 <junjie.j.chen@intel.com>
> > > ---
> > > 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.coquelin@redhat.com>
> >
> > 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
next prev parent reply other threads:[~2017-12-15 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 16:50 Junjie Chen
2017-12-13 11:12 ` Maxime Coquelin
2017-12-15 10:33 ` Loftus, Ciara
2017-12-15 12:48 ` Yuanhan Liu [this message]
2017-12-20 5:58 ` Zhao, Bing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171215124804.GB2439@yliu-mob \
--to=yliu@fridaylinux.org \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=junjie.j.chen@intel.com \
--cc=maxime.coquelin@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).