From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FCD141D5F; Fri, 24 Feb 2023 10:40:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8769740EF0; Fri, 24 Feb 2023 10:40:25 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 7C30B40DF6 for ; Fri, 24 Feb 2023 10:40:23 +0100 (CET) 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 31O71rQB026911 for ; Fri, 24 Feb 2023 01:40:22 -0800 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=qPtgSi0zckcTvjqkVSrFdpltpqTLk+FdMFkDSJMg/AE=; b=AYLhFZExaHP9TkUBuIXm2TTpU2ZJkCIYgLyou90r/+sV0xn0DL6xUoMfy1m6Dwu0GqUr VZ8BcBDfLkcyz0zIpc5+yWKMvR+CWBux629ogG1PECA6fNb3vRuJrdfl6Y3o2DvwsGWY RnkUnN6Fe6swaGuDu/OYQheWYyzM5hDaNPwygcscMYm+wZeQaKx142QsY4I6+GtyH9fo BpJdmdEHU3Al0XPFnCnn3s1SI1H1LTNryWA42ZojD8N7SNyP5P8haFdpENqSiB2Of48i rV96F6geiec/VLVA88bHs+KMRPkTIzS0+mdk4X0adhAJSb6NdcipaBSns9nUztqDu/XJ Hg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nxfkwb2g7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 24 Feb 2023 01:40:22 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 24 Feb 2023 01:40:20 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Fri, 24 Feb 2023 01:40:20 -0800 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 41A203F709A; Fri, 24 Feb 2023 01:40:17 -0800 (PST) From: Tejasree Kondoj To: Akhil Goyal CC: Gowrishankar Muthukrishnan , Anoob Joseph , Subject: [PATCH v2 01/11] common/cnxk: fix incorrect auth key length Date: Fri, 24 Feb 2023 15:10:04 +0530 Message-ID: <20230224094014.3246764-2-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230224094014.3246764-1-ktejasree@marvell.com> References: <20230224094014.3246764-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: J3JEiiMi3kArJsOb4Jp9l7O6aaQzZdHB X-Proofpoint-ORIG-GUID: J3JEiiMi3kArJsOb4Jp9l7O6aaQzZdHB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-24_05,2023-02-23_01,2023-02-09_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 From: Gowrishankar Muthukrishnan Auth key length is stored as 8 bit value in SE context. It should be larger enough to accommodate supported auth key length of 1024 bytes maximum, as in HMAC. Fixes: a45859312ff ("common/cnxk: add SE definitions for symmetric crypto") Signed-off-by: Gowrishankar Muthukrishnan --- drivers/common/cnxk/roc_se.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/common/cnxk/roc_se.h b/drivers/common/cnxk/roc_se.h index 6758142214..a0c97b26c5 100644 --- a/drivers/common/cnxk/roc_se.h +++ b/drivers/common/cnxk/roc_se.h @@ -288,16 +288,15 @@ struct roc_se_ctx { uint64_t enc_cipher : 8; uint64_t hash_type : 8; uint64_t mac_len : 8; - uint64_t auth_key_len : 8; + uint64_t auth_key_len : 16; uint64_t fc_type : 4; uint64_t hmac : 1; uint64_t zsk_flags : 3; uint64_t k_ecb : 1; uint64_t pdcp_ci_alg : 2; uint64_t pdcp_auth_alg : 2; - uint16_t ciph_then_auth : 1; - uint16_t auth_then_ciph : 1; - uint64_t rsvd : 17; + uint64_t ciph_then_auth : 1; + uint64_t auth_then_ciph : 1; union cpt_inst_w4 template_w4; /* Below fields are accessed by hardware */ struct se_ctx_s { -- 2.25.1