[dpdk-dev] [PATCH] app/test: Remove hard coding for nb_queue_pairs in test_cryptodev
akhil.goyal at nxp.com
akhil.goyal at nxp.com
Mon Sep 26 18:32:59 CEST 2016
From: Akhil Goyal <akhil.goyal at nxp.com>
nb_queue_pairs should not be hard coded with device specific number.
It should be retrieved from the device infos.
Also in ut_setup, ts_params->conf.nb_queue_pairs is already set in
testsuite_setup and we are not modifying it.
Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
---
app/test/test_cryptodev.c | 1 -
app/test/test_cryptodev_perf.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 647787d..12b6b04 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -338,7 +338,6 @@ ut_setup(void)
memset(ut_params, 0, sizeof(*ut_params));
/* Reconfigure device to default parameters */
- ts_params->conf.nb_queue_pairs = DEFAULT_NUM_QPS_PER_QAT_DEVICE;
ts_params->conf.socket_id = SOCKET_ID_ANY;
ts_params->conf.session_mp.nb_objs =
(gbl_cryptodev_type == RTE_CRYPTODEV_QAT_SYM_PMD) ?
diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index 2398d84..0ea7ec1 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -301,7 +301,7 @@ testsuite_setup(void)
rte_cryptodev_info_get(ts_params->dev_id, &info);
- ts_params->conf.nb_queue_pairs = DEFAULT_NUM_QPS_PER_QAT_DEVICE;
+ ts_params->conf.nb_queue_pairs = info.max_nb_queue_pairs;
ts_params->conf.socket_id = SOCKET_ID_ANY;
ts_params->conf.session_mp.nb_objs = info.sym.max_nb_sessions;
--
1.9.1
More information about the dev
mailing list