diff --git a/lib/vhost/rte_vhost_compat.c b/lib/vhost/rte_vhost_compat.c index 85cce3dc9..3c9f69188 100644 --- a/lib/vhost/rte_vhost_compat.c +++ b/lib/vhost/rte_vhost_compat.c @@ -46,6 +46,7 @@ #include "spdk/barrier.h" #include "spdk/vhost.h" #include "vhost_internal.h" +#include #include "spdk_internal/vhost_user.h" @@ -331,7 +332,11 @@ vhost_register_unix_socket(const char *path, const char *ctrl_name, } } +#if RTE_VERSION < RTE_VERSION_NUM(20, 8, 0, 0) + if (rte_vhost_driver_register(path, 0) != 0) { +#else if (rte_vhost_driver_register(path, RTE_VHOST_USER_ASYNC_COPY) != 0) { +#endif SPDK_ERRLOG("Could not register controller %s with vhost library\n", ctrl_name); SPDK_ERRLOG("Check if domain socket %s already exists\n", path); return -EIO;