From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18CB743735; Mon, 18 Dec 2023 14:59:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0E93402B6; Mon, 18 Dec 2023 14:59:49 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CA0CA40282 for ; Mon, 18 Dec 2023 14:59:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702907987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ph+PhhLmGl5YDqBCvIUII6UiNuAc6MSDzlsGFWbXNHg=; b=f42GcuE0PWEa6Np4fOawFBbOjcPGp9Pc6JC7odxwtt3PKEkrnumqZXGuFgJzXPGI4jzzJC JbpFVIO6DT9NDlILMuJgZbz4+3T55FB08coMol/C5i3I/d8bS2tytfzwqcpZWNWuexJcpB oCD+JqAT/RHjF5XqQmd6GWcUrVbuboo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-299-vxRcNNsUOwuaWPXr60h3nQ-1; Mon, 18 Dec 2023 08:59:43 -0500 X-MC-Unique: vxRcNNsUOwuaWPXr60h3nQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 84D481C0512E; Mon, 18 Dec 2023 13:59:41 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8C2A40C6EB9; Mon, 18 Dec 2023 13:59:35 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, stephen@networkplumber.org, Gagandeep Singh , Hemant Agrawal , Nipun Gupta , Nikhil Agarwal , Sachin Saxena , Anoob Joseph , Jingjing Wu , Beilei Xing , Abdullah Sevincer , Igor Russkikh , Steven Webster , Matt Peters , Ajit Khaparde , Somnath Kotur , Ruifeng Wang , Bruce Richardson , Konstantin Ananyev , Apeksha Gupta , Junfeng Guo , Simei Su , Long Li , Vamsi Attunuru , Harman Kalra , Devendra Singh Rawat , Alok Prasad , Maxime Coquelin , Chenbo Xia , Jochen Behrens , Rosen Xu , Tianfei Zhang , Xiao Wang Subject: [PATCH] drivers: use dedicated logtypes Date: Mon, 18 Dec 2023 14:59:31 +0100 Message-ID: <20231218135932.1497163-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When a driver dedicated logtype exists, use it instead of the generic PMD logtype. This has been done partially automatically with: $ for file in $(git grep -l RTE_LOG.*PMD.*fmt drivers/'**.h' \ :^drivers/common/cnxk/roc_platform.h) do tail=${file#drivers/*/*/} dir=${file%%$tail} ! git grep -q RTE_LOGTYPE_ $dir || \ { echo $dir already done; continue; } git grep -hE '^extern int .*log.*;$' $file | \ sed -ne 's/^extern int \([^ ;]*\);$/\1/p' | \ while read logtype do git grep -q 'RTE_LOG_REGISTER\(_DEFAULT\|\)('$logtype',' || \ [ "$logtype" != "${logtype%%driver}" ] || \ { echo Skipped $logtype; continue; } abbrev=$(echo $logtype | sed -e 's/_logtype//' | tr '[a-z]' '[A-Z]') sed -i -e 's/^\(extern int '$logtype'.*\)$/\1\n#define RTE_LOGTYPE_' \ $abbrev' '$logtype'/' $file sed -i -e 's/\(RTE_LOG.*, \)PMD,/\1'$abbrev',/' $file break done done Then a manual update for: - common/cpt, - common/dpaax, - common/idpf, - mempool/dpaa, - net/bnxt, - net/octeon_ep, - raw/ifpga, - vdpa/ifc, Signed-off-by: David Marchand --- drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h | 3 ++- drivers/bus/cdx/cdx_logs.h | 3 ++- drivers/bus/fslmc/fslmc_logs.h | 3 ++- drivers/common/cpt/cpt_pmd_logs.h | 6 +++--- drivers/common/dpaax/caamflib/compat.h | 4 +++- drivers/common/dpaax/dpaax_logs.h | 3 ++- drivers/common/dpaax/version.map | 1 + drivers/common/idpf/idpf_common_logs.h | 5 +++-- drivers/crypto/caam_jr/caam_jr_log.h | 3 ++- drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 3 ++- drivers/crypto/dpaa_sec/dpaa_sec_log.h | 3 ++- drivers/dma/dpaa/dpaa_qdma_logs.h | 3 ++- drivers/dma/dpaa2/dpaa2_qdma_logs.h | 3 ++- drivers/event/dlb2/dlb2_log.h | 3 ++- drivers/event/dpaa2/dpaa2_eventdev_logs.h | 3 ++- drivers/mempool/dpaa/dpaa_mempool.c | 1 + drivers/mempool/dpaa/dpaa_mempool.h | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 3 ++- drivers/net/atlantic/atl_logs.h | 5 +++-- drivers/net/avp/avp_logs.h | 5 +++-- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +- drivers/net/bnxt/bnxt_txr.c | 2 +- drivers/net/dpaa/dpaa_ethdev.h | 3 ++- drivers/net/dpaa2/dpaa2_pmd_logs.h | 3 ++- drivers/net/enetc/enetc_logs.h | 3 ++- drivers/net/enetfec/enet_pmd_logs.h | 3 ++- drivers/net/igc/igc_logs.h | 5 +++-- drivers/net/mana/mana.h | 3 ++- drivers/net/octeon_ep/otx_ep_common.h | 2 ++ drivers/net/octeon_ep/otx_ep_rxtx.c | 2 +- drivers/net/octeontx/octeontx_logs.h | 3 ++- drivers/net/pfe/pfe_logs.h | 3 ++- drivers/net/qede/qede_logs.h | 5 +++-- drivers/net/virtio/virtio_logs.h | 5 +++-- drivers/net/vmxnet3/vmxnet3_logs.h | 7 ++++--- drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 3 ++- drivers/raw/ifpga/base/osdep_rte/osdep_generic.h | 5 ++++- drivers/vdpa/ifc/base/ifcvf.c | 10 +++++----- drivers/vdpa/ifc/base/ifcvf_osdep.h | 7 +++++-- 41 files changed, 92 insertions(+), 52 deletions(-) diff --git a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h index 452435ccb9..49c8d35d10 100644 --- a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h +++ b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h @@ -6,6 +6,7 @@ #define _BBDEV_LA12XX_PMD_LOGS_H_ extern int bbdev_la12xx_logtype; +#define RTE_LOGTYPE_BBDEV_LA12XX bbdev_la12xx_logtype #define rte_bbdev_log(level, fmt, ...) \ rte_log(RTE_LOG_ ## level, bbdev_la12xx_logtype, fmt "\n", \ @@ -23,6 +24,6 @@ extern int bbdev_la12xx_logtype; /* DP Logs, toggled out at compile time if level lower than current level */ #define rte_bbdev_dp_log(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, BBDEV_LA12XX, fmt, ## args) #endif /* _BBDEV_LA12XX_PMD_LOGS_H_ */ diff --git a/drivers/bus/cdx/cdx_logs.h b/drivers/bus/cdx/cdx_logs.h index a1046ce544..3a56e814d0 100644 --- a/drivers/bus/cdx/cdx_logs.h +++ b/drivers/bus/cdx/cdx_logs.h @@ -6,6 +6,7 @@ #define CDX_LOGS_H extern int cdx_logtype_bus; +#define RTE_LOGTYPE_CDX_BUS cdx_logtype_bus #define CDX_BUS_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, cdx_logtype_bus, "cdx: " fmt "\n", \ @@ -25,7 +26,7 @@ extern int cdx_logtype_bus; /* DP Logs, toggled out at compile time if level lower than current level */ #define CDX_BUS_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, CDX_BUS, fmt, ## args) #define CDX_BUS_DP_DEBUG(fmt, args...) \ CDX_BUS_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/bus/fslmc/fslmc_logs.h b/drivers/bus/fslmc/fslmc_logs.h index a1e14dd84e..37c6852ddd 100644 --- a/drivers/bus/fslmc/fslmc_logs.h +++ b/drivers/bus/fslmc/fslmc_logs.h @@ -8,6 +8,7 @@ #define _FSLMC_LOGS_H_ extern int dpaa2_logtype_bus; +#define RTE_LOGTYPE_DPAA2_BUS dpaa2_logtype_bus #define DPAA2_BUS_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_logtype_bus, "fslmc: " fmt "\n", \ @@ -27,7 +28,7 @@ extern int dpaa2_logtype_bus; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_BUS_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA2_BUS, fmt, ## args) #define DPAA2_BUS_DP_DEBUG(fmt, args...) \ DPAA2_BUS_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h index 174326c6ce..3c109c1983 100644 --- a/drivers/common/cpt/cpt_pmd_logs.h +++ b/drivers/common/cpt/cpt_pmd_logs.h @@ -15,6 +15,8 @@ * otx*_cryptodev.h file would define the CPT_LOGTYPE macro for the * platform. */ +#define RTE_LOGTYPE_CPT CPT_LOGTYPE + #define CPT_PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, CPT_LOGTYPE, \ "cpt: %s(): " fmt "\n", __func__, ##args) @@ -30,11 +32,9 @@ /* * DP logs, toggled out at compile time if level lower than current level. - * DP logs would be logged under 'PMD' type. So for dynamic logging, the - * level of 'pmd' has to be used. */ #define CPT_LOG_DP(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt "\n", ## args) + RTE_LOG_DP(level, CPT, fmt "\n", ## args) #define CPT_LOG_DP_DEBUG(fmt, args...) \ CPT_LOG_DP(DEBUG, fmt, ## args) diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h index 9776eed437..43da6a4fe3 100644 --- a/drivers/common/dpaax/caamflib/compat.h +++ b/drivers/common/dpaax/caamflib/compat.h @@ -20,6 +20,8 @@ #include #include +#include "dpaax_logs.h" + #ifndef __BYTE_ORDER__ #error "Undefined endianness" #endif @@ -44,7 +46,7 @@ #define pr_msg(l, fmt, ...) do { } while (0) #else #define pr_msg(l, fmt, ...) \ - RTE_LOG(l, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) + RTE_LOG(l, DPAAX_LOGGER, "%s(): " fmt "\n", __func__, ##__VA_ARGS__) #endif #if !defined(pr_debug) diff --git a/drivers/common/dpaax/dpaax_logs.h b/drivers/common/dpaax/dpaax_logs.h index 180476f675..c405c60992 100644 --- a/drivers/common/dpaax/dpaax_logs.h +++ b/drivers/common/dpaax/dpaax_logs.h @@ -8,6 +8,7 @@ #include extern int dpaax_logger; +#define RTE_LOGTYPE_DPAAX_LOGGER dpaax_logger #ifdef RTE_LIBRTE_DPAAX_DEBUG #define DPAAX_HWWARN(cond, fmt, args...) \ @@ -37,7 +38,7 @@ extern int dpaax_logger; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAAX_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAAX_LOGGER, fmt, ## args) #define DPAAX_DP_DEBUG(fmt, args...) \ DPAAX_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/common/dpaax/version.map b/drivers/common/dpaax/version.map index ee1ca6801c..d48a6b6f37 100644 --- a/drivers/common/dpaax/version.map +++ b/drivers/common/dpaax/version.map @@ -6,6 +6,7 @@ INTERNAL { dpaax_iova_table_p; dpaax_iova_table_populate; dpaax_iova_table_update; + dpaax_logger; of_device_is_available; of_device_is_compatible; of_find_compatible_node; diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/common/idpf/idpf_common_logs.h index f6be84ceb5..e638c616d8 100644 --- a/drivers/common/idpf/idpf_common_logs.h +++ b/drivers/common/idpf/idpf_common_logs.h @@ -8,6 +8,7 @@ #include extern int idpf_common_logtype; +#define RTE_LOGTYPE_IDPF_COMMON idpf_common_logtype #define DRV_LOG_RAW(level, ...) \ rte_log(RTE_LOG_ ## level, \ @@ -23,7 +24,7 @@ extern int idpf_common_logtype; #ifdef RTE_LIBRTE_IDPF_DEBUG_RX #define RX_LOG(level, ...) \ RTE_LOG(level, \ - PMD, \ + IDPF_COMMON, \ RTE_FMT("%s(): " \ RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ __func__, \ @@ -35,7 +36,7 @@ extern int idpf_common_logtype; #ifdef RTE_LIBRTE_IDPF_DEBUG_TX #define TX_LOG(level, ...) \ RTE_LOG(level, \ - PMD, \ + IDPF_COMMON, \ RTE_FMT("%s(): " \ RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ __func__, \ diff --git a/drivers/crypto/caam_jr/caam_jr_log.h b/drivers/crypto/caam_jr/caam_jr_log.h index 106ff07a70..8f6aa50e2a 100644 --- a/drivers/crypto/caam_jr/caam_jr_log.h +++ b/drivers/crypto/caam_jr/caam_jr_log.h @@ -8,6 +8,7 @@ #include extern int caam_jr_logtype; +#define RTE_LOGTYPE_CAAM_JR caam_jr_logtype #define CAAM_JR_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, caam_jr_logtype, "caam_jr: " \ @@ -28,7 +29,7 @@ extern int caam_jr_logtype; /* DP Logs, toggled out at compile time if level lower than current level */ #define CAAM_JR_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt "\n", ## args) + RTE_LOG_DP(level, CAAM_JR, fmt "\n", ## args) #define CAAM_JR_DP_DEBUG(fmt, args...) \ CAAM_JR_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h index c2e11f9516..ee69209504 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h @@ -9,6 +9,7 @@ #define _DPAA2_SEC_LOGS_H_ extern int dpaa2_logtype_sec; +#define RTE_LOGTYPE_DPAA2_SEC dpaa2_logtype_sec #define DPAA2_SEC_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_logtype_sec, "dpaa2_sec: " \ @@ -29,7 +30,7 @@ extern int dpaa2_logtype_sec; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_SEC_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA2_SEC, fmt, ## args) #define DPAA2_SEC_DP_DEBUG(fmt, args...) \ DPAA2_SEC_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h index fb895a8bc6..f8c85b6528 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h @@ -9,6 +9,7 @@ #define _DPAA_SEC_LOG_H_ extern int dpaa_logtype_sec; +#define RTE_LOGTYPE_DPAA_SEC dpaa_logtype_sec #define DPAA_SEC_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \ @@ -29,7 +30,7 @@ extern int dpaa_logtype_sec; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA_SEC_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA_SEC, fmt, ## args) #define DPAA_SEC_DP_DEBUG(fmt, args...) \ DPAA_SEC_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/dma/dpaa/dpaa_qdma_logs.h b/drivers/dma/dpaa/dpaa_qdma_logs.h index 762598f8f7..95753dcd89 100644 --- a/drivers/dma/dpaa/dpaa_qdma_logs.h +++ b/drivers/dma/dpaa/dpaa_qdma_logs.h @@ -6,6 +6,7 @@ #define __DPAA_QDMA_LOGS_H__ extern int dpaa_qdma_logtype; +#define RTE_LOGTYPE_DPAA_QDMA dpaa_qdma_logtype #define DPAA_QDMA_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa_qdma_logtype, "dpaa_qdma: " \ @@ -26,7 +27,7 @@ extern int dpaa_qdma_logtype; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA_QDMA_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "dpaa_qdma: " fmt "\n", ## args) + RTE_LOG_DP(level, DPAA_QDMA, "dpaa_qdma: " fmt "\n", ## args) #define DPAA_QDMA_DP_DEBUG(fmt, args...) \ DPAA_QDMA_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/dma/dpaa2/dpaa2_qdma_logs.h b/drivers/dma/dpaa2/dpaa2_qdma_logs.h index a46b8f24b5..37a5a5c6e9 100644 --- a/drivers/dma/dpaa2/dpaa2_qdma_logs.h +++ b/drivers/dma/dpaa2/dpaa2_qdma_logs.h @@ -10,6 +10,7 @@ extern "C" { #endif extern int dpaa2_qdma_logtype; +#define RTE_LOGTYPE_DPAA2_QDMA dpaa2_qdma_logtype #define DPAA2_QDMA_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_qdma_logtype, "dpaa2_qdma: " \ @@ -30,7 +31,7 @@ extern int dpaa2_qdma_logtype; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_QDMA_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "dpaa2_qdma: " fmt "\n", ## args) + RTE_LOG_DP(level, DPAA2_QDMA, "dpaa2_qdma: " fmt "\n", ## args) #define DPAA2_QDMA_DP_DEBUG(fmt, args...) \ DPAA2_QDMA_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/event/dlb2/dlb2_log.h b/drivers/event/dlb2/dlb2_log.h index dc1481ef87..54d6a3011f 100644 --- a/drivers/event/dlb2/dlb2_log.h +++ b/drivers/event/dlb2/dlb2_log.h @@ -6,6 +6,7 @@ #define _DLB2_EVDEV_LOG_H_ extern int eventdev_dlb2_log_level; +#define RTE_LOGTYPE_EVENTDEV_DLB2_LOG_LEVEL eventdev_dlb2_log_level /* Dynamic logging */ #define DLB2_LOG_IMPL(level, fmt, args...) \ @@ -20,6 +21,6 @@ extern int eventdev_dlb2_log_level; /* remove debug logs at compile time unless actually debugging */ #define DLB2_LOG_DBG(fmt, args...) \ - RTE_LOG_DP(DEBUG, PMD, fmt, ## args) + RTE_LOG_DP(DEBUG, EVENTDEV_DLB2_LOG_LEVEL, fmt, ## args) #endif /* _DLB2_EVDEV_LOG_H_ */ diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h index 66c8c77274..ae221e7e15 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h +++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h @@ -6,6 +6,7 @@ #define _DPAA2_EVENTDEV_LOGS_H_ extern int dpaa2_logtype_event; +#define RTE_LOGTYPE_DPAA2_EVENT dpaa2_logtype_event #define DPAA2_EVENTDEV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "dpaa2_event: " \ @@ -26,7 +27,7 @@ extern int dpaa2_logtype_event; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_EVENTDEV_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA2_EVENT, fmt, ## args) #define DPAA2_EVENTDEV_DP_DEBUG(fmt, args...) \ DPAA2_EVENTDEV_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index 32639a3bfd..0b484b3d9c 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -38,6 +38,7 @@ struct dpaa_memseg_list rte_dpaa_memsegs struct dpaa_bp_info *rte_dpaa_bpid_info; RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_mempool, NOTICE); +#define RTE_LOGTYPE_DPAA_MEMPOOL dpaa_logtype_mempool static int dpaa_mbuf_create_pool(struct rte_mempool *mp) diff --git a/drivers/mempool/dpaa/dpaa_mempool.h b/drivers/mempool/dpaa/dpaa_mempool.h index 3f0eafa7dd..153fefd507 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.h +++ b/drivers/mempool/dpaa/dpaa_mempool.h @@ -67,7 +67,7 @@ extern struct dpaa_bp_info *rte_dpaa_bpid_info; #define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>") #define DPAA_MEMPOOL_DPDEBUG(fmt, args...) \ - RTE_LOG_DP(DEBUG, PMD, fmt, ## args) + RTE_LOG_DP(DEBUG, DPAA_MEMPOOL, fmt, ## args) #define DPAA_MEMPOOL_DEBUG(fmt, args...) \ DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args) #define DPAA_MEMPOOL_ERR(fmt, args...) \ diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h index 9862643196..fbc8cb30a2 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h @@ -6,6 +6,7 @@ #define _DPAA2_HW_MEMPOOL_LOGS_H_ extern int dpaa2_logtype_mempool; +#define RTE_LOGTYPE_DPAA2_MEMPOOL dpaa2_logtype_mempool #define DPAA2_MEMPOOL_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_logtype_mempool, \ @@ -25,7 +26,7 @@ extern int dpaa2_logtype_mempool; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_MEMPOOL_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA2_MEMPOOL, fmt, ## args) #define DPAA2_MEMPOOL_DP_DEBUG(fmt, args...) \ DPAA2_MEMPOOL_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/net/atlantic/atl_logs.h b/drivers/net/atlantic/atl_logs.h index e3dba334fe..14a7a1de1d 100644 --- a/drivers/net/atlantic/atl_logs.h +++ b/drivers/net/atlantic/atl_logs.h @@ -15,12 +15,13 @@ extern int atl_logtype_init; #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args) #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args) extern int atl_logtype_driver; +#define RTE_LOGTYPE_ATL_DRIVER atl_logtype_driver #define PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, atl_logtype_driver, "%s(): " fmt, \ __func__, ## args) diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h index 6e297c7a4a..574b720b30 100644 --- a/drivers/net/avp/avp_logs.h +++ b/drivers/net/avp/avp_logs.h @@ -9,19 +9,20 @@ #ifdef RTE_LIBRTE_AVP_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() rx: " fmt, __func__, ## args) + RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt, __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif #ifdef RTE_LIBRTE_AVP_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() tx: " fmt, __func__, ## args) + RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt, __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif extern int avp_logtype_driver; +#define RTE_LOGTYPE_AVP_DRIVER avp_logtype_driver #define PMD_DRV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, avp_logtype_driver, \ diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 0e01b1d4ba..61cc344176 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -1051,6 +1051,7 @@ extern const struct rte_flow_ops bnxt_flow_meter_ops; ((eth_dev)->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) extern int bnxt_logtype_driver; +#define RTE_LOGTYPE_BNXT bnxt_logtype_driver #define PMD_DRV_LOG_RAW(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, bnxt_logtype_driver, "%s(): " fmt, \ __func__, ## args) diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c index aa1b1ab8bb..775400f21c 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c @@ -357,7 +357,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq) if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)) nb_tx_pkts += txcmp->opaque; else - RTE_LOG_DP(ERR, PMD, + RTE_LOG_DP(ERR, BNXT, "Unhandled CMP type %02x\n", CMP_TYPE(txcmp)); raw_cons = NEXT_RAW_CMP(raw_cons); diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c index e99a547f58..8ef51ce79a 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c @@ -326,7 +326,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq) if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)) nb_tx_pkts += txcmp->opaque; else - RTE_LOG_DP(ERR, PMD, + RTE_LOG_DP(ERR, BNXT, "Unhandled CMP type %02x\n", CMP_TYPE(txcmp)); raw_cons = NEXT_RAW_CMP(raw_cons); diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 899986764f..04e74587cb 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -542,7 +542,7 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq) if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2) nb_tx_pkts += opaque; else - RTE_LOG_DP(ERR, PMD, + RTE_LOG_DP(ERR, BNXT, "Unhandled CMP type %02x\n", CMP_TYPE(txcmp)); raw_cons = NEXT_RAW_CMP(raw_cons); diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index 5b6802ece8..b6c61b8b6b 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -214,6 +214,7 @@ dpaa_rx_cb_atomic(void *event, /* PMD related logs */ extern int dpaa_logtype_pmd; +#define RTE_LOGTYPE_DPAA_PMD dpaa_logtype_pmd #define DPAA_PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \ @@ -232,6 +233,6 @@ extern int dpaa_logtype_pmd; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA_PMD, fmt, ## args) #endif diff --git a/drivers/net/dpaa2/dpaa2_pmd_logs.h b/drivers/net/dpaa2/dpaa2_pmd_logs.h index c47ba8e10b..af895a6b6e 100644 --- a/drivers/net/dpaa2/dpaa2_pmd_logs.h +++ b/drivers/net/dpaa2/dpaa2_pmd_logs.h @@ -6,6 +6,7 @@ #define _DPAA2_PMD_LOGS_H_ extern int dpaa2_logtype_pmd; +#define RTE_LOGTYPE_DPAA2_PMD dpaa2_logtype_pmd #define DPAA2_PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_logtype_pmd, "dpaa2_net: " \ @@ -28,7 +29,7 @@ extern int dpaa2_logtype_pmd; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_PMD_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, DPAA2_PMD, fmt, ## args) #define DPAA2_PMD_DP_DEBUG(fmt, args...) \ DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/net/enetc/enetc_logs.h b/drivers/net/enetc/enetc_logs.h index 0976d42deb..63f6ca4cf4 100644 --- a/drivers/net/enetc/enetc_logs.h +++ b/drivers/net/enetc/enetc_logs.h @@ -6,6 +6,7 @@ #define _ENETC_LOGS_H_ extern int enetc_logtype_pmd; +#define RTE_LOGTYPE_ENETC_PMD enetc_logtype_pmd #define ENETC_PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, enetc_logtype_pmd, "enetc_net: " \ @@ -30,7 +31,7 @@ extern int enetc_logtype_pmd; /* DP Logs, toggled out at compile time if level lower than current level */ #define ENETC_PMD_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, ENETC_PMD, fmt, ## args) #define ENETC_PMD_DP_DEBUG(fmt, args...) \ ENETC_PMD_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/net/enetfec/enet_pmd_logs.h b/drivers/net/enetfec/enet_pmd_logs.h index 72d1cb61c5..270981373f 100644 --- a/drivers/net/enetfec/enet_pmd_logs.h +++ b/drivers/net/enetfec/enet_pmd_logs.h @@ -8,6 +8,7 @@ #include extern int enetfec_logtype_pmd; +#define RTE_LOGTYPE_ENETFEC_PMD enetfec_logtype_pmd /* PMD related logs */ #define ENETFEC_PMD_LOG(level, fmt, args...) \ @@ -28,6 +29,6 @@ extern int enetfec_logtype_pmd; /* DP Logs, toggled out at compile time if level lower than current level */ #define ENETFEC_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, ENETFEC_PMD, fmt, ## args) #endif /* _ENETFEC_LOGS_H_ */ diff --git a/drivers/net/igc/igc_logs.h b/drivers/net/igc/igc_logs.h index 11071a32b5..cca5389eff 100644 --- a/drivers/net/igc/igc_logs.h +++ b/drivers/net/igc/igc_logs.h @@ -13,6 +13,7 @@ extern "C" { extern int igc_logtype_init; extern int igc_logtype_driver; +#define RTE_LOGTYPE_IGC_DRIVER igc_logtype_driver #define PMD_INIT_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, igc_logtype_init, \ @@ -22,14 +23,14 @@ extern int igc_logtype_driver; #ifdef RTE_ETHDEV_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while (0) #endif #ifdef RTE_ETHDEV_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while (0) #endif diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h index 6836872dc2..6d4770dc3e 100644 --- a/drivers/net/mana/mana.h +++ b/drivers/net/mana/mana.h @@ -460,6 +460,7 @@ struct mana_rxq { }; extern int mana_logtype_driver; +#define RTE_LOGTYPE_MANA_DRIVER mana_logtype_driver extern int mana_logtype_init; #define DRV_LOG(level, fmt, args...) \ @@ -467,7 +468,7 @@ extern int mana_logtype_init; __func__, ## args) #define DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt "\n", ## args) + RTE_LOG_DP(level, MANA_DRIVER, fmt "\n", ## args) #define PMD_INIT_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, mana_logtype_init, "%s(): " fmt "\n",\ diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h index 82e57520d3..d5074b74e4 100644 --- a/drivers/net/octeon_ep/otx_ep_common.h +++ b/drivers/net/octeon_ep/otx_ep_common.h @@ -598,4 +598,6 @@ int otx_ep_delete_oqs(struct otx_ep_device *otx_ep, uint32_t oq_no); #define PCI_VENDOR_ID_CAVIUM 0x177D extern int otx_net_ep_logtype; +#define RTE_LOGTYPE_OTX_NET_EP otx_net_ep_logtype + #endif /* _OTX_EP_COMMON_H_ */ diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c index c421ef0a1c..a6a71fdbfd 100644 --- a/drivers/net/octeon_ep/otx_ep_rxtx.c +++ b/drivers/net/octeon_ep/otx_ep_rxtx.c @@ -884,7 +884,7 @@ otx_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) next_fetch = (pkts == new_pkts - 1) ? 0 : 1; oq_pkt = otx_ep_droq_read_packet(otx_ep, droq, next_fetch); if (!oq_pkt) { - RTE_LOG_DP(ERR, PMD, + RTE_LOG_DP(ERR, OTX_NET_EP, "DROQ read pkt failed pending %" PRIu64 "last_pkt_count %" PRIu64 "new_pkts %d.\n", droq->pkts_pending, droq->last_pkt_count, diff --git a/drivers/net/octeontx/octeontx_logs.h b/drivers/net/octeontx/octeontx_logs.h index dec8042c67..b58f296478 100644 --- a/drivers/net/octeontx/octeontx_logs.h +++ b/drivers/net/octeontx/octeontx_logs.h @@ -20,7 +20,7 @@ "%s(): " fmt "\n", __func__, ## args) #define octeontx_log_info(fmt, args...) \ - RTE_LOG(INFO, PMD, fmt "\n", ## args) + RTE_LOG(INFO, OTX_NET_DRIVER, fmt "\n", ## args) #define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__) #define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__) @@ -31,6 +31,7 @@ extern int otx_net_logtype_init; extern int otx_net_logtype_driver; +#define RTE_LOGTYPE_OTX_NET_DRIVER otx_net_logtype_driver extern int otx_net_logtype_mbox; #endif /* __OCTEONTX_LOGS_H__*/ diff --git a/drivers/net/pfe/pfe_logs.h b/drivers/net/pfe/pfe_logs.h index 58d5e8e7cf..369a50bec5 100644 --- a/drivers/net/pfe/pfe_logs.h +++ b/drivers/net/pfe/pfe_logs.h @@ -6,6 +6,7 @@ #define _PFE_LOGS_H_ extern int pfe_logtype_pmd; +#define RTE_LOGTYPE_PFE_PMD pfe_logtype_pmd /* PMD related logs */ #define PFE_PMD_LOG(level, fmt, args...) \ @@ -26,6 +27,6 @@ extern int pfe_logtype_pmd; /* DP Logs, toggled out at compile time if level lower than current level */ #define PFE_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, fmt, ## args) + RTE_LOG_DP(level, PFE_PMD, fmt, ## args) #endif /* _PFE_LOGS_H_ */ diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h index 3187d97bb7..f67052d106 100644 --- a/drivers/net/qede/qede_logs.h +++ b/drivers/net/qede/qede_logs.h @@ -8,6 +8,7 @@ #define _QEDE_LOGS_H_ extern int qede_logtype_driver; +#define RTE_LOGTYPE_QEDE_DRIVER qede_logtype_driver #define DP_ERR(p_dev, fmt, ...) \ rte_log(RTE_LOG_ERR, qede_logtype_driver, \ @@ -59,7 +60,7 @@ extern int qede_logtype_init; #ifdef RTE_LIBRTE_QEDE_DEBUG_TX #define PMD_TX_LOG(level, q, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \ + RTE_LOG(level, QEDE_DRIVER, "%s(): port=%u queue=%u " fmt "\n", \ __func__, q->port_id, q->queue_id, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while (0) @@ -67,7 +68,7 @@ extern int qede_logtype_init; #ifdef RTE_LIBRTE_QEDE_DEBUG_RX #define PMD_RX_LOG(level, q, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \ + RTE_LOG(level, QEDE_DRIVER, "%s(): port=%u queue=%u " fmt "\n", \ __func__, q->port_id, q->queue_id, ## args) #else #define PMD_RX_LOG(level, q, fmt, args...) do { } while (0) diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h index 9b1b1defc5..01911514bd 100644 --- a/drivers/net/virtio/virtio_logs.h +++ b/drivers/net/virtio/virtio_logs.h @@ -16,19 +16,20 @@ extern int virtio_logtype_init; #ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args) + RTE_LOG(level, VIRTIO_DRIVER, "%s() rx: " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while(0) #endif #ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args) + RTE_LOG(level, VIRTIO_DRIVER, "%s() tx: " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while(0) #endif extern int virtio_logtype_driver; +#define RTE_LOGTYPE_VIRTIO_DRIVER virtio_logtype_driver #define PMD_DRV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, virtio_logtype_driver, \ "%s(): " fmt "\n", __func__, ## args) diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h index 74154e3a1a..e2127988f6 100644 --- a/drivers/net/vmxnet3/vmxnet3_logs.h +++ b/drivers/net/vmxnet3/vmxnet3_logs.h @@ -13,26 +13,27 @@ extern int vmxnet3_logtype_init; #ifdef RTE_LIBRTE_VMXNET3_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while(0) #endif #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while(0) #endif #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE #define PMD_TX_FREE_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args) #else #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0) #endif extern int vmxnet3_logtype_driver; +#define RTE_LOGTYPE_VMXNET3_DRIVER vmxnet3_logtype_driver #define PMD_DRV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \ "%s(): " fmt "\n", __func__, ## args) diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h index 8991e8327d..f5f2455413 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h @@ -10,6 +10,7 @@ extern "C" { #endif extern int dpaa2_cmdif_logtype; +#define RTE_LOGTYPE_DPAA2_CMDIF dpaa2_cmdif_logtype #define DPAA2_CMDIF_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, dpaa2_cmdif_logtype, "dpaa2_cmdif: " \ @@ -30,7 +31,7 @@ extern int dpaa2_cmdif_logtype; /* DP Logs, toggled out at compile time if level lower than current level */ #define DPAA2_CMDIF_DP_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "dpaa2_cmdif: " fmt "\n", ## args) + RTE_LOG_DP(level, DPAA2_CMDIF, "dpaa2_cmdif: " fmt "\n", ## args) #define DPAA2_CMDIF_DP_DEBUG(fmt, args...) \ DPAA2_CMDIF_DP_LOG(DEBUG, fmt, ## args) diff --git a/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h b/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h index 33041c907e..62c5666ca9 100644 --- a/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h +++ b/drivers/raw/ifpga/base/osdep_rte/osdep_generic.h @@ -16,8 +16,11 @@ #include #include +extern int ifpga_rawdev_logtype; +#define RTE_LOGTYPE_IFPGA_RAWDEV ifpga_rawdev_logtype + #define dev_printf(level, fmt, args...) \ - RTE_LOG(level, PMD, "osdep_rte: " fmt, ## args) + RTE_LOG(level, IFPGA_RAWDEV, "osdep_rte: " fmt, ## args) #define osdep_panic(...) rte_panic(...) diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c index 53e982a52e..8479172bfa 100644 --- a/drivers/vdpa/ifc/base/ifcvf.c +++ b/drivers/vdpa/ifc/base/ifcvf.c @@ -224,10 +224,10 @@ ifcvf_enable_mq(struct ifcvf_hw *hw) if (mq_cfg) { if (hw->device_type == IFCVF_BLK) { *(u32 *)mq_cfg = nr_queue; - RTE_LOG(INFO, PMD, "%d queues are enabled\n", nr_queue); + RTE_LOG(INFO, IFCVF_VDPA, "%d queues are enabled\n", nr_queue); } else { *(u32 *)mq_cfg = nr_queue / 2; - RTE_LOG(INFO, PMD, "%d queue pairs are enabled\n", + RTE_LOG(INFO, IFCVF_VDPA, "%d queue pairs are enabled\n", nr_queue / 2); } } @@ -246,7 +246,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i) cfg = hw->common_cfg; if (!cfg) { - RTE_LOG(ERR, PMD, "common_cfg in HW is NULL.\n"); + RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n"); return -1; } @@ -258,7 +258,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i) IFCVF_WRITE_REG16(i + 1, &cfg->queue_msix_vector); msix_vector = IFCVF_READ_REG16(&cfg->queue_msix_vector); if (msix_vector == IFCVF_MSI_NO_VECTOR) { - RTE_LOG(ERR, PMD, "queue %d, msix vec alloc failed\n", + RTE_LOG(ERR, IFCVF_VDPA, "queue %d, msix vec alloc failed\n", i); return -1; } @@ -307,7 +307,7 @@ ifcvf_disable_vring_hw(struct ifcvf_hw *hw, int i) cfg = hw->common_cfg; if (!cfg) { - RTE_LOG(ERR, PMD, "common_cfg in HW is NULL.\n"); + RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n"); return; } diff --git a/drivers/vdpa/ifc/base/ifcvf_osdep.h b/drivers/vdpa/ifc/base/ifcvf_osdep.h index dd2ff08f77..ba7d684c25 100644 --- a/drivers/vdpa/ifc/base/ifcvf_osdep.h +++ b/drivers/vdpa/ifc/base/ifcvf_osdep.h @@ -13,8 +13,11 @@ #include #include -#define WARNINGOUT(S, args...) RTE_LOG(WARNING, PMD, S, ##args) -#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args) +extern int ifcvf_vdpa_logtype; +#define RTE_LOGTYPE_IFCVF_VDPA ifcvf_vdpa_logtype + +#define WARNINGOUT(S, args...) RTE_LOG(WARNING, IFCVF_VDPA, S, ##args) +#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, IFCVF_VDPA, S, ##args) #define STATIC static #define msec_delay(x) rte_delay_us_sleep(1000 * (x)) -- 2.43.0