DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] crypto/aesni_mb: add NULL/NULL support
@ 2021-09-07  9:07 Radu Nicolau
  2021-09-07  9:07 ` [dpdk-dev] [PATCH 2/3] crypto/aesni_mb: add AES CCM 192-bit key support Radu Nicolau
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Radu Nicolau @ 2021-09-07  9:07 UTC (permalink / raw)
  To: Declan Doherty, Pablo de Lara; +Cc: dev, Radu Nicolau

Add support for NULL/NULL xform.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  3 ++
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    | 38 +++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a01c826a3c..b8ab84e215 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -462,6 +462,9 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr,
 
 	/* Select cipher mode */
 	switch (xform->cipher.algo) {
+	case RTE_CRYPTO_CIPHER_NULL:
+		sess->cipher.mode = NULL_CIPHER;
+		return 0;
 	case RTE_CRYPTO_CIPHER_AES_CBC:
 		sess->cipher.mode = CBC;
 		is_aes = 1;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index fc7fdfec8e..ebf75198ae 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -502,6 +502,44 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_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 = { 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 = { 0 }
+			}, },
+		}, }
+	},
+
 #if IMB_VERSION(0, 53, 0) <= IMB_VERSION_NUM
 	{	/* AES ECB */
 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-02-22 19:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07  9:07 [dpdk-dev] [PATCH 1/3] crypto/aesni_mb: add NULL/NULL support Radu Nicolau
2021-09-07  9:07 ` [dpdk-dev] [PATCH 2/3] crypto/aesni_mb: add AES CCM 192-bit key support Radu Nicolau
2021-09-07  9:07 ` [dpdk-dev] [PATCH 3/3] crypto/aesni_gcm: add AES CCM support Radu Nicolau
2021-10-08 12:21 ` [dpdk-dev] [EXT] [PATCH 1/3] crypto/aesni_mb: add NULL/NULL support Akhil Goyal
2021-10-08 12:49   ` Zhang, Roy Fan
2021-10-08 18:18     ` Akhil Goyal
2021-10-11  8:47       ` Nicolau, Radu
2022-02-21 13:39 ` [PATCH v2] crypto/ipsec_mb: add NULL/NULL support to aesni-mb Fan Zhang
2022-02-22 19:07   ` [EXT] " Akhil Goyal

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).