[PATCH] crypto: fix crypto callbacks macro

Power, Ciara ciara.power at intel.com
Tue Apr 16 10:25:49 CEST 2024



> -----Original Message-----
> From: Power, Ciara <ciara.power at intel.com>
> Sent: Monday, April 15, 2024 1:36 PM
> To: dev at dpdk.org
> Cc: Power, Ciara <ciara.power at intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar at intel.com>; stable at dpdk.org; Akhil Goyal
> <gakhil at marvell.com>; Fan Zhang <fanzhang.oss at gmail.com>
> Subject: [PATCH] crypto: fix crypto callbacks macro
> 
> The crypto callbacks macro is being used with ifdef instead of if, so when the
> config file value is changed to 0 to disable, the code is still being compiled in.
> 
> Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
> Cc: abhinandan.gujjar at intel.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Ciara Power <ciara.power at intel.com>
> ---
>  lib/cryptodev/rte_cryptodev.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h index
> 00ba6a234a..357d4bcf9c 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -1909,7 +1909,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id,
> uint16_t qp_id,
> 
>  	nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops);
> 
> -#ifdef RTE_CRYPTO_CALLBACKS
> +#if RTE_CRYPTO_CALLBACKS
>  	if (unlikely(fp_ops->qp.deq_cb != NULL)) {
>  		struct rte_cryptodev_cb_rcu *list;
>  		struct rte_cryptodev_cb *cb;
> @@ -1976,7 +1976,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id,
> uint16_t qp_id,
> 
>  	fp_ops = &rte_crypto_fp_ops[dev_id];
>  	qp = fp_ops->qp.data[qp_id];
> -#ifdef RTE_CRYPTO_CALLBACKS
> +#if RTE_CRYPTO_CALLBACKS
>  	if (unlikely(fp_ops->qp.enq_cb != NULL)) {
>  		struct rte_cryptodev_cb_rcu *list;
>  		struct rte_cryptodev_cb *cb;
> --
> 2.25.1

Rejecting this patch, as an alternative fix was sent along with some other fixes: https://patchwork.dpdk.org/project/dpdk/patch/20240416081222.3002268-1-ganapati.kundapura@intel.com/



More information about the stable mailing list