vhost: fix zero-copy server mode
authorXuan Ding <xuan.ding@intel.com>
Tue, 19 May 2020 10:15:46 +0000 (10:15 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 May 2020 15:12:17 +0000 (17:12 +0200)
commit22fa1bcbcbc7489304a711c39aea9a1593a873a5
treeebdbc6448d049da406a7bd10b5d4002aab1f4034
parent5ea614254332d8c8b2796835328fd6e623cca793
vhost: fix zero-copy server mode

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")
Cc: stable@dpdk.org
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>
lib/librte_vhost/socket.c