From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 452C4AA97 for ; Thu, 19 Apr 2018 16:57:50 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D526E722FE; Thu, 19 Apr 2018 14:57:49 +0000 (UTC) Received: from [10.36.112.62] (ovpn-112-62.ams2.redhat.com [10.36.112.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 455476F9E5; Thu, 19 Apr 2018 14:57:48 +0000 (UTC) To: "Kulasek, TomaszX" , "yliu@fridaylinux.org" Cc: "Verkamp, Daniel" , "Harris, James R" , "Wodkowski, PawelX" , "dev@dpdk.org" , "Stojaczyk, DariuszX" References: <20180305155959.21212-1-tomaszx.kulasek@intel.com> <9e7643db-0736-1768-d4eb-972d926c7021@redhat.com> <3042915272161B4EB253DA4D77EB373A605D3AE5@IRSMSX102.ger.corp.intel.com> From: Maxime Coquelin Message-ID: Date: Thu, 19 Apr 2018 16:57:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <3042915272161B4EB253DA4D77EB373A605D3AE5@IRSMSX102.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 19 Apr 2018 14:57:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 19 Apr 2018 14:57:49 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' 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, 19 Apr 2018 14:57:50 -0000 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.org >> 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 option, >>> 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 between >>> 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 >