DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Yinan" <yinan.wang@intel.com>
To: "Ding, Xuan" <xuan.ding@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Ding, Xuan" <xuan.ding@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: zero_copy incompatible with client mode
Date: Wed, 29 Apr 2020 08:33:29 +0000	[thread overview]
Message-ID: <aed49368a922487b96057a58f09f7674@intel.com> (raw)
In-Reply-To: <20200429025946.48096-1-xuan.ding@intel.com>

Tested-by: Yinan Wang <yinan.wang@intel.com>

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xuan Ding
> Sent: 2020年4月29日 11:00
> To: maxime.coquelin@redhat.com; Wang, Zhihong <zhihong.wang@intel.com>;
> Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>
> Subject: [dpdk-dev] [PATCH] vhost: zero_copy incompatible with client mode
> 
> In server mode, virtio-user inits under the assumption that vhost-user supports a
> list of features. However, this could be problematic when in_order feature is
> negotiated but not supported by vhost-user when enables dequeue_zero_copy
> later.
> 
> Add handling when vhost-user enables dequeue_zero_copy as client.
> 
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> ---
>  lib/librte_vhost/socket.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index
> 7c8012179..bb8d0d780 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -926,6 +926,12 @@ rte_vhost_driver_register(const char *path, uint64_t
> flags)
>  			ret = -1;
>  			goto out_mutex;
>  		}
> +		if (!vsocket->is_server) {
> +			VHOST_LOG_CONFIG(ERR,
> +			"error: zero copy is incompatible with vhost client
> mode\n");
> +			ret = -1;
> +			goto out_mutex;
> +		}
>  		vsocket->supported_features &= ~(1ULL <<
> VIRTIO_F_IN_ORDER);
>  		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
> 
> --
> 2.17.1


  reply	other threads:[~2020-04-29  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  2:59 Xuan Ding
2020-04-29  8:33 ` Wang, Yinan [this message]
2020-04-29  8:46   ` Maxime Coquelin
2020-04-29 11:48 ` Maxime Coquelin
2020-04-30  8:13 ` Maxime Coquelin

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=aed49368a922487b96057a58f09f7674@intel.com \
    --to=yinan.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=xiaolong.ye@intel.com \
    --cc=xuan.ding@intel.com \
    --cc=zhihong.wang@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).