Skip to contentSkip to conversation

crypto/aesni_mb: fix CCM digest size check

PATCH Superseded Pablo de Lara 2 participants 10 messages Oct 6, 2020 – Oct 12, 2020 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 crypto/aesni_mb: fix CCM digest size check

Digest size for CCM was being checked for other algorithms apart from CCM.

Fixes c4c0c312a823 ("crypto/aesni_mb: check for invalid digest size")
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 29 +++++++++++-----------
 1 file changed, 15 insertions(+), 14 deletions(-)
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +15 -14
index 1bddbcf74..784278719 100644
@@ -564,6 +564,14 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -EINVAL;
 	}
 
+	/* Set IV parameters */
+	sess->iv.offset = xform->aead.iv.offset;
+	sess->iv.length = xform->aead.iv.length;
+
+	/* Set digest sizes */
+	sess->auth.req_digest_len = xform->aead.digest_length;
+	sess->auth.gen_digest_len = sess->auth.req_digest_len;
+
 	switch (xform->aead.algo) {
 	case RTE_CRYPTO_AEAD_AES_CCM:
 		sess->cipher.mode = CCM;
@@ -582,6 +590,13 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* CCM digests must be between 4 and 16 and an even number */
+		if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
+				sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
+				(sess->auth.req_digest_len & 1) == 1) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	case RTE_CRYPTO_AEAD_AES_GCM:
@@ -616,20 +631,6 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -ENOTSUP;
 	}
 
-	/* Set IV parameters */
-	sess->iv.offset = xform->aead.iv.offset;
-	sess->iv.length = xform->aead.iv.length;
-
-	sess->auth.req_digest_len = xform->aead.digest_length;
-	/* CCM digests must be between 4 and 16 and an even number */
-	if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
-			sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
-			(sess->auth.req_digest_len & 1) == 1) {
-		AESNI_MB_LOG(ERR, "Invalid digest size\n");
-		return -EINVAL;
-	}
-	sess->auth.gen_digest_len = sess->auth.req_digest_len;
-
 	return 0;
 }
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 crypto/aesni_mb: fix GCM digest size check

GCM digest sizes should be between 1 and 16 bytes.

Fixes 7b2d4706c90e ("crypto/aesni_mb: support newer library version only")
---
 .../crypto/aesni_mb/aesni_mb_pmd_private.h    |  4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    | 22 +++++++++----------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  8 +++----
 3 files changed, 16 insertions(+), 18 deletions(-)
drivers/crypto/aesni_mb/aesni_mb_pmd_private.h +2 -2
index e0c7b4f7c..8c5acfc51 100644
@@ -80,7 +80,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
 		[AES_CMAC]	= 12,
 		[AES_CCM]	= 8,
 		[NULL_HASH]	= 0,
-		[AES_GMAC]	= 16,
+		[AES_GMAC]	= 12,
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
 		[PLAIN_SHA_256]	= 32,
@@ -111,7 +111,7 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_XCBC]	= 16,
 		[AES_CMAC]	= 16,
 		[AES_CCM]	= 16,
-		[AES_GMAC]	= 12,
+		[AES_GMAC]	= 16,
 		[NULL_HASH]	= 0,
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +10 -12
index 784278719..fa364530e 100644
@@ -209,19 +209,11 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,
 			sess->cipher.direction = DECRYPT;
 
 		sess->auth.algo = AES_GMAC;
-		/*
-		 * Multi-buffer lib supports 8, 12 and 16 bytes of digest.
-		 * If size requested is different, generate the full digest
-		 * (16 bytes) in a temporary location and then memcpy
-		 * the requested number of bytes.
-		 */
-		if (sess->auth.req_digest_len != 16 &&
-				sess->auth.req_digest_len != 12 &&
-				sess->auth.req_digest_len != 8) {
-			sess->auth.gen_digest_len = 16;
-		} else {
-			sess->auth.gen_digest_len = sess->auth.req_digest_len;
+		if (sess->auth.req_digest_len > get_digest_byte_length(AES_GMAC)) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
 		}
+		sess->auth.gen_digest_len = sess->auth.req_digest_len;
 		sess->iv.length = xform->auth.iv.length;
 		sess->iv.offset = xform->auth.iv.offset;
 
@@ -624,6 +616,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* GCM digest size must be between 1 and 16 */
+		if (sess->auth.req_digest_len == 0 ||
+				sess->auth.req_digest_len > 16) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	default:
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +4 -4
index 2362f0c3c..3e4282954 100644
@@ -455,9 +455,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.aad_size = {
 					.min = 0,
@@ -485,9 +485,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.iv_size = {
 					.min = 12,
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 crypto/aesni_mb: support Chacha20-Poly1305

In reply to Pablo de Lara

Add support for Chacha20-Poly1305 AEAD algorithm.

---
 doc/guides/cryptodevs/aesni_mb.rst            |  1 +
 doc/guides/cryptodevs/features/aesni_mb.ini   | 10 +--
 doc/guides/rel_notes/release_20_11.rst        |  3 +
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    | 63 ++++++++++++++++---
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    | 32 ++++++++++
 5 files changed, 97 insertions(+), 12 deletions(-)
doc/guides/cryptodevs/aesni_mb.rst +1 -0
index 15388d20a..cf7ad5d57 100644
@@ -54,6 +54,7 @@ AEAD algorithms:
 
 * RTE_CRYPTO_AEAD_AES_CCM
 * RTE_CRYPTO_AEAD_AES_GCM
+* RTE_CRYPTO_AEAD_CHACHA20_POLY1305
 
 Protocol offloads:
 
doc/guides/cryptodevs/features/aesni_mb.ini +5 -5
index 38d255aff..2e8305709 100644
@@ -54,11 +54,11 @@ AES GMAC     = Y
 ; Supported AEAD algorithms of the 'aesni_mb' crypto driver.
 ;
 [AEAD]
-AES CCM (128) = Y
-AES GCM (128) = Y
-AES GCM (192) = Y
-AES GCM (256) = Y
-
+AES CCM (128)     = Y
+AES GCM (128)     = Y
+AES GCM (192)     = Y
+AES GCM (256)     = Y
+CHACHA20-POLY1305 = Y
 ;
 ; Supported Asymmetric algorithms of the 'aesni_mb' crypto driver.
 ;
doc/guides/rel_notes/release_20_11.rst +3 -0
index 6d8c24413..f606c9a74 100644
@@ -210,6 +210,9 @@ API Changes
 
 * bpf: ``RTE_BPF_XTYPE_NUM`` has been dropped from ``rte_bpf_xtype``.
 
+* **Updated the AESNI MB crypto PMD.**
+
+  * Added support for Chacha20-Poly1305.
 
 ABI Changes
 -----------
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +56 -7

111 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +32 -0
index 3e4282954..3089b0ca4 100644
@@ -497,6 +497,38 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 			}, }
 		}, }
 	},
+#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
+	{	/* CHACHA20-POLY1305 */					\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,	\
+			{.aead = {					\
+				.algo = RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 32,			\
+					.max = 32,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 16,			\
+					.max = 16,			\
+					.increment = 0			\
+				},					\
+				.aad_size = {				\
+					.min = 0,			\
+					.max = 240,			\
+					.increment = 1			\
+				},					\
+				.iv_size = {				\
+					.min = 12,			\
+					.max = 12,			\
+					.increment = 0			\
+				},					\
+			}, }						\
+		}, }							\
+	},
+#endif
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 1/3 crypto/aesni_mb: fix CCM digest size check

In reply to Pablo de Lara

Digest size for CCM was being checked for other algorithms apart from CCM.

Fixes c4c0c312a823 ("crypto/aesni_mb: check for invalid digest size")

---

Changes:

This patchset depends on series http://patches.dpdk.org/project/dpdk/list/?series=12820.

-v2 : rebased on top of crypto subtree

---

 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 29 +++++++++++-----------
 1 file changed, 15 insertions(+), 14 deletions(-)
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +15 -14
index 34a39ca99..ba2882d27 100644
@@ -661,6 +661,14 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -EINVAL;
 	}
 
+	/* Set IV parameters */
+	sess->iv.offset = xform->aead.iv.offset;
+	sess->iv.length = xform->aead.iv.length;
+
+	/* Set digest sizes */
+	sess->auth.req_digest_len = xform->aead.digest_length;
+	sess->auth.gen_digest_len = sess->auth.req_digest_len;
+
 	switch (xform->aead.algo) {
 	case RTE_CRYPTO_AEAD_AES_CCM:
 		sess->cipher.mode = CCM;
@@ -679,6 +687,13 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* CCM digests must be between 4 and 16 and an even number */
+		if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
+				sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
+				(sess->auth.req_digest_len & 1) == 1) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	case RTE_CRYPTO_AEAD_AES_GCM:
@@ -713,20 +728,6 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -ENOTSUP;
 	}
 
-	/* Set IV parameters */
-	sess->iv.offset = xform->aead.iv.offset;
-	sess->iv.length = xform->aead.iv.length;
-
-	sess->auth.req_digest_len = xform->aead.digest_length;
-	/* CCM digests must be between 4 and 16 and an even number */
-	if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
-			sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
-			(sess->auth.req_digest_len & 1) == 1) {
-		AESNI_MB_LOG(ERR, "Invalid digest size\n");
-		return -EINVAL;
-	}
-	sess->auth.gen_digest_len = sess->auth.req_digest_len;
-
 	return 0;
 }
 
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 2/3 crypto/aesni_mb: fix GCM digest size check

GCM digest sizes should be between 1 and 16 bytes.

Fixes 7b2d4706c90e ("crypto/aesni_mb: support newer library version only")

---

Changes:

This patchset depends on series http://patches.dpdk.org/project/dpdk/list/?series=12820.

-v2 : rebased on top of crypto subtree

---

 .../crypto/aesni_mb/aesni_mb_pmd_private.h    |  4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    | 22 +++++++++----------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  8 +++----
 3 files changed, 16 insertions(+), 18 deletions(-)
drivers/crypto/aesni_mb/aesni_mb_pmd_private.h +2 -2
index 9693bf985..7481e1d5e 100644
@@ -85,7 +85,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
 		[AES_CMAC]			= 12,
 		[AES_CCM]			= 8,
 		[NULL_HASH]			= 0,
-		[AES_GMAC]			= 16,
+		[AES_GMAC]			= 12,
 		[PLAIN_SHA1]			= 20,
 		[PLAIN_SHA_224]			= 28,
 		[PLAIN_SHA_256]			= 32,
@@ -121,7 +121,7 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_XCBC]			= 16,
 		[AES_CMAC]			= 16,
 		[AES_CCM]			= 16,
-		[AES_GMAC]			= 12,
+		[AES_GMAC]			= 16,
 		[NULL_HASH]			= 0,
 		[PLAIN_SHA1]			= 20,
 		[PLAIN_SHA_224]			= 28,
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +10 -12
index ba2882d27..7dbe40e02 100644
@@ -213,19 +213,11 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,
 			sess->cipher.direction = DECRYPT;
 
 		sess->auth.algo = AES_GMAC;
-		/*
-		 * Multi-buffer lib supports 8, 12 and 16 bytes of digest.
-		 * If size requested is different, generate the full digest
-		 * (16 bytes) in a temporary location and then memcpy
-		 * the requested number of bytes.
-		 */
-		if (sess->auth.req_digest_len != 16 &&
-				sess->auth.req_digest_len != 12 &&
-				sess->auth.req_digest_len != 8) {
-			sess->auth.gen_digest_len = 16;
-		} else {
-			sess->auth.gen_digest_len = sess->auth.req_digest_len;
+		if (sess->auth.req_digest_len > get_digest_byte_length(AES_GMAC)) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
 		}
+		sess->auth.gen_digest_len = sess->auth.req_digest_len;
 		sess->iv.length = xform->auth.iv.length;
 		sess->iv.offset = xform->auth.iv.offset;
 
@@ -721,6 +713,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* GCM digest size must be between 1 and 16 */
+		if (sess->auth.req_digest_len == 0 ||
+				sess->auth.req_digest_len > 16) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	default:
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +4 -4
index 0f74be126..dc2238191 100644
@@ -455,9 +455,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.aad_size = {
 					.min = 0,
@@ -485,9 +485,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.iv_size = {
 					.min = 12,
Signature · 1 line
2.25.1
#5 lore raw

PATCH v2 3/3 crypto/aesni_mb: support Chacha20-Poly1305

In reply to Pablo de Lara

Add support for Chacha20-Poly1305 AEAD algorithm.

---

Changes:

This patchset depends on series http://patches.dpdk.org/project/dpdk/list/?series=12820.

-v2 : rebased on top of crypto subtree

---

 doc/guides/cryptodevs/aesni_mb.rst            |  1 +
 doc/guides/cryptodevs/features/aesni_mb.ini   | 10 +--
 doc/guides/rel_notes/release_20_11.rst        |  1 +
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    | 63 ++++++++++++++++---
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    | 32 ++++++++++
 5 files changed, 95 insertions(+), 12 deletions(-)
doc/guides/cryptodevs/aesni_mb.rst +1 -0
index abc10fbda..2ff264937 100644
@@ -63,6 +63,7 @@ AEAD algorithms:
 
 * RTE_CRYPTO_AEAD_AES_CCM
 * RTE_CRYPTO_AEAD_AES_GCM
+* RTE_CRYPTO_AEAD_CHACHA20_POLY1305
 
 Protocol offloads:
 
doc/guides/cryptodevs/features/aesni_mb.ini +5 -5
index 356139d46..f391c3f38 100644
@@ -63,11 +63,11 @@ KASUMI F9    = Y
 ; Supported AEAD algorithms of the 'aesni_mb' crypto driver.
 ;
 [AEAD]
-AES CCM (128) = Y
-AES GCM (128) = Y
-AES GCM (192) = Y
-AES GCM (256) = Y
-
+AES CCM (128)     = Y
+AES GCM (128)     = Y
+AES GCM (192)     = Y
+AES GCM (256)     = Y
+CHACHA20-POLY1305 = Y
 ;
 ; Supported Asymmetric algorithms of the 'aesni_mb' crypto driver.
 ;
doc/guides/rel_notes/release_20_11.rst +1 -0
index 55f60ecfd..0e0b741b3 100644
@@ -80,6 +80,7 @@ New Features
   * Added support for ZUC-EEA3/EIA3 algorithms.
   * Added support for SNOW3G-UEA2/UIA2 algorithms.
   * Added support for KASUMI-F8/F9 algorithms.
+  * Added support for Chacha20-Poly1305.
 
 * **Updated the aesni_gcm crypto PMD.**
 
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +56 -7

111 lines not on this page · raw message

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +32 -0
index dc2238191..e8cb57ea9 100644
@@ -647,6 +647,38 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 			}, }
 		}, }
 	},
