From 9f90145128229b57a10bc6a37ff3c17a01b1f58f Mon Sep 17 00:00:00 2001 From: Xiaolong Ye Date: Mon, 14 Jan 2019 15:34:24 +0800 Subject: [PATCH] vhost: configure vDPA device after set vring call message As qemu will only send VHOST_USER_SET_VRING_ENABLE message for guest enabled vrings (only first queue pair will be enabled at initialized stage), this will cause trouble for multiqueue case, vDPA's dev_conf callback will get no chance be invoked. Decouple the dev_conf callback from VHOST_USER_SET_VRING_ENABLE solves this issue. Signed-off-by: Xiaolong Ye Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 1843e032fc..f2f30369b5 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -2048,7 +2048,7 @@ skip_to_reply: vdpa_dev = rte_vdpa_get_device(did); if (vdpa_dev && virtio_is_ready(dev) && !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) && - msg.request.master == VHOST_USER_SET_VRING_ENABLE) { + msg.request.master == VHOST_USER_SET_VRING_CALL) { if (vdpa_dev->ops->dev_conf) vdpa_dev->ops->dev_conf(dev->vid); dev->flags |= VIRTIO_DEV_VDPA_CONFIGURED; -- 2.20.1