patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Archana Muniganti <marchana@marvell.com>
To: <akhil.goyal@nxp.com>, <anoobj@marvell.com>, <adwivedi@marvell.com>
Cc: Archana Muniganti <marchana@marvell.com>, <dev@dpdk.org>,
	<stable@dpdk.org>
Subject: [dpdk-stable] [PATCH 1/2] common/cpt: remove redundant CPT_BYTE_* macros
Date: Wed, 16 Sep 2020 16:06:59 +0530
Message-ID: <1600252620-18201-1-git-send-email-marchana@marvell.com> (raw)

The macros can be replaced with actual constants.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
---
 drivers/common/cpt/cpt_mcode_defines.h |  3 ---
 drivers/common/cpt/cpt_ucode.h         | 14 +++++++-------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/common/cpt/cpt_mcode_defines.h b/drivers/common/cpt/cpt_mcode_defines.h
index fd306ab..ee2c7f3 100644
--- a/drivers/common/cpt/cpt_mcode_defines.h
+++ b/drivers/common/cpt/cpt_mcode_defines.h
@@ -38,9 +38,6 @@
 #define CPT_BLOCK_TYPE1 0
 #define CPT_BLOCK_TYPE2 1
 
-#define CPT_BYTE_16		16
-#define CPT_BYTE_24		24
-#define CPT_BYTE_32		32
 #define CPT_MAX_SG_IN_OUT_CNT	32
 #define CPT_MAX_SG_CNT		(CPT_MAX_SG_IN_OUT_CNT/2)
 
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 44067cf..0cfba0b 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -47,9 +47,9 @@
 cpt_fc_ciph_validate_key_aes(uint16_t key_len)
 {
 	switch (key_len) {
-	case CPT_BYTE_16:
-	case CPT_BYTE_24:
-	case CPT_BYTE_32:
+	case 16:
+	case 24:
+	case 32:
 		return 0;
 	default:
 		return -1;
@@ -82,7 +82,7 @@
 		break;
 	case AES_XTS:
 		key_len = key_len / 2;
-		if (unlikely(key_len == CPT_BYTE_24)) {
+		if (unlikely(key_len == 24)) {
 			CPT_LOG_DP_ERR("Invalid AES key len for XTS");
 			return -1;
 		}
@@ -128,13 +128,13 @@
 {
 	mc_aes_type_t aes_key_type = 0;
 	switch (key_len) {
-	case CPT_BYTE_16:
+	case 16:
 		aes_key_type = AES_128_BIT;
 		break;
-	case CPT_BYTE_24:
+	case 24:
 		aes_key_type = AES_192_BIT;
 		break;
-	case CPT_BYTE_32:
+	case 32:
 		aes_key_type = AES_256_BIT;
 		break;
 	default:
-- 
1.8.3.1


             reply	other threads:[~2020-09-16 10:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 10:36 Archana Muniganti [this message]
2020-09-16 10:37 ` [dpdk-stable] [PATCH 2/2] common/cpt: add check for mac_len Archana Muniganti
2020-09-16 15:56   ` Anoob Joseph
2020-10-09 12:26 ` [dpdk-stable] [PATCH 1/2] common/cpt: remove redundant CPT_BYTE_* macros 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=1600252620-18201-1-git-send-email-marchana@marvell.com \
    --to=marchana@marvell.com \
    --cc=adwivedi@marvell.com \
    --cc=akhil.goyal@nxp.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git