]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: fix KASUMI input length
authorAnoob Joseph <anoobj@marvell.com>
Thu, 11 Nov 2021 11:44:29 +0000 (17:14 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 16 Nov 2021 06:38:07 +0000 (07:38 +0100)
Fix kasumi input len calculation to consider encr_offset.

Fixes: 546dff20a034 ("crypto/cnxk: add KASUMI decryption")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
drivers/crypto/cnxk/cnxk_se.h

index e4e554e8b7d0a6684a42964e3c20d20a821cc783..37237de21ae15f4b35458e55e653c3d73eb11693 100644 (file)
@@ -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 */