More controlled startup sequence: * Create and configure pktios * Create and start workers * Enable packet rx and tx
Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> --- test/performance/odp_l2fwd.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 69b67a0..5830a02 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -541,15 +541,8 @@ int main(int argc, char *argv[]) /* Save interface destination port */ gbl_args->dst_port[i] = find_dest_port(i); - - ret = odp_pktio_start(pktio); - if (ret) { - LOG_ERR("Error: unable to start %s\n", - gbl_args->appl.if_names[i]); - exit(EXIT_FAILURE); - } - } + gbl_args->pktios[i] = ODP_PKTIO_INVALID; memset(thread_tbl, 0, sizeof(thread_tbl)); @@ -580,6 +573,17 @@ int main(int argc, char *argv[]) cpu = odp_cpumask_next(&cpumask, cpu); } + /* Start packet receive and transmit */ + for (i = 0; i < gbl_args->appl.if_count; ++i) { + pktio = gbl_args->pktios[i]; + ret = odp_pktio_start(pktio); + if (ret) { + LOG_ERR("Error: unable to start %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); free(stats); -- 2.6.2 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp