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 B8E9AA0C47; Thu, 2 Sep 2021 14:23:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE6934111D; Thu, 2 Sep 2021 14:23:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B719740DF7 for ; Thu, 2 Sep 2021 14:23:23 +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 1825LH0A028339 for ; Thu, 2 Sep 2021 05:23: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=LcdNxar6jYwnjFSjibcEwggmTHlZFsL/6owSwqN4hZE=; b=SNBfdH37hj3AfSvC/odLYweXBrvVeq7bGwov906FckIvxDv8yfVlyFeqTSOjssKo0GDO eZ79J/dAXNFUNuuEWrzwpZnLsBj52rdhEwTiPPB0XKl8mbX49c0qHyJNT/cLL93XEBQ4 YlTPDtEke34EtnBDD8+3iEG98B3yNiWV4FansiWRCWnc6UG+Rl/7X+Y9ZKCwDvRZtdpC 8HiAGMAI7JWh/sICwDBJayGBAEZnkxxdKIGGXYV+bW2oc5Xtyf9eWrvv94mfjcMr+sno WvQxmCbgWroz6rSHMMKqmKT/8QkMrBFjmZGuhfymfh2powIfl4TQSZRlmKx8q5KlQet+ Uw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3atrd2heet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 02 Sep 2021 05:23:22 -0700 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.18; Thu, 2 Sep 2021 05:23:21 -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, 2 Sep 2021 05:23:21 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 7FE0F3F705F; Thu, 2 Sep 2021 05:23:17 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Jerin Jacob CC: Vidya Sagar Velumuri , Archana Muniganti , Tejasree Kondoj , Date: Thu, 2 Sep 2021 17:52:33 +0530 Message-ID: <1630585354-1136-7-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1630585354-1136-1-git-send-email-anoobj@marvell.com> References: <1630585354-1136-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: Ab9MaNkChNBP4fiKabvruYm86iOzI8N- X-Proofpoint-ORIG-GUID: Ab9MaNkChNBP4fiKabvruYm86iOzI8N- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-02_04,2021-09-02_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 6/7] crypto/cnxk: support for ucode API change 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" From: Vidya Sagar Velumuri Add support for API changes in ucode 1.13 Signed-off-by: Vidya Sagar Velumuri --- drivers/crypto/cnxk/cnxk_se.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index bbad289..aedc4bc 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -993,10 +993,7 @@ cpt_zuc_snow3g_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens, cpt_inst_w4.s.opcode_major = ROC_SE_MAJOR_OP_ZUC_SNOW3G; - /* indicates CPTR ctx, operation type, KEY & IV mode from DPTR */ - - cpt_inst_w4.s.opcode_minor = ((1 << 7) | (pdcp_alg_type << 5) | - (0 << 4) | (0 << 3) | (flags & 0x7)); + cpt_inst_w4.s.opcode_minor = se_ctx->template_w4.s.opcode_minor; if (flags == 0x1) { /* @@ -1766,6 +1763,8 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess) NULL))) return -1; + if ((enc_type >= ROC_SE_ZUC_EEA3) && (enc_type <= ROC_SE_AES_CTR_EEA2)) + roc_se_ctx_swap(&sess->roc_se_ctx); return 0; } @@ -1869,6 +1868,10 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess) a_form->digest_length))) return -1; + if ((auth_type >= ROC_SE_ZUC_EIA3) && + (auth_type <= ROC_SE_AES_CMAC_EIA2)) + roc_se_ctx_swap(&sess->roc_se_ctx); + return 0; } -- 2.7.4