patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [DPDK] vhost: fix zero-copy cannot be enabled
@ 2020-05-13  2:08 Xuan Ding
  0 siblings, 0 replies; only message in thread
From: Xuan Ding @ 2020-05-13  2:08 UTC (permalink / raw)
  To: qabuild; +Cc: Xuan Ding, stable

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.


Signed-off-by: Xuan Ding <>

* 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-13  2:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  2:08 [dpdk-stable] [DPDK] vhost: fix zero-copy cannot be enabled Xuan Ding

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone