Skip to content

Commit

Permalink
test: proceed if timer subsystem already initialized
Browse files Browse the repository at this point in the history
[ upstream commit 3dd7d69 ]

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: 50247fe ("test/timer: exercise new APIs in secondary process")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
  • Loading branch information
semihalf-kardach-stanislaw authored and cpaelzer committed May 12, 2021
1 parent 2875a83 commit b24becd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/test/test.c
Expand Up @@ -134,8 +134,13 @@ main(int argc, char **argv)
goto out;
}

argv += ret;

prgname = argv[0];

#ifdef RTE_LIBRTE_TIMER
if (rte_timer_subsystem_init() < 0) {
ret = rte_timer_subsystem_init();
if (ret < 0 && ret != -EALREADY) {
ret = -1;
goto out;
}
Expand All @@ -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();
Expand Down

0 comments on commit b24becd

Please sign in to comment.