DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gagandeep Singh <g.singh@nxp.com>
To: gakhil@marvell.com, dev@dpdk.org
Cc: Gagandeep Singh <g.singh@nxp.com>
Subject: [PATCH 07/14] dpaax/caamflib: remove obsolete code
Date: Fri, 22 Apr 2022 09:20:53 +0530	[thread overview]
Message-ID: <20220422035100.3180870-7-g.singh@nxp.com> (raw)
In-Reply-To: <20220422035100.3180870-1-g.singh@nxp.com>

Remove sec era 1 to 7 IPsec and caam operations code
as none of the NXP platform use it.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/ipsec.h    | 34 +++-------------
 .../dpaax/caamflib/rta/fifo_load_store_cmd.h  | 15 -------
 .../common/dpaax/caamflib/rta/header_cmd.h    | 15 +------
 drivers/common/dpaax/caamflib/rta/jump_cmd.h  | 16 --------
 drivers/common/dpaax/caamflib/rta/key_cmd.h   | 12 ------
 drivers/common/dpaax/caamflib/rta/math_cmd.h  | 29 --------------
 drivers/common/dpaax/caamflib/rta/move_cmd.h  | 39 ++++---------------
 drivers/common/dpaax/caamflib/rta/nfifo_cmd.h |  6 ---
 .../common/dpaax/caamflib/rta/operation_cmd.h | 20 ----------
 .../common/dpaax/caamflib/rta/protocol_cmd.h  | 29 --------------
 10 files changed, 15 insertions(+), 200 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h
index 668d21649d..8ec6aac915 100644
--- a/drivers/common/dpaax/caamflib/desc/ipsec.h
+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h
@@ -774,14 +774,9 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap,
 	COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len);
 	SET_LABEL(p, hdr);
 	pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, BOTH|SHRD);
-	if (authdata->keylen) {
-		if (rta_sec_era < RTA_SEC_ERA_6)
-			KEY(p, MDHA_SPLIT_KEY, authdata->key_enc_flags,
-			    authdata->key, authdata->keylen,
-			    INLINE_KEY(authdata));
-		else
-			__gen_auth_key(p, authdata);
-	}
+	if (authdata->keylen)
+		__gen_auth_key(p, authdata);
+
 	if (cipherdata->keylen)
 		KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
 		    cipherdata->keylen, INLINE_KEY(cipherdata));
@@ -841,14 +836,9 @@ cnstr_shdsc_ipsec_decap(uint32_t *descbuf, bool ps, bool swap,
 	__rta_copy_ipsec_decap_pdb(p, pdb, cipherdata->algtype);
 	SET_LABEL(p, hdr);
 	pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, BOTH|SHRD);
-	if (authdata->keylen) {
-		if (rta_sec_era < RTA_SEC_ERA_6)
-			KEY(p, MDHA_SPLIT_KEY, authdata->key_enc_flags,
-			    authdata->key, authdata->keylen,
-			    INLINE_KEY(authdata));
-		else
-			__gen_auth_key(p, authdata);
-	}
+	if (authdata->keylen)
+		__gen_auth_key(p, authdata);
+
 	if (cipherdata->keylen)
 		KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
 		    cipherdata->keylen, INLINE_KEY(cipherdata));
@@ -1248,12 +1238,6 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps,
 	LABEL(l2copy);
 	REFERENCE(pl2copy);
 
-	if (rta_sec_era < RTA_SEC_ERA_8) {
-		pr_err("IPsec new mode encap: available only for Era %d or above\n",
-		       USER_SEC_ERA(RTA_SEC_ERA_8));
-		return -ENOTSUP;
-	}
-
 	PROGRAM_CNTXT_INIT(p, descbuf, 0);
 	if (swap)
 		PROGRAM_SET_BSWAP(p);
@@ -1363,12 +1347,6 @@ cnstr_shdsc_ipsec_new_decap(uint32_t *descbuf, bool ps,
 	LABEL(hdr);
 	REFERENCE(phdr);
 
-	if (rta_sec_era < RTA_SEC_ERA_8) {
-		pr_err("IPsec new mode decap: available only for Era %d or above\n",
-		       USER_SEC_ERA(RTA_SEC_ERA_8));
-		return -ENOTSUP;
-	}
-
 	PROGRAM_CNTXT_INIT(p, descbuf, 0);
 	if (swap)
 		PROGRAM_SET_BSWAP(p);
diff --git a/drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h b/drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h
index 287e09cd75..51d54deb16 100644
--- a/drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/fifo_load_store_cmd.h
@@ -68,11 +68,6 @@ rta_fifo_load(struct program *program, uint32_t src,
 			pr_err("SEQ FIFO LOAD: Invalid command\n");
 			goto err;
 		}
-		if ((rta_sec_era <= RTA_SEC_ERA_5) && (flags & AIDF)) {
-			pr_err("SEQ FIFO LOAD: Flag(s) not supported by SEC Era %d\n",
-			       USER_SEC_ERA(rta_sec_era));
-			goto err;
-		}
 		if ((flags & VLF) && ((flags & EXT) || (length >> 16))) {
 			pr_err("SEQ FIFO LOAD: Invalid usage of VLF\n");
 			goto err;
@@ -244,11 +239,6 @@ rta_fifo_store(struct program *program, uint32_t src,
 			goto err;
 		}
 	}
-	if ((rta_sec_era == RTA_SEC_ERA_7) && (src == AFHA_SBOX)) {
-		pr_err("FIFO STORE: AFHA S-box not supported by SEC Era %d\n",
-		       USER_SEC_ERA(rta_sec_era));
-		goto err;
-	}
 
 	/* write output data type field */
 	ret = __rta_map_opcode(src, fifo_store_table,
@@ -263,11 +253,6 @@ rta_fifo_store(struct program *program, uint32_t src,
 	if (encrypt_flags & TK)
 		opcode |= (0x1 << FIFOST_TYPE_SHIFT);
 	if (encrypt_flags & EKT) {
-		if (rta_sec_era == RTA_SEC_ERA_1) {
-			pr_err("FIFO STORE: AES-CCM source types not supported\n");
-			ret = -EINVAL;
-			goto err;
-		}
 		opcode |= (0x10 << FIFOST_TYPE_SHIFT);
 		opcode &= (uint32_t)~(0x20 << FIFOST_TYPE_SHIFT);
 	}
diff --git a/drivers/common/dpaax/caamflib/rta/header_cmd.h b/drivers/common/dpaax/caamflib/rta/header_cmd.h
index 45aefa04c1..779f84ebcb 100644
--- a/drivers/common/dpaax/caamflib/rta/header_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/header_cmd.h
@@ -155,12 +155,6 @@ rta_job_header(struct program *program,
 		goto err;
 	}
 
-	if ((rta_sec_era < RTA_SEC_ERA_7) && (flags & MTD) && !(flags & TD)) {
-		pr_err("JOB_DESC: Trying to MTD a descriptor that is not a TD. SEC Program Line: %d\n",
-		       program->current_pc);
-		goto err;
-	}
-
 	if ((flags & EXT) && !(flags & SHR) && (start_idx < 2)) {
 		pr_err("JOB_DESC: Start index must be >= 2 in case of no SHR and EXT. SEC Program Line: %d\n",
 		       program->current_pc);
@@ -183,15 +177,8 @@ rta_job_header(struct program *program,
 			hdr_ext |= ext_flags & DSEL_MASK;
 		}
 
-		if (ext_flags & FTD) {
-			if (rta_sec_era <= RTA_SEC_ERA_5) {
-				pr_err("JOB_DESC: Fake trusted descriptor not supported by SEC Era %d\n",
-				       USER_SEC_ERA(rta_sec_era));
-				goto err;
-			}
-
+		if (ext_flags & FTD)
 			hdr_ext |= HDR_EXT_FTD;
-		}
 	}
 	if (flags & RSMS)
 		opcode |= HDR_RSLS;
diff --git a/drivers/common/dpaax/caamflib/rta/jump_cmd.h b/drivers/common/dpaax/caamflib/rta/jump_cmd.h
index 18f781e373..0ce5a3e7c6 100644
--- a/drivers/common/dpaax/caamflib/rta/jump_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/jump_cmd.h
@@ -7,8 +7,6 @@
 #ifndef __RTA_JUMP_CMD_H__
 #define __RTA_JUMP_CMD_H__
 
-extern enum rta_sec_era rta_sec_era;
-
 static const uint32_t jump_test_cond[][2] = {
 	{ NIFP,     JUMP_COND_NIFP },
 	{ NIP,      JUMP_COND_NIP },
@@ -59,20 +57,6 @@ rta_jump(struct program *program, uint64_t address,
 	unsigned int start_pc = program->current_pc;
 	int ret = -EINVAL;
 
-	if (((jump_type == GOSUB) || (jump_type == RETURN)) &&
-	    (rta_sec_era < RTA_SEC_ERA_4)) {
-		pr_err("JUMP: Jump type not supported by SEC Era %d\n",
-		       USER_SEC_ERA(rta_sec_era));
-		goto err;
-	}
-
-	if (((jump_type == LOCAL_JUMP_INC) || (jump_type == LOCAL_JUMP_DEC)) &&
-	    (rta_sec_era <= RTA_SEC_ERA_5)) {
-		pr_err("JUMP_INCDEC: Jump type not supported by SEC Era %d\n",
-		       USER_SEC_ERA(rta_sec_era));
-		goto err;
-	}
-
 	switch (jump_type) {
 	case (LOCAL_JUMP):
 		/*
diff --git a/drivers/common/dpaax/caamflib/rta/key_cmd.h b/drivers/common/dpaax/caamflib/rta/key_cmd.h
index ec3fbcaf61..714918e18b 100644
--- a/drivers/common/dpaax/caamflib/rta/key_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/key_cmd.h
@@ -54,12 +54,6 @@ rta_key(struct program *program, uint32_t key_dst,
 			       program->current_instruction);
 			goto err;
 		}
-		if ((rta_sec_era <= RTA_SEC_ERA_5) &&
-		    ((flags & VLF) || (flags & AIDF))) {
-			pr_err("SEQKEY: Flag(s) not supported by SEC Era %d\n",
-			       USER_SEC_ERA(rta_sec_era));
-			goto err;
-		}
 	} else {
 		if ((flags & AIDF) || (flags & VLF)) {
 			pr_err("KEY: Invalid flag. SEC PC: %d; Instr: %d\n",
@@ -84,12 +78,6 @@ rta_key(struct program *program, uint32_t key_dst,
 	}
 
 	if (key_dst == AFHA_SBOX) {
-		if (rta_sec_era == RTA_SEC_ERA_7) {
-			pr_err("KEY: AFHA S-box not supported by SEC Era %d\n",
-			       USER_SEC_ERA(rta_sec_era));
-			goto err;
-		}
-
 		if (flags & IMMED) {
 			pr_err("KEY: Invalid flag. SEC PC: %d; Instr: %d\n",
 			       program->current_pc,
diff --git a/drivers/common/dpaax/caamflib/rta/math_cmd.h b/drivers/common/dpaax/caamflib/rta/math_cmd.h
index cca70f7e04..532c70c518 100644
--- a/drivers/common/dpaax/caamflib/rta/math_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/math_cmd.h
@@ -85,22 +85,7 @@ rta_math(struct program *program, uint64_t operand1,
 	int ret = -EINVAL;
 	unsigned int start_pc = program->current_pc;
 
-	if (((op == MATH_FUN_BSWAP) && (rta_sec_era < RTA_SEC_ERA_4)) ||
-	    ((op == MATH_FUN_ZBYT) && (rta_sec_era < RTA_SEC_ERA_2))) {
-		pr_err("MATH: operation not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-		       USER_SEC_ERA(rta_sec_era), program->current_pc,
-		       program->current_instruction);
-		goto err;
-	}
-
 	if (options & SWP) {
-		if (rta_sec_era < RTA_SEC_ERA_7) {
-			pr_err("MATH: operation not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-			       USER_SEC_ERA(rta_sec_era), program->current_pc,
-			       program->current_instruction);
-			goto err;
-		}
-
 		if ((options & IFB) ||
 		    (!(options & IMMED) && !(options & IMMED2)) ||
 		    ((options & IMMED) && (options & IMMED2))) {
@@ -258,26 +243,12 @@ rta_mathi(struct program *program, uint64_t operand,
 	int ret = -EINVAL;
 	unsigned int start_pc = program->current_pc;
 
-	if (rta_sec_era < RTA_SEC_ERA_6) {
-		pr_err("MATHI: Command not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-		       USER_SEC_ERA(rta_sec_era), program->current_pc,
-		       program->current_instruction);
-		goto err;
-	}
-
 	if (((op == MATH_FUN_FBYT) && (options & SSEL))) {
 		pr_err("MATHI: Illegal combination - FBYT and SSEL. SEC PC: %d; Instr: %d\n",
 		       program->current_pc, program->current_instruction);
 		goto err;
 	}
 
-	if ((options & SWP) && (rta_sec_era < RTA_SEC_ERA_7)) {
-		pr_err("MATHI: SWP not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-		       USER_SEC_ERA(rta_sec_era), program->current_pc,
-		       program->current_instruction);
-		goto err;
-	}
-
 	/* Write first operand field */
 	if (!(options & SSEL))
 		ret = __rta_map_opcode((uint32_t)operand, math_op1,
diff --git a/drivers/common/dpaax/caamflib/rta/move_cmd.h b/drivers/common/dpaax/caamflib/rta/move_cmd.h
index d2151c6dd7..ac1280c23a 100644
--- a/drivers/common/dpaax/caamflib/rta/move_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/move_cmd.h
@@ -95,26 +95,12 @@ rta_move(struct program *program, int cmd_type, uint64_t src,
 	bool is_move_len_cmd = false;
 	unsigned int start_pc = program->current_pc;
 
-	if ((rta_sec_era < RTA_SEC_ERA_7) && (cmd_type != __MOVE)) {
-		pr_err("MOVE: MOVEB / MOVEDW not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-		       USER_SEC_ERA(rta_sec_era), program->current_pc,
-		       program->current_instruction);
-		goto err;
-	}
-
 	/* write command type */
 	if (cmd_type == __MOVEB) {
 		opcode = CMD_MOVEB;
 	} else if (cmd_type == __MOVEDW) {
 		opcode = CMD_MOVEDW;
 	} else if (!(flags & IMMED)) {
-		if (rta_sec_era < RTA_SEC_ERA_3) {
-			pr_err("MOVE: MOVE_LEN not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-			       USER_SEC_ERA(rta_sec_era), program->current_pc,
-			       program->current_instruction);
-			goto err;
-		}
-
 		if ((length != MATH0) && (length != MATH1) &&
 		    (length != MATH2) && (length != MATH3)) {
 			pr_err("MOVE: MOVE_LEN length must be MATH[0-3]. SEC PC: %d; Instr: %d\n",
@@ -153,24 +139,15 @@ rta_move(struct program *program, int cmd_type, uint64_t src,
 		else
 			offset = dst_offset;
 
-		if (rta_sec_era < RTA_SEC_ERA_6) {
-			if (offset)
-				pr_debug("MOVE: Offset not supported by SEC Era %d. SEC PC: %d; Instr: %d\n",
-					 USER_SEC_ERA(rta_sec_era),
-					 program->current_pc,
-					 program->current_instruction);
-			/* nothing to do for offset = 0 */
-		} else {
-			ret = math_offset(offset);
-			if (ret < 0) {
-				pr_err("MOVE: Invalid offset in MATH register. SEC PC: %d; Instr: %d\n",
-				       program->current_pc,
-				       program->current_instruction);
-				goto err;
-			}
-
-			opcode |= (uint32_t)ret;
+		ret = math_offset(offset);
+		if (ret < 0) {
+			pr_err("MOVE: Invalid offset in MATH register. SEC PC: %d; Instr: %d\n",
+			       program->current_pc,
+			       program->current_instruction);
+			goto err;
 		}
+
+		opcode |= (uint32_t)ret;
 	}
 
 	/* write source field */
diff --git a/drivers/common/dpaax/caamflib/rta/nfifo_cmd.h b/drivers/common/dpaax/caamflib/rta/nfifo_cmd.h
index 85092d9612..8131acd9e4 100644
--- a/drivers/common/dpaax/caamflib/rta/nfifo_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/nfifo_cmd.h
@@ -102,12 +102,6 @@ rta_nfifo_load(struct program *program, uint32_t src,
 			    LDST_SRCDST_WORD_INFO_FIFO;
 	unsigned int start_pc = program->current_pc;
 
-	if ((data == AFHA_SBOX) && (rta_sec_era == RTA_SEC_ERA_7)) {
-		pr_err("NFIFO: AFHA S-box not supported by SEC Era %d\n",
-		       USER_SEC_ERA(rta_sec_era));
-		goto err;
-	}
-
 	/* write source field */
 	ret = __rta_map_opcode(src, nfifo_src, nfifo_src_sz[rta_sec_era], &val);
 	if (ret < 0) {
diff --git a/drivers/common/dpaax/caamflib/rta/operation_cmd.h b/drivers/common/dpaax/caamflib/rta/operation_cmd.h
index 3d339cb0a0..fe1ac37ee8 100644
--- a/drivers/common/dpaax/caamflib/rta/operation_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/operation_cmd.h
@@ -19,8 +19,6 @@ __rta_alg_aai_aes(uint16_t aai)
 	uint16_t aes_mode = aai & OP_ALG_AESA_MODE_MASK;
 
 	if (aai & OP_ALG_AAI_C2K) {
-		if (rta_sec_era < RTA_SEC_ERA_5)
-			return -1;
 		if ((aes_mode != OP_ALG_AAI_CCM) &&
 		    (aes_mode != OP_ALG_AAI_GCM))
 			return -EINVAL;
@@ -30,9 +28,6 @@ __rta_alg_aai_aes(uint16_t aai)
 	case OP_ALG_AAI_CBC_CMAC:
 	case OP_ALG_AAI_CTR_CMAC_LTE:
 	case OP_ALG_AAI_CTR_CMAC:
-		if (rta_sec_era < RTA_SEC_ERA_2)
-			return -EINVAL;
-		/* no break */
 	case OP_ALG_AAI_CTR:
 	case OP_ALG_AAI_CBC:
 	case OP_ALG_AAI_ECB:
@@ -72,9 +67,6 @@ __rta_alg_aai_md5(uint16_t aai)
 {
 	switch (aai) {
 	case OP_ALG_AAI_HMAC:
-		if (rta_sec_era < RTA_SEC_ERA_2)
-			return -EINVAL;
-		/* no break */
 	case OP_ALG_AAI_SMAC:
 	case OP_ALG_AAI_HASH:
 	case OP_ALG_AAI_HMAC_PRECOMP:
@@ -89,9 +81,6 @@ __rta_alg_aai_sha(uint16_t aai)
 {
 	switch (aai) {
 	case OP_ALG_AAI_HMAC:
-		if (rta_sec_era < RTA_SEC_ERA_2)
-			return -EINVAL;
-		/* no break */
 	case OP_ALG_AAI_HASH:
 	case OP_ALG_AAI_HMAC_PRECOMP:
 		return 0;
@@ -115,15 +104,6 @@ __rta_alg_aai_rng(uint16_t aai)
 		return -EINVAL;
 	}
 
-	/* State Handle bits are valid only for SEC Era >= 5 */
-	if ((rta_sec_era < RTA_SEC_ERA_5) && rng_sh)
-		return -EINVAL;
-
-	/* PS, AI, SK bits are also valid only for SEC Era >= 5 */
-	if ((rta_sec_era < RTA_SEC_ERA_5) && (aai &
-	     (OP_ALG_AAI_RNG4_PS | OP_ALG_AAI_RNG4_AI | OP_ALG_AAI_RNG4_SK)))
-		return -EINVAL;
-
 	switch (rng_sh) {
 	case OP_ALG_AAI_RNG4_SH_0:
 	case OP_ALG_AAI_RNG4_SH_1:
diff --git a/drivers/common/dpaax/caamflib/rta/protocol_cmd.h b/drivers/common/dpaax/caamflib/rta/protocol_cmd.h
index e9f20703f2..ac5c8af716 100644
--- a/drivers/common/dpaax/caamflib/rta/protocol_cmd.h
+++ b/drivers/common/dpaax/caamflib/rta/protocol_cmd.h
@@ -32,9 +32,6 @@ __rta_ssl_proto(uint16_t protoinfo)
 	case OP_PCL_TLS_ECDHE_RSA_WITH_RC4_128_SHA:
 	case OP_PCL_TLS_ECDH_anon_WITH_RC4_128_SHA:
 	case OP_PCL_TLS_ECDHE_PSK_WITH_RC4_128_SHA:
-		if (rta_sec_era == RTA_SEC_ERA_7)
-			return -EINVAL;
-		/* fall through if not Era 7 */
 	case OP_PCL_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA:
 	case OP_PCL_TLS_RSA_WITH_DES_CBC_SHA:
 	case OP_PCL_TLS_RSA_WITH_3DES_EDE_CBC_SHA:
@@ -215,9 +212,6 @@ __rta_ipsec_proto(uint16_t protoinfo)
 
 	switch (proto_cls1) {
 	case OP_PCL_IPSEC_AES_NULL_WITH_GMAC:
-		if (rta_sec_era < RTA_SEC_ERA_2)
-			return -EINVAL;
-		/* no break */
 	case OP_PCL_IPSEC_AES_CCM8:
 	case OP_PCL_IPSEC_AES_CCM12:
 	case OP_PCL_IPSEC_AES_CCM16:
@@ -229,9 +223,6 @@ __rta_ipsec_proto(uint16_t protoinfo)
 			return 0;
 		return -EINVAL;
 	case OP_PCL_IPSEC_NULL:
-		if (rta_sec_era < RTA_SEC_ERA_2)
-			return -EINVAL;
-		/* no break */
 	case OP_PCL_IPSEC_DES_IV64:
 	case OP_PCL_IPSEC_DES:
 	case OP_PCL_IPSEC_3DES:
@@ -351,9 +342,6 @@ __rta_blob_proto(uint16_t protoinfo)
 
 	switch (protoinfo & OP_PCL_BLOB_REG_MASK) {
 	case OP_PCL_BLOB_AFHA_SBOX:
-		if (rta_sec_era < RTA_SEC_ERA_3)
-			return -EINVAL;
-		/* no break */
 	case OP_PCL_BLOB_REG_MEMORY:
 	case OP_PCL_BLOB_REG_KEY1:
 	case OP_PCL_BLOB_REG_KEY2:
@@ -368,12 +356,6 @@ __rta_blob_proto(uint16_t protoinfo)
 static inline int
 __rta_dlc_proto(uint16_t protoinfo)
 {
-	if ((rta_sec_era < RTA_SEC_ERA_2) &&
-	    (protoinfo & (OP_PCL_PKPROT_DSA_MSG | OP_PCL_PKPROT_HASH_MASK |
-	     OP_PCL_PKPROT_EKT_Z | OP_PCL_PKPROT_DECRYPT_Z |
-	     OP_PCL_PKPROT_DECRYPT_PRI)))
-		return -EINVAL;
-
 	switch (protoinfo & OP_PCL_PKPROT_HASH_MASK) {
 	case OP_PCL_PKPROT_HASH_MD5:
 	case OP_PCL_PKPROT_HASH_SHA1:
@@ -482,9 +464,6 @@ __rta_dkp_proto(uint16_t protoinfo)
 static inline int
 __rta_3g_dcrc_proto(uint16_t protoinfo)
 {
-	if (rta_sec_era == RTA_SEC_ERA_7)
-		return -EINVAL;
-
 	switch (protoinfo) {
 	case OP_PCL_3G_DCRC_CRC7:
 	case OP_PCL_3G_DCRC_CRC11:
@@ -497,9 +476,6 @@ __rta_3g_dcrc_proto(uint16_t protoinfo)
 static inline int
 __rta_3g_rlc_proto(uint16_t protoinfo)
 {
-	if (rta_sec_era == RTA_SEC_ERA_7)
-		return -EINVAL;
-
 	switch (protoinfo) {
 	case OP_PCL_3G_RLC_NULL:
 	case OP_PCL_3G_RLC_KASUMI:
@@ -513,13 +489,8 @@ __rta_3g_rlc_proto(uint16_t protoinfo)
 static inline int
 __rta_lte_pdcp_proto(uint16_t protoinfo)
 {
-	if (rta_sec_era == RTA_SEC_ERA_7)
-		return -EINVAL;
-
 	switch (protoinfo) {
 	case OP_PCL_LTE_ZUC:
-		if (rta_sec_era < RTA_SEC_ERA_5)
-			break;
 	case OP_PCL_LTE_NULL:
 	case OP_PCL_LTE_SNOW:
 	case OP_PCL_LTE_AES:
-- 
2.25.1


  parent reply	other threads:[~2022-04-22  3:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  3:50 [PATCH 01/14] crypto/dpaa2_sec: fix fle buffer leak Gagandeep Singh
2022-04-22  3:50 ` [PATCH 02/14] crypto/dpaa2_sec: fix buffer pool ID check Gagandeep Singh
2022-04-22  3:50 ` [PATCH 03/14] crypto/dpaa_sec: fix length for chain fd in raw sec driver Gagandeep Singh
2022-04-22  3:50 ` [PATCH 04/14] crypto/dpaa2_sec: " Gagandeep Singh
2022-04-22  3:50 ` [PATCH 05/14] crypto/dpaa_sec: physically enable QI Gagandeep Singh
2022-04-22  3:50 ` [PATCH 06/14] crypto/dpaa_sec: replace use of old build macros Gagandeep Singh
2022-04-22  3:50 ` Gagandeep Singh [this message]
2022-04-22  3:50 ` [PATCH 08/14] crypto/dpaa_sec : fix secondary process probe Gagandeep Singh
2022-04-22  3:50 ` [PATCH 09/14] crypto/dpaa2_sec: per queue pair fle pool Gagandeep Singh
2022-04-22  3:50 ` [PATCH 10/14] crypto/dpaa2_sec: fix crypto op pointer for atomic and ordered queues Gagandeep Singh
2022-04-22  3:50 ` [PATCH 11/14] crypto/dpaa2_sec: fix operation status for simple fd Gagandeep Singh
2022-04-22  3:50 ` [PATCH 12/14] crypto/dpaa_sec: remove unused thread specific variables Gagandeep Singh
2022-04-22  3:50 ` [PATCH 13/14] crypto/dpaa_sec: move cdb prepration to session create Gagandeep Singh
2022-04-22  3:51 ` [PATCH 14/14] common/dpaax: fix short MAC-I IV calculation for zuc Gagandeep Singh
2022-04-28  7:15 ` [EXT] [PATCH 01/14] crypto/dpaa2_sec: fix fle buffer leak Akhil Goyal
2022-04-28  9:23   ` Gagandeep Singh
2022-04-28  9:29     ` Akhil Goyal
2022-04-28 11:47 ` [PATCH v2 00/14] DPAA1 and DPAA2 crypto drivers changes Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 01/14] crypto/dpaa2_sec: fix fle buffer leak Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 02/14] crypto/dpaa2_sec: fix buffer pool ID check Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 03/14] crypto/dpaa_sec: fix length for chain FD in raw sec driver Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 04/14] crypto/dpaa2_sec: " Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 05/14] crypto/dpaa_sec: physically enable QI Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 06/14] crypto/dpaa_sec: replace use of old build macros Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 07/14] common/dpaax: remove obsolete code Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 08/14] crypto/dpaa_sec: fix secondary process probe Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 09/14] crypto/dpaa2_sec: per queue pair fle pool Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 10/14] crypto/dpaa2_sec: fix crypto op pointer value Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 11/14] crypto/dpaa2_sec: fix operation status for simple FD Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 12/14] bus/dpaa: remove unused thread specific variables Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 13/14] crypto/dpaa_sec: move cdb prepration to session create Gagandeep Singh
2022-04-28 11:47   ` [PATCH v2 14/14] common/dpaax: fix short MAC-I IV calculation for zuc Gagandeep Singh
2022-04-29  9:29   ` [EXT] [PATCH v2 00/14] DPAA1 and DPAA2 crypto drivers changes 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=20220422035100.3180870-7-g.singh@nxp.com \
    --to=g.singh@nxp.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@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).