DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,
	akhil.goyal@nxp.com
Subject: [dpdk-dev] [PATCH v3 2/4] app/test: remove pointless for loop
Date: Thu,  6 Oct 2016 18:34:27 +0100	[thread overview]
Message-ID: <1475775269-21454-3-git-send-email-fiona.trahe@intel.com> (raw)
In-Reply-To: <20160926163300.22990-1-akhil.goyal@nxp.com>

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
 app/test/test_cryptodev.c | 49 +++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 8f40dea..db2f23c 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -357,37 +357,35 @@ testsuite_setup(void)
 		return TEST_FAILED;
 
 	/* Set up all the qps on the first of the valid devices found */
-	for (i = 0; i < 1; i++) {
-		dev_id = ts_params->valid_devs[i];
 
-		rte_cryptodev_info_get(dev_id, &info);
+	dev_id = ts_params->valid_devs[0];
 
-		/*
-		 * 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
-		 */
+	rte_cryptodev_info_get(dev_id, &info);
 
-		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;
+	/*
+	 * 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
+	 */
 
-		TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id,
-				&ts_params->conf),
-				"Failed to configure cryptodev %u with %u qps",
-				dev_id, ts_params->conf.nb_queue_pairs);
+	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;
 
-		ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
+	TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id,
+			&ts_params->conf),
+			"Failed to configure cryptodev %u with %u qps",
+			dev_id, ts_params->conf.nb_queue_pairs);
 
-		for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) {
-			TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
-					dev_id, qp_id, &ts_params->qp_conf,
-					rte_cryptodev_socket_id(dev_id)),
-					"Failed to setup queue pair %u on "
-					"cryptodev %u",
-					qp_id, dev_id);
-		}
+	ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
+
+	for (qp_id = 0; qp_id < info.max_nb_queue_pairs; qp_id++) {
+		TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
+			dev_id, qp_id, &ts_params->qp_conf,
+			rte_cryptodev_socket_id(dev_id)),
+			"Failed to setup queue pair %u on cryptodev %u",
+			qp_id, dev_id);
 	}
 
 	return TEST_SUCCESS;
-- 
2.5.0

  parent reply	other threads:[~2016-10-06 17:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 16:32 [dpdk-dev] [PATCH] examples/ipsec-secgw: Update checksum while decrementing ttl akhil.goyal
2016-09-26 13:28 ` Sergio Gonzalez Monroy
2016-10-05  0:34   ` De Lara Guarch, Pablo
2016-10-05  6:32     ` Akhil Goyal
2016-10-07 20:53       ` De Lara Guarch, Pablo
2016-10-10 12:05         ` Sergio Gonzalez Monroy
2016-10-17 17:05           ` De Lara Guarch, Pablo
2016-10-19  8:38             ` Akhil Goyal
2016-10-26  2:29               ` De Lara Guarch, Pablo
2016-09-26 16:32 ` [dpdk-dev] [PATCH] app/test: Remove hard coding for nb_queue_pairs in test_cryptodev akhil.goyal
2016-09-26 19:36   ` De Lara Guarch, Pablo
2016-09-29 14:12     ` Trahe, Fiona
2016-09-29 14:25       ` Thomas Monjalon
2016-09-29 14:29         ` De Lara Guarch, Pablo
2016-09-26 16:33 ` [dpdk-dev] [PATCH] test_cryptodev_perf: IV and digest should be stored at a DMAeble address akhil.goyal
2016-10-05  6:40   ` Akhil Goyal
2016-10-05  9:26     ` Kusztal, ArkadiuszX
2016-10-07 11:32       ` Akhil Goyal
2016-10-07 17:06   ` [dpdk-dev] [PATCH v2] " akhil.goyal
2016-10-07 21:36     ` De Lara Guarch, Pablo
2016-10-10  5:22       ` Akhil Goyal
2016-10-10 16:24         ` De Lara Guarch, Pablo
     [not found]     ` <20161012111629.14126-1-akhil.goyal@nxp.com>
2016-10-12 18:26       ` [dpdk-dev] [PATCH v3] " Trahe, Fiona
2016-10-13 19:35         ` De Lara Guarch, Pablo
2016-09-29 17:18 ` [dpdk-dev] [PATCH v2] app/test: remove hard-coding of crypto num qps Fiona Trahe
2016-10-05  0:49   ` De Lara Guarch, Pablo
2016-10-06 14:55     ` Trahe, Fiona
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 0/4] remove hard-coding of crypto num qps and cleanup Fiona Trahe
2016-10-07  0:29   ` De Lara Guarch, Pablo
2016-10-07  0:57     ` De Lara Guarch, Pablo
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 1/4] crypto/aesni_mb: free ring memory on qp release in PMD Fiona Trahe
2016-10-06 17:34 ` Fiona Trahe [this message]
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 3/4] app/test: cleanup unnecessary ring size setup Fiona Trahe
2016-10-06 17:34 ` [dpdk-dev] [PATCH v3 4/4] app/test: remove hard-coding of crypto num qps Fiona Trahe

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=1475775269-21454-3-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --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).