It can be abandoned. I can see Zhihong added equivalent APIs called rte_vhost_get_vring_base/set_vring_base back in April.
> -----Original Message----- > From: Thomas Monjalon [mailto:[email protected]] > Sent: Thursday, July 26, 2018 5:44 PM > To: Maxime Coquelin <[email protected]>; Kulasek, TomaszX > <[email protected]> > Cc: [email protected]; [email protected]; Verkamp, Daniel > <[email protected]>; Harris, James R <[email protected]>; > Wodkowski, PawelX <[email protected]>; Stojaczyk, DariuszX > <[email protected]> > Subject: Re: [dpdk-dev] [PATCH] vhost: add API for getting last_idx of vrings > > What is the status of this patch? > > 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:[email protected]] > > >> Sent: Wednesday, March 28, 2018 10:57 > > >> To: Kulasek, TomaszX <[email protected]>; [email protected] > > >> Cc: Verkamp, Daniel <[email protected]>; Harris, James R > > >> <[email protected]>; Wodkowski, PawelX > <[email protected]>; > > >> [email protected]; Stojaczyk, DariuszX <[email protected]> > > >> 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 <[email protected]> > > >>> Signed-off-by: Tomasz Kulasek <[email protected]> > > >>> --- > > >>> 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 > > > > > > > > >

