summaryrefslogtreecommitdiff
path: root/test/test
diff options
context:
space:
mode:
authorFiona Trahe <fiona.trahe@intel.com>2018-09-22 14:33:36 +0100
committerAkhil Goyal <akhil.goyal@nxp.com>2018-09-27 13:41:05 +0200
commit738ad7b42b63fc5067419bf609296f2c4a6a0cb0 (patch)
tree797d8efb46a8b7cf296b472ae1bf0ed3956933ca /test/test
parent78c5ea91329ee9e16825c92ba94c2bcfd764e080 (diff)
downloaddpdk-738ad7b42b63fc5067419bf609296f2c4a6a0cb0.zip
dpdk-738ad7b42b63fc5067419bf609296f2c4a6a0cb0.tar.gz
dpdk-738ad7b42b63fc5067419bf609296f2c4a6a0cb0.tar.xz
test/crypto: fix number of queue pairs
Some of the tests use a QAT-specific value (2) for maximum nr of queue pairs to create valid/invalid test cases. This has accidentally worked ok as default max_qps for all PMDs is larger. It is incorrect however and would fail if a device had a max lower than the QAT value. Instead use the value returned by the PMD in the rte_cryptodev_get_info query, this value is stored in the ts_params. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Diffstat (limited to 'test/test')
-rw-r--r--test/test/test_cryptodev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index a6044b2..c63662d 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -635,7 +635,7 @@ test_device_configure_invalid_queue_pair_ids(void)
/* valid - max value queue pairs */
- ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE;
+ ts_params->conf.nb_queue_pairs = orig_nb_qps;
TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
&ts_params->conf),
@@ -667,7 +667,7 @@ test_device_configure_invalid_queue_pair_ids(void)
/* invalid - max value + 1 queue pairs */
- ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE + 1;
+ ts_params->conf.nb_queue_pairs = orig_nb_qps + 1;
TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0],
&ts_params->conf),
@@ -819,7 +819,7 @@ test_queue_pair_descriptor_setup(void)
/* test invalid queue pair id */
qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT; /*valid */
- qp_id = DEFAULT_NUM_QPS_PER_QAT_DEVICE; /*invalid */
+ qp_id = ts_params->conf.nb_queue_pairs; /*invalid */
TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
ts_params->valid_devs[0],