DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Yang, Zhiyong" <zhiyong.yang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"Yao, Lei A" <lei.a.yao@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"Bie, Tiwei" <tiwei.bie@intel.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/virtio-user: fix multiple queues fail in server mode
Date: Thu, 10 May 2018 01:28:38 +0000	[thread overview]
Message-ID: <E182254E98A5DA4EB1E657AC7CB9BD2A8B0BD425@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <eed5ac9e-1660-8038-94ee-988540e79ecd@intel.com>



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, May 9, 2018 10:49 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>; dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Yao, Lei A <lei.a.yao@intel.com>;
> stable@dpdk.org; Bie, Tiwei <tiwei.bie@intel.com>
> Subject: Re: [dpdk-stable] [PATCH] net/virtio-user: fix multiple queues fail in
> server mode
> 
> On 5/9/2018 10:49 AM, zhiyong.yang@intel.com wrote:
> > This patch fixes multiple queues failure when virtio-user works in
> > server mode.
> >
> > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> > Cc: stable@dpdk.org
> 
> Hi Zhiyong,
> 
> Is this for rc3?
> 

Right. 

> Hi Tiwei,
> 
> Since Maxime is out this week, can you please review this patch?
> 
> Thanks,
> ferruh
> 
> > Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
> > ---
> >  drivers/net/virtio/virtio_user/vhost_user.c      | 3 +++
> >  drivers/net/virtio/virtio_user/virtio_user_dev.c | 9 +++++++++
> >  2 files changed, 12 insertions(+)
> >
> > diff --git a/drivers/net/virtio/virtio_user/vhost_user.c
> > b/drivers/net/virtio/virtio_user/vhost_user.c
> > index a6df97a00..a9e53d7b5 100644
> > --- a/drivers/net/virtio/virtio_user/vhost_user.c
> > +++ b/drivers/net/virtio/virtio_user/vhost_user.c
> > @@ -263,6 +263,9 @@ vhost_user_sock(struct virtio_user_dev *dev,
> >
> >  	PMD_DRV_LOG(INFO, "%s", vhost_msg_strings[req]);
> >
> > +	if (vhostfd < 0)
> > +		return -1;
> > +
Since virtio-user server mode need to start firstly before vhost user, So, In this case, 
the socket connection is not setup, So, we add to check validation of vhostfd here. 

> >  	msg.request = req;
> >  	msg.flags = VHOST_USER_VERSION;
> >  	msg.size = 0;
> > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > index 38b8bc90d..e988dc3f4 100644
> > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > @@ -126,6 +126,10 @@ virtio_user_start_device(struct virtio_user_dev
> *dev)
> >  	features &= ~(1ull << VIRTIO_NET_F_MAC);
> >  	/* Strip VIRTIO_NET_F_CTRL_VQ, as devices do not really need to
> know */
> >  	features &= ~(1ull << VIRTIO_NET_F_CTRL_VQ);
> > +	/* Also disable features which depend on VIRTIO_NET_F_CTRL_VQ
> */
> > +	features &= ~(1ull << VIRTIO_NET_F_CTRL_RX);
> > +	features &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);
> > +	features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);
> >  	features &= ~(1ull << VIRTIO_NET_F_STATUS);
> >  	ret = dev->ops->send_request(dev, VHOST_USER_SET_FEATURES,
> &features);
> >  	if (ret < 0)
> > @@ -488,6 +492,11 @@ virtio_user_handle_ctrl_msg(struct
> virtio_user_dev *dev, struct vring *vring,
> >  		queues = *(uint16_t *)(uintptr_t)vring->desc[idx_data].addr;
> >  		status = virtio_user_handle_mq(dev, queues);
> >  	}
> > +	/* Server mode can't enable queue pairs if vhostfd is not connected,
> > +	 * we suppose that status always returns 0 in this case.
> > +	 * /
> 
> There is a typo here causing comment block not ended.
> 

Thanks so much for your pointing out, Ferruh,  fix it in next version.

Thanks
zhiyong

  parent reply	other threads:[~2018-05-10  1:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  9:49 [dpdk-dev] " zhiyong.yang
2018-05-09 14:48 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-05-10  0:48   ` Tiwei Bie
2018-05-10  1:28   ` Yang, Zhiyong [this message]
2018-05-10  1:38     ` Yang, Zhiyong
2018-05-10  2:47 ` [dpdk-dev] " Tiwei Bie
2018-05-10  3:04   ` Yang, Zhiyong
2018-05-10  4:42     ` Tiwei Bie
2018-05-10  9:36 ` [dpdk-dev] [PATCH v2] " zhiyong.yang
2018-05-10 10:23   ` Tiwei Bie
2018-05-10 14:01     ` Yang, Zhiyong
2018-05-10 14:19       ` Tiwei Bie
2018-05-11  2:12   ` [dpdk-dev] [PATCH v3] " zhiyong.yang
2018-05-11  2:49     ` Tiwei Bie
2018-05-11  3:01       ` Yang, Zhiyong
2018-05-11  3:31     ` [dpdk-dev] [PATCH v4] " zhiyong.yang
2018-05-11 11:33       ` Ferruh Yigit

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=E182254E98A5DA4EB1E657AC7CB9BD2A8B0BD425@BGSMSX101.gar.corp.intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lei.a.yao@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=tiwei.bie@intel.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).