DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue
@ 2017-07-14  6:48 Pablo de Lara
  2017-07-17 10:16 ` Declan Doherty
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2017-07-14  6:48 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara, stable

In the unlikely scenario that an application
calls rte_cryptodev_dequeue_burst with nb_ops = 0,
there was a job leak, as a job would be created
but would not be populated, as no operation is passed.

Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 13cffaf..fda662f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -644,6 +644,9 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 
 	int retval, processed_jobs = 0;
 
+	if (unlikely(nb_ops == 0))
+		return 0;
+
 	do {
 		/* Get next operation to process from ingress queue */
 		retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
-- 
2.9.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue
  2017-07-14  6:48 [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue Pablo de Lara
@ 2017-07-17 10:16 ` Declan Doherty
  2017-07-17 14:06   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Declan Doherty @ 2017-07-17 10:16 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev, stable

On 14/07/2017 7:48 AM, Pablo de Lara wrote:
> In the unlikely scenario that an application
> calls rte_cryptodev_dequeue_burst with nb_ops = 0,
> there was a job leak, as a job would be created
> but would not be populated, as no operation is passed.
>
> Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 13cffaf..fda662f 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -644,6 +644,9 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
>
>  	int retval, processed_jobs = 0;
>
> +	if (unlikely(nb_ops == 0))
> +		return 0;
> +
>  	do {
>  		/* Get next operation to process from ingress queue */
>  		retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
>

Acked-by: Declan Doherty <declan.doherty@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue
  2017-07-17 10:16 ` Declan Doherty
@ 2017-07-17 14:06   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-17 14:06 UTC (permalink / raw)
  To: Doherty, Declan; +Cc: dev, stable



> -----Original Message-----
> From: Doherty, Declan
> Sent: Monday, July 17, 2017 11:17 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH] crypto/aesni_mb: fix zero burst dequeue
> 
> On 14/07/2017 7:48 AM, Pablo de Lara wrote:
> > In the unlikely scenario that an application calls
> > rte_cryptodev_dequeue_burst with nb_ops = 0, there was a job leak, as
> > a job would be created but would not be populated, as no operation is
> > passed.
> >
> > Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>


> Acked-by: Declan Doherty <declan.doherty@intel.com>

Applied to dpdk-next-crypto.

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-17 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14  6:48 [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue Pablo de Lara
2017-07-17 10:16 ` Declan Doherty
2017-07-17 14:06   ` 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).