From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5181A0562 for ; Tue, 23 Mar 2021 11:20:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE891140D1C; Tue, 23 Mar 2021 11:20:27 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 5E037140D48 for ; Tue, 23 Mar 2021 11:20:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616494825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RdQUVT2BGoBHmjRaBOGkSfitzMy/W3KI4tFH5HT4jbw=; b=Rb9bZDZPh15k7/+7eGs7N6NKDkrkWSHat8MGizR1jMpsS5IFx0Nvilzs9cLxCO00CeqSzc /dG2+s3f8L2O2JPERwiSxMJyBiVgTtiKAMncwJt8eCoyWOjxixtsUS6pmEGRVJSjI+hLzP Bh5JtI5DmHPdHdbsw4nHlnTnzPvpax8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-fAemAps6N7W5d-cuX18osA-1; Tue, 23 Mar 2021 06:20:21 -0400 X-MC-Unique: fAemAps6N7W5d-cuX18osA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A5AF383DD21; Tue, 23 Mar 2021 10:20:19 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0D9A60C5D; Tue, 23 Mar 2021 10:20:15 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: arybchenko@solarflare.com, l.wojciechow@partner.samsung.com, stable@dpdk.org, Bruce Richardson , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Keith Wiles , Ranjit Menon Date: Tue, 23 Mar 2021 11:19:28 +0100 Message-Id: <20210323101928.2403-4-david.marchand@redhat.com> In-Reply-To: <20210323101928.2403-1-david.marchand@redhat.com> References: <20200626114751.22523-1-david.marchand@redhat.com> <20210323101928.2403-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] [PATCH 3/3] eal: fix evaluation of log level option X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" --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 logtype.level EAL: lib.eal logtype level changed from info to debug EAL: lib.ethdev logtype level changed from info to debug EAL: lib.ethdev logtype level changed from debug to info EAL: lib.ethdev logtype level changed from info to debug EAL: lib.ethdev logtype level changed from debug to info 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 logtype.level EAL: lib.eal logtype level changed from info to debug EAL: lib.ethdev logtype level changed from info to debug EAL: lib.ethdev logtype level changed from debug to info 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 --- 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 62320d610f..817961d8d6 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 9ffb4b3314..8070e0f632 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 2fc3d6141c..e3b6a6ea61 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.23.0