aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/performance/odp_l2fwd.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index 69b67a045..5830a0221 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);