From patchwork Thu Sep 21 11:48:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 131783 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E4E4425FF; Thu, 21 Sep 2023 13:48:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18BFD40ED2; Thu, 21 Sep 2023 13:48:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3F95240EAB for ; Thu, 21 Sep 2023 13:48:37 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38LBSEUF018658 for ; Thu, 21 Sep 2023 04:48:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=SRa3Hqv8KQAuR9KA1jvIwVLsmG2WAK+G3jF/+4EwM+o=; b=RiCue50oWDmdPF61M0UKAxTImiTt1rBN2qVr0zoxL1VKxjZ2ptY40zm4nyRJIR54w+88 gpqN1IveWEUoBClX74AJ6RsgF19tugZQBAXTxqrkfzjabiq29bYXhfO4R/nkAS+isVGC NnUULoAvIe/xWa76kjhac4AkwlCuVJZU1TW7dm2qY0hIXZ3okt55J067lq9o/ucUyiig MXu8cFOd1v1V7OESDSbRpV0WnA+J+C58PgAOiB3F7RYieZETsGBFFWq6A5/q9ULkkAsX LF43oD6trGAeHWav8LmRR+TvNRSEpPR+WYtqn7sr9bTCySQImR0GEOB5raaMiSWvaR47 1Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t85ptu0db-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 21 Sep 2023 04:48:36 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 21 Sep 2023 04:48:34 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 21 Sep 2023 04:48:34 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 0C27D5B693F; Thu, 21 Sep 2023 04:48:31 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal CC: Gowrishankar Muthukrishnan , Anoob Joseph , Aakash Sasidharan , "Vidya Sagar Velumuri" , Subject: [PATCH 04/15] crypto/cnxk: fix private key length in ECDSA param Date: Thu, 21 Sep 2023 17:18:09 +0530 Message-ID: <20230921114820.2526810-5-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230921114820.2526810-1-ktejasree@marvell.com> References: <20230921114820.2526810-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: lpM7arsCAi65vRVroURyOvKKCHizXhWd X-Proofpoint-ORIG-GUID: lpM7arsCAi65vRVroURyOvKKCHizXhWd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-21_09,2023-09-21_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Gowrishankar Muthukrishnan Fix private key length in ECDSA op param to include alignment, for new microcode. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/cnxk/cnxk_ae.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;