DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrzej Ostruszka <amo@semihalf.com>
To: dev@dpdk.org
Cc: mw@semihalf.com, nadavh@marvell.com, Tomasz Duszynski <tdu@semihalf.com>
Subject: [dpdk-dev] [PATCH v2 5/6] crypto/mvsam: support for crypto/auth NULL algorithms
Date: Fri, 21 Sep 2018 16:53:58 +0200	[thread overview]
Message-ID: <1537541639-22764-6-git-send-email-amo@semihalf.com> (raw)
In-Reply-To: <1537541639-22764-1-git-send-email-amo@semihalf.com>

From: Tomasz Duszynski <tdu@semihalf.com>

Add support for both cipher and auth NULL algorithms.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c     |  6 +++++
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 45 +++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 08d4a23..961802e 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -69,6 +69,9 @@ __rte_aligned(32);
  */
 static const
 struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = {
+	[RTE_CRYPTO_CIPHER_NULL] = {
+		.supported = ALGO_SUPPORTED,
+		.cipher_alg = SAM_CIPHER_NONE },
 	[RTE_CRYPTO_CIPHER_3DES_CBC] = {
 		.supported = ALGO_SUPPORTED,
 		.cipher_alg = SAM_CIPHER_3DES,
@@ -106,6 +109,9 @@ struct cipher_params_mapping cipher_map[RTE_CRYPTO_CIPHER_LIST_END] = {
  */
 static const
 struct auth_params_mapping auth_map[RTE_CRYPTO_AUTH_LIST_END] = {
+	[RTE_CRYPTO_AUTH_NULL] = {
+		.supported = ALGO_SUPPORTED,
+		.auth_alg = SAM_AUTH_NONE },
 	[RTE_CRYPTO_AUTH_MD5_HMAC] = {
 		.supported = ALGO_SUPPORTED,
 		.auth_alg = SAM_AUTH_HMAC_MD5 },
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3d3bbf1..f3251aa 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -413,6 +413,51 @@ static const struct rte_cryptodev_capabilities
 			}, }
 		}, }
 	},
+	{	/* NULL (AUTH) */
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+		{.sym = {
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+			{.auth = {
+				.algo = RTE_CRYPTO_AUTH_NULL,
+				.block_size = 1,
+				.key_size = {
+					.min = 0,
+					.max = 0,
+					.increment = 0
+				},
+				.digest_size = {
+					.min = 0,
+					.max = 0,
+					.increment = 0
+				},
+				.iv_size = {
+					.min = 0,
+					.max = 0,
+					.increment = 0
+				}
+			}, },
+		}, },
+	},
+	{	/* NULL (CIPHER) */
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+		{.sym = {
+			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+			{.cipher = {
+				.algo = RTE_CRYPTO_CIPHER_NULL,
+				.block_size = 1,
+				.key_size = {
+					.min = 0,
+					.max = 0,
+					.increment = 0
+				},
+				.iv_size = {
+					.min = 0,
+					.max = 0,
+					.increment = 0
+				}
+			}, },
+		}, }
+	},
 
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
-- 
2.7.4

  parent reply	other threads:[~2018-09-21 14:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 13:54 [dpdk-dev] [PATCH 0/6] crypto/mvsam: add new features and fixes Tomasz Duszynski
2018-08-24 13:54 ` [dpdk-dev] [PATCH 1/6] crypto/mvsam: fix shared library build Tomasz Duszynski
2018-09-17 14:00   ` Akhil Goyal
2018-08-24 13:54 ` [dpdk-dev] [PATCH 2/6] crypto/mvsam: update hash digest sizes Tomasz Duszynski
2018-09-17 13:54   ` Akhil Goyal
2018-08-24 13:54 ` [dpdk-dev] [PATCH 3/6] crypto/mvsam: add support for HMAC SHA224 Tomasz Duszynski
2018-09-17 13:57   ` Akhil Goyal
2018-09-21 14:49     ` Andrzej Ostruszka
2018-08-24 13:54 ` [dpdk-dev] [PATCH 4/6] crypto/mvsam: add support for AES ECB Tomasz Duszynski
2018-09-17 13:59   ` Akhil Goyal
2018-09-21 14:46     ` Andrzej Ostruszka
2018-08-24 13:54 ` [dpdk-dev] [PATCH 5/6] crypto/mvsam: add support for crypto/auth NULL algorithms Tomasz Duszynski
2018-08-24 13:54 ` [dpdk-dev] [PATCH 6/6] crypto/mvsam: add 3DES ECB to the capabilities list Tomasz Duszynski
2018-09-21 14:53 ` [dpdk-dev] [PATCH v2 0/6] crypto/mvsam: add new features and fixes Andrzej Ostruszka
2018-09-21 14:53   ` [dpdk-dev] [PATCH v2 1/6] crypto/mvsam: fix shared library build Andrzej Ostruszka
2018-09-21 14:53   ` [dpdk-dev] [PATCH v2 2/6] crypto/mvsam: update hash digest sizes Andrzej Ostruszka
2018-09-21 14:53   ` [dpdk-dev] [PATCH v2 3/6] crypto/mvsam: support for HMAC SHA224 Andrzej Ostruszka
2018-09-21 14:53   ` [dpdk-dev] [PATCH v2 4/6] crypto/mvsam: support for AES ECB Andrzej Ostruszka
2018-09-21 14:53   ` Andrzej Ostruszka [this message]
2018-09-21 14:53   ` [dpdk-dev] [PATCH v2 6/6] crypto/mvsam: add 3DES ECB to the capabilities list Andrzej Ostruszka
2018-09-25 15:24   ` [dpdk-dev] [PATCH v2 0/6] crypto/mvsam: add new features and fixes Akhil Goyal
2018-09-26 10:03     ` Andrzej Ostruszka
2018-09-26 10:51       ` Akhil Goyal
2018-10-01 13:28   ` 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=1537541639-22764-6-git-send-email-amo@semihalf.com \
    --to=amo@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=mw@semihalf.com \
    --cc=nadavh@marvell.com \
    --cc=tdu@semihalf.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).