DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: "Verma, Shally" <Shally.Verma@cavium.com>,
	Ahmed Mansour <ahmed.mansour@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Athreya, Narayana Prasad" <NarayanaPrasad.Athreya@cavium.com>,
	"Gupta, Ashish" <Ashish.Gupta@cavium.com>,
	"Sahu, Sunila" <Sunila.Sahu@cavium.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Challa, Mahipal" <Mahipal.Challa@cavium.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Roy Pledge <roy.pledge@nxp.com>,
	Youri Querry <youri.querry_1@nxp.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [RFC v2] doc compression API for DPDK
Date: Thu, 15 Feb 2018 17:20:02 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B4358931F4E3@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <CY4PR0701MB36340822D10FC567D6F62AC0F0F40@CY4PR0701MB3634.namprd07.prod.outlook.com>

Hi Ahmed, Shally,

> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Thursday, February 15, 2018 5:53 AM
> To: Ahmed Mansour <ahmed.mansour@nxp.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> dev@dpdk.org
> Cc: Athreya, Narayana Prasad <NarayanaPrasad.Athreya@cavium.com>; Gupta, Ashish
> <Ashish.Gupta@cavium.com>; Sahu, Sunila <Sunila.Sahu@cavium.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Challa, Mahipal <Mahipal.Challa@cavium.com>; Jain, Deepak K
> <deepak.k.jain@intel.com>; Hemant Agrawal <hemant.agrawal@nxp.com>; Roy Pledge
> <roy.pledge@nxp.com>; Youri Querry <youri.querry_1@nxp.com>
> Subject: RE: [RFC v2] doc compression API for DPDK
> 
> 
> 
> >-----Original Message-----
> >From: Ahmed Mansour [mailto:ahmed.mansour@nxp.com]
> >Sent: 14 February 2018 22:25
> >To: Verma, Shally <Shally.Verma@cavium.com>; Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org
> >Cc: Athreya, Narayana Prasad <NarayanaPrasad.Athreya@cavium.com>; Gupta, Ashish
> <Ashish.Gupta@cavium.com>; Sahu, Sunila
> ><Sunila.Sahu@cavium.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Challa,
> Mahipal
> ><Mahipal.Challa@cavium.com>; Jain, Deepak K <deepak.k.jain@intel.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Roy
> >Pledge <roy.pledge@nxp.com>; Youri Querry <youri.querry_1@nxp.com>
> >Subject: Re: [RFC v2] doc compression API for DPDK
> >
> >On 2/14/2018 12:41 AM, Verma, Shally wrote:
> >> Hi Ahmed
> >>
> >>> -----Original Message-----
> >>> From: Ahmed Mansour [mailto:ahmed.mansour@nxp.com]
> >>> Sent: 02 February 2018 02:20
> >>> To: Trahe, Fiona <fiona.trahe@intel.com>; Verma, Shally <Shally.Verma@cavium.com>;
> dev@dpdk.org
> >>> Cc: Athreya, Narayana Prasad <NarayanaPrasad.Athreya@cavium.com>; Gupta, Ashish
> <Ashish.Gupta@cavium.com>; Sahu, Sunila
> >>> <Sunila.Sahu@cavium.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Challa,
> Mahipal
> >>> <Mahipal.Challa@cavium.com>; Jain, Deepak K <deepak.k.jain@intel.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Roy
> >>> Pledge <roy.pledge@nxp.com>; Youri Querry <youri.querry_1@nxp.com>
> >>> Subject: Re: [RFC v2] doc compression API for DPDK
> >>>
> >>>>>> [Fiona] I propose if BFINAL bit is detected before end of input
> >>>>>> the decompression should stop. In this case consumed will be < src.length.
> >>>>>> produced will be < dst buffer size. Do we need an extra STATUS response?
> >>>>>> STATUS_BFINAL_DETECTED  ?
> >>>>> [Shally] @fiona, I assume you mean here decompressor stop after processing Final block right?
> >>>> [Fiona] Yes.
> >>>>
> >>>>  And if yes,
> >>>>> and if it can process that final block successfully/unsuccessfully, then status could simply be
> >>>>> SUCCESS/FAILED.
> >>>>> I don't see need of specific return code for this use case. Just to share, in past, we have practically
> run into
> >>>>> such cases with boost lib, and decompressor has simply worked this way.
> >>>> [Fiona] I'm ok with this.
> >>>>
> >>>>>> Only thing I don't like this is it can impact on performance, as normally
> >>>>>> we can just look for STATUS == SUCCESS. Anything else should be an exception.
> >>>>>> Now the application would have to check for SUCCESS || BFINAL_DETECTED every time.
> >>>>>> Do you have a suggestion on how we should handle this?
> >>>>>>
> >>> [Ahmed] This makes sense. So in all cases the PMD should assume that it
> >>> should stop as soon as a BFINAL is observed.
> >>>
> >>> A question. What happens ins stateful vs stateless modes when
> >>> decompressing an op that encompasses multiple BFINALs. I assume the
> >>> caller in that case will use the consumed=x bytes to find out how far in
> >>> to the input is the end of the first stream and start from the next
> >>> byte. Is this correct?
> >> [Shally]  As per my understanding, each op can be tied up to only one stream as we have only one
> stream pointer per op and one
> >stream can have only one BFINAL (as stream is one complete compressed data) but looks like you're
> suggesting a case where one op
> >can carry multiple independent streams? and thus multiple BFINAL?! , such as, below here is op
> pointing to more than one streams
> >>
> >>             --------------------------------------------
> >> op --> |stream1|stream2| |stream3|
> >>            --------------------------------------------
> >>
> >> Could you confirm if I understand your question correct?
> >[Ahmed] Correct. We found that in some storage applications the user
> >does not know where exactly the BFINAL is. They rely on zlib software
> >today. zlib.net software halts at the first BFINAL. Users put multiple
> >streams in one op and rely on zlib to  stop and inform them of the end
> >location of the first stream.
> 
> [Shally] Then this is practically case possible on decompressor and decompressor doesn't regard flush
> flag. So in that case, I expect PMD to internally reset themselves (say in case of zlib going through cycle
> of deflateEnd and deflateInit or deflateReset) and return with status = SUCCESS with updated produced
> and consumed. Now in such case, if previous stream also has some footer followed by start of next
> stream, then I am not sure how PMD / lib can support that case. Have you had practically run of such
> use-case on zlib? If yes, how then such application handle it in your experience?
> I can imagine for such input zlib would return with Z_FLUSH_END after 1st BFINAL is processed to the
> user. Then application doing deflateReset() or Init-End() cycle before starting with next. But if it starts
> with input that doesn't have valid zlib header, then likely it will throw an error.
> 
[Fiona] The consumed and produced tell the Application hw much data was processed up to 
the end of the first deflate block encountered with a bfinal set.
If there is data, e.g. footer after the block with bfinal, then I think it must be the responsibility of
the application to know this, the PMD can't have any responsibility for this.
The next op sent to the PMD must start with a valid deflate block.


