DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] log: deduce log type from filename
@ 2021-04-09 12:43 David Marchand
  2021-04-09 13:01 ` Bruce Richardson
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: David Marchand @ 2021-04-09 12:43 UTC (permalink / raw)
  To: dev; +Cc: thomas, andrew.rybchenko

Let's try to enforce the convention where drivers use a pmd. logtype
with their class reflected in it and libraries use a lib. logtype.

RTE_LOG_REGISTER now interprets the log type name:
- if none or a name starting with a . is passed, then the default logtype
  is used as a prefix,
- else the name is used as is to deal with components that do not comply
  with the current convention,

Note: achieved with below command (+ manual edit on crypto/virtio,
compress/mlx5 and regex/mlx5).
$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    pattern=pmd.$class.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/librte_};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
This is an alternative to the devtools check I had proposed [1].
This can be seen as a RFC, but if people are happy with it, I don't see
much to add.

1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796

---
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/common/iavf/iavf_impl.c               |  2 +-
 drivers/common/mlx5/mlx5_common.c             |  2 +-
 drivers/compress/isal/isal_compress_pmd.c     |  2 +-
 drivers/compress/mlx5/mlx5_compress.c         |  3 +-
 drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
 drivers/compress/zlib/zlib_pmd.c              |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/event/dlb/dlb.c                       |  2 +-
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/octeontx/timvf_evdev.c          |  2 +-
 drivers/event/opdl/opdl_evdev.c               |  2 +-
 drivers/event/sw/sw_evdev.c                   |  2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |  2 +-
 drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_ethdev.c                  |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  4 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |  2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/e1000/e1000_logs.c                | 10 ++---
 drivers/net/ena/ena_ethdev.c                  | 12 +++---
 drivers/net/enetc/enetc_ethdev.c              |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/failsafe/failsafe.c               |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              | 10 ++---
 drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  4 +-
 drivers/net/i40e/i40e_ethdev.c                | 10 ++---
 drivers/net/iavf/iavf_ethdev.c                | 10 ++---
 drivers/net/ice/ice_ethdev.c                  | 10 ++---
 drivers/net/igc/igc_logs.c                    |  4 +-
 drivers/net/ionic/ionic_ethdev.c              |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              | 10 ++---
 drivers/net/kni/rte_eth_kni.c                 |  2 +-
 drivers/net/liquidio/lio_ethdev.c             |  4 +-
 drivers/net/memif/rte_eth_memif.c             |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  4 +-
 drivers/net/nfp/nfp_net.c                     |  4 +-
 drivers/net/null/rte_eth_null.c               |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
 drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
 drivers/net/pcap/rte_eth_pcap.c               |  2 +-
 drivers/net/pfe/pfe_ethdev.c                  |  2 +-
 drivers/net/qede/qede_ethdev.c                |  4 +-
 drivers/net/ring/rte_eth_ring.c               |  2 +-
 drivers/net/softnic/rte_eth_softnic.c         |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
 drivers/net/tap/rte_eth_tap.c                 |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
 drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/vhost/rte_eth_vhost.c             |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
 drivers/raw/ioat/ioat_rawdev.c                |  2 +-
 drivers/raw/ntb/ntb.c                         |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/regex/mlx5/mlx5_regex.c               |  3 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
 lib/librte_bbdev/rte_bbdev.c                  |  2 +-
 lib/librte_bpf/bpf.c                          |  2 +-
 lib/librte_cfgfile/rte_cfgfile.c              |  2 +-
 lib/librte_compressdev/rte_compressdev.c      |  2 +-
 lib/librte_eal/common/eal_common_log.c        | 39 +++++++++++++++++
 lib/librte_eal/include/rte_log.h              | 43 ++++++++++++++++---
 lib/librte_eal/version.map                    |  1 +
 lib/librte_ethdev/rte_ethdev.c                |  2 +-
 lib/librte_eventdev/rte_event_timer_adapter.c |  6 +--
 lib/librte_flow_classify/rte_flow_classify.c  |  2 +-
 lib/librte_graph/graph.c                      |  2 +-
 lib/librte_member/rte_member.c                |  2 +-
 lib/librte_metrics/rte_metrics_telemetry.c    |  2 +-
 lib/librte_net/rte_net_crc.c                  |  2 +-
 lib/librte_node/log.c                         |  2 +-
 lib/librte_pdump/rte_pdump.c                  |  2 +-
 lib/librte_rawdev/rte_rawdev.c                |  2 +-
 lib/librte_rcu/rte_rcu_qsbr.c                 |  2 +-
 lib/librte_stack/rte_stack.c                  |  2 +-
 lib/librte_vhost/vhost.c                      |  4 +-
 109 files changed, 243 insertions(+), 174 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 91bee65e7b..fb315f02e9 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -460,4 +460,4 @@ dpaax_handle_memevents(void)
 					       dpaax_memevent_cb, NULL);
 }
 
-RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
+RTE_LOG_REGISTER(dpaax_logger, , ERR);
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index 08147314c6..552f22069f 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -85,4 +85,4 @@ iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
 	return IAVF_SUCCESS;
 }
 
-RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
+RTE_LOG_REGISTER(iavf_common_logger, , NOTICE);
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index f92f05bda5..f4d1b27097 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -39,7 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_common_logtype, , NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0ecca12a83..79d339bd14 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -750,4 +750,4 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
-RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
+RTE_LOG_REGISTER(isal_logtype_driver, , INFO);
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index ec3c237512..5f96ce7fc1 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -23,7 +23,6 @@
 #include "mlx5_compress_utils.h"
 
 #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
-#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
 #define MLX5_COMPRESS_MAX_QPS 1024
 #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
 
@@ -901,7 +900,7 @@ RTE_INIT(rte_mlx5_compress_init)
 		mlx5_pci_driver_register(&mlx5_compress_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER(mlx5_compress_logtype, , NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index bee90fc7cd..8db75234bf 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -646,4 +646,4 @@ static struct rte_pci_driver octtx_zip_pmd = {
 
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
-RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
+RTE_LOG_REGISTER(octtx_zip_logtype_driver, , INFO);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 8a79d15c98..4440085af1 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -426,4 +426,4 @@ static struct rte_vdev_driver zlib_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
-RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
+RTE_LOG_REGISTER(zlib_logtype_driver, , INFO);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..7a43ed49d9 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -975,4 +975,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
+RTE_LOG_REGISTER(aesni_gcm_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..713f4ab3d9 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -2229,4 +2229,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
+RTE_LOG_REGISTER(aesni_mb_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3f6cb66ba2..4d85c5e4f0 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -864,7 +864,7 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
-RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+RTE_LOG_REGISTER(crypto_armv8_log_type, , ERR);
 
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 9faf12f238..2605e5dd9e 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -21,5 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
-RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
+RTE_LOG_REGISTER(bcmfs_conf_logtype, .config, NOTICE)
+RTE_LOG_REGISTER(bcmfs_dp_logtype, .fp, NOTICE)
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 5ff1b5c562..0e64ae88de 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -639,4 +639,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
 
-RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
+RTE_LOG_REGISTER(kasumi_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..f93b90c0d8 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -1019,4 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
+RTE_LOG_REGISTER(mrvl_logtype_driver, , NOTICE);
diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
index 26395159aa..635c7efa47 100644
--- a/drivers/crypto/nitrox/nitrox_logs.c
+++ b/drivers/crypto/nitrox/nitrox_logs.c
@@ -4,4 +4,4 @@
 
 #include <rte_log.h>
 
-RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
+RTE_LOG_REGISTER(nitrox_logtype, , NOTICE);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index e04042e757..6f717c3fbc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -248,4 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
+RTE_LOG_REGISTER(null_logtype_driver, , INFO);
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..ab23fdb4df 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -111,4 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
+RTE_LOG_REGISTER(otx_cpt_logtype, , NOTICE);
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index e0a559b663..edbecf3867 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -176,4 +176,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
+RTE_LOG_REGISTER(otx2_cpt_logtype, , NOTICE);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..4dadc0d150 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2278,4 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
+RTE_LOG_REGISTER(openssl_logtype_driver, , INFO);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 9367a0e915..4db1c97202 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -577,4 +577,4 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
 }
 
 
-RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
+RTE_LOG_REGISTER(scheduler_logtype_driver, , INFO);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 962868e1fc..e106680104 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -653,4 +653,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
+RTE_LOG_REGISTER(snow3g_logtype_driver, , INFO);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1822f21744..2491f94658 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1483,10 +1483,8 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
 RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
 	rte_virtio_crypto_driver.driver,
 	cryptodev_virtio_driver_id);
-RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
-		 NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
-		 NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_session, .session, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_rx, .rx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_tx, .tx, NOTICE);
+RTE_LOG_REGISTER(virtio_crypto_logtype_driver, .driver, NOTICE);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..0cc4dadd46 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -580,4 +580,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
+RTE_LOG_REGISTER(zuc_logtype_driver, , INFO);
diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index 60084ced3b..e621253724 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -4082,4 +4082,4 @@ dlb_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb_log_level, pmd.event.dlb, NOTICE);
+RTE_LOG_REGISTER(eventdev_dlb_log_level, , NOTICE);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index fb5ff012a4..738b5a1a6b 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4032,4 +4032,4 @@ dlb2_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
+RTE_LOG_REGISTER(eventdev_dlb2_log_level, , NOTICE);
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 460375ca30..d8fd731f27 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -46,7 +46,7 @@
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
-RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
+RTE_LOG_REGISTER(dpaa_logtype_eventdev, , NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index e4fa3a2e46..abf1e19111 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1206,4 +1206,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
+RTE_LOG_REGISTER(dpaa2_logtype_event, , NOTICE);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 17325bbf6a..70d98e763f 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -22,7 +22,7 @@
 
 static uint8_t timvf_enable_stats;
 
-RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
+RTE_LOG_REGISTER(otx_logtype_ssovf, , NOTICE);
 
 /* SSOPF Mailbox messages */
 
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 8af4d6e37f..5dd8320c66 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -5,7 +5,7 @@
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
 
-RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
+RTE_LOG_REGISTER(otx_logtype_timvf, .timer, NOTICE);
 
 static struct rte_eventdev *event_dev;
 
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3050578ffd..c1e890a3ea 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -755,7 +755,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
 	.remove = opdl_remove
 };
 
-RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
+RTE_LOG_REGISTER(opdl_logtype_driver, .driver, INFO);
 
 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 0d8013adf7..e9a05b5b5a 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1151,4 +1151,4 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
 		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
 		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
 		REFIL_ONCE_ARG "=<int>");
-RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
+RTE_LOG_REGISTER(eventdev_sw_log_level, , NOTICE);
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 94dc5cd815..acbc93d760 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -105,7 +105,7 @@ struct octeontx_fpadev {
 
 static struct octeontx_fpadev fpadev;
 
-RTE_LOG_REGISTER(octeontx_logtype_fpavf, pmd.mempool.octeontx, NOTICE);
+RTE_LOG_REGISTER(octeontx_logtype_fpavf, , NOTICE);
 
 /* lock is taken by caller */
 static int
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a04f7c773a..bd0a21ee8e 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -97,7 +97,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(af_packet_logtype, pmd.net.af_packet, NOTICE);
+RTE_LOG_REGISTER(af_packet_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 6e44a21c64..683d9a4854 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -61,7 +61,7 @@
 #define PF_XDP AF_XDP
 #endif
 
-RTE_LOG_REGISTER(af_xdp_logtype, pmd.net.af_xdp, NOTICE);
+RTE_LOG_REGISTER(af_xdp_logtype, , NOTICE);
 
 #define AF_XDP_LOG(level, fmt, args...)			\
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 9dea5facb4..5afd08d46f 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -1015,4 +1015,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ark,
 			      ARK_PKTGEN_ARG "=<filename> "
 			      ARK_PKTCHKR_ARG "=<filename> "
 			      ARK_PKTDIR_ARG "=<bitmap>");
-RTE_LOG_REGISTER(ark_logtype, pmd.net.ark, NOTICE);
+RTE_LOG_REGISTER(ark_logtype, , NOTICE);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 473f6209f6..8e392664d5 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1914,5 +1914,5 @@ is_atlantic_supported(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_atlantic, rte_atl_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_atlantic, pci_id_atl_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_atlantic, "* igb_uio | uio_pci_generic");
-RTE_LOG_REGISTER(atl_logtype_init, pmd.net.atlantic.init, NOTICE);
-RTE_LOG_REGISTER(atl_logtype_driver, pmd.net.atlantic.driver, NOTICE);
+RTE_LOG_REGISTER(atl_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(atl_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 566a3606a2..06c17fc736 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2309,4 +2309,4 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_LOG_REGISTER(avp_logtype_driver, pmd.net.avp.driver, NOTICE);
+RTE_LOG_REGISTER(avp_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index ebe9a2876d..705672333e 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2377,5 +2377,5 @@ static struct rte_pci_driver rte_axgbe_pmd = {
 RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(axgbe_logtype_init, pmd.net.axgbe.init, NOTICE);
-RTE_LOG_REGISTER(axgbe_logtype_driver, pmd.net.axgbe.driver, NOTICE);
+RTE_LOG_REGISTER(axgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(axgbe_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 50db70dfcd..0403d8375c 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -817,5 +817,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(bnx2x_logtype_init, pmd.net.bnx2x.init, NOTICE);
-RTE_LOG_REGISTER(bnx2x_logtype_driver, pmd.net.bnx2x.driver, NOTICE);
+RTE_LOG_REGISTER(bnx2x_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(bnx2x_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2bd889b15b..b03aa561f2 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6141,7 +6141,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
 	return is_device_supported(dev, &bnxt_rte_pmd);
 }
 
-RTE_LOG_REGISTER(bnxt_logtype_driver, pmd.net.bnxt.driver, NOTICE);
+RTE_LOG_REGISTER(bnxt_logtype_driver, .driver, NOTICE);
 RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2e9cea5b8e..23446c1db0 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3775,4 +3775,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"up_delay=<int> "
 	"down_delay=<int>");
 
-RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);
+RTE_LOG_REGISTER(bond_logtype, , NOTICE);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index e8a2de3ef3..6f915f01cc 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1474,5 +1474,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_cxgbe,
 			      CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
 			      CXGBE_DEVARG_PF_FILTER_MODE "=<uint32> "
 			      CXGBE_DEVARG_PF_FILTER_MASK "=<uint32> ");
-RTE_LOG_REGISTER(cxgbe_logtype, pmd.net.cxgbe, NOTICE);
-RTE_LOG_REGISTER(cxgbe_mbox_logtype, pmd.net.cxgbe.mbox, NOTICE);
+RTE_LOG_REGISTER(cxgbe_logtype, , NOTICE);
+RTE_LOG_REGISTER(cxgbe_mbox_logtype, .mbox, NOTICE);
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 176943a8ea..63efdb7b8f 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2309,4 +2309,4 @@ static struct rte_dpaa_driver rte_dpaa_pmd = {
 };
 
 RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
-RTE_LOG_REGISTER(dpaa_logtype_pmd, pmd.net.dpaa, NOTICE);
+RTE_LOG_REGISTER(dpaa_logtype_pmd, , NOTICE);
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 9011dcfc12..b95ffb95c3 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2893,4 +2893,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_dpaa2,
 		DRIVER_NO_PREFETCH_MODE "=<int>"
 		DRIVER_TX_CONF "=<int>"
 		DRIVER_ERROR_QUEUE "=<int>");
-RTE_LOG_REGISTER(dpaa2_logtype_pmd, pmd.net.dpaa2, NOTICE);
+RTE_LOG_REGISTER(dpaa2_logtype_pmd, , NOTICE);
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index d9b8a4672f..41e10b50ce 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -4,14 +4,14 @@
 
 #include "e1000_logs.h"
 
-RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
-RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
+RTE_LOG_REGISTER(e1000_logtype_init, .init, NOTICE)
+RTE_LOG_REGISTER(e1000_logtype_driver, .driver, NOTICE)
 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
-RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_rx, .rx, DEBUG)
 #endif
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX
-RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_tx, .tx, DEBUG)
 #endif
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE
-RTE_LOG_REGISTER(e1000_logtype_tx_free, pmd.net.e1000.tx_free, DEBUG)
+RTE_LOG_REGISTER(e1000_logtype_tx_free, .tx_free, DEBUG)
 #endif
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9aa51c9dcf..cec64760c5 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2924,19 +2924,19 @@ RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ena, ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>");
-RTE_LOG_REGISTER(ena_logtype_init, pmd.net.ena.init, NOTICE);
-RTE_LOG_REGISTER(ena_logtype_driver, pmd.net.ena.driver, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
-RTE_LOG_REGISTER(ena_logtype_rx, pmd.net.ena.rx, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_rx, .rx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX
-RTE_LOG_REGISTER(ena_logtype_tx, pmd.net.ena.tx, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_tx, .tx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ena_logtype_tx_free, pmd.net.ena.tx_free, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_tx_free, .tx_free, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
-RTE_LOG_REGISTER(ena_logtype_com, pmd.net.ena.com, NOTICE);
+RTE_LOG_REGISTER(ena_logtype_com, .com, NOTICE);
 #endif
 
 /******************************************************************************
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 0b45168c60..e249d74573 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -960,4 +960,4 @@ static struct rte_pci_driver rte_enetc_pmd = {
 RTE_PMD_REGISTER_PCI(net_enetc, rte_enetc_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_enetc, pci_id_enetc_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_enetc, "* vfio-pci");
-RTE_LOG_REGISTER(enetc_logtype_pmd, pmd.net.enetc, NOTICE);
+RTE_LOG_REGISTER(enetc_logtype_pmd, , NOTICE);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index d91c2cdc8c..058af199ea 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -71,7 +71,7 @@ static const struct vic_speed_capa {
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
-RTE_LOG_REGISTER(enic_pmd_logtype, pmd.net.enic, INFO);
+RTE_LOG_REGISTER(enic_pmd_logtype, , INFO);
 
 static int
 enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index e3bda0df2b..eee921e6fb 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -391,4 +391,4 @@ static struct rte_vdev_driver failsafe_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_LOG_REGISTER(failsafe_logtype, pmd.net.failsafe, NOTICE)
+RTE_LOG_REGISTER(failsafe_logtype, , NOTICE)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index fd471c415e..d4ca2d414f 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3285,14 +3285,14 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE);
-RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE);
+RTE_LOG_REGISTER(fm10k_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(fm10k_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
-RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX
-RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE
-RTE_LOG_REGISTER(fm10k_logtype_tx_free, pmd.net.fm10k.tx_free, DEBUG);
+RTE_LOG_REGISTER(fm10k_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b5a36a863b..4b6402e42d 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3266,4 +3266,4 @@ static struct rte_pci_driver rte_hinic_pmd = {
 
 RTE_PMD_REGISTER_PCI(net_hinic, rte_hinic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_hinic, pci_id_hinic_map);
-RTE_LOG_REGISTER(hinic_logtype, pmd.net.hinic, INFO);
+RTE_LOG_REGISTER(hinic_logtype, , INFO);
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9c718082b0..90581fe8e0 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6866,5 +6866,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_hns3, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_hns3,
 		HNS3_DEVARG_RX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_TX_FUNC_HINT "=vec|sve|simple|common ");
-RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
-RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
+RTE_LOG_REGISTER(hns3_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(hns3_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index fcf150e127..9e530890ff 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12446,16 +12446,16 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
 	return ret;
 }
 
-RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
-RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+RTE_LOG_REGISTER(i40e_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(i40e_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_I40E_DEBUG_RX
-RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_I40E_DEBUG_TX
-RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE
-RTE_LOG_REGISTER(i40e_logtype_tx_free, pmd.net.i40e.tx_free, DEBUG);
+RTE_LOG_REGISTER(i40e_logtype_tx_free, .tx_free, DEBUG);
 #endif
 
 RTE_PMD_REGISTER_PARAM_STRING(net_i40e,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 869c4a1988..1a894e8ed6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2350,14 +2350,14 @@ RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf");
-RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
-RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
+RTE_LOG_REGISTER(iavf_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(iavf_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_IAVF_DEBUG_RX
-RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX
-RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX_FREE
-RTE_LOG_REGISTER(iavf_logtype_tx_free, pmd.net.iavf.tx_free, DEBUG);
+RTE_LOG_REGISTER(iavf_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f0dc543575..9c575af45b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5358,14 +5358,14 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
 			      ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
 
-RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE);
-RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE);
+RTE_LOG_REGISTER(ice_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ice_logtype_driver, .driver, NOTICE);
 #ifdef RTE_LIBRTE_ICE_DEBUG_RX
-RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_ICE_DEBUG_TX
-RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_ICE_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ice_logtype_tx_free, pmd.net.ice.tx_free, DEBUG);
+RTE_LOG_REGISTER(ice_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/igc/igc_logs.c b/drivers/net/igc/igc_logs.c
index 2d458d7fb6..53eb977ab0 100644
--- a/drivers/net/igc/igc_logs.c
+++ b/drivers/net/igc/igc_logs.c
@@ -6,5 +6,5 @@
 
 #include "igc_logs.h"
 
-RTE_LOG_REGISTER(igc_logtype_init, pmd.net.igc.init, INFO);
-RTE_LOG_REGISTER(igc_logtype_driver, pmd.net.igc.driver, INFO);
+RTE_LOG_REGISTER(igc_logtype_init, .init, INFO);
+RTE_LOG_REGISTER(igc_logtype_driver, .driver, INFO);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index cffe899c07..f8954608ea 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1293,4 +1293,4 @@ static struct rte_pci_driver rte_ionic_pmd = {
 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ionic_logtype, pmd.net.ionic, NOTICE);
+RTE_LOG_REGISTER(ionic_logtype, , NOTICE);
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index e83bd92bac..bab40d999b 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -583,4 +583,4 @@ static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.net.ipn3ke, NOTICE);
+RTE_LOG_REGISTER(ipn3ke_afu_logtype, , NOTICE);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 31faff066c..05e882b5f6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8449,15 +8449,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe_vf,
 			      IXGBEVF_DEVARG_PFLINK_FULLCHK "=<0|1>");
 
-RTE_LOG_REGISTER(ixgbe_logtype_init, pmd.net.ixgbe.init, NOTICE);
-RTE_LOG_REGISTER(ixgbe_logtype_driver, pmd.net.ixgbe.driver, NOTICE);
+RTE_LOG_REGISTER(ixgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(ixgbe_logtype_driver, .driver, NOTICE);
 
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
-RTE_LOG_REGISTER(ixgbe_logtype_rx, pmd.net.ixgbe.rx, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
-RTE_LOG_REGISTER(ixgbe_logtype_tx, pmd.net.ixgbe.tx, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_tx, .tx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ixgbe_logtype_tx_free, pmd.net.ixgbe.tx_free, DEBUG);
+RTE_LOG_REGISTER(ixgbe_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 9ce74e549b..220468ab9d 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -68,7 +68,7 @@ static const struct rte_eth_link pmd_link = {
 };
 static int is_kni_initialized;
 
-RTE_LOG_REGISTER(eth_kni_logtype, pmd.net.kni, NOTICE);
+RTE_LOG_REGISTER(eth_kni_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_kni_logtype, \
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 0b189d5d15..712caf882e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2168,5 +2168,5 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(lio_logtype_init, pmd.net.liquidio.init, NOTICE);
-RTE_LOG_REGISTER(lio_logtype_driver, pmd.net.liquidio.driver, NOTICE);
+RTE_LOG_REGISTER(lio_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(lio_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7a..262ef018ac 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1878,4 +1878,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_memif,
 			      ETH_MEMIF_ZC_ARG "=yes|no"
 			      ETH_MEMIF_SECRET_ARG "=<string>");
 
-RTE_LOG_REGISTER(memif_logtype, pmd.net.memif, NOTICE);
+RTE_LOG_REGISTER(memif_logtype, , NOTICE);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d048d21033..4925d37fb3 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1319,7 +1319,7 @@ mlx4_glue_init(void)
 #endif
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE)
+RTE_LOG_REGISTER(mlx4_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 3538cc8c20..2491761ec8 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2249,7 +2249,7 @@ static struct mlx5_pci_driver mlx5_driver = {
 };
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index b0940b4462..d16ff656ef 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -987,4 +987,4 @@ static struct rte_vdev_driver pmd_mvneta_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
-RTE_LOG_REGISTER(mvneta_logtype, pmd.net.mvneta, NOTICE);
+RTE_LOG_REGISTER(mvneta_logtype, , NOTICE);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1d41788974..ff180a7682 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3309,4 +3309,4 @@ static struct rte_vdev_driver pmd_mrvl_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
 RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_LOG_REGISTER(mrvl_logtype, pmd.net.mvpp2, NOTICE);
+RTE_LOG_REGISTER(mrvl_logtype, , NOTICE);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 04904b1514..21afcc8d19 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1294,8 +1294,8 @@ static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
-RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);
+RTE_LOG_REGISTER(hn_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(hn_logtype_driver, .driver, NOTICE);
 RTE_PMD_REGISTER_PARAM_STRING(net_netvsc,
 			      NETVSC_ARG_LATENCY "=<uint32> "
 			      NETVSC_ARG_RXBREAK "=<uint32> "
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 888324cd20..fd8e3b993e 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3847,8 +3847,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
-RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
+RTE_LOG_REGISTER(nfp_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(nfp_logtype_driver, .driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 32764e8f0e..c3e3b30592 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE);
+RTE_LOG_REGISTER(eth_null_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_null_logtype, \
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..92b79ba9c7 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -47,9 +47,9 @@ enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
-RTE_LOG_REGISTER(otx_net_logtype_mbox, pmd.net.octeontx.mbox, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_init, pmd.net.octeontx.init, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_driver, pmd.net.octeontx.driver, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_mbox, .mbox, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(otx_net_logtype_driver, .driver, NOTICE);
 
 /* Parse integer from integer argument */
 static int
diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeontx_ep/otx_ep_ethdev.c
index b35c88b347..2f577335d2 100644
--- a/drivers/net/octeontx_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeontx_ep/otx_ep_ethdev.c
@@ -463,4 +463,4 @@ static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER(otx_net_ep_logtype, , NOTICE);
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 28a5027315..0d00b73f71 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -148,7 +148,7 @@ static struct rte_eth_link pmd_link = {
 		.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_pcap_logtype, pmd.net.pcap, NOTICE);
+RTE_LOG_REGISTER(eth_pcap_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_pcap_logtype, \
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 8cf59e210d..5d23d8e1c3 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -1177,4 +1177,4 @@ struct rte_vdev_driver pmd_pfe_drv = {
 
 RTE_PMD_REGISTER_VDEV(PFE_NAME_PMD, pmd_pfe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(PFE_NAME_PMD, PFE_VDEV_GEM_ID_ARG "=<int> ");
-RTE_LOG_REGISTER(pfe_logtype_pmd, pmd.net.pfe, NOTICE);
+RTE_LOG_REGISTER(pfe_logtype_pmd, , NOTICE);
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 057a7b00e2..052bd24f97 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2895,5 +2895,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(qede_logtype_init, pmd.net.qede.init, NOTICE);
-RTE_LOG_REGISTER(qede_logtype_driver, pmd.net.qede.driver, NOTICE);
+RTE_LOG_REGISTER(qede_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(qede_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 02f6da2817..7ae0b69026 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -62,7 +62,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_ring_logtype, pmd.net.ring, NOTICE);
+RTE_LOG_REGISTER(eth_ring_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 0c2a79a7d2..79ab2b2788 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -80,7 +80,7 @@ static const struct softnic_conn_params conn_params_default = {
 	.msg_handle_arg = NULL,
 };
 
-RTE_LOG_REGISTER(pmd_softnic_logtype, pmd.net.softnic, NOTICE);
+RTE_LOG_REGISTER(pmd_softnic_logtype, , NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 6eaeadf1c8..f73f857b36 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1949,5 +1949,5 @@ RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver);
 RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
 RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
 	"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_LOG_REGISTER(szedata2_logtype_init, pmd.net.szedata2.init, NOTICE);
-RTE_LOG_REGISTER(szedata2_logtype_driver, pmd.net.szedata2.driver, NOTICE);
+RTE_LOG_REGISTER(szedata2_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(szedata2_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 68baa18523..5c9f395bc1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2568,4 +2568,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap,
 			      ETH_TAP_IFACE_ARG "=<string> "
 			      ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " "
 			      ETH_TAP_REMOTE_ARG "=<string>");
-RTE_LOG_REGISTER(tap_logtype, pmd.net.tap, NOTICE);
+RTE_LOG_REGISTER(tap_logtype, , NOTICE);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index c45d6e00a9..1b3bf7892e 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -51,9 +51,9 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 static int nicvf_vlan_offload_config(struct rte_eth_dev *dev, int mask);
 static int nicvf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
-RTE_LOG_REGISTER(nicvf_logtype_mbox, pmd.net.thunderx.mbox, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_init, pmd.net.thunderx.init, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_driver, pmd.net.thunderx.driver, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_mbox, .mbox, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(nicvf_logtype_driver, .driver, NOTICE);
 
 static void
 nicvf_link_status_update(struct nicvf *nic,
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 97796f040b..524e992d26 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -5337,17 +5337,17 @@ RTE_PMD_REGISTER_PARAM_STRING(net_txgbe,
 			      TXGBE_DEVARG_FFE_PRE "=<uint16>"
 			      TXGBE_DEVARG_FFE_POST "=<uint16>");
 
-RTE_LOG_REGISTER(txgbe_logtype_init, pmd.net.txgbe.init, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_driver, pmd.net.txgbe.driver, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_bp, pmd.net.txgbe.bp, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_driver, .driver, NOTICE);
+RTE_LOG_REGISTER(txgbe_logtype_bp, .bp, NOTICE);
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
-	RTE_LOG_REGISTER(txgbe_logtype_rx, pmd.net.txgbe.rx, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_rx, .rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
-	RTE_LOG_REGISTER(txgbe_logtype_tx, pmd.net.txgbe.tx, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_tx, .tx, DEBUG);
 #endif
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
-	RTE_LOG_REGISTER(txgbe_logtype_tx_free, pmd.net.txgbe.tx_free, DEBUG);
+	RTE_LOG_REGISTER(txgbe_logtype_tx_free, .tx_free, DEBUG);
 #endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c1b7099717..1d622dabd0 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -48,7 +48,7 @@
 #define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
 #define NETVSC_MAX_ROUTE_LINE_SIZE 300
 
-RTE_LOG_REGISTER(vdev_netvsc_logtype, pmd.net.vdev_netvsc, NOTICE);
+RTE_LOG_REGISTER(vdev_netvsc_logtype, , NOTICE);
 
 #define DRV_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, \
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index d198fc8a8e..d1e45cd9ba 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -19,7 +19,7 @@
 
 #include "rte_eth_vhost.h"
 
-RTE_LOG_REGISTER(vhost_logtype, pmd.net.vhost, NOTICE);
+RTE_LOG_REGISTER(vhost_logtype, , NOTICE);
 
 #define VHOST_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 090d94615e..67fc562f27 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2483,5 +2483,5 @@ __rte_unused uint8_t is_rx)
 	return 0;
 }
 
-RTE_LOG_REGISTER(virtio_logtype_init, pmd.net.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_logtype_driver, pmd.net.virtio.driver, NOTICE);
+RTE_LOG_REGISTER(virtio_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(virtio_logtype_driver, .driver, NOTICE);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1a313bfc4..07364016d2 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1491,5 +1491,5 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE);
-RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE);
+RTE_LOG_REGISTER(vmxnet3_logtype_init, .init, NOTICE);
+RTE_LOG_REGISTER(vmxnet3_logtype_driver, .driver, NOTICE);
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index d9a46ef915..5aaa282cbb 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1611,7 +1611,7 @@ static struct rte_pci_driver rte_ifpga_rawdev_pmd = {
 RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ifpga_rawdev_logtype, pmd.raw.ifpga, NOTICE);
+RTE_LOG_REGISTER(ifpga_rawdev_logtype, , NOTICE);
 
 static const char * const valid_args[] = {
 #define IFPGA_ARG_NAME         "ifpga"
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 15af07017c..759b7823f2 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,7 +28,7 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, pmd.raw.ioat, INFO);
+RTE_LOG_REGISTER(ioat_pmd_logtype, , INFO);
 
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6dd213ef6e..34173c90ed 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1534,4 +1534,4 @@ static struct rte_pci_driver rte_ntb_pmd = {
 RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map);
 RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ntb_logtype, pmd.raw.ntb, INFO);
+RTE_LOG_REGISTER(ntb_logtype, , INFO);
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 8896f0c9c5..32d984294d 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -768,4 +768,4 @@ static struct rte_vdev_driver skeleton_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_LOG_REGISTER(skeleton_pmd_logtype, pmd.raw.skeleton, INFO);
+RTE_LOG_REGISTER(skeleton_pmd_logtype, , INFO);
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index 82c485e50c..a4eacfc844 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -20,7 +20,6 @@
 #include "mlx5_rxp_csrs.h"
 
 #define MLX5_REGEX_DRIVER_NAME regex_mlx5
-#define MLX5_REGEX_LOG_NAME    pmd.regex.mlx5
 
 int mlx5_regex_logtype;
 
@@ -301,7 +300,7 @@ RTE_INIT(rte_mlx5_regex_init)
 		mlx5_pci_driver_register(&mlx5_regex_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER(mlx5_regex_logtype, , NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 898e50f807..197e2237f4 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -869,7 +869,7 @@ static struct mlx5_pci_driver mlx5_vdpa_driver = {
 	},
 };
 
-RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
+RTE_LOG_REGISTER(mlx5_vdpa_logtype, , NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
index 5ba891c232..107e421a67 100644
--- a/lib/librte_bbdev/rte_bbdev.c
+++ b/lib/librte_bbdev/rte_bbdev.c
@@ -29,7 +29,7 @@
 
 
 /* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER(bbdev_logtype, , NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/lib/librte_bpf/bpf.c b/lib/librte_bpf/bpf.c
index 8d15885bc4..a00685d73e 100644
--- a/lib/librte_bpf/bpf.c
+++ b/lib/librte_bpf/bpf.c
@@ -53,4 +53,4 @@ bpf_jit(struct rte_bpf *bpf)
 	return rc;
 }
 
-RTE_LOG_REGISTER(rte_bpf_logtype, lib.bpf, INFO);
+RTE_LOG_REGISTER(rte_bpf_logtype, , INFO);
diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
index 002022263e..cf5ffb263c 100644
--- a/lib/librte_cfgfile/rte_cfgfile.c
+++ b/lib/librte_cfgfile/rte_cfgfile.c
@@ -27,7 +27,7 @@ struct rte_cfgfile {
 	struct rte_cfgfile_section *sections;
 };
 
-RTE_LOG_REGISTER(cfgfile_logtype, lib.cfgfile, INFO);
+RTE_LOG_REGISTER(cfgfile_logtype, , INFO);
 
 #define CFG_LOG(level, fmt, args...)					\
 	rte_log(RTE_LOG_ ## level, cfgfile_logtype, "%s(): " fmt "\n",	\
diff --git a/lib/librte_compressdev/rte_compressdev.c b/lib/librte_compressdev/rte_compressdev.c
index 49a342f400..5ed75b3ec5 100644
--- a/lib/librte_compressdev/rte_compressdev.c
+++ b/lib/librte_compressdev/rte_compressdev.c
@@ -763,4 +763,4 @@ rte_compressdev_name_get(uint8_t dev_id)
 	return dev->data->name;
 }
 
-RTE_LOG_REGISTER(compressdev_logtype, lib.compressdev, NOTICE);
+RTE_LOG_REGISTER(compressdev_logtype, , NOTICE);
diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index bed83a402a..01dd63119e 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -14,6 +14,7 @@
 #include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_per_lcore.h>
+#include <rte_string_fns.h>
 
 #include "eal_log.h"
 
@@ -266,6 +267,44 @@ int rte_log_cur_msg_logtype(void)
 	return RTE_PER_LCORE(log_cur_msg).logtype;
 }
 
+int rte_log_logtype_from_file(char *logtype, size_t size, const char *file,
+	const char *suffix)
+{
+	char pattern[PATH_MAX];
+	const char *prefix;
+	char *start;
+	char *pos;
+	int ret;
+
+	strlcpy(pattern, file, sizeof(pattern));
+	if ((pos = strstr(pattern, "drivers/")) != NULL) {
+		start = pos + strlen("drivers/");
+		pos = strstr(start, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '.';
+		pos = strstr(pos + 1, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '\0';
+		prefix = "pmd.";
+	} else if ((pos = strstr(pattern, "lib/librte_")) != NULL) {
+		start = pos + strlen("lib/librte_");
+		pos = strstr(start, "/");
+		if (pos == NULL)
+			return -1;
+		pos[0] = '\0';
+		prefix = "lib.";
+	} else {
+		return -1;
+	}
+	ret = snprintf(logtype, size, "%s%s%s", prefix, start,
+		suffix != NULL ? suffix : "");
+	if (ret < 0 || (unsigned int)ret >= size)
+		return -1;
+	return 0;
+}
+
 static int
 log_lookup(const char *name)
 {
diff --git a/lib/librte_eal/include/rte_log.h b/lib/librte_eal/include/rte_log.h
index a1c608ab41..5d7cb15cd0 100644
--- a/lib/librte_eal/include/rte_log.h
+++ b/lib/librte_eal/include/rte_log.h
@@ -373,6 +373,29 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
+/*
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Generates a log type based on the file which calls RTE_LOG_REGISTER and an
+ * optional suffix.
+ *
+ * @param logtype
+ *   A buffer where this helper writes the log type.
+ * @param size
+ *   The size of the logtype buffer.
+ * @param file
+ *   The file which called RTE_LOG_REGISTER.
+ * @param suffix
+ *   If not NULL, a suffix to append to the log type.
+ * @return
+ *   - 0: Success.
+ *   - Negative on error, the logtype content is invalid.
+ */
+__rte_experimental
+int rte_log_logtype_from_file(char *logtype, size_t size, const char *file,
+	const char *suffix);
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -384,17 +407,27 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
  *
  * @param type
  *   The log type identifier
- * @param name
- *    Name for the log type to be registered
+ * @param suffix
+ *    Name for the log type to be registered.
+ *    If empty or starts with a ., then this name is used as a suffix appended
+ *    to the default logtype for the current file
+ *    (see rte_log_logtype_from_file).
  * @param level
  *   Log level. A value between EMERG (1) and DEBUG (8).
  */
-#define RTE_LOG_REGISTER(type, name, level)				\
+#define RTE_LOG_REGISTER(type, suffix, level)				\
 int type;								\
 RTE_INIT(__##type)							\
 {									\
-	type = rte_log_register_type_and_pick_level(RTE_STR(name),	\
-						    RTE_LOG_##level);	\
+	const char *name = RTE_STR(suffix);                             \
+	char pattern[PATH_MAX];                                         \
+	if (name[0] == '\0' || name[0] == '.') {                        \
+		if (rte_log_logtype_from_file(pattern, sizeof(pattern), \
+				__FILE__, name) == 0)                   \
+			name = pattern;                                 \
+	}                                                               \
+	type = rte_log_register_type_and_pick_level(name,               \
+						    RTE_LOG_##level);   \
 	if (type < 0)                                                   \
 		type = RTE_LOGTYPE_EAL;                                 \
 }
diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index e7217ae288..71c2c2444c 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -412,6 +412,7 @@ EXPERIMENTAL {
 	# added in 21.05
 	rte_intr_callback_unregister_sync;
 	rte_log_list_types;
+	rte_log_logtype_from_file;
 	rte_thread_key_create;
 	rte_thread_key_delete;
 	rte_thread_value_get;
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 3059aa55b3..98b4db081b 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5923,7 +5923,7 @@ rte_eth_representor_info_get(uint16_t port_id,
 								      info));
 }
 
-RTE_LOG_REGISTER(rte_eth_dev_logtype, lib.ethdev, INFO);
+RTE_LOG_REGISTER(rte_eth_dev_logtype, , INFO);
 
 RTE_INIT(ethdev_init_telemetry)
 {
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index dd7b83087d..44f062abb8 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -29,9 +29,9 @@
 #define DATA_MZ_NAME_MAX_LEN 64
 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d"
 
-RTE_LOG_REGISTER(evtim_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_buffer_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_svc_logtype, lib.eventdev.adapter.timer.svc, NOTICE);
+RTE_LOG_REGISTER(evtim_logtype, .adapter.timer, NOTICE);
+RTE_LOG_REGISTER(evtim_buffer_logtype, .adapter.timer, NOTICE);
+RTE_LOG_REGISTER(evtim_svc_logtype, .adapter.timer.svc, NOTICE);
 
 static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX];
 
diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
index 639b0051f5..fd829e52d9 100644
--- a/lib/librte_flow_classify/rte_flow_classify.c
+++ b/lib/librte_flow_classify/rte_flow_classify.c
@@ -667,4 +667,4 @@ rte_flow_classifier_query(struct rte_flow_classifier *cls,
 	return ret;
 }
 
-RTE_LOG_REGISTER(librte_flow_classify_logtype, lib.flow_classify, INFO);
+RTE_LOG_REGISTER(librte_flow_classify_logtype, , INFO);
diff --git a/lib/librte_graph/graph.c b/lib/librte_graph/graph.c
index 7224b00a7d..a7b458ef69 100644
--- a/lib/librte_graph/graph.c
+++ b/lib/librte_graph/graph.c
@@ -578,4 +578,4 @@ rte_graph_max_count(void)
 	return graph_id;
 }
 
-RTE_LOG_REGISTER(rte_graph_logtype, lib.graph, INFO);
+RTE_LOG_REGISTER(rte_graph_logtype, , INFO);
diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index 4696c0f171..43c3a8314c 100644
--- a/lib/librte_member/rte_member.c
+++ b/lib/librte_member/rte_member.c
@@ -297,4 +297,4 @@ rte_member_reset(const struct rte_member_setsum *setsum)
 	}
 }
 
-RTE_LOG_REGISTER(librte_member_logtype, lib.member, DEBUG);
+RTE_LOG_REGISTER(librte_member_logtype, , DEBUG);
diff --git a/lib/librte_metrics/rte_metrics_telemetry.c b/lib/librte_metrics/rte_metrics_telemetry.c
index c24990d923..c8054d43f2 100644
--- a/lib/librte_metrics/rte_metrics_telemetry.c
+++ b/lib/librte_metrics/rte_metrics_telemetry.c
@@ -528,7 +528,7 @@ handle_ports_stats_values_by_name(const char *cmd __rte_unused,
 	return used;
 }
 
-RTE_LOG_REGISTER(metrics_log_level, lib.metrics, ERR);
+RTE_LOG_REGISTER(metrics_log_level, , ERR);
 
 RTE_INIT(metrics_ctor)
 {
diff --git a/lib/librte_net/rte_net_crc.c b/lib/librte_net/rte_net_crc.c
index 1fe58f7c75..6c3ee835d1 100644
--- a/lib/librte_net/rte_net_crc.c
+++ b/lib/librte_net/rte_net_crc.c
@@ -76,7 +76,7 @@ static uint16_t max_simd_bitwidth;
 	rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n",	\
 		__func__, ## args)
 
-RTE_LOG_REGISTER(libnet_logtype, lib.net, INFO);
+RTE_LOG_REGISTER(libnet_logtype, , INFO);
 
 /* Scalar handling */
 
diff --git a/lib/librte_node/log.c b/lib/librte_node/log.c
index f14199f07c..e4621b15c6 100644
--- a/lib/librte_node/log.c
+++ b/lib/librte_node/log.c
@@ -4,4 +4,4 @@
 
 #include "node_private.h"
 
-RTE_LOG_REGISTER(rte_node_logtype, lib.node, INFO);
+RTE_LOG_REGISTER(rte_node_logtype, , INFO);
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index d20e944e04..ffe32912a3 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -12,7 +12,7 @@
 
 #include "rte_pdump.h"
 
-RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
+RTE_LOG_REGISTER(pdump_logtype, , NOTICE);
 
 /* Macro for printing using RTE_LOG */
 #define PDUMP_LOG(level, fmt, args...)				\
diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index f29164dd15..2905694fb4 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -627,7 +627,7 @@ handle_dev_xstats(const char *cmd __rte_unused,
 	return 0;
 }
 
-RTE_LOG_REGISTER(librawdev_logtype, lib.rawdev, INFO);
+RTE_LOG_REGISTER(librawdev_logtype, , INFO);
 
 RTE_INIT(librawdev_init_telemetry)
 {
diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c
index a5f9de3267..64b9202049 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.c
+++ b/lib/librte_rcu/rte_rcu_qsbr.c
@@ -496,4 +496,4 @@ rte_rcu_qsbr_dq_delete(struct rte_rcu_qsbr_dq *dq)
 	return 0;
 }
 
-RTE_LOG_REGISTER(rte_rcu_log_type, lib.rcu, ERR);
+RTE_LOG_REGISTER(rte_rcu_log_type, , ERR);
diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c
index 8a51fba17f..3f4af877a9 100644
--- a/lib/librte_stack/rte_stack.c
+++ b/lib/librte_stack/rte_stack.c
@@ -192,4 +192,4 @@ rte_stack_lookup(const char *name)
 	return r;
 }
 
-RTE_LOG_REGISTER(stack_logtype, lib.stack, NOTICE);
+RTE_LOG_REGISTER(stack_logtype, , NOTICE);
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index c9d1371e45..98ca1370e8 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1741,5 +1741,5 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	return ret;
 }
 
-RTE_LOG_REGISTER(vhost_config_log_level, lib.vhost.config, INFO);
-RTE_LOG_REGISTER(vhost_data_log_level, lib.vhost.data, WARNING);
+RTE_LOG_REGISTER(vhost_config_log_level, .config, INFO);
+RTE_LOG_REGISTER(vhost_data_log_level, .data, WARNING);
-- 
2.23.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH] log: deduce log type from filename
  2021-04-09 12:43 [dpdk-dev] [PATCH] log: deduce log type from filename David Marchand
@ 2021-04-09 13:01 ` Bruce Richardson
  2021-04-13 15:07   ` David Marchand
  2021-04-26 12:51 ` [dpdk-dev] [PATCH v2] log: register with standardized names David Marchand
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Bruce Richardson @ 2021-04-09 13:01 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, andrew.rybchenko

