0x55
};
+uint8_t perf_mod_result[sizeof(perf_mod_p)];
+
uint8_t perf_mod_e[3] = {0x01, 0x00, 0x01};
uint8_t plaintext[2048] = {
/* Digests */
uint8_t digest[2048] = { 0x00 };
+uint8_t ipsec_plaintext[2048] = {
+ /* IP */
+ 0x45, 0x00, 0x00, 0x28, 0xa4, 0xad, 0x40, 0x00,
+ 0x40, 0x06, 0x78, 0x80, 0x0a, 0x01, 0x03, 0x8f,
+ 0x0a, 0x01, 0x06, 0x12,
+
+ /* TCP */
+ 0x80, 0x23, 0x06, 0xb8, 0xcb, 0x71, 0x26, 0x02,
+ 0xdd, 0x6b, 0xb0, 0x3e, 0x50, 0x10, 0x16, 0xd0,
+ 0x75, 0x67, 0x00, 0x01
+};
+
struct cperf_test_vector*
cperf_test_vector_get_dummy(struct cperf_options *options)
{
t_vec->modex.elen = sizeof(perf_mod_e);
}
- if (options->op_type == CPERF_PDCP) {
+ if (options->op_type == CPERF_PDCP ||
+ options->op_type == CPERF_IPSEC) {
if (options->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
t_vec->cipher_key.length = 0;
t_vec->ciphertext.data = plaintext;
t_vec->cipher_key.data = cipher_key;
}
+ if (options->op_type == CPERF_IPSEC)
+ t_vec->plaintext.data = ipsec_plaintext;
+
/* Init IV data ptr */
t_vec->cipher_iv.data = NULL;
t_vec->auth_iv.length = options->auth_iv_sz;
}
- if (options->op_type == CPERF_AEAD) {
+ if (options->op_type == CPERF_AEAD ||
+ options->op_type == CPERF_IPSEC) {
t_vec->aead_key.length = options->aead_key_sz;
t_vec->aead_key.data = aead_key;
rte_free(t_vec);
return NULL;
}
+
+ if (options->aead_aad_sz > sizeof(aad))
+ options->aead_aad_sz = sizeof(aad);
+
memcpy(t_vec->aad.data, aad, options->aead_aad_sz);
t_vec->aad.phys_addr = rte_malloc_virt2iova(t_vec->aad.data);
t_vec->aad.length = options->aead_aad_sz;