[dpdk-dev] [RFC 0/8] eal: dynamic logs

Olivier Matz olivier.matz at 6wind.com
Mon Feb 6 14:29:08 CET 2017


The objective of this RFC patchset is to introduce a framework to
support dynamic log types in EAL. It also provides one example of use
(in i40e).

Features:
- log types are identified by a string
- at registration, a uniq identifier is associated to a log type
- each log type can have its level changed dynamically
- extend command line parameters to set the log level of a specific
  type, or logs matching a regular expression
- keep compat with other legacy types (eal, malloc, ring, user*,
  etc... keep their hardcoded log type value)

At the end, when, we can expect that all non-dataplane logs are moved to
be dynamic, so we can enable/disable them at runtime, without
recompiling. Many debug options can probably be removed from
configuration:
  $ git grep DEBUG config/common_base | wc -l
  89

Comments are welcome!


Olivier Matz (8):
  eal: support dynamic log types
  eal: dump registered log types
  eal: change several log levels matching a regexp
  eal: change specific log levels at startup
  eal: deprecate log functions
  app/test: new command to dump log types
  app/testpmd: new command to dump log types
  net/i40e: use dynamic log type for control logs

 app/test-pmd/cmdline.c                          |   5 +-
 app/test/commands.c                             |   4 +-
 app/test/test_logs.c                            |  12 +-
 doc/guides/contributing/coding_style.rst        |  30 ++--
 drivers/net/i40e/i40e_ethdev.c                  |  18 +-
 drivers/net/i40e/i40e_fdir.c                    |   4 -
 drivers/net/i40e/i40e_logs.h                    |  17 +-
 examples/quota_watermark/qw/main.c              |   2 +-
 examples/quota_watermark/qwctl/qwctl.c          |   2 +-
 lib/librte_eal/bsdapp/eal/eal.c                 |   4 +-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   6 +
 lib/librte_eal/common/eal_common_log.c          | 219 +++++++++++++++++++++++-
 lib/librte_eal/common/eal_common_options.c      |  48 ++++--
 lib/librte_eal/common/include/rte_log.h         |  76 +++++++-
 lib/librte_eal/linuxapp/eal/eal.c               |   4 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   6 +
 16 files changed, 394 insertions(+), 63 deletions(-)

-- 
2.8.1



More information about the dev mailing list