All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: harry.van.haaren@intel.com, bruce.richardson@intel.com,
	hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com,
	narender.vangati@intel.com, nikhil.rao@intel.com,
	gprathyusha@caviumnetworks.com,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [PATCH v3 22/34] app/testeventdev: perf: add eventdev port setup
Date: Tue,  4 Jul 2017 10:23:17 +0530	[thread overview]
Message-ID: <20170704045329.24711-23-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <20170704045329.24711-1-jerin.jacob@caviumnetworks.com>

Setup one port per worker and link to all queues and setup
N producer ports to inject the events.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test-eventdev/test_perf_common.c | 65 ++++++++++++++++++++++++++++++++++++
 app/test-eventdev/test_perf_common.h |  2 ++
 2 files changed, 67 insertions(+)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index f889b1a59..46dd05704 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -42,6 +42,71 @@ perf_test_result(struct evt_test *test, struct evt_options *opt)
 }
 
 int
+perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
+				uint8_t stride, uint8_t nb_queues)
+{
+	struct test_perf *t = evt_test_priv(test);
+	uint8_t port, prod;
+	int ret = -1;
+
+	/* port configuration */
+	const struct rte_event_port_conf wkr_p_conf = {
+			.dequeue_depth = opt->wkr_deq_dep,
+			.enqueue_depth = 64,
+			.new_event_threshold = 4096,
+	};
+
+	/* setup one port per worker, linking to all queues */
+	for (port = 0; port < evt_nr_active_lcores(opt->wlcores);
+				port++) {
+		struct worker_data *w = &t->worker[port];
+
+		w->dev_id = opt->dev_id;
+		w->port_id = port;
+		w->t = t;
+		w->processed_pkts = 0;
+		w->latency = 0;
+
+		ret = rte_event_port_setup(opt->dev_id, port, &wkr_p_conf);
+		if (ret) {
+			evt_err("failed to setup port %d", port);
+			return ret;
+		}
+
+		ret = rte_event_port_link(opt->dev_id, port, NULL, NULL, 0);
+		if (ret != nb_queues) {
+			evt_err("failed to link all queues to port %d", port);
+			return -EINVAL;
+		}
+	}
+
+	/* port for producers, no links */
+	const struct rte_event_port_conf prod_conf = {
+			.dequeue_depth = 8,
+			.enqueue_depth = 32,
+			.new_event_threshold = 1200,
+	};
+	prod = 0;
+	for ( ; port < perf_nb_event_ports(opt); port++) {
+		struct prod_data *p = &t->prod[port];
+
+		p->dev_id = opt->dev_id;
+		p->port_id = port;
+		p->queue_id = prod * stride;
+		p->t = t;
+
+		ret = rte_event_port_setup(opt->dev_id, port, &prod_conf);
+		if (ret) {
+			evt_err("failed to setup port %d", port);
+			return ret;
+		}
+		prod++;
+	}
+
+	return ret;
+}
+
+int
 perf_opt_check(struct evt_options *opt, uint64_t nb_queues)
 {
 	unsigned int lcores;
diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h
index 5c56766e5..06e887b98 100644
--- a/app/test-eventdev/test_perf_common.h
+++ b/app/test-eventdev/test_perf_common.h
@@ -97,6 +97,8 @@ int perf_test_result(struct evt_test *test, struct evt_options *opt);
 int perf_opt_check(struct evt_options *opt, uint64_t nb_queues);
 int perf_test_setup(struct evt_test *test, struct evt_options *opt);
 int perf_mempool_setup(struct evt_test *test, struct evt_options *opt);
+int perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
+				uint8_t stride, uint8_t nb_queues);
 void perf_opt_dump(struct evt_options *opt, uint8_t nb_queues);
 void perf_test_destroy(struct evt_test *test, struct evt_options *opt);
 void perf_eventdev_destroy(struct evt_test *test, struct evt_options *opt);
-- 
2.13.2

  parent reply	other threads:[~2017-07-04  4:55 UTC|newest]

Thread overview: 133+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 19:58 [PATCH 00/33] introduce generic eventdev test application framework Jerin Jacob
2017-05-28 19:58 ` [PATCH 01/33] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-06-23 12:23   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 02/33] app/testeventdev: define eventdev test ops Jerin Jacob
2017-06-01 20:44   ` Eads, Gage
2017-06-23 12:27   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 03/33] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-06-23 12:28   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 04/33] app/testeventdev: add string parsing helpers Jerin Jacob
2017-06-23 12:30   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 05/33] app/testeventdev: add common helper functions Jerin Jacob
2017-05-28 19:58 ` [PATCH 06/33] app/testeventdev: define the test options Jerin Jacob
2017-06-23 13:07   ` Van Haaren, Harry
2017-07-03  7:10     ` Jerin Jacob
2017-05-28 19:58 ` [PATCH 07/33] app/testeventdev: add helper functions to check options Jerin Jacob
2017-05-28 19:58 ` [PATCH 08/33] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-05-28 19:58 ` [PATCH 09/33] app/testeventdev: update options through the command line Jerin Jacob
2017-05-28 19:58 ` [PATCH 10/33] app/testeventdev: invoke the test ops Jerin Jacob
2017-05-28 19:58 ` [PATCH 11/33] app/testeventdev: add the signal handler Jerin Jacob
2017-05-28 19:58 ` [PATCH 12/33] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-05-28 19:58 ` [PATCH 13/33] app/testeventdev: order: add basic functions Jerin Jacob
2017-05-28 19:58 ` [PATCH 14/33] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-06-23 12:36   ` Van Haaren, Harry
2017-06-23 12:45     ` Jerin Jacob
2017-05-28 19:58 ` [PATCH 15/33] app/testeventdev: order: launch lcores Jerin Jacob
2017-06-01 20:54   ` Eads, Gage
2017-05-28 19:58 ` [PATCH 16/33] app/testeventdev: add order queue test Jerin Jacob
2017-05-28 19:58 ` [PATCH 17/33] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-05-28 19:58 ` [PATCH 18/33] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-05-28 19:58 ` [PATCH 19/33] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-05-28 19:58 ` [PATCH 20/33] app/testeventdev: perf: add basic functions Jerin Jacob
2017-05-28 19:58 ` [PATCH 21/33] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-05-28 19:58 ` [PATCH 22/33] app/testeventdev: perf: add eventdev port setup Jerin Jacob
2017-06-23 12:42   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 23/33] app/testeventdev: perf: launch lcores Jerin Jacob
2017-05-28 19:58 ` [PATCH 24/33] app/testeventdev: add perf queue test Jerin Jacob
2017-06-23 12:47   ` Van Haaren, Harry
2017-07-03  8:38     ` Jerin Jacob
2017-05-28 19:58 ` [PATCH 25/33] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-06-01 21:04   ` Eads, Gage
2017-06-02 12:21     ` Jerin Jacob
2017-05-28 19:58 ` [PATCH 26/33] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-05-28 19:58 ` [PATCH 27/33] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-05-28 19:58 ` [PATCH 28/33] doc: describe the new eventdev test application Jerin Jacob
2017-06-23 12:53   ` Van Haaren, Harry
2017-07-03  9:48     ` Jerin Jacob
2017-06-30 14:09   ` Mcnamara, John
2017-05-28 19:58 ` [PATCH 29/33] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-06-30 14:19   ` Mcnamara, John
2017-05-28 19:58 ` [PATCH 30/33] doc/testeventdev: add "order all types " Jerin Jacob
2017-06-30 14:23   ` Mcnamara, John
2017-06-30 14:28   ` Mcnamara, John
2017-05-28 19:58 ` [PATCH 31/33] doc/testeventdev: add "perf " Jerin Jacob
2017-06-01 21:11   ` Eads, Gage
2017-06-02 12:10     ` Jerin Jacob
2017-06-30 14:31   ` Mcnamara, John
2017-05-28 19:58 ` [PATCH 32/33] doc/testeventdev: add "perf all types " Jerin Jacob
2017-06-23 12:56   ` Van Haaren, Harry
2017-05-28 19:58 ` [PATCH 33/33] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-06-23 12:58   ` Van Haaren, Harry
2017-06-23 12:21 ` [PATCH 00/33] introduce generic eventdev test application framework Van Haaren, Harry
2017-07-03 19:13 ` [PATCH v2 00/34] " Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 01/34] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 02/34] app/testeventdev: define eventdev test ops Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 03/34] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 04/34] app/testeventdev: add string parsing helpers Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 05/34] app/testeventdev: add common helper functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 06/34] app/testeventdev: define the test options Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 07/34] app/testeventdev: add helper functions to check options Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 08/34] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 09/34] app/testeventdev: update options through the command line Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 10/34] app/testeventdev: invoke the test ops Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 11/34] app/testeventdev: add the signal handler Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 12/34] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 13/34] app/testeventdev: order: add basic functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 14/34] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 15/34] app/testeventdev: order: launch lcores Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 16/34] app/testeventdev: add order queue test Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 17/34] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 18/34] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 19/34] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 20/34] app/testeventdev: perf: add basic functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 21/34] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 22/34] app/testeventdev: perf: add eventdev port setup Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 23/34] app/testeventdev: perf: launch lcores Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 24/34] app/testeventdev: add perf queue test Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 25/34] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 26/34] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 27/34] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 28/34] doc: describe the new eventdev test application Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 29/34] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 30/34] doc/testeventdev: add "order all types " Jerin Jacob
2017-07-03 19:13   ` [PATCH v2 31/34] doc/testeventdev: add "perf " Jerin Jacob
2017-07-03 19:14   ` [PATCH v2 32/34] doc/testeventdev: add "perf all types " Jerin Jacob
2017-07-03 19:14   ` [PATCH v2 33/34] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-07-03 19:14   ` [PATCH v2 34/34] doc: update release notes for dpdk-test-eventdev application Jerin Jacob
2017-07-04  4:52   ` [PATCH v3 00/34] introduce generic eventdev test application framework Jerin Jacob
2017-07-04  4:52     ` [PATCH v3 01/34] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-07-04  4:52     ` [PATCH v3 02/34] app/testeventdev: define eventdev test ops Jerin Jacob
2017-07-04  4:52     ` [PATCH v3 03/34] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-07-04  4:52     ` [PATCH v3 04/34] app/testeventdev: add string parsing helpers Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 05/34] app/testeventdev: add common helper functions Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 06/34] app/testeventdev: define the test options Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 07/34] app/testeventdev: add helper functions to check options Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 08/34] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 09/34] app/testeventdev: update options through the command line Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 10/34] app/testeventdev: invoke the test ops Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 11/34] app/testeventdev: add the signal handler Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 12/34] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 13/34] app/testeventdev: order: add basic functions Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 14/34] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 15/34] app/testeventdev: order: launch lcores Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 16/34] app/testeventdev: add order queue test Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 17/34] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 18/34] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 19/34] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 20/34] app/testeventdev: perf: add basic functions Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 21/34] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-07-04  4:53     ` Jerin Jacob [this message]
2017-07-04  4:53     ` [PATCH v3 23/34] app/testeventdev: perf: launch lcores Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 24/34] app/testeventdev: add perf queue test Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 25/34] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 26/34] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 27/34] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 28/34] doc: describe the new eventdev test application Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 29/34] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 30/34] doc/testeventdev: add "order all types " Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 31/34] doc/testeventdev: add "perf " Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 32/34] doc/testeventdev: add "perf all types " Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 33/34] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-07-04  4:53     ` [PATCH v3 34/34] doc: update release notes for dpdk-test-eventdev application Jerin Jacob
2017-07-04 11:33       ` Mcnamara, John
2017-07-07  5:48     ` [PATCH v3 00/34] introduce generic eventdev test application framework Jerin Jacob

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=20170704045329.24711-23-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=gprathyusha@caviumnetworks.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=narender.vangati@intel.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.