DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Nicolas Chautru <nicolas.chautru@intel.com>
Subject: [dpdk-dev] [PATCH 03/11] drivers/baseband: use new logtype wrapper
Date: Mon, 19 Aug 2019 13:41:51 +0200	[thread overview]
Message-ID: <1566214919-32250-4-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1566214919-32250-1-git-send-email-david.marchand@redhat.com>

Make use of the newly introduced wrapper.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c     | 11 ++++-------
 drivers/baseband/null/bbdev_null.c               |  8 ++------
 drivers/baseband/turbo_sw/bbdev_turbo_software.c |  8 ++------
 3 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 7e05b94..397ca8f 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -2663,13 +2663,10 @@ RTE_PMD_REGISTER_PCI(FPGA_LTE_FEC_VF_DRIVER_NAME, fpga_lte_fec_pci_vf_driver);
 RTE_PMD_REGISTER_PCI_TABLE(FPGA_LTE_FEC_VF_DRIVER_NAME,
 		pci_id_fpga_lte_fec_vf_map);
 
-RTE_INIT(fpga_lte_fec_init_log)
-{
-	fpga_lte_fec_logtype = rte_log_register("pmd.bb.fpga_lte_fec");
-	if (fpga_lte_fec_logtype >= 0)
+RTE_LOG_REGISTER(fpga_lte_fec_logtype, "pmd.bb.fpga_lte_fec",
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-		rte_log_set_level(fpga_lte_fec_logtype, RTE_LOG_DEBUG);
+	RTE_LOG_DEBUG
 #else
-		rte_log_set_level(fpga_lte_fec_logtype, RTE_LOG_NOTICE);
+	RTE_LOG_NOTICE
 #endif
-}
+	, RTE_LOGTYPE_PMD);
diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
index 2f25151..029c308 100644
--- a/drivers/baseband/null/bbdev_null.c
+++ b/drivers/baseband/null/bbdev_null.c
@@ -348,9 +348,5 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME,
 	BBDEV_NULL_SOCKET_ID_ARG"=<int>");
 RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_null);
 
-RTE_INIT(null_bbdev_init_log)
-{
-	bbdev_null_logtype = rte_log_register("pmd.bb.null");
-	if (bbdev_null_logtype >= 0)
-		rte_log_set_level(bbdev_null_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(bbdev_null_logtype, "pmd.bb.null",
+	RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index f2fe7a2..fb0bbbe 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -1988,9 +1988,5 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME,
 	TURBO_SW_SOCKET_ID_ARG"=<int>");
 RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw);
 
-RTE_INIT(turbo_sw_bbdev_init_log)
-{
-	bbdev_turbo_sw_logtype = rte_log_register("pmd.bb.turbo_sw");
-	if (bbdev_turbo_sw_logtype >= 0)
-		rte_log_set_level(bbdev_turbo_sw_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(bbdev_turbo_sw_logtype, "pmd.bb.turbo_sw",
+	RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
-- 
1.8.3.1


  parent reply	other threads:[~2019-08-19 11:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 11:41 [dpdk-dev] [PATCH 00/11] Fixing log levels for dynamically loaded drivers David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 01/11] log: fix plugin level restore with patterns David Marchand
2019-08-19 12:30   ` Andrew Rybchenko
2019-08-19 11:41 ` [dpdk-dev] [PATCH 02/11] log: define logtype register wrapper for drivers David Marchand
2019-08-19 12:27   ` Andrew Rybchenko
2019-09-02 14:29   ` Ferruh Yigit
2019-09-03  8:06     ` David Marchand
2019-09-03  8:47       ` Ferruh Yigit
2019-09-04 17:45         ` Thomas Monjalon
2019-09-04 19:21           ` Andrew Rybchenko
2019-09-04 19:41             ` Thomas Monjalon
2019-09-04 19:58               ` Andrew Rybchenko
2019-09-04 20:44                 ` Thomas Monjalon
2019-09-05  6:29                   ` Andrew Rybchenko
2019-09-05  7:13                     ` David Marchand
2019-09-05  7:45                     ` Thomas Monjalon
2019-08-19 11:41 ` David Marchand [this message]
2019-08-19 15:39   ` [dpdk-dev] [PATCH 03/11] drivers/baseband: use new logtype wrapper Chautru, Nicolas
2019-08-19 11:41 ` [dpdk-dev] [PATCH 04/11] drivers/bus: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 05/11] drivers/common: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 06/11] drivers/compress: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 07/11] drivers/crypto: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 08/11] drivers/event: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 09/11] drivers/mempool: " David Marchand
2019-08-19 11:41 ` [dpdk-dev] [PATCH 10/11] drivers/net: " David Marchand
2019-08-19 14:55   ` Legacy, Allain
2019-09-02 16:11   ` Ferruh Yigit
2019-09-03  8:06     ` David Marchand
2019-09-03 15:03       ` Stephen Hemminger
2019-08-19 11:41 ` [dpdk-dev] [PATCH 11/11] drivers/raw: " David Marchand
2019-09-02 14:17 ` [dpdk-dev] [PATCH 00/11] Fixing log levels for dynamically loaded drivers Ferruh Yigit
2019-09-03  8:06   ` David Marchand

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=1566214919-32250-4-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=nicolas.chautru@intel.com \
    /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).