From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>,
Nipun Gupta <nipun.gupta@nxp.com>,
Jerin Jacob <jerinj@marvell.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
Liang Ma <liang.j.ma@intel.com>,
Peter Mccarthy <peter.mccarthy@intel.com>,
Harry van Haaren <harry.van.haaren@intel.com>
Subject: [dpdk-dev] [PATCH 08/11] drivers/event: use new logtype wrapper
Date: Mon, 19 Aug 2019 13:41:56 +0200 [thread overview]
Message-ID: <1566214919-32250-9-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/event/dpaa2/dpaa2_eventdev.c | 8 ++------
drivers/event/octeontx/ssovf_evdev.c | 8 ++------
drivers/event/octeontx/timvf_evdev.c | 8 ++------
drivers/event/opdl/opdl_evdev.c | 9 ++-------
drivers/event/sw/sw_evdev.c | 8 ++------
5 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 926b7ed..00701e3 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1096,9 +1096,5 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_INIT(dpaa2_eventdev_init_log)
-{
- dpaa2_logtype_event = rte_log_register("pmd.event.dpaa2");
- if (dpaa2_logtype_event >= 0)
- rte_log_set_level(dpaa2_logtype_event, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa2_logtype_event, "pmd.event.dpaa2",
+ RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index a273d4c..d1d2645 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -23,12 +23,8 @@
int otx_logtype_ssovf;
static uint8_t timvf_enable_stats;
-RTE_INIT(otx_ssovf_init_log)
-{
- otx_logtype_ssovf = rte_log_register("pmd.event.octeontx");
- if (otx_logtype_ssovf >= 0)
- rte_log_set_level(otx_logtype_ssovf, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(otx_logtype_ssovf, "pmd.event.octeontx",
+ RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
/* SSOPF Mailbox messages */
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index abbc9a7..f087ce2 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -6,12 +6,8 @@
int otx_logtype_timvf;
-RTE_INIT(otx_timvf_init_log)
-{
- otx_logtype_timvf = rte_log_register("pmd.event.octeontx.timer");
- if (otx_logtype_timvf >= 0)
- rte_log_set_level(otx_logtype_timvf, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(otx_logtype_timvf, "pmd.event.octeontx.timer",
+ RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
struct __rte_packed timvf_mbox_dev_info {
uint64_t ring_active[4];
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3beca89..c0c1ec5 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -754,13 +754,8 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
.remove = opdl_remove
};
-RTE_INIT(opdl_init_log)
-{
- opdl_logtype_driver = rte_log_register("pmd.event.opdl.driver");
- if (opdl_logtype_driver >= 0)
- rte_log_set_level(opdl_logtype_driver, RTE_LOG_INFO);
-}
-
+RTE_LOG_REGISTER(opdl_logtype_driver, "pmd.event.opdl.driver",
+ RTE_LOG_INFO, RTE_LOGTYPE_PMD);
RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_OPDL_PMD, evdev_opdl_pmd_drv);
RTE_PMD_REGISTER_PARAM_STRING(event_opdl, NUMA_NODE_ARG "=<int>"
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index fb8e8be..0077fa8 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1087,9 +1087,5 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
/* declared extern in header, for access from other .c files */
int eventdev_sw_log_level;
-RTE_INIT(evdev_sw_init_log)
-{
- eventdev_sw_log_level = rte_log_register("pmd.event.sw");
- if (eventdev_sw_log_level >= 0)
- rte_log_set_level(eventdev_sw_log_level, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(eventdev_sw_log_level, "pmd.event.sw",
+ RTE_LOG_NOTICE, RTE_LOGTYPE_PMD);
--
1.8.3.1
next prev parent reply other threads:[~2019-08-19 11:43 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 ` [dpdk-dev] [PATCH 03/11] drivers/baseband: use new logtype wrapper David Marchand
2019-08-19 15:39 ` 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 ` David Marchand [this message]
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-9-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=jerinj@marvell.com \
--cc=liang.j.ma@intel.com \
--cc=nipun.gupta@nxp.com \
--cc=pbhagavatula@marvell.com \
--cc=peter.mccarthy@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).