[v2,5/5] eventdev/crypto: add all failed events to circular buffer

Message ID 20221201064652.1885734-5-ganapati.kundapura@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers
Series [v2,1/5] eventdev/event_crypto: process event port's impl rel cap |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing warning Testing issues
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Ganapati Kundapura Dec. 1, 2022, 6:46 a.m. UTC
  When many ops are failed to enqueue to eventdev, crypto
adapter stores one event in buffer for later processing.

Add all failed ops to buffer for later processing.

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
---
v2:
* Updated subject line commit message
  

Comments

Volodymyr Fialko Dec. 5, 2022, 11:37 a.m. UTC | #1
> -----Original Message-----
> From: Ganapati Kundapura <ganapati.kundapura@intel.com>
> Sent: Thursday, December 1, 2022 7:47 AM
> To: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; s.v.naga.harish.k@intel.com;
> abhinandan.gujjar@intel.com
> Cc: jay.jayatheerthan@intel.com
> Subject: [EXT] [PATCH v2 5/5] eventdev/crypto: add all failed events to circular buffer
> 
> External Email
> 
> ----------------------------------------------------------------------
> When many ops are failed to enqueue to eventdev, crypto adapter stores one event in buffer for later
> processing.
> 
> Add all failed ops to buffer for later processing.
> 
> Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
> ---
Acked-by: Volodymyr Fialko <vfialko@marvell.com>
  
Gujjar, Abhinandan S Dec. 6, 2022, 4:37 p.m. UTC | #2
> -----Original Message-----
> From: Kundapura, Ganapati <ganapati.kundapura@intel.com>
> Sent: Thursday, December 1, 2022 12:17 PM
> To: dev@dpdk.org; jerinj@marvell.com; Naga Harish K, S V
> <s.v.naga.harish.k@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Cc: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> Subject: [PATCH v2 5/5] eventdev/crypto: add all failed events to circular
> buffer

Rephrase header with "Fix failed events" as the adding to circular buffer logic already exists
> 
> When many ops are failed to enqueue to eventdev, crypto adapter stores one
> event in buffer for later processing.
Rephase -> Circular buffer stores those events failed to enqueue to eventdev for
retrying later. Current implementation adds the same crypto op to circular buffer
instead of pointing all the ops in a batch. This fix updates the pointer to pointing to
correct ops in the batch.
> 
> Add all failed ops to buffer for later processing.
> 
> Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
> ---
> v2:
> * Updated subject line commit message
> 
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index 1d39c5b..1a18530 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -753,7 +753,7 @@ eca_crypto_adapter_deq_run(struct
> event_crypto_adapter *adapter,
>  				for (i = nb_enqueued; i < n; i++)
>  					eca_circular_buffer_add(
>  						&adapter->ebuf,
> -						ops[nb_enqueued]);
> +						ops[i]);
> 
>  check:
>  				nb_deq += n;
> --
> 2.6.4
  

Patch

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 1d39c5b..1a18530 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -753,7 +753,7 @@  eca_crypto_adapter_deq_run(struct event_crypto_adapter *adapter,
 				for (i = nb_enqueued; i < n; i++)
 					eca_circular_buffer_add(
 						&adapter->ebuf,
-						ops[nb_enqueued]);
+						ops[i]);
 
 check:
 				nb_deq += n;