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:
parent
ff150afd7e
commit
2f481bda80
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user