> >>
> >> Thanks
> >> Shally
> >>

  reply	other threads:[~2018-02-15 17:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 11:45 Verma, Shally
2018-01-09 19:07 ` Ahmed Mansour
2018-01-10 12:55   ` Verma, Shally
2018-01-11 18:53     ` Trahe, Fiona
2018-01-12 13:49       ` Verma, Shally
2018-01-25 18:19         ` Ahmed Mansour
2018-01-29 12:47           ` Verma, Shally
2018-01-31 19:03           ` Trahe, Fiona
2018-02-01  5:40             ` Verma, Shally
2018-02-01 11:54               ` Trahe, Fiona
2018-02-01 20:50                 ` Ahmed Mansour
2018-02-14  5:41                   ` Verma, Shally
2018-02-14 16:54                     ` Ahmed Mansour
2018-02-15  5:53                       ` Verma, Shally
2018-02-15 17:20                         ` Trahe, Fiona [this message]
2018-02-15 19:51                           ` Ahmed Mansour
2018-02-16 11:11                             ` Trahe, Fiona
2018-02-01 20:23             ` Ahmed Mansour
2018-02-14  7:41               ` Verma, Shally
2018-02-15 18:47                 ` Trahe, Fiona
2018-02-15 21:09                   ` Ahmed Mansour
2018-02-16  7:16                     ` Verma, Shally
2018-02-16 13:04                       ` Trahe, Fiona
2018-02-16 21:21                         ` Ahmed Mansour
2018-02-20  9:58                           ` Verma, Shally
2018-02-20 19:56                             ` Ahmed Mansour
2018-02-21 14:35                               ` Trahe, Fiona
2018-02-21 19:35                                 ` Ahmed Mansour
2018-02-22  4:47                                   ` Verma, Shally
2018-02-22 19:35                                     ` Ahmed Mansour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=348A99DA5F5B7549AA880327E580B4358931F4E3@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=Ashish.Gupta@cavium.com \
    --cc=Mahipal.Challa@cavium.com \
    --cc=NarayanaPrasad.Athreya@cavium.com \
    --cc=Shally.Verma@cavium.com \
    --cc=Sunila.Sahu@cavium.com \
    --cc=ahmed.mansour@nxp.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.pledge@nxp.com \
    --cc=youri.querry_1@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).