From: <jerinj@marvell.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <olivier.matz@6wind.com>,
<david.marchand@redhat.com>, Jerin Jacob <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH 00/13] rte_log registration usage improvement
Date: Wed, 17 Jun 2020 12:00:34 +0530 [thread overview]
Message-ID: <20200617063047.1555518-1-jerinj@marvell.com> (raw)
From: Jerin Jacob <jerinj@marvell.com>
This patch series improves the rte_log registration code snippet by
avoiding duplication of the code around registration by
introducing RTE_LOG_REGISTER macro.
Pending stuff
~~~~~~~~~~~~~
I have converted all existing rte_log_register() to new macro, except
the following (as it has different usage style)
1) drivers/common/mlx5/mlx5_common.c
2) drivers/net/e1000/e1000_logs.c
3) drivers/net/sfc/sfc_ethdev.c
Example usage of new macro
~~~~~~~~~~~~~~~~~~~~~~~~~~
-/**
- * @internal
- */
-int otx2_logtype_base;
-/**
- * @internal
- */
-int otx2_logtype_mbox;
-/**
- * @internal
- */
-int otx2_logtype_npa;
-/**
- * @internal
- */
-int otx2_logtype_nix;
-/**
- * @internal
- */
-int otx2_logtype_npc;
-/**
- * @internal
- */
-int otx2_logtype_tm;
-/**
- * @internal
- */
-int otx2_logtype_sso;
-/**
- * @internal
- */
-int otx2_logtype_tim;
-/**
- * @internal
- */
-int otx2_logtype_dpi;
-/**
- * @internal
- */
-int otx2_logtype_ep;
-
-RTE_INIT(otx2_log_init);
-static void
-otx2_log_init(void)
-{
- otx2_logtype_base = rte_log_register("pmd.octeontx2.base");
- if (otx2_logtype_base >= 0)
- rte_log_set_level(otx2_logtype_base, RTE_LOG_NOTICE);
-
- otx2_logtype_mbox = rte_log_register("pmd.octeontx2.mbox");
- if (otx2_logtype_mbox >= 0)
- rte_log_set_level(otx2_logtype_mbox, RTE_LOG_NOTICE);
-
- otx2_logtype_npa = rte_log_register("pmd.mempool.octeontx2");
- if (otx2_logtype_npa >= 0)
- rte_log_set_level(otx2_logtype_npa, RTE_LOG_NOTICE);
-
- otx2_logtype_nix = rte_log_register("pmd.net.octeontx2");
- if (otx2_logtype_nix >= 0)
- rte_log_set_level(otx2_logtype_nix, RTE_LOG_NOTICE);
-
- otx2_logtype_npc = rte_log_register("pmd.net.octeontx2.flow");
- if (otx2_logtype_npc >= 0)
- rte_log_set_level(otx2_logtype_npc, RTE_LOG_NOTICE);
-
- otx2_logtype_tm = rte_log_register("pmd.net.octeontx2.tm");
- if (otx2_logtype_tm >= 0)
- rte_log_set_level(otx2_logtype_tm, RTE_LOG_NOTICE);
-
- otx2_logtype_sso = rte_log_register("pmd.event.octeontx2");
- if (otx2_logtype_sso >= 0)
- rte_log_set_level(otx2_logtype_sso, RTE_LOG_NOTICE);
-
- otx2_logtype_tim =
rte_log_register("pmd.event.octeontx2.timer");
- if (otx2_logtype_tim >= 0)
- rte_log_set_level(otx2_logtype_tim, RTE_LOG_NOTICE);
-
- otx2_logtype_dpi = rte_log_register("pmd.raw.octeontx2.dpi");
- if (otx2_logtype_dpi >= 0)
- rte_log_set_level(otx2_logtype_dpi, RTE_LOG_NOTICE);
-
- otx2_logtype_ep = rte_log_register("pmd.raw.octeontx2.ep");
- if (otx2_logtype_ep >= 0)
- rte_log_set_level(otx2_logtype_ep, RTE_LOG_NOTICE);
-
-}
+RTE_LOG_REGISTER(otx2_logtype_base, pmd.octeontx2.base, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_mbox, pmd.octeontx2.mbox, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_npa, pmd.mempool.octeontx2, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_nix, pmd.net.octeontx2, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_npc, pmd.net.octeontx2.flow, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_tm, pmd.net.octeontx2.tm, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_sso, pmd.event.octeontx2, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_tim, pmd.event.octeontx2.timer, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_dpi, pmd.raw.octeontx2.dpi, NOTICE);
+RTE_LOG_REGISTER(otx2_logtype_ep, pmd.raw.octeontx2.ep, NOTICE);
Jerin Jacob (13):
eal/log: introduce log register macro
lib: use log register macro
drivers/vdpa: use log register macro
drivers/raw: use log register macro
drivers/net: use log register macro
drivers/mempool: use log register macro
drivers/event: use log register macro
drivers/crypto: use log register macro
drivers/compress: use log register macro
drivers/common: use log register macro
drivers/bus: use log register macro
drivers/baseband: use log register macro
app/test: use log register macro
app/test/test_efd.c | 6 +-
app/test/test_hash.c | 7 +-
app/test/test_timer_racecond.c | 7 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 17 +---
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 18 +---
drivers/baseband/null/bbdev_null.c | 9 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 9 +-
drivers/bus/dpaa/dpaa_bus.c | 10 +-
drivers/bus/fslmc/fslmc_bus.c | 11 +--
drivers/bus/ifpga/ifpga_bus.c | 9 +-
drivers/bus/vdev/vdev.c | 10 +-
drivers/bus/vmbus/vmbus_common.c | 9 +-
drivers/common/dpaax/dpaax_iova_table.c | 10 +-
drivers/common/iavf/iavf_impl.c | 9 +-
drivers/common/octeontx/octeontx_mbox.c | 9 +-
drivers/common/octeontx2/otx2_common.c | 96 ++-----------------
drivers/common/qat/qat_logs.c | 17 +---
drivers/compress/isal/isal_compress_pmd.c | 10 +-
drivers/compress/octeontx/otx_zip_pmd.c | 10 +-
drivers/compress/zlib/zlib_pmd.c | 10 +-
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 8 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 8 +-
drivers/crypto/caam_jr/caam_jr.c | 8 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 11 +--
drivers/crypto/dpaa_sec/dpaa_sec.c | 10 +-
drivers/crypto/kasumi/rte_kasumi_pmd.c | 6 +-
drivers/crypto/mvsam/rte_mrvl_pmd.c | 7 +-
drivers/crypto/nitrox/nitrox_logs.c | 9 +-
drivers/crypto/null/null_crypto_pmd.c | 7 +-
drivers/crypto/octeontx/otx_cryptodev.c | 10 +-
drivers/crypto/octeontx2/otx2_cryptodev.c | 12 +--
drivers/crypto/openssl/rte_openssl_pmd.c | 7 +-
.../scheduler/rte_cryptodev_scheduler.c | 8 +-
drivers/crypto/snow3g/rte_snow3g_pmd.c | 7 +-
drivers/crypto/virtio/virtio_cryptodev.c | 39 ++------
drivers/crypto/zuc/rte_zuc_pmd.c | 7 +-
drivers/event/dpaa/dpaa_eventdev.c | 8 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 10 +-
drivers/event/octeontx/ssovf_evdev.c | 8 +-
drivers/event/octeontx/timvf_evdev.c | 9 +-
drivers/event/opdl/opdl_evdev.c | 8 +-
drivers/event/opdl/opdl_ring.c | 2 -
drivers/event/sw/sw_evdev.c | 11 +--
drivers/mempool/dpaa/dpaa_mempool.c | 10 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 10 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 10 +-
drivers/net/af_packet/rte_eth_af_packet.c | 8 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 8 +-
drivers/net/ark/ark_ethdev.c | 10 +-
drivers/net/atlantic/atl_ethdev.c | 15 +--
drivers/net/avp/avp_ethdev.c | 10 +-
drivers/net/axgbe/axgbe_ethdev.c | 15 +--
drivers/net/bnx2x/bnx2x_ethdev.c | 15 +--
drivers/net/bnxt/bnxt_ethdev.c | 9 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 9 +-
drivers/net/cxgbe/cxgbe_ethdev.c | 15 +--
drivers/net/dpaa/dpaa_ethdev.c | 9 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 9 +-
drivers/net/ena/ena_ethdev.c | 48 ++--------
drivers/net/enetc/enetc_ethdev.c | 10 +-
drivers/net/enic/enic_ethdev.c | 9 +-
drivers/net/failsafe/failsafe.c | 10 +-
drivers/net/fm10k/fm10k_ethdev.c | 40 +-------
drivers/net/hinic/hinic_pmd_ethdev.c | 11 +--
drivers/net/hns3/hns3_ethdev.c | 15 +--
drivers/net/i40e/i40e_ethdev.c | 38 +-------
drivers/net/iavf/iavf_ethdev.c | 40 +-------
drivers/net/ice/ice_ethdev.c | 38 +-------
drivers/net/igc/igc_logs.c | 16 +---
drivers/net/ionic/ionic_ethdev.c | 10 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 10 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 39 ++------
drivers/net/kni/rte_eth_kni.c | 9 +-
drivers/net/liquidio/lio_ethdev.c | 15 +--
drivers/net/memif/rte_eth_memif.c | 9 +-
drivers/net/mlx4/mlx4.c | 11 +--
drivers/net/mlx5/mlx5.c | 11 +--
drivers/net/mvneta/mvneta_ethdev.c | 10 +-
drivers/net/mvpp2/mrvl_ethdev.c | 10 +-
drivers/net/netvsc/hn_ethdev.c | 15 +--
drivers/net/nfp/nfp_net.c | 15 +--
drivers/net/null/rte_eth_null.c | 8 +-
drivers/net/octeontx/octeontx_ethdev.c | 21 +---
drivers/net/pcap/rte_eth_pcap.c | 8 +-
drivers/net/pfe/pfe_ethdev.c | 10 +-
drivers/net/qede/qede_ethdev.c | 16 +---
drivers/net/ring/rte_eth_ring.c | 8 +-
drivers/net/softnic/rte_eth_softnic.c | 10 +-
drivers/net/szedata2/rte_eth_szedata2.c | 15 +--
drivers/net/tap/rte_eth_tap.c | 9 +-
drivers/net/thunderx/nicvf_ethdev.c | 21 +---
drivers/net/vdev_netvsc/vdev_netvsc.c | 13 +--
drivers/net/vhost/rte_eth_vhost.c | 8 +-
drivers/net/virtio/virtio_ethdev.c | 15 +--
drivers/net/vmxnet3/vmxnet3_ethdev.c | 15 +--
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 11 +--
drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 11 +--
drivers/raw/ifpga/ifpga_rawdev.c | 10 +-
drivers/raw/ioat/ioat_rawdev.c | 12 +--
drivers/raw/ioat/rte_ioat_rawdev.h | 2 -
drivers/raw/ntb/ntb.c | 10 +-
drivers/raw/skeleton/skeleton_rawdev.c | 11 +--
drivers/vdpa/ifc/ifcvf_vdpa.c | 10 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 7 +-
lib/librte_bbdev/rte_bbdev.c | 8 +-
lib/librte_bpf/bpf.c | 9 +-
lib/librte_cfgfile/rte_cfgfile.c | 8 +-
lib/librte_compressdev/rte_compressdev.c | 7 +-
lib/librte_compressdev/rte_compressdev_pmd.c | 2 -
lib/librte_eal/include/rte_log.h | 25 +++++
lib/librte_ethdev/rte_ethdev.c | 9 +-
lib/librte_eventdev/rte_event_timer_adapter.c | 21 +---
lib/librte_flow_classify/rte_flow_classify.c | 10 +-
lib/librte_graph/graph.c | 7 +-
lib/librte_member/rte_member.c | 9 +-
lib/librte_metrics/rte_metrics_telemetry.c | 5 +-
lib/librte_node/log.c | 9 +-
lib/librte_pdump/rte_pdump.c | 9 +-
lib/librte_rawdev/rte_rawdev.c | 7 +-
lib/librte_rcu/rte_rcu_qsbr.c | 9 +-
lib/librte_stack/rte_stack.c | 7 +-
lib/librte_vhost/vhost.c | 15 +--
122 files changed, 229 insertions(+), 1322 deletions(-)
--
2.26.2
next reply other threads:[~2020-06-17 6:30 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 6:30 jerinj [this message]
2020-06-17 6:30 ` [dpdk-dev] [PATCH 01/13] eal/log: introduce log register macro jerinj
2020-06-17 10:00 ` Thomas Monjalon
2020-06-17 10:26 ` Andrew Rybchenko
2020-06-24 13:08 ` Jerin Jacob
2020-06-17 10:02 ` David Marchand
2020-06-17 10:21 ` Andrew Rybchenko
2020-06-24 13:11 ` Jerin Jacob
2020-06-24 15:26 ` Andrew Rybchenko
2020-06-24 15:32 ` Jerin Jacob
2020-06-24 15:43 ` Andrew Rybchenko
2020-06-24 18:10 ` Jerin Jacob
2020-06-26 11:16 ` Jerin Jacob
2020-06-26 11:42 ` David Marchand
2020-06-26 12:06 ` Jerin Jacob
2020-06-26 12:13 ` David Marchand
2020-06-26 12:16 ` David Marchand
2020-06-26 12:37 ` Jerin Jacob
2020-06-29 13:39 ` Jerin Jacob
2020-06-30 13:39 ` David Marchand
2020-06-30 14:42 ` Jerin Jacob
2020-06-21 9:30 ` Sachin Saxena (OSS)
2020-06-17 6:30 ` [dpdk-dev] [PATCH 02/13] lib: use " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 03/13] drivers/vdpa: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 04/13] drivers/raw: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 05/13] drivers/net: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 06/13] drivers/mempool: " jerinj
2020-06-21 9:46 ` Sachin Saxena (OSS)
2020-06-17 6:30 ` [dpdk-dev] [PATCH 07/13] drivers/event: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 08/13] drivers/crypto: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 09/13] drivers/compress: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 10/13] drivers/common: " jerinj
2020-06-21 9:48 ` Sachin Saxena (OSS)
2020-06-17 6:30 ` [dpdk-dev] [PATCH 11/13] drivers/bus: " jerinj
2020-06-21 9:52 ` Sachin Saxena (OSS)
2020-06-17 6:30 ` [dpdk-dev] [PATCH 12/13] drivers/baseband: " jerinj
2020-06-17 6:30 ` [dpdk-dev] [PATCH 13/13] app/test: " jerinj
2020-06-25 16:18 ` [dpdk-dev] [PATCH 00/13] rte_log registration usage improvement Dybkowski, AdamX
2020-06-25 16:20 ` Dybkowski, AdamX
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 01/13] eal/log: introduce log register macro jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 02/13] lib: use " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 03/13] drivers/vdpa: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 04/13] drivers/raw: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 05/13] drivers/net: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 06/13] drivers/mempool: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 07/13] drivers/event: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 08/13] drivers/crypto: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 09/13] drivers/compress: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 10/13] drivers/common: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 11/13] drivers/bus: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 12/13] drivers/baseband: " jerinj
2020-07-01 3:58 ` [dpdk-dev] [PATCH v2 13/13] app/test: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 00/13] rte_log registration usage improvement jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 01/13] eal/log: introduce log register macro jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 02/13] lib: use " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 03/13] drivers/vdpa: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 04/13] drivers/raw: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 05/13] drivers/net: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 06/13] drivers/mempool: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 07/13] drivers/event: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 08/13] drivers/crypto: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 09/13] drivers/compress: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 10/13] drivers/common: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 11/13] drivers/bus: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 12/13] drivers/baseband: " jerinj
2020-07-01 6:48 ` [dpdk-dev] [PATCH v3 13/13] app/test: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 00/13] rte_log registration usage improvement jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 01/13] eal/log: introduce log register macro jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 02/13] lib: use " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 03/13] drivers/vdpa: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 04/13] drivers/raw: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 05/13] drivers/net: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 06/13] drivers/mempool: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 07/13] drivers/event: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 08/13] drivers/crypto: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 09/13] drivers/compress: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 10/13] drivers/common: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 11/13] drivers/bus: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 12/13] drivers/baseband: " jerinj
2020-07-01 10:44 ` [dpdk-dev] [PATCH v4 13/13] app/test: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 00/13] rte_log registration usage improvement jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 01/13] eal/log: introduce log register macro jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 02/13] lib: use " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 03/13] drivers/vdpa: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 04/13] drivers/raw: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 05/13] drivers/net: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 06/13] drivers/mempool: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 07/13] drivers/event: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 08/13] drivers/crypto: " jerinj
2020-07-02 17:59 ` Akhil Goyal
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 09/13] drivers/compress: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 10/13] drivers/common: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 11/13] drivers/bus: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 12/13] drivers/baseband: " jerinj
2020-07-01 12:33 ` [dpdk-dev] [PATCH v5 13/13] app/test: " jerinj
2020-07-03 13:55 ` [dpdk-dev] [PATCH v5 00/13] rte_log registration usage improvement David Marchand
2020-07-06 9:31 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200617063047.1555518-1-jerinj@marvell.com \
--to=jerinj@marvell.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).