[v2,04/15] crypto/cnxk: update private key length in ECDSA param

Message ID 20230926055847.2707473-5-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series fixes and improvements to cnxk crypto PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tejasree Kondoj Sept. 26, 2023, 5:58 a.m. UTC
  From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>

Updating private key length in ECDSA op param to include alignment,
for new microcode.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 drivers/crypto/cnxk/cnxk_ae.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index 7ad259b7f4..209bcd0b43 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -527,7 +527,7 @@  cnxk_ae_ecdsa_sign_prep(struct rte_crypto_ecdsa_op_param *ecdsa,
 
 	/* Set write offset for order and private key */
 	o_offset = prime_len - order_len;
-	pk_offset = prime_len - pkey_len;
+	pk_offset = p_align - pkey_len;
 
 	/* Input buffer */
 	dptr = meta_buf->vaddr;
@@ -572,7 +572,7 @@  cnxk_ae_ecdsa_sign_prep(struct rte_crypto_ecdsa_op_param *ecdsa,
 	w4.s.opcode_minor = ROC_AE_MINOR_OP_ECDSA_SIGN;
 
 	w4.s.param1 = curveid | (message_len << 8);
-	w4.s.param2 = (pkey_len << 8) | k_len;
+	w4.s.param2 = (p_align << 8) | k_len;
 	w4.s.dlen = dlen;
 
 	inst->w4.u64 = w4.u64;