+#endif
+#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
+	{	/* CHACHA20-POLY1305 */					\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,	\
+			{.aead = {					\
+				.algo = RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 32,			\
+					.max = 32,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 16,			\
+					.max = 16,			\
+					.increment = 0			\
+				},					\
+				.aad_size = {				\
+					.min = 0,			\
+					.max = 240,			\
+					.increment = 1			\
+				},					\
+				.iv_size = {				\
+					.min = 12,			\
+					.max = 12,			\
+					.increment = 0			\
+				},					\
+			}, }						\
+		}, }							\
+	},
 #endif
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
Signature · 1 line
2.25.1
#6 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] crypto/aesni_mb: support Chacha20-Poly1305

Quoted 28 lines
(quoted diff) +2 -0
+#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
+	{	/* CHACHA20-POLY1305 */
	\
(quoted diff) +1 -0
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
	\
(quoted diff) +2 -0
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
	\
(quoted diff) +2 -0
+			{.aead = {					\
+				.algo =

RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +17 -0
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 32,			\
+					.max = 32,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 16,			\
+					.max = 16,			\
+					.increment = 0			\
+				},					\
+				.aad_size = {				\
+					.min = 0,			\
+					.max = 240,			\
+					.increment = 1			\
+				},					\
+				.iv_size = {				\

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { · line 684

Quoted 10 lines
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +7 -0
+					.min = 12,			\
+					.max = 12,			\
+					.increment = 0			\
+				},					\
+			}, }						\
+		}, }							\
+	},
 #endif
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };

These line breaks are not needed. Rest of the caps are also not having it.

#7 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] crypto/aesni_mb: support Chacha20-Poly1305

Hi Akhil,

Quoted 41 lines

-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Friday, October 9, 2020 2:33 PM
To: De Lara Guarch, Pablo <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]
Subject: RE: [dpdk-dev] [PATCH v2 3/3] crypto/aesni_mb: support Chacha20- Poly1305

Quoted 32 lines
(quoted diff) +2 -0
+#if IMB_VERSION(0, 54, 3) <= IMB_VERSION_NUM
+	{	/* CHACHA20-POLY1305 */
	\
(quoted diff) +1 -0
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
	\
(quoted diff) +2 -0
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
	\
(quoted diff) +2 -0
+			{.aead = {					\
+				.algo =

RTE_CRYPTO_AEAD_CHACHA20_POLY1305, \

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +21 -0
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 32,			\
+					.max = 32,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 16,			\
+					.max = 16,			\
+					.increment = 0			\
+				},					\
+				.aad_size = {				\
+					.min = 0,			\
+					.max = 240,			\
+					.increment = 1			\
+				},					\
+				.iv_size = {				\
+					.min = 12,			\
+					.max = 12,			\
+					.increment = 0			\
+				},					\
Quoted 8 lines

drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { · line 684

Quoted 6 lines
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +3 -0
+			}, }						\
+		}, }							\
+	},
 #endif
 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };

These line breaks are not needed. Rest of the caps are also not having it.

You are right, sorry. I got this from QAT PMD and I forgot to remove these line breaks. Can you remove them when applying it?

Thanks!
Pablo

#8 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] crypto/aesni_mb: support Chacha20-Poly1305

Quoted 5 lines

You are right, sorry. I got this from QAT PMD and I forgot to remove these line breaks.
Can you remove them when applying it?

Ok will do that.

#9 lore raw

Re: [dpdk-dev] [PATCH v2 3/3] crypto/aesni_mb: support Chacha20-Poly1305

Quoted 6 lines
Quoted 5 lines

You are right, sorry. I got this from QAT PMD and I forgot to remove these line breaks.
Can you remove them when applying it?

Ok will do that.

Fixed and series applied to dpdk-next-crypto

Thanks.