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 AA5BEA0547; Thu, 28 Oct 2021 18:53:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC48B4111D; Thu, 28 Oct 2021 18:52:55 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A229640E25 for ; Thu, 28 Oct 2021 18:52:52 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19SA4QSn027112 for ; Thu, 28 Oct 2021 09:52:51 -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=7pXBhdDhPI3uTAG+qi08M5amn49uG90hbqaZZALOO9U=; b=OjZ9VsGXnkZZyNZbIzLbuuQ3uZvfQcFZsRnNYiKEXFaUMdRkgKREWyYLYfV7qtaX/uAv vOr846LXHdq6GOuwrbzR3M1Coq3tm6bIB1LEF7Xb1SkHzda67XTuXzbAu+T+KxWm64X7 J9qsa/JyZOqBaxxYI/jL//vr59BAnpv/N4C1x8uPG+W2VBE4C9nbIONO1G1sX89RpVoa 89aDu53VWoVP1Qegayv0zzJjlFjg7ITRIptCqgyW6vTQoH5gwslCWbqLEx0tEb+/3Oqk YNd6H1Gmu/3FABHZxBifWX8hzHZfI2pAFDJvPc9wWvqv7EHrTiCRkGjL++7vLXlerWF+ nQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3byrpg2627-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 28 Oct 2021 09:52:51 -0700 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.18; Thu, 28 Oct 2021 09:52:49 -0700 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.18 via Frontend Transport; Thu, 28 Oct 2021 09:52:49 -0700 Received: from hyd1409.caveonetworks.com.com (unknown [10.29.45.15]) by maili.marvell.com (Postfix) with ESMTP id CED6A3F7065; Thu, 28 Oct 2021 09:52:47 -0700 (PDT) From: Archana Muniganti To: CC: Archana Muniganti , , , , Date: Thu, 28 Oct 2021 22:22:27 +0530 Message-ID: <20211028165228.14603-6-marchana@marvell.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20211028165228.14603-1-marchana@marvell.com> References: <20211028165228.14603-1-marchana@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: LM869IGuPeedz2eAhB7pZXSljosUBP8S X-Proofpoint-GUID: LM869IGuPeedz2eAhB7pZXSljosUBP8S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-28_04,2021-10-26_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 5/6] crypto/cnxk: update auth key size 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 Sender: "dev" Update auth key size for SHA256_HMAC for cn9k. Signed-off-by: Archana Muniganti --- .../crypto/cnxk/cnxk_cryptodev_capabilities.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c index 19d75a63c6..7dbea0b364 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c @@ -951,6 +951,26 @@ cn10k_sec_crypto_caps_update(struct rte_cryptodev_capabilities cnxk_caps[], } } +static void +cn9k_sec_crypto_caps_update(struct rte_cryptodev_capabilities cnxk_caps[]) +{ + + struct rte_cryptodev_capabilities *caps; + int i = 0; + + while ((caps = &cnxk_caps[i++])->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { + if ((caps->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC) && + (caps->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AUTH) && + (caps->sym.auth.algo == RTE_CRYPTO_AUTH_SHA256_HMAC)) { + caps->sym.auth.key_size.min = 32; + caps->sym.auth.key_size.max = 64; + caps->sym.auth.key_size.increment = 1; + + break; + } + } +} + static void sec_crypto_caps_populate(struct rte_cryptodev_capabilities cnxk_caps[], union cpt_eng_caps *hw_caps) @@ -962,6 +982,8 @@ sec_crypto_caps_populate(struct rte_cryptodev_capabilities cnxk_caps[], if (roc_model_is_cn10k()) cn10k_sec_crypto_caps_update(cnxk_caps, &cur_pos); + else + cn9k_sec_crypto_caps_update(cnxk_caps); sec_caps_add(cnxk_caps, &cur_pos, caps_end, RTE_DIM(caps_end)); } -- 2.22.0