From patchwork Mon Feb 6 14:52:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 123154 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 5F00541C12; Mon, 6 Feb 2023 15:53:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A0FA427E9; Mon, 6 Feb 2023 15:53:08 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A1B1C40FAE for ; Mon, 6 Feb 2023 15:53:06 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 316DheTD021866 for ; Mon, 6 Feb 2023 06:53:05 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=xiC8Pl34PS/d1rzVPegIAexuPPTF58dUfokB3g7/uRM=; b=Mx/OyQ+8R0FQBzPWpOQ1P9fV864QYd3cyfEtGzplr9VZYAuz4P8FARFH+X/Duybe4ZBP VsspD//KbjB8H9j6kQLsKjBr9vdyPbMqSz8+qohHGpE1RAXo8DMLS6VMLqKGQRURQ3++ ATe1/Im6jFmT55keR9x83tpsTzJo6pFewR5OHIHNlshxgXkMUq0W9sDQ4ZiOFA7BH8tz 4DFVZ5Ua2yk4geqFIwA/QC5a0T/4AghM5anXzaUSsDnYN2eKvIxIBWEr3VtmakdNYsTV DXRzmPQg3LQ0ekWtOrOhPiI55tOF6QKNuQAaWVgRm9zYYxx4IapLn0XsfhYgg+NCYouu cQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3nhnkv4dh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 06 Feb 2023 06:53:05 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 6 Feb 2023 06:53:04 -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; Mon, 6 Feb 2023 06:53:04 -0800 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id 173C93F7050; Mon, 6 Feb 2023 06:53:01 -0800 (PST) From: Gowrishankar Muthukrishnan To: CC: Anoob Joseph , , Akhil Goyal , Tejasree Kondoj , "Gowrishankar Muthukrishnan" Subject: [PATCH] common/cnxk: fix incorrect auth key length Date: Mon, 6 Feb 2023 20:22:58 +0530 Message-ID: <20230206145258.1457688-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 0bW7nAB7nVP7jsclM4Ty1ZFedDyppZeb X-Proofpoint-GUID: 0bW7nAB7nVP7jsclM4Ty1ZFedDyppZeb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_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 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 e9415f21a5..7d6afd26cb 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 {