DPDK patches and discussions
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] crypto/aesni_mb: fix zero burst dequeue
Date: Mon, 17 Jul 2017 11:16:47 +0100	[thread overview]
Message-ID: <938c99a3-920c-1997-e1fa-b2fe7ff024ed@intel.com> (raw)
In-Reply-To: <20170714064848.54333-1-pablo.de.lara.guarch@intel.com>

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>

  reply	other threads:[~2017-07-17 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14  6:48 Pablo de Lara
2017-07-17 10:16 ` Declan Doherty [this message]
2017-07-17 14:06   ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=938c99a3-920c-1997-e1fa-b2fe7ff024ed@intel.com \
    --to=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).