vhost: fix dequeue_zero_zopy cannot be enabled
Checks
Commit Message
Use flag instead of vsocket->is_server to determine whether vhost is
in client mode. Because vsocket->is_server is not ready yet.
Cc: stable@dpdk.org
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
lib/librte_vhost/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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) {
VHOST_LOG_CONFIG(ERR,
"error: zero copy is incompatible with vhost client mode\n");
ret = -1;