DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xuan Ding <xuan.ding@intel.com>
To: maxime.coquelin@redhat.com, zhihong.wang@intel.com,
Cc: dev@dpdk.org, Xuan Ding <xuan.ding@intel.com>
Subject: [dpdk-dev] [PATCH v4] vhost: fix zero-copy cannot be enabled
Date: Tue, 19 May 2020 10:15:46 +0000	[thread overview]
Message-ID: <20200519101546.50719-1-xuan.ding@intel.com> (raw)
In-Reply-To: <20200512095155.98708-1-xuan.ding@intel.com>

This patch fixes the situation where vhost-user cannot start as server with
dequeue_zero_copy enabled.

Using flag instead of vsocket->is_server to determine whether vhost-user is
in client mode. Because vsocket->is_server is not ready at this time.

Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>

* Added in reply to the first Message Id.

* Removed Cc to stable and added fixes label.

* Added the description of problem solved in commit log.
 lib/librte_vhost/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index bb8d0d780..0a66ef976 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 			ret = -1;
 			goto out_mutex;
-		if (!vsocket->is_server) {
+		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
 			"error: zero copy is incompatible with vhost client mode\n");
 			ret = -1;

  parent reply	other threads:[~2020-05-19 10:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  9:51 [dpdk-dev] [PATCH] vhost: fix dequeue_zero_zopy " Xuan Ding
2020-05-13  2:14 ` [dpdk-dev] [PATCH v2] vhost: fix zero-copy " Xuan Ding
2020-05-19  6:28   ` Ye Xiaolong
2020-05-19  7:13     ` Ye Xiaolong
2020-05-19 13:43       ` Ferruh Yigit
2020-05-19  7:03   ` Wang, Yinan
2020-05-19 10:15 ` Xuan Ding [this message]
2020-05-19 13:43   ` [dpdk-dev] [PATCH v4] " 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200519101546.50719-1-xuan.ding@intel.com \
    --to=xuan.ding@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=xiaolong.ye@intel.com \
    --cc=zhihong.wang@intel.com \


* 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).