On Fri, Apr 09, 2021 at 02:43:34PM +0200, David Marchand wrote:
> Let's try to enforce the convention where drivers use a pmd. logtype
> with their class reflected in it and libraries use a lib. logtype.
> 
> RTE_LOG_REGISTER now interprets the log type name:
> - if none or a name starting with a . is passed, then the default logtype
>   is used as a prefix,
> - else the name is used as is to deal with components that do not comply
>   with the current convention,
> 
> Note: achieved with below command (+ manual edit on crypto/virtio,
> compress/mlx5 and regex/mlx5).
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     pattern=pmd.$class.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
>   done
> 
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/librte_};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
>   done
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> This is an alternative to the devtools check I had proposed [1].
> This can be seen as a RFC, but if people are happy with it, I don't see
> much to add.
> 
> 1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796
> 
> ---
<snip> 
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 91bee65e7b..fb315f02e9 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -460,4 +460,4 @@ dpaax_handle_memevents(void)
>  					       dpaax_memevent_cb, NULL);
>  }
>  
> -RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
> +RTE_LOG_REGISTER(dpaax_logger, , ERR);

Sorry, but this blank field looks really wrong to me, and I'd rather find a
better solution.

How about as part of the cflags for each component adding
"-D" flag with the default component log name, that can be used in place of
the blank, or added to as needed?

/Bruce

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH] log: deduce log type from filename
  2021-04-09 13:01 ` Bruce Richardson
@ 2021-04-13 15:07   ` David Marchand
  0 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2021-04-13 15:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Thomas Monjalon, Andrew Rybchenko

On Fri, Apr 9, 2021 at 3:01 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Apr 09, 2021 at 02:43:34PM +0200, David Marchand wrote:
> > Let's try to enforce the convention where drivers use a pmd. logtype
> > with their class reflected in it and libraries use a lib. logtype.
> >
> > RTE_LOG_REGISTER now interprets the log type name:
> > - if none or a name starting with a . is passed, then the default logtype
> >   is used as a prefix,
> > - else the name is used as is to deal with components that do not comply
> >   with the current convention,
> >
> > Note: achieved with below command (+ manual edit on crypto/virtio,
> > compress/mlx5 and regex/mlx5).
> > $ git grep -l RTE_LOG_REGISTER drivers/ |
> >   while read file; do
> >     pattern=${file##drivers/};
> >     class=${pattern%%/*};
> >     pattern=${pattern#$class/};
> >     pattern=pmd.$class.${pattern%%/*};
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
> >   done
> >
> > $ git grep -l RTE_LOG_REGISTER lib/ |
> >   while read file; do
> >     pattern=${file##lib/librte_};
> >     pattern=lib.${pattern%%/*};
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\(\|\..*\),/RTE_LOG_REGISTER(\1, \2,/' $file;
> >   done
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > This is an alternative to the devtools check I had proposed [1].
> > This can be seen as a RFC, but if people are happy with it, I don't see
> > much to add.
> >
> > 1: https://patchwork.dpdk.org/project/dpdk/list/?series=15796
> >
> > ---
> <snip>
> > diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> > index 91bee65e7b..fb315f02e9 100644
> > --- a/drivers/common/dpaax/dpaax_iova_table.c
> > +++ b/drivers/common/dpaax/dpaax_iova_table.c
> > @@ -460,4 +460,4 @@ dpaax_handle_memevents(void)
> >                                              dpaax_memevent_cb, NULL);
> >  }
> >
> > -RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
> > +RTE_LOG_REGISTER(dpaax_logger, , ERR);
>
> Sorry, but this blank field looks really wrong to me, and I'd rather find a
> better solution.
>
> How about as part of the cflags for each component adding
> "-D" flag with the default component log name, that can be used in place of
> the blank, or added to as needed?

Ok, resolving this name at build time is better.

I prefer separate macros though:
- keeping RTE_LOG_REGISTER untouched (and usable out of the dpdk tree)
- introducing RTE_LOG_REGISTER_DEFAULT_LOGTYPE(type, level) (for
components who need only one handle)
- introducing RTE_LOG_REGISTER_LOGTYPE(type, suffix, level) (for those
who want more).


-- 
David Marchand


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH v2] log: register with standardized names
  2021-04-09 12:43 [dpdk-dev] [PATCH] log: deduce log type from filename David Marchand
  2021-04-09 13:01 ` Bruce Richardson
@ 2021-04-26 12:51 ` David Marchand
  2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
  2021-05-11 12:38 ` [dpdk-dev] [PATCH v4] " Thomas Monjalon
  3 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2021-04-26 12:51 UTC (permalink / raw)
  To: dev; +Cc: thomas, andrew.rybchenko, bruce.richardson

Let's try to enforce the convention where drivers use a pmd. logtype
with their class reflected in it and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
  used in a component. It is associated to the default name provided
  by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
  and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users and for
components that do not comply with the convention.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5 and regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    pattern=pmd.$class.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- moved default logtype generation in the build system,
- rebased,
- reverted net/bonding change,

---
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/common/iavf/iavf_impl.c               |  2 +-
 drivers/common/mlx5/mlx5_common.c             |  2 +-
 drivers/compress/isal/isal_compress_pmd.c     |  2 +-
 drivers/compress/mlx5/mlx5_compress.c         |  3 +-
 drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
 drivers/compress/zlib/zlib_pmd.c              |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/octeontx/timvf_evdev.c          |  2 +-
 drivers/event/opdl/opdl_evdev.c               |  2 +-
 drivers/event/sw/sw_evdev.c                   |  2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c     |  2 +-
 drivers/meson.build                           |  1 +
 drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_ethdev.c                  |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  4 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |  3 ++
 drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/e1000/e1000_logs.c                |  8 ++--
 drivers/net/ena/ena_ethdev.c                  | 12 +++---
 drivers/net/enetc/enetc_ethdev.c              |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/failsafe/failsafe.c               |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  8 ++--
 drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  4 +-
 drivers/net/i40e/i40e_ethdev.c                |  8 ++--
 drivers/net/iavf/iavf_ethdev.c                |  8 ++--
 drivers/net/ice/ice_ethdev.c                  |  8 ++--
 drivers/net/igc/igc_logs.c                    |  4 +-
 drivers/net/ionic/ionic_ethdev.c              |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  8 ++--
 drivers/net/kni/rte_eth_kni.c                 |  2 +-
 drivers/net/liquidio/lio_ethdev.c             |  4 +-
 drivers/net/memif/rte_eth_memif.c             |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  4 +-
 drivers/net/nfp/nfp_net.c                     |  4 +-
 drivers/net/null/rte_eth_null.c               |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
 drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
 drivers/net/pcap/pcap_ethdev.c                |  2 +-
 drivers/net/pfe/pfe_ethdev.c                  |  2 +-
 drivers/net/qede/qede_ethdev.c                |  4 +-
 drivers/net/ring/rte_eth_ring.c               |  2 +-
 drivers/net/softnic/rte_eth_softnic.c         |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
 drivers/net/tap/rte_eth_tap.c                 |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
 drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/vhost/rte_eth_vhost.c             |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
 drivers/raw/ioat/ioat_rawdev.c                |  2 +-
 drivers/raw/ntb/ntb.c                         |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/regex/mlx5/mlx5_regex.c               |  3 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
 lib/bbdev/rte_bbdev.c                         |  2 +-
 lib/bpf/bpf.c                                 |  2 +-
 lib/cfgfile/rte_cfgfile.c                     |  2 +-
 lib/compressdev/rte_compressdev.c             |  2 +-
 lib/eal/include/rte_log.h                     | 41 +++++++++++++++----
 lib/ethdev/rte_ethdev.c                       |  2 +-
 lib/eventdev/rte_event_timer_adapter.c        |  6 +--
 lib/flow_classify/rte_flow_classify.c         |  2 +-
 lib/graph/graph.c                             |  2 +-
 lib/member/rte_member.c                       |  2 +-
 lib/meson.build                               |  1 +
 lib/metrics/rte_metrics_telemetry.c           |  2 +-
 lib/net/rte_net_crc.c                         |  2 +-
 lib/node/log.c                                |  2 +-
 lib/pdump/rte_pdump.c                         |  2 +-
 lib/rawdev/rte_rawdev.c                       |  2 +-
 lib/rcu/rte_rcu_qsbr.c                        |  2 +-
 lib/stack/rte_stack.c                         |  2 +-
 lib/vhost/vhost.c                             |  4 +-
 108 files changed, 194 insertions(+), 170 deletions(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 54f89e12ba..3d661102cc 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -462,4 +462,4 @@ dpaax_handle_memevents(void)
 					       dpaax_memevent_cb, NULL);
 }
 
-RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
+RTE_LOG_REGISTER_DEFAULT(dpaax_logger, ERR);
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index 08147314c6..0c7d5c0dae 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -85,4 +85,4 @@ iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
 	return IAVF_SUCCESS;
 }
 
-RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(iavf_common_logger, NOTICE);
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index f92f05bda5..de17c66550 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -39,7 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_common_logtype, NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0ecca12a83..81b937ee73 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -750,4 +750,4 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
-RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
+RTE_LOG_REGISTER_DEFAULT(isal_logtype_driver, INFO);
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index ec3c237512..898230b550 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -23,7 +23,6 @@
 #include "mlx5_compress_utils.h"
 
 #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
-#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
 #define MLX5_COMPRESS_MAX_QPS 1024
 #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
 
@@ -901,7 +900,7 @@ RTE_INIT(rte_mlx5_compress_init)
 		mlx5_pci_driver_register(&mlx5_compress_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_compress_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index bee90fc7cd..dd62285b86 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -646,4 +646,4 @@ static struct rte_pci_driver octtx_zip_pmd = {
 
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
-RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
+RTE_LOG_REGISTER_DEFAULT(octtx_zip_logtype_driver, INFO);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 8a79d15c98..0220c6d038 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -426,4 +426,4 @@ static struct rte_vdev_driver zlib_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
-RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
+RTE_LOG_REGISTER_DEFAULT(zlib_logtype_driver, INFO);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..bc87e44a9d 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -975,4 +975,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_gcm_logtype_driver, NOTICE);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..a01c826a3c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -2229,4 +2229,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_mb_logtype_driver, NOTICE);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3f6cb66ba2..c642ac350f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -864,7 +864,7 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
-RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+RTE_LOG_REGISTER_DEFAULT(crypto_armv8_log_type, ERR);
 
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 9faf12f238..08fd67af50 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -21,5 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
-RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_conf_logtype, config, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_dp_logtype, fp, NOTICE)
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 5ff1b5c562..48b7db9e9b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -639,4 +639,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
 
-RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(kasumi_logtype_driver, NOTICE);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..b2cfa710f5 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -1019,4 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype_driver, NOTICE);
diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
index 26395159aa..0e0a94648c 100644
--- a/drivers/crypto/nitrox/nitrox_logs.c
+++ b/drivers/crypto/nitrox/nitrox_logs.c
@@ -4,4 +4,4 @@
 
 #include <rte_log.h>
 
-RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(nitrox_logtype, NOTICE);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index e04042e757..179e5ff36d 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -248,4 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
+RTE_LOG_REGISTER_DEFAULT(null_logtype_driver, INFO);
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..ba73c2f939 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -111,4 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7f45e57cce..d4e5ca080b 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -177,4 +177,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx2_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..47004337d5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2278,4 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
+RTE_LOG_REGISTER_DEFAULT(openssl_logtype_driver, INFO);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 9367a0e915..1e0b4df0ca 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -577,4 +577,4 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
 }
 
 
-RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
+RTE_LOG_REGISTER_DEFAULT(scheduler_logtype_driver, INFO);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 962868e1fc..9aab357846 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -653,4 +653,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
+RTE_LOG_REGISTER_DEFAULT(snow3g_logtype_driver, INFO);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1822f21744..4bae74a487 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1483,10 +1483,8 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
 RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
 	rte_virtio_crypto_driver.driver,
 	cryptodev_virtio_driver_id);
-RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
-		 NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
-		 NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_session, session, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_rx, rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_tx, tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_driver, driver, NOTICE);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..aa50c12da6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -580,4 +580,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
+RTE_LOG_REGISTER_DEFAULT(zuc_logtype_driver, INFO);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index fb5ff012a4..1d7d96d18f 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4032,4 +4032,4 @@ dlb2_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_dlb2_log_level, NOTICE);
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 460375ca30..ec74160325 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -46,7 +46,7 @@
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
-RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index e4fa3a2e46..5ccf22f77f 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1206,4 +1206,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_event, NOTICE);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 17325bbf6a..d8b359801a 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -22,7 +22,7 @@
 
 static uint8_t timvf_enable_stats;
 
-RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_logtype_ssovf, NOTICE);
 
 /* SSOPF Mailbox messages */
 
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 8af4d6e37f..688e9daa66 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -5,7 +5,7 @@
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
 
-RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_logtype_timvf, timer, NOTICE);
 
 static struct rte_eventdev *event_dev;
 
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3050578ffd..cfa9733b64 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -755,7 +755,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
 	.remove = opdl_remove
 };
 
-RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(opdl_logtype_driver, driver, INFO);
 
 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 0d8013adf7..a5e6ca22e8 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1151,4 +1151,4 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
 		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
 		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
 		REFIL_ONCE_ARG "=<int>");
-RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_sw_log_level, NOTICE);
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 94dc5cd815..f9fb65119b 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -105,7 +105,7 @@ struct octeontx_fpadev {
 
 static struct octeontx_fpadev fpadev;
 
-RTE_LOG_REGISTER(octeontx_logtype_fpavf, pmd.mempool.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(octeontx_logtype_fpavf, NOTICE);
 
 /* lock is taken by caller */
 static int
diff --git a/drivers/meson.build b/drivers/meson.build
index b78cac3897..bff2e5d9e4 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -137,6 +137,7 @@ foreach subpath:subdirs
 
         enabled_drivers += name
         lib_name = '_'.join(['rte', class, name])
+        cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=' + '.'.join(['pmd', class, name])
         dpdk_conf.set(lib_name.to_upper(), 1)
 
         dpdk_extra_ldflags += pkgconfig_extra_libs
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a04f7c773a..2e90e2985c 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -97,7 +97,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(af_packet_logtype, pmd.net.af_packet, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0c91a40c4a..c2db21f9c1 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -60,7 +60,7 @@
 #define PF_XDP AF_XDP
 #endif
 
-RTE_LOG_REGISTER(af_xdp_logtype, pmd.net.af_xdp, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
 
 #define AF_XDP_LOG(level, fmt, args...)			\
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6372cf7740..2c1ac28056 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -1015,4 +1015,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ark,
 			      ARK_PKTGEN_ARG "=<filename> "
 			      ARK_PKTCHKR_ARG "=<filename> "
 			      ARK_PKTDIR_ARG "=<bitmap>");
-RTE_LOG_REGISTER(ark_logtype, pmd.net.ark, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ark_logtype, NOTICE);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 473f6209f6..84748dbe19 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1914,5 +1914,5 @@ is_atlantic_supported(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_atlantic, rte_atl_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_atlantic, pci_id_atl_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_atlantic, "* igb_uio | uio_pci_generic");
-RTE_LOG_REGISTER(atl_logtype_init, pmd.net.atlantic.init, NOTICE);
-RTE_LOG_REGISTER(atl_logtype_driver, pmd.net.atlantic.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 566a3606a2..623fa5e5ff 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2309,4 +2309,4 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_LOG_REGISTER(avp_logtype_driver, pmd.net.avp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(avp_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index ebe9a2876d..9cb4818af1 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2377,5 +2377,5 @@ static struct rte_pci_driver rte_axgbe_pmd = {
 RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(axgbe_logtype_init, pmd.net.axgbe.init, NOTICE);
-RTE_LOG_REGISTER(axgbe_logtype_driver, pmd.net.axgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 50db70dfcd..463886f17a 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -817,5 +817,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(bnx2x_logtype_init, pmd.net.bnx2x.init, NOTICE);
-RTE_LOG_REGISTER(bnx2x_logtype_driver, pmd.net.bnx2x.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f5d2dc8590..72d1548b24 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6153,7 +6153,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
 	return is_device_supported(dev, &bnxt_rte_pmd);
 }
 
-RTE_LOG_REGISTER(bnxt_logtype_driver, pmd.net.bnxt.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2e9cea5b8e..7d07487c7e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3775,4 +3775,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"up_delay=<int> "
 	"down_delay=<int>");
 
+/* We can't use RTE_LOG_REGISTER_DEFAULT because of the forced name for
+ * this library, see meson.build.
+ */
 RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index e8a2de3ef3..a12a98157c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1474,5 +1474,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_cxgbe,
 			      CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
 			      CXGBE_DEVARG_PF_FILTER_MODE "=<uint32> "
 			      CXGBE_DEVARG_PF_FILTER_MASK "=<uint32> ");
-RTE_LOG_REGISTER(cxgbe_logtype, pmd.net.cxgbe, NOTICE);
-RTE_LOG_REGISTER(cxgbe_mbox_logtype, pmd.net.cxgbe.mbox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(cxgbe_logtype, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cxgbe_mbox_logtype, mbox, NOTICE);
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 176943a8ea..e606877085 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2309,4 +2309,4 @@ static struct rte_dpaa_driver rte_dpaa_pmd = {
 };
 
 RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
-RTE_LOG_REGISTER(dpaa_logtype_pmd, pmd.net.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_pmd, NOTICE);
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 9011dcfc12..6814982b5f 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2893,4 +2893,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_dpaa2,
 		DRIVER_NO_PREFETCH_MODE "=<int>"
 		DRIVER_TX_CONF "=<int>"
 		DRIVER_ERROR_QUEUE "=<int>");
-RTE_LOG_REGISTER(dpaa2_logtype_pmd, pmd.net.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_pmd, NOTICE);
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index 23b7c67458..8dccca9e6d 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -5,11 +5,11 @@
 #include <rte_ethdev.h>
 #include "e1000_logs.h"
 
-RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
-RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_init, init, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_driver, driver, NOTICE)
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_rx, rx, DEBUG)
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_tx, tx, DEBUG)
 #endif
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f60e843b7f..f21a026b50 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2925,19 +2925,19 @@ RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ena, ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>");
-RTE_LOG_REGISTER(ena_logtype_init, pmd.net.ena.init, NOTICE);
-RTE_LOG_REGISTER(ena_logtype_driver, pmd.net.ena.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_driver, driver, NOTICE);
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
-RTE_LOG_REGISTER(ena_logtype_rx, pmd.net.ena.rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_rx, rx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX
-RTE_LOG_REGISTER(ena_logtype_tx, pmd.net.ena.tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx, tx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ena_logtype_tx_free, pmd.net.ena.tx_free, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx_free, tx_free, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
-RTE_LOG_REGISTER(ena_logtype_com, pmd.net.ena.com, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_com, com, NOTICE);
 #endif
 
 /******************************************************************************
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 0b45168c60..b496cd4700 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -960,4 +960,4 @@ static struct rte_pci_driver rte_enetc_pmd = {
 RTE_PMD_REGISTER_PCI(net_enetc, rte_enetc_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_enetc, pci_id_enetc_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_enetc, "* vfio-pci");
-RTE_LOG_REGISTER(enetc_logtype_pmd, pmd.net.enetc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(enetc_logtype_pmd, NOTICE);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index d91c2cdc8c..fe334e3787 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -71,7 +71,7 @@ static const struct vic_speed_capa {
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
-RTE_LOG_REGISTER(enic_pmd_logtype, pmd.net.enic, INFO);
+RTE_LOG_REGISTER_DEFAULT(enic_pmd_logtype, INFO);
 
 static int
 enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index e3bda0df2b..8216063a3d 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -391,4 +391,4 @@ static struct rte_vdev_driver failsafe_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_LOG_REGISTER(failsafe_logtype, pmd.net.failsafe, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(failsafe_logtype, NOTICE)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 0a557acbef..3236290e40 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3285,11 +3285,11 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE);
-RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b5a36a863b..946465779f 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3266,4 +3266,4 @@ static struct rte_pci_driver rte_hinic_pmd = {
 
 RTE_PMD_REGISTER_PCI(net_hinic, rte_hinic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_hinic, pci_id_hinic_map);
-RTE_LOG_REGISTER(hinic_logtype, pmd.net.hinic, INFO);
+RTE_LOG_REGISTER_DEFAULT(hinic_logtype, INFO);
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 60267e1ec1..03ca87ce67 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -7558,5 +7558,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_hns3,
 		HNS3_DEVARG_RX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_TX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_DEV_CAPS_MASK "=<1-65535> ");
-RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
-RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index e6206a7e51..cefb1d905a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12445,13 +12445,13 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
 	return ret;
 }
 
-RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
-RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_tx, tx, DEBUG);
 #endif
 
 RTE_PMD_REGISTER_PARAM_STRING(net_i40e,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d523a0618c..44aa88bfce 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2401,11 +2401,11 @@ RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
-RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
-RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index da9e85bd7c..d2a7893d14 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5370,11 +5370,11 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
 			      ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
 
-RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE);
-RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/igc/igc_logs.c b/drivers/net/igc/igc_logs.c
index 2d458d7fb6..9cb8da527e 100644
--- a/drivers/net/igc/igc_logs.c
+++ b/drivers/net/igc/igc_logs.c
@@ -6,5 +6,5 @@
 
 #include "igc_logs.h"
 
-RTE_LOG_REGISTER(igc_logtype_init, pmd.net.igc.init, INFO);
-RTE_LOG_REGISTER(igc_logtype_driver, pmd.net.igc.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_init, init, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_driver, driver, INFO);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index cffe899c07..396b0ad5d9 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1293,4 +1293,4 @@ static struct rte_pci_driver rte_ionic_pmd = {
 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ionic_logtype, pmd.net.ionic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ionic_logtype, NOTICE);
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index e83bd92bac..964506c6db 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -583,4 +583,4 @@ static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.net.ipn3ke, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ipn3ke_afu_logtype, NOTICE);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff65145f55..c67ef69bae 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8453,12 +8453,12 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe_vf,
 			      IXGBEVF_DEVARG_PFLINK_FULLCHK "=<0|1>");
 
-RTE_LOG_REGISTER(ixgbe_logtype_init, pmd.net.ixgbe.init, NOTICE);
-RTE_LOG_REGISTER(ixgbe_logtype_driver, pmd.net.ixgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_driver, driver, NOTICE);
 
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ixgbe_logtype_rx, pmd.net.ixgbe.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ixgbe_logtype_tx, pmd.net.ixgbe.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 9ce74e549b..d9c08aba74 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -68,7 +68,7 @@ static const struct rte_eth_link pmd_link = {
 };
 static int is_kni_initialized;
 
-RTE_LOG_REGISTER(eth_kni_logtype, pmd.net.kni, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_kni_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_kni_logtype, \
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 0b189d5d15..b72060a449 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2168,5 +2168,5 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(lio_logtype_init, pmd.net.liquidio.init, NOTICE);
-RTE_LOG_REGISTER(lio_logtype_driver, pmd.net.liquidio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7a..37a49fa13d 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1878,4 +1878,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_memif,
 			      ETH_MEMIF_ZC_ARG "=yes|no"
 			      ETH_MEMIF_SECRET_ARG "=<string>");
 
-RTE_LOG_REGISTER(memif_logtype, pmd.net.memif, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(memif_logtype, NOTICE);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d048d21033..7cd35cd3ca 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1319,7 +1319,7 @@ mlx4_glue_init(void)
 #endif
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx4_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 7e13b38ee0..695467cde9 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2331,7 +2331,7 @@ static struct mlx5_pci_driver mlx5_driver = {
 };
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index b0940b4462..a3ee150204 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -987,4 +987,4 @@ static struct rte_vdev_driver pmd_mvneta_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
-RTE_LOG_REGISTER(mvneta_logtype, pmd.net.mvneta, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mvneta_logtype, NOTICE);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1d41788974..63d348e279 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3309,4 +3309,4 @@ static struct rte_vdev_driver pmd_mrvl_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
 RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_LOG_REGISTER(mrvl_logtype, pmd.net.mvpp2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype, NOTICE);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index a7b7f15c16..9e2a405973 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1296,8 +1296,8 @@ static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
-RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PARAM_STRING(net_netvsc,
 			      NETVSC_ARG_LATENCY "=<uint32> "
 			      NETVSC_ARG_RXBREAK "=<uint32> "
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 888324cd20..ad2c2b55f6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3847,8 +3847,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
-RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 32764e8f0e..508bafc12a 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_null_logtype, \
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..9f4c0503b4 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -47,9 +47,9 @@ enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
-RTE_LOG_REGISTER(otx_net_logtype_mbox, pmd.net.octeontx.mbox, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_init, pmd.net.octeontx.init, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_driver, pmd.net.octeontx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_driver, driver, NOTICE);
 
 /* Parse integer from integer argument */
 static int
diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeontx_ep/otx_ep_ethdev.c
index b35c88b347..a243683d61 100644
--- a/drivers/net/octeontx_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeontx_ep/otx_ep_ethdev.c
@@ -463,4 +463,4 @@ static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_net_ep_logtype, NOTICE);
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 883a0c494a..a8774b7a43 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -141,7 +141,7 @@ static struct rte_eth_link pmd_link = {
 		.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_pcap_logtype, pmd.net.pcap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_pcap_logtype, NOTICE);
 
 static struct queue_missed_stat*
 queue_missed_stat_update(struct rte_eth_dev *dev, unsigned int qid)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 8cf59e210d..3135466713 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -1177,4 +1177,4 @@ struct rte_vdev_driver pmd_pfe_drv = {
 
 RTE_PMD_REGISTER_VDEV(PFE_NAME_PMD, pmd_pfe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(PFE_NAME_PMD, PFE_VDEV_GEM_ID_ARG "=<int> ");
-RTE_LOG_REGISTER(pfe_logtype_pmd, pmd.net.pfe, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pfe_logtype_pmd, NOTICE);
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 057a7b00e2..9b8ab98bd8 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2895,5 +2895,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(qede_logtype_init, pmd.net.qede.init, NOTICE);
-RTE_LOG_REGISTER(qede_logtype_driver, pmd.net.qede.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 02f6da2817..1faf38a714 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -62,7 +62,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_ring_logtype, pmd.net.ring, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_ring_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 0c2a79a7d2..f64023256d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -80,7 +80,7 @@ static const struct softnic_conn_params conn_params_default = {
 	.msg_handle_arg = NULL,
 };
 
-RTE_LOG_REGISTER(pmd_softnic_logtype, pmd.net.softnic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pmd_softnic_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 6eaeadf1c8..7416a6b1b8 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1949,5 +1949,5 @@ RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver);
 RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
 RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
 	"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_LOG_REGISTER(szedata2_logtype_init, pmd.net.szedata2.init, NOTICE);
-RTE_LOG_REGISTER(szedata2_logtype_driver, pmd.net.szedata2.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 68baa18523..a73b50a4da 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2568,4 +2568,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap,
 			      ETH_TAP_IFACE_ARG "=<string> "
 			      ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " "
 			      ETH_TAP_REMOTE_ARG "=<string>");
-RTE_LOG_REGISTER(tap_logtype, pmd.net.tap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(tap_logtype, NOTICE);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index c45d6e00a9..fc1844ddfc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -51,9 +51,9 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 static int nicvf_vlan_offload_config(struct rte_eth_dev *dev, int mask);
 static int nicvf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
-RTE_LOG_REGISTER(nicvf_logtype_mbox, pmd.net.thunderx.mbox, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_init, pmd.net.thunderx.init, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_driver, pmd.net.thunderx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_driver, driver, NOTICE);
 
 static void
 nicvf_link_status_update(struct nicvf *nic,
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 97796f040b..495710c00a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -5337,17 +5337,17 @@ RTE_PMD_REGISTER_PARAM_STRING(net_txgbe,
 			      TXGBE_DEVARG_FFE_PRE "=<uint16>"
 			      TXGBE_DEVARG_FFE_POST "=<uint16>");
 
-RTE_LOG_REGISTER(txgbe_logtype_init, pmd.net.txgbe.init, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_driver, pmd.net.txgbe.driver, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_bp, pmd.net.txgbe.bp, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_driver, driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_bp, bp, NOTICE);
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
-	RTE_LOG_REGISTER(txgbe_logtype_rx, pmd.net.txgbe.rx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
-	RTE_LOG_REGISTER(txgbe_logtype_tx, pmd.net.txgbe.tx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx, tx, DEBUG);
 #endif
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
-	RTE_LOG_REGISTER(txgbe_logtype_tx_free, pmd.net.txgbe.tx_free, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx_free, tx_free, DEBUG);
 #endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c1b7099717..55f2a342c5 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -48,7 +48,7 @@
 #define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
 #define NETVSC_MAX_ROUTE_LINE_SIZE 300
 
-RTE_LOG_REGISTER(vdev_netvsc_logtype, pmd.net.vdev_netvsc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vdev_netvsc_logtype, NOTICE);
 
 #define DRV_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, \
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index d198fc8a8e..a202931e9a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -19,7 +19,7 @@
 
 #include "rte_eth_vhost.h"
 
-RTE_LOG_REGISTER(vhost_logtype, pmd.net.vhost, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
 
 #define VHOST_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 090d94615e..0568305667 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2483,5 +2483,5 @@ __rte_unused uint8_t is_rx)
 	return 0;
 }
 
-RTE_LOG_REGISTER(virtio_logtype_init, pmd.net.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_logtype_driver, pmd.net.virtio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1a313bfc4..5bffbb8a0e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1491,5 +1491,5 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE);
-RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_driver, driver, NOTICE);
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index f2551be821..69299bc291 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1611,7 +1611,7 @@ static struct rte_pci_driver rte_ifpga_rawdev_pmd = {
 RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ifpga_rawdev_logtype, pmd.raw.ifpga, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ifpga_rawdev_logtype, NOTICE);
 
 static const char * const valid_args[] = {
 #define IFPGA_ARG_NAME         "ifpga"
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 15af07017c..5396671d4f 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,7 +28,7 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, pmd.raw.ioat, INFO);
+RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
 
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6dd213ef6e..83465f9af0 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1534,4 +1534,4 @@ static struct rte_pci_driver rte_ntb_pmd = {
 RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map);
 RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ntb_logtype, pmd.raw.ntb, INFO);
+RTE_LOG_REGISTER_DEFAULT(ntb_logtype, INFO);
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 8896f0c9c5..16ecae3d92 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -768,4 +768,4 @@ static struct rte_vdev_driver skeleton_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_LOG_REGISTER(skeleton_pmd_logtype, pmd.raw.skeleton, INFO);
+RTE_LOG_REGISTER_DEFAULT(skeleton_pmd_logtype, INFO);
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index 82c485e50c..0e99b46c3e 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -20,7 +20,6 @@
 #include "mlx5_rxp_csrs.h"
 
 #define MLX5_REGEX_DRIVER_NAME regex_mlx5
-#define MLX5_REGEX_LOG_NAME    pmd.regex.mlx5
 
 int mlx5_regex_logtype;
 
@@ -301,7 +300,7 @@ RTE_INIT(rte_mlx5_regex_init)
 		mlx5_pci_driver_register(&mlx5_regex_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_regex_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 898e50f807..76eebc7a70 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -869,7 +869,7 @@ static struct mlx5_pci_driver mlx5_vdpa_driver = {
 	},
 };
 
-RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_vdpa_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index 5ba891c232..fc37236195 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -29,7 +29,7 @@
 
 
 /* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/lib/bpf/bpf.c b/lib/bpf/bpf.c
index 8d15885bc4..0caad2a8f0 100644
--- a/lib/bpf/bpf.c
+++ b/lib/bpf/bpf.c
@@ -53,4 +53,4 @@ bpf_jit(struct rte_bpf *bpf)
 	return rc;
 }
 
-RTE_LOG_REGISTER(rte_bpf_logtype, lib.bpf, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_bpf_logtype, INFO);
diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index 002022263e..9fa7d010ef 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -27,7 +27,7 @@ struct rte_cfgfile {
 	struct rte_cfgfile_section *sections;
 };
 
-RTE_LOG_REGISTER(cfgfile_logtype, lib.cfgfile, INFO);
+RTE_LOG_REGISTER_DEFAULT(cfgfile_logtype, INFO);
 
 #define CFG_LOG(level, fmt, args...)					\
 	rte_log(RTE_LOG_ ## level, cfgfile_logtype, "%s(): " fmt "\n",	\
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index 49a342f400..2e9218af68 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -763,4 +763,4 @@ rte_compressdev_name_get(uint8_t dev_id)
 	return dev->data->name;
 }
 
-RTE_LOG_REGISTER(compressdev_logtype, lib.compressdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(compressdev_logtype, NOTICE);
diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h
index a1c608ab41..b706bb8710 100644
--- a/lib/eal/include/rte_log.h
+++ b/lib/eal/include/rte_log.h
@@ -373,6 +373,15 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
+#define RTE_LOG_REGISTER_IMPL(type, name, level)			    \
+int type;								    \
+RTE_INIT(__##type)							    \
+{									    \
+	type = rte_log_register_type_and_pick_level(name, RTE_LOG_##level); \
+	if (type < 0)                                                       \
+		type = RTE_LOGTYPE_EAL;                                     \
+}
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -389,15 +398,29 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
  * @param level
  *   Log level. A value between EMERG (1) and DEBUG (8).
  */
-#define RTE_LOG_REGISTER(type, name, level)				\
-int type;								\
-RTE_INIT(__##type)							\
-{									\
-	type = rte_log_register_type_and_pick_level(RTE_STR(name),	\
-						    RTE_LOG_##level);	\
-	if (type < 0)                                                   \
-		type = RTE_LOGTYPE_EAL;                                 \
-}
+#define RTE_LOG_REGISTER(type, name, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(name), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right format for the logtype.
+ */
+#define RTE_LOG_REGISTER_DEFAULT(type, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(RTE_LOG_DEFAULT_LOGTYPE), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right prefix for the logtype.
+ */
+#define RTE_LOG_REGISTER_SUFFIX(type, suffix, level)			      \
+	RTE_LOG_REGISTER_IMPL(type,					      \
+		 RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) "." RTE_STR(suffix), level)
 
 #ifdef __cplusplus
 }
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index a1879765e8..954ab26a10 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6292,7 +6292,7 @@ rte_eth_representor_info_get(uint16_t port_id,
 	return eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info));
 }
 
-RTE_LOG_REGISTER(rte_eth_dev_logtype, lib.ethdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);
 
 RTE_INIT(ethdev_init_telemetry)
 {
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index dd7b83087d..ee20b39f4b 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -29,9 +29,9 @@
 #define DATA_MZ_NAME_MAX_LEN 64
 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d"
 
-RTE_LOG_REGISTER(evtim_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_buffer_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_svc_logtype, lib.eventdev.adapter.timer.svc, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_buffer_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_svc_logtype, adapter.timer.svc, NOTICE);
 
 static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX];
 
diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c
index 639b0051f5..f125267e8f 100644
--- a/lib/flow_classify/rte_flow_classify.c
+++ b/lib/flow_classify/rte_flow_classify.c
@@ -667,4 +667,4 @@ rte_flow_classifier_query(struct rte_flow_classifier *cls,
 	return ret;
 }
 
-RTE_LOG_REGISTER(librte_flow_classify_logtype, lib.flow_classify, INFO);
+RTE_LOG_REGISTER_DEFAULT(librte_flow_classify_logtype, INFO);
diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 7224b00a7d..d61288647c 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -578,4 +578,4 @@ rte_graph_max_count(void)
 	return graph_id;
 }
 
-RTE_LOG_REGISTER(rte_graph_logtype, lib.graph, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_graph_logtype, INFO);
diff --git a/lib/member/rte_member.c b/lib/member/rte_member.c
index 4696c0f171..9dd55a5adf 100644
--- a/lib/member/rte_member.c
+++ b/lib/member/rte_member.c
@@ -297,4 +297,4 @@ rte_member_reset(const struct rte_member_setsum *setsum)
 	}
 }
 
-RTE_LOG_REGISTER(librte_member_logtype, lib.member, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(librte_member_logtype, DEBUG);
diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b7..b7e31100a8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -177,6 +177,7 @@ foreach l:libraries
     if use_function_versioning
         cflags += '-DRTE_USE_FUNCTION_VERSIONING'
     endif
+    cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l
 
     # first build static lib
     static_lib = static_library(libname,
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index c24990d923..269f8ef613 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -528,7 +528,7 @@ handle_ports_stats_values_by_name(const char *cmd __rte_unused,
 	return used;
 }
 
-RTE_LOG_REGISTER(metrics_log_level, lib.metrics, ERR);
+RTE_LOG_REGISTER_DEFAULT(metrics_log_level, ERR);
 
 RTE_INIT(metrics_ctor)
 {
diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index 1fe58f7c75..d9a526ab7b 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -76,7 +76,7 @@ static uint16_t max_simd_bitwidth;
 	rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n",	\
 		__func__, ## args)
 
-RTE_LOG_REGISTER(libnet_logtype, lib.net, INFO);
+RTE_LOG_REGISTER_DEFAULT(libnet_logtype, INFO);
 
 /* Scalar handling */
 
diff --git a/lib/node/log.c b/lib/node/log.c
index f14199f07c..a6578ee33b 100644
--- a/lib/node/log.c
+++ b/lib/node/log.c
@@ -4,4 +4,4 @@
 
 #include "node_private.h"
 
-RTE_LOG_REGISTER(rte_node_logtype, lib.node, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_node_logtype, INFO);
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index d20e944e04..382217bc15 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -12,7 +12,7 @@
 
 #include "rte_pdump.h"
 
-RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pdump_logtype, NOTICE);
 
 /* Macro for printing using RTE_LOG */
 #define PDUMP_LOG(level, fmt, args...)				\
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index f29164dd15..a6134e76ea 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -627,7 +627,7 @@ handle_dev_xstats(const char *cmd __rte_unused,
 	return 0;
 }
 
-RTE_LOG_REGISTER(librawdev_logtype, lib.rawdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(librawdev_logtype, INFO);
 
 RTE_INIT(librawdev_init_telemetry)
 {
diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c
index a5f9de3267..7510db2f81 100644
--- a/lib/rcu/rte_rcu_qsbr.c
+++ b/lib/rcu/rte_rcu_qsbr.c
@@ -496,4 +496,4 @@ rte_rcu_qsbr_dq_delete(struct rte_rcu_qsbr_dq *dq)
 	return 0;
 }
 
-RTE_LOG_REGISTER(rte_rcu_log_type, lib.rcu, ERR);
+RTE_LOG_REGISTER_DEFAULT(rte_rcu_log_type, ERR);
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index 8a51fba17f..f1dc4b74e5 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -192,4 +192,4 @@ rte_stack_lookup(const char *name)
 	return r;
 }
 
-RTE_LOG_REGISTER(stack_logtype, lib.stack, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(stack_logtype, NOTICE);
diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index a70fe01d8f..684d60f562 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -1740,5 +1740,5 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	return ret;
 }
 
-RTE_LOG_REGISTER(vhost_config_log_level, lib.vhost.config, INFO);
-RTE_LOG_REGISTER(vhost_data_log_level, lib.vhost.data, WARNING);
+RTE_LOG_REGISTER_SUFFIX(vhost_config_log_level, config, INFO);
+RTE_LOG_REGISTER_SUFFIX(vhost_data_log_level, data, WARNING);
-- 
2.23.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-04-09 12:43 [dpdk-dev] [PATCH] log: deduce log type from filename David Marchand
  2021-04-09 13:01 ` Bruce Richardson
  2021-04-26 12:51 ` [dpdk-dev] [PATCH v2] log: register with standardized names David Marchand
@ 2021-05-11 10:09 ` Thomas Monjalon
  2021-05-11 11:15   ` David Marchand
                     ` (2 more replies)
  2021-05-11 12:38 ` [dpdk-dev] [PATCH v4] " Thomas Monjalon
  3 siblings, 3 replies; 14+ messages in thread
From: Thomas Monjalon @ 2021-05-11 10:09 UTC (permalink / raw)
  To: dev; +Cc: andrew.rybchenko, ferruh.yigit, bruce.richardson, David Marchand

From: David Marchand <david.marchand@redhat.com>

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
  used in a component. It is associated to the default name provided
  by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
  and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5, baseband, bus and
mempool drivers.

$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    pattern=pmd.$class.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---

Changes since v2:
- use RTE_LOG_REGISTER_DEFAULT in baseband, bus, mempool
  by adding the variable log_prefix in drivers/meson.build

Changes since v1:
- moved default logtype generation in the build system,
- rebased,
- reverted net/bonding change,

---
 doc/guides/contributing/coding_style.rst      |  6 +++
 drivers/baseband/acc100/rte_acc100_pmd.c      |  4 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  4 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |  4 +-
 drivers/baseband/meson.build                  |  2 +
 drivers/baseband/null/bbdev_null.c            |  2 +-
 .../baseband/turbo_sw/bbdev_turbo_software.c  |  2 +-
 drivers/bus/dpaa/dpaa_bus.c                   |  2 +-
 drivers/bus/fslmc/fslmc_bus.c                 |  2 +-
 drivers/bus/ifpga/ifpga_bus.c                 |  2 +-
 drivers/bus/meson.build                       |  3 ++
 drivers/bus/vdev/vdev.c                       |  2 +-
 drivers/bus/vmbus/vmbus_common.c              |  2 +-
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/common/iavf/iavf_impl.c               |  2 +-
 drivers/common/mlx5/mlx5_common.c             |  2 +-
 drivers/compress/isal/isal_compress_pmd.c     |  2 +-
 drivers/compress/mlx5/mlx5_compress.c         |  3 +-
 drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
 drivers/compress/zlib/zlib_pmd.c              |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/octeontx/timvf_evdev.c          |  2 +-
 drivers/event/opdl/opdl_evdev.c               |  2 +-
 drivers/event/sw/sw_evdev.c                   |  2 +-
 drivers/mempool/dpaa/dpaa_mempool.c           |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
 drivers/mempool/meson.build                   |  3 ++
 drivers/meson.build                           |  6 +++
 drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_ethdev.c                  |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  4 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |  3 ++
 drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/e1000/e1000_logs.c                |  8 ++--
 drivers/net/ena/ena_ethdev.c                  | 12 +++---
 drivers/net/enetc/enetc_ethdev.c              |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/failsafe/failsafe.c               |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  8 ++--
 drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  4 +-
 drivers/net/i40e/i40e_ethdev.c                |  8 ++--
 drivers/net/iavf/iavf_ethdev.c                |  8 ++--
 drivers/net/ice/ice_ethdev.c                  |  8 ++--
 drivers/net/igc/igc_logs.c                    |  4 +-
 drivers/net/ionic/ionic_ethdev.c              |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  8 ++--
 drivers/net/kni/rte_eth_kni.c                 |  2 +-
 drivers/net/liquidio/lio_ethdev.c             |  4 +-
 drivers/net/memif/rte_eth_memif.c             |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  4 +-
 drivers/net/nfp/nfp_net.c                     |  4 +-
 drivers/net/null/rte_eth_null.c               |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
 drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
 drivers/net/pcap/pcap_ethdev.c                |  2 +-
 drivers/net/pfe/pfe_ethdev.c                  |  2 +-
 drivers/net/qede/qede_ethdev.c                |  4 +-
 drivers/net/ring/rte_eth_ring.c               |  2 +-
 drivers/net/softnic/rte_eth_softnic.c         |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
 drivers/net/tap/rte_eth_tap.c                 |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
 drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/vhost/rte_eth_vhost.c             |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
 drivers/raw/ioat/ioat_rawdev.c                |  2 +-
 drivers/raw/ntb/ntb.c                         |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/regex/mlx5/mlx5_regex.c               |  3 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
 lib/bbdev/rte_bbdev.c                         |  2 +-
 lib/bpf/bpf.c                                 |  2 +-
 lib/cfgfile/rte_cfgfile.c                     |  2 +-
 lib/compressdev/rte_compressdev.c             |  2 +-
 lib/eal/include/rte_log.h                     | 41 +++++++++++++++----
 lib/ethdev/rte_ethdev.c                       |  2 +-
 lib/eventdev/rte_event_timer_adapter.c        |  6 +--
 lib/flow_classify/rte_flow_classify.c         |  2 +-
 lib/graph/graph.c                             |  2 +-
 lib/member/rte_member.c                       |  2 +-
 lib/meson.build                               |  1 +
 lib/metrics/rte_metrics_telemetry.c           |  2 +-
 lib/net/rte_net_crc.c                         |  2 +-
 lib/node/log.c                                |  2 +-
 lib/pdump/rte_pdump.c                         |  2 +-
 lib/rawdev/rte_rawdev.c                       |  2 +-
 lib/rcu/rte_rcu_qsbr.c                        |  2 +-
 lib/stack/rte_stack.c                         |  2 +-
 lib/vhost/vhost.c                             |  4 +-
 123 files changed, 227 insertions(+), 184 deletions(-)

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 7601162c4f..f58ae948ff 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -986,6 +986,12 @@ includes
 
 	includes += include_directories('base')
 
+log_prefix
+	**Default Value = pmd.<class>**
+	Some driver classes have a customized log prefix.
+	This prefix is combined with the driver name
+	when registering a default log name for the driver.
+
 name
 	As above, though note that each driver class can define it's own naming
 	scheme for the resulting ``.so`` files.
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index ca2703fbe1..68ba523ea9 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -24,9 +24,9 @@
 #include "rte_acc100_pmd.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(acc100_logtype, NOTICE);
 #endif
 
 /* Write to MMIO register address */
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 026fc894d6..6485cc824a 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -24,9 +24,9 @@
 #include "rte_pmd_fpga_5gnr_fec.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, NOTICE);
 #endif
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 1a72aa7b70..350c4248eb 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -23,9 +23,9 @@
 #include "fpga_lte_fec.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, NOTICE);
 #endif
 
 /* Helper macro for logging */
diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
index c98ebd9024..5ee61d5323 100644
--- a/drivers/baseband/meson.build
+++ b/drivers/baseband/meson.build
@@ -12,3 +12,5 @@ drivers = [
         'null',
         'turbo_sw',
 ]
+
+log_prefix = 'pmd.bb'
diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
index 6cf3988b88..53c538ba44 100644
--- a/drivers/baseband/null/bbdev_null.c
+++ b/drivers/baseband/null/bbdev_null.c
@@ -15,7 +15,7 @@
 
 #define DRIVER_NAME baseband_null
 
-RTE_LOG_REGISTER(bbdev_null_logtype, pmd.bb.null, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_null_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 85cf93d7bc..77e9a2ecbc 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -35,7 +35,7 @@
 
 #define DRIVER_NAME baseband_turbo_sw
 
-RTE_LOG_REGISTER(bbdev_turbo_sw_logtype, pmd.bb.turbo_sw, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_turbo_sw_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 173041c026..2f48d4036b 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -777,4 +777,4 @@ static struct rte_dpaa_bus rte_dpaa_bus = {
 };
 
 RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus);
-RTE_LOG_REGISTER(dpaa_logtype_bus, bus.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_bus, NOTICE);
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 26910ac01f..becc455f6b 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -666,4 +666,4 @@ struct rte_fslmc_bus rte_fslmc_bus = {
 };
 
 RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus);
-RTE_LOG_REGISTER(dpaa2_logtype_bus, bus.fslmc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_bus, NOTICE);
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index bb8b3dcfb9..62887da2d8 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -472,4 +472,4 @@ static struct rte_bus rte_ifpga_bus = {
 };
 
 RTE_REGISTER_BUS(IFPGA_BUS_NAME, rte_ifpga_bus);
-RTE_LOG_REGISTER(ifpga_bus_logtype, bus.ifpga, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ifpga_bus_logtype, NOTICE);
diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build
index c770c6ba1e..410058de3a 100644
--- a/drivers/bus/meson.build
+++ b/drivers/bus/meson.build
@@ -9,4 +9,7 @@ drivers = [
         'vdev',
         'vmbus',
 ]
+
 std_deps = ['eal']
+
+log_prefix = 'bus'
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index d075409942..281a2c34e8 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -637,4 +637,4 @@ static struct rte_bus rte_vdev_bus = {
 };
 
 RTE_REGISTER_BUS(vdev, rte_vdev_bus);
-RTE_LOG_REGISTER(vdev_logtype_bus, bus.vdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vdev_logtype_bus, NOTICE);
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 39b3308577..d25fd14ef5 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -297,4 +297,4 @@ struct rte_vmbus_bus rte_vmbus_bus = {
 };
 
 RTE_REGISTER_BUS(vmbus, rte_vmbus_bus.bus);
-RTE_LOG_REGISTER(vmbus_logtype_bus, bus.vmbus, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vmbus_logtype_bus, NOTICE);
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 54f89e12ba..3d661102cc 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -462,4 +462,4 @@ dpaax_handle_memevents(void)
 					       dpaax_memevent_cb, NULL);
 }
 
-RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
+RTE_LOG_REGISTER_DEFAULT(dpaax_logger, ERR);
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index 08147314c6..0c7d5c0dae 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -85,4 +85,4 @@ iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
 	return IAVF_SUCCESS;
 }
 
-RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(iavf_common_logger, NOTICE);
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index d397459a3d..25e9f09108 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -39,7 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_common_logtype, NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0ecca12a83..81b937ee73 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -750,4 +750,4 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
-RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
+RTE_LOG_REGISTER_DEFAULT(isal_logtype_driver, INFO);
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 0581dee505..80c564f10b 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -23,7 +23,6 @@
 #include "mlx5_compress_utils.h"
 
 #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
-#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
 #define MLX5_COMPRESS_MAX_QPS 1024
 #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
 
@@ -873,7 +872,7 @@ RTE_INIT(rte_mlx5_compress_init)
 		mlx5_pci_driver_register(&mlx5_compress_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_compress_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index bee90fc7cd..dd62285b86 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -646,4 +646,4 @@ static struct rte_pci_driver octtx_zip_pmd = {
 
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
-RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
+RTE_LOG_REGISTER_DEFAULT(octtx_zip_logtype_driver, INFO);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 8a79d15c98..0220c6d038 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -426,4 +426,4 @@ static struct rte_vdev_driver zlib_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
-RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
+RTE_LOG_REGISTER_DEFAULT(zlib_logtype_driver, INFO);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..bc87e44a9d 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -975,4 +975,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_gcm_logtype_driver, NOTICE);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..a01c826a3c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -2229,4 +2229,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_mb_logtype_driver, NOTICE);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3f6cb66ba2..c642ac350f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -864,7 +864,7 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
-RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+RTE_LOG_REGISTER_DEFAULT(crypto_armv8_log_type, ERR);
 
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 9faf12f238..08fd67af50 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -21,5 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
-RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_conf_logtype, config, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_dp_logtype, fp, NOTICE)
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 5ff1b5c562..48b7db9e9b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -639,4 +639,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
 
-RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(kasumi_logtype_driver, NOTICE);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..b2cfa710f5 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -1019,4 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype_driver, NOTICE);
diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
index 26395159aa..0e0a94648c 100644
--- a/drivers/crypto/nitrox/nitrox_logs.c
+++ b/drivers/crypto/nitrox/nitrox_logs.c
@@ -4,4 +4,4 @@
 
 #include <rte_log.h>
 
-RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(nitrox_logtype, NOTICE);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index e04042e757..179e5ff36d 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -248,4 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
+RTE_LOG_REGISTER_DEFAULT(null_logtype_driver, INFO);
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..ba73c2f939 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -111,4 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7f45e57cce..d4e5ca080b 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -177,4 +177,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx2_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..47004337d5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2278,4 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
+RTE_LOG_REGISTER_DEFAULT(openssl_logtype_driver, INFO);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 9367a0e915..1e0b4df0ca 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -577,4 +577,4 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
 }
 
 
-RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
+RTE_LOG_REGISTER_DEFAULT(scheduler_logtype_driver, INFO);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 962868e1fc..9aab357846 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -653,4 +653,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
+RTE_LOG_REGISTER_DEFAULT(snow3g_logtype_driver, INFO);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1822f21744..4bae74a487 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1483,10 +1483,8 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
 RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
 	rte_virtio_crypto_driver.driver,
 	cryptodev_virtio_driver_id);
-RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
-		 NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
-		 NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_session, session, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_rx, rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_tx, tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_driver, driver, NOTICE);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..aa50c12da6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -580,4 +580,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
+RTE_LOG_REGISTER_DEFAULT(zuc_logtype_driver, INFO);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 3570678b9e..5696f568cd 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4655,4 +4655,4 @@ dlb2_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_dlb2_log_level, NOTICE);
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 460375ca30..ec74160325 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -46,7 +46,7 @@
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
-RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index e4fa3a2e46..5ccf22f77f 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1206,4 +1206,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_event, NOTICE);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 17325bbf6a..d8b359801a 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -22,7 +22,7 @@
 
 static uint8_t timvf_enable_stats;
 
-RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_logtype_ssovf, NOTICE);
 
 /* SSOPF Mailbox messages */
 
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 8af4d6e37f..688e9daa66 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -5,7 +5,7 @@
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
 
-RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_logtype_timvf, timer, NOTICE);
 
 static struct rte_eventdev *event_dev;
 
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3050578ffd..cfa9733b64 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -755,7 +755,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
 	.remove = opdl_remove
 };
 
-RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(opdl_logtype_driver, driver, INFO);
 
 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 0d8013adf7..a5e6ca22e8 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1151,4 +1151,4 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
 		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
 		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
 		REFIL_ONCE_ARG "=<int>");
-RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_sw_log_level, NOTICE);
diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 1ee7ffb647..f02056982c 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -37,7 +37,7 @@ struct dpaa_memseg_list rte_dpaa_memsegs
 
 struct dpaa_bp_info *rte_dpaa_bpid_info;
 
