From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ahmed Mansour Subject: Re: [PATCH] compressdev: implement API Date: Tue, 6 Mar 2018 23:33:17 +0000 Message-ID: References: <1517595924-25963-1-git-send-email-fiona.trahe@intel.com> <12544144.czVLKRyaz4@xps> <348A99DA5F5B7549AA880327E580B43589325187@IRSMSX101.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B4358932983C@IRSMSX101.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B43589329F78@IRSMSX101.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B4358932A333@IRSMSX101.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "De Lara Guarch, Pablo" , "Athreya, Narayana Prasad" , "Gupta, Ashish" , "Sahu, Sunila" , "Challa, Mahipal" , "Jain, Deepak K" , Hemant Agrawal , Roy Pledge , Youri Querry To: "Verma, Shally" , "Trahe, Fiona" , "dev@dpdk.org" Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0069.outbound.protection.outlook.com [104.47.1.69]) by dpdk.org (Postfix) with ESMTP id DB7B85F5D for ; Wed, 7 Mar 2018 00:33:19 +0100 (CET) Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 3/5/2018 9:32 AM, Verma, Shally wrote:=0A= >=0A= >> -----Original Message-----=0A= >> From: Ahmed Mansour [mailto:ahmed.mansour@nxp.com]=0A= >> Sent: 03 March 2018 01:19=0A= >> To: Trahe, Fiona ; Verma, Shally ; dev@dpdk.org=0A= >> Cc: De Lara Guarch, Pablo ; Athreya, Nar= ayana Prasad ;=0A= >> Gupta, Ashish ; Sahu, Sunila ; Challa, Mahipal=0A= >> ; Jain, Deepak K ; H= emant Agrawal ; Roy=0A= >> Pledge ; Youri Querry =0A= >> Subject: Re: [dpdk-dev] [PATCH] compressdev: implement API=0A= >>=0A= >> On 3/2/2018 4:53 AM, Trahe, Fiona wrote:=0A= >>>> On 3/1/2018 9:41 AM, Trahe, Fiona wrote:=0A= >>>>> Hi Shally=0A= >>>>>=0A= >>>>> //snip//=0A= >>>>>> [Shally] This looks better to me. So it mean app would always call x= form_init() for stateless and attach=0A= >>>> an=0A= >>>>>> updated priv_xform to ops (depending upon if there's shareable or no= t). So it does not need to have=0A= >>>>>> NULL pointer on priv_xform. right?=0A= >>>>>>=0A= >>>>> [Fiona] yes. The PMD must return a valid priv_xform pointer.=0A= >>>> [Ahmed] What I understood is that the xform_init will be called once= =0A= >>>> initially. if the @flag returned is NONE_SHAREABLE then the applicatio= n=0A= >>>> must not attach two inflight ops to the same @priv_xform? Otherwise th= e=0A= >>>> application can attach many ops in flight to the @priv_xform?=0A= >>> [Fiona Yes. App calls the xform_init() once on a device where it plans = to send stateless ops.=0A= >>> If PMD returns shareable, then it doesn't need to call again and can at= tach this to every stateless op going to that device.=0A= >>> If PMD returns SINGLE_OP then it must call xform_init() before every ot= her=0A= >>> stateless op it wants to have inflight simultaneously. This does not me= an it must be called before every op,=0A= >>> but probably will set up a batch of priv_xforms - it can reuse each pr= iv_xform once the op finishes with it.=0A= >> [Ahmed] @Shally Can this complexity of managing the NONE_SHAREABLE mode= =0A= >> be pushed into the PMD? A flexible stockpile can be kept and maintained= =0A= >> by the PMD and it can be increased or decreased based on=0A= >> low-water/high-water thresholds=0A= > [Shally] It is doable to manage within PMD but need to do hands on to eva= luate effectiveness. So far, we have never exercised this way and left it t= o application to attach different session (or stream) to op for maximum per= formance gain. So, I would say, may it be ok to have flag feature in first = place and deprecate later, if it not required?! Or just have API without an= y flag option and add a feature flag to indicate PMD support for SHAREABLE/= NON-SHAREABLE xform_priv handle?!=0A= [Ahmed] Either way looks ok to me. I see your point about performance.=0A= If this is in the PMD it will have to constantly guess how much memory=0A= the user needs and accommodate dynamically. The user can implement a=0A= similar scheme or if the application is simple they can pre-allocate and=0A= reduce CPU allocation de-allocation overhead.=0A=