[PATCH v2 0/1] log: add name query functions

Randy L Tice rtice at cisco.com
Thu Nov 19 19:05:01 CET 2026


Applications that display or export DPDK logging configuration can query
numeric log levels, but have no direct way to retrieve the corresponding
level and component names. They must currently duplicate the level mapping
and cannot safely query a registered component name.

Add experimental APIs to return the canonical name for a log level and the
registered name for a log type. The returned strings are const and remain
owned by DPDK. Unit tests cover valid and invalid levels and types, and the
new APIs are documented in the programmer guide and release notes.

The original downstream implementation was authored by Walt Robinson.

Changes in v2:

- Return NULL for an invalid log level, matching the log type getter.
- Update the API documentation and test for the revised error convention.

Validation:

- Full native Meson/Ninja build with -Dwerror=true
- DPDK fast-tests / logs_autotest

Randy Tice (1):
  log: add name query functions

 app/test/test_logs.c                   | 11 +++++++++++
 doc/guides/prog_guide/log_lib.rst      |  7 +++++++
 doc/guides/rel_notes/release_26_11.rst |  5 +++++
 lib/log/log.c                          | 20 ++++++++++++++++++++
 lib/log/rte_log.h                      | 25 +++++++++++++++++++++++++
 5 files changed, 68 insertions(+)

-- 
2.35.6



More information about the dev mailing list