-RTE_LOG_REGISTER(dpaa_logtype_mempool, mempool.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_mempool, NOTICE);
 
 static int
 dpaa_mbuf_create_pool(struct rte_mempool *mp)
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index bc146e4ce1..771e0a0e28 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -457,4 +457,4 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = {
 
 MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
 
-RTE_LOG_REGISTER(dpaa2_logtype_mempool, mempool.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_mempool, NOTICE);
diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build
index caaffc3806..d295263b87 100644
--- a/drivers/mempool/meson.build
+++ b/drivers/mempool/meson.build
@@ -11,4 +11,7 @@ drivers = [
         'ring',
         'stack',
 ]
+
 std_deps = ['mempool']
+
+log_prefix = 'mempool'
diff --git a/drivers/meson.build b/drivers/meson.build
index 0052247a55..bff1761433 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -59,6 +59,11 @@ foreach subpath:subdirs
         drivers += driver_path[1]
     else
         class = subpath
+    endif
+
+    log_prefix = 'pmd.' + class
+
+    if drivers.length() == 0
         subdir(class)
     endif
 
@@ -137,6 +142,7 @@ foreach subpath:subdirs
 
         enabled_drivers += name
         lib_name = '_'.join(['rte', class, name])
+        cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=' + '.'.join([log_prefix, name])
         dpdk_conf.set(lib_name.to_upper(), 1)
 
         dpdk_extra_ldflags += pkgconfig_extra_libs
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a04f7c773a..2e90e2985c 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -97,7 +97,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(af_packet_logtype, pmd.net.af_packet, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0c91a40c4a..c2db21f9c1 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -60,7 +60,7 @@
 #define PF_XDP AF_XDP
 #endif
 
-RTE_LOG_REGISTER(af_xdp_logtype, pmd.net.af_xdp, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
 
 #define AF_XDP_LOG(level, fmt, args...)			\
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6372cf7740..2c1ac28056 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -1015,4 +1015,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ark,
 			      ARK_PKTGEN_ARG "=<filename> "
 			      ARK_PKTCHKR_ARG "=<filename> "
 			      ARK_PKTDIR_ARG "=<bitmap>");
-RTE_LOG_REGISTER(ark_logtype, pmd.net.ark, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ark_logtype, NOTICE);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index ce7f814f25..0ce35eb519 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1915,5 +1915,5 @@ is_atlantic_supported(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_atlantic, rte_atl_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_atlantic, pci_id_atl_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_atlantic, "* igb_uio | uio_pci_generic");
-RTE_LOG_REGISTER(atl_logtype_init, pmd.net.atlantic.init, NOTICE);
-RTE_LOG_REGISTER(atl_logtype_driver, pmd.net.atlantic.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 566a3606a2..623fa5e5ff 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2309,4 +2309,4 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_LOG_REGISTER(avp_logtype_driver, pmd.net.avp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(avp_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index ebe9a2876d..9cb4818af1 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2377,5 +2377,5 @@ static struct rte_pci_driver rte_axgbe_pmd = {
 RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(axgbe_logtype_init, pmd.net.axgbe.init, NOTICE);
-RTE_LOG_REGISTER(axgbe_logtype_driver, pmd.net.axgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 50db70dfcd..463886f17a 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -817,5 +817,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(bnx2x_logtype_init, pmd.net.bnx2x.init, NOTICE);
-RTE_LOG_REGISTER(bnx2x_logtype_driver, pmd.net.bnx2x.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 822853a008..3778e28cca 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6191,7 +6191,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
 	return is_device_supported(dev, &bnxt_rte_pmd);
 }
 
-RTE_LOG_REGISTER(bnxt_logtype_driver, pmd.net.bnxt.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 6ba09c4d9e..b01ef003e6 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3778,4 +3778,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"up_delay=<int> "
 	"down_delay=<int>");
 
+/* We can't use RTE_LOG_REGISTER_DEFAULT because of the forced name for
+ * this library, see meson.build.
+ */
 RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index e8a2de3ef3..a12a98157c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1474,5 +1474,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_cxgbe,
 			      CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
 			      CXGBE_DEVARG_PF_FILTER_MODE "=<uint32> "
 			      CXGBE_DEVARG_PF_FILTER_MASK "=<uint32> ");
-RTE_LOG_REGISTER(cxgbe_logtype, pmd.net.cxgbe, NOTICE);
-RTE_LOG_REGISTER(cxgbe_mbox_logtype, pmd.net.cxgbe.mbox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(cxgbe_logtype, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cxgbe_mbox_logtype, mbox, NOTICE);
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 57ee660c5e..27d670f843 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2311,4 +2311,4 @@ static struct rte_dpaa_driver rte_dpaa_pmd = {
 };
 
 RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
-RTE_LOG_REGISTER(dpaa_logtype_pmd, pmd.net.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_pmd, NOTICE);
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 95e8d9abe8..8b803b8542 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2895,4 +2895,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_dpaa2,
 		DRIVER_NO_PREFETCH_MODE "=<int>"
 		DRIVER_TX_CONF "=<int>"
 		DRIVER_ERROR_QUEUE "=<int>");
-RTE_LOG_REGISTER(dpaa2_logtype_pmd, pmd.net.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_pmd, NOTICE);
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index 23b7c67458..8dccca9e6d 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -5,11 +5,11 @@
 #include <rte_ethdev.h>
 #include "e1000_logs.h"
 
-RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
-RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_init, init, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_driver, driver, NOTICE)
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_rx, rx, DEBUG)
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_tx, tx, DEBUG)
 #endif
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f60e843b7f..f21a026b50 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2925,19 +2925,19 @@ RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ena, ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>");
-RTE_LOG_REGISTER(ena_logtype_init, pmd.net.ena.init, NOTICE);
-RTE_LOG_REGISTER(ena_logtype_driver, pmd.net.ena.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_driver, driver, NOTICE);
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
-RTE_LOG_REGISTER(ena_logtype_rx, pmd.net.ena.rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_rx, rx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX
-RTE_LOG_REGISTER(ena_logtype_tx, pmd.net.ena.tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx, tx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ena_logtype_tx_free, pmd.net.ena.tx_free, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx_free, tx_free, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
-RTE_LOG_REGISTER(ena_logtype_com, pmd.net.ena.com, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_com, com, NOTICE);
 #endif
 
 /******************************************************************************
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 0b45168c60..b496cd4700 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -960,4 +960,4 @@ static struct rte_pci_driver rte_enetc_pmd = {
 RTE_PMD_REGISTER_PCI(net_enetc, rte_enetc_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_enetc, pci_id_enetc_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_enetc, "* vfio-pci");
-RTE_LOG_REGISTER(enetc_logtype_pmd, pmd.net.enetc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(enetc_logtype_pmd, NOTICE);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index e1a393b847..ab64480f39 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -71,7 +71,7 @@ static const struct vic_speed_capa {
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
-RTE_LOG_REGISTER(enic_pmd_logtype, pmd.net.enic, INFO);
+RTE_LOG_REGISTER_DEFAULT(enic_pmd_logtype, INFO);
 
 static int
 enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index e3bda0df2b..8216063a3d 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -391,4 +391,4 @@ static struct rte_vdev_driver failsafe_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_LOG_REGISTER(failsafe_logtype, pmd.net.failsafe, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(failsafe_logtype, NOTICE)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 0a557acbef..3236290e40 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3285,11 +3285,11 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE);
-RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b5a36a863b..946465779f 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3266,4 +3266,4 @@ static struct rte_pci_driver rte_hinic_pmd = {
 
 RTE_PMD_REGISTER_PCI(net_hinic, rte_hinic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_hinic, pci_id_hinic_map);
-RTE_LOG_REGISTER(hinic_logtype, pmd.net.hinic, INFO);
+RTE_LOG_REGISTER_DEFAULT(hinic_logtype, INFO);
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2056a37c7d..b8e97355e9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -7598,5 +7598,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_hns3,
 		HNS3_DEVARG_RX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_TX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_DEV_CAPS_MASK "=<1-65535> ");
-RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
-RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d0586201f8..dd61258739 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12449,13 +12449,13 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
 	return ret;
 }
 
-RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
-RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_tx, tx, DEBUG);
 #endif
 
 RTE_PMD_REGISTER_PARAM_STRING(net_i40e,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c06873d26f..d688c31cfb 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2502,11 +2502,11 @@ RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
-RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
-RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 36b8bd1975..cb5c3319fd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5372,11 +5372,11 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
 			      ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
 
-RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE);
-RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/igc/igc_logs.c b/drivers/net/igc/igc_logs.c
index 2d458d7fb6..9cb8da527e 100644
--- a/drivers/net/igc/igc_logs.c
+++ b/drivers/net/igc/igc_logs.c
@@ -6,5 +6,5 @@
 
 #include "igc_logs.h"
 
-RTE_LOG_REGISTER(igc_logtype_init, pmd.net.igc.init, INFO);
-RTE_LOG_REGISTER(igc_logtype_driver, pmd.net.igc.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_init, init, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_driver, driver, INFO);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 5ec474dbf5..e620793966 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1296,4 +1296,4 @@ static struct rte_pci_driver rte_ionic_pmd = {
 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ionic_logtype, pmd.net.ionic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ionic_logtype, NOTICE);
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index e83bd92bac..964506c6db 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -583,4 +583,4 @@ static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.net.ipn3ke, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ipn3ke_afu_logtype, NOTICE);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7477a0f3a2..b5371568b5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8456,12 +8456,12 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe_vf,
 			      IXGBEVF_DEVARG_PFLINK_FULLCHK "=<0|1>");
 
-RTE_LOG_REGISTER(ixgbe_logtype_init, pmd.net.ixgbe.init, NOTICE);
-RTE_LOG_REGISTER(ixgbe_logtype_driver, pmd.net.ixgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_driver, driver, NOTICE);
 
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ixgbe_logtype_rx, pmd.net.ixgbe.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ixgbe_logtype_tx, pmd.net.ixgbe.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 51daf08591..871d11c413 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -68,7 +68,7 @@ static const struct rte_eth_link pmd_link = {
 };
 static int is_kni_initialized;
 
-RTE_LOG_REGISTER(eth_kni_logtype, pmd.net.kni, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_kni_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_kni_logtype, \
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 0b189d5d15..b72060a449 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2168,5 +2168,5 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(lio_logtype_init, pmd.net.liquidio.init, NOTICE);
-RTE_LOG_REGISTER(lio_logtype_driver, pmd.net.liquidio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7a..37a49fa13d 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1878,4 +1878,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_memif,
 			      ETH_MEMIF_ZC_ARG "=yes|no"
 			      ETH_MEMIF_SECRET_ARG "=<string>");
 
-RTE_LOG_REGISTER(memif_logtype, pmd.net.memif, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(memif_logtype, NOTICE);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d048d21033..7cd35cd3ca 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1319,7 +1319,7 @@ mlx4_glue_init(void)
 #endif
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx4_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b610f29a66..35f91e965e 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2442,7 +2442,7 @@ static struct mlx5_pci_driver mlx5_driver = {
 };
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index b0940b4462..a3ee150204 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -987,4 +987,4 @@ static struct rte_vdev_driver pmd_mvneta_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
-RTE_LOG_REGISTER(mvneta_logtype, pmd.net.mvneta, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mvneta_logtype, NOTICE);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1d41788974..63d348e279 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3309,4 +3309,4 @@ static struct rte_vdev_driver pmd_mrvl_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
 RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_LOG_REGISTER(mrvl_logtype, pmd.net.mvpp2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype, NOTICE);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index a7b7f15c16..9e2a405973 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1296,8 +1296,8 @@ static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
-RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PARAM_STRING(net_netvsc,
 			      NETVSC_ARG_LATENCY "=<uint32> "
 			      NETVSC_ARG_RXBREAK "=<uint32> "
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 888324cd20..ad2c2b55f6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3847,8 +3847,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
-RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 32764e8f0e..508bafc12a 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_null_logtype, \
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..9f4c0503b4 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -47,9 +47,9 @@ enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
-RTE_LOG_REGISTER(otx_net_logtype_mbox, pmd.net.octeontx.mbox, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_init, pmd.net.octeontx.init, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_driver, pmd.net.octeontx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_driver, driver, NOTICE);
 
 /* Parse integer from integer argument */
 static int
diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeontx_ep/otx_ep_ethdev.c
index b35c88b347..a243683d61 100644
--- a/drivers/net/octeontx_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeontx_ep/otx_ep_ethdev.c
@@ -463,4 +463,4 @@ static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_net_ep_logtype, NOTICE);
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 883a0c494a..a8774b7a43 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -141,7 +141,7 @@ static struct rte_eth_link pmd_link = {
 		.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_pcap_logtype, pmd.net.pcap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_pcap_logtype, NOTICE);
 
 static struct queue_missed_stat*
 queue_missed_stat_update(struct rte_eth_dev *dev, unsigned int qid)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 8cf59e210d..3135466713 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -1177,4 +1177,4 @@ struct rte_vdev_driver pmd_pfe_drv = {
 
 RTE_PMD_REGISTER_VDEV(PFE_NAME_PMD, pmd_pfe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(PFE_NAME_PMD, PFE_VDEV_GEM_ID_ARG "=<int> ");
-RTE_LOG_REGISTER(pfe_logtype_pmd, pmd.net.pfe, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pfe_logtype_pmd, NOTICE);
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index c2c8de8675..323d46e6eb 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2892,5 +2892,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(qede_logtype_init, pmd.net.qede.init, NOTICE);
-RTE_LOG_REGISTER(qede_logtype_driver, pmd.net.qede.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 02f6da2817..1faf38a714 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -62,7 +62,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_ring_logtype, pmd.net.ring, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_ring_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 0c2a79a7d2..f64023256d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -80,7 +80,7 @@ static const struct softnic_conn_params conn_params_default = {
 	.msg_handle_arg = NULL,
 };
 
-RTE_LOG_REGISTER(pmd_softnic_logtype, pmd.net.softnic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pmd_softnic_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 6eaeadf1c8..7416a6b1b8 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1949,5 +1949,5 @@ RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver);
 RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
 RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
 	"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_LOG_REGISTER(szedata2_logtype_init, pmd.net.szedata2.init, NOTICE);
-RTE_LOG_REGISTER(szedata2_logtype_driver, pmd.net.szedata2.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 854abf4b30..5735988e7c 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2571,4 +2571,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap,
 			      ETH_TAP_IFACE_ARG "=<string> "
 			      ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " "
 			      ETH_TAP_REMOTE_ARG "=<string>");
-RTE_LOG_REGISTER(tap_logtype, pmd.net.tap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(tap_logtype, NOTICE);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index c45d6e00a9..fc1844ddfc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -51,9 +51,9 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 static int nicvf_vlan_offload_config(struct rte_eth_dev *dev, int mask);
 static int nicvf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
-RTE_LOG_REGISTER(nicvf_logtype_mbox, pmd.net.thunderx.mbox, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_init, pmd.net.thunderx.init, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_driver, pmd.net.thunderx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_driver, driver, NOTICE);
 
 static void
 nicvf_link_status_update(struct nicvf *nic,
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d7747d0f09..46d6f541b5 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -5332,17 +5332,17 @@ RTE_PMD_REGISTER_PARAM_STRING(net_txgbe,
 			      TXGBE_DEVARG_FFE_PRE "=<uint16>"
 			      TXGBE_DEVARG_FFE_POST "=<uint16>");
 
-RTE_LOG_REGISTER(txgbe_logtype_init, pmd.net.txgbe.init, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_driver, pmd.net.txgbe.driver, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_bp, pmd.net.txgbe.bp, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_driver, driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_bp, bp, NOTICE);
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
-	RTE_LOG_REGISTER(txgbe_logtype_rx, pmd.net.txgbe.rx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
-	RTE_LOG_REGISTER(txgbe_logtype_tx, pmd.net.txgbe.tx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx, tx, DEBUG);
 #endif
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
-	RTE_LOG_REGISTER(txgbe_logtype_tx_free, pmd.net.txgbe.tx_free, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx_free, tx_free, DEBUG);
 #endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c1b7099717..55f2a342c5 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -48,7 +48,7 @@
 #define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
 #define NETVSC_MAX_ROUTE_LINE_SIZE 300
 
-RTE_LOG_REGISTER(vdev_netvsc_logtype, pmd.net.vdev_netvsc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vdev_netvsc_logtype, NOTICE);
 
 #define DRV_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, \
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 281379d6a3..8524898661 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -19,7 +19,7 @@
 
 #include "rte_eth_vhost.h"
 
-RTE_LOG_REGISTER(vhost_logtype, pmd.net.vhost, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
 
 #define VHOST_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 090d94615e..0568305667 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2483,5 +2483,5 @@ __rte_unused uint8_t is_rx)
 	return 0;
 }
 
-RTE_LOG_REGISTER(virtio_logtype_init, pmd.net.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_logtype_driver, pmd.net.virtio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1a313bfc4..5bffbb8a0e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1491,5 +1491,5 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE);
-RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_driver, driver, NOTICE);
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 7ccebfa3fa..76e6a8530b 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1611,7 +1611,7 @@ static struct rte_pci_driver rte_ifpga_rawdev_pmd = {
 RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ifpga_rawdev_logtype, pmd.raw.ifpga, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ifpga_rawdev_logtype, NOTICE);
 
 static const char * const valid_args[] = {
 #define IFPGA_ARG_NAME         "ifpga"
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 15af07017c..5396671d4f 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,7 +28,7 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, pmd.raw.ioat, INFO);
+RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
 
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6703bb5d08..78cfcd79f7 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1547,4 +1547,4 @@ static struct rte_pci_driver rte_ntb_pmd = {
 RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map);
 RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ntb_logtype, pmd.raw.ntb, INFO);
+RTE_LOG_REGISTER_DEFAULT(ntb_logtype, INFO);
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 8896f0c9c5..16ecae3d92 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -768,4 +768,4 @@ static struct rte_vdev_driver skeleton_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_LOG_REGISTER(skeleton_pmd_logtype, pmd.raw.skeleton, INFO);
+RTE_LOG_REGISTER_DEFAULT(skeleton_pmd_logtype, INFO);
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index dd96436d42..dcb2ced88e 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -21,7 +21,6 @@
 #include "mlx5_rxp_csrs.h"
 
 #define MLX5_REGEX_DRIVER_NAME regex_mlx5
-#define MLX5_REGEX_LOG_NAME    pmd.regex.mlx5
 
 int mlx5_regex_logtype;
 
@@ -275,7 +274,7 @@ RTE_INIT(rte_mlx5_regex_init)
 		mlx5_pci_driver_register(&mlx5_regex_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_regex_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 719e594c44..40db28b6db 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -841,7 +841,7 @@ static struct mlx5_pci_driver mlx5_vdpa_driver = {
 	},
 };
 
-RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_vdpa_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index 5ba891c232..fc37236195 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -29,7 +29,7 @@
 
 
 /* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/lib/bpf/bpf.c b/lib/bpf/bpf.c
index 8d15885bc4..0caad2a8f0 100644
--- a/lib/bpf/bpf.c
+++ b/lib/bpf/bpf.c
@@ -53,4 +53,4 @@ bpf_jit(struct rte_bpf *bpf)
 	return rc;
 }
 
-RTE_LOG_REGISTER(rte_bpf_logtype, lib.bpf, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_bpf_logtype, INFO);
diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index 002022263e..9fa7d010ef 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -27,7 +27,7 @@ struct rte_cfgfile {
 	struct rte_cfgfile_section *sections;
 };
 
-RTE_LOG_REGISTER(cfgfile_logtype, lib.cfgfile, INFO);
+RTE_LOG_REGISTER_DEFAULT(cfgfile_logtype, INFO);
 
 #define CFG_LOG(level, fmt, args...)					\
 	rte_log(RTE_LOG_ ## level, cfgfile_logtype, "%s(): " fmt "\n",	\
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index 49a342f400..2e9218af68 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -763,4 +763,4 @@ rte_compressdev_name_get(uint8_t dev_id)
 	return dev->data->name;
 }
 
-RTE_LOG_REGISTER(compressdev_logtype, lib.compressdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(compressdev_logtype, NOTICE);
diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h
index a1c608ab41..b706bb8710 100644
--- a/lib/eal/include/rte_log.h
+++ b/lib/eal/include/rte_log.h
@@ -373,6 +373,15 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
+#define RTE_LOG_REGISTER_IMPL(type, name, level)			    \
+int type;								    \
+RTE_INIT(__##type)							    \
+{									    \
+	type = rte_log_register_type_and_pick_level(name, RTE_LOG_##level); \
+	if (type < 0)                                                       \
+		type = RTE_LOGTYPE_EAL;                                     \
+}
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -389,15 +398,29 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
  * @param level
  *   Log level. A value between EMERG (1) and DEBUG (8).
  */
-#define RTE_LOG_REGISTER(type, name, level)				\
-int type;								\
-RTE_INIT(__##type)							\
-{									\
-	type = rte_log_register_type_and_pick_level(RTE_STR(name),	\
-						    RTE_LOG_##level);	\
-	if (type < 0)                                                   \
-		type = RTE_LOGTYPE_EAL;                                 \
-}
+#define RTE_LOG_REGISTER(type, name, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(name), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right format for the logtype.
+ */
+#define RTE_LOG_REGISTER_DEFAULT(type, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(RTE_LOG_DEFAULT_LOGTYPE), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right prefix for the logtype.
+ */
+#define RTE_LOG_REGISTER_SUFFIX(type, suffix, level)			      \
+	RTE_LOG_REGISTER_IMPL(type,					      \
+		 RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) "." RTE_STR(suffix), level)
 
 #ifdef __cplusplus
 }
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 483013ec7a..c607eabb5b 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6294,7 +6294,7 @@ rte_eth_representor_info_get(uint16_t port_id,
 	return eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info));
 }
 
-RTE_LOG_REGISTER(rte_eth_dev_logtype, lib.ethdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);
 
 RTE_INIT(ethdev_init_telemetry)
 {
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index dd7b83087d..ee20b39f4b 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -29,9 +29,9 @@
 #define DATA_MZ_NAME_MAX_LEN 64
 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d"
 
-RTE_LOG_REGISTER(evtim_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_buffer_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_svc_logtype, lib.eventdev.adapter.timer.svc, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_buffer_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_svc_logtype, adapter.timer.svc, NOTICE);
 
 static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX];
 
diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c
index 639b0051f5..f125267e8f 100644
--- a/lib/flow_classify/rte_flow_classify.c
+++ b/lib/flow_classify/rte_flow_classify.c
@@ -667,4 +667,4 @@ rte_flow_classifier_query(struct rte_flow_classifier *cls,
 	return ret;
 }
 
-RTE_LOG_REGISTER(librte_flow_classify_logtype, lib.flow_classify, INFO);
+RTE_LOG_REGISTER_DEFAULT(librte_flow_classify_logtype, INFO);
diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 7224b00a7d..d61288647c 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -578,4 +578,4 @@ rte_graph_max_count(void)
 	return graph_id;
 }
 
-RTE_LOG_REGISTER(rte_graph_logtype, lib.graph, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_graph_logtype, INFO);
diff --git a/lib/member/rte_member.c b/lib/member/rte_member.c
index 4696c0f171..9dd55a5adf 100644
--- a/lib/member/rte_member.c
+++ b/lib/member/rte_member.c
@@ -297,4 +297,4 @@ rte_member_reset(const struct rte_member_setsum *setsum)
 	}
 }
 
-RTE_LOG_REGISTER(librte_member_logtype, lib.member, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(librte_member_logtype, DEBUG);
diff --git a/lib/meson.build b/lib/meson.build
index a4fb0dbdd4..4a64756a68 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -178,6 +178,7 @@ foreach l:libraries
     if use_function_versioning
         cflags += '-DRTE_USE_FUNCTION_VERSIONING'
     endif
+    cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l
 
     # first build static lib
     static_lib = static_library(libname,
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index c24990d923..269f8ef613 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -528,7 +528,7 @@ handle_ports_stats_values_by_name(const char *cmd __rte_unused,
 	return used;
 }
 
-RTE_LOG_REGISTER(metrics_log_level, lib.metrics, ERR);
+RTE_LOG_REGISTER_DEFAULT(metrics_log_level, ERR);
 
 RTE_INIT(metrics_ctor)
 {
diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index 1fe58f7c75..d9a526ab7b 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -76,7 +76,7 @@ static uint16_t max_simd_bitwidth;
 	rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n",	\
 		__func__, ## args)
 
-RTE_LOG_REGISTER(libnet_logtype, lib.net, INFO);
+RTE_LOG_REGISTER_DEFAULT(libnet_logtype, INFO);
 
 /* Scalar handling */
 
diff --git a/lib/node/log.c b/lib/node/log.c
index f14199f07c..a6578ee33b 100644
--- a/lib/node/log.c
+++ b/lib/node/log.c
@@ -4,4 +4,4 @@
 
 #include "node_private.h"
 
-RTE_LOG_REGISTER(rte_node_logtype, lib.node, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_node_logtype, INFO);
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index d20e944e04..382217bc15 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -12,7 +12,7 @@
 
 #include "rte_pdump.h"
 
-RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pdump_logtype, NOTICE);
 
 /* Macro for printing using RTE_LOG */
 #define PDUMP_LOG(level, fmt, args...)				\
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index f29164dd15..a6134e76ea 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -627,7 +627,7 @@ handle_dev_xstats(const char *cmd __rte_unused,
 	return 0;
 }
 
-RTE_LOG_REGISTER(librawdev_logtype, lib.rawdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(librawdev_logtype, INFO);
 
 RTE_INIT(librawdev_init_telemetry)
 {
diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c
index a5f9de3267..7510db2f81 100644
--- a/lib/rcu/rte_rcu_qsbr.c
+++ b/lib/rcu/rte_rcu_qsbr.c
@@ -496,4 +496,4 @@ rte_rcu_qsbr_dq_delete(struct rte_rcu_qsbr_dq *dq)
 	return 0;
 }
 
-RTE_LOG_REGISTER(rte_rcu_log_type, lib.rcu, ERR);
+RTE_LOG_REGISTER_DEFAULT(rte_rcu_log_type, ERR);
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index 10d3b2eeb3..f1cbb9803f 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -194,4 +194,4 @@ rte_stack_lookup(const char *name)
 	return r;
 }
 
-RTE_LOG_REGISTER(stack_logtype, lib.stack, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(stack_logtype, NOTICE);
diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 9abfc0bfe7..9cbcf650b6 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -1779,5 +1779,5 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	return ret;
 }
 
-RTE_LOG_REGISTER(vhost_config_log_level, lib.vhost.config, INFO);
-RTE_LOG_REGISTER(vhost_data_log_level, lib.vhost.data, WARNING);
+RTE_LOG_REGISTER_SUFFIX(vhost_config_log_level, config, INFO);
+RTE_LOG_REGISTER_SUFFIX(vhost_data_log_level, data, WARNING);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
@ 2021-05-11 11:15   ` David Marchand
  2021-05-11 11:49   ` Bruce Richardson
  2021-05-11 11:59   ` Bruce Richardson
  2 siblings, 0 replies; 14+ messages in thread
From: David Marchand @ 2021-05-11 11:15 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Andrew Rybchenko, Yigit, Ferruh, Bruce Richardson

On Tue, May 11, 2021 at 12:09 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> From: David Marchand <david.marchand@redhat.com>
>
> Let's try to enforce the convention where most drivers use a pmd. logtype
> with their class reflected in it, and libraries use a lib. logtype.
>
> Introduce two new macros:
> - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
>   used in a component. It is associated to the default name provided
>   by the build system,
> - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
>   and then the passed name is appended to the default name,
>
> RTE_LOG_REGISTER is left untouched for existing external users
> and for components that do not comply with the convention.
>
> There is a new Meson variable log_prefix to adapt the default name
> for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

These exceptions can be updated in the commands below:

>
> Note: achieved with below commands + reverted change on net/bonding +
> edits on crypto/virtio, compress/mlx5, regex/mlx5, baseband, bus and
> mempool drivers.
>
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     pattern=pmd.$class.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done

Becomes:

    Note: achieved with below commands + reverted change on net/bonding +
    edits on crypto/virtio, compress/mlx5, regex/mlx5

    $ git grep -l RTE_LOG_REGISTER drivers/ |
      while read file; do
        pattern=${file##drivers/};
        class=${pattern%%/*};
        pattern=${pattern#$class/};
        drv=${pattern%%/*};
        case "$class" in
          baseband) pattern=pmd.bb.$drv;;
          bus) pattern=bus.$drv;;
          mempool) pattern=mempool.$drv;;
          *) pattern=pmd.$class.$drv;;
        esac
        sed -i -e 's/RTE_LOG_REGISTER(\(.*\),
'$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
        sed -i -e 's/RTE_LOG_REGISTER(\(.*\),
'$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
      done

>
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>
> Changes since v2:
> - use RTE_LOG_REGISTER_DEFAULT in baseband, bus, mempool
>   by adding the variable log_prefix in drivers/meson.build

Compared the registered logtypes before/after, all good.
Thanks for this addition.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
  2021-05-11 11:15   ` David Marchand
@ 2021-05-11 11:49   ` Bruce Richardson
  2021-05-11 12:01     ` Thomas Monjalon
  2021-05-11 11:59   ` Bruce Richardson
  2 siblings, 1 reply; 14+ messages in thread
From: Bruce Richardson @ 2021-05-11 11:49 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> From: David Marchand <david.marchand@redhat.com>
> 
> Let's try to enforce the convention where most drivers use a pmd. logtype
> with their class reflected in it, and libraries use a lib. logtype.
> 
> Introduce two new macros:
> - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
>   used in a component. It is associated to the default name provided
>   by the build system,
> - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
>   and then the passed name is appended to the default name,
> 
> RTE_LOG_REGISTER is left untouched for existing external users
> and for components that do not comply with the convention.
> 
> There is a new Meson variable log_prefix to adapt the default name
> for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
> 
> Note: achieved with below commands + reverted change on net/bonding +
> edits on crypto/virtio, compress/mlx5, regex/mlx5, baseband, bus and
> mempool drivers.
> 
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     pattern=pmd.$class.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> 
> Changes since v2:
> - use RTE_LOG_REGISTER_DEFAULT in baseband, bus, mempool
>   by adding the variable log_prefix in drivers/meson.build
> 
> Changes since v1:
> - moved default logtype generation in the build system,
> - rebased,
> - reverted net/bonding change,
> 
<snip>
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index 7601162c4f..f58ae948ff 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -986,6 +986,12 @@ includes
>  
>  	includes += include_directories('base')
>  
> +log_prefix
> +	**Default Value = pmd.<class>**
> +	Some driver classes have a customized log prefix.
> +	This prefix is combined with the driver name
> +	when registering a default log name for the driver.
> +

I don't think this should be added here. This section is for elements to be
defined in the meson.build file of each individual driver. This value,
though, is to be defined per class, rather than per-driver. We don't have a
doc section for that, but perhaps one is needed.

For now, I'd just omit documenting this value as it should only be of
relevance for the couple of existing driver classes that use it. Nobody
else contributing new code to DPDK should need it.

/Bruce

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
  2021-05-11 11:15   ` David Marchand
  2021-05-11 11:49   ` Bruce Richardson
@ 2021-05-11 11:59   ` Bruce Richardson
  2021-05-11 12:10     ` Thomas Monjalon
  2 siblings, 1 reply; 14+ messages in thread
From: Bruce Richardson @ 2021-05-11 11:59 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> From: David Marchand <david.marchand@redhat.com>
> 
> Let's try to enforce the convention where most drivers use a pmd. logtype
> with their class reflected in it, and libraries use a lib. logtype.
> 
> Introduce two new macros:
> - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
>   used in a component. It is associated to the default name provided
>   by the build system,
> - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
>   and then the passed name is appended to the default name,
> 
> RTE_LOG_REGISTER is left untouched for existing external users
> and for components that do not comply with the convention.
> 
> There is a new Meson variable log_prefix to adapt the default name
> for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
> 
> Note: achieved with below commands + reverted change on net/bonding +
> edits on crypto/virtio, compress/mlx5, regex/mlx5, baseband, bus and
> mempool drivers.
> 
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     pattern=pmd.$class.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> 
> Changes since v2:
> - use RTE_LOG_REGISTER_DEFAULT in baseband, bus, mempool
>   by adding the variable log_prefix in drivers/meson.build
> 
> Changes since v1:
> - moved default logtype generation in the build system,
> - rebased,
> - reverted net/bonding change,
> 
> ---
>  doc/guides/contributing/coding_style.rst      |  6 +++
>  drivers/baseband/acc100/rte_acc100_pmd.c      |  4 +-
>  .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  4 +-
>  drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |  4 +-
>  drivers/baseband/meson.build                  |  2 +
>  drivers/baseband/null/bbdev_null.c            |  2 +-
>  .../baseband/turbo_sw/bbdev_turbo_software.c  |  2 +-
>  drivers/bus/dpaa/dpaa_bus.c                   |  2 +-
>  drivers/bus/fslmc/fslmc_bus.c                 |  2 +-
>  drivers/bus/ifpga/ifpga_bus.c                 |  2 +-
>  drivers/bus/meson.build                       |  3 ++
>  drivers/bus/vdev/vdev.c                       |  2 +-
>  drivers/bus/vmbus/vmbus_common.c              |  2 +-
>  drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
>  drivers/common/iavf/iavf_impl.c               |  2 +-
>  drivers/common/mlx5/mlx5_common.c             |  2 +-
>  drivers/compress/isal/isal_compress_pmd.c     |  2 +-
>  drivers/compress/mlx5/mlx5_compress.c         |  3 +-
>  drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
>  drivers/compress/zlib/zlib_pmd.c              |  2 +-
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
>  drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
>  drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
>  drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
>  drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
>  drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
>  drivers/crypto/null/null_crypto_pmd.c         |  2 +-
>  drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
>  drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
>  .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
>  drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
>  drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
>  drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
>  drivers/event/dlb2/dlb2.c                     |  2 +-
>  drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
>  drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
>  drivers/event/octeontx/ssovf_evdev.c          |  2 +-
>  drivers/event/octeontx/timvf_evdev.c          |  2 +-
>  drivers/event/opdl/opdl_evdev.c               |  2 +-
>  drivers/event/sw/sw_evdev.c                   |  2 +-
>  drivers/mempool/dpaa/dpaa_mempool.c           |  2 +-
>  drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
>  drivers/mempool/meson.build                   |  3 ++
>  drivers/meson.build                           |  6 +++
>  drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
>  drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
>  drivers/net/ark/ark_ethdev.c                  |  2 +-
>  drivers/net/atlantic/atl_ethdev.c             |  4 +-
>  drivers/net/avp/avp_ethdev.c                  |  2 +-
>  drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
>  drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
>  drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
>  drivers/net/bonding/rte_eth_bond_pmd.c        |  3 ++
>  drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
>  drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
>  drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
>  drivers/net/e1000/e1000_logs.c                |  8 ++--
>  drivers/net/ena/ena_ethdev.c                  | 12 +++---
>  drivers/net/enetc/enetc_ethdev.c              |  2 +-
>  drivers/net/enic/enic_ethdev.c                |  2 +-
>  drivers/net/failsafe/failsafe.c               |  2 +-
>  drivers/net/fm10k/fm10k_ethdev.c              |  8 ++--
>  drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
>  drivers/net/hns3/hns3_ethdev.c                |  4 +-
>  drivers/net/i40e/i40e_ethdev.c                |  8 ++--
>  drivers/net/iavf/iavf_ethdev.c                |  8 ++--
>  drivers/net/ice/ice_ethdev.c                  |  8 ++--
>  drivers/net/igc/igc_logs.c                    |  4 +-
>  drivers/net/ionic/ionic_ethdev.c              |  2 +-
>  drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
>  drivers/net/ixgbe/ixgbe_ethdev.c              |  8 ++--
>  drivers/net/kni/rte_eth_kni.c                 |  2 +-
>  drivers/net/liquidio/lio_ethdev.c             |  4 +-
>  drivers/net/memif/rte_eth_memif.c             |  2 +-
>  drivers/net/mlx4/mlx4.c                       |  2 +-
>  drivers/net/mlx5/mlx5.c                       |  2 +-
>  drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
>  drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
>  drivers/net/netvsc/hn_ethdev.c                |  4 +-
>  drivers/net/nfp/nfp_net.c                     |  4 +-
>  drivers/net/null/rte_eth_null.c               |  2 +-
>  drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
>  drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
>  drivers/net/pcap/pcap_ethdev.c                |  2 +-
>  drivers/net/pfe/pfe_ethdev.c                  |  2 +-
>  drivers/net/qede/qede_ethdev.c                |  4 +-
>  drivers/net/ring/rte_eth_ring.c               |  2 +-
>  drivers/net/softnic/rte_eth_softnic.c         |  2 +-
>  drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
>  drivers/net/tap/rte_eth_tap.c                 |  2 +-
>  drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
>  drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
>  drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
>  drivers/net/vhost/rte_eth_vhost.c             |  2 +-
>  drivers/net/virtio/virtio_ethdev.c            |  4 +-
>  drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
>  drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
>  drivers/raw/ioat/ioat_rawdev.c                |  2 +-
>  drivers/raw/ntb/ntb.c                         |  2 +-
>  drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
>  drivers/regex/mlx5/mlx5_regex.c               |  3 +-
>  drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
>  lib/bbdev/rte_bbdev.c                         |  2 +-
>  lib/bpf/bpf.c                                 |  2 +-
>  lib/cfgfile/rte_cfgfile.c                     |  2 +-
>  lib/compressdev/rte_compressdev.c             |  2 +-
>  lib/eal/include/rte_log.h                     | 41 +++++++++++++++----
>  lib/ethdev/rte_ethdev.c                       |  2 +-
>  lib/eventdev/rte_event_timer_adapter.c        |  6 +--
>  lib/flow_classify/rte_flow_classify.c         |  2 +-
>  lib/graph/graph.c                             |  2 +-
>  lib/member/rte_member.c                       |  2 +-
>  lib/meson.build                               |  1 +
>  lib/metrics/rte_metrics_telemetry.c           |  2 +-
>  lib/net/rte_net_crc.c                         |  2 +-
>  lib/node/log.c                                |  2 +-
>  lib/pdump/rte_pdump.c                         |  2 +-
>  lib/rawdev/rte_rawdev.c                       |  2 +-
>  lib/rcu/rte_rcu_qsbr.c                        |  2 +-
>  lib/stack/rte_stack.c                         |  2 +-
>  lib/vhost/vhost.c                             |  4 +-
>  123 files changed, 227 insertions(+), 184 deletions(-)
> 
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index 7601162c4f..f58ae948ff 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -986,6 +986,12 @@ includes
>  
>  	includes += include_directories('base')
>  
> +log_prefix
> +	**Default Value = pmd.<class>**
> +	Some driver classes have a customized log prefix.
> +	This prefix is combined with the driver name
> +	when registering a default log name for the driver.
> +
>  name
>  	As above, though note that each driver class can define it's own naming
>  	scheme for the resulting ``.so`` files.
> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
> index ca2703fbe1..68ba523ea9 100644
> --- a/drivers/baseband/acc100/rte_acc100_pmd.c
> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c
> @@ -24,9 +24,9 @@
>  #include "rte_acc100_pmd.h"
>  
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
> -RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, DEBUG);
> +RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
>  #else
> -RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(acc100_logtype, NOTICE);
>  #endif
>  
>  /* Write to MMIO register address */
> diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> index 026fc894d6..6485cc824a 100644
> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> @@ -24,9 +24,9 @@
>  #include "rte_pmd_fpga_5gnr_fec.h"
>  
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
> -RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, DEBUG);
> +RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, DEBUG);
>  #else
> -RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, NOTICE);
>  #endif
>  
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> index 1a72aa7b70..350c4248eb 100644
> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> @@ -23,9 +23,9 @@
>  #include "fpga_lte_fec.h"
>  
>  #ifdef RTE_LIBRTE_BBDEV_DEBUG
> -RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, DEBUG);
> +RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, DEBUG);
>  #else
> -RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, NOTICE);
>  #endif
>  
>  /* Helper macro for logging */
> diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
> index c98ebd9024..5ee61d5323 100644
> --- a/drivers/baseband/meson.build
> +++ b/drivers/baseband/meson.build
> @@ -12,3 +12,5 @@ drivers = [
>          'null',
>          'turbo_sw',
>  ]
> +
> +log_prefix = 'pmd.bb'
> diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
> index 6cf3988b88..53c538ba44 100644
> --- a/drivers/baseband/null/bbdev_null.c
> +++ b/drivers/baseband/null/bbdev_null.c
> @@ -15,7 +15,7 @@
>  
>  #define DRIVER_NAME baseband_null
>  
> -RTE_LOG_REGISTER(bbdev_null_logtype, pmd.bb.null, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(bbdev_null_logtype, NOTICE);
>  
>  /* Helper macro for logging */
>  #define rte_bbdev_log(level, fmt, ...) \
> diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> index 85cf93d7bc..77e9a2ecbc 100644
> --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
> @@ -35,7 +35,7 @@
>  
>  #define DRIVER_NAME baseband_turbo_sw
>  
> -RTE_LOG_REGISTER(bbdev_turbo_sw_logtype, pmd.bb.turbo_sw, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(bbdev_turbo_sw_logtype, NOTICE);
>  
>  /* Helper macro for logging */
>  #define rte_bbdev_log(level, fmt, ...) \
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index 173041c026..2f48d4036b 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -777,4 +777,4 @@ static struct rte_dpaa_bus rte_dpaa_bus = {
>  };
>  
>  RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus);
> -RTE_LOG_REGISTER(dpaa_logtype_bus, bus.dpaa, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_bus, NOTICE);
> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
> index 26910ac01f..becc455f6b 100644
> --- a/drivers/bus/fslmc/fslmc_bus.c
> +++ b/drivers/bus/fslmc/fslmc_bus.c
> @@ -666,4 +666,4 @@ struct rte_fslmc_bus rte_fslmc_bus = {
>  };
>  
>  RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus);
> -RTE_LOG_REGISTER(dpaa2_logtype_bus, bus.fslmc, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_bus, NOTICE);
> diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
> index bb8b3dcfb9..62887da2d8 100644
> --- a/drivers/bus/ifpga/ifpga_bus.c
> +++ b/drivers/bus/ifpga/ifpga_bus.c
> @@ -472,4 +472,4 @@ static struct rte_bus rte_ifpga_bus = {
>  };
>  
>  RTE_REGISTER_BUS(IFPGA_BUS_NAME, rte_ifpga_bus);
> -RTE_LOG_REGISTER(ifpga_bus_logtype, bus.ifpga, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(ifpga_bus_logtype, NOTICE);
> diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build
> index c770c6ba1e..410058de3a 100644
> --- a/drivers/bus/meson.build
> +++ b/drivers/bus/meson.build
> @@ -9,4 +9,7 @@ drivers = [
>          'vdev',
>          'vmbus',
>  ]
> +
>  std_deps = ['eal']
> +
> +log_prefix = 'bus'
> diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
> index d075409942..281a2c34e8 100644
> --- a/drivers/bus/vdev/vdev.c
> +++ b/drivers/bus/vdev/vdev.c
> @@ -637,4 +637,4 @@ static struct rte_bus rte_vdev_bus = {
>  };
>  
>  RTE_REGISTER_BUS(vdev, rte_vdev_bus);
> -RTE_LOG_REGISTER(vdev_logtype_bus, bus.vdev, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(vdev_logtype_bus, NOTICE);
> diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
> index 39b3308577..d25fd14ef5 100644
> --- a/drivers/bus/vmbus/vmbus_common.c
> +++ b/drivers/bus/vmbus/vmbus_common.c
> @@ -297,4 +297,4 @@ struct rte_vmbus_bus rte_vmbus_bus = {
>  };
>  
>  RTE_REGISTER_BUS(vmbus, rte_vmbus_bus.bus);
> -RTE_LOG_REGISTER(vmbus_logtype_bus, bus.vmbus, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(vmbus_logtype_bus, NOTICE);
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 54f89e12ba..3d661102cc 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -462,4 +462,4 @@ dpaax_handle_memevents(void)
>  					       dpaax_memevent_cb, NULL);
>  }
>  
> -RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
> +RTE_LOG_REGISTER_DEFAULT(dpaax_logger, ERR);
> diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
> index 08147314c6..0c7d5c0dae 100644
> --- a/drivers/common/iavf/iavf_impl.c
> +++ b/drivers/common/iavf/iavf_impl.c
> @@ -85,4 +85,4 @@ iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
>  	return IAVF_SUCCESS;
>  }
>  
> -RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(iavf_common_logger, NOTICE);
> diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
> index d397459a3d..25e9f09108 100644
> --- a/drivers/common/mlx5/mlx5_common.c
> +++ b/drivers/common/mlx5/mlx5_common.c
> @@ -39,7 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
>  }
>  #endif
>  
> -RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
> +RTE_LOG_REGISTER_DEFAULT(mlx5_common_logtype, NOTICE)
>  
>  static bool mlx5_common_initialized;
>  
> diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
> index 0ecca12a83..81b937ee73 100644
> --- a/drivers/compress/isal/isal_compress_pmd.c
> +++ b/drivers/compress/isal/isal_compress_pmd.c
> @@ -750,4 +750,4 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
>  RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
>  	"socket_id=<int>");
> -RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
> +RTE_LOG_REGISTER_DEFAULT(isal_logtype_driver, INFO);
> diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
> index 0581dee505..80c564f10b 100644
> --- a/drivers/compress/mlx5/mlx5_compress.c
> +++ b/drivers/compress/mlx5/mlx5_compress.c
> @@ -23,7 +23,6 @@
>  #include "mlx5_compress_utils.h"
>  
>  #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
> -#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
>  #define MLX5_COMPRESS_MAX_QPS 1024
>  #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
>  
> @@ -873,7 +872,7 @@ RTE_INIT(rte_mlx5_compress_init)
>  		mlx5_pci_driver_register(&mlx5_compress_driver);
>  }
>  
> -RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
> +RTE_LOG_REGISTER_DEFAULT(mlx5_compress_logtype, NOTICE)
>  RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
>  RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
>  RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
> diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
> index bee90fc7cd..dd62285b86 100644
> --- a/drivers/compress/octeontx/otx_zip_pmd.c
> +++ b/drivers/compress/octeontx/otx_zip_pmd.c
> @@ -646,4 +646,4 @@ static struct rte_pci_driver octtx_zip_pmd = {
>  
>  RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
>  RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
> -RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
> +RTE_LOG_REGISTER_DEFAULT(octtx_zip_logtype_driver, INFO);
> diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
> index 8a79d15c98..0220c6d038 100644
> --- a/drivers/compress/zlib/zlib_pmd.c
> +++ b/drivers/compress/zlib/zlib_pmd.c
> @@ -426,4 +426,4 @@ static struct rte_vdev_driver zlib_pmd_drv = {
>  };
>  
>  RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
> -RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
> +RTE_LOG_REGISTER_DEFAULT(zlib_logtype_driver, INFO);
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index 0de51202a6..bc87e44a9d 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -975,4 +975,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
>  		cryptodev_driver_id);
> -RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(aesni_gcm_logtype_driver, NOTICE);
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 03186485f9..a01c826a3c 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -2229,4 +2229,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
>  		cryptodev_aesni_mb_pmd_drv.driver,
>  		cryptodev_driver_id);
> -RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(aesni_mb_logtype_driver, NOTICE);
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
> index 3f6cb66ba2..c642ac350f 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd.c
> +++ b/drivers/crypto/armv8/rte_armv8_pmd.c
> @@ -864,7 +864,7 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
>  
>  static struct cryptodev_driver armv8_crypto_drv;
>  
> -RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
> +RTE_LOG_REGISTER_DEFAULT(crypto_armv8_log_type, ERR);
>  
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
> diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
> index 9faf12f238..08fd67af50 100644
> --- a/drivers/crypto/bcmfs/bcmfs_logs.c
> +++ b/drivers/crypto/bcmfs/bcmfs_logs.c
> @@ -21,5 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
>  	return 0;
>  }
>  
> -RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
> -RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
> +RTE_LOG_REGISTER_SUFFIX(bcmfs_conf_logtype, config, NOTICE)
> +RTE_LOG_REGISTER_SUFFIX(bcmfs_dp_logtype, fp, NOTICE)
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> index 5ff1b5c562..48b7db9e9b 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> @@ -639,4 +639,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
>  		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
>  
> -RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(kasumi_logtype_driver, NOTICE);
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> index bec51c9ff6..b2cfa710f5 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> @@ -1019,4 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
>  		cryptodev_driver_id);
> -RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(mrvl_logtype_driver, NOTICE);
> diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
> index 26395159aa..0e0a94648c 100644
> --- a/drivers/crypto/nitrox/nitrox_logs.c
> +++ b/drivers/crypto/nitrox/nitrox_logs.c
> @@ -4,4 +4,4 @@
>  
>  #include <rte_log.h>
>  
> -RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(nitrox_logtype, NOTICE);
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index e04042e757..179e5ff36d 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -248,4 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
>  		cryptodev_driver_id);
> -RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
> +RTE_LOG_REGISTER_DEFAULT(null_logtype_driver, INFO);
> diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
> index 5ce1cf82fd..ba73c2f939 100644
> --- a/drivers/crypto/octeontx/otx_cryptodev.c
> +++ b/drivers/crypto/octeontx/otx_cryptodev.c
> @@ -111,4 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
>  RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
>  		otx_cryptodev_driver_id);
> -RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(otx_cpt_logtype, NOTICE);
> diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
> index 7f45e57cce..d4e5ca080b 100644
> --- a/drivers/crypto/octeontx2/otx2_cryptodev.c
> +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
> @@ -177,4 +177,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
>  RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
>  		otx2_cryptodev_driver_id);
> -RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(otx2_cpt_logtype, NOTICE);
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 7d3959f550..47004337d5 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -2278,4 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
>  		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
> -RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
> +RTE_LOG_REGISTER_DEFAULT(openssl_logtype_driver, INFO);
> diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
> index 9367a0e915..1e0b4df0ca 100644
> --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
> +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
> @@ -577,4 +577,4 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
>  }
>  
>  
> -RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
> +RTE_LOG_REGISTER_DEFAULT(scheduler_logtype_driver, INFO);
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 962868e1fc..9aab357846 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -653,4 +653,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
>  		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
> -RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
> +RTE_LOG_REGISTER_DEFAULT(snow3g_logtype_driver, INFO);
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 1822f21744..4bae74a487 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1483,10 +1483,8 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
>  	rte_virtio_crypto_driver.driver,
>  	cryptodev_virtio_driver_id);
> -RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
> -RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
> -		 NOTICE);
> -RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
> -RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
> -RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
> -		 NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_init, init, NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_session, session, NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_rx, rx, NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_tx, tx, NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_driver, driver, NOTICE);
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
> index a9ff318281..aa50c12da6 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
> @@ -580,4 +580,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
>  		cryptodev_driver_id);
> -RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
> +RTE_LOG_REGISTER_DEFAULT(zuc_logtype_driver, INFO);
> diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
> index 3570678b9e..5696f568cd 100644
> --- a/drivers/event/dlb2/dlb2.c
> +++ b/drivers/event/dlb2/dlb2.c
> @@ -4655,4 +4655,4 @@ dlb2_parse_params(const char *params,
>  	}
>  	return ret;
>  }
> -RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(eventdev_dlb2_log_level, NOTICE);
> diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
> index 460375ca30..ec74160325 100644
> --- a/drivers/event/dpaa/dpaa_eventdev.c
> +++ b/drivers/event/dpaa/dpaa_eventdev.c
> @@ -46,7 +46,7 @@
>   * Eventqueue = Channel Instance
>   * 1 Eventdev can have N Eventqueue
>   */
> -RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
>  
>  #define DISABLE_INTR_MODE "disable_intr"
>  
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
> index e4fa3a2e46..5ccf22f77f 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -1206,4 +1206,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
>  };
>  
>  RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
> -RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_event, NOTICE);
> diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
> index 17325bbf6a..d8b359801a 100644
> --- a/drivers/event/octeontx/ssovf_evdev.c
> +++ b/drivers/event/octeontx/ssovf_evdev.c
> @@ -22,7 +22,7 @@
>  
>  static uint8_t timvf_enable_stats;
>  
> -RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(otx_logtype_ssovf, NOTICE);
>  
>  /* SSOPF Mailbox messages */
>  
> diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
> index 8af4d6e37f..688e9daa66 100644
> --- a/drivers/event/octeontx/timvf_evdev.c
> +++ b/drivers/event/octeontx/timvf_evdev.c
> @@ -5,7 +5,7 @@
>  #include "ssovf_evdev.h"
>  #include "timvf_evdev.h"
>  
> -RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(otx_logtype_timvf, timer, NOTICE);
>  
>  static struct rte_eventdev *event_dev;
>  
> diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
> index 3050578ffd..cfa9733b64 100644
> --- a/drivers/event/opdl/opdl_evdev.c
> +++ b/drivers/event/opdl/opdl_evdev.c
> @@ -755,7 +755,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
>  	.remove = opdl_remove
>  };
>  
> -RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
> +RTE_LOG_REGISTER_SUFFIX(opdl_logtype_driver, driver, INFO);
>  
>  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 0d8013adf7..a5e6ca22e8 100644
> --- a/drivers/event/sw/sw_evdev.c
> +++ b/drivers/event/sw/sw_evdev.c
> @@ -1151,4 +1151,4 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
>  		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
>  		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
>  		REFIL_ONCE_ARG "=<int>");
> -RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(eventdev_sw_log_level, NOTICE);
> diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
> index 1ee7ffb647..f02056982c 100644
> --- a/drivers/mempool/dpaa/dpaa_mempool.c
> +++ b/drivers/mempool/dpaa/dpaa_mempool.c
> @@ -37,7 +37,7 @@ struct dpaa_memseg_list rte_dpaa_memsegs
>  
>  struct dpaa_bp_info *rte_dpaa_bpid_info;
>  
> -RTE_LOG_REGISTER(dpaa_logtype_mempool, mempool.dpaa, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_mempool, NOTICE);
>  
>  static int
>  dpaa_mbuf_create_pool(struct rte_mempool *mp)
> diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> index bc146e4ce1..771e0a0e28 100644
> --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
> @@ -457,4 +457,4 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = {
>  
>  MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
>  
> -RTE_LOG_REGISTER(dpaa2_logtype_mempool, mempool.dpaa2, NOTICE);
> +RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_mempool, NOTICE);
> diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build
> index caaffc3806..d295263b87 100644
> --- a/drivers/mempool/meson.build
> +++ b/drivers/mempool/meson.build
> @@ -11,4 +11,7 @@ drivers = [
>          'ring',
>          'stack',
>  ]
> +
>  std_deps = ['mempool']
> +
> +log_prefix = 'mempool'
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 0052247a55..bff1761433 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -59,6 +59,11 @@ foreach subpath:subdirs
>          drivers += driver_path[1]
>      else
>          class = subpath
> +    endif
> +
> +    log_prefix = 'pmd.' + class
> +
> +    if drivers.length() == 0
>          subdir(class)
>      endif
>  

Minor nit - rather than splitting the existing block here, I suggest
setting log_prefix = '' at the start of the loop, and leaving the existing
else as-is. Then after the "subdir(class)" just check if log_prefix ==
'' and then set it to the default. I think it might be easier to read that
way. [See suggested change below (untested)]

/Bruce

diff --git a/drivers/meson.build b/drivers/meson.build
index 0052247a5..9d518d361 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -51,6 +51,7 @@ endif
 foreach subpath:subdirs
     drivers = []
     std_deps = []
+    log_prefix = ''

     # subpath can be either "class" or "class/driver"
     if subpath.contains('/')
@@ -62,6 +63,10 @@ foreach subpath:subdirs
         subdir(class)
     endif

+    if log_prefix == '':
+        log_prefix = 'pmd.' + class
+    endif
+
     # save class name on first occurrence
     if not dpdk_driver_classes.contains(class)
         dpdk_driver_classes += class


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 11:49   ` Bruce Richardson
@ 2021-05-11 12:01     ` Thomas Monjalon
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2021-05-11 12:01 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

11/05/2021 13:49, Bruce Richardson:
> On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> > +log_prefix
> > +	**Default Value = pmd.<class>**
> > +	Some driver classes have a customized log prefix.
> > +	This prefix is combined with the driver name
> > +	when registering a default log name for the driver.
> > +
> 
> I don't think this should be added here. This section is for elements to be
> defined in the meson.build file of each individual driver. This value,
> though, is to be defined per class, rather than per-driver. We don't have a
> doc section for that, but perhaps one is needed.
> 
> For now, I'd just omit documenting this value as it should only be of
> relevance for the couple of existing driver classes that use it. Nobody
> else contributing new code to DPDK should need it.

OK, makes sense.

If I remove these doc lines, is it OK to push the patch to the repository?




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 11:59   ` Bruce Richardson
@ 2021-05-11 12:10     ` Thomas Monjalon
  2021-05-11 12:24       ` Bruce Richardson
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Monjalon @ 2021-05-11 12:10 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

11/05/2021 13:59, Bruce Richardson:
> On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -59,6 +59,11 @@ foreach subpath:subdirs
> >          drivers += driver_path[1]
> >      else
> >          class = subpath
> > +    endif
> > +
> > +    log_prefix = 'pmd.' + class
> > +
> > +    if drivers.length() == 0
> >          subdir(class)
> >      endif
> >  
> 
> Minor nit - rather than splitting the existing block here, I suggest
> setting log_prefix = '' at the start of the loop, and leaving the existing
> else as-is. Then after the "subdir(class)" just check if log_prefix ==
> '' and then set it to the default. I think it might be easier to read that
> way. [See suggested change below (untested)]
> 
> /Bruce
> 
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 0052247a5..9d518d361 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -51,6 +51,7 @@ endif
>  foreach subpath:subdirs
>      drivers = []
>      std_deps = []
> +    log_prefix = ''
> 
>      # subpath can be either "class" or "class/driver"
>      if subpath.contains('/')
> @@ -62,6 +63,10 @@ foreach subpath:subdirs
>          subdir(class)
>      endif
> 
> +    if log_prefix == '':
> +        log_prefix = 'pmd.' + class
> +    endif
> +

OK with this change, I'll send a v4.

Nit: please remove useless huge context when replying :)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v3] log: register with standardized names
  2021-05-11 12:10     ` Thomas Monjalon
@ 2021-05-11 12:24       ` Bruce Richardson
  0 siblings, 0 replies; 14+ messages in thread
From: Bruce Richardson @ 2021-05-11 12:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

On Tue, May 11, 2021 at 02:10:47PM +0200, Thomas Monjalon wrote:
> 11/05/2021 13:59, Bruce Richardson:
> > On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote:
> > > --- a/drivers/meson.build
> > > +++ b/drivers/meson.build
> > > @@ -59,6 +59,11 @@ foreach subpath:subdirs
> > >          drivers += driver_path[1]
> > >      else
> > >          class = subpath
> > > +    endif
> > > +
> > > +    log_prefix = 'pmd.' + class
> > > +
> > > +    if drivers.length() == 0
> > >          subdir(class)
> > >      endif
> > >  
> > 
> > Minor nit - rather than splitting the existing block here, I suggest
> > setting log_prefix = '' at the start of the loop, and leaving the existing
> > else as-is. Then after the "subdir(class)" just check if log_prefix ==
> > '' and then set it to the default. I think it might be easier to read that
> > way. [See suggested change below (untested)]
> > 
> > /Bruce
> > 
> > diff --git a/drivers/meson.build b/drivers/meson.build
> > index 0052247a5..9d518d361 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -51,6 +51,7 @@ endif
> >  foreach subpath:subdirs
> >      drivers = []
> >      std_deps = []
> > +    log_prefix = ''
> > 
> >      # subpath can be either "class" or "class/driver"
> >      if subpath.contains('/')
> > @@ -62,6 +63,10 @@ foreach subpath:subdirs
> >          subdir(class)
> >      endif
> > 
> > +    if log_prefix == '':
> > +        log_prefix = 'pmd.' + class
> > +    endif
> > +
> 
> OK with this change, I'll send a v4.
> 
> Nit: please remove useless huge context when replying :)
>
+1 I had planned to - I just forgot to do so before hitting send! 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [dpdk-dev] [PATCH v4] log: register with standardized names
  2021-04-09 12:43 [dpdk-dev] [PATCH] log: deduce log type from filename David Marchand
                   ` (2 preceding siblings ...)
  2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
@ 2021-05-11 12:38 ` Thomas Monjalon
  2021-05-11 12:52   ` Bruce Richardson
  3 siblings, 1 reply; 14+ messages in thread
From: Thomas Monjalon @ 2021-05-11 12:38 UTC (permalink / raw)
  To: dev; +Cc: andrew.rybchenko, ferruh.yigit, bruce.richardson, David Marchand

From: David Marchand <david.marchand@redhat.com>

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
  used in a component. It is associated to the default name provided
  by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
  and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    drv=${pattern%%/*};
    case "$class" in
      baseband) pattern=pmd.bb.$drv;;
      bus) pattern=bus.$drv;;
      mempool) pattern=mempool.$drv;;
      *) pattern=pmd.$class.$drv;;
    esac
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---

Changes since v3:
- updated commit log
- removed log_prefix from doc
- reworked logic for setting default log_prefix

Changes since v2:
- used RTE_LOG_REGISTER_DEFAULT in baseband, bus, mempool
  by adding the variable log_prefix in drivers/meson.build

Changes since v1:
- moved default logtype generation in the build system,
- rebased,
- reverted net/bonding change,

---
 drivers/baseband/acc100/rte_acc100_pmd.c      |  4 +-
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         |  4 +-
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  |  4 +-
 drivers/baseband/meson.build                  |  2 +
 drivers/baseband/null/bbdev_null.c            |  2 +-
 .../baseband/turbo_sw/bbdev_turbo_software.c  |  2 +-
 drivers/bus/dpaa/dpaa_bus.c                   |  2 +-
 drivers/bus/fslmc/fslmc_bus.c                 |  2 +-
 drivers/bus/ifpga/ifpga_bus.c                 |  2 +-
 drivers/bus/meson.build                       |  3 ++
 drivers/bus/vdev/vdev.c                       |  2 +-
 drivers/bus/vmbus/vmbus_common.c              |  2 +-
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/common/iavf/iavf_impl.c               |  2 +-
 drivers/common/mlx5/mlx5_common.c             |  2 +-
 drivers/compress/isal/isal_compress_pmd.c     |  2 +-
 drivers/compress/mlx5/mlx5_compress.c         |  3 +-
 drivers/compress/octeontx/otx_zip_pmd.c       |  2 +-
 drivers/compress/zlib/zlib_pmd.c              |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_logs.c             |  4 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/nitrox/nitrox_logs.c           |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      | 12 +++---
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/event/dlb2/dlb2.c                     |  2 +-
 drivers/event/dpaa/dpaa_eventdev.c            |  2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c          |  2 +-
 drivers/event/octeontx/ssovf_evdev.c          |  2 +-
 drivers/event/octeontx/timvf_evdev.c          |  2 +-
 drivers/event/opdl/opdl_evdev.c               |  2 +-
 drivers/event/sw/sw_evdev.c                   |  2 +-
 drivers/mempool/dpaa/dpaa_mempool.c           |  2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c      |  2 +-
 drivers/mempool/meson.build                   |  3 ++
 drivers/meson.build                           |  8 ++++
 drivers/net/af_packet/rte_eth_af_packet.c     |  2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  2 +-
 drivers/net/ark/ark_ethdev.c                  |  2 +-
 drivers/net/atlantic/atl_ethdev.c             |  4 +-
 drivers/net/avp/avp_ethdev.c                  |  2 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  4 +-
 drivers/net/bnx2x/bnx2x_ethdev.c              |  4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c        |  3 ++
 drivers/net/cxgbe/cxgbe_ethdev.c              |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |  2 +-
 drivers/net/e1000/e1000_logs.c                |  8 ++--
 drivers/net/ena/ena_ethdev.c                  | 12 +++---
 drivers/net/enetc/enetc_ethdev.c              |  2 +-
 drivers/net/enic/enic_ethdev.c                |  2 +-
 drivers/net/failsafe/failsafe.c               |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c              |  8 ++--
 drivers/net/hinic/hinic_pmd_ethdev.c          |  2 +-
 drivers/net/hns3/hns3_ethdev.c                |  4 +-
 drivers/net/i40e/i40e_ethdev.c                |  8 ++--
 drivers/net/iavf/iavf_ethdev.c                |  8 ++--
 drivers/net/ice/ice_ethdev.c                  |  8 ++--
 drivers/net/igc/igc_logs.c                    |  4 +-
 drivers/net/ionic/ionic_ethdev.c              |  2 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.c            |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  8 ++--
 drivers/net/kni/rte_eth_kni.c                 |  2 +-
 drivers/net/liquidio/lio_ethdev.c             |  4 +-
 drivers/net/memif/rte_eth_memif.c             |  2 +-
 drivers/net/mlx4/mlx4.c                       |  2 +-
 drivers/net/mlx5/mlx5.c                       |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c            |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c               |  2 +-
 drivers/net/netvsc/hn_ethdev.c                |  4 +-
 drivers/net/nfp/nfp_net.c                     |  4 +-
 drivers/net/null/rte_eth_null.c               |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c        |  6 +--
 drivers/net/octeontx_ep/otx_ep_ethdev.c       |  2 +-
 drivers/net/pcap/pcap_ethdev.c                |  2 +-
 drivers/net/pfe/pfe_ethdev.c                  |  2 +-
 drivers/net/qede/qede_ethdev.c                |  4 +-
 drivers/net/ring/rte_eth_ring.c               |  2 +-
 drivers/net/softnic/rte_eth_softnic.c         |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c       |  4 +-
 drivers/net/tap/rte_eth_tap.c                 |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  6 +--
 drivers/net/txgbe/txgbe_ethdev.c              | 12 +++---
 drivers/net/vdev_netvsc/vdev_netvsc.c         |  2 +-
 drivers/net/vhost/rte_eth_vhost.c             |  2 +-
 drivers/net/virtio/virtio_ethdev.c            |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  4 +-
 drivers/raw/ifpga/ifpga_rawdev.c              |  2 +-
 drivers/raw/ioat/ioat_rawdev.c                |  2 +-
 drivers/raw/ntb/ntb.c                         |  2 +-
 drivers/raw/skeleton/skeleton_rawdev.c        |  2 +-
 drivers/regex/mlx5/mlx5_regex.c               |  3 +-
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  2 +-
 lib/bbdev/rte_bbdev.c                         |  2 +-
 lib/bpf/bpf.c                                 |  2 +-
 lib/cfgfile/rte_cfgfile.c                     |  2 +-
 lib/compressdev/rte_compressdev.c             |  2 +-
 lib/eal/include/rte_log.h                     | 41 +++++++++++++++----
 lib/ethdev/rte_ethdev.c                       |  2 +-
 lib/eventdev/rte_event_timer_adapter.c        |  6 +--
 lib/flow_classify/rte_flow_classify.c         |  2 +-
 lib/graph/graph.c                             |  2 +-
 lib/member/rte_member.c                       |  2 +-
 lib/meson.build                               |  1 +
 lib/metrics/rte_metrics_telemetry.c           |  2 +-
 lib/net/rte_net_crc.c                         |  2 +-
 lib/node/log.c                                |  2 +-
 lib/pdump/rte_pdump.c                         |  2 +-
 lib/rawdev/rte_rawdev.c                       |  2 +-
 lib/rcu/rte_rcu_qsbr.c                        |  2 +-
 lib/stack/rte_stack.c                         |  2 +-
 lib/vhost/vhost.c                             |  4 +-
 122 files changed, 223 insertions(+), 184 deletions(-)

diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index ca2703fbe1..68ba523ea9 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -24,9 +24,9 @@
 #include "rte_acc100_pmd.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(acc100_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(acc100_logtype, pmd.bb.acc100, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(acc100_logtype, NOTICE);
 #endif
 
 /* Write to MMIO register address */
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 026fc894d6..6485cc824a 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -24,9 +24,9 @@
 #include "rte_pmd_fpga_5gnr_fec.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(fpga_5gnr_fec_logtype, pmd.bb.fpga_5gnr_fec, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(fpga_5gnr_fec_logtype, NOTICE);
 #endif
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 1a72aa7b70..350c4248eb 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -23,9 +23,9 @@
 #include "fpga_lte_fec.h"
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, DEBUG);
 #else
-RTE_LOG_REGISTER(fpga_lte_fec_logtype, pmd.bb.fpga_lte_fec, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, NOTICE);
 #endif
 
 /* Helper macro for logging */
diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
index c98ebd9024..5ee61d5323 100644
--- a/drivers/baseband/meson.build
+++ b/drivers/baseband/meson.build
@@ -12,3 +12,5 @@ drivers = [
         'null',
         'turbo_sw',
 ]
+
+log_prefix = 'pmd.bb'
diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
index 6cf3988b88..53c538ba44 100644
--- a/drivers/baseband/null/bbdev_null.c
+++ b/drivers/baseband/null/bbdev_null.c
@@ -15,7 +15,7 @@
 
 #define DRIVER_NAME baseband_null
 
-RTE_LOG_REGISTER(bbdev_null_logtype, pmd.bb.null, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_null_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 85cf93d7bc..77e9a2ecbc 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -35,7 +35,7 @@
 
 #define DRIVER_NAME baseband_turbo_sw
 
-RTE_LOG_REGISTER(bbdev_turbo_sw_logtype, pmd.bb.turbo_sw, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_turbo_sw_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 173041c026..2f48d4036b 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -777,4 +777,4 @@ static struct rte_dpaa_bus rte_dpaa_bus = {
 };
 
 RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus);
-RTE_LOG_REGISTER(dpaa_logtype_bus, bus.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_bus, NOTICE);
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 26910ac01f..becc455f6b 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -666,4 +666,4 @@ struct rte_fslmc_bus rte_fslmc_bus = {
 };
 
 RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus);
-RTE_LOG_REGISTER(dpaa2_logtype_bus, bus.fslmc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_bus, NOTICE);
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index bb8b3dcfb9..62887da2d8 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -472,4 +472,4 @@ static struct rte_bus rte_ifpga_bus = {
 };
 
 RTE_REGISTER_BUS(IFPGA_BUS_NAME, rte_ifpga_bus);
-RTE_LOG_REGISTER(ifpga_bus_logtype, bus.ifpga, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ifpga_bus_logtype, NOTICE);
diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build
index c770c6ba1e..410058de3a 100644
--- a/drivers/bus/meson.build
+++ b/drivers/bus/meson.build
@@ -9,4 +9,7 @@ drivers = [
         'vdev',
         'vmbus',
 ]
+
 std_deps = ['eal']
+
+log_prefix = 'bus'
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index d075409942..281a2c34e8 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -637,4 +637,4 @@ static struct rte_bus rte_vdev_bus = {
 };
 
 RTE_REGISTER_BUS(vdev, rte_vdev_bus);
-RTE_LOG_REGISTER(vdev_logtype_bus, bus.vdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vdev_logtype_bus, NOTICE);
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 39b3308577..d25fd14ef5 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -297,4 +297,4 @@ struct rte_vmbus_bus rte_vmbus_bus = {
 };
 
 RTE_REGISTER_BUS(vmbus, rte_vmbus_bus.bus);
-RTE_LOG_REGISTER(vmbus_logtype_bus, bus.vmbus, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vmbus_logtype_bus, NOTICE);
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 54f89e12ba..3d661102cc 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -462,4 +462,4 @@ dpaax_handle_memevents(void)
 					       dpaax_memevent_cb, NULL);
 }
 
-RTE_LOG_REGISTER(dpaax_logger, pmd.common.dpaax, ERR);
+RTE_LOG_REGISTER_DEFAULT(dpaax_logger, ERR);
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index 08147314c6..0c7d5c0dae 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -85,4 +85,4 @@ iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
 	return IAVF_SUCCESS;
 }
 
-RTE_LOG_REGISTER(iavf_common_logger, pmd.common.iavf, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(iavf_common_logger, NOTICE);
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index d397459a3d..25e9f09108 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -39,7 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_common_logtype, NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0ecca12a83..81b937ee73 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -750,4 +750,4 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
 	"socket_id=<int>");
-RTE_LOG_REGISTER(isal_logtype_driver, pmd.compress.isal, INFO);
+RTE_LOG_REGISTER_DEFAULT(isal_logtype_driver, INFO);
diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 0581dee505..80c564f10b 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -23,7 +23,6 @@
 #include "mlx5_compress_utils.h"
 
 #define MLX5_COMPRESS_DRIVER_NAME mlx5_compress
-#define MLX5_COMPRESS_LOG_NAME    pmd.compress.mlx5
 #define MLX5_COMPRESS_MAX_QPS 1024
 #define MLX5_COMP_MAX_WIN_SIZE_CONF 6u
 
@@ -873,7 +872,7 @@ RTE_INIT(rte_mlx5_compress_init)
 		mlx5_pci_driver_register(&mlx5_compress_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_compress_logtype, MLX5_COMPRESS_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_compress_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_COMPRESS_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_COMPRESS_DRIVER_NAME, mlx5_compress_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_COMPRESS_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index bee90fc7cd..dd62285b86 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -646,4 +646,4 @@ static struct rte_pci_driver octtx_zip_pmd = {
 
 RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table);
-RTE_LOG_REGISTER(octtx_zip_logtype_driver, pmd.compress.octeontx, INFO);
+RTE_LOG_REGISTER_DEFAULT(octtx_zip_logtype_driver, INFO);
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 8a79d15c98..0220c6d038 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -426,4 +426,4 @@ static struct rte_vdev_driver zlib_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv);
-RTE_LOG_REGISTER(zlib_logtype_driver, pmd.compress.zlib, INFO);
+RTE_LOG_REGISTER_DEFAULT(zlib_logtype_driver, INFO);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..bc87e44a9d 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -975,4 +975,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_gcm_logtype_driver, pmd.crypto.aesni_gcm, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_gcm_logtype_driver, NOTICE);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 03186485f9..a01c826a3c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -2229,4 +2229,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(aesni_mb_logtype_driver, pmd.crypto.aesni_mb, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(aesni_mb_logtype_driver, NOTICE);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3f6cb66ba2..c642ac350f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -864,7 +864,7 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
-RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+RTE_LOG_REGISTER_DEFAULT(crypto_armv8_log_type, ERR);
 
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 9faf12f238..08fd67af50 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -21,5 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.crypto.bcmfs.config, NOTICE)
-RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.crypto.bcmfs.fp, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_conf_logtype, config, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(bcmfs_dp_logtype, fp, NOTICE)
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 5ff1b5c562..48b7db9e9b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -639,4 +639,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
 
-RTE_LOG_REGISTER(kasumi_logtype_driver, pmd.crypto.kasumi, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(kasumi_logtype_driver, NOTICE);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..b2cfa710f5 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -1019,4 +1019,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(mrvl_logtype_driver, pmd.crypto.mvsam, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype_driver, NOTICE);
diff --git a/drivers/crypto/nitrox/nitrox_logs.c b/drivers/crypto/nitrox/nitrox_logs.c
index 26395159aa..0e0a94648c 100644
--- a/drivers/crypto/nitrox/nitrox_logs.c
+++ b/drivers/crypto/nitrox/nitrox_logs.c
@@ -4,4 +4,4 @@
 
 #include <rte_log.h>
 
-RTE_LOG_REGISTER(nitrox_logtype, pmd.crypto.nitrox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(nitrox_logtype, NOTICE);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index e04042e757..179e5ff36d 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -248,4 +248,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(null_logtype_driver, pmd.crypto.null, INFO);
+RTE_LOG_REGISTER_DEFAULT(null_logtype_driver, INFO);
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..ba73c2f939 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -111,4 +111,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx_cryptodev_drv, otx_cryptodev_pmd.driver,
 		otx_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx_cpt_logtype, pmd.crypto.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7f45e57cce..d4e5ca080b 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -177,4 +177,4 @@ RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
 RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);
-RTE_LOG_REGISTER(otx2_cpt_logtype, pmd.crypto.octeontx2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx2_cpt_logtype, NOTICE);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 7d3959f550..47004337d5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2278,4 +2278,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(openssl_logtype_driver, pmd.crypto.openssl, INFO);
+RTE_LOG_REGISTER_DEFAULT(openssl_logtype_driver, INFO);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 9367a0e915..1e0b4df0ca 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -577,4 +577,4 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id,
 }
 
 
-RTE_LOG_REGISTER(scheduler_logtype_driver, pmd.crypto.scheduler, INFO);
+RTE_LOG_REGISTER_DEFAULT(scheduler_logtype_driver, INFO);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 962868e1fc..9aab357846 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -653,4 +653,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
-RTE_LOG_REGISTER(snow3g_logtype_driver, pmd.crypto.snow3g, INFO);
+RTE_LOG_REGISTER_DEFAULT(snow3g_logtype_driver, INFO);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1822f21744..4bae74a487 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1483,10 +1483,8 @@ RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_VIRTIO_PMD, rte_virtio_crypto_driver);
 RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv,
 	rte_virtio_crypto_driver.driver,
 	cryptodev_virtio_driver_id);
-RTE_LOG_REGISTER(virtio_crypto_logtype_init, pmd.crypto.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_session, pmd.crypto.virtio.session,
-		 NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_rx, pmd.crypto.virtio.rx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_tx, pmd.crypto.virtio.tx, NOTICE);
-RTE_LOG_REGISTER(virtio_crypto_logtype_driver, pmd.crypto.virtio.driver,
-		 NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_session, session, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_rx, rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_tx, tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_crypto_logtype_driver, driver, NOTICE);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..aa50c12da6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -580,4 +580,4 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
-RTE_LOG_REGISTER(zuc_logtype_driver, pmd.crypto.zuc, INFO);
+RTE_LOG_REGISTER_DEFAULT(zuc_logtype_driver, INFO);
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 3570678b9e..5696f568cd 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -4655,4 +4655,4 @@ dlb2_parse_params(const char *params,
 	}
 	return ret;
 }
-RTE_LOG_REGISTER(eventdev_dlb2_log_level, pmd.event.dlb2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_dlb2_log_level, NOTICE);
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 460375ca30..ec74160325 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -46,7 +46,7 @@
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
-RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index e4fa3a2e46..5ccf22f77f 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1206,4 +1206,4 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = {
 };
 
 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd);
-RTE_LOG_REGISTER(dpaa2_logtype_event, pmd.event.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_event, NOTICE);
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 17325bbf6a..d8b359801a 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -22,7 +22,7 @@
 
 static uint8_t timvf_enable_stats;
 
-RTE_LOG_REGISTER(otx_logtype_ssovf, pmd.event.octeontx, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_logtype_ssovf, NOTICE);
 
 /* SSOPF Mailbox messages */
 
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 8af4d6e37f..688e9daa66 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -5,7 +5,7 @@
 #include "ssovf_evdev.h"
 #include "timvf_evdev.h"
 
-RTE_LOG_REGISTER(otx_logtype_timvf, pmd.event.octeontx.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_logtype_timvf, timer, NOTICE);
 
 static struct rte_eventdev *event_dev;
 
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index 3050578ffd..cfa9733b64 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -755,7 +755,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
 	.remove = opdl_remove
 };
 
-RTE_LOG_REGISTER(opdl_logtype_driver, pmd.event.opdl.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(opdl_logtype_driver, driver, INFO);
 
 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 0d8013adf7..a5e6ca22e8 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -1151,4 +1151,4 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "=<int> "
 		SCHED_QUANTA_ARG "=<int>" CREDIT_QUANTA_ARG "=<int>"
 		MIN_BURST_SIZE_ARG "=<int>" DEQ_BURST_SIZE_ARG "=<int>"
 		REFIL_ONCE_ARG "=<int>");
-RTE_LOG_REGISTER(eventdev_sw_log_level, pmd.event.sw, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eventdev_sw_log_level, NOTICE);
diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 1ee7ffb647..f02056982c 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -37,7 +37,7 @@ struct dpaa_memseg_list rte_dpaa_memsegs
 
 struct dpaa_bp_info *rte_dpaa_bpid_info;
 
-RTE_LOG_REGISTER(dpaa_logtype_mempool, mempool.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_mempool, NOTICE);
 
 static int
 dpaa_mbuf_create_pool(struct rte_mempool *mp)
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index bc146e4ce1..771e0a0e28 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -457,4 +457,4 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = {
 
 MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
 
-RTE_LOG_REGISTER(dpaa2_logtype_mempool, mempool.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_mempool, NOTICE);
diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build
index caaffc3806..d295263b87 100644
--- a/drivers/mempool/meson.build
+++ b/drivers/mempool/meson.build
@@ -11,4 +11,7 @@ drivers = [
         'ring',
         'stack',
 ]
+
 std_deps = ['mempool']
+
+log_prefix = 'mempool'
diff --git a/drivers/meson.build b/drivers/meson.build
index 0052247a55..bc6f4f567f 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -51,6 +51,7 @@ endif
 foreach subpath:subdirs
     drivers = []
     std_deps = []
+    log_prefix = ''
 
     # subpath can be either "class" or "class/driver"
     if subpath.contains('/')
@@ -69,6 +70,12 @@ foreach subpath:subdirs
     # get already enabled drivers of the same class
     enabled_drivers = get_variable(class + '_drivers', [])
 
+    # default log prefix can be defined per class
+    if log_prefix == ''
+        # default log name is pmd.class.driver
+        log_prefix = 'pmd.' + class
+    endif
+
     foreach drv:drivers
         drv_path = join_paths(class, drv)
 
@@ -137,6 +144,7 @@ foreach subpath:subdirs
 
         enabled_drivers += name
         lib_name = '_'.join(['rte', class, name])
+        cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=' + '.'.join([log_prefix, name])
         dpdk_conf.set(lib_name.to_upper(), 1)
 
         dpdk_extra_ldflags += pkgconfig_extra_libs
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index a04f7c773a..2e90e2985c 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -97,7 +97,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(af_packet_logtype, pmd.net.af_packet, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0c91a40c4a..c2db21f9c1 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -60,7 +60,7 @@
 #define PF_XDP AF_XDP
 #endif
 
-RTE_LOG_REGISTER(af_xdp_logtype, pmd.net.af_xdp, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
 
 #define AF_XDP_LOG(level, fmt, args...)			\
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6372cf7740..2c1ac28056 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -1015,4 +1015,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ark,
 			      ARK_PKTGEN_ARG "=<filename> "
 			      ARK_PKTCHKR_ARG "=<filename> "
 			      ARK_PKTDIR_ARG "=<bitmap>");
-RTE_LOG_REGISTER(ark_logtype, pmd.net.ark, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ark_logtype, NOTICE);
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index ce7f814f25..0ce35eb519 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1915,5 +1915,5 @@ is_atlantic_supported(struct rte_eth_dev *dev)
 RTE_PMD_REGISTER_PCI(net_atlantic, rte_atl_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_atlantic, pci_id_atl_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_atlantic, "* igb_uio | uio_pci_generic");
-RTE_LOG_REGISTER(atl_logtype_init, pmd.net.atlantic.init, NOTICE);
-RTE_LOG_REGISTER(atl_logtype_driver, pmd.net.atlantic.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(atl_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 566a3606a2..623fa5e5ff 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -2309,4 +2309,4 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
-RTE_LOG_REGISTER(avp_logtype_driver, pmd.net.avp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(avp_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index ebe9a2876d..9cb4818af1 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2377,5 +2377,5 @@ static struct rte_pci_driver rte_axgbe_pmd = {
 RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(axgbe_logtype_init, pmd.net.axgbe.init, NOTICE);
-RTE_LOG_REGISTER(axgbe_logtype_driver, pmd.net.axgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(axgbe_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 50db70dfcd..463886f17a 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -817,5 +817,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(bnx2x_logtype_init, pmd.net.bnx2x.init, NOTICE);
-RTE_LOG_REGISTER(bnx2x_logtype_driver, pmd.net.bnx2x.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnx2x_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 822853a008..3778e28cca 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6191,7 +6191,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev)
 	return is_device_supported(dev, &bnxt_rte_pmd);
 }
 
-RTE_LOG_REGISTER(bnxt_logtype_driver, pmd.net.bnxt.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 6ba09c4d9e..b01ef003e6 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3778,4 +3778,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding,
 	"up_delay=<int> "
 	"down_delay=<int>");
 
+/* We can't use RTE_LOG_REGISTER_DEFAULT because of the forced name for
+ * this library, see meson.build.
+ */
 RTE_LOG_REGISTER(bond_logtype, pmd.net.bonding, NOTICE);
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index e8a2de3ef3..a12a98157c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1474,5 +1474,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_cxgbe,
 			      CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
 			      CXGBE_DEVARG_PF_FILTER_MODE "=<uint32> "
 			      CXGBE_DEVARG_PF_FILTER_MASK "=<uint32> ");
-RTE_LOG_REGISTER(cxgbe_logtype, pmd.net.cxgbe, NOTICE);
-RTE_LOG_REGISTER(cxgbe_mbox_logtype, pmd.net.cxgbe.mbox, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(cxgbe_logtype, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(cxgbe_mbox_logtype, mbox, NOTICE);
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 57ee660c5e..27d670f843 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2311,4 +2311,4 @@ static struct rte_dpaa_driver rte_dpaa_pmd = {
 };
 
 RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
-RTE_LOG_REGISTER(dpaa_logtype_pmd, pmd.net.dpaa, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_pmd, NOTICE);
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 95e8d9abe8..8b803b8542 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -2895,4 +2895,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_dpaa2,
 		DRIVER_NO_PREFETCH_MODE "=<int>"
 		DRIVER_TX_CONF "=<int>"
 		DRIVER_ERROR_QUEUE "=<int>");
-RTE_LOG_REGISTER(dpaa2_logtype_pmd, pmd.net.dpaa2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_logtype_pmd, NOTICE);
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index 23b7c67458..8dccca9e6d 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -5,11 +5,11 @@
 #include <rte_ethdev.h>
 #include "e1000_logs.h"
 
-RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
-RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_init, init, NOTICE)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_driver, driver, NOTICE)
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_rx, rx, DEBUG)
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
+RTE_LOG_REGISTER_SUFFIX(e1000_logtype_tx, tx, DEBUG)
 #endif
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f60e843b7f..f21a026b50 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2925,19 +2925,19 @@ RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ena, ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>");
-RTE_LOG_REGISTER(ena_logtype_init, pmd.net.ena.init, NOTICE);
-RTE_LOG_REGISTER(ena_logtype_driver, pmd.net.ena.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_driver, driver, NOTICE);
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
-RTE_LOG_REGISTER(ena_logtype_rx, pmd.net.ena.rx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_rx, rx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX
-RTE_LOG_REGISTER(ena_logtype_tx, pmd.net.ena.tx, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx, tx, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_DEBUG_TX_FREE
-RTE_LOG_REGISTER(ena_logtype_tx_free, pmd.net.ena.tx_free, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_tx_free, tx_free, NOTICE);
 #endif
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
-RTE_LOG_REGISTER(ena_logtype_com, pmd.net.ena.com, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ena_logtype_com, com, NOTICE);
 #endif
 
 /******************************************************************************
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 0b45168c60..b496cd4700 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -960,4 +960,4 @@ static struct rte_pci_driver rte_enetc_pmd = {
 RTE_PMD_REGISTER_PCI(net_enetc, rte_enetc_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_enetc, pci_id_enetc_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_enetc, "* vfio-pci");
-RTE_LOG_REGISTER(enetc_logtype_pmd, pmd.net.enetc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(enetc_logtype_pmd, NOTICE);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index e1a393b847..ab64480f39 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -71,7 +71,7 @@ static const struct vic_speed_capa {
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
-RTE_LOG_REGISTER(enic_pmd_logtype, pmd.net.enic, INFO);
+RTE_LOG_REGISTER_DEFAULT(enic_pmd_logtype, INFO);
 
 static int
 enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index e3bda0df2b..8216063a3d 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -391,4 +391,4 @@ static struct rte_vdev_driver failsafe_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING);
-RTE_LOG_REGISTER(failsafe_logtype, pmd.net.failsafe, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(failsafe_logtype, NOTICE)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 0a557acbef..3236290e40 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3285,11 +3285,11 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(fm10k_logtype_init, pmd.net.fm10k.init, NOTICE);
-RTE_LOG_REGISTER(fm10k_logtype_driver, pmd.net.fm10k.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(fm10k_logtype_rx, pmd.net.fm10k.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(fm10k_logtype_tx, pmd.net.fm10k.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(fm10k_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b5a36a863b..946465779f 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3266,4 +3266,4 @@ static struct rte_pci_driver rte_hinic_pmd = {
 
 RTE_PMD_REGISTER_PCI(net_hinic, rte_hinic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_hinic, pci_id_hinic_map);
-RTE_LOG_REGISTER(hinic_logtype, pmd.net.hinic, INFO);
+RTE_LOG_REGISTER_DEFAULT(hinic_logtype, INFO);
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2056a37c7d..b8e97355e9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -7598,5 +7598,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_hns3,
 		HNS3_DEVARG_RX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_TX_FUNC_HINT "=vec|sve|simple|common "
 		HNS3_DEVARG_DEV_CAPS_MASK "=<1-65535> ");
-RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
-RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d0586201f8..dd61258739 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12449,13 +12449,13 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
 	return ret;
 }
 
-RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
-RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(i40e_logtype_rx, pmd.net.i40e.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(i40e_logtype_tx, pmd.net.i40e.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(i40e_logtype_tx, tx, DEBUG);
 #endif
 
 RTE_PMD_REGISTER_PARAM_STRING(net_i40e,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c06873d26f..d688c31cfb 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2502,11 +2502,11 @@ RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_iavf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_iavf, "cap=dcf driver=i40evf");
-RTE_LOG_REGISTER(iavf_logtype_init, pmd.net.iavf.init, NOTICE);
-RTE_LOG_REGISTER(iavf_logtype_driver, pmd.net.iavf.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(iavf_logtype_rx, pmd.net.iavf.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(iavf_logtype_tx, pmd.net.iavf.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(iavf_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 36b8bd1975..cb5c3319fd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5372,11 +5372,11 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>"
 			      ICE_PIPELINE_MODE_SUPPORT_ARG "=<0|1>");
 
-RTE_LOG_REGISTER(ice_logtype_init, pmd.net.ice.init, NOTICE);
-RTE_LOG_REGISTER(ice_logtype_driver, pmd.net.ice.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_driver, driver, NOTICE);
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ice_logtype_rx, pmd.net.ice.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ice_logtype_tx, pmd.net.ice.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ice_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/igc/igc_logs.c b/drivers/net/igc/igc_logs.c
index 2d458d7fb6..9cb8da527e 100644
--- a/drivers/net/igc/igc_logs.c
+++ b/drivers/net/igc/igc_logs.c
@@ -6,5 +6,5 @@
 
 #include "igc_logs.h"
 
-RTE_LOG_REGISTER(igc_logtype_init, pmd.net.igc.init, INFO);
-RTE_LOG_REGISTER(igc_logtype_driver, pmd.net.igc.driver, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_init, init, INFO);
+RTE_LOG_REGISTER_SUFFIX(igc_logtype_driver, driver, INFO);
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 5ec474dbf5..e620793966 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1296,4 +1296,4 @@ static struct rte_pci_driver rte_ionic_pmd = {
 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ionic_logtype, pmd.net.ionic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ionic_logtype, NOTICE);
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index e83bd92bac..964506c6db 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -583,4 +583,4 @@ static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.net.ipn3ke, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ipn3ke_afu_logtype, NOTICE);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7477a0f3a2..b5371568b5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -8456,12 +8456,12 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_ixgbe_vf,
 			      IXGBEVF_DEVARG_PFLINK_FULLCHK "=<0|1>");
 
-RTE_LOG_REGISTER(ixgbe_logtype_init, pmd.net.ixgbe.init, NOTICE);
-RTE_LOG_REGISTER(ixgbe_logtype_driver, pmd.net.ixgbe.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_driver, driver, NOTICE);
 
 #ifdef RTE_ETHDEV_DEBUG_RX
-RTE_LOG_REGISTER(ixgbe_logtype_rx, pmd.net.ixgbe.rx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_ETHDEV_DEBUG_TX
-RTE_LOG_REGISTER(ixgbe_logtype_tx, pmd.net.ixgbe.tx, DEBUG);
+RTE_LOG_REGISTER_SUFFIX(ixgbe_logtype_tx, tx, DEBUG);
 #endif
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 51daf08591..871d11c413 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -68,7 +68,7 @@ static const struct rte_eth_link pmd_link = {
 };
 static int is_kni_initialized;
 
-RTE_LOG_REGISTER(eth_kni_logtype, pmd.net.kni, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_kni_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_kni_logtype, \
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 0b189d5d15..b72060a449 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -2168,5 +2168,5 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(lio_logtype_init, pmd.net.liquidio.init, NOTICE);
-RTE_LOG_REGISTER(lio_logtype_driver, pmd.net.liquidio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(lio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 77c95bcb7a..37a49fa13d 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1878,4 +1878,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_memif,
 			      ETH_MEMIF_ZC_ARG "=yes|no"
 			      ETH_MEMIF_SECRET_ARG "=<string>");
 
-RTE_LOG_REGISTER(memif_logtype, pmd.net.memif, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(memif_logtype, NOTICE);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index d048d21033..7cd35cd3ca 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1319,7 +1319,7 @@ mlx4_glue_init(void)
 #endif
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx4_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b610f29a66..35f91e965e 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2442,7 +2442,7 @@ static struct mlx5_pci_driver mlx5_driver = {
 };
 
 /* Initialize driver log type. */
-RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index b0940b4462..a3ee150204 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -987,4 +987,4 @@ static struct rte_vdev_driver pmd_mvneta_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
-RTE_LOG_REGISTER(mvneta_logtype, pmd.net.mvneta, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mvneta_logtype, NOTICE);
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 1d41788974..63d348e279 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -3309,4 +3309,4 @@ static struct rte_vdev_driver pmd_mrvl_drv = {
 
 RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv);
 RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2);
-RTE_LOG_REGISTER(mrvl_logtype, pmd.net.mvpp2, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(mrvl_logtype, NOTICE);
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index a7b7f15c16..9e2a405973 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1296,8 +1296,8 @@ static struct rte_vmbus_driver rte_netvsc_pmd = {
 
 RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic");
-RTE_LOG_REGISTER(hn_logtype_init, pmd.net.netvsc.init, NOTICE);
-RTE_LOG_REGISTER(hn_logtype_driver, pmd.net.netvsc.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(hn_logtype_driver, driver, NOTICE);
 RTE_PMD_REGISTER_PARAM_STRING(net_netvsc,
 			      NETVSC_ARG_LATENCY "=<uint32> "
 			      NETVSC_ARG_RXBREAK "=<uint32> "
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 888324cd20..ad2c2b55f6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3847,8 +3847,8 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
 RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
-RTE_LOG_REGISTER(nfp_logtype_init, pmd.net.nfp.init, NOTICE);
-RTE_LOG_REGISTER(nfp_logtype_driver, pmd.net.nfp.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE);
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 32764e8f0e..508bafc12a 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_null_logtype, \
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 5836dbe09e..9f4c0503b4 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -47,9 +47,9 @@ enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
-RTE_LOG_REGISTER(otx_net_logtype_mbox, pmd.net.octeontx.mbox, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_init, pmd.net.octeontx.init, NOTICE);
-RTE_LOG_REGISTER(otx_net_logtype_driver, pmd.net.octeontx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(otx_net_logtype_driver, driver, NOTICE);
 
 /* Parse integer from integer argument */
 static int
diff --git a/drivers/net/octeontx_ep/otx_ep_ethdev.c b/drivers/net/octeontx_ep/otx_ep_ethdev.c
index b35c88b347..a243683d61 100644
--- a/drivers/net/octeontx_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeontx_ep/otx_ep_ethdev.c
@@ -463,4 +463,4 @@ static struct rte_pci_driver rte_otx_ep_pmd = {
 RTE_PMD_REGISTER_PCI(net_otx_ep, rte_otx_ep_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_otx_ep, pci_id_otx_ep_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_otx_ep, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(otx_net_ep_logtype, pmd.net.octeontx_ep, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(otx_net_ep_logtype, NOTICE);
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index 883a0c494a..a8774b7a43 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -141,7 +141,7 @@ static struct rte_eth_link pmd_link = {
 		.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_pcap_logtype, pmd.net.pcap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_pcap_logtype, NOTICE);
 
 static struct queue_missed_stat*
 queue_missed_stat_update(struct rte_eth_dev *dev, unsigned int qid)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 8cf59e210d..3135466713 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -1177,4 +1177,4 @@ struct rte_vdev_driver pmd_pfe_drv = {
 
 RTE_PMD_REGISTER_VDEV(PFE_NAME_PMD, pmd_pfe_drv);
 RTE_PMD_REGISTER_PARAM_STRING(PFE_NAME_PMD, PFE_VDEV_GEM_ID_ARG "=<int> ");
-RTE_LOG_REGISTER(pfe_logtype_pmd, pmd.net.pfe, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pfe_logtype_pmd, NOTICE);
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index c2c8de8675..323d46e6eb 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2892,5 +2892,5 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
-RTE_LOG_REGISTER(qede_logtype_init, pmd.net.qede.init, NOTICE);
-RTE_LOG_REGISTER(qede_logtype_driver, pmd.net.qede.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(qede_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 02f6da2817..1faf38a714 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -62,7 +62,7 @@ static struct rte_eth_link pmd_link = {
 	.link_autoneg = ETH_LINK_FIXED,
 };
 
-RTE_LOG_REGISTER(eth_ring_logtype, pmd.net.ring, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(eth_ring_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 0c2a79a7d2..f64023256d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -80,7 +80,7 @@ static const struct softnic_conn_params conn_params_default = {
 	.msg_handle_arg = NULL,
 };
 
-RTE_LOG_REGISTER(pmd_softnic_logtype, pmd.net.softnic, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pmd_softnic_logtype, NOTICE);
 
 #define PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 6eaeadf1c8..7416a6b1b8 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1949,5 +1949,5 @@ RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver);
 RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
 RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME,
 	"* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )");
-RTE_LOG_REGISTER(szedata2_logtype_init, pmd.net.szedata2.init, NOTICE);
-RTE_LOG_REGISTER(szedata2_logtype_driver, pmd.net.szedata2.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(szedata2_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 854abf4b30..5735988e7c 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2571,4 +2571,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap,
 			      ETH_TAP_IFACE_ARG "=<string> "
 			      ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " "
 			      ETH_TAP_REMOTE_ARG "=<string>");
-RTE_LOG_REGISTER(tap_logtype, pmd.net.tap, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(tap_logtype, NOTICE);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index c45d6e00a9..fc1844ddfc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -51,9 +51,9 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 static int nicvf_vlan_offload_config(struct rte_eth_dev *dev, int mask);
 static int nicvf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
-RTE_LOG_REGISTER(nicvf_logtype_mbox, pmd.net.thunderx.mbox, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_init, pmd.net.thunderx.init, NOTICE);
-RTE_LOG_REGISTER(nicvf_logtype_driver, pmd.net.thunderx.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_mbox, mbox, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(nicvf_logtype_driver, driver, NOTICE);
 
 static void
 nicvf_link_status_update(struct nicvf *nic,
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d7747d0f09..46d6f541b5 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -5332,17 +5332,17 @@ RTE_PMD_REGISTER_PARAM_STRING(net_txgbe,
 			      TXGBE_DEVARG_FFE_PRE "=<uint16>"
 			      TXGBE_DEVARG_FFE_POST "=<uint16>");
 
-RTE_LOG_REGISTER(txgbe_logtype_init, pmd.net.txgbe.init, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_driver, pmd.net.txgbe.driver, NOTICE);
-RTE_LOG_REGISTER(txgbe_logtype_bp, pmd.net.txgbe.bp, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_driver, driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_bp, bp, NOTICE);
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
-	RTE_LOG_REGISTER(txgbe_logtype_rx, pmd.net.txgbe.rx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_rx, rx, DEBUG);
 #endif
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
-	RTE_LOG_REGISTER(txgbe_logtype_tx, pmd.net.txgbe.tx, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx, tx, DEBUG);
 #endif
 
 #ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
-	RTE_LOG_REGISTER(txgbe_logtype_tx_free, pmd.net.txgbe.tx_free, DEBUG);
+	RTE_LOG_REGISTER_SUFFIX(txgbe_logtype_tx_free, tx_free, DEBUG);
 #endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c1b7099717..55f2a342c5 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -48,7 +48,7 @@
 #define NETVSC_CLASS_ID "{f8615163-df3e-46c5-913f-f2d2f965ed0e}"
 #define NETVSC_MAX_ROUTE_LINE_SIZE 300
 
-RTE_LOG_REGISTER(vdev_netvsc_logtype, pmd.net.vdev_netvsc, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vdev_netvsc_logtype, NOTICE);
 
 #define DRV_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, \
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 281379d6a3..8524898661 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -19,7 +19,7 @@
 
 #include "rte_eth_vhost.h"
 
-RTE_LOG_REGISTER(vhost_logtype, pmd.net.vhost, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
 
 #define VHOST_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 090d94615e..0568305667 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2483,5 +2483,5 @@ __rte_unused uint8_t is_rx)
 	return 0;
 }
 
-RTE_LOG_REGISTER(virtio_logtype_init, pmd.net.virtio.init, NOTICE);
-RTE_LOG_REGISTER(virtio_logtype_driver, pmd.net.virtio.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(virtio_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index d1a313bfc4..5bffbb8a0e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1491,5 +1491,5 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE);
-RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_init, init, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_driver, driver, NOTICE);
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 7ccebfa3fa..76e6a8530b 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1611,7 +1611,7 @@ static struct rte_pci_driver rte_ifpga_rawdev_pmd = {
 RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd);
 RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ifpga_rawdev_logtype, pmd.raw.ifpga, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(ifpga_rawdev_logtype, NOTICE);
 
 static const char * const valid_args[] = {
 #define IFPGA_ARG_NAME         "ifpga"
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 15af07017c..5396671d4f 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -28,7 +28,7 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF	0x6f2F
 #define IOAT_DEVICE_ID_ICX	0x0b00
 
-RTE_LOG_REGISTER(ioat_pmd_logtype, pmd.raw.ioat, INFO);
+RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
 
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6703bb5d08..78cfcd79f7 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1547,4 +1547,4 @@ static struct rte_pci_driver rte_ntb_pmd = {
 RTE_PMD_REGISTER_PCI(raw_ntb, rte_ntb_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(raw_ntb, pci_id_ntb_map);
 RTE_PMD_REGISTER_KMOD_DEP(raw_ntb, "* igb_uio | uio_pci_generic | vfio-pci");
-RTE_LOG_REGISTER(ntb_logtype, pmd.raw.ntb, INFO);
+RTE_LOG_REGISTER_DEFAULT(ntb_logtype, INFO);
diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 8896f0c9c5..16ecae3d92 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -768,4 +768,4 @@ static struct rte_vdev_driver skeleton_pmd_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv);
-RTE_LOG_REGISTER(skeleton_pmd_logtype, pmd.raw.skeleton, INFO);
+RTE_LOG_REGISTER_DEFAULT(skeleton_pmd_logtype, INFO);
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index dd96436d42..dcb2ced88e 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -21,7 +21,6 @@
 #include "mlx5_rxp_csrs.h"
 
 #define MLX5_REGEX_DRIVER_NAME regex_mlx5
-#define MLX5_REGEX_LOG_NAME    pmd.regex.mlx5
 
 int mlx5_regex_logtype;
 
@@ -275,7 +274,7 @@ RTE_INIT(rte_mlx5_regex_init)
 		mlx5_pci_driver_register(&mlx5_regex_driver);
 }
 
-RTE_LOG_REGISTER(mlx5_regex_logtype, MLX5_REGEX_LOG_NAME, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_regex_logtype, NOTICE)
 RTE_PMD_EXPORT_NAME(MLX5_REGEX_DRIVER_NAME, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(MLX5_REGEX_DRIVER_NAME, mlx5_regex_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(MLX5_REGEX_DRIVER_NAME, "* ib_uverbs & mlx5_core & mlx5_ib");
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 719e594c44..40db28b6db 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -841,7 +841,7 @@ static struct mlx5_pci_driver mlx5_vdpa_driver = {
 	},
 };
 
-RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
+RTE_LOG_REGISTER_DEFAULT(mlx5_vdpa_logtype, NOTICE)
 
 /**
  * Driver initialization routine.
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index 5ba891c232..fc37236195 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -29,7 +29,7 @@
 
 
 /* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
 
 /* Helper macro for logging */
 #define rte_bbdev_log(level, fmt, ...) \
diff --git a/lib/bpf/bpf.c b/lib/bpf/bpf.c
index 8d15885bc4..0caad2a8f0 100644
--- a/lib/bpf/bpf.c
+++ b/lib/bpf/bpf.c
@@ -53,4 +53,4 @@ bpf_jit(struct rte_bpf *bpf)
 	return rc;
 }
 
-RTE_LOG_REGISTER(rte_bpf_logtype, lib.bpf, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_bpf_logtype, INFO);
diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index 002022263e..9fa7d010ef 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -27,7 +27,7 @@ struct rte_cfgfile {
 	struct rte_cfgfile_section *sections;
 };
 
-RTE_LOG_REGISTER(cfgfile_logtype, lib.cfgfile, INFO);
+RTE_LOG_REGISTER_DEFAULT(cfgfile_logtype, INFO);
 
 #define CFG_LOG(level, fmt, args...)					\
 	rte_log(RTE_LOG_ ## level, cfgfile_logtype, "%s(): " fmt "\n",	\
diff --git a/lib/compressdev/rte_compressdev.c b/lib/compressdev/rte_compressdev.c
index 49a342f400..2e9218af68 100644
--- a/lib/compressdev/rte_compressdev.c
+++ b/lib/compressdev/rte_compressdev.c
@@ -763,4 +763,4 @@ rte_compressdev_name_get(uint8_t dev_id)
 	return dev->data->name;
 }
 
-RTE_LOG_REGISTER(compressdev_logtype, lib.compressdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(compressdev_logtype, NOTICE);
diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h
index a1c608ab41..b706bb8710 100644
--- a/lib/eal/include/rte_log.h
+++ b/lib/eal/include/rte_log.h
@@ -373,6 +373,15 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
 		 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) :	\
 	 0)
 
+#define RTE_LOG_REGISTER_IMPL(type, name, level)			    \
+int type;								    \
+RTE_INIT(__##type)							    \
+{									    \
+	type = rte_log_register_type_and_pick_level(name, RTE_LOG_##level); \
+	if (type < 0)                                                       \
+		type = RTE_LOGTYPE_EAL;                                     \
+}
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -389,15 +398,29 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap)
  * @param level
  *   Log level. A value between EMERG (1) and DEBUG (8).
  */
-#define RTE_LOG_REGISTER(type, name, level)				\
-int type;								\
-RTE_INIT(__##type)							\
-{									\
-	type = rte_log_register_type_and_pick_level(RTE_STR(name),	\
-						    RTE_LOG_##level);	\
-	if (type < 0)                                                   \
-		type = RTE_LOGTYPE_EAL;                                 \
-}
+#define RTE_LOG_REGISTER(type, name, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(name), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right format for the logtype.
+ */
+#define RTE_LOG_REGISTER_DEFAULT(type, level) \
+	RTE_LOG_REGISTER_IMPL(type, RTE_STR(RTE_LOG_DEFAULT_LOGTYPE), level)
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * This is an equivalent to RTE_LOG_REGISTER, but relying on the build system
+ * to select the right prefix for the logtype.
+ */
+#define RTE_LOG_REGISTER_SUFFIX(type, suffix, level)			      \
+	RTE_LOG_REGISTER_IMPL(type,					      \
+		 RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) "." RTE_STR(suffix), level)
 
 #ifdef __cplusplus
 }
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 483013ec7a..c607eabb5b 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6294,7 +6294,7 @@ rte_eth_representor_info_get(uint16_t port_id,
 	return eth_err(port_id, (*dev->dev_ops->representor_info_get)(dev, info));
 }
 
-RTE_LOG_REGISTER(rte_eth_dev_logtype, lib.ethdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);
 
 RTE_INIT(ethdev_init_telemetry)
 {
diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c
index dd7b83087d..ee20b39f4b 100644
--- a/lib/eventdev/rte_event_timer_adapter.c
+++ b/lib/eventdev/rte_event_timer_adapter.c
@@ -29,9 +29,9 @@
 #define DATA_MZ_NAME_MAX_LEN 64
 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d"
 
-RTE_LOG_REGISTER(evtim_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_buffer_logtype, lib.eventdev.adapter.timer, NOTICE);
-RTE_LOG_REGISTER(evtim_svc_logtype, lib.eventdev.adapter.timer.svc, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_buffer_logtype, adapter.timer, NOTICE);
+RTE_LOG_REGISTER_SUFFIX(evtim_svc_logtype, adapter.timer.svc, NOTICE);
 
 static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX];
 
diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c
index 639b0051f5..f125267e8f 100644
--- a/lib/flow_classify/rte_flow_classify.c
+++ b/lib/flow_classify/rte_flow_classify.c
@@ -667,4 +667,4 @@ rte_flow_classifier_query(struct rte_flow_classifier *cls,
 	return ret;
 }
 
-RTE_LOG_REGISTER(librte_flow_classify_logtype, lib.flow_classify, INFO);
+RTE_LOG_REGISTER_DEFAULT(librte_flow_classify_logtype, INFO);
diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 7224b00a7d..d61288647c 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -578,4 +578,4 @@ rte_graph_max_count(void)
 	return graph_id;
 }
 
-RTE_LOG_REGISTER(rte_graph_logtype, lib.graph, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_graph_logtype, INFO);
diff --git a/lib/member/rte_member.c b/lib/member/rte_member.c
index 4696c0f171..9dd55a5adf 100644
--- a/lib/member/rte_member.c
+++ b/lib/member/rte_member.c
@@ -297,4 +297,4 @@ rte_member_reset(const struct rte_member_setsum *setsum)
 	}
 }
 
-RTE_LOG_REGISTER(librte_member_logtype, lib.member, DEBUG);
+RTE_LOG_REGISTER_DEFAULT(librte_member_logtype, DEBUG);
diff --git a/lib/meson.build b/lib/meson.build
index a4fb0dbdd4..4a64756a68 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -178,6 +178,7 @@ foreach l:libraries
     if use_function_versioning
         cflags += '-DRTE_USE_FUNCTION_VERSIONING'
     endif
+    cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l
 
     # first build static lib
     static_lib = static_library(libname,
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index c24990d923..269f8ef613 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -528,7 +528,7 @@ handle_ports_stats_values_by_name(const char *cmd __rte_unused,
 	return used;
 }
 
-RTE_LOG_REGISTER(metrics_log_level, lib.metrics, ERR);
+RTE_LOG_REGISTER_DEFAULT(metrics_log_level, ERR);
 
 RTE_INIT(metrics_ctor)
 {
diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index 1fe58f7c75..d9a526ab7b 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -76,7 +76,7 @@ static uint16_t max_simd_bitwidth;
 	rte_log(RTE_LOG_ ## level, libnet_logtype, "%s(): " fmt "\n",	\
 		__func__, ## args)
 
-RTE_LOG_REGISTER(libnet_logtype, lib.net, INFO);
+RTE_LOG_REGISTER_DEFAULT(libnet_logtype, INFO);
 
 /* Scalar handling */
 
diff --git a/lib/node/log.c b/lib/node/log.c
index f14199f07c..a6578ee33b 100644
--- a/lib/node/log.c
+++ b/lib/node/log.c
@@ -4,4 +4,4 @@
 
 #include "node_private.h"
 
-RTE_LOG_REGISTER(rte_node_logtype, lib.node, INFO);
+RTE_LOG_REGISTER_DEFAULT(rte_node_logtype, INFO);
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index d20e944e04..382217bc15 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -12,7 +12,7 @@
 
 #include "rte_pdump.h"
 
-RTE_LOG_REGISTER(pdump_logtype, lib.pdump, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(pdump_logtype, NOTICE);
 
 /* Macro for printing using RTE_LOG */
 #define PDUMP_LOG(level, fmt, args...)				\
diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index f29164dd15..a6134e76ea 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -627,7 +627,7 @@ handle_dev_xstats(const char *cmd __rte_unused,
 	return 0;
 }
 
-RTE_LOG_REGISTER(librawdev_logtype, lib.rawdev, INFO);
+RTE_LOG_REGISTER_DEFAULT(librawdev_logtype, INFO);
 
 RTE_INIT(librawdev_init_telemetry)
 {
diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c
index a5f9de3267..7510db2f81 100644
--- a/lib/rcu/rte_rcu_qsbr.c
+++ b/lib/rcu/rte_rcu_qsbr.c
@@ -496,4 +496,4 @@ rte_rcu_qsbr_dq_delete(struct rte_rcu_qsbr_dq *dq)
 	return 0;
 }
 
-RTE_LOG_REGISTER(rte_rcu_log_type, lib.rcu, ERR);
+RTE_LOG_REGISTER_DEFAULT(rte_rcu_log_type, ERR);
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index 10d3b2eeb3..f1cbb9803f 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -194,4 +194,4 @@ rte_stack_lookup(const char *name)
 	return r;
 }
 
-RTE_LOG_REGISTER(stack_logtype, lib.stack, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(stack_logtype, NOTICE);
diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index 9abfc0bfe7..9cbcf650b6 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -1779,5 +1779,5 @@ int rte_vhost_async_channel_unregister(int vid, uint16_t queue_id)
 	return ret;
 }
 
-RTE_LOG_REGISTER(vhost_config_log_level, lib.vhost.config, INFO);
-RTE_LOG_REGISTER(vhost_data_log_level, lib.vhost.data, WARNING);
+RTE_LOG_REGISTER_SUFFIX(vhost_config_log_level, config, INFO);
+RTE_LOG_REGISTER_SUFFIX(vhost_data_log_level, data, WARNING);
-- 
2.31.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v4] log: register with standardized names
  2021-05-11 12:38 ` [dpdk-dev] [PATCH v4] " Thomas Monjalon
@ 2021-05-11 12:52   ` Bruce Richardson
  2021-05-11 13:21     ` Thomas Monjalon
  0 siblings, 1 reply; 14+ messages in thread
From: Bruce Richardson @ 2021-05-11 12:52 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, andrew.rybchenko, ferruh.yigit, David Marchand

On Tue, May 11, 2021 at 02:38:10PM +0200, Thomas Monjalon wrote:
> From: David Marchand <david.marchand@redhat.com>
> 
> Let's try to enforce the convention where most drivers use a pmd. logtype
> with their class reflected in it, and libraries use a lib. logtype.
> 
> Introduce two new macros:
> - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
>   used in a component. It is associated to the default name provided
>   by the build system,
> - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
>   and then the passed name is appended to the default name,
> 
> RTE_LOG_REGISTER is left untouched for existing external users
> and for components that do not comply with the convention.
> 
> There is a new Meson variable log_prefix to adapt the default name
> for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
> 
> Note: achieved with below commands + reverted change on net/bonding +
> edits on crypto/virtio, compress/mlx5, regex/mlx5
> 
> $ git grep -l RTE_LOG_REGISTER drivers/ |
>   while read file; do
>     pattern=${file##drivers/};
>     class=${pattern%%/*};
>     pattern=${pattern#$class/};
>     drv=${pattern%%/*};
>     case "$class" in
>       baseband) pattern=pmd.bb.$drv;;
>       bus) pattern=bus.$drv;;
>       mempool) pattern=mempool.$drv;;
>       *) pattern=pmd.$class.$drv;;
>     esac
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> $ git grep -l RTE_LOG_REGISTER lib/ |
>   while read file; do
>     pattern=${file##lib/};
>     pattern=lib.${pattern%%/*};
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
>     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
>   done
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

From meson build viewpoint,
Acked-by: Bruce Richardson <bruce.richardson@intel.com>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [dpdk-dev] [PATCH v4] log: register with standardized names
  2021-05-11 12:52   ` Bruce Richardson
@ 2021-05-11 13:21     ` Thomas Monjalon
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2021-05-11 13:21 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, andrew.rybchenko, ferruh.yigit, Bruce Richardson

11/05/2021 14:52, Bruce Richardson:
> On Tue, May 11, 2021 at 02:38:10PM +0200, Thomas Monjalon wrote:
> > From: David Marchand <david.marchand@redhat.com>
> > 
> > Let's try to enforce the convention where most drivers use a pmd. logtype
> > with their class reflected in it, and libraries use a lib. logtype.
> > 
> > Introduce two new macros:
> > - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
> >   used in a component. It is associated to the default name provided
> >   by the build system,
> > - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
> >   and then the passed name is appended to the default name,
> > 
> > RTE_LOG_REGISTER is left untouched for existing external users
> > and for components that do not comply with the convention.
> > 
> > There is a new Meson variable log_prefix to adapt the default name
> > for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.
> > 
> > Note: achieved with below commands + reverted change on net/bonding +
> > edits on crypto/virtio, compress/mlx5, regex/mlx5
> > 
> > $ git grep -l RTE_LOG_REGISTER drivers/ |
> >   while read file; do
> >     pattern=${file##drivers/};
> >     class=${pattern%%/*};
> >     pattern=${pattern#$class/};
> >     drv=${pattern%%/*};
> >     case "$class" in
> >       baseband) pattern=pmd.bb.$drv;;
> >       bus) pattern=bus.$drv;;
> >       mempool) pattern=mempool.$drv;;
> >       *) pattern=pmd.$class.$drv;;
> >     esac
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
> >   done
> > 
> > $ git grep -l RTE_LOG_REGISTER lib/ |
> >   while read file; do
> >     pattern=${file##lib/};
> >     pattern=lib.${pattern%%/*};
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
> >     sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
> >   done
> > 
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> 
> From meson build viewpoint,
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-11 13:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 12:43 [dpdk-dev] [PATCH] log: deduce log type from filename David Marchand
2021-04-09 13:01 ` Bruce Richardson
2021-04-13 15:07   ` David Marchand
2021-04-26 12:51 ` [dpdk-dev] [PATCH v2] log: register with standardized names David Marchand
2021-05-11 10:09 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
2021-05-11 11:15   ` David Marchand
2021-05-11 11:49   ` Bruce Richardson
2021-05-11 12:01     ` Thomas Monjalon
2021-05-11 11:59   ` Bruce Richardson
2021-05-11 12:10     ` Thomas Monjalon
2021-05-11 12:24       ` Bruce Richardson
2021-05-11 12:38 ` [dpdk-dev] [PATCH v4] " Thomas Monjalon
2021-05-11 12:52   ` Bruce Richardson
2021-05-11 13:21     ` Thomas Monjalon

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).