From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66A84A00E6 for ; Mon, 2 Sep 2019 11:02:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 473F41E548; Mon, 2 Sep 2019 11:02:34 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 844911C1B2; Mon, 2 Sep 2019 11:02:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 02:02:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="206756866" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 02 Sep 2019 02:02:29 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Sep 2019 02:02:28 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 2 Sep 2019 02:02:28 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.86]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0439.000; Mon, 2 Sep 2019 17:02:27 +0800 From: "Wang, Xiao W" To: "Ye, Xiaolong" , Maxime Coquelin CC: "Bie, Tiwei" , "Wang, Zhihong" , "amorenoz@redhat.com" , "dev@dpdk.org" , "jfreimann@redhat.com" , "stable@dpdk.org" Thread-Topic: [PATCH 02/15] vhost: configure vDPA as soon as the device is ready Thread-Index: AQHVXj/fUpdxpQmEr0SEebjmeZFZracXj++AgACLTiA= Date: Mon, 2 Sep 2019 09:02:26 +0000 Message-ID: References: <20190829080000.20806-1-maxime.coquelin@redhat.com> <20190829080000.20806-3-maxime.coquelin@redhat.com> <20190902083445.GB1665@intel.com> In-Reply-To: <20190902083445.GB1665@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjE3MzRmNmMtMjdiOC00YmQ3LWJiMWMtMDM5ODY5ZmQ4YzllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUHFaYXZiN3JUTmp2UXNjY1FNV0Q3dkxoa1hRS2lWd2t4Q3k1VUlqZzMrcnVGNml0VjNuaUdVTGRYU0tkcFVxWSJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 02/15] vhost: configure vDPA as soon as the device is ready X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, > -----Original Message----- > From: Ye, Xiaolong > Sent: Monday, September 2, 2019 4:35 PM > To: Maxime Coquelin > Cc: Bie, Tiwei ; Wang, Zhihong > ; amorenoz@redhat.com; Wang, Xiao W > ; dev@dpdk.org; jfreimann@redhat.com; > stable@dpdk.org > Subject: Re: [PATCH 02/15] vhost: configure vDPA as soon as the device is > ready >=20 > On 08/29, Maxime Coquelin wrote: > >There might not have any VHOST_USER_SET_VRING_CALL requests > >sent once virtio device is ready. When it happens, the vDPA > >device's dev_conf() callback may never be called. > > > >Fixes: 9f9014512822 ("vhost: configure vDPA device after set vring call > message") > >Cc: stable@dpdk.org > >Cc: xiaolong.ye@intel.com > > > >Signed-off-by: Maxime Coquelin > >--- > > lib/librte_vhost/vhost_user.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > >diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user= .c > >index 0b72648a5..b1ea80c52 100644 > >--- a/lib/librte_vhost/vhost_user.c > >+++ b/lib/librte_vhost/vhost_user.c > >@@ -2112,8 +2112,7 @@ vhost_user_msg_handler(int vid, int fd) > > did =3D dev->vdpa_dev_id; > > vdpa_dev =3D rte_vdpa_get_device(did); > > if (vdpa_dev && virtio_is_ready(dev) && > >- !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) && > >- msg.request.master =3D=3D > VHOST_USER_SET_VRING_CALL) { > >+ !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) { In the early beginning of vhost user messages, there seems to be a VHOST_US= ER_SET_VRING_CALL with invalid call fd, not sure if QEMU has any update on this point. If the virtio_is_ready() is based on that invalid call fd, then vdpa_dev_co= nf() cannot setup interrupt properly. I think that's why in our previous implementation, we wait for the real cal= l fd and then call dev_conf(). BRs, Xiao