net/mlx5: support represented port flow action
[dpdk.git] / drivers / net / cnxk / cn10k_ethdev_sec.c
index dae5ea7..82dc636 100644 (file)
@@ -41,6 +41,46 @@ static struct rte_cryptodev_capabilities cn10k_eth_sec_crypto_caps[] = {
                        }, }
                }, }
        },
+       {       /* AES CBC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+                       {.cipher = {
+                               .algo = RTE_CRYPTO_CIPHER_AES_CBC,
+                               .block_size = 16,
+                               .key_size = {
+                                       .min = 16,
+                                       .max = 32,
+                                       .increment = 8
+                               },
+                               .iv_size = {
+                                       .min = 16,
+                                       .max = 16,
+                                       .increment = 0
+                               }
+                       }, }
+               }, }
+       },
+       {       /* SHA1 HMAC */
+               .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+               {.sym = {
+                       .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       {.auth = {
+                               .algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
+                               .block_size = 64,
+                               .key_size = {
+                                       .min = 20,
+                                       .max = 64,
+                                       .increment = 1
+                               },
+                               .digest_size = {
+                                       .min = 12,
+                                       .max = 12,
+                                       .increment = 0
+                               },
+                       }, }
+               }, }
+       },
        RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
 };
 
@@ -341,6 +381,8 @@ cn10k_eth_sec_session_create(void *device,
                sess_priv.roundup_byte = rlens->roundup_byte;
                sess_priv.roundup_len = rlens->roundup_len;
                sess_priv.partial_len = rlens->partial_len;
+               sess_priv.mode = outb_sa->w2.s.ipsec_mode;
+               sess_priv.outer_ip_ver = outb_sa->w2.s.outer_ip_ver;
 
                /* Pointer from eth_sec -> outb_sa */
                eth_sec->sa = outb_sa;