Skip to contentSkip to conversation

common/cpt: fix kasumi input len calculation

PATCH Applied Anoob Joseph 2 participants 2 messages Nov 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/cpt: fix kasumi input len calculation

Fix kasumi input len calculation to consider encr_offset.

Fixes da39e3eccd3d ("common/cpt: support KASUMI")
---
 drivers/common/cpt/cpt_ucode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/cpt/cpt_ucode.h +1 -1
index 006411c..e015cf6 100644
@@ -2311,7 +2311,7 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	/* 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 */
Signature · 1 line
2.7.4