crypto/aesni_gcm: fix zero data operation

When data length passed to the PMD was zero,
the PMD was trying to get more data from a non-existent
next segment.

Fixes: 9c2a5775c0 ("crypto/aesni_gcm: migrate from MB library to ISA-L")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
This commit is contained in:
Pablo de Lara 2017-08-14 01:45:21 +01:00
parent efd42d2e0e
commit 41d2437f7c

View File

@ -224,7 +224,7 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_op *op,
RTE_ASSERT(m_src != NULL);
while (offset >= m_src->data_len) {
while (offset >= m_src->data_len && data_length != 0) {
offset -= m_src->data_len;
m_src = m_src->next;