X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-crypto-perf%2Fcperf_test_vectors.c;h=dafcfc0c6c158be24af06dcd48eb1b4e3e310053;hb=c7ebd65c137215d714b445b7b4c584007cc89ffb;hp=7da1a8fa2ecdad9f955ffb574edd9b9c128d2e85;hpb=49c19c94dc67a3db2f8534a1e6ca253e1f08fff7;p=dpdk.git diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c index 7da1a8fa2e..dafcfc0c6c 100644 --- a/app/test-crypto-perf/cperf_test_vectors.c +++ b/app/test-crypto-perf/cperf_test_vectors.c @@ -34,6 +34,8 @@ uint8_t perf_mod_p[129] = { 0x55 }; +uint8_t perf_mod_result[sizeof(perf_mod_p)]; + uint8_t perf_mod_e[3] = {0x01, 0x00, 0x01}; uint8_t plaintext[2048] = { @@ -428,6 +430,18 @@ uint8_t aead_key[] = { /* 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) { @@ -448,7 +462,8 @@ 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; @@ -459,6 +474,9 @@ cperf_test_vector_get_dummy(struct cperf_options *options) 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; @@ -579,7 +597,8 @@ cperf_test_vector_get_dummy(struct cperf_options *options) 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;