} xform;
};
+enum df_flags {
+ TEST_IPSEC_COPY_DF_INNER_0 = 1,
+ TEST_IPSEC_COPY_DF_INNER_1,
+ TEST_IPSEC_SET_DF_0_INNER_1,
+ TEST_IPSEC_SET_DF_1_INNER_0,
+};
+
struct ipsec_test_flags {
bool display_alg;
bool sa_expiry_pkts_soft;
bool l4_csum;
bool ipv6;
bool tunnel_ipv6;
+ bool transport;
+ bool fragment;
+ bool stats_success;
+ enum df_flags df;
};
struct crypto_param {
enum rte_crypto_aead_algorithm aead;
} alg;
uint16_t key_length;
+ uint16_t iv_length;
uint16_t digest_length;
};
};
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,
},
};
.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 {
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);
+
+int test_ipsec_pkt_update(uint8_t *pkt, const struct ipsec_test_flags *flags);
+
#endif