From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id DCBE7288C for ; Thu, 26 Jul 2018 21:11:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 12:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,406,1526367600"; d="scan'208";a="58165933" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 26 Jul 2018 12:11:36 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 12:11:36 -0700 Received: from hasmsx111.ger.corp.intel.com (10.184.198.39) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 12:11:36 -0700 Received: from hasmsx106.ger.corp.intel.com ([169.254.10.9]) by HASMSX111.ger.corp.intel.com ([169.254.5.49]) with mapi id 14.03.0319.002; Thu, 26 Jul 2018 22:11:32 +0300 From: "Stojaczyk, DariuszX" To: Thomas Monjalon , Maxime Coquelin , "Kulasek, TomaszX" CC: "dev@dpdk.org" , "yliu@fridaylinux.org" , "Verkamp, Daniel" , "Harris, James R" , "Wodkowski, PawelX" , "Wang, Zhihong" Thread-Topic: [dpdk-dev] [PATCH] vhost: add API for getting last_idx of vrings Thread-Index: AQHUJPd31NUP3GVDaUO8Qx+J+nxfH6Sh3h0g Date: Thu, 26 Jul 2018 19:11:31 +0000 Message-ID: References: <20180305155959.21212-1-tomaszx.kulasek@intel.com> <3042915272161B4EB253DA4D77EB373A605D3AE5@IRSMSX102.ger.corp.intel.com> <1772643.am7XGmZYjg@xps> In-Reply-To: <1772643.am7XGmZYjg@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGNkYjgyNTktNmUwYi00MWExLThlMGEtYTNhNmJmNzU2NmQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJhb0o3TWJYeVwvRWM5UDdxVFpCM2dnM2xJK2dRendJaVJKajlMYW1mVWlyaXlkWXN0T1VFbE5ET052dkIwU0VOUyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.104.73.215] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] vhost: add API for getting last_idx of vrings 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: , X-List-Received-Date: Thu, 26 Jul 2018 19:11:39 -0000 It can be abandoned. I can see Zhihong added equivalent APIs called rte_vho= st_get_vring_base/set_vring_base back in April. > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, July 26, 2018 5:44 PM > To: Maxime Coquelin ; Kulasek, TomaszX > > Cc: dev@dpdk.org; yliu@fridaylinux.org; Verkamp, Daniel > ; Harris, James R ; > Wodkowski, PawelX ; Stojaczyk, DariuszX > > Subject: Re: [dpdk-dev] [PATCH] vhost: add API for getting last_idx of vr= ings >=20 > What is the status of this patch? >=20 > 19/04/2018 16:57, Maxime Coquelin: > > Hi Tomasz, > > > > On 03/28/2018 11:31 AM, Kulasek, TomaszX wrote: > > > Hi Maxime, > > > > > >> -----Original Message----- > > >> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] > > >> Sent: Wednesday, March 28, 2018 10:57 > > >> To: Kulasek, TomaszX ; yliu@fridaylinux.o= rg > > >> Cc: Verkamp, Daniel ; Harris, James R > > >> ; Wodkowski, PawelX > ; > > >> dev@dpdk.org; Stojaczyk, DariuszX > > >> Subject: Re: [dpdk-dev] [PATCH] vhost: add API for getting last_idx = of vrings > > >> > > >> Hi Tomasz, > > >> > > >> On 03/05/2018 04:59 PM, Tomasz Kulasek wrote: > > >>> vhost-net devices might keep track of last descriptors indices by > > >>> themselves, and assuming they initially start at 0, but that is not= the > > >>> case for vhost-scsi. Initial last descriptor indices are set via > > >>> VHOST_USER_SET_VRING_BASE message, and we cannot possibly predict > what > > >>> will they be. Setting these to vqueue->used->idx is also not an opt= ion, > > >>> because there might be some yet unprocessed requests between these = and > > >>> the actual last_idx. This patch adds API for getting/setting last > > >>> descriptor indices of vrings, so that they can be synchronized betw= een > > >>> user-device and rte_vhost. > > >>> > > >>> The last_idx flow could be as following: > > >>> > > >>> * vhost start, > > >>> * received SET_VRING_BASE msg, last_idx is set on rte_vhost side= , > > >>> * created user-device, last_idx pulled from rte_vhost, > > >>> * requests are being processed by user-device, last_idx changes, > > >>> * destroyed user-device, last_idx pushed to rte_vhost, > > >>> * at this point, vrings could be recreated and another SET_VRING= _BASE > > >>> message could arrive, so last_idx would be set > > >>> * recreated user-device, last_idx pulled from rte_vhost. > > >>> > > >>> > > >>> Signed-off-by: Dariusz Stojaczyk > > >>> Signed-off-by: Tomasz Kulasek > > >>> --- > > >>> lib/librte_vhost/rte_vhost.h | 24 ++++++++++++++++++++++++ > > >>> lib/librte_vhost/vhost.c | 27 +++++++++++++++++++++++++++ > > >>> 2 files changed, 51 insertions(+) > > >>> > > >> > > >> I agree with the patch, but it is missing the declaration of the new= API > > >> in rte_vhost_version.map. > > >> > > >> Thanks, > > >> Maxime > > > > > > Yes, I will send v2. > > > > Do you plan to send v2 for v18.02? > > It can still make it to -rc2 if you post it early next week. > > > > Thanks, > > Maxime > > > > > Tomasz > > > > > >=20 >=20 >=20 >=20