X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=app%2Ftest-crypto-perf%2Fcperf_test_common.c;h=423782cb485e839c19348d71495636aface9991f;hb=1bd9b61222f3a81ffe770fc00b70ded6e760c42b;hp=21cb1c221a67eba9b9fb24c893b93ec05c4ac471;hpb=bb4e158029645f37809fcf81a3acddd6fa11f88a;p=deb_dpdk.git diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c index 21cb1c22..423782cb 100644 --- a/app/test-crypto-perf/cperf_test_common.c +++ b/app/test-crypto-perf/cperf_test_common.c @@ -3,6 +3,7 @@ */ #include +#include #include "cperf_test_common.h" @@ -91,7 +92,7 @@ mempool_obj_init(struct rte_mempool *mp, op->type = RTE_CRYPTO_OP_TYPE_SYMMETRIC; op->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED; op->sess_type = RTE_CRYPTO_OP_WITH_SESSION; - op->phys_addr = rte_mem_virt2phy(obj); + op->phys_addr = rte_mem_virt2iova(obj); op->mempool = mp; /* Set source buffer */ @@ -124,6 +125,7 @@ cperf_alloc_common_memory(const struct cperf_options *options, uint32_t *dst_buf_offset, struct rte_mempool **pool) { + const char *mp_ops_name; char pool_name[32] = ""; int ret; @@ -193,8 +195,10 @@ cperf_alloc_common_memory(const struct cperf_options *options, return -1; } + mp_ops_name = rte_mbuf_best_mempool_ops(); + ret = rte_mempool_set_ops_byname(*pool, - RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL); + mp_ops_name, NULL); if (ret != 0) { RTE_LOG(ERR, USER1, "Error setting mempool handler for device %u\n",