From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: Declan.doherty@intel.com, Fiona Trahe <fiona.trahe@intel.com>
Subject: [dpdk-dev] [PATCH] qat: Fix for crash when nb_ops=0 on enqueue_burst
Date: Tue, 29 Mar 2016 18:10:20 +0100 [thread overview]
Message-ID: <1459271420-10830-1-git-send-email-fiona.trahe@intel.com> (raw)
Crash seen in qat pmd when nb_ops=0 on rte_cryptodev_enqueue_burst() API
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_crypto.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 5c41a89..90b5e6c 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -570,6 +570,9 @@ qat_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
register uint32_t tail;
int overflow;
+ if (unlikely(nb_ops == 0))
+ return 0;
+
/* read params used a lot in main loop into registers */
queue = &(tmp_qp->tx_q);
base_addr = (uint8_t *)queue->base_addr;
--
1.7.0.7
next reply other threads:[~2016-03-29 17:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 17:10 Fiona Trahe [this message]
2016-03-31 19:47 ` Thomas Monjalon
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=1459271420-10830-1-git-send-email-fiona.trahe@intel.com \
--to=fiona.trahe@intel.com \
--cc=Declan.doherty@intel.com \
--cc=dev@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).