aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>2018-11-07 17:41:04 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-12-26 16:48:54 +0300
commit9edf20ac38a6c7dc61cb00fbd776bea6afa264c7 (patch)
tree2e2131af49691429d490031aea1156e272f6682f /example
parent9287482b9debd49de84b6ec1640604edeaa9f9e1 (diff)
examples: add calls to odp_schedule_config()
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/classifier/odp_classifier.c3
-rw-r--r--example/generator/odp_generator.c3
-rw-r--r--example/ipsec/odp_ipsec.c3
-rw-r--r--example/ipsec_api/odp_ipsec.c3
-rw-r--r--example/ipsec_offload/odp_ipsec_offload.c3
-rw-r--r--example/packet/odp_packet_dump.c2
-rw-r--r--example/packet/odp_pktio.c3
-rw-r--r--example/timer/odp_timer_accuracy.c3
-rw-r--r--example/timer/odp_timer_simple.c3
-rw-r--r--example/timer/odp_timer_test.c3
10 files changed, 29 insertions, 0 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 43d40c53b..274ffaf41 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -556,6 +556,9 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/* odp_pool_print(pool); */
odp_atomic_init_u64(&args->total_packets, 0);
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 1093454c9..bd6af7955 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -1199,6 +1199,9 @@ int main(int argc, char *argv[])
args->rx_burst_size = args->appl.rx_burst;
}
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/* Create packet pool */
odp_pool_param_init(&params);
params.pkt.seg_len = POOL_PKT_LEN;
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 52ccce227..1bbf7a000 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -1297,6 +1297,9 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/* Populate our IPsec cache */
printf("Using %s mode for crypto API\n\n",
(CRYPTO_API_SYNC == global->appl.mode) ? "SYNC" :
diff --git a/example/ipsec_api/odp_ipsec.c b/example/ipsec_api/odp_ipsec.c
index fb0d90495..ab0fa3c5c 100644
--- a/example/ipsec_api/odp_ipsec.c
+++ b/example/ipsec_api/odp_ipsec.c
@@ -996,6 +996,9 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/* Populate our IPsec cache */
printf("Using %s mode for IPsec API\n\n",
(ODP_IPSEC_OP_MODE_SYNC == global->appl.mode) ? "SYNC" :
diff --git a/example/ipsec_offload/odp_ipsec_offload.c b/example/ipsec_offload/odp_ipsec_offload.c
index 90b3f6409..4d95b2e5b 100644
--- a/example/ipsec_offload/odp_ipsec_offload.c
+++ b/example/ipsec_offload/odp_ipsec_offload.c
@@ -606,6 +606,9 @@ main(int argc, char *argv[])
ipsec_init_post();
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/* Initialize interfaces (which resolves FWD DB entries */
for (i = 0; i < global->appl.if_count; i++)
initialize_intf(global->appl.if_names[i],
diff --git a/example/packet/odp_packet_dump.c b/example/packet/odp_packet_dump.c
index 5dcb7893e..4e3aec8f1 100644
--- a/example/packet/odp_packet_dump.c
+++ b/example/packet/odp_packet_dump.c
@@ -640,6 +640,8 @@ int main(int argc, char *argv[])
global->pool = ODP_POOL_INVALID;
+ odp_schedule_config(NULL);
+
odp_sys_info_print();
if (open_pktios(global)) {
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index e73e903cb..b1c4a79c8 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -424,6 +424,9 @@ int main(int argc, char *argv[])
}
odp_pool_print(pool);
+ /* Config and start scheduler */
+ odp_schedule_config(NULL);
+
/* Create a pktio instance for each interface */
for (i = 0; i < args->appl.if_count; ++i)
create_pktio(args->appl.if_names[i], pool, args->appl.mode);
diff --git a/example/timer/odp_timer_accuracy.c b/example/timer/odp_timer_accuracy.c
index 3b0d7e380..9409e3404 100644
--- a/example/timer/odp_timer_accuracy.c
+++ b/example/timer/odp_timer_accuracy.c
@@ -426,6 +426,9 @@ int main(int argc, char *argv[])
odp_sys_info_print();
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
num = test_global.opt.num;
test_global.timer = calloc(num, sizeof(odp_timer_t));
diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c
index 116f8ba60..ddefb0d2a 100644
--- a/example/timer/odp_timer_simple.c
+++ b/example/timer/odp_timer_simple.c
@@ -81,6 +81,9 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
goto err;
}
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/*
* Create a queue for timer test
*/
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 192a61d38..ca3e8ddf5 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -418,6 +418,9 @@ int main(int argc, char *argv[])
printf("period: %i usec\n", gbls->args.period_us);
printf("timeouts: %i\n", gbls->args.tmo_count);
+ /* Configure scheduler */
+ odp_schedule_config(NULL);
+
/*
* Create pool for timeouts
*/