DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anoob Joseph <anoobj@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>, Jerin Jacob <jerinj@marvell.com>
Cc: Vidya Sagar Velumuri <vvelumuri@marvell.com>,
	Archana Muniganti <marchana@marvell.com>,
	Tejasree Kondoj <ktejasree@marvell.com>, <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 6/7] crypto/cnxk: support for ucode API change
Date: Thu, 2 Sep 2021 17:52:33 +0530	[thread overview]
Message-ID: <1630585354-1136-7-git-send-email-anoobj@marvell.com> (raw)
In-Reply-To: <1630585354-1136-1-git-send-email-anoobj@marvell.com>

From: Vidya Sagar Velumuri <vvelumuri@marvell.com>

Add support for API changes in ucode 1.13

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
 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


  parent reply	other threads:[~2021-09-02 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 12:22 [dpdk-dev] [PATCH 0/7] Improvements and fixes in crypto/cnxk PMDs Anoob Joseph
2021-09-02 12:22 ` [dpdk-dev] [PATCH 1/7] common/cnxk: update to v1.13 ZUC API Anoob Joseph
2021-09-02 12:22 ` [dpdk-dev] [PATCH 2/7] common/cnxk: update to v1.16 ucc codes Anoob Joseph
2021-09-02 12:22 ` [dpdk-dev] [PATCH 3/7] crypto/cnxk: remove redundant snow3g dec Anoob Joseph
2021-09-02 12:22 ` [dpdk-dev] [PATCH 4/7] crypto/cnxk: remove redundant memcpy of IV for ZUC Anoob Joseph
2021-09-02 12:22 ` [dpdk-dev] [PATCH 5/7] crypto/cnxk: remove redundant assignment Anoob Joseph
2021-09-02 12:22 ` Anoob Joseph [this message]
2021-09-02 12:22 ` [dpdk-dev] [PATCH 7/7] crypto/cnxk: add dual submission in crypto_cn9k Anoob Joseph
2021-09-06 19:15 ` [dpdk-dev] [PATCH 0/7] Improvements and fixes in crypto/cnxk PMDs Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1630585354-1136-7-git-send-email-anoobj@marvell.com \
    --to=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=ktejasree@marvell.com \
    --cc=marchana@marvell.com \
    --cc=vvelumuri@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).