aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2018-10-12 13:02:05 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-11-28 17:16:39 +0300
commitc80718ccd7b16d959a08292bc527f9bd66d5d1a2 (patch)
tree41d75c2ad120517da2928f44455ac0d61edaac6b /helper
parent1065c7735a98611308f7430839a62e8a1fab40da (diff)
helper: test: add test for new odph_options() function
Signed-off-by: Matias Elo <matias.elo@nokia.com> 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 'helper')
-rw-r--r--helper/test/odpthreads.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/helper/test/odpthreads.c b/helper/test/odpthreads.c
index ad48ec2d5..55db37e0d 100644
--- a/helper/test/odpthreads.c
+++ b/helper/test/odpthreads.c
@@ -64,18 +64,27 @@ static int worker_fn(void *arg ODPH_UNUSED)
/* Create additional dataplane opdthreads */
int main(int argc, char *argv[])
{
+ odph_helper_options_t helper_options;
odph_odpthread_params_t thr_params;
odph_odpthread_t thread_tbl[NUMBER_WORKERS];
odp_cpumask_t cpu_mask;
+ odp_init_t init_param;
int num_workers;
int cpu, affinity;
int ret;
char cpumaskstr[ODP_CPUMASK_STR_SIZE];
- /* let helper collect its own arguments (e.g. --odph_proc) */
+ /* Let helper collect its own arguments (e.g. --odph_proc) */
argc = odph_parse_options(argc, argv);
+ if (odph_options(&helper_options)) {
+ ODPH_ERR("Error: reading ODP helper options failed.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ odp_init_param_init(&init_param);
+ init_param.mem_model = helper_options.mem_model;
- if (odp_init_global(&odp_instance, NULL, NULL)) {
+ if (odp_init_global(&odp_instance, &init_param, NULL)) {
ODPH_ERR("Error: ODP global init failed.\n");
exit(EXIT_FAILURE);
}