From patchwork Mon Jan 14 07:34:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaolong Ye X-Patchwork-Id: 49785 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8ABC1B452; Mon, 14 Jan 2019 08:34:20 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 66D2F1B44D for ; Mon, 14 Jan 2019 08:34:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2019 23:34:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,476,1539673200"; d="scan'208";a="291343325" Received: from yexl-server.sh.intel.com ([10.67.110.206]) by orsmga005.jf.intel.com with ESMTP; 13 Jan 2019 23:34:16 -0800 From: Xiaolong Ye To: dev@dpdk.org, Maxime Coquelin , Tiwei Bie Cc: xiao.w.wang@intel.com, Xiaolong Ye Date: Mon, 14 Jan 2019 15:34:24 +0800 Message-Id: <20190114073424.15519-1-xiaolong.ye@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] vhost: invoke dev configuration after set vring call message X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 8fec773d5..469e61e5a 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -2045,7 +2045,7 @@ vhost_user_msg_handler(int vid, int fd) 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;