[dpdk-stable] patch 'eal: fix evaluation of log level option' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:01:21 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3ad213dfa731dc1fb5370c14f8cbac80993d42d3

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3ad213dfa731dc1fb5370c14f8cbac80993d42d3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Fri, 9 Apr 2021 13:04:53 +0200
Subject: [PATCH] eal: fix evaluation of log level option
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 3e08081637ca082a8b58d5db2a11836dbe4e3e8c ]

--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")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
---
 lib/librte_eal/freebsd/eal.c | 4 ++++
 lib/librte_eal/linux/eal.c   | 4 ++++
 lib/librte_eal/windows/eal.c | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 51478358c7..77b42de416 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -521,6 +521,10 @@ eal_parse_args(int argc, char **argv)
 			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) {
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 32b48c3de9..2ccbad7b08 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -704,6 +704,10 @@ eal_parse_args(int argc, char **argv)
 			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) {
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 1e5f6576f0..78ac4adaeb 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -149,6 +149,10 @@ eal_parse_args(int argc, char **argv)
 			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) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.011520100 +0800
+++ 0133-eal-fix-evaluation-of-log-level-option.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 3e08081637ca082a8b58d5db2a11836dbe4e3e8c Mon Sep 17 00:00:00 2001
+From 3ad213dfa731dc1fb5370c14f8cbac80993d42d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 3e08081637ca082a8b58d5db2a11836dbe4e3e8c ]
@@ -35 +37,0 @@
-Cc: stable at dpdk.org
@@ -48 +50 @@
-index 5544701f20..f4d1676754 100644
+index 51478358c7..77b42de416 100644
@@ -63 +65 @@
-index baeead3301..ba19fc6347 100644
+index 32b48c3de9..2ccbad7b08 100644
@@ -66 +68 @@
-@@ -705,6 +705,10 @@ eal_parse_args(int argc, char **argv)
+@@ -704,6 +704,10 @@ eal_parse_args(int argc, char **argv)
@@ -78 +80 @@
-index 68a1fd1d21..41be20d89f 100644
+index 1e5f6576f0..78ac4adaeb 100644
@@ -81 +83 @@
-@@ -150,6 +150,10 @@ eal_parse_args(int argc, char **argv)
+@@ -149,6 +149,10 @@ eal_parse_args(int argc, char **argv)


More information about the stable mailing list