crypto/ipsec_mb: support multi-process
[dpdk.git] / drivers / crypto / aesni_mb / rte_aesni_mb_pmd_ops.c
index 46b8517..48a8f91 100644 (file)
@@ -8,7 +8,7 @@
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_ether.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_mb_pmd_private.h"
 
@@ -400,8 +400,13 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
                                .block_size = 16,
                                .key_size = {
                                        .min = 16,
+#if IMB_VERSION(0, 54, 2) <= IMB_VERSION_NUM
+                                       .max = 32,
+                                       .increment = 16
+#else
                                        .max = 16,
                                        .increment = 0
+#endif
                                },
                                .digest_size = {
                                        .min = 4,
@@ -647,6 +652,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()
 };