Acked-by: Abhinandan Gujjar <[email protected]>

> -----Original Message-----
> From: Kundapura, Ganapati <[email protected]>
> Sent: Wednesday, December 7, 2022 12:20 PM
> To: [email protected]; [email protected]; Naga Harish K, S V
> <[email protected]>; Gujjar, Abhinandan S
> <[email protected]>
> Cc: Jayatheerthan, Jay <[email protected]>; [email protected]
> Subject: [PATCH v3 3/5] eventdev/crypto: fix wrong offset used while flushing
> events
> 
> Events enqueued to eventdev from the beginning of the circular buffer.
> This leads to invalid or already freed events getting enqueued to eventdev
> from the circular buffer.
> 
> Fixed by enqueuing the events to eventdev from the head pointer of circular
> buffer.
> 
> Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
> 
> Signed-off-by: Ganapati Kundapura <[email protected]>
> ---
> v2:
> * Updated subject line in commit message
> 
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index eaff577..c08984b 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -669,7 +669,7 @@ eca_circular_buffer_flush_to_evdev(struct
> event_crypto_adapter *adapter,
>       else
>               return 0;  /* buffer empty */
> 
> -     nb_ops_flushed =  eca_ops_enqueue_burst(adapter, ops, n);
> +     nb_ops_flushed =  eca_ops_enqueue_burst(adapter, &ops[*headp],
> n);
>       bufp->count -= nb_ops_flushed;
>       if (!bufp->count) {
>               *headp = 0;
> --
> 2.6.4

Reply via email to