app/eventdev: add event port hints for perf mode
authorHarry van Haaren <harry.van.haaren@intel.com>
Thu, 14 Oct 2021 14:51:40 +0000 (14:51 +0000)
committerJerin Jacob <jerinj@marvell.com>
Thu, 21 Oct 2021 08:16:00 +0000 (10:16 +0200)
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>
Acked-by: Jerin Jacob <jerinj@marvell.com>
app/test-eventdev/test_perf_common.c

index 9342a24..ed2b81f 100644 (file)
@@ -557,7 +557,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;
@@ -577,7 +580,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) {
@@ -602,8 +608,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;