DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] qat: Fix for crash when nb_ops=0 on enqueue_burst
@ 2016-03-29 17:10 Fiona Trahe
  2016-03-31 19:47 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Trahe @ 2016-03-29 17:10 UTC (permalink / raw)
  To: dev; +Cc: Declan.doherty, Fiona Trahe

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

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

end of thread, other threads:[~2016-03-31 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 17:10 [dpdk-dev] [PATCH] qat: Fix for crash when nb_ops=0 on enqueue_burst Fiona Trahe
2016-03-31 19:47 ` Thomas Monjalon

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).