* [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen
@ 2017-07-26 4:27 Pablo de Lara
2017-07-27 9:03 ` Trahe, Fiona
2017-07-27 16:05 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
0 siblings, 2 replies; 6+ messages in thread
From: Pablo de Lara @ 2017-07-26 4:27 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
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@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@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
*/
static inline unsigned
--
2.9.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen
2017-07-26 4:27 [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen Pablo de Lara
@ 2017-07-27 9:03 ` Trahe, Fiona
2017-07-27 15:57 ` De Lara Guarch, Pablo
2017-07-27 16:05 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
1 sibling, 1 reply; 6+ messages in thread
From: Trahe, Fiona @ 2017-07-27 9:03 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan
Cc: dev, De Lara Guarch, Pablo, stable, Trahe, Fiona
Hi Pablo,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, July 26, 2017 5:27 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@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@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen
2017-07-27 9:03 ` Trahe, Fiona
@ 2017-07-27 15:57 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-27 15:57 UTC (permalink / raw)
To: Trahe, Fiona, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Thursday, July 27, 2017 10:03 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; stable@dpdk.org; Trahe, Fiona
> <fiona.trahe@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen
>
> Hi Pablo,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Wednesday, July 26, 2017 5:27 AM
> > To: Doherty, Declan <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; stable@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@dpdk.org
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@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.
Good clarification. Will send a v2 shortly.
Thanks,
Pablo
>
> > static inline unsigned
> > --
> > 2.9.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] cryptodev: fix crypto op bulk alloc Doxygen
2017-07-26 4:27 [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen Pablo de Lara
2017-07-27 9:03 ` Trahe, Fiona
@ 2017-07-27 16:05 ` Pablo de Lara
2017-07-27 16:16 ` Trahe, Fiona
1 sibling, 1 reply; 6+ messages in thread
From: Pablo de Lara @ 2017-07-27 16:05 UTC (permalink / raw)
To: fiona.trahe, declan.doherty; +Cc: dev, Pablo de Lara, stable
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@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
Changes in v2:
- Reworded Doxygen comment for more clarification.
lib/librte_cryptodev/rte_crypto.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 0908368..10fe080 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -266,8 +266,9 @@ 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
+ * - 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] cryptodev: fix crypto op bulk alloc Doxygen
2017-07-27 16:05 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2017-07-27 16:16 ` Trahe, Fiona
2017-07-27 18:49 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 6+ messages in thread
From: Trahe, Fiona @ 2017-07-27 16:16 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, July 27, 2017 5:06 PM
> To: Trahe, Fiona <fiona.trahe@intel.com>; Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] 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@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] cryptodev: fix crypto op bulk alloc Doxygen
2017-07-27 16:16 ` Trahe, Fiona
@ 2017-07-27 18:49 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-27 18:49 UTC (permalink / raw)
To: Trahe, Fiona, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Thursday, July 27, 2017 5:17 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] cryptodev: fix crypto op bulk alloc Doxygen
>
>
>
> > -----Original Message-----
> > From: De Lara Guarch, Pablo
> > Sent: Thursday, July 27, 2017 5:06 PM
> > To: Trahe, Fiona <fiona.trahe@intel.com>; Doherty, Declan
> > <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> > Subject: [PATCH v2] 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@dpdk.org
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Applied to dpdk-next-crypto.
Pablo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-27 18:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 4:27 [dpdk-dev] [PATCH] cryptodev: fix crypto op bulk alloc Doxygen Pablo de Lara
2017-07-27 9:03 ` Trahe, Fiona
2017-07-27 15:57 ` De Lara Guarch, Pablo
2017-07-27 16:05 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-07-27 16:16 ` Trahe, Fiona
2017-07-27 18:49 ` De Lara Guarch, Pablo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).