eal: fix telemetry log type on registration failure
authorDavid Marchand <david.marchand@redhat.com>
Tue, 6 Apr 2021 09:25:45 +0000 (11:25 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Apr 2021 16:31:58 +0000 (18:31 +0200)
commit551b29a714b81733da31a9495aa0d8554448c83a
treef4d9ea66e3105ab84a7ccb509d390ca28ce43a80
parentbd057ae47d221cb92ebe370f81d01d470c0325df
eal: fix telemetry log type on registration failure

rte_log_register_type_and_pick_level() returns an int.
Casting to a uin32_t will make us miss the -1 passed in case of failure.
Fallback to EAL log type like RTE_LOG_REGISTER.

Fixes: 37b881a96194 ("telemetry: use log function from pointer")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/freebsd/eal.c
lib/librte_eal/linux/eal.c