X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest-crypto-perf%2Fcperf_test_verify.c;h=5c0dc82290708f6e169fcd6e5705a81adf6c6ea3;hb=23a95dfe968cfd0e479edb4e41da486dd011ac14;hp=496eb0de00f06318e0db7fd5b1d11356882cacf6;hpb=45f838d60abc6d0e6b975e2384fd69020f512ed2;p=dpdk.git diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c index 496eb0de00..5c0dc82290 100644 --- a/app/test-crypto-perf/cperf_test_verify.c +++ b/app/test-crypto-perf/cperf_test_verify.c @@ -42,8 +42,7 @@ cperf_verify_test_free(struct cperf_verify_ctx *ctx) rte_cryptodev_sym_session_free(ctx->sess); } - if (ctx->pool) - rte_mempool_free(ctx->pool); + rte_mempool_free(ctx->pool); rte_free(ctx); } @@ -196,42 +195,6 @@ out: return !!res; } -static void -cperf_mbuf_set(struct rte_mbuf *mbuf, - const struct cperf_options *options, - const struct cperf_test_vector *test_vector) -{ - uint32_t segment_sz = options->segment_sz; - uint8_t *mbuf_data; - uint8_t *test_data; - uint32_t remaining_bytes = options->max_buffer_size; - - if (options->op_type == CPERF_AEAD) { - test_data = (options->aead_op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ? - test_vector->plaintext.data : - test_vector->ciphertext.data; - } else { - test_data = - (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ? - test_vector->plaintext.data : - test_vector->ciphertext.data; - } - - while (remaining_bytes) { - mbuf_data = rte_pktmbuf_mtod(mbuf, uint8_t *); - - if (remaining_bytes <= segment_sz) { - memcpy(mbuf_data, test_data, remaining_bytes); - return; - } - - memcpy(mbuf_data, test_data, segment_sz); - remaining_bytes -= segment_sz; - test_data += segment_sz; - mbuf = mbuf->next; - } -} - int cperf_verify_test_runner(void *test_ctx) {