From 41d2437f7c679dcbfc8b7697fde0b17765eea1ed Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Mon, 14 Aug 2017 01:45:21 +0100 Subject: [PATCH] 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: 9c2a5775c028 ("crypto/aesni_gcm: migrate from MB library to ISA-L") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara Reviewed-by: Kirill Rybalchenko --- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index d9c91d0627..05c68fba9c 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -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; -- 2.20.1