Current qemu vhost net ring start has a dependency on feature bit VHOST_USER_F_PROTOCOL_FEATURES. Without this feature, vhost ring can't enabled and ioevent fd won't be deleted after vhost device stop. That will cause qemu abort when reloading driver. Work around qemu issues by enabling feature bit in vhost user backend.
Signed-off-by: Marvin Liu <yong....@intel.com> diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2175c1186..8573004dd 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1520,7 +1520,10 @@ main(int argc, char *argv[]) } if (builtin_net_driver) - rte_vhost_driver_set_features(file, VIRTIO_NET_FEATURES); + /* Workaround for qemu vhost net device startup */ + rte_vhost_driver_set_features(file, + VIRTIO_NET_FEATURES | + 1ULL << VHOST_USER_F_PROTOCOL_FEATURES); if (mergeable == 0) { rte_vhost_driver_disable_features(file, -- 2.17.0