[PATCH] crypto/cnxk: fix kasumi input len calculation
Anoob Joseph
anoobj at marvell.com
Thu Nov 11 12:44:29 CET 2021
Fix kasumi input len calculation to consider encr_offset.
Fixes: 546dff20a034 ("crypto/cnxk: add KASUMI decryption")
Cc: ktejasree at marvell.com
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index e4e554e..37237de 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1482,7 +1482,7 @@ cpt_kasumi_dec_prep(uint64_t d_offs, uint64_t d_lens,
/* consider iv len */
encr_offset += iv_len;
- inputlen = iv_len + (RTE_ALIGN(encr_data_len, 8) / 8);
+ inputlen = encr_offset + (RTE_ALIGN(encr_data_len, 8) / 8);
outputlen = inputlen;
/* save space for offset ctrl & iv */
--
2.7.4
More information about the stable
mailing list