From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com
 [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id EC23ACF66
 for <dev@dpdk.org>; Fri, 17 Mar 2017 16:51:43 +0100 (CET)
Received: from glumotte.dev.6wind.com (unknown [10.16.0.195])
 by proxy.6wind.com (Postfix) with ESMTP id CD3922536E;
 Fri, 17 Mar 2017 16:51:38 +0100 (CET)
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: thomas.monjalon@6wind.com, david.marchand@6wind.com,
 bruce.richardson@intel.com, keith.wiles@intel.com
Date: Fri, 17 Mar 2017 16:51:14 +0100
Message-Id: <1489765882-30497-1-git-send-email-olivier.matz@6wind.com>
X-Mailer: git-send-email 2.8.1
In-Reply-To: <1486387756-16865-1-git-send-email-olivier.matz@6wind.com>
References: <1486387756-16865-1-git-send-email-olivier.matz@6wind.com>
Subject: [dpdk-dev] [PATCH 0/8] eal: dynamic logs
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Mar 2017 15:51:44 -0000

The objective of this 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)

Next step is to adapt drivers, libs and apps to use this new API. At the
end, 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


RFC -> v1:
- rebase on top of current master
- fix eal help alignment
- remove unused i40e compilation options


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 +-
 config/common_base                              |   2 -
 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      |  49 ++++--
 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 +
 test/test/commands.c                            |   4 +-
 test/test/test_logs.c                           |  12 +-
 17 files changed, 395 insertions(+), 65 deletions(-)

-- 
2.8.1