aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-03-13 16:53:05 +0200
committerMatias Elo <matias.elo@nokia.com>2023-03-27 17:14:40 +0300
commit3e027bd333fc81f5961e6d31ca9f9ee1dd2e4e24 (patch)
treea815a10b455dd365b5131954539aa7efa95366af /test
parent16e684e4630a0e6feeb3a3a7bfbfb453a9d00f42 (diff)
test: performance: start pktio devices before creating workers
As a workaround, start pktio devices before creating workers in odp_l2fwd and odp_sched_pktio test applications to enable limited DPDK process mode support. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'test')
-rw-r--r--test/performance/odp_l2fwd.c18
-rw-r--r--test/performance/odp_sched_pktio.c8
2 files changed, 9 insertions, 17 deletions
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 84f7fd2d6..ab36a4ebe 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -2312,6 +2312,12 @@ int main(int argc, char *argv[])
}
gbl_args->dst_eth_addr[i] = new_addr;
}
+
+ ret = odp_pktio_start(gbl_args->pktios[i].pktio);
+ if (ret) {
+ ODPH_ERR("Pktio start failed: %s\n", gbl_args->appl.if_names[i]);
+ exit(EXIT_FAILURE);
+ }
}
gbl_args->pktios[i].pktio = ODP_PKTIO_INVALID;
@@ -2403,18 +2409,6 @@ int main(int argc, char *argv[])
if (gbl_args->appl.verbose)
odp_shm_print_all();
- /* Start packet receive and transmit */
- for (i = 0; i < if_count; ++i) {
- odp_pktio_t pktio;
-
- pktio = gbl_args->pktios[i].pktio;
- ret = odp_pktio_start(pktio);
- if (ret) {
- ODPH_ERR("Pktio start failed: %s\n", gbl_args->appl.if_names[i]);
- exit(EXIT_FAILURE);
- }
- }
-
ret = print_speed_stats(num_workers, stats, gbl_args->appl.time,
gbl_args->appl.accuracy);
diff --git a/test/performance/odp_sched_pktio.c b/test/performance/odp_sched_pktio.c
index 5cc07d010..d82dce12f 100644
--- a/test/performance/odp_sched_pktio.c
+++ b/test/performance/odp_sched_pktio.c
@@ -1535,6 +1535,9 @@ int main(int argc, char *argv[])
if (start_timers(test_global))
goto quit;
+ if (start_pktios(test_global))
+ goto quit;
+
odp_barrier_init(&test_global->worker_start,
test_global->opt.num_worker + 1);
@@ -1544,11 +1547,6 @@ int main(int argc, char *argv[])
* to process packets. */
odp_barrier_wait(&test_global->worker_start);
- if (start_pktios(test_global)) {
- test_global->stop_workers = 1;
- odp_mb_full();
- }
-
t1 = odp_time_local();
wait_workers(thread, test_global);