test/crypto: add AES-XCBC known vectors
[dpdk.git] / app / test / test_cryptodev_security_ipsec.h
index 07d2453..6e27eba 100644 (file)
@@ -65,6 +65,7 @@ struct ipsec_test_flags {
        bool tunnel_ipv6;
        bool transport;
        bool fragment;
+       bool stats_success;
 };
 
 struct crypto_param {
@@ -75,6 +76,7 @@ struct crypto_param {
                enum rte_crypto_aead_algorithm aead;
        } alg;
        uint16_t key_length;
+       uint16_t iv_length;
        uint16_t digest_length;
 };
 
@@ -97,10 +99,35 @@ static const struct crypto_param aead_list[] = {
 };
 
 static const struct crypto_param cipher_list[] = {
+       {
+               .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+               .alg.cipher =  RTE_CRYPTO_CIPHER_NULL,
+               .key_length = 0,
+               .iv_length = 0,
+       },
        {
                .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
                .alg.cipher =  RTE_CRYPTO_CIPHER_AES_CBC,
                .key_length = 16,
+               .iv_length = 16,
+       },
+       {
+               .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+               .alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,
+               .key_length = 16,
+               .iv_length = 16,
+       },
+       {
+               .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+               .alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,
+               .key_length = 24,
+               .iv_length = 16,
+       },
+       {
+               .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+               .alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,
+               .key_length = 32,
+               .iv_length = 16,
        },
 };
 
@@ -127,6 +154,12 @@ static const struct crypto_param auth_list[] = {
                .key_length = 64,
                .digest_length = 32,
        },
+       {
+               .type = RTE_CRYPTO_SYM_XFORM_AUTH,
+               .alg.auth =  RTE_CRYPTO_AUTH_AES_XCBC_MAC,
+               .key_length = 16,
+               .digest_length = 12,
+       },
 };
 
 struct crypto_param_comb {
@@ -188,4 +221,9 @@ int test_ipsec_status_check(struct rte_crypto_op *op,
                            enum rte_security_ipsec_sa_direction dir,
                            int pkt_num);
 
+int test_ipsec_stats_verify(struct rte_security_ctx *ctx,
+                           struct rte_security_session *sess,
+                           const struct ipsec_test_flags *flags,
+                           enum rte_security_ipsec_sa_direction dir);
+
 #endif