--log-level option is handled early, no need to reevaluate it later in
EAL init.
Before:
$ echo quit | ./build/app/test/dpdk-test --no-huge -m 512 \
--log-level=lib.eal:debug \
--log-level=lib.ethdev:debug --log-level=lib.ethdev:info \
|& grep -i log.level
EAL: lib.eal log level changed from info to debug
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.telemetry log level changed from disabled to warning
After:
$ echo quit | ./build/app/test/dpdk-test --no-huge -m 512 \
--log-level=lib.eal:debug \
--log-level=lib.ethdev:debug --log-level=lib.ethdev:info \
|& grep -i log.level
EAL: lib.eal log level changed from info to debug
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.telemetry log level changed from disabled to warning
Fixes:
6c7216eefd63 ("eal: fix log level of early messages")
Fixes:
1c806ae5c3ac ("eal/windows: support command line options parsing")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
goto out;
}
+ /* eal_log_level_parse() already handled this option */
+ if (opt == OPT_LOG_LEVEL_NUM)
+ continue;
+
ret = eal_parse_common_option(opt, optarg, internal_conf);
/* common parser is not happy */
if (ret < 0) {
goto out;
}
+ /* eal_log_level_parse() already handled this option */
+ if (opt == OPT_LOG_LEVEL_NUM)
+ continue;
+
ret = eal_parse_common_option(opt, optarg, internal_conf);
/* common parser is not happy */
if (ret < 0) {
return -1;
}
+ /* eal_log_level_parse() already handled this option */
+ if (opt == OPT_LOG_LEVEL_NUM)
+ continue;
+
ret = eal_parse_common_option(opt, optarg, internal_conf);
/* common parser is not happy */
if (ret < 0) {