Add support for 192 bit keys for AES CCM algorithm.

Signed-off-by: Declan Doherty <declan.dohe...@intel.com>
Signed-off-by: Radu Nicolau <radu.nico...@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     | 6 ++++++
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c 
b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index b8ab84e215..6419aed123 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -689,6 +689,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
                                        sess->cipher.expanded_aes_keys.encode,
                                        sess->cipher.expanded_aes_keys.decode);
                        break;
+               case AES_192_BYTES:
+                       sess->cipher.key_length_in_bytes = AES_192_BYTES;
+                       IMB_AES_KEYEXP_192(mb_mgr, xform->aead.key.data,
+                                       sess->cipher.expanded_aes_keys.encode,
+                                       sess->cipher.expanded_aes_keys.decode);
+                       break;
                case AES_256_BYTES:
                        sess->cipher.key_length_in_bytes = AES_256_BYTES;
                        IMB_AES_KEYEXP_256(mb_mgr, xform->aead.key.data,
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 ebf75198ae..5b89be04fb 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -402,7 +402,7 @@ static const struct rte_cryptodev_capabilities 
aesni_mb_pmd_capabilities[] = {
                                        .min = 16,
 #if IMB_VERSION(0, 54, 2) <= IMB_VERSION_NUM
                                        .max = 32,
-                                       .increment = 16
+                                       .increment = 8
 #else
                                        .max = 16,
                                        .increment = 0
-- 
2.25.1

Reply via email to