qat: fix crash when nothing to enqueue

Crash seen in qat pmd when nb_ops=0 on rte_cryptodev_enqueue_burst() API

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
This commit is contained in:
Fiona Trahe 2016-03-29 18:10:20 +01:00 committed by Thomas Monjalon
parent ff150afd7e
commit 2f481bda80

View File

@ -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;