[PATCH v3 2/5] eventdev/crypto: fix wrong crypto enqueue count stats

Gujjar, Abhinandan S abhinandan.gujjar at intel.com
Wed Dec 7 07:55:08 CET 2022


Acked-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>

> -----Original Message-----
> From: Kundapura, Ganapati <ganapati.kundapura at intel.com>
> Sent: Wednesday, December 7, 2022 12:20 PM
> To: dev at dpdk.org; jerinj at marvell.com; Naga Harish K, S V
> <s.v.naga.harish.k at intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar at intel.com>
> Cc: Jayatheerthan, Jay <jay.jayatheerthan at intel.com>; vfialko at marvell.com
> Subject: [PATCH v3 2/5] eventdev/crypto: fix wrong crypto enqueue count
> stats
> 
> crypto_enq_count is updated on failure to enqueue ops to cryptodev.
> 
> Updated crypto_enq_count on successful enqueue of ops to cryptodev.
> 
> Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
> 
> Signed-off-by: Ganapati Kundapura <ganapati.kundapura at intel.com>
> ---
> 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 134470b..eaff577 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -485,6 +485,9 @@ eca_enq_to_cryptodev(struct event_crypto_adapter
> *adapter, struct rte_event *ev,
>  								cdev_id,
>  								qp_id,
> 
> 	&nb_enqueued);
> +			stats->crypto_enq_count += nb_enqueued;
> +			n += nb_enqueued;
> +
>  			/**
>  			 * If some crypto ops failed to flush to cdev and
>  			 * space for another batch is not available, stop @@ -
> 495,9 +498,6 @@ eca_enq_to_cryptodev(struct event_crypto_adapter
> *adapter, struct rte_event *ev,
>  							&qp_info->cbuf)))
>  				adapter->stop_enq_to_cryptodev = true;
>  		}
> -
> -		stats->crypto_enq_count += nb_enqueued;
> -		n += nb_enqueued;
>  	}
> 
>  	return n;
> --
> 2.6.4



More information about the dev mailing list