[v3] doc/compress: clarify error handling on data-plane

Message ID 1557918967-6869-1-git-send-email-fiona.trahe@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v3] doc/compress: clarify error handling on data-plane |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Fiona Trahe May 15, 2019, 11:16 a.m. UTC
  Fixed some typos and clarified how errors on ops which
fail to get submitted on the enqueue API should be handled.

Fixes: a584d3bea902 ("doc: add compressdev library guide")
cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
v3 changes:
 - change proposal so appl must check status of op_enqueued+1 if
   all ops are not enqueued.
v2 changes:
 - changed "0 or undefined" to just "undefined" as 0 is superfluous.

 doc/guides/prog_guide/compressdev.rst | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
  

Comments

Tomasz Jozwiak May 15, 2019, 11:43 a.m. UTC | #1
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, May 15, 2019 1:16 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; shallyv@marvell.com;
> ssahu@marvell.com; Daly, Lee <lee.daly@intel.com>; ashishg@marvell.com;
> akhil.goyal@nxp.com; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v3] doc/compress: clarify error handling on data-plane
> 
> Fixed some typos and clarified how errors on ops which fail to get submitted
> on the enqueue API should be handled.
> 
> Fixes: a584d3bea902 ("doc: add compressdev library guide")
> cc: stable@dpdk.org
> 
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---

Acked-by: Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
  
Shally Verma May 15, 2019, 12:03 p.m. UTC | #2
> -----Original Message-----
> From: Fiona Trahe <fiona.trahe@intel.com>
> Sent: Wednesday, May 15, 2019 4:46 PM
> To: dev@dpdk.org
> Cc: fiona.trahe@intel.com; Shally Verma <shallyv@marvell.com>; Sunila Sahu
> <ssahu@marvell.com>; lee.daly@intel.com; Ashish Gupta
> <ashishg@marvell.com>; akhil.goyal@nxp.com; tomaszx.jozwiak@intel.com;
> stable@dpdk.org
> Subject: [PATCH v3] doc/compress: clarify error handling on data-plane
> 
> Fixed some typos and clarified how errors on ops which fail to get submitted on
> the enqueue API should be handled.
> 
> Fixes: a584d3bea902 ("doc: add compressdev library guide")
> cc: stable@dpdk.org
> 
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
Acked-by: Shally Verma <shallyv@marvell.com>


> 2.13.6
  
Akhil Goyal June 19, 2019, 2:57 p.m. UTC | #3
> > Fixed some typos and clarified how errors on ops which fail to get submitted
> on
> > the enqueue API should be handled.
> >
> > Fixes: a584d3bea902 ("doc: add compressdev library guide")
> > cc: stable@dpdk.org
> >
> > Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> > ---
> Acked-by: Shally Verma <shallyv@marvell.com>
> 
> 
Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/doc/guides/prog_guide/compressdev.rst b/doc/guides/prog_guide/compressdev.rst
index a06c835a0..bd9bebce6 100644
--- a/doc/guides/prog_guide/compressdev.rst
+++ b/doc/guides/prog_guide/compressdev.rst
@@ -201,7 +201,7 @@  for stateful processing of ops.
 Operation Status
 ~~~~~~~~~~~~~~~~
 Each operation carries a status information updated by PMD after it is processed.
-following are currently supported status:
+Following are currently supported:
 
 - RTE_COMP_OP_STATUS_SUCCESS,
     Operation is successfully completed
@@ -227,14 +227,24 @@  following are currently supported status:
     is not an error case. Output data up to op.produced can be used and
     next op in the stream should continue on from op.consumed+1.
 
+Operation status after enqueue / dequeue
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Some of the above values may arise in the op after an
+``rte_compressdev_enqueue_burst()``. If number ops enqueued < number ops requested then
+the app should check the op.status of nb_enqd+1. If status is RTE_COMP_OP_STATUS_NOT_PROCESSED,
+it likely indicates a full-queue case for a hardware device and a retry after dequeuing some ops is likely
+to be successful. If the op holds any other status, e.g. RTE_COMP_OP_STATUS_INVALID_ARGS, a retry with
+the same op is unlikely to be successful.
+
+
 Produced, Consumed And Operation Status
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 - If status is RTE_COMP_OP_STATUS_SUCCESS,
     consumed = amount of data read from input buffer, and
     produced = amount of data written in destination buffer
-- If status is RTE_COMP_OP_STATUS_FAILURE,
-    consumed = produced = 0 or undefined
+- If status is RTE_COMP_OP_STATUS_ERROR,
+    consumed = produced = undefined
 - If status is RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED,
     consumed = 0 and
     produced = usually 0, but in decompression cases a PMD may return > 0