DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Yang, Zhiyong" <zhiyong.yang@intel.com>
To: "Bie, Tiwei" <tiwei.bie@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] net/virtio-user: fix multiple queues fail in server mode
Date: Fri, 11 May 2018 03:01:22 +0000	[thread overview]
Message-ID: <E182254E98A5DA4EB1E657AC7CB9BD2A8B0BE4A0@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <20180511024951.boqwhaegsjmum32i@debian>



> -----Original Message-----
> From: Bie, Tiwei
> Sent: Friday, May 11, 2018 10:50 AM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>;
> maxime.coquelin@redhat.com; stable@dpdk.org
> Subject: Re: [PATCH v3] net/virtio-user: fix multiple queues fail in server
> mode
> 
> On Fri, May 11, 2018 at 10:12:47AM +0800, zhiyong.yang@intel.com wrote:
> [...]
> > @@ -447,11 +447,17 @@ virtio_user_handle_mq(struct virtio_user_dev
> *dev, uint16_t q_pairs)
> >  		return -1;
> >  	}
> >
> > -	for (i = 0; i < q_pairs; ++i)
> > -		ret |= dev->ops->enable_qp(dev, i, 1);
> > -	for (i = q_pairs; i < dev->max_queue_pairs; ++i)
> > -		ret |= dev->ops->enable_qp(dev, i, 0);
> > -
> > +	/* Server mode can't enable queue pairs if vhostfd is invalid,
> > +	 * always return 0 in this case.
> > +	 */
> > +	if (dev->vhostfd >= 0)  {
> 
> There are two spaces between ')' and '{'.
> 
> > +		for (i = 0; i < q_pairs; ++i)
> > +			ret |= dev->ops->enable_qp(dev, i, 1);
> > +		for (i = q_pairs; i < dev->max_queue_pairs; ++i)
> > +			ret |= dev->ops->enable_qp(dev, i, 0);
> > +	} else if (!dev->is_server) {
> > +		ret = ~0;
> > +	}
> >  	dev->queue_pairs = q_pairs;
> >
> >  	return ret;
> [...]
> > @@ -37,6 +38,25 @@ virtio_user_server_reconnect(struct virtio_user_dev
> *dev)
> >  		return -1;
> >
> >  	dev->vhostfd = connectfd;
> > +	if (dev->ops->send_request(dev, VHOST_USER_GET_FEATURES,
> > +				   &dev->device_features) < 0) {
> > +		PMD_INIT_LOG(ERR, "get_features failed: %s",
> > +			     strerror(errno));
> > +		return -1;
> > +	}
> > +
> > +	features &= ~dev->device_features;
> > +	/* For following bits, vhost-user doesn't really need to know */
> > +	features &= ~(1ull << VIRTIO_NET_F_MAC);
> > +	features &= ~(1ull << VIRTIO_NET_F_CTRL_VLAN);
> > +	features &= ~(1ull << VIRTIO_NET_F_CTRL_MAC_ADDR);
> > +	features &= ~(1ull << VIRTIO_NET_F_STATUS);
> > +	if (features)
> > +		PMD_INIT_LOG(ERR, "WARNING: Some features 0x%"
> PRIx64 "are not supported by vhost-user!",
> 
> A space is missing before "are not ...". Should be: " are not ..."
> 
> 
> Other than above small typos,
> 
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

Thanks Tiwei,  will send a new version to fix the typoes.
Thanks
Zhiyong

  reply	other threads:[~2018-05-11  3:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  9:49 [dpdk-dev] [PATCH] " 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
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 [this message]
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=E182254E98A5DA4EB1E657AC7CB9BD2A8B0BE4A0@BGSMSX101.gar.corp.intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).