crypto/cnxk: fix update of number of descriptors
[dpdk.git] / drivers / crypto / cnxk / cnxk_cryptodev_capabilities.c
index a0b2a1f..04402a4 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "cnxk_cryptodev.h"
 #include "cnxk_cryptodev_capabilities.h"
+#include "cnxk_security_ar.h"
 
 #define CPT_CAPS_ADD(cnxk_caps, cur_pos, hw_caps, name)                        \
        do {                                                                   \
@@ -568,6 +569,26 @@ static const struct rte_cryptodev_capabilities caps_aes[] = {
                        }, }
                }, }
        },
+       {       /* AES CMAC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       {.auth = {
+                               .algo = RTE_CRYPTO_AUTH_AES_CMAC,
+                               .block_size = 16,
+                               .key_size = {
+                                       .min = 16,
+                                       .max = 32,
+                                       .increment = 8
+                               },
+                               .digest_size = {
+                                       .min = 4,
+                                       .max = 4,
+                                       .increment = 0
+                               },
+                       }, }
+               }, }
+       },
 };
 
 static const struct rte_cryptodev_capabilities caps_kasumi[] = {
@@ -1121,6 +1142,8 @@ static void
 cnxk_sec_caps_update(struct rte_security_capability *sec_cap)
 {
        sec_cap->ipsec.options.udp_encap = 1;
+       sec_cap->ipsec.options.copy_df = 1;
+       sec_cap->ipsec.options.copy_dscp = 1;
 }
 
 static void
@@ -1139,14 +1162,19 @@ cn10k_sec_caps_update(struct rte_security_capability *sec_cap)
        sec_cap->ipsec.options.ip_csum_enable = 1;
        sec_cap->ipsec.options.l4_csum_enable = 1;
        sec_cap->ipsec.options.stats = 1;
+       sec_cap->ipsec.options.esn = 1;
+       sec_cap->ipsec.replay_win_sz_max = ROC_AR_WIN_SIZE_MAX;
 }
 
 static void
 cn9k_sec_caps_update(struct rte_security_capability *sec_cap)
 {
        if (sec_cap->ipsec.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {
+#ifdef LA_IPSEC_DEBUG
                sec_cap->ipsec.options.iv_gen_disable = 1;
+#endif
        }
+       sec_cap->ipsec.replay_win_sz_max = CNXK_ON_AR_WIN_SIZE_MAX;
 }
 
 void