[dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen

Trahe, Fiona fiona.trahe at intel.com
Thu Jul 27 11:03:08 CEST 2017


Hi Pablo,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, July 26, 2017 5:27 AM
> To: Doherty, Declan <declan.doherty at intel.com>
> Cc: dev at dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>; stable at dpdk.org
> Subject: [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen
> 
> When calling rte_crypto_op_bulk_alloc, the function may
> return either a 0, if not enough objects are available
> in the mempool or the number of operations requested,
> it there are enough available. However, the Doxygen comments
> were not matching these two cases.
> 
> Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
> ---
>  lib/librte_cryptodev/rte_crypto.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
> index 0908368..9f10818 100644
> --- a/lib/librte_cryptodev/rte_crypto.h
> +++ b/lib/librte_cryptodev/rte_crypto.h
> @@ -266,8 +266,8 @@ rte_crypto_op_alloc(struct rte_mempool *mempool, enum
> rte_crypto_op_type type)
>   * @param	nb_ops	Number of crypto operations to allocate
>   *
>   * @returns
> - * - On success returns a valid rte_crypto_op structure
> - * - On failure returns NULL
> + * - 0 if no operations could be allocated
> + * - nb_ops if the number of operations requested were allocated
>   */
> 
My first thought was what's returned if some ops could be allocated, but not the requested number?
Maybe instead:
- nb_ops if the number of operations requested were allocated.
- 0 if the requested number of ops are not available. None are allocated in this case.

>  static inline unsigned
> --
> 2.9.4



More information about the dev mailing list