From patchwork Thu Oct 6 17:34:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fiona Trahe X-Patchwork-Id: 16425 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 1557B68E8; Thu, 6 Oct 2016 19:45:54 +0200 (CEST) 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) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 06 Oct 2016 10:45:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,454,1473145200"; d="scan'208";a="177126785" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 06 Oct 2016 10:45:46 -0700 Received: from linux.site (sisvmlab045.ir.intel.com [10.237.216.52]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u96HjjWc026592; Thu, 6 Oct 2016 18:45:46 +0100 Received: by linux.site (Postfix, from userid 11342333) id 170B1E3BC5; Thu, 6 Oct 2016 18:34:51 +0100 (IST) From: Fiona Trahe To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, akhil.goyal@nxp.com Date: Thu, 6 Oct 2016 18:34:28 +0100 Message-Id: <1475775269-21454-4-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <20160926163300.22990-1-akhil.goyal@nxp.com> References: <20160926163300.22990-1-akhil.goyal@nxp.com> Subject: [dpdk-dev] [PATCH v3 3/4] app/test: cleanup unnecessary ring size setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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++) {