From patchwork Wed Oct 19 14:15:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 118574 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 1282BA06C8; Wed, 19 Oct 2022 16:15:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09FDD42BD1; Wed, 19 Oct 2022 16:15:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 05277410D1 for ; Wed, 19 Oct 2022 16:15:22 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29JDuHN0003536 for ; Wed, 19 Oct 2022 07:15:22 -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=0w0GT9jfIcnPCndUL65RWuqW7uazNPBi6Q7jkvXpE+k=; b=fEXLRE115BK2dgIZ+8Zlj2fYxKmJuORjNn1N94VEBG3Hr2HroQo5h3bF7w+X+aazt0vv rOYfNH89j6pl3jTOgP+7StMAduNkyY+9M4ijKahxe6PlCWqZLiRmjek/Kd7+rE3b2umG JEfv3S+myLVvoyOD2CqwsCtZ7FVWPtHyfrc6d2zEyodUypkxQV/rKELGEBctzs3Jsefb RHI8RPB700UMsfP+lpoRoFvEawKdzrsc78SMAKkOV/I4QM5IdK0YgRam5Uo1iMfoojV/ dEirtpoylhpekxd2CgFBr+SmscjmSK/dgBH4WNni0M+bY/RbhwaM5m+cUBXEEpPOzo4R Tg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k7vcph6aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 19 Oct 2022 07:15:22 -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.18; Wed, 19 Oct 2022 07:15:19 -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.2 via Frontend Transport; Wed, 19 Oct 2022 07:15:19 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 4ABEE3F70A1; Wed, 19 Oct 2022 07:15:16 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal CC: Anoob Joseph , Vidya Sagar Velumuri , Subject: [PATCH 01/13] crypto/cnxk: fix length of AES-CMAC algo Date: Wed, 19 Oct 2022 19:45:01 +0530 Message-ID: <20221019141513.1969052-2-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019141513.1969052-1-ktejasree@marvell.com> References: <20221019141513.1969052-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: gVV_xqiJD30HLuEv3TbmEaWUoFKFbknO X-Proofpoint-GUID: gVV_xqiJD30HLuEv3TbmEaWUoFKFbknO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_08,2022-10-19_03,2022-06-22_01 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 AES-CMAC uses PDCP opcode. Length should be passed in bits. Fixes: 759b5e653580 ("crypto/cnxk: support AES-CMAC") Signed-off-by: Tejasree Kondoj --- drivers/crypto/cnxk/cnxk_se.h | 3 +++ 1 file changed, 3 insertions(+) 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;