From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com,
dpdk-up@NXP1.onmicrosoft.com
Subject: [dpdk-dev] [PATCH v3 3/8] app/crypto-perf: enable it for non default mempool
Date: Mon, 2 Apr 2018 21:03:16 +0530 [thread overview]
Message-ID: <1522683201-23963-4-git-send-email-hemant.agrawal@nxp.com> (raw)
In-Reply-To: <1522683201-23963-1-git-send-email-hemant.agrawal@nxp.com>
The current code usages the default mempool ops while
creating the mempool for crypto usages. Adding the support
for best_mempool_ops to enable it for devices using
non default mempools.
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/Makefile | 1 +
app/test-crypto-perf/cperf_test_common.c | 6 +++++-
app/test-crypto-perf/meson.build | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/Makefile b/app/test-crypto-perf/Makefile
index 3935aec..28a0cd0 100644
--- a/app/test-crypto-perf/Makefile
+++ b/app/test-crypto-perf/Makefile
@@ -7,6 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
APP = dpdk-test-crypto-perf
CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
# all source are stored in SRCS-y
SRCS-y := main.c
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 21cb1c2..fa1dc49 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -3,6 +3,7 @@
*/
#include <rte_malloc.h>
+#include <rte_mbuf_pool_ops.h>
#include "cperf_test_common.h"
@@ -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",
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 6eb22a5..eacd7a0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
+allow_experimental_apis = true
sources = files('cperf_ops.c',
'cperf_options_parsing.c',
'cperf_test_common.c',
--
2.7.4
next prev parent reply other threads:[~2018-04-02 15:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 12:00 [dpdk-dev] [PATCH 1/7] test/crypto: add macro for dpaa sec device name Hemant Agrawal
2018-03-27 12:00 ` [dpdk-dev] [PATCH 2/7] app/crypto-perf: fix excess crypto device error Hemant Agrawal
2018-03-30 16:01 ` De Lara Guarch, Pablo
2018-03-27 12:00 ` [dpdk-dev] [PATCH 3/7] app/crypto-perf: enable it for non default mempool Hemant Agrawal
2018-03-30 16:02 ` De Lara Guarch, Pablo
2018-03-30 16:11 ` De Lara Guarch, Pablo
2018-03-27 12:00 ` [dpdk-dev] [PATCH 4/7] crypto/dpaa_sec: add macro for device name Hemant Agrawal
2018-03-27 12:00 ` [dpdk-dev] [PATCH 5/7] crypto/dpaa_sec: fix to check the portal presence Hemant Agrawal
2018-03-27 12:00 ` [dpdk-dev] [PATCH 6/7] crypto/dpaa_sec: fix incorrect NULL check Hemant Agrawal
2018-03-27 12:00 ` [dpdk-dev] [PATCH 7/7] crypto/dpaa_sec: move mempool allocation to config Hemant Agrawal
2018-03-30 16:01 ` [dpdk-dev] [PATCH 1/7] test/crypto: add macro for dpaa sec device name De Lara Guarch, Pablo
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 1/8] " Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 2/8] app/crypto-perf: fix excess crypto device error Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 3/8] app/crypto-perf: enable it for non default mempool Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 4/8] crypto/dpaa_sec: add macro for device name Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 5/8] crypto/dpaa_sec: fix to check the portal presence Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 6/8] crypto/dpaa_sec: fix incorrect NULL check Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 7/8] crypto/dpaa_sec: move mempool allocation to config Hemant Agrawal
2018-04-02 7:36 ` [dpdk-dev] [PATCH v2 8/8] crypto/dpaa2_sec: fix OP storage for physical IOVA mode Hemant Agrawal
2018-04-02 13:35 ` De Lara Guarch, Pablo
2018-04-02 15:33 ` [dpdk-dev] [PATCH] sec Hemant Agrawal
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 1/8] test/crypto: add macro for dpaa sec device name Hemant Agrawal
2018-04-03 9:34 ` De Lara Guarch, Pablo
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 2/8] app/crypto-perf: fix excess crypto device error Hemant Agrawal
2018-04-02 15:33 ` Hemant Agrawal [this message]
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 4/8] crypto/dpaa_sec: add macro for device name Hemant Agrawal
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 5/8] crypto/dpaa_sec: fix to check the portal presence Hemant Agrawal
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 6/8] crypto/dpaa_sec: fix incorrect NULL check Hemant Agrawal
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 7/8] crypto/dpaa_sec: move mempool allocation to config Hemant Agrawal
2018-04-02 15:33 ` [dpdk-dev] [PATCH v3 8/8] crypto/dpaa2_sec: fix OP storage for physical IOVA mode Hemant Agrawal
2018-04-02 15:46 ` [dpdk-dev] [PATCH] sec Hemant Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522683201-23963-4-git-send-email-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=dpdk-up@NXP1.onmicrosoft.com \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).