From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB87DA046B for ; Mon, 19 Aug 2019 13:43:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B27A1BEE0; Mon, 19 Aug 2019 13:42:39 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 582131BEE0 for ; Mon, 19 Aug 2019 13:42:37 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BAE947F740; Mon, 19 Aug 2019 11:42:36 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-32.brq.redhat.com [10.40.204.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7F651001B09; Mon, 19 Aug 2019 11:42:33 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Hemant Agrawal , Nipun Gupta , Jerin Jacob , Pavan Nikhilesh , Liang Ma , Peter Mccarthy , Harry van Haaren Date: Mon, 19 Aug 2019 13:41:56 +0200 Message-Id: <1566214919-32250-9-git-send-email-david.marchand@redhat.com> In-Reply-To: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> References: <1566214919-32250-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 19 Aug 2019 11:42:36 +0000 (UTC) Subject: [dpdk-dev] [PATCH 08/11] drivers/event: use new logtype wrapper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Make use of the newly introduced wrapper. Signed-off-by: David Marchand --- 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 "=" 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 "= " /* 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