DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Cc: jerinj@marvell.com, pravin.pathak@intel.com,
	rashmi.shetty@intel.com,
	Harry van Haaren <harry.van.haaren@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/4] test-eventdev: add event port hints for perf mode
Date: Thu, 14 Oct 2021 14:51:40 +0000	[thread overview]
Message-ID: <20211014145141.679372-3-harry.van.haaren@intel.com> (raw)
In-Reply-To: <20211014145141.679372-1-harry.van.haaren@intel.com>

This commit adds producer, worker and consumer port hints for the
test-eventdev application performance tests.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test-eventdev/test_perf_common.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index cc100650c2..766ea22a27 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -480,7 +480,10 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 		w->processed_pkts = 0;
 		w->latency = 0;
 
-		ret = rte_event_port_setup(opt->dev_id, port, port_conf);
+		struct rte_event_port_conf conf = *port_conf;
+		conf.event_port_cfg |= RTE_EVENT_PORT_CFG_HINT_WORKER;
+
+		ret = rte_event_port_setup(opt->dev_id, port, &conf);
 		if (ret) {
 			evt_err("failed to setup port %d", port);
 			return ret;
@@ -500,7 +503,10 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 			p->t = t;
 		}
 
-		ret = perf_event_rx_adapter_setup(opt, stride, *port_conf);
+		struct rte_event_port_conf conf = *port_conf;
+		conf.event_port_cfg |= RTE_EVENT_PORT_CFG_HINT_PRODUCER;
+
+		ret = perf_event_rx_adapter_setup(opt, stride, conf);
 		if (ret)
 			return ret;
 	} else if (opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) {
@@ -525,8 +531,12 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt,
 			p->queue_id = prod * stride;
 			p->t = t;
 
-			ret = rte_event_port_setup(opt->dev_id, port,
-					port_conf);
+			struct rte_event_port_conf conf = *port_conf;
+			conf.event_port_cfg |=
+				RTE_EVENT_PORT_CFG_HINT_PRODUCER |
+				RTE_EVENT_PORT_CFG_HINT_CONSUMER;
+
+			ret = rte_event_port_setup(opt->dev_id, port, &conf);
 			if (ret) {
 				evt_err("failed to setup port %d", port);
 				return ret;
-- 
2.30.2


  parent reply	other threads:[~2021-10-14 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 12:54 [dpdk-dev] [PATCH 0/2] eventdev: add port usage hints Harry van Haaren
2021-09-09 12:54 ` [dpdk-dev] [PATCH 1/2] lib/eventdev: add usage hints to port configure API Harry van Haaren
2021-09-16  4:59   ` Jerin Jacob
2021-09-16 11:53     ` Van Haaren, Harry
2021-10-14 14:51   ` [dpdk-dev] [PATCH v2 1/4] eventdev: " Harry van Haaren
2021-10-14 14:51     ` [dpdk-dev] [PATCH v2 2/4] examples/eventdev_pipeline: use port config hints Harry van Haaren
2021-10-14 14:51     ` Harry van Haaren [this message]
2021-10-14 14:51     ` [dpdk-dev] [PATCH v2 4/4] event/dlb2: optimize credit allocations using port hint flags Harry van Haaren
2021-10-20 13:18       ` Jerin Jacob
2021-10-20 14:08         ` Van Haaren, Harry
2021-10-20 16:21           ` Jerin Jacob
2021-09-09 12:54 ` [dpdk-dev] [PATCH 2/2] examples/eventdev_pipeline: use port config hints Harry van Haaren

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=20211014145141.679372-3-harry.van.haaren@intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pravin.pathak@intel.com \
    --cc=rashmi.shetty@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).