All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: maxime.coquelin@redhat.com, tiwei.bie@intel.com
Cc: dev@dpdk.org, "Kulasek, TomaszX" <tomaszx.kulasek@intel.com>,
	"yliu@fridaylinux.org" <yliu@fridaylinux.org>,
	"Liu, Changpeng" <changpeng.liu@intel.com>
Subject: Re: [PATCH] vhost: fix wait for valid descriptor
Date: Thu, 26 Jul 2018 17:48:04 +0200	[thread overview]
Message-ID: <30052203.PRpXP6jO5E@xps> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E3651439D5C@SHSMSX103.ccr.corp.intel.com>

What is the status of this patch?


11/02/2018 05:21, Tan, Jianfeng:
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek
> > Sent: Saturday, February 10, 2018 1:35 AM
> > To: yliu@fridaylinux.org
> > Cc: dev@dpdk.org; yuanhan.liu@linux.intel.com; stable@dpdk.org; Liu,
> > Changpeng
> > Subject: [dpdk-dev] [PATCH] vhost: fix wait for valid descriptor
> > 
> > For each virt queue's kickfd and callfd, there are 2 invalid
> > status: VIRTIO_UNINITIALIZED_EVENTFD and VIRTIO_INVALID_EVENTFD.
> > Don't set the virt queue to ready status until got the valid
> > descriptor.
> 
> Cannot remember why we introduce two invalid status.
> 
> If we treat "VIRTIO_INVALID_EVENTFD" as an indicator to judge if device is ready, then defining one status (invalid) is enough.
> 
> Thanks,
> Jianfeng
> 
> > 
> > This is safe for polling mode drivers in Guest OS, the backend
> > vhost process will not post notification to interrupt vector for
> > PMD mode in guest, but the interrupt vector still valid.
> > 
> > Fixes: e049ca6d10e0 ("vhost-user: prepare multiple queue setup")
> > Cc: yuanhan.liu@linux.intel.com
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> > Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
> > ---
> >  lib/librte_vhost/vhost_user.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> > index 65ee33919..4508f697b 100644
> > --- a/lib/librte_vhost/vhost_user.c
> > +++ b/lib/librte_vhost/vhost_user.c
> > @@ -766,7 +766,9 @@ vq_is_ready(struct vhost_virtqueue *vq)
> >  {
> >  	return vq && vq->desc && vq->avail && vq->used &&
> >  	       vq->kickfd != VIRTIO_UNINITIALIZED_EVENTFD &&
> > -	       vq->callfd != VIRTIO_UNINITIALIZED_EVENTFD;
> > +	       vq->callfd != VIRTIO_UNINITIALIZED_EVENTFD &&
> > +	       vq->kickfd != VIRTIO_INVALID_EVENTFD &&
> > +	       vq->callfd != VIRTIO_INVALID_EVENTFD;
> >  }
> > 
> >  static int
> > --
> > 2.14.1
> 

  reply	other threads:[~2018-07-26 15:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 17:34 [PATCH] vhost: fix wait for valid descriptor Tomasz Kulasek
2018-02-11  4:21 ` Tan, Jianfeng
2018-07-26 15:48   ` Thomas Monjalon [this message]
2018-07-27  6:11     ` Tiwei Bie

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=30052203.PRpXP6jO5E@xps \
    --to=thomas@monjalon.net \
    --cc=changpeng.liu@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.com \
    --cc=tomaszx.kulasek@intel.com \
    --cc=yliu@fridaylinux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.