Skip to content

Commit

Permalink
examples: add calls to odp_schedule_config()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Eremin-Solenikov authored and muvarov committed Nov 19, 2018
1 parent 7563bcf commit 96adbf4
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions example/classifier/odp_classifier.c
Expand Up @@ -544,6 +544,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);

Expand Down
3 changes: 3 additions & 0 deletions example/generator/odp_generator.c
Expand Up @@ -1174,6 +1174,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;
Expand Down
3 changes: 3 additions & 0 deletions example/ipsec/odp_ipsec.c
Expand Up @@ -1285,6 +1285,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" :
Expand Down
3 changes: 3 additions & 0 deletions example/ipsec_api/odp_ipsec.c
Expand Up @@ -984,6 +984,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" :
Expand Down
3 changes: 3 additions & 0 deletions example/ipsec_offload/odp_ipsec_offload.c
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions example/packet/odp_packet_dump.c
Expand Up @@ -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)) {
Expand Down
3 changes: 3 additions & 0 deletions example/packet/odp_pktio.c
Expand Up @@ -412,6 +412,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);
Expand Down
3 changes: 3 additions & 0 deletions example/timer/odp_timer_accuracy.c
Expand Up @@ -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));
Expand Down
3 changes: 3 additions & 0 deletions example/timer/odp_timer_simple.c
Expand Up @@ -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
*/
Expand Down
3 changes: 3 additions & 0 deletions example/timer/odp_timer_test.c
Expand Up @@ -409,6 +409,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
*/
Expand Down

0 comments on commit 96adbf4

Please sign in to comment.