From: Bharath Paulraj <bharathpaul@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Bharath Paulraj <bharathpaul@gmail.com>
Subject: [PATCH] log: allow log register API to update log level
Date: Fri, 9 Aug 2024 15:01:49 +0200 [thread overview]
Message-ID: <20240809130149.363053-1-bharathpaul@gmail.com> (raw)
This commit fixes the bug in the registration API where it fails to
set the log level if 'id' already exists.
Signed-off-by: Bharath Paulraj <bharathpaul@gmail.com>
---
.mailmap | 1 +
lib/log/log.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 4a508bafad..05eca16a96 100644
--- a/.mailmap
+++ b/.mailmap
@@ -181,6 +181,7 @@ Bernard Iremonger <bernard.iremonger@intel.com>
Bert van Leeuwen <bert.vanleeuwen@netronome.com>
Bhagyada Modali <bhagyada.modali@amd.com>
Bharat Mota <bharat.mota@broadcom.com> <bmota@vmware.com>
+Bharath Paulraj <bharathpaul@gmail.com>
Bhuvan Mital <bhuvan.mital@amd.com>
Bill Hong <bhong@brocade.com>
Billy McFall <bmcfall@redhat.com>
diff --git a/lib/log/log.c b/lib/log/log.c
index 255f757d94..4338795b16 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -292,8 +292,10 @@ log_register(const char *name, uint32_t level)
int id;
id = log_lookup(name);
- if (id >= 0)
+ if (id >= 0) {
+ logtype_set_level(id, level);
return id;
+ }
new_dynamic_types = realloc(rte_logs.dynamic_types,
sizeof(struct rte_log_dynamic_type) *
--
2.34.1
next reply other threads:[~2024-08-09 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 13:01 Bharath Paulraj [this message]
2024-08-09 14:06 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240809130149.363053-1-bharathpaul@gmail.com \
--to=bharathpaul@gmail.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).