From: Stanislaw Kardach Date: Fri, 26 Mar 2021 10:47:59 +0000 (+0100) Subject: test: proceed if timer subsystem already initialized X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc;p=dpdk.git test: proceed if timer subsystem already initialized rte_timer_subsystem_init() may return -EALREADY if the timer subsystem was already initialized. This can happen i.e. in PMD code (see eth_ena_dev_init). This is not an error, rather a notification as the initialization function simply returns without any action taken. Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process") Cc: stable@dpdk.org Signed-off-by: Stanislaw Kardach Reviewed-by: Michal Krawczyk --- diff --git a/app/test/test.c b/app/test/test.c index 624dd48042..864523ed61 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -134,8 +134,13 @@ main(int argc, char **argv) goto out; } + argv += ret; + + prgname = argv[0]; + #ifdef RTE_LIB_TIMER - if (rte_timer_subsystem_init() < 0) { + ret = rte_timer_subsystem_init(); + if (ret < 0 && ret != -EALREADY) { ret = -1; goto out; } @@ -146,10 +151,6 @@ main(int argc, char **argv) goto out; } - argv += ret; - - prgname = argv[0]; - recursive_call = getenv(RECURSIVE_ENV_VAR); if (recursive_call != NULL) { ret = do_recursive_call();