X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_cryptodev_security_ipsec.h;h=69e81ae5c49cf6405936ac7e4d832595d51a0480;hb=9fb87fbfe9af962199a955678610ad92fcf43c9c;hp=91c6cd47ffe87fda85ff9222edf22624bdbc4da0;hpb=67d2a1880b5d46bbcaee6d4b10d4823bdbf10b7b;p=dpdk.git diff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h index 91c6cd47ff..69e81ae5c4 100644 --- a/app/test/test_cryptodev_security_ipsec.h +++ b/app/test/test_cryptodev_security_ipsec.h @@ -14,6 +14,9 @@ struct ipsec_test_data { struct { uint8_t data[32]; } key; + struct { + uint8_t data[32]; + } auth_key; struct { uint8_t data[1024]; @@ -58,6 +61,8 @@ struct ipsec_test_flags { bool udp_ports_verify; bool ip_csum; bool l4_csum; + bool ipv6; + bool tunnel_ipv6; }; struct crypto_param { @@ -68,6 +73,7 @@ struct crypto_param { enum rte_crypto_aead_algorithm aead; } alg; uint16_t key_length; + uint16_t digest_length; }; static const struct crypto_param aead_list[] = { @@ -88,6 +94,43 @@ 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_AES_CBC, + .key_length = 16, + }, +}; + +static const struct crypto_param auth_list[] = { + { + .type = RTE_CRYPTO_SYM_XFORM_AUTH, + .alg.auth = RTE_CRYPTO_AUTH_NULL, + }, + { + .type = RTE_CRYPTO_SYM_XFORM_AUTH, + .alg.auth = RTE_CRYPTO_AUTH_SHA256_HMAC, + .key_length = 32, + .digest_length = 16, + }, +}; + +struct crypto_param_comb { + const struct crypto_param *param1; + const struct crypto_param *param2; +}; + +extern struct ipsec_test_data pkt_aes_256_gcm; +extern struct ipsec_test_data pkt_aes_256_gcm_v6; +extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256; +extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256_v6; + +extern struct crypto_param_comb alg_list[RTE_DIM(aead_list) + + (RTE_DIM(cipher_list) * + RTE_DIM(auth_list))]; + +void test_ipsec_alg_list_populate(void); + int test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform, const struct rte_security_capability *sec_cap, bool silent);