[01/13] crypto/cnxk: fix length of AES-CMAC algo

Message ID 20221019141513.1969052-2-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [01/13] crypto/cnxk: fix length of AES-CMAC algo |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure

Commit Message

Tejasree Kondoj Oct. 19, 2022, 2:15 p.m. UTC
  AES-CMAC uses PDCP opcode. Length should be passed
in bits.

Fixes: 759b5e653580 ("crypto/cnxk: support AES-CMAC")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/cnxk/cnxk_se.h | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 54a78d0a5a..c92e2cca2f 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1323,6 +1323,9 @@  cpt_pdcp_alg_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,
 			auth_offset += iv_len;
 
 			inputlen = auth_offset + auth_data_len;
+
+			/* length should be in bits */
+			auth_data_len *= 8;
 		}
 
 		outputlen = mac_len;