From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fiona Trahe Subject: [PATCH v3 3/4] app/test: cleanup unnecessary ring size setup Date: Thu, 6 Oct 2016 18:34:28 +0100 Message-ID: <1475775269-21454-4-git-send-email-fiona.trahe@intel.com> References: <20160926163300.22990-1-akhil.goyal@nxp.com> Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, akhil.goyal@nxp.com To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E04FE3238 for ; Thu, 6 Oct 2016 19:45:48 +0200 (CEST) In-Reply-To: <20160926163300.22990-1-akhil.goyal@nxp.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Removed obsolete comments re inability to free and re-allocate queue memory and obsolete workaround for it which used to create maximum size queues first, then later create smaller queues. Signed-off-by: Fiona Trahe --- app/test/test_cryptodev.c | 15 +-------------- app/test/test_cryptodev_perf.c | 17 +---------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index db2f23c..e0b0252 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -362,13 +362,6 @@ testsuite_setup(void) rte_cryptodev_info_get(dev_id, &info); - /* - * Since we can't free and re-allocate queue memory always set - * the queues on this device up to max size first so enough - * memory is allocated for any later re-configures needed by - * other tests - */ - 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; @@ -378,7 +371,7 @@ testsuite_setup(void) "Failed to configure cryptodev %u with %u qps", dev_id, ts_params->conf.nb_queue_pairs); - ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT; + ts_params->qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT; for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) { TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup( @@ -430,12 +423,6 @@ ut_setup(void) "Failed to configure cryptodev %u", ts_params->valid_devs[0]); - /* - * Now reconfigure queues to size we actually want to use in this - * test suite. - */ - ts_params->qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT; - for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs ; qp_id++) { TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup( ts_params->valid_devs[0], qp_id, diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c index e8fc097..27d8cf8 100644 --- a/app/test/test_cryptodev_perf.c +++ b/app/test/test_cryptodev_perf.c @@ -426,9 +426,7 @@ testsuite_setup(void) /* * Using Crypto Device Id 0 by default. - * Since we can't free and re-allocate queue memory always set the queues - * on this device up to max size first so enough memory is allocated for - * any later re-configures needed by other tests + * Set up all the qps on this device */ rte_cryptodev_info_get(ts_params->dev_id, &info); @@ -442,19 +440,6 @@ testsuite_setup(void) "Failed to configure cryptodev %u", ts_params->dev_id); - - ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT; - - for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs ; qp_id++) { - TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup( - ts_params->dev_id, qp_id, - &ts_params->qp_conf, - rte_cryptodev_socket_id(ts_params->dev_id)), - "Failed to setup queue pair %u on cryptodev %u", - qp_id, ts_params->dev_id); - } - - /*Now reconfigure queues to size we actually want to use in this testsuite.*/ ts_params->qp_conf.nb_descriptors = PERF_NUM_OPS_INFLIGHT; for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs ; qp_id++) { -- 2.5.0