* [PATCH 00/11] Use RTE_LOG_LINE in drivers
@ 2024-09-07 14:54 David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
` (11 more replies)
0 siblings, 12 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev
This is a continuation of the cleanup effort in logging macros.
As a reminder of what this series is about, RTE_LOG_LINE() has been
introduced to check that the format string does not contain a trailing \n.
The goal was to prevent from:
- introducing multilines log messages (ugly and unhelpful for lambda
users),
- introducing double \n in logs,
- introducing missing \n in logs,
I have built/maintained this series for fixing drivers/ since the
beginning of the year and I hope we can merge this series early in
24.11.
Some drivers are not converted because of multiple inconsistencies
(like event/dlb2 where the _INFO/_ERR macros add an internal \n but
the _DBG macros does not).
Those may be fixed later.
As for the changes on lib/, new macros have been introduced so that
backports trigger a build error and force the backport to adjust the
patches containing logs accordingly.
Most of the changes have been done with some scripting, but it is likely
there are some errors and I hope driver maintainers will review in
depth.
A check is added for drivers/ in the hope that new drivers don't
introduce more mess.
Yet, sometimes it is not possible to fix macros (a good example
is base/ drivers code...), so the check skips *osdep.h headers where
calls to RTE_LOG() may be accepted.
--
David Marchand
David Marchand (11):
devtools: fix forbidden token check with multiple files
devtools: report all warnings in forbidden token check
net/dpaa: remove broken debug macros
net/sfc: fix driver logtype token
drivers: reuse default logtype for SFC drivers
drivers: move log wrappers to Intel base drivers
net/txgbe: move wrapper to base driver
drivers: replace logging helpers
drivers: remove redundant newline from logs
drivers: split multilines log messages
drivers: use per line logging in helpers
devtools/check-forbidden-tokens.awk | 15 +-
devtools/checkpatches.sh | 11 +-
drivers/baseband/acc/acc100_pmd.h | 12 +-
drivers/baseband/acc/acc_common.h | 6 +-
drivers/baseband/acc/rte_acc100_pmd.c | 21 +-
drivers/baseband/acc/rte_vrb_pmd.c | 27 +-
drivers/baseband/acc/vrb_pmd.h | 12 +-
.../baseband/fpga_5gnr_fec/fpga_5gnr_fec.h | 15 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 267 ++++----
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 37 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 4 +-
.../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 16 +-
drivers/baseband/null/bbdev_null.c | 5 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 10 +-
drivers/bus/auxiliary/private.h | 5 +-
drivers/bus/cdx/cdx_logs.h | 7 +-
drivers/bus/cdx/cdx_vfio.c | 8 +-
drivers/bus/dpaa/include/fman.h | 2 +-
drivers/bus/dpaa/rte_dpaa_logs.h | 6 +-
drivers/bus/fslmc/fslmc_bus.c | 8 +-
drivers/bus/fslmc/fslmc_logs.h | 7 +-
drivers/bus/fslmc/fslmc_vfio.c | 10 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/ifpga/ifpga_bus.c | 8 +-
drivers/bus/ifpga/ifpga_logs.h | 3 +-
drivers/bus/platform/platform.c | 28 +-
drivers/bus/platform/platform_params.c | 2 +-
drivers/bus/platform/private.h | 9 +-
drivers/bus/uacce/uacce.c | 4 +-
drivers/bus/vdev/vdev_logs.h | 3 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/private.h | 3 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/roc_dev.c | 2 +-
drivers/common/cnxk/roc_model.c | 2 +-
drivers/common/cnxk/roc_nix_ops.c | 20 +-
drivers/common/cnxk/roc_nix_tm.c | 2 +-
drivers/common/cnxk/roc_nix_tm_mark.c | 2 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_nix_tm_utils.c | 2 +-
drivers/common/cnxk/roc_platform.h | 31 +-
drivers/common/cnxk/roc_sso.c | 2 +-
drivers/common/cnxk/roc_tim.c | 2 +-
drivers/common/cpt/cpt_pmd_logs.h | 15 +-
drivers/common/cpt/cpt_ucode.h | 4 +-
drivers/common/dpaax/dpaax_logs.h | 6 +-
drivers/common/iavf/iavf_osdep.h | 8 +-
drivers/common/idpf/base/idpf_osdep.h | 10 +-
drivers/common/idpf/idpf_common_logs.h | 31 +-
drivers/common/nfp/nfp_common_log.h | 5 +-
drivers/common/nitrox/nitrox_hal.c | 4 +-
drivers/common/nitrox/nitrox_logs.h | 8 +-
drivers/common/nitrox/nitrox_qp.c | 10 +-
drivers/common/octeontx/octeontx_mbox.c | 4 +-
drivers/common/octeontx/octeontx_mbox.h | 5 +-
drivers/common/qat/qat_logs.h | 8 +-
drivers/common/qat/qat_pf2vf.c | 4 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/common/sfc_efx/sfc_efx_log.h | 5 +-
drivers/compress/isal/isal_compress_pmd.c | 78 +--
.../compress/isal/isal_compress_pmd_private.h | 3 +-
drivers/compress/nitrox/nitrox_comp.c | 44 +-
drivers/compress/nitrox/nitrox_comp_reqmgr.c | 170 +++---
drivers/compress/octeontx/otx_zip.h | 17 +-
drivers/compress/octeontx/otx_zip_pmd.c | 14 +-
.../compress/uadk/uadk_compress_pmd_private.h | 5 +-
drivers/compress/zlib/zlib_pmd.c | 26 +-
drivers/compress/zlib/zlib_pmd_ops.c | 4 +-
drivers/compress/zlib/zlib_pmd_private.h | 3 +-
drivers/crypto/armv8/armv8_pmd_private.h | 16 +-
drivers/crypto/bcmfs/bcmfs_logs.h | 10 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_session.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 39 +-
drivers/crypto/caam_jr/caam_jr_log.h | 8 +-
drivers/crypto/caam_jr/caam_jr_uio.c | 6 +-
drivers/crypto/ccp/ccp_dev.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cnxk_se.h | 6 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 98 +--
drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 8 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 16 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 27 +-
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 8 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 6 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 4 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 +-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 28 +-
drivers/crypto/ipsec_mb/pmd_snow3g.c | 4 +-
drivers/crypto/mvsam/mrvl_pmd_private.h | 5 +-
drivers/crypto/nitrox/nitrox_sym.c | 54 +-
drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 12 +-
drivers/crypto/null/null_crypto_pmd_private.h | 5 +-
.../crypto/octeontx/otx_cryptodev_hw_access.h | 6 +-
drivers/crypto/openssl/openssl_pmd_private.h | 5 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 42 +-
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 44 +-
drivers/crypto/qat/qat_asym.c | 2 +-
drivers/crypto/qat/qat_sym_session.c | 12 +-
.../crypto/scheduler/scheduler_pmd_private.h | 5 +-
drivers/crypto/uadk/uadk_crypto_pmd.c | 8 +-
drivers/crypto/uadk/uadk_crypto_pmd_private.h | 5 +-
drivers/crypto/virtio/virtio_cryptodev.c | 12 +-
drivers/crypto/virtio/virtio_logs.h | 30 +-
drivers/dma/dpaa/dpaa_qdma.c | 40 +-
drivers/dma/dpaa/dpaa_qdma_logs.h | 8 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 10 +-
drivers/dma/dpaa2/dpaa2_qdma_logs.h | 10 +-
drivers/dma/hisilicon/hisi_dmadev.c | 23 +-
drivers/dma/idxd/idxd_common.c | 2 +-
drivers/dma/idxd/idxd_internal.h | 5 +-
drivers/dma/idxd/idxd_pci.c | 6 +-
drivers/dma/ioat/ioat_dmadev.c | 14 +-
drivers/dma/ioat/ioat_internal.h | 5 +-
drivers/dma/odm/odm.h | 21 +-
drivers/dma/odm/odm_dmadev.c | 12 +-
drivers/dma/skeleton/skeleton_dmadev.c | 3 +-
drivers/event/cnxk/cnxk_tim_evdev.c | 2 +-
drivers/event/dpaa/dpaa_eventdev.c | 1 +
drivers/event/dpaa/dpaa_eventdev.h | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 14 +-
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 7 +-
drivers/event/dsw/dsw_evdev.h | 8 +-
drivers/event/dsw/dsw_event.c | 78 +--
drivers/event/octeontx/ssovf_evdev.h | 5 +-
drivers/event/octeontx/timvf_evdev.c | 2 +-
drivers/event/octeontx/timvf_evdev.h | 5 +-
drivers/event/opdl/opdl_evdev.c | 30 +-
drivers/event/opdl/opdl_log.h | 9 +-
drivers/event/opdl/opdl_test.c | 116 ++--
drivers/event/skeleton/skeleton_eventdev.h | 7 +-
drivers/event/sw/sw_evdev.c | 22 +-
drivers/event/sw/sw_evdev_log.h | 3 +-
drivers/event/sw/sw_evdev_xstats.c | 4 +-
drivers/gpu/cuda/common.h | 3 +-
drivers/mempool/dpaa/dpaa_mempool.h | 3 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 8 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 6 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 22 +-
drivers/mempool/octeontx/octeontx_pool_logs.h | 5 +-
.../mempool/octeontx/rte_mempool_octeontx.c | 6 +-
drivers/ml/cnxk/cn10k_ml_dev.c | 32 +-
drivers/ml/cnxk/cnxk_ml_ops.c | 20 +-
drivers/net/af_packet/rte_eth_af_packet.c | 9 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 212 +++----
drivers/net/atlantic/atl_logs.h | 16 +-
drivers/net/atlantic/atl_rxtx.c | 4 +-
drivers/net/atlantic/hw_atl/hw_atl_utils.c | 12 +-
drivers/net/avp/avp_ethdev.c | 155 +++--
drivers/net/avp/avp_logs.h | 17 +-
drivers/net/axgbe/axgbe_dev.c | 34 +-
drivers/net/axgbe/axgbe_ethdev.c | 130 ++--
drivers/net/axgbe/axgbe_i2c.c | 18 +-
drivers/net/axgbe/axgbe_logs.h | 10 +-
drivers/net/axgbe/axgbe_mdio.c | 36 +-
drivers/net/axgbe/axgbe_phy_impl.c | 50 +-
drivers/net/axgbe/axgbe_rxtx.c | 24 +-
drivers/net/bnx2x/bnx2x.c | 8 +-
drivers/net/bnx2x/bnx2x_logs.h | 25 +-
drivers/net/bnxt/bnxt.h | 8 +-
drivers/net/bnxt/bnxt_cpr.c | 66 +-
drivers/net/bnxt/bnxt_ethdev.c | 570 +++++++++---------
drivers/net/bnxt/bnxt_filter.c | 18 +-
drivers/net/bnxt/bnxt_flow.c | 126 ++--
drivers/net/bnxt/bnxt_hwrm.c | 328 +++++-----
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_reps.c | 86 +--
drivers/net/bnxt/bnxt_ring.c | 18 +-
drivers/net/bnxt/bnxt_rxq.c | 66 +-
drivers/net/bnxt/bnxt_rxr.c | 32 +-
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 6 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 6 +-
drivers/net/bnxt/bnxt_stats.c | 6 +-
drivers/net/bnxt/bnxt_txq.c | 16 +-
drivers/net/bnxt/bnxt_txr.c | 20 +-
drivers/net/bnxt/bnxt_vnic.c | 124 ++--
drivers/net/bnxt/rte_pmd_bnxt.c | 132 ++--
.../net/bnxt/tf_core/tf_em_hash_internal.c | 4 +-
drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 6 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 2 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 22 +-
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 2 +-
drivers/net/cnxk/cn10k_ethdev.c | 2 +-
drivers/net/cnxk/cn9k_ethdev.c | 2 +-
drivers/net/cnxk/cnxk_eswitch_devargs.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.c | 4 +-
drivers/net/cnxk/cnxk_ethdev_mcs.c | 14 +-
drivers/net/cnxk/cnxk_ethdev_ops.c | 2 +-
drivers/net/cnxk/cnxk_rep.c | 8 +-
drivers/net/cnxk/cnxk_rep.h | 2 +-
drivers/net/cpfl/cpfl_ethdev.c | 2 +-
drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
drivers/net/cpfl/cpfl_fxp_rule.c | 8 +-
drivers/net/cpfl/cpfl_logs.h | 12 +-
drivers/net/dpaa/dpaa_ethdev.c | 9 +-
drivers/net/dpaa/dpaa_ethdev.h | 4 +-
drivers/net/dpaa/fmlib/fm_ext.h | 21 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 16 +-
drivers/net/dpaa2/dpaa2_flow.c | 36 +-
drivers/net/dpaa2/dpaa2_mux.c | 4 +-
drivers/net/dpaa2/dpaa2_pmd_logs.h | 10 +-
drivers/net/dpaa2/dpaa2_recycle.c | 6 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 44 +-
drivers/net/dpaa2/dpaa2_sparser.c | 8 +-
drivers/net/dpaa2/dpaa2_tm.c | 24 +-
drivers/net/e1000/base/e1000_osdep.h | 2 +-
drivers/net/e1000/e1000_logs.h | 20 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/ena/ena_ethdev.c | 348 +++++------
drivers/net/ena/ena_logs.h | 28 +-
drivers/net/ena/ena_platform.h | 2 +-
drivers/net/ena/ena_rss.c | 76 +--
drivers/net/enetc/enetc_ethdev.c | 4 +-
drivers/net/enetc/enetc_logs.h | 10 +-
drivers/net/enetfec/enet_ethdev.c | 4 +-
drivers/net/enetfec/enet_pmd_logs.h | 7 +-
drivers/net/enetfec/enet_uio.c | 10 +-
drivers/net/enic/enic_compat.h | 5 +-
drivers/net/enic/enic_ethdev.c | 20 +-
drivers/net/enic/enic_flow.c | 20 +-
drivers/net/enic/enic_vf_representor.c | 16 +-
drivers/net/failsafe/failsafe_args.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/failsafe/failsafe_ether.c | 4 +-
drivers/net/failsafe/failsafe_intr.c | 6 +-
drivers/net/failsafe/failsafe_private.h | 7 +-
drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
drivers/net/fm10k/fm10k_logs.h | 23 +-
drivers/net/gve/base/gve_adminq.c | 4 +-
drivers/net/gve/gve_logs.h | 4 +-
drivers/net/gve/gve_rx.c | 2 +-
drivers/net/gve/gve_tx.c | 2 +-
drivers/net/hinic/base/hinic_compat.h | 5 +-
drivers/net/hinic/base/hinic_pmd_eqs.c | 2 +-
drivers/net/hinic/base/hinic_pmd_mbox.c | 6 +-
drivers/net/hinic/base/hinic_pmd_niccfg.c | 8 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 4 +-
drivers/net/hns3/hns3_dump.c | 12 +-
drivers/net/hns3/hns3_intr.c | 12 +-
drivers/net/hns3/hns3_logs.h | 25 +-
drivers/net/hns3/hns3_ptp.c | 2 +-
drivers/net/hns3/hns3_regs.c | 4 +-
drivers/net/i40e/base/i40e_osdep.h | 6 +-
drivers/net/i40e/i40e_ethdev.c | 51 +-
drivers/net/i40e/i40e_logs.h | 23 +-
drivers/net/i40e/i40e_pf.c | 8 +-
drivers/net/i40e/i40e_rxtx.c | 42 +-
drivers/net/iavf/iavf_ethdev.c | 12 +-
drivers/net/iavf/iavf_log.h | 21 +-
drivers/net/iavf/iavf_rxtx.c | 16 +-
drivers/net/ice/base/ice_osdep.h | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 4 +-
drivers/net/ice/ice_dcf_vf_representor.c | 14 +-
drivers/net/ice/ice_ethdev.c | 50 +-
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 8 +-
drivers/net/ice/ice_logs.h | 23 +-
drivers/net/ice/ice_rxtx.c | 18 +-
drivers/net/idpf/idpf_logs.h | 17 +-
drivers/net/igc/base/igc_osdep.h | 2 +-
drivers/net/igc/igc_logs.h | 16 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 23 +-
drivers/net/ipn3ke/ipn3ke_logs.h | 4 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 20 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 10 +-
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +-
drivers/net/ixgbe/ixgbe_ipsec.c | 24 +-
drivers/net/ixgbe/ixgbe_logs.h | 23 +-
drivers/net/ixgbe/ixgbe_pf.c | 18 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 8 +-
drivers/net/mana/mana.h | 7 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/memif/rte_eth_memif.h | 5 +-
drivers/net/mlx4/mlx4.c | 4 +-
drivers/net/mlx4/mlx4_mr.c | 18 +-
drivers/net/mlx4/mlx4_utils.h | 9 +-
drivers/net/mvneta/mvneta_ethdev.h | 4 +-
drivers/net/mvpp2/mrvl_ethdev.h | 3 +-
drivers/net/netvsc/hn_logs.h | 14 +-
drivers/net/netvsc/hn_rndis.c | 60 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/nfb/nfb.h | 4 +-
drivers/net/nfp/nfp_logs.h | 20 +-
drivers/net/ngbe/base/ngbe_hw.c | 2 +-
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
drivers/net/ngbe/ngbe_logs.h | 20 +-
drivers/net/ngbe/ngbe_pf.c | 10 +-
drivers/net/null/rte_eth_null.c | 5 +-
drivers/net/octeon_ep/cnxk_ep_tx.c | 2 +-
drivers/net/octeon_ep/cnxk_ep_vf.c | 12 +-
drivers/net/octeon_ep/otx2_ep_vf.c | 18 +-
drivers/net/octeon_ep/otx_ep_common.h | 14 +-
drivers/net/octeon_ep/otx_ep_ethdev.c | 82 +--
drivers/net/octeon_ep/otx_ep_mbox.c | 30 +-
drivers/net/octeon_ep/otx_ep_rxtx.c | 78 +--
drivers/net/octeon_ep/otx_ep_vf.c | 20 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 26 +-
drivers/net/octeontx/octeontx_logs.h | 16 +-
drivers/net/pcap/pcap_ethdev.c | 4 +-
drivers/net/pcap/pcap_osdep.h | 5 +-
drivers/net/pfe/pfe_ethdev.c | 22 +-
drivers/net/pfe/pfe_hif.c | 12 +-
drivers/net/pfe/pfe_hif_lib.c | 2 +-
drivers/net/pfe/pfe_logs.h | 7 +-
drivers/net/qede/qede_rxtx.c | 66 +-
drivers/net/ring/rte_eth_ring.c | 5 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_log.h | 7 +-
drivers/net/softnic/rte_eth_softnic.c | 5 +-
drivers/net/tap/tap_log.h | 3 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/thunderx/nicvf_logs.h | 12 +-
drivers/net/txgbe/base/txgbe_osdep.h | 8 +
drivers/net/txgbe/txgbe_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ipsec.c | 24 +-
drivers/net/txgbe/txgbe_logs.h | 33 +-
drivers/net/txgbe/txgbe_pf.c | 20 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 75 +--
drivers/net/virtio/virtio_cvq.c | 19 +-
drivers/net/virtio/virtio_logs.h | 13 +-
drivers/net/virtio/virtio_user/vhost_vdpa.c | 2 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 32 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/net/vmxnet3/vmxnet3_logs.h | 14 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 4 +-
drivers/raw/cnxk_gpio/cnxk_gpio.h | 3 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 14 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 10 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 2 +-
drivers/raw/ifpga/ifpga_rawdev.c | 94 +--
drivers/raw/ifpga/ifpga_rawdev.h | 3 +-
drivers/raw/ntb/ntb.h | 3 +-
drivers/raw/skeleton/skeleton_rawdev.h | 3 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/regex/cn9k/cn9k_regexdev.c | 2 +-
drivers/vdpa/ifc/base/ifcvf.c | 10 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 15 +-
drivers/vdpa/nfp/nfp_vdpa.c | 2 +-
drivers/vdpa/nfp/nfp_vdpa_log.h | 10 +-
drivers/vdpa/sfc/sfc_vdpa_log.h | 7 +-
350 files changed, 3587 insertions(+), 3637 deletions(-)
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 01/11] devtools: fix forbidden token check with multiple files
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 02/11] devtools: report all warnings in forbidden token check David Marchand
` (10 subsequent siblings)
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Andrzej Ostruszka, Arnon Warshavsky
If a patch contains multiple files, it is possible to pass through the
check because the count of token mentions is not reset between file
evaluation.
Example with a fake patch:
$ cat toto.patch
--- a/drivers/plop1
+++ b/drivers/plop1
- RTE_LOG(
- RTE_LOG(
+ RTE_LOG(
--- a/drivers/plop2
+++ b/drivers/plop2
+ RTE_LOG(
$ awk -v FOLDERS='drivers' -v EXPRESSIONS='RTE_LOG\\('
-v MESSAGE='Prefer RTE_LOG_LINE'
-f devtools/check-forbidden-tokens.awk toto.patch
Besides, the expressions[] array is not used since commit
b467d38284b1 ("devtools: add explicit warnings for forbidden tokens").
Fixes: 42f4d724ec27 ("devtools: move awk script ckecking forbidden tokens")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 90d3a64f8e..807dad7f48 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -32,14 +32,11 @@ BEGIN {
for (i in deny_expr) {
forbidden_added = "^\\+.*" deny_expr[i];
forbidden_removed="^-.*" deny_expr[i];
- current = expressions[deny_expr[i]]
if ($0 ~ forbidden_added) {
- count = count + 1;
- expressions[deny_expr[i]] = current + 1
+ count = count + 1
}
if ($0 ~ forbidden_removed) {
- count = count - 1;
- expressions[deny_expr[i]] = current - 1
+ count = count - 1
}
}
}
@@ -55,6 +52,7 @@ BEGIN {
if (count > 0) {
exit;
}
+ count = 0
for (i in deny_folders) {
re = "^\\+\\+\\+ b/" deny_folders[i];
if ($0 ~ re) {
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 02/11] devtools: report all warnings in forbidden token check
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 03/11] net/dpaa: remove broken debug macros David Marchand
` (9 subsequent siblings)
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon
Do not stop at the first file that got warnings.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 807dad7f48..d72d244d3a 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -13,6 +13,7 @@ BEGIN {
in_file=0;
in_comment=0;
count=0;
+ warned=0;
comment_start="/*"
comment_end="*/"
}
@@ -50,7 +51,8 @@ BEGIN {
($0 ~ "^\\+\\+\\+ b/") {
in_file = 0;
if (count > 0) {
- exit;
+ warned = warned + 1
+ print "Warning in " substr(last_file,7) ":"
}
count = 0
for (i in deny_folders) {
@@ -66,7 +68,10 @@ BEGIN {
}
END {
if (count > 0) {
+ warned = warned + 1
print "Warning in " substr(last_file,7) ":"
+ }
+ if (warned > 0) {
print MESSAGE
exit RET_ON_FAIL
}
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 03/11] net/dpaa: remove broken debug macros
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
2024-09-07 14:54 ` [PATCH 02/11] devtools: report all warnings in forbidden token check David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
` (8 subsequent siblings)
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal, Sachin Saxena
Those debug macros never worked as existing callers never passed a
'level' argument.
Remove them.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/dpaa/fmlib/fm_ext.h | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h
index 8e7153bdaf..4666fa3b0b 100644
--- a/drivers/net/dpaa/fmlib/fm_ext.h
+++ b/drivers/net/dpaa/fmlib/fm_ext.h
@@ -15,25 +15,8 @@
#define MODULE_FM 0x00010000
#define __ERR_MODULE__ MODULE_FM
-/* #define FM_LIB_DBG */
-
-#if defined(FM_LIB_DBG)
- #define _fml_dbg(fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
- __func__, ##args)
-#else
- #define _fml_dbg(arg...)
-#endif
-
-/*#define FM_IOCTL_DBG*/
-
-#if defined(FM_IOCTL_DBG)
- #define _fm_ioctl_dbg(fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
- __func__, ##args)
-#else
- #define _fm_ioctl_dbg(arg...)
-#endif
+#define _fml_dbg(...)
+#define _fm_ioctl_dbg(...)
/*
* @Group lnx_ioctl_ncsw_grp NetCommSw Linux User-Space (IOCTL) API
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 04/11] net/sfc: fix driver logtype token
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (2 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 03/11] net/dpaa: remove broken debug macros David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-08 8:35 ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers David Marchand
` (7 subsequent siblings)
11 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Andrew Rybchenko
The net/sfc driver logtype was registered under pmd.net.sfc."driver".
Fixes: 0f39f32482a1 ("net/sfc: remove use of EAL logtype")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/sfc/sfc_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 24686a1eaf..3480a51642 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -3616,4 +3616,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx,
SFC_KVARG_FW_VARIANT "=" SFC_KVARG_VALUES_FW_VARIANT " "
SFC_KVARG_RXD_WAIT_TIMEOUT_NS "=<long> "
SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long>");
-RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, "driver", NOTICE);
+RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, driver, NOTICE);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 05/11] drivers: reuse default logtype for SFC drivers
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (3 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-08 8:44 ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 06/11] drivers: move log wrappers to Intel base drivers David Marchand
` (6 subsequent siblings)
11 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Andrew Rybchenko, Vijay Kumar Srivastava
Nothing is fixed here, just reuse the value coming from the build
framework rather than use a fixed string that may get wrong in the
future.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/sfc/sfc_log.h | 7 ++-----
drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index 10a9ce6ced..b92b358927 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -13,9 +13,6 @@
/** Generic driver log type */
extern int sfc_logtype_driver;
-/** Common log type name prefix */
-#define SFC_LOGTYPE_PREFIX "pmd.net.sfc."
-
/** Log PMD generic message, add a prefix and a line break */
#define SFC_GENERIC_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, sfc_logtype_driver, \
@@ -23,10 +20,10 @@ extern int sfc_logtype_driver;
RTE_FMT_TAIL(__VA_ARGS__ ,)))
/** Name prefix for the per-device log type used to report basic information */
-#define SFC_LOGTYPE_MAIN_STR SFC_LOGTYPE_PREFIX "main"
+#define SFC_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
/** Device MCDI log type name prefix */
-#define SFC_LOGTYPE_MCDI_STR SFC_LOGTYPE_PREFIX "mcdi"
+#define SFC_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
#define SFC_LOG_PREFIX_MAX 32
diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h
index 6c0101dbb4..1104e7de43 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_log.h
+++ b/drivers/vdpa/sfc/sfc_vdpa_log.h
@@ -8,9 +8,6 @@
/** Generic driver log type */
extern int sfc_vdpa_logtype_driver;
-/** Common log type name prefix */
-#define SFC_VDPA_LOGTYPE_PREFIX "pmd.vdpa.sfc."
-
/** Log PMD generic message, add a prefix and a line break */
#define SFC_VDPA_GENERIC_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver, \
@@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver;
RTE_FMT_TAIL(__VA_ARGS__ ,)))
/** Name prefix for the per-device log type used to report basic information */
-#define SFC_VDPA_LOGTYPE_MAIN_STR SFC_VDPA_LOGTYPE_PREFIX "main"
+#define SFC_VDPA_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
/** Device MCDI log type name prefix */
-#define SFC_VDPA_LOGTYPE_MCDI_STR SFC_VDPA_LOGTYPE_PREFIX "mcdi"
+#define SFC_VDPA_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
#define SFC_VDPA_LOG_PREFIX_MAX 32
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 06/11] drivers: move log wrappers to Intel base drivers
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (4 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
` (5 subsequent siblings)
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Jingjing Wu
Remove _RAW macros and directly call RTE_LOG() where needed in headers
providing wrappers for base drivers code.
This will help later when adding a check on RTE_LOG() use in drivers/.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/common/iavf/iavf_osdep.h | 8 ++++----
drivers/common/idpf/base/idpf_osdep.h | 10 +++++-----
drivers/net/e1000/base/e1000_osdep.h | 2 +-
drivers/net/e1000/e1000_logs.h | 8 ++------
drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
drivers/net/fm10k/fm10k_logs.h | 7 ++-----
drivers/net/i40e/base/i40e_osdep.h | 6 +++---
drivers/net/i40e/i40e_logs.h | 7 ++-----
drivers/net/ice/base/ice_osdep.h | 2 +-
drivers/net/ice/ice_logs.h | 7 ++-----
drivers/net/igc/base/igc_osdep.h | 2 +-
drivers/net/igc/igc_logs.h | 6 +-----
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
drivers/net/ixgbe/ixgbe_logs.h | 7 ++-----
14 files changed, 28 insertions(+), 48 deletions(-)
diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/common/iavf/iavf_osdep.h
index 263d92400c..1f2b7889cb 100644
--- a/drivers/common/iavf/iavf_osdep.h
+++ b/drivers/common/iavf/iavf_osdep.h
@@ -143,16 +143,16 @@ writeq(uint64_t value, volatile void *addr)
#define IAVF_WRITE_FLUSH(a) IAVF_READ_REG(a, IAVF_VFGEN_RSTAT)
extern int iavf_common_logger;
+#define RTE_LOGTYPE_IAVF_COMMON iavf_common_logger
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IAVF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define iavf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- rte_log(RTE_LOG_DEBUG, iavf_common_logger, \
- "iavf %02x.%x " s, \
+ DEBUGOUT("iavf %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/common/idpf/base/idpf_osdep.h b/drivers/common/idpf/base/idpf_osdep.h
index b2af8f443d..e042ef871c 100644
--- a/drivers/common/idpf/base/idpf_osdep.h
+++ b/drivers/common/idpf/base/idpf_osdep.h
@@ -25,6 +25,8 @@
#include <rte_io.h>
#include <rte_compat.h>
+#include "../idpf_common_logs.h"
+
#define INLINE inline
#define STATIC static
@@ -108,16 +110,14 @@ typedef struct idpf_lock idpf_lock;
#define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->(f)))
#define MAKEMASK(m, s) ((m) << (s))
-extern int idpf_common_logger;
-
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IDPF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define idpf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "idpf %02x.%x " s, \
+ DEBUGOUT("idpf %02x.%x " s "\n", \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index cd90228cef..6b5d58950f 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, E1000_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 86f546b0f9..30b5531069 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -34,13 +34,9 @@ extern int e1000_logtype_tx;
#endif
extern int e1000_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_E1000_DRIVER e1000_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
+ RTE_LOG(level, E1000_DRIVER, "%s(): " fmt "\n", __func__, ## args)
/* log init function shared by e1000 and igb drivers */
void e1000_igb_init_log(void);
diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
index 25f46c3908..d3e5528575 100644
--- a/drivers/net/fm10k/base/fm10k_osdep.h
+++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -24,7 +24,7 @@
#define STATIC static
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, FM10K_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index 4f039f8beb..c4c7c977d9 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -33,11 +33,8 @@ extern int fm10k_logtype_tx;
#endif
extern int fm10k_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_FM10K_DRIVER fm10k_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, FM10K_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _FM10K_LOGS_H_ */
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index aa5dc61841..8960206d8b 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -82,8 +82,8 @@ typedef enum i40e_status_code i40e_status;
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-#define DEBUGOUT(S) PMD_DRV_LOG_RAW(DEBUG, S)
-#define DEBUGOUT1(S, A...) PMD_DRV_LOG_RAW(DEBUG, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, I40E_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
+#define DEBUGOUT1 DEBUGOUT
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define DEBUGOUT2 DEBUGOUT1
@@ -94,7 +94,7 @@ typedef enum i40e_status_code i40e_status;
#define i40e_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "i40e %02x.%x " s, \
+ DEBUGOUT("i40e %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h
index eebe6c5559..fb1f3a4096 100644
--- a/drivers/net/i40e/i40e_logs.h
+++ b/drivers/net/i40e/i40e_logs.h
@@ -30,11 +30,8 @@ extern int i40e_logtype_tx;
#endif
extern int i40e_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_I40E_DRIVER i40e_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, I40E_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _I40E_LOGS_H_ */
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index c17f1bf09f..5f7347023f 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -149,7 +149,7 @@ writeq(uint64_t value, volatile void *addr)
#define ice_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "ice %02x.%x " s, \
+ RTE_LOG(DEBUG, ICE_DRIVER, "ice %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/ice/ice_logs.h b/drivers/net/ice/ice_logs.h
index e79980fb63..a54e9d8b59 100644
--- a/drivers/net/ice/ice_logs.h
+++ b/drivers/net/ice/ice_logs.h
@@ -7,6 +7,7 @@
extern int ice_logtype_init;
extern int ice_logtype_driver;
+#define RTE_LOGTYPE_ICE_DRIVER ice_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
@@ -32,11 +33,7 @@ extern int ice_logtype_tx;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, ICE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _ICE_LOGS_H_ */
diff --git a/drivers/net/igc/base/igc_osdep.h b/drivers/net/igc/base/igc_osdep.h
index 25090d65ea..4e479eb500 100644
--- a/drivers/net/igc/base/igc_osdep.h
+++ b/drivers/net/igc/base/igc_osdep.h
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000 * (x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IGC_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/igc/igc_logs.h b/drivers/net/igc/igc_logs.h
index cca5389eff..4a574f10cb 100644
--- a/drivers/net/igc/igc_logs.h
+++ b/drivers/net/igc/igc_logs.h
@@ -35,12 +35,8 @@ extern int igc_logtype_driver;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, igc_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#ifdef __cplusplus
}
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index e832a7bec8..502f386b56 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -33,7 +33,7 @@
#define msec_delay(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IXGBE_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 00ef797ca1..5a2c5ccde0 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -31,11 +31,8 @@ extern int ixgbe_logtype_tx;
#endif
extern int ixgbe_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_IXGBE_DRIVER ixgbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _IXGBE_LOGS_H_ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 07/11] net/txgbe: move wrapper to base driver
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (5 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 06/11] drivers: move log wrappers to Intel base drivers David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-09 6:18 ` Jiawen Wu
2024-09-07 14:54 ` [PATCH 08/11] drivers: replace logging helpers David Marchand
` (4 subsequent siblings)
11 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev; +Cc: Jiawen Wu, Jian Wang
BP_LOG() is only used in the base driver.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
drivers/net/txgbe/txgbe_logs.h | 7 -------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index 62d16a6abb..91c8abf12e 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -28,6 +28,14 @@
#define TMZ_VADDR(mz) ((mz)->addr)
#define TDEV_NAME(eth_dev) ((eth_dev)->device->name)
+extern int txgbe_logtype_bp;
+#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
+#define BP_LOG(fmt, ...) \
+ RTE_LOG(DEBUG, TXGBE_BP, \
+ "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
+ usec_stamp() / 1000000, usec_stamp() % 1000000, \
+ __func__, __LINE__, ## __VA_ARGS__)
+
#define ASSERT(x) do { \
if (!(x)) \
PMD_DRV_LOG(ERR, "TXGBE: %d", x); \
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index 74f49ab9ef..b5a5a9233f 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
#define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
-extern int txgbe_logtype_bp;
-#define BP_LOG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
- "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
- usec_stamp() / 1000000, usec_stamp() % 1000000, \
- __func__, __LINE__, ##args)
-
#endif /* _TXGBE_LOGS_H_ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 08/11] drivers: replace logging helpers
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (6 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
` (3 subsequent siblings)
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev
Cc: Tomasz Duszynski, Nagadheeraj Rottela, Srikanth Jampala,
Fan Zhang, Ashish Gupta, Gowrishankar Muthukrishnan,
Vidya Sagar Velumuri, Mattias Rönnblom, Ciara Loftus,
Maryam Tahhan, Steven Webster, Matt Peters, Selwin Sebastian,
Ajit Khaparde, Somnath Kotur, Bruce Richardson,
Konstantin Ananyev, Wathsala Vithanage, Shai Brandes,
Evgeny Schemeilin, Ron Beider, Amit Bernstein, Wajeeh Atrash,
Maxime Coquelin, Chenbo Xia
Prepare for the conversion to RTE_LOG_LINE.
Some drivers currently add no \n in the logging macro and
have the callers do it.
Let's invert this logic but again, thinking about backports, introduce
the change in new macros.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/bus/platform/platform.c | 28 +-
drivers/bus/platform/platform_params.c | 2 +-
drivers/bus/platform/private.h | 10 +-
drivers/common/nitrox/nitrox_hal.c | 4 +-
drivers/common/nitrox/nitrox_logs.h | 8 +-
drivers/common/nitrox/nitrox_qp.c | 10 +-
drivers/compress/nitrox/nitrox_comp.c | 44 +-
drivers/compress/nitrox/nitrox_comp_reqmgr.c | 170 +++---
drivers/crypto/nitrox/nitrox_sym.c | 54 +-
drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 12 +-
drivers/dma/odm/odm.h | 14 +-
drivers/dma/odm/odm_dmadev.c | 12 +-
drivers/event/dsw/dsw_evdev.h | 8 +-
drivers/event/dsw/dsw_event.c | 78 +--
drivers/net/af_xdp/rte_eth_af_xdp.c | 212 +++----
drivers/net/avp/avp_ethdev.c | 155 +++--
drivers/net/avp/avp_logs.h | 17 +-
drivers/net/axgbe/axgbe_dev.c | 34 +-
drivers/net/axgbe/axgbe_ethdev.c | 128 ++--
drivers/net/axgbe/axgbe_i2c.c | 18 +-
drivers/net/axgbe/axgbe_logs.h | 6 +-
drivers/net/axgbe/axgbe_mdio.c | 36 +-
drivers/net/axgbe/axgbe_phy_impl.c | 50 +-
drivers/net/axgbe/axgbe_rxtx.c | 24 +-
drivers/net/bnxt/bnxt.h | 8 +-
drivers/net/bnxt/bnxt_cpr.c | 66 +-
drivers/net/bnxt/bnxt_ethdev.c | 570 +++++++++---------
drivers/net/bnxt/bnxt_filter.c | 18 +-
drivers/net/bnxt/bnxt_flow.c | 126 ++--
drivers/net/bnxt/bnxt_hwrm.c | 320 +++++-----
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_reps.c | 86 +--
drivers/net/bnxt/bnxt_ring.c | 18 +-
drivers/net/bnxt/bnxt_rxq.c | 66 +-
drivers/net/bnxt/bnxt_rxr.c | 32 +-
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
drivers/net/bnxt/bnxt_stats.c | 6 +-
drivers/net/bnxt/bnxt_txq.c | 16 +-
drivers/net/bnxt/bnxt_txr.c | 16 +-
drivers/net/bnxt/bnxt_vnic.c | 124 ++--
drivers/net/bnxt/rte_pmd_bnxt.c | 132 ++--
.../net/bnxt/tf_core/tf_em_hash_internal.c | 4 +-
drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 6 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 2 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 22 +-
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 2 +-
drivers/net/ena/ena_ethdev.c | 348 +++++------
drivers/net/ena/ena_logs.h | 28 +-
drivers/net/ena/ena_rss.c | 76 +--
drivers/net/vhost/rte_eth_vhost.c | 76 +--
54 files changed, 1654 insertions(+), 1665 deletions(-)
diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c
index 7e24bb96a1..11892caa24 100644
--- a/drivers/bus/platform/platform.c
+++ b/drivers/bus/platform/platform.c
@@ -97,7 +97,7 @@ dev_add(const char *dev_name)
FOREACH_DEVICE_ON_PLATFORM_BUS(tmp) {
if (!strcmp(tmp->name, pdev->name)) {
- PLATFORM_LOG(INFO, "device %s already added\n", pdev->name);
+ PLATFORM_LOG_LINE(INFO, "device %s already added", pdev->name);
if (tmp->device.devargs != pdev->device.devargs)
rte_devargs_remove(pdev->device.devargs);
@@ -109,7 +109,7 @@ dev_add(const char *dev_name)
TAILQ_INSERT_HEAD(&platform_bus.device_list, pdev, next);
- PLATFORM_LOG(INFO, "adding device %s to the list\n", dev_name);
+ PLATFORM_LOG_LINE(INFO, "adding device %s to the list", dev_name);
return 0;
}
@@ -161,7 +161,7 @@ platform_bus_scan(void)
dp = opendir(PLATFORM_BUS_DEVICES_PATH);
if (dp == NULL) {
- PLATFORM_LOG(INFO, "failed to open %s\n", PLATFORM_BUS_DEVICES_PATH);
+ PLATFORM_LOG_LINE(INFO, "failed to open %s", PLATFORM_BUS_DEVICES_PATH);
return -errno;
}
@@ -195,7 +195,7 @@ device_map_resource_offset(struct rte_platform_device *pdev, struct rte_platform
if (res->mem.addr == MAP_FAILED)
return -errno;
- PLATFORM_LOG(DEBUG, "adding resource va = %p len = %"PRIu64" name = %s\n", res->mem.addr,
+ PLATFORM_LOG_LINE(DEBUG, "adding resource va = %p len = %"PRIu64" name = %s", res->mem.addr,
res->mem.len, res->name);
return 0;
@@ -271,7 +271,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
int ret;
if (num == 0) {
- PLATFORM_LOG(WARNING, "device %s has no resources\n", pdev->name);
+ PLATFORM_LOG_LINE(WARNING, "device %s has no resources", pdev->name);
return 0;
}
@@ -287,7 +287,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
ret = ioctl(pdev->dev_fd, VFIO_DEVICE_GET_REGION_INFO, ®_info);
if (ret) {
- PLATFORM_LOG(ERR, "failed to get region info at %d\n", i);
+ PLATFORM_LOG_LINE(ERR, "failed to get region info at %d", i);
ret = -errno;
goto out;
}
@@ -297,7 +297,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
res->mem.len = reg_info.size;
ret = device_map_resource_offset(pdev, res, reg_info.offset);
if (ret) {
- PLATFORM_LOG(ERR, "failed to ioremap resource at %d\n", i);
+ PLATFORM_LOG_LINE(ERR, "failed to ioremap resource at %d", i);
goto out;
}
@@ -327,7 +327,7 @@ device_setup(struct rte_platform_device *pdev)
ret = rte_vfio_setup_device(PLATFORM_BUS_DEVICES_PATH, name, &pdev->dev_fd, &dev_info);
if (ret) {
- PLATFORM_LOG(ERR, "failed to setup %s\n", name);
+ PLATFORM_LOG_LINE(ERR, "failed to setup %s", name);
return -ENODEV;
}
@@ -342,7 +342,7 @@ device_setup(struct rte_platform_device *pdev)
*/
#ifdef VFIO_DEVICE_FLAGS_PLATFORM
if (!(dev_info.flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
- PLATFORM_LOG(ERR, "device not backed by vfio-platform\n");
+ PLATFORM_LOG_LINE(ERR, "device not backed by vfio-platform");
ret = -ENOTSUP;
goto out;
}
@@ -350,7 +350,7 @@ device_setup(struct rte_platform_device *pdev)
ret = device_map_resources(pdev, dev_info.num_regions);
if (ret) {
- PLATFORM_LOG(ERR, "failed to setup platform resources\n");
+ PLATFORM_LOG_LINE(ERR, "failed to setup platform resources");
goto out;
}
@@ -389,7 +389,7 @@ driver_probe_device(struct rte_platform_driver *pdrv, struct rte_platform_device
iova_mode = rte_eal_iova_mode();
if (pdrv->drv_flags & RTE_PLATFORM_DRV_NEED_IOVA_AS_VA && iova_mode != RTE_IOVA_VA) {
- PLATFORM_LOG(ERR, "driver %s expects VA IOVA mode but current mode is PA\n",
+ PLATFORM_LOG_LINE(ERR, "driver %s expects VA IOVA mode but current mode is PA",
pdrv->driver.name);
return -EINVAL;
}
@@ -462,11 +462,11 @@ platform_bus_probe(void)
FOREACH_DEVICE_ON_PLATFORM_BUS(pdev) {
ret = device_attach(pdev);
if (ret == -EBUSY) {
- PLATFORM_LOG(DEBUG, "device %s already probed\n", pdev->name);
+ PLATFORM_LOG_LINE(DEBUG, "device %s already probed", pdev->name);
continue;
}
if (ret)
- PLATFORM_LOG(ERR, "failed to probe %s\n", pdev->name);
+ PLATFORM_LOG_LINE(ERR, "failed to probe %s", pdev->name);
}
return 0;
@@ -517,7 +517,7 @@ device_release_driver(struct rte_platform_device *pdev)
if (pdrv != NULL && pdrv->remove != NULL) {
ret = pdrv->remove(pdev);
if (ret)
- PLATFORM_LOG(WARNING, "failed to remove %s\n", pdev->name);
+ PLATFORM_LOG_LINE(WARNING, "failed to remove %s", pdev->name);
}
pdev->device.driver = NULL;
diff --git a/drivers/bus/platform/platform_params.c b/drivers/bus/platform/platform_params.c
index 0eb8eb56e7..8a6214b97c 100644
--- a/drivers/bus/platform/platform_params.c
+++ b/drivers/bus/platform/platform_params.c
@@ -56,7 +56,7 @@ platform_bus_dev_iterate(const void *start, const char *str,
if (str != NULL) {
kvargs = rte_kvargs_parse(str, platform_params_keys);
if (!kvargs) {
- PLATFORM_LOG(ERR, "cannot parse argument list %s", str);
+ PLATFORM_LOG_LINE(ERR, "cannot parse argument list %s", str);
rte_errno = EINVAL;
return NULL;
}
diff --git a/drivers/bus/platform/private.h b/drivers/bus/platform/private.h
index a7a4b0da56..72185aa457 100644
--- a/drivers/bus/platform/private.h
+++ b/drivers/bus/platform/private.h
@@ -15,7 +15,6 @@
#include "bus_platform_driver.h"
extern struct rte_platform_bus platform_bus;
-extern int platform_bus_logtype;
/* Platform bus iterators. */
#define FOREACH_DEVICE_ON_PLATFORM_BUS(p) \
@@ -33,10 +32,11 @@ struct rte_platform_bus {
RTE_TAILQ_HEAD(, rte_platform_driver) driver_list; /* List of bus drivers */
};
-#define PLATFORM_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, platform_bus_logtype, \
- RTE_FMT("platform bus: " RTE_FMT_HEAD(__VA_ARGS__,), \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+extern int platform_bus_logtype;
+#define RTE_LOGTYPE_PLATFORM_BUS platform_bus_logtype
+#define PLATFORM_LOG_LINE(level, ...) \
+ RTE_LOG(level, PLATFORM_BUS, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_TAIL(__VA_ARGS__,)))
/*
* Iterate registered platform devices and find one that matches provided string.
diff --git a/drivers/common/nitrox/nitrox_hal.c b/drivers/common/nitrox/nitrox_hal.c
index 451549a664..9ef974409c 100644
--- a/drivers/common/nitrox/nitrox_hal.c
+++ b/drivers/common/nitrox/nitrox_hal.c
@@ -190,7 +190,7 @@ zqmq_input_ring_disable(uint8_t *bar_addr, uint16_t ring)
}
if (zqmq_activity_stat.s.queue_active) {
- NITROX_LOG(ERR, "Failed to disable zqmq ring %d\n", ring);
+ NITROX_LOG_LINE(ERR, "Failed to disable zqmq ring %d", ring);
return -EBUSY;
}
@@ -271,7 +271,7 @@ setup_zqmq_input_ring(uint8_t *bar_addr, uint16_t ring, uint32_t rsize,
}
if (!zqmq_en.s.queue_enable) {
- NITROX_LOG(ERR, "Failed to enable zqmq ring %d\n", ring);
+ NITROX_LOG_LINE(ERR, "Failed to enable zqmq ring %d", ring);
err = -EFAULT;
} else {
err = 0;
diff --git a/drivers/common/nitrox/nitrox_logs.h b/drivers/common/nitrox/nitrox_logs.h
index 50e52f396b..67964447eb 100644
--- a/drivers/common/nitrox/nitrox_logs.h
+++ b/drivers/common/nitrox/nitrox_logs.h
@@ -5,11 +5,9 @@
#ifndef _NITROX_LOGS_H_
#define _NITROX_LOGS_H_
-#define LOG_PREFIX "NITROX: "
-#define NITROX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nitrox_logtype, \
- LOG_PREFIX "%s:%d " fmt, __func__, __LINE__, ## args)
-
extern int nitrox_logtype;
+#define RTE_LOGTYPE_NITROX nitrox_logtype
+#define NITROX_LOG_LINE(level, fmt, args...) \
+ RTE_LOG(level, NITROX, "%s:%d " fmt "\n", __func__, __LINE__, ## args)
#endif /* _NITROX_LOGS_H_ */
diff --git a/drivers/common/nitrox/nitrox_qp.c b/drivers/common/nitrox/nitrox_qp.c
index 1665c3c40d..d6a5ddd641 100644
--- a/drivers/common/nitrox/nitrox_qp.c
+++ b/drivers/common/nitrox/nitrox_qp.c
@@ -28,7 +28,7 @@ nitrox_setup_cmdq(struct nitrox_qp *qp, uint8_t *bar_addr,
RTE_MEMZONE_256MB,
CMDQ_PKT_IN_ALIGN);
if (!mz) {
- NITROX_LOG(ERR, "cmdq memzone reserve failed for %s queue\n",
+ NITROX_LOG_LINE(ERR, "cmdq memzone reserve failed for %s queue",
mz_name);
return -ENOMEM;
}
@@ -48,7 +48,7 @@ nitrox_setup_cmdq(struct nitrox_qp *qp, uint8_t *bar_addr,
mz->iova);
break;
default:
- NITROX_LOG(ERR, "Invalid queue type %d\n", qp->type);
+ NITROX_LOG_LINE(ERR, "Invalid queue type %d", qp->type);
err = -EINVAL;
break;
}
@@ -73,7 +73,7 @@ nitrox_setup_ridq(struct nitrox_qp *qp, int socket_id)
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp->ridq) {
- NITROX_LOG(ERR, "Failed to create rid queue\n");
+ NITROX_LOG_LINE(ERR, "Failed to create rid queue");
return -ENOMEM;
}
@@ -112,8 +112,8 @@ nitrox_qp_setup(struct nitrox_qp *qp, uint8_t *bar_addr, const char *dev_name,
count = rte_align32pow2(nb_descriptors);
if (count > MAX_CMD_QLEN) {
- NITROX_LOG(ERR, "%s: Number of descriptors too big %d,"
- " greater than max queue length %d\n",
+ NITROX_LOG_LINE(ERR, "%s: Number of descriptors too big %d,"
+ " greater than max queue length %d",
dev_name, count,
MAX_CMD_QLEN);
return -EINVAL;
diff --git a/drivers/compress/nitrox/nitrox_comp.c b/drivers/compress/nitrox/nitrox_comp.c
index 97d2c4a0e8..1b2054c61a 100644
--- a/drivers/compress/nitrox/nitrox_comp.c
+++ b/drivers/compress/nitrox/nitrox_comp.c
@@ -53,14 +53,14 @@ static int nitrox_comp_dev_configure(struct rte_compressdev *dev,
char name[RTE_MEMPOOL_NAMESIZE];
if (config->nb_queue_pairs > ndev->nr_queues) {
- NITROX_LOG(ERR, "Invalid queue pairs, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid queue pairs, max supported %d",
ndev->nr_queues);
return -EINVAL;
}
xform_cnt = config->max_nb_priv_xforms + config->max_nb_streams;
if (unlikely(xform_cnt == 0)) {
- NITROX_LOG(ERR, "Invalid configuration with 0 xforms\n");
+ NITROX_LOG_LINE(ERR, "Invalid configuration with 0 xforms");
return -EINVAL;
}
@@ -70,7 +70,7 @@ static int nitrox_comp_dev_configure(struct rte_compressdev *dev,
0, 0, NULL, NULL, NULL, NULL,
config->socket_id, 0);
if (comp_dev->xform_pool == NULL) {
- NITROX_LOG(ERR, "Failed to create xform pool, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create xform pool, err %d",
rte_errno);
return -rte_errno;
}
@@ -160,9 +160,9 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
struct nitrox_qp *qp = NULL;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
@@ -177,7 +177,7 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp) {
- NITROX_LOG(ERR, "Failed to allocate nitrox qp\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate nitrox qp");
return -ENOMEM;
}
@@ -195,7 +195,7 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
goto req_pool_err;
dev->data->queue_pairs[qp_id] = qp;
- NITROX_LOG(DEBUG, "queue %d setup done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d setup done", qp_id);
return 0;
req_pool_err:
@@ -213,21 +213,21 @@ static int nitrox_comp_queue_pair_release(struct rte_compressdev *dev,
struct nitrox_qp *qp;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
qp = dev->data->queue_pairs[qp_id];
if (!qp) {
- NITROX_LOG(DEBUG, "queue %u already freed\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %u already freed", qp_id);
return 0;
}
if (!nitrox_qp_is_empty(qp)) {
- NITROX_LOG(ERR, "queue %d not empty\n", qp_id);
+ NITROX_LOG_LINE(ERR, "queue %d not empty", qp_id);
return -EAGAIN;
}
@@ -235,7 +235,7 @@ static int nitrox_comp_queue_pair_release(struct rte_compressdev *dev,
err = nitrox_qp_release(qp, ndev->bar_addr);
nitrox_comp_req_pool_free(qp->sr_mp);
rte_free(qp);
- NITROX_LOG(DEBUG, "queue %d release done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d release done", qp_id);
return err;
}
@@ -249,12 +249,12 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
int ret;
if (unlikely(comp_dev->xform_pool == NULL)) {
- NITROX_LOG(ERR, "private xform pool not yet created\n");
+ NITROX_LOG_LINE(ERR, "private xform pool not yet created");
return -EINVAL;
}
if (rte_mempool_get(comp_dev->xform_pool, private_xform)) {
- NITROX_LOG(ERR, "Failed to get from private xform pool\n");
+ NITROX_LOG_LINE(ERR, "Failed to get from private xform pool");
return -ENOMEM;
}
@@ -266,7 +266,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
nxform->op = NITROX_COMP_OP_COMPRESS;
if (xform->compress.algo != RTE_COMP_ALGO_DEFLATE) {
- NITROX_LOG(ERR, "Only deflate is supported\n");
+ NITROX_LOG_LINE(ERR, "Only deflate is supported");
ret = -ENOTSUP;
goto err_exit;
}
@@ -279,7 +279,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
else if (algo == RTE_COMP_HUFFMAN_DYNAMIC)
nxform->algo = NITROX_COMP_ALGO_DEFLATE_DYNHUFF;
else {
- NITROX_LOG(ERR, "Invalid deflate algorithm %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Invalid deflate algorithm %d", algo);
ret = -EINVAL;
goto err_exit;
}
@@ -300,7 +300,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
level <= NITROX_COMP_LEVEL_BEST_END) {
nxform->level = NITROX_COMP_LEVEL_BEST;
} else {
- NITROX_LOG(ERR, "Unsupported compression level %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported compression level %d",
xform->compress.level);
ret = -ENOTSUP;
goto err_exit;
@@ -310,7 +310,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
} else if (xform->type == RTE_COMP_DECOMPRESS) {
nxform->op = NITROX_COMP_OP_DECOMPRESS;
if (xform->decompress.algo != RTE_COMP_ALGO_DEFLATE) {
- NITROX_LOG(ERR, "Only deflate is supported\n");
+ NITROX_LOG_LINE(ERR, "Only deflate is supported");
ret = -ENOTSUP;
goto err_exit;
}
@@ -330,7 +330,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
else if (chksum_type == RTE_COMP_CHECKSUM_ADLER32)
nxform->chksum_type = NITROX_CHKSUM_TYPE_ADLER32;
else {
- NITROX_LOG(ERR, "Unsupported checksum type %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported checksum type %d",
chksum_type);
ret = -ENOTSUP;
goto err_exit;
@@ -397,7 +397,7 @@ static int nitrox_comp_stream_create(struct rte_compressdev *dev,
if (unlikely(window_size < NITROX_COMP_WINDOW_SIZE_MIN ||
window_size > NITROX_COMP_WINDOW_SIZE_MAX)) {
- NITROX_LOG(ERR, "Invalid window size %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid window size %d",
window_size);
return -EINVAL;
}
@@ -569,7 +569,7 @@ nitrox_comp_pmd_create(struct nitrox_device *ndev)
sizeof(struct nitrox_comp_device),
&init_params);
if (!cdev) {
- NITROX_LOG(ERR, "Cryptodev '%s' creation failed\n", name);
+ NITROX_LOG_LINE(ERR, "Cryptodev '%s' creation failed", name);
return -ENODEV;
}
@@ -582,7 +582,7 @@ nitrox_comp_pmd_create(struct nitrox_device *ndev)
ndev->comp_dev->cdev = cdev;
ndev->comp_dev->ndev = ndev;
ndev->comp_dev->xform_pool = NULL;
- NITROX_LOG(DEBUG, "Created compressdev '%s', dev_id %d\n",
+ NITROX_LOG_LINE(DEBUG, "Created compressdev '%s', dev_id %d",
cdev->data->name, cdev->data->dev_id);
return 0;
}
diff --git a/drivers/compress/nitrox/nitrox_comp_reqmgr.c b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
index 89af855561..e46faaf7e9 100644
--- a/drivers/compress/nitrox/nitrox_comp_reqmgr.c
+++ b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
@@ -337,7 +337,7 @@ static void nitrox_dump_databuf(const char *name, struct rte_mbuf *m,
rte_pktmbuf_mtod(m, char *), mlen);
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
}
static void nitrox_dump_zip_instr(struct nitrox_zip_instr *instr,
@@ -348,108 +348,108 @@ static void nitrox_dump_zip_instr(struct nitrox_zip_instr *instr,
uint64_t value;
int i = 0;
- NITROX_LOG(DEBUG, "\nZIP instruction..(%p)\n", instr);
- NITROX_LOG(DEBUG, "\tWORD0 = 0x%016"PRIx64"\n", instr->w0.u64);
- NITROX_LOG(DEBUG, "\t\tTOL = %d\n", instr->w0.tol);
- NITROX_LOG(DEBUG, "\t\tEXNUM = %d\n", instr->w0.exn);
- NITROX_LOG(DEBUG, "\t\tEXBITS = %x\n", instr->w0.exbits);
- NITROX_LOG(DEBUG, "\t\tCA = %d\n", instr->w0.ca);
- NITROX_LOG(DEBUG, "\t\tSF = %d\n", instr->w0.sf);
- NITROX_LOG(DEBUG, "\t\tSS = %d\n", instr->w0.ss);
- NITROX_LOG(DEBUG, "\t\tCC = %d\n", instr->w0.cc);
- NITROX_LOG(DEBUG, "\t\tEF = %d\n", instr->w0.ef);
- NITROX_LOG(DEBUG, "\t\tBF = %d\n", instr->w0.bf);
- NITROX_LOG(DEBUG, "\t\tCO = %d\n", instr->w0.co);
- NITROX_LOG(DEBUG, "\t\tDS = %d\n", instr->w0.ds);
- NITROX_LOG(DEBUG, "\t\tDG = %d\n", instr->w0.dg);
- NITROX_LOG(DEBUG, "\t\tHG = %d\n", instr->w0.hg);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD1 = 0x%016"PRIx64"\n", instr->w1.u64);
- NITROX_LOG(DEBUG, "\t\tHL = %d\n", instr->w1.hl);
- NITROX_LOG(DEBUG, "\t\tADLERCRC32 = 0x%08x\n", instr->w1.adlercrc32);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\nZIP instruction..(%p)", instr);
+ NITROX_LOG_LINE(DEBUG, "\tWORD0 = 0x%016"PRIx64, instr->w0.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTOL = %d", instr->w0.tol);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXNUM = %d", instr->w0.exn);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXBITS = %x", instr->w0.exbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tCA = %d", instr->w0.ca);
+ NITROX_LOG_LINE(DEBUG, "\t\tSF = %d", instr->w0.sf);
+ NITROX_LOG_LINE(DEBUG, "\t\tSS = %d", instr->w0.ss);
+ NITROX_LOG_LINE(DEBUG, "\t\tCC = %d", instr->w0.cc);
+ NITROX_LOG_LINE(DEBUG, "\t\tEF = %d", instr->w0.ef);
+ NITROX_LOG_LINE(DEBUG, "\t\tBF = %d", instr->w0.bf);
+ NITROX_LOG_LINE(DEBUG, "\t\tCO = %d", instr->w0.co);
+ NITROX_LOG_LINE(DEBUG, "\t\tDS = %d", instr->w0.ds);
+ NITROX_LOG_LINE(DEBUG, "\t\tDG = %d", instr->w0.dg);
+ NITROX_LOG_LINE(DEBUG, "\t\tHG = %d", instr->w0.hg);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD1 = 0x%016"PRIx64, instr->w1.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tHL = %d", instr->w1.hl);
+ NITROX_LOG_LINE(DEBUG, "\t\tADLERCRC32 = 0x%08x", instr->w1.adlercrc32);
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w2.cptr;
- NITROX_LOG(DEBUG, "\tWORD2 = 0x%016"PRIx64"\n", instr->w2.u64);
- NITROX_LOG(DEBUG, "\t\tCPTR = 0x%11"PRIx64"\n", value);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\tWORD2 = 0x%016"PRIx64, instr->w2.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tCPTR = 0x%11"PRIx64, value);
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w3.hptr;
- NITROX_LOG(DEBUG, "\tWORD3 = 0x%016"PRIx64"\n", instr->w3.u64);
- NITROX_LOG(DEBUG, "\t\tHLEN = %d\n", instr->w3.hlen);
- NITROX_LOG(DEBUG, "\t\tHPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD3 = 0x%016"PRIx64, instr->w3.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tHLEN = %d", instr->w3.hlen);
+ NITROX_LOG_LINE(DEBUG, "\t\tHPTR = 0x%11"PRIx64, value);
if (instr->w0.hg && hptr_arr) {
for (i = 0; i < instr->w3.hlen; i++) {
value = hptr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, hptr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w4.iptr;
- NITROX_LOG(DEBUG, "\tWORD4 = 0x%016"PRIx64"\n", instr->w4.u64);
- NITROX_LOG(DEBUG, "\t\tILEN = %d\n", instr->w4.ilen);
- NITROX_LOG(DEBUG, "\t\tIPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD4 = 0x%016"PRIx64, instr->w4.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tILEN = %d", instr->w4.ilen);
+ NITROX_LOG_LINE(DEBUG, "\t\tIPTR = 0x%11"PRIx64, value);
if (instr->w0.dg && iptr_arr) {
for (i = 0; i < instr->w4.ilen; i++) {
value = iptr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, iptr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w5.optr;
- NITROX_LOG(DEBUG, "\tWORD5 = 0x%016"PRIx64"\n", instr->w5.u64);
- NITROX_LOG(DEBUG, "\t\t OLEN = %d\n", instr->w5.olen);
- NITROX_LOG(DEBUG, "\t\t OPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD5 = 0x%016"PRIx64, instr->w5.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\t OLEN = %d", instr->w5.olen);
+ NITROX_LOG_LINE(DEBUG, "\t\t OPTR = 0x%11"PRIx64, value);
if (instr->w0.ds && optr_arr) {
for (i = 0; i < instr->w5.olen; i++) {
value = optr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, optr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w6.rptr;
- NITROX_LOG(DEBUG, "\tWORD6 = 0x%016"PRIx64"\n", instr->w6.u64);
- NITROX_LOG(DEBUG, "\t\tRPTR = 0x%11"PRIx64"\n", value);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD7 = 0x%016"PRIx64"\n", instr->w7.u64);
- NITROX_LOG(DEBUG, "\t\tGRP = %x\n", instr->w7.grp);
- NITROX_LOG(DEBUG, "\t\tADDR_MSB = 0x%5x\n", instr->w7.addr_msb);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\tWORD6 = 0x%016"PRIx64, instr->w6.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tRPTR = 0x%11"PRIx64, value);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD7 = 0x%016"PRIx64, instr->w7.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tGRP = %x", instr->w7.grp);
+ NITROX_LOG_LINE(DEBUG, "\t\tADDR_MSB = 0x%5x", instr->w7.addr_msb);
+ NITROX_LOG_LINE(DEBUG,);
}
static void nitrox_dump_zip_result(struct nitrox_zip_instr *instr,
struct nitrox_zip_result *result)
{
- NITROX_LOG(DEBUG, "ZIP result..(instr %p)\n", instr);
- NITROX_LOG(DEBUG, "\tWORD0 = 0x%016"PRIx64"\n", result->w0.u64);
- NITROX_LOG(DEBUG, "\t\tCRC32 = 0x%8x\n", result->w0.crc32);
- NITROX_LOG(DEBUG, "\t\tADLER32 = 0x%8x\n", result->w0.adler32);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD1 = 0x%016"PRIx64"\n", result->w1.u64);
- NITROX_LOG(DEBUG, "\t\tTBYTESWRITTEN = %u\n", result->w1.tbyteswritten);
- NITROX_LOG(DEBUG, "\t\tTBYTESREAD = %u\n", result->w1.tbytesread);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD2 = 0x%016"PRIx64"\n", result->w2.u64);
- NITROX_LOG(DEBUG, "\t\tTBITS = %u\n", result->w2.tbits);
- NITROX_LOG(DEBUG, "\t\tEXN = %d\n", result->w2.exn);
- NITROX_LOG(DEBUG, "\t\tEBITS = %x\n", result->w2.exbits);
- NITROX_LOG(DEBUG, "\t\tEF = %d\n", result->w2.ef);
- NITROX_LOG(DEBUG, "\t\tCOMPCODE = 0x%2x\n", result->w2.compcode);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "ZIP result..(instr %p)", instr);
+ NITROX_LOG_LINE(DEBUG, "\tWORD0 = 0x%016"PRIx64, result->w0.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tCRC32 = 0x%8x", result->w0.crc32);
+ NITROX_LOG_LINE(DEBUG, "\t\tADLER32 = 0x%8x", result->w0.adler32);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD1 = 0x%016"PRIx64, result->w1.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBYTESWRITTEN = %u", result->w1.tbyteswritten);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBYTESREAD = %u", result->w1.tbytesread);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD2 = 0x%016"PRIx64, result->w2.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBITS = %u", result->w2.tbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXN = %d", result->w2.exn);
+ NITROX_LOG_LINE(DEBUG, "\t\tEBITS = %x", result->w2.exbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tEF = %d", result->w2.ef);
+ NITROX_LOG_LINE(DEBUG, "\t\tCOMPCODE = 0x%2x", result->w2.compcode);
+ NITROX_LOG_LINE(DEBUG,);
}
#else
#define nitrox_dump_databuf(name, m, off, datalen)
@@ -533,7 +533,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
uint32_t mlen;
if (unlikely(datalen > NITROX_ZIP_MAX_DATASIZE)) {
- NITROX_LOG(ERR, "Unsupported datalen %d, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported datalen %d, max supported %d",
datalen, NITROX_ZIP_MAX_DATASIZE);
return -ENOTSUP;
}
@@ -545,7 +545,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
}
if (unlikely(nb_segs > NITROX_ZIP_MAX_ZPTRS)) {
- NITROX_LOG(ERR, "Mbuf has more segments %d than supported\n",
+ NITROX_LOG_LINE(ERR, "Mbuf has more segments %d than supported",
nb_segs);
return -ENOTSUP;
}
@@ -553,13 +553,13 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
if (unlikely(nb_segs > sgtbl->nb_sgls)) {
union nitrox_zip_zptr *sgl;
- NITROX_LOG(INFO, "Mbuf has more segs %d than allocated %d\n",
+ NITROX_LOG_LINE(INFO, "Mbuf has more segs %d than allocated %d",
nb_segs, sgtbl->nb_sgls);
sgl = rte_realloc_socket(sgtbl->sgl,
sizeof(*sgtbl->sgl) * nb_segs,
8, socket_id);
if (unlikely(!sgl)) {
- NITROX_LOG(ERR, "Failed to expand sglist memory\n");
+ NITROX_LOG_LINE(ERR, "Failed to expand sglist memory");
return -ENOMEM;
}
@@ -591,7 +591,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
rte_pktmbuf_data_len(m) : datalen;
zip_addr.u64 = rte_pktmbuf_iova(m);
if (unlikely(zip_addr.zda.addr_msb != sgtbl->addr_msb)) {
- NITROX_LOG(ERR, "zip_ptrs have different msb addr\n");
+ NITROX_LOG_LINE(ERR, "zip_ptrs have different msb addr");
return -ENOTSUP;
}
@@ -682,7 +682,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
xform = sr->op->private_xform;
if (unlikely(xform == NULL)) {
- NITROX_LOG(ERR, "Invalid stateless comp op\n");
+ NITROX_LOG_LINE(ERR, "Invalid stateless comp op");
return -EINVAL;
}
@@ -696,7 +696,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
xform->op == NITROX_COMP_OP_COMPRESS &&
sr->op->flush_flag != RTE_COMP_FLUSH_FULL &&
sr->op->flush_flag != RTE_COMP_FLUSH_FINAL)) {
- NITROX_LOG(ERR, "Invalid flush flag %d in stateless op\n",
+ NITROX_LOG_LINE(ERR, "Invalid flush flag %d in stateless op",
sr->op->flush_flag);
return -EINVAL;
}
@@ -805,7 +805,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
if (unlikely(iptr_msb != optr_msb || iptr_msb != rptr_msb ||
(xform->history_window && (iptr_msb != hptr_msb)) ||
(xform->context && (iptr_msb != cptr_msb)))) {
- NITROX_LOG(ERR, "addr_msb is not same for all addresses\n");
+ NITROX_LOG_LINE(ERR, "addr_msb is not same for all addresses");
return -ENOTSUP;
}
@@ -861,7 +861,7 @@ static int post_process_zip_stateless(struct nitrox_softreq *sr,
if (unlikely(zip_res->w2.compcode != NITROX_CC_SUCCESS)) {
struct rte_comp_op *op = sr->op;
- NITROX_LOG(ERR, "Dequeue error 0x%x\n",
+ NITROX_LOG_LINE(ERR, "Dequeue error 0x%x",
zip_res->w2.compcode);
if (zip_res->w2.compcode == NITROX_CC_STOP ||
zip_res->w2.compcode == NITROX_CC_DTRUNC)
@@ -877,7 +877,7 @@ static int post_process_zip_stateless(struct nitrox_softreq *sr,
output_unused_bytes = sr->dst.total_bytes - zip_res->w1.tbyteswritten;
if (unlikely(xform->op == NITROX_COMP_OP_DECOMPRESS &&
output_unused_bytes < NITROX_ZIP_MAX_ONFSIZE)) {
- NITROX_LOG(ERR, "TOL %d, Total bytes written %d\n",
+ NITROX_LOG_LINE(ERR, "TOL %d, Total bytes written %d",
sr->dst.total_bytes, zip_res->w1.tbyteswritten);
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
sr->op->consumed = 0;
@@ -908,7 +908,7 @@ static int update_history(struct rte_mbuf *mbuf, uint32_t off, uint16_t datalen,
off -= rte_pktmbuf_data_len(m);
if (unlikely(!m)) {
- NITROX_LOG(ERR, "Failed to update history. Invalid mbuf\n");
+ NITROX_LOG_LINE(ERR, "Failed to update history. Invalid mbuf");
return -EINVAL;
}
@@ -928,7 +928,7 @@ static int update_history(struct rte_mbuf *mbuf, uint32_t off, uint16_t datalen,
}
if (unlikely(datalen != 0)) {
- NITROX_LOG(ERR, "Failed to update history. Invalid datalen\n");
+ NITROX_LOG_LINE(ERR, "Failed to update history. Invalid datalen");
return -EINVAL;
}
@@ -955,11 +955,11 @@ static int post_process_zip_stateful(struct nitrox_softreq *sr,
sr->op->produced = 0;
xform->hlen = 0;
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
- NITROX_LOG(ERR, "Dequeue compress DTRUNC error\n");
+ NITROX_LOG_LINE(ERR, "Dequeue compress DTRUNC error");
return 0;
} else if (unlikely(zip_res->w2.compcode == NITROX_CC_STOP)) {
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
- NITROX_LOG(NOTICE, "Dequeue decompress dynamic STOP\n");
+ NITROX_LOG_LINE(NOTICE, "Dequeue decompress dynamic STOP");
} else if (zip_res->w2.compcode == NITROX_CC_SUCCESS) {
sr->op->status = RTE_COMP_OP_STATUS_SUCCESS;
} else {
@@ -968,14 +968,14 @@ static int post_process_zip_stateful(struct nitrox_softreq *sr,
xform->exbits = 0;
xform->bf = true;
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
- NITROX_LOG(ERR, "Dequeue error 0x%x\n",
+ NITROX_LOG_LINE(ERR, "Dequeue error 0x%x",
zip_res->w2.compcode);
return -EFAULT;
}
if (xform->op == NITROX_COMP_OP_COMPRESS) {
if (zip_res->w1.tbytesread < xform->hlen) {
- NITROX_LOG(ERR, "Invalid bytesread\n");
+ NITROX_LOG_LINE(ERR, "Invalid bytesread");
reset_nitrox_xform(xform);
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
return -EFAULT;
@@ -1068,7 +1068,7 @@ nitrox_check_comp_req(struct nitrox_softreq *sr, struct rte_comp_op **op)
zip_res = zip_result_to_cpu64(&sr->zip_res);
if (zip_res.w2.compcode == NITROX_CC_NOTDONE) {
if (rte_get_timer_cycles() >= sr->timeout) {
- NITROX_LOG(ERR, "Op timedout\n");
+ NITROX_LOG_LINE(ERR, "Op timedout");
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
err = -ETIMEDOUT;
goto exit;
@@ -1166,7 +1166,7 @@ static void req_pool_obj_init(struct rte_mempool *mp, void *arg, void *obj,
sizeof(*sr->dst.sgl) * NITROX_ZIP_SGL_COUNT,
8, mp->socket_id);
if (sr->src.sgl == NULL || sr->dst.sgl == NULL) {
- NITROX_LOG(ERR, "Failed to allocate zip_sgl memory\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate zip_sgl memory");
*err = -ENOMEM;
}
@@ -1192,7 +1192,7 @@ nitrox_comp_req_pool_create(struct rte_compressdev *dev, uint32_t nobjs,
64, 0, NULL, NULL, req_pool_obj_init, &err,
socket_id, 0);
if (unlikely(!mp))
- NITROX_LOG(ERR, "Failed to create req pool, qid %d, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create req pool, qid %d, err %d",
qp_id, rte_errno);
if (unlikely(err)) {
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 03652d3ade..da70121d91 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -79,7 +79,7 @@ nitrox_sym_dev_config(struct rte_cryptodev *cdev,
struct nitrox_device *ndev = sym_dev->ndev;
if (config->nb_queue_pairs > ndev->nr_queues) {
- NITROX_LOG(ERR, "Invalid queue pairs, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid queue pairs, max supported %d",
ndev->nr_queues);
return -EINVAL;
}
@@ -177,9 +177,9 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
struct nitrox_qp *qp = NULL;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
@@ -194,7 +194,7 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp) {
- NITROX_LOG(ERR, "Failed to allocate nitrox qp\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate nitrox qp");
return -ENOMEM;
}
@@ -212,7 +212,7 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
goto req_pool_err;
cdev->data->queue_pairs[qp_id] = qp;
- NITROX_LOG(DEBUG, "queue %d setup done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d setup done", qp_id);
return 0;
req_pool_err:
@@ -230,21 +230,21 @@ nitrox_sym_dev_qp_release(struct rte_cryptodev *cdev, uint16_t qp_id)
struct nitrox_qp *qp;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
qp = cdev->data->queue_pairs[qp_id];
if (!qp) {
- NITROX_LOG(DEBUG, "queue %u already freed\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %u already freed", qp_id);
return 0;
}
if (!nitrox_qp_is_empty(qp)) {
- NITROX_LOG(ERR, "queue %d not empty\n", qp_id);
+ NITROX_LOG_LINE(ERR, "queue %d not empty", qp_id);
return -EAGAIN;
}
@@ -252,7 +252,7 @@ nitrox_sym_dev_qp_release(struct rte_cryptodev *cdev, uint16_t qp_id)
err = nitrox_qp_release(qp, ndev->bar_addr);
nitrox_sym_req_pool_free(qp->sr_mp);
rte_free(qp);
- NITROX_LOG(DEBUG, "queue %d release done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d release done", qp_id);
return err;
}
@@ -280,7 +280,7 @@ get_crypto_chain_order(const struct rte_crypto_sym_xform *xform)
RTE_CRYPTO_CIPHER_OP_DECRYPT) {
res = NITROX_CHAIN_AUTH_CIPHER;
} else {
- NITROX_LOG(ERR, "auth op %d, cipher op %d\n",
+ NITROX_LOG_LINE(ERR, "auth op %d, cipher op %d",
xform->auth.op, xform->next->cipher.op);
}
}
@@ -294,7 +294,7 @@ get_crypto_chain_order(const struct rte_crypto_sym_xform *xform)
RTE_CRYPTO_AUTH_OP_GENERATE) {
res = NITROX_CHAIN_CIPHER_AUTH;
} else {
- NITROX_LOG(ERR, "cipher op %d, auth op %d\n",
+ NITROX_LOG_LINE(ERR, "cipher op %d, auth op %d",
xform->cipher.op, xform->next->auth.op);
}
}
@@ -325,7 +325,7 @@ get_flexi_cipher_type(enum rte_crypto_cipher_algorithm algo, bool *is_aes)
break;
default:
type = CIPHER_INVALID;
- NITROX_LOG(ERR, "Algorithm not supported %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Algorithm not supported %d", algo);
break;
}
@@ -351,7 +351,7 @@ flexi_aes_keylen(size_t keylen, bool is_aes)
aes_keylen = 3;
break;
default:
- NITROX_LOG(ERR, "Invalid keylen %zu\n", keylen);
+ NITROX_LOG_LINE(ERR, "Invalid keylen %zu", keylen);
aes_keylen = -EINVAL;
break;
}
@@ -364,7 +364,7 @@ crypto_key_is_valid(struct rte_crypto_cipher_xform *xform,
struct flexi_crypto_context *fctx)
{
if (unlikely(xform->key.length > sizeof(fctx->crypto.key))) {
- NITROX_LOG(ERR, "Invalid crypto key length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid crypto key length %d",
xform->key.length);
return false;
}
@@ -427,7 +427,7 @@ get_flexi_auth_type(enum rte_crypto_auth_algorithm algo)
type = AUTH_SHA2_SHA256;
break;
default:
- NITROX_LOG(ERR, "Algorithm not supported %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Algorithm not supported %d", algo);
type = AUTH_INVALID;
break;
}
@@ -440,12 +440,12 @@ auth_key_is_valid(const uint8_t *data, uint16_t length,
struct flexi_crypto_context *fctx)
{
if (unlikely(!data && length)) {
- NITROX_LOG(ERR, "Invalid auth key\n");
+ NITROX_LOG_LINE(ERR, "Invalid auth key");
return false;
}
if (unlikely(length > sizeof(fctx->auth.opad))) {
- NITROX_LOG(ERR, "Invalid auth key length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid auth key length %d",
length);
return false;
}
@@ -488,7 +488,7 @@ configure_aead_ctx(struct rte_crypto_aead_xform *xform,
struct flexi_crypto_context *fctx = &ctx->fctx;
if (unlikely(xform->aad_length > FLEXI_CRYPTO_MAX_AAD_LEN)) {
- NITROX_LOG(ERR, "AAD length %d not supported\n",
+ NITROX_LOG_LINE(ERR, "AAD length %d not supported",
xform->aad_length);
return -ENOTSUP;
}
@@ -515,14 +515,14 @@ configure_aead_ctx(struct rte_crypto_aead_xform *xform,
if (unlikely(xform->digest_length < 4 ||
xform->digest_length > 16 ||
(xform->digest_length & 1) == 1)) {
- NITROX_LOG(ERR, "Invalid digest length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid digest length %d",
xform->digest_length);
return -EINVAL;
}
L = 15 - xform->iv.length;
if (unlikely(L < 2 || L > 8)) {
- NITROX_LOG(ERR, "Invalid iv length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid iv length %d",
xform->iv.length);
return -EINVAL;
}
@@ -581,23 +581,23 @@ nitrox_sym_dev_sess_configure(struct rte_cryptodev *cdev __rte_unused,
aead_xform = &xform->aead;
break;
default:
- NITROX_LOG(ERR, "Crypto chain not supported\n");
+ NITROX_LOG_LINE(ERR, "Crypto chain not supported");
ret = -ENOTSUP;
goto err;
}
if (cipher_xform && unlikely(configure_cipher_ctx(cipher_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure cipher ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure cipher ctx");
goto err;
}
if (auth_xform && unlikely(configure_auth_ctx(auth_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure auth ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure auth ctx");
goto err;
}
if (aead_xform && unlikely(configure_aead_ctx(aead_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure aead ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure aead ctx");
goto err;
}
@@ -763,7 +763,7 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
cdev = rte_cryptodev_pmd_create(name, &ndev->rte_sym_dev,
&init_params);
if (!cdev) {
- NITROX_LOG(ERR, "Cryptodev '%s' creation failed\n", name);
+ NITROX_LOG_LINE(ERR, "Cryptodev '%s' creation failed", name);
return -ENODEV;
}
@@ -787,7 +787,7 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
rte_cryptodev_pmd_probing_finish(cdev);
- NITROX_LOG(DEBUG, "Created cryptodev '%s', dev_id %d, drv_id %d\n",
+ NITROX_LOG_LINE(DEBUG, "Created cryptodev '%s', dev_id %d, drv_id %d",
cdev->data->name, cdev->data->dev_id, nitrox_sym_drv_id);
return 0;
}
diff --git a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
index 973bb5f424..7751c1a9fc 100644
--- a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
+++ b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
@@ -466,7 +466,7 @@ create_cipher_auth_sglist(struct nitrox_softreq *sr,
if (unlikely(
op->sym->cipher.data.offset + op->sym->cipher.data.length !=
op->sym->auth.data.offset + op->sym->auth.data.length)) {
- NITROX_LOG(ERR, "Auth only data after cipher data not supported\n");
+ NITROX_LOG_LINE(ERR, "Auth only data after cipher data not supported");
return -ENOTSUP;
}
@@ -679,7 +679,7 @@ softreq_copy_salt(struct nitrox_softreq *sr)
uint8_t *addr;
if (unlikely(ctx->iv.length < AES_GCM_SALT_SIZE)) {
- NITROX_LOG(ERR, "Invalid IV length %d\n", ctx->iv.length);
+ NITROX_LOG_LINE(ERR, "Invalid IV length %d", ctx->iv.length);
return -EINVAL;
}
@@ -829,8 +829,8 @@ nitrox_process_se_req(uint16_t qno, struct rte_crypto_op *op,
if (unlikely(op->sym->m_src->nb_segs > MAX_SUPPORTED_MBUF_SEGS ||
(op->sym->m_dst &&
op->sym->m_dst->nb_segs > MAX_SUPPORTED_MBUF_SEGS))) {
- NITROX_LOG(ERR, "Mbuf segments not supported. "
- "Max supported %d\n", MAX_SUPPORTED_MBUF_SEGS);
+ NITROX_LOG_LINE(ERR, "Mbuf segments not supported. "
+ "Max supported %d", MAX_SUPPORTED_MBUF_SEGS);
return -ENOTSUP;
}
@@ -865,7 +865,7 @@ nitrox_check_se_req(struct nitrox_softreq *sr, struct rte_crypto_op **op)
return -EAGAIN;
if (unlikely(err))
- NITROX_LOG(ERR, "Request err 0x%x, orh 0x%"PRIx64"\n", err,
+ NITROX_LOG_LINE(ERR, "Request err 0x%x, orh 0x%"PRIx64, err,
sr->resp.orh);
*op = sr->op;
@@ -901,7 +901,7 @@ nitrox_sym_req_pool_create(struct rte_cryptodev *cdev, uint32_t nobjs,
64, 0, NULL, NULL, req_pool_obj_init, NULL,
socket_id, 0);
if (unlikely(!mp))
- NITROX_LOG(ERR, "Failed to create req pool, qid %d, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create req pool, qid %d, err %d",
qp_id, rte_errno);
return mp;
diff --git a/drivers/dma/odm/odm.h b/drivers/dma/odm/odm.h
index 7303aa2955..274c21ef8d 100644
--- a/drivers/dma/odm/odm.h
+++ b/drivers/dma/odm/odm.h
@@ -66,17 +66,9 @@ extern int odm_logtype;
#define odm_read64(addr) rte_read64_relaxed((volatile void *)(addr))
#define odm_write64(val, addr) rte_write64_relaxed((val), (volatile void *)(addr))
-#define odm_err(...) \
- rte_log(RTE_LOG_ERR, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
-#define odm_info(...) \
- rte_log(RTE_LOG_INFO, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
-#define odm_debug(...) \
- rte_log(RTE_LOG_DEBUG, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
+#define ODM_LOG(level, ...) \
+ rte_log(RTE_LOG_ ## level, odm_logtype, \
+ RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__,) "\n", __func__, __LINE__, \
RTE_FMT_TAIL(__VA_ARGS__, )))
/*
diff --git a/drivers/dma/odm/odm_dmadev.c b/drivers/dma/odm/odm_dmadev.c
index 57bd6923f1..a2f4ed9a8e 100644
--- a/drivers/dma/odm/odm_dmadev.c
+++ b/drivers/dma/odm/odm_dmadev.c
@@ -494,10 +494,10 @@ odm_dmadev_completed_status(void *dev_private, uint16_t vchan, const uint16_t nb
}
#ifdef ODM_DEBUG
- odm_debug("cring_head: 0x%" PRIx16, cring_head);
- odm_debug("Submitted: 0x%" PRIx64, vq->stats.submitted);
- odm_debug("Completed: 0x%" PRIx64, vq->stats.completed);
- odm_debug("Hardware count: 0x%" PRIx64, odm_read64(odm->rbase + ODM_VDMA_CNT(vchan)));
+ ODM_LOG(DEBUG, "cring_head: 0x%" PRIx16, cring_head);
+ ODM_LOG(DEBUG, "Submitted: 0x%" PRIx64, vq->stats.submitted);
+ ODM_LOG(DEBUG, "Completed: 0x%" PRIx64, vq->stats.completed);
+ ODM_LOG(DEBUG, "Hardware count: 0x%" PRIx64, odm_read64(odm->rbase + ODM_VDMA_CNT(vchan)));
#endif
for (cnt = 0; cnt < nb_cpls; cnt++) {
@@ -651,11 +651,11 @@ odm_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_dev
dmadev = rte_dma_pmd_allocate(name, pci_dev->device.numa_node, sizeof(*odm));
if (dmadev == NULL) {
- odm_err("DMA device allocation failed for %s", name);
+ ODM_LOG(ERR, "DMA device allocation failed for %s", name);
return -ENOMEM;
}
- odm_info("DMA device %s probed", name);
+ ODM_LOG(INFO, "DMA device %s probed", name);
odm = dmadev->data->dev_private;
dmadev->device = &pci_dev->device;
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index c9bf4f8b6b..ca7aec575c 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -302,12 +302,12 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev)
return eventdev->data->dev_private;
}
-#define DSW_LOG_DP(level, fmt, args...) \
- RTE_LOG_DP(level, EVENTDEV, "[%s] %s() line %u: " fmt, \
+#define DSW_LOG_DP_LINE(level, fmt, args...) \
+ RTE_LOG_DP(level, EVENTDEV, "[%s] %s() line %u: " fmt "\n", \
DSW_PMD_NAME, \
__func__, __LINE__, ## args)
-#define DSW_LOG_DP_PORT(level, port_id, fmt, args...) \
- DSW_LOG_DP(level, "<Port %d> " fmt, port_id, ## args)
+#define DSW_LOG_DP_PORT_LINE(level, port_id, fmt, args...) \
+ DSW_LOG_DP_LINE(level, "<Port %d> " fmt, port_id, ## args)
#endif
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 33f741990f..67e630ffcb 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -59,7 +59,7 @@ dsw_port_acquire_credits(struct dsw_evdev *dsw, struct dsw_port *port,
return false;
}
- DSW_LOG_DP_PORT(DEBUG, port->id, "Acquired %d tokens from pool.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id, "Acquired %d tokens from pool.",
acquired_credits);
port->inflight_credits += acquired_credits;
@@ -85,8 +85,8 @@ dsw_port_return_credits(struct dsw_evdev *dsw, struct dsw_port *port,
return_credits,
rte_memory_order_relaxed);
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Returned %d tokens to pool.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Returned %d tokens to pool.",
return_credits);
}
}
@@ -264,8 +264,8 @@ dsw_port_add_paused_flows(struct dsw_port *port, struct dsw_queue_flow *qfs,
for (i = 0; i < qfs_len; i++) {
struct dsw_queue_flow *qf = &qfs[i];
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Pausing queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Pausing queue_id %d flow_hash %d.",
qf->queue_id, qf->flow_hash);
port->paused_flows[port->paused_flows_len] = *qf;
@@ -290,8 +290,8 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
port->paused_flows[last_idx];
port->paused_flows_len--;
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Unpausing queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Unpausing queue_id %d flow_hash %d.",
target_qf->queue_id,
target_qf->flow_hash);
@@ -299,8 +299,8 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
}
}
- DSW_LOG_DP_PORT(ERR, port->id,
- "Failed to unpause queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(ERR, port->id,
+ "Failed to unpause queue_id %d flow_hash %d.",
target_qf->queue_id, target_qf->flow_hash);
RTE_VERIFY(0);
}
@@ -519,9 +519,9 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
if (candidate_weight < 0)
return false;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Selected queue_id %d "
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Selected queue_id %d "
"flow_hash %d (with flow load %d) for migration "
- "to port %d.\n", candidate_qf->queue_id,
+ "to port %d.", candidate_qf->queue_id,
candidate_qf->flow_hash,
DSW_LOAD_TO_PERCENT(candidate_flow_load),
candidate_port_id);
@@ -566,9 +566,9 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw,
}
if (*targets_len == 0)
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
"For the %d flows considered, no target port "
- "was found.\n", num_bursts);
+ "was found.", num_bursts);
}
static uint8_t
@@ -585,8 +585,8 @@ dsw_schedule(struct dsw_evdev *dsw, uint8_t queue_id, uint16_t flow_hash)
*/
port_id = rte_bsf64(queue->serving_ports);
- DSW_LOG_DP(DEBUG, "Event with queue_id %d flow_hash %d is scheduled "
- "to port %d.\n", queue_id, flow_hash, port_id);
+ DSW_LOG_DP_LINE(DEBUG, "Event with queue_id %d flow_hash %d is scheduled "
+ "to port %d.", queue_id, flow_hash, port_id);
return port_id;
}
@@ -774,8 +774,8 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port,
continue;
}
- DSW_LOG_DP_PORT(DEBUG, port->id, "Migration completed for "
- "queue_id %d flow_hash %d.\n", queue_id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id, "Migration completed for "
+ "queue_id %d flow_hash %d.", queue_id,
flow_hash);
}
@@ -844,27 +844,27 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
if (dsw->num_ports == 1)
return;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Considering emigration.");
/* For simplicity, postpone migration if there are still
* events to consume in the in_buffer (from the last
* emigration).
*/
if (source_port->in_buffer_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are still "
- "events in the input buffer.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "There are still "
+ "events in the input buffer.");
return;
}
if (source_port->migration_state != DSW_MIGRATION_STATE_IDLE) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
- "Emigration already in progress.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
+ "Emigration already in progress.");
return;
}
if (seen_events_len < DSW_MAX_EVENTS_RECORDED) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Not enough events "
- "are recorded to allow for a migration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Not enough events "
+ "are recorded to allow for a migration.");
return;
}
@@ -873,8 +873,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
* leading to wasted CPU cycles (e.g., sorting queue flows).
*/
if (source_port->paused_events_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Paused events on "
- "port. Postponing any migrations.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Paused events on "
+ "port. Postponing any migrations.");
return;
}
@@ -890,8 +890,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
rte_atomic_load_explicit(&source_port->load,
rte_memory_order_relaxed);
if (source_port_load < DSW_MIN_SOURCE_LOAD_FOR_MIGRATION) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
- "Load %d is below threshold level %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
+ "Load %d is below threshold level %d.",
DSW_LOAD_TO_PERCENT(source_port_load),
DSW_LOAD_TO_PERCENT(DSW_MIN_SOURCE_LOAD_FOR_MIGRATION));
return;
@@ -904,9 +904,9 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
dsw_retrieve_port_loads(dsw, port_loads,
DSW_MAX_TARGET_LOAD_FOR_MIGRATION);
if (!any_port_below_limit) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
"Candidate target ports are all too highly "
- "loaded.\n");
+ "loaded.");
return;
}
@@ -917,8 +917,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
* only (known) flow.
*/
if (num_bursts < 2) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Only a single flow "
- "queue_id %d flow_hash %d has been seen.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Only a single flow "
+ "queue_id %d flow_hash %d has been seen.",
bursts[0].queue_flow.queue_id,
bursts[0].queue_flow.flow_hash);
return;
@@ -980,8 +980,8 @@ dsw_port_continue_emigration(struct dsw_evdev *dsw,
* unpause.
*/
if (source_port->paused_events_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are events in "
- "the pause buffer. Aborting migration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "There are events in "
+ "the pause buffer. Aborting migration.");
dsw_port_abort_migration(source_port);
return;
}
@@ -1339,8 +1339,8 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
bool enough_credits;
uint16_t i;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Attempting to enqueue %d "
- "events.\n", events_len);
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Attempting to enqueue %d "
+ "events.", events_len);
dsw_port_bg_process(dsw, source_port);
@@ -1414,8 +1414,8 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
dsw_port_queue_enqueue_stats(source_port, event->queue_id);
}
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "%d non-release events "
- "accepted.\n", num_new + num_forward);
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "%d non-release events "
+ "accepted.", num_new + num_forward);
return (num_new + num_forward + num_release);
}
@@ -1581,7 +1581,7 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
dsw_port_note_op(source_port, dequeued);
if (dequeued > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Dequeued %d events.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Dequeued %d events.",
dequeued);
/* One potential optimization one might think of is to
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0bc0d9a55a..676006ce0d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -63,10 +63,10 @@
#endif
RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
+#define RTE_LOGTYPE_NET_AF_XDP af_xdp_logtype
-#define AF_XDP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_xdp_logtype, \
- "%s(): " fmt, __func__, ##args)
+#define AF_XDP_LOG_LINE(level, fmt, args...) \
+ RTE_LOG(level, NET_AF_XDP, "%s(): " fmt "\n", __func__, ##args)
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
@@ -243,7 +243,7 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,
if (unlikely(!xsk_ring_prod__reserve(fq, reserve_size, &idx))) {
for (i = 0; i < reserve_size; i++)
rte_pktmbuf_free(bufs[i]);
- AF_XDP_LOG(DEBUG, "Failed to reserve enough fq descs.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to reserve enough fq descs.");
return -1;
}
@@ -273,12 +273,12 @@ reserve_fill_queue_cp(struct xsk_umem_info *umem, uint16_t reserve_size,
if (rte_ring_dequeue_bulk(umem->buf_ring, addrs, reserve_size, NULL)
!= reserve_size) {
- AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to get enough buffers for fq.");
return -1;
}
if (unlikely(!xsk_ring_prod__reserve(fq, reserve_size, &idx))) {
- AF_XDP_LOG(DEBUG, "Failed to reserve enough fq descs.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to reserve enough fq descs.");
rte_ring_enqueue_bulk(umem->buf_ring, addrs,
reserve_size, NULL);
return -1;
@@ -342,8 +342,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
/* allocate bufs for fill queue replenishment after rx */
if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) {
- AF_XDP_LOG(DEBUG,
- "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG,
+ "Failed to get enough buffers for fq.");
/* rollback cached_cons which is added by
* xsk_ring_cons__peek
*/
@@ -888,7 +888,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
&xdp_stats, &optlen) : -1;
if (ret != 0) {
- AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+ AF_XDP_LOG_LINE(ERR, "getsockopt() failed for XDP_STATISTICS.");
return -1;
}
stats->imissed += xdp_stats.rx_dropped - rxq->stats.imissed_offset;
@@ -919,7 +919,7 @@ eth_stats_reset(struct rte_eth_dev *dev)
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
&xdp_stats, &optlen) : -1;
if (ret != 0) {
- AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+ AF_XDP_LOG_LINE(ERR, "getsockopt() failed for XDP_STATISTICS.");
return -1;
}
internals->rx_queues[i].stats.imissed_offset = xdp_stats.rx_dropped;
@@ -944,14 +944,14 @@ remove_xdp_program(struct pmd_internals *internals)
ret = bpf_xdp_query_id(internals->if_index, XDP_FLAGS_UPDATE_IF_NOEXIST,
&curr_prog_id);
if (ret != 0) {
- AF_XDP_LOG(ERR, "bpf_xdp_query_id failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_xdp_query_id failed");
return ret;
}
ret = bpf_xdp_detach(internals->if_index, XDP_FLAGS_UPDATE_IF_NOEXIST,
NULL);
if (ret != 0)
- AF_XDP_LOG(ERR, "bpf_xdp_detach failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_xdp_detach failed");
return ret;
}
@@ -971,14 +971,14 @@ remove_xdp_program(struct pmd_internals *internals)
ret = bpf_get_link_xdp_id(internals->if_index, &curr_prog_id,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret != 0) {
- AF_XDP_LOG(ERR, "bpf_get_link_xdp_id failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_get_link_xdp_id failed");
return ret;
}
ret = bpf_set_link_xdp_fd(internals->if_index, -1,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret != 0)
- AF_XDP_LOG(ERR, "bpf_set_link_xdp_fd failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_set_link_xdp_fd failed");
return ret;
}
@@ -1013,7 +1013,7 @@ eth_dev_close(struct rte_eth_dev *dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
goto out;
- AF_XDP_LOG(INFO, "Closing AF_XDP ethdev on numa socket %u\n",
+ AF_XDP_LOG_LINE(INFO, "Closing AF_XDP ethdev on numa socket %u",
rte_socket_id());
for (i = 0; i < internals->queue_cnt; i++) {
@@ -1038,7 +1038,7 @@ eth_dev_close(struct rte_eth_dev *dev)
dev->data->mac_addrs = NULL;
if (remove_xdp_program(internals) != 0)
- AF_XDP_LOG(ERR, "Error while removing XDP program.\n");
+ AF_XDP_LOG_LINE(ERR, "Error while removing XDP program.");
if (internals->shared_umem) {
struct internal_list *list;
@@ -1076,7 +1076,7 @@ ctx_exists(struct pkt_rx_queue *rxq, const char *ifname,
if (rxq->xsk_queue_idx == list_rxq->xsk_queue_idx &&
!strncmp(ifname, list_ifname, IFNAMSIZ)) {
- AF_XDP_LOG(ERR, "ctx %s,%i already exists, cannot share umem\n",
+ AF_XDP_LOG_LINE(ERR, "ctx %s,%i already exists, cannot share umem",
ifname, rxq->xsk_queue_idx);
exists = true;
}
@@ -1149,7 +1149,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
if (umem != NULL &&
rte_atomic_load_explicit(&umem->refcnt, rte_memory_order_acquire) <
umem->max_xsks) {
- AF_XDP_LOG(INFO, "%s,qid%i sharing UMEM\n",
+ AF_XDP_LOG_LINE(INFO, "%s,qid%i sharing UMEM",
internals->if_name, rxq->xsk_queue_idx);
rte_atomic_fetch_add_explicit(&umem->refcnt, 1, rte_memory_order_acquire);
}
@@ -1167,18 +1167,18 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0,
rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate umem info");
return NULL;
}
umem->mb_pool = mb_pool;
ret = rte_mempool_get_mem_range(mb_pool, &range);
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed(%d) to get range from mempool\n", ret);
+ AF_XDP_LOG_LINE(ERR, "Failed(%d) to get range from mempool", ret);
goto err;
}
if (!range.is_contiguous) {
- AF_XDP_LOG(ERR, "Can't mapped to umem as mempool is not contiguous\n");
+ AF_XDP_LOG_LINE(ERR, "Can't mapped to umem as mempool is not contiguous");
goto err;
}
/*
@@ -1190,7 +1190,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
ret = xsk_umem__create(&umem->umem, aligned_addr, umem_size,
&rxq->fq, &rxq->cq, &usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem [%d]: [%s]\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to create umem [%d]: [%s]",
errno, strerror(errno));
goto err;
}
@@ -1199,7 +1199,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
if (internals->shared_umem) {
umem->max_xsks = mb_pool->populated_size /
ETH_AF_XDP_NUM_BUFFERS;
- AF_XDP_LOG(INFO, "Max xsks for UMEM %s: %u\n",
+ AF_XDP_LOG_LINE(INFO, "Max xsks for UMEM %s: %u",
mb_pool->name, umem->max_xsks);
}
@@ -1231,7 +1231,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate umem info");
return NULL;
}
@@ -1242,7 +1242,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
rte_socket_id(),
0x0);
if (umem->buf_ring == NULL) {
- AF_XDP_LOG(ERR, "Failed to create rte_ring\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create rte_ring");
goto err;
}
@@ -1257,7 +1257,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
rte_socket_id(), RTE_MEMZONE_IOVA_CONTIG,
getpagesize());
if (mz == NULL) {
- AF_XDP_LOG(ERR, "Failed to reserve memzone for af_xdp umem.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve memzone for af_xdp umem.");
goto err;
}
umem->mz = mz;
@@ -1268,7 +1268,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
&usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create umem");
goto err;
}
@@ -1285,11 +1285,11 @@ get_pinned_map(const char *dp_path, int *map_fd)
{
*map_fd = bpf_obj_get(dp_path);
if (!*map_fd) {
- AF_XDP_LOG(ERR, "Failed to find xsks_map in %s\n", dp_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to find xsks_map in %s", dp_path);
return -1;
}
- AF_XDP_LOG(INFO, "Successfully retrieved map %s with fd %d\n",
+ AF_XDP_LOG_LINE(INFO, "Successfully retrieved map %s with fd %d",
dp_path, *map_fd);
return 0;
@@ -1303,7 +1303,7 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
prog_fd = load_program(prog_path, &obj);
if (prog_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to load program %s\n", prog_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to load program %s", prog_path);
return -1;
}
@@ -1313,7 +1313,7 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
*/
*map = bpf_object__find_map_by_name(obj, "xsks_map");
if (!*map) {
- AF_XDP_LOG(ERR, "Failed to find xsks_map in %s\n", prog_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to find xsks_map in %s", prog_path);
return -1;
}
@@ -1321,12 +1321,12 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
ret = link_xdp_prog_with_dev(if_index, prog_fd,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to set prog fd %d on interface\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to set prog fd %d on interface",
prog_fd);
return -1;
}
- AF_XDP_LOG(INFO, "Successfully loaded XDP program %s with fd %d\n",
+ AF_XDP_LOG_LINE(INFO, "Successfully loaded XDP program %s with fd %d",
prog_path, prog_fd);
return 0;
@@ -1343,7 +1343,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_PREFER_BUSY_POLL,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_PREFER_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_PREFER_BUSY_POLL");
goto err_prefer;
}
@@ -1351,7 +1351,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL, (void *)&sock_opt,
sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_BUSY_POLL");
goto err_timeout;
}
@@ -1359,9 +1359,9 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL_BUDGET,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_BUSY_POLL_BUDGET\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_BUSY_POLL_BUDGET");
} else {
- AF_XDP_LOG(INFO, "Busy polling budget set to: %u\n",
+ AF_XDP_LOG_LINE(INFO, "Busy polling budget set to: %u",
rxq->busy_budget);
return 0;
}
@@ -1373,7 +1373,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL, (void *)&sock_opt,
sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed to unset SO_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to unset SO_BUSY_POLL");
return -1;
}
@@ -1382,7 +1382,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_PREFER_BUSY_POLL,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed to unset SO_PREFER_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to unset SO_PREFER_BUSY_POLL");
return -1;
}
@@ -1398,7 +1398,7 @@ init_uds_sock(struct sockaddr_un *server, const char *dp_path)
sock = socket(AF_UNIX, SOCK_SEQPACKET, 0);
if (sock < 0) {
- AF_XDP_LOG(ERR, "Failed to opening stream socket\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to opening stream socket");
return -1;
}
@@ -1407,7 +1407,7 @@ init_uds_sock(struct sockaddr_un *server, const char *dp_path)
if (connect(sock, (struct sockaddr *)server, sizeof(struct sockaddr_un)) < 0) {
close(sock);
- AF_XDP_LOG(ERR, "Error connecting stream socket errno = [%d]: [%s]\n",
+ AF_XDP_LOG_LINE(ERR, "Error connecting stream socket errno = [%d]: [%s]",
errno, strerror(errno));
return -1;
}
@@ -1492,7 +1492,7 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)
return 0;
if (msglen < 0) {
- AF_XDP_LOG(ERR, "recvmsg failed, %s\n", strerror(errno));
+ AF_XDP_LOG_LINE(ERR, "recvmsg failed, %s", strerror(errno));
return -1;
}
@@ -1516,7 +1516,7 @@ make_request_dp(int sock, struct sockaddr_un *server, char *request,
{
int rval;
- AF_XDP_LOG(DEBUG, "Request: [%s]\n", request);
+ AF_XDP_LOG_LINE(DEBUG, "Request: [%s]", request);
/* if no file descriptor to send then directly write to socket.
* else use sendmsg() to send the file descriptor.
@@ -1527,16 +1527,16 @@ make_request_dp(int sock, struct sockaddr_un *server, char *request,
rval = send_msg(sock, request, req_fd, dp_path);
if (rval < 0) {
- AF_XDP_LOG(ERR, "Write error %s\n", strerror(errno));
+ AF_XDP_LOG_LINE(ERR, "Write error %s", strerror(errno));
return -1;
}
rval = read_msg(sock, response, server, out_fd);
if (rval <= 0) {
- AF_XDP_LOG(ERR, "Read error %d\n", rval);
+ AF_XDP_LOG_LINE(ERR, "Read error %d", rval);
return -1;
}
- AF_XDP_LOG(DEBUG, "Response: [%s]\n", request);
+ AF_XDP_LOG_LINE(DEBUG, "Response: [%s]", request);
return 0;
}
@@ -1569,21 +1569,21 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
snprintf(request, sizeof(request), "%s,%s", UDS_CONNECT_MSG, hostname);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
/* Expect /host_ok */
strlcpy(exp_resp, UDS_HOST_OK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
/* Request for "/version" */
strlcpy(request, UDS_VERSION_MSG, UDS_MAX_CMD_LEN);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
@@ -1591,12 +1591,12 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
snprintf(request, sizeof(request), "%s,%s", UDS_XSK_MAP_FD_MSG, if_name);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
if (out_fd < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
@@ -1605,7 +1605,7 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
/* Expect fd_ack with file descriptor */
strlcpy(exp_resp, UDS_FD_ACK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
@@ -1613,14 +1613,14 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
strlcpy(request, UDS_FIN_MSG, UDS_MAX_CMD_LEN);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
/* Connection close */
strlcpy(exp_resp, UDS_FIN_ACK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
close(sock);
@@ -1653,7 +1653,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
ret = rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size);
if (ret) {
- AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to get enough buffers for fq.");
goto out_umem;
}
#endif
@@ -1662,7 +1662,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
if (reserve_before) {
ret = reserve_fill_queue(rxq->umem, reserve_size, fq_bufs, &rxq->fq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve fill queue.");
goto out_umem;
}
}
@@ -1691,7 +1691,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
internals->if_index,
&internals->map);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to load custom XDP program %s\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to load custom XDP program %s",
internals->prog_path);
goto out_umem;
}
@@ -1710,7 +1710,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
&txq->tx, &cfg);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create xsk socket.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create xsk socket.");
goto out_umem;
}
@@ -1718,7 +1718,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
/* reserve fill queue of queues sharing UMEM */
ret = reserve_fill_queue(rxq->umem, reserve_size, fq_bufs, &rxq->fq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve fill queue.");
goto out_xsk;
}
}
@@ -1731,7 +1731,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
err = bpf_map_update_elem(bpf_map__fd(internals->map),
&rxq->xsk_queue_idx, &fd, 0);
if (err) {
- AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to insert xsk in map.");
goto out_xsk;
}
}
@@ -1743,28 +1743,28 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
/* get socket fd from AF_XDP Device Plugin */
map_fd = uds_get_xskmap_fd(internals->if_name, internals->dp_path);
if (map_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to receive xskmap fd from AF_XDP Device Plugin\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to receive xskmap fd from AF_XDP Device Plugin");
goto out_xsk;
}
} else {
/* get socket fd from AF_XDP plugin */
err = get_pinned_map(internals->dp_path, &map_fd);
if (err < 0 || map_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to retrieve pinned map fd\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to retrieve pinned map fd");
goto out_xsk;
}
}
err = update_xskmap(rxq->xsk, map_fd, rxq->xsk_queue_idx);
if (err) {
- AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to insert xsk in map.");
goto out_xsk;
}
} else if (rxq->busy_budget) {
ret = configure_preferred_busy_poll(rxq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed configure busy polling.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed configure busy polling.");
goto out_xsk;
}
}
@@ -1795,7 +1795,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
rxq = &internals->rx_queues[rx_queue_id];
- AF_XDP_LOG(INFO, "Set up rx queue, rx queue id: %d, xsk queue id: %d\n",
+ AF_XDP_LOG_LINE(INFO, "Set up rx queue, rx queue id: %d, xsk queue id: %d",
rx_queue_id, rxq->xsk_queue_idx);
#ifndef XDP_UMEM_UNALIGNED_CHUNK_FLAG
@@ -1807,7 +1807,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
data_size = ETH_AF_XDP_FRAME_SIZE;
if (data_size > buf_size) {
- AF_XDP_LOG(ERR, "%s: %d bytes will not fit in mbuf (%d bytes)\n",
+ AF_XDP_LOG_LINE(ERR, "%s: %d bytes will not fit in mbuf (%d bytes)",
dev->device->name, data_size, buf_size);
ret = -ENOMEM;
goto err;
@@ -1817,13 +1817,13 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
rxq->mb_pool = mb_pool;
if (xsk_configure(internals, rxq, nb_rx_desc)) {
- AF_XDP_LOG(ERR, "Failed to configure xdp socket\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to configure xdp socket");
ret = -EINVAL;
goto err;
}
if (!rxq->busy_budget)
- AF_XDP_LOG(DEBUG, "Preferred busy polling not enabled\n");
+ AF_XDP_LOG_LINE(DEBUG, "Preferred busy polling not enabled");
rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
rxq->fds[0].events = POLLIN;
@@ -1965,7 +1965,7 @@ parse_budget_arg(const char *key __rte_unused,
*i = strtol(value, &end, 10);
if (*i < 0 || *i > UINT16_MAX) {
- AF_XDP_LOG(ERR, "Invalid busy_budget %i, must be >= 0 and <= %u\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid busy_budget %i, must be >= 0 and <= %u",
*i, UINT16_MAX);
return -EINVAL;
}
@@ -1983,7 +1983,7 @@ parse_integer_arg(const char *key __rte_unused,
*i = strtol(value, &end, 10);
if (*i < 0) {
- AF_XDP_LOG(ERR, "Argument has to be positive.\n");
+ AF_XDP_LOG_LINE(ERR, "Argument has to be positive.");
return -EINVAL;
}
@@ -1998,7 +1998,7 @@ parse_name_arg(const char *key __rte_unused,
char *name = extra_args;
if (strnlen(value, IFNAMSIZ) > IFNAMSIZ - 1) {
- AF_XDP_LOG(ERR, "Invalid name %s, should be less than %u bytes.\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid name %s, should be less than %u bytes.",
value, IFNAMSIZ);
return -EINVAL;
}
@@ -2016,13 +2016,13 @@ parse_prog_arg(const char *key __rte_unused,
char *path = extra_args;
if (strnlen(value, PATH_MAX) == PATH_MAX) {
- AF_XDP_LOG(ERR, "Invalid path %s, should be less than %u bytes.\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid path %s, should be less than %u bytes.",
value, PATH_MAX);
return -EINVAL;
}
if (access(value, F_OK) != 0) {
- AF_XDP_LOG(ERR, "Error accessing %s: %s\n",
+ AF_XDP_LOG_LINE(ERR, "Error accessing %s: %s",
value, strerror(errno));
return -EINVAL;
}
@@ -2194,8 +2194,8 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
#ifndef ETH_AF_XDP_SHARED_UMEM
if (shared_umem) {
- AF_XDP_LOG(ERR, "Shared UMEM feature not available. "
- "Check kernel and libbpf version\n");
+ AF_XDP_LOG_LINE(ERR, "Shared UMEM feature not available. "
+ "Check kernel and libbpf version");
goto err_free_internals;
}
#endif
@@ -2207,13 +2207,13 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
if (xdp_get_channels_info(if_name, &internals->max_queue_cnt,
&internals->combined_queue_cnt)) {
- AF_XDP_LOG(ERR, "Failed to get channel info of interface: %s\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to get channel info of interface: %s",
if_name);
goto err_free_internals;
}
if (queue_cnt > internals->combined_queue_cnt) {
- AF_XDP_LOG(ERR, "Specified queue count %d is larger than combined queue count %d.\n",
+ AF_XDP_LOG_LINE(ERR, "Specified queue count %d is larger than combined queue count %d.",
queue_cnt, internals->combined_queue_cnt);
goto err_free_internals;
}
@@ -2222,7 +2222,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
sizeof(struct pkt_rx_queue) * queue_cnt,
0, numa_node);
if (internals->rx_queues == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate memory for rx queues.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate memory for rx queues.");
goto err_free_internals;
}
@@ -2230,7 +2230,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
sizeof(struct pkt_tx_queue) * queue_cnt,
0, numa_node);
if (internals->tx_queues == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate memory for tx queues.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate memory for tx queues.");
goto err_free_rx;
}
for (i = 0; i < queue_cnt; i++) {
@@ -2250,7 +2250,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
rte_zmalloc_socket(name, sizeof(struct pmd_process_private),
RTE_CACHE_LINE_SIZE, numa_node);
if (process_private == NULL) {
- AF_XDP_LOG(ERR, "Failed to alloc memory for process private\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to alloc memory for process private");
goto err_free_tx;
}
@@ -2275,7 +2275,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
process_private->rxq_xsk_fds[i] = -1;
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
- AF_XDP_LOG(INFO, "Zero copy between umem and mbuf enabled.\n");
+ AF_XDP_LOG_LINE(INFO, "Zero copy between umem and mbuf enabled.");
#endif
return eth_dev;
@@ -2310,17 +2310,17 @@ afxdp_mp_request_fds(const char *name, struct rte_eth_dev *dev)
request.len_param = sizeof(*request_param);
/* Send the request and receive the reply */
- AF_XDP_LOG(DEBUG, "Sending multi-process IPC request for %s\n", name);
+ AF_XDP_LOG_LINE(DEBUG, "Sending multi-process IPC request for %s", name);
ret = rte_mp_request_sync(&request, &replies, &timeout);
if (ret < 0 || replies.nb_received != 1) {
- AF_XDP_LOG(ERR, "Failed to request fds from primary: %d\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to request fds from primary: %d",
rte_errno);
return -1;
}
reply = replies.msgs;
- AF_XDP_LOG(DEBUG, "Received multi-process IPC reply for %s\n", name);
+ AF_XDP_LOG_LINE(DEBUG, "Received multi-process IPC reply for %s", name);
if (dev->data->nb_rx_queues != reply->num_fds) {
- AF_XDP_LOG(ERR, "Incorrect number of fds received: %d != %d\n",
+ AF_XDP_LOG_LINE(ERR, "Incorrect number of fds received: %d != %d",
reply->num_fds, dev->data->nb_rx_queues);
return -EINVAL;
}
@@ -2346,13 +2346,13 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
const char *request_name = request_param->port_name;
int i;
- AF_XDP_LOG(DEBUG, "Received multi-process IPC request for %s\n",
+ AF_XDP_LOG_LINE(DEBUG, "Received multi-process IPC request for %s",
request_name);
/* Find the requested port */
dev = rte_eth_dev_get_by_name(request_name);
if (!dev) {
- AF_XDP_LOG(ERR, "Failed to get port id for %s\n", request_name);
+ AF_XDP_LOG_LINE(ERR, "Failed to get port id for %s", request_name);
return -1;
}
process_private = dev->process_private;
@@ -2360,7 +2360,7 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
/* Populate the reply with the xsk fd for each queue */
reply.num_fds = 0;
if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) {
- AF_XDP_LOG(ERR, "Number of rx queues (%d) exceeds max number of fds (%d)\n",
+ AF_XDP_LOG_LINE(ERR, "Number of rx queues (%d) exceeds max number of fds (%d)",
dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
return -EINVAL;
}
@@ -2373,10 +2373,10 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
strlcpy(reply_param->port_name, request_name,
sizeof(reply_param->port_name));
reply.len_param = sizeof(*reply_param);
- AF_XDP_LOG(DEBUG, "Sending multi-process IPC reply for %s\n",
+ AF_XDP_LOG_LINE(DEBUG, "Sending multi-process IPC reply for %s",
reply_param->port_name);
if (rte_mp_reply(&reply, peer) < 0) {
- AF_XDP_LOG(ERR, "Failed to reply to multi-process IPC request\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reply to multi-process IPC request");
return -1;
}
return 0;
@@ -2399,12 +2399,12 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev = NULL;
const char *name = rte_vdev_device_name(dev);
- AF_XDP_LOG(INFO, "Initializing pmd_af_xdp for %s\n", name);
+ AF_XDP_LOG_LINE(INFO, "Initializing pmd_af_xdp for %s", name);
if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
eth_dev = rte_eth_dev_attach_secondary(name);
if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
+ AF_XDP_LOG_LINE(ERR, "Failed to probe %s", name);
return -EINVAL;
}
eth_dev->dev_ops = &ops;
@@ -2417,8 +2417,8 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
RTE_CACHE_LINE_SIZE,
eth_dev->device->numa_node);
if (eth_dev->process_private == NULL) {
- AF_XDP_LOG(ERR,
- "Failed to alloc memory for process private\n");
+ AF_XDP_LOG_LINE(ERR,
+ "Failed to alloc memory for process private");
return -ENOMEM;
}
@@ -2432,7 +2432,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
if (kvlist == NULL) {
- AF_XDP_LOG(ERR, "Invalid kvargs key\n");
+ AF_XDP_LOG_LINE(ERR, "Invalid kvargs key");
return -EINVAL;
}
@@ -2440,25 +2440,25 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
&xsk_queue_cnt, &shared_umem, prog_path,
&busy_budget, &force_copy, &use_cni, &use_pinned_map,
dp_path) < 0) {
- AF_XDP_LOG(ERR, "Invalid kvargs value\n");
+ AF_XDP_LOG_LINE(ERR, "Invalid kvargs value");
return -EINVAL;
}
if (use_cni && use_pinned_map) {
- AF_XDP_LOG(ERR, "When '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG);
return -EINVAL;
}
if ((use_cni || use_pinned_map) && busy_budget > 0) {
- AF_XDP_LOG(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG,
ETH_AF_XDP_BUDGET_ARG);
return -EINVAL;
}
if ((use_cni || use_pinned_map) && strnlen(prog_path, PATH_MAX)) {
- AF_XDP_LOG(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG,
ETH_AF_XDP_PROG_ARG);
return -EINVAL;
@@ -2466,25 +2466,25 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
if (use_cni && !strnlen(dp_path, PATH_MAX)) {
snprintf(dp_path, sizeof(dp_path), "%s/%s/%s", DP_BASE_PATH, if_name, DP_UDS_SOCK);
- AF_XDP_LOG(INFO, "'%s' parameter not provided, setting value to '%s'\n",
+ AF_XDP_LOG_LINE(INFO, "'%s' parameter not provided, setting value to '%s'",
ETH_AF_XDP_DP_PATH_ARG, dp_path);
}
if (use_pinned_map && !strnlen(dp_path, PATH_MAX)) {
snprintf(dp_path, sizeof(dp_path), "%s/%s/%s", DP_BASE_PATH, if_name, DP_XSK_MAP);
- AF_XDP_LOG(INFO, "'%s' parameter not provided, setting value to '%s'\n",
+ AF_XDP_LOG_LINE(INFO, "'%s' parameter not provided, setting value to '%s'",
ETH_AF_XDP_DP_PATH_ARG, dp_path);
}
if ((!use_cni && !use_pinned_map) && strnlen(dp_path, PATH_MAX)) {
- AF_XDP_LOG(ERR, "'%s' parameter is set, but '%s' or '%s' were not enabled\n",
+ AF_XDP_LOG_LINE(ERR, "'%s' parameter is set, but '%s' or '%s' were not enabled",
ETH_AF_XDP_DP_PATH_ARG, ETH_AF_XDP_USE_CNI_ARG,
ETH_AF_XDP_USE_PINNED_MAP_ARG);
return -EINVAL;
}
if (strlen(if_name) == 0) {
- AF_XDP_LOG(ERR, "Network interface must be specified\n");
+ AF_XDP_LOG_LINE(ERR, "Network interface must be specified");
return -EINVAL;
}
@@ -2509,7 +2509,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
busy_budget, force_copy, use_cni, use_pinned_map,
dp_path);
if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to init internals\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to init internals");
return -1;
}
@@ -2517,7 +2517,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
if (!afxdp_dev_count) {
ret = rte_mp_action_register(ETH_AF_XDP_MP_KEY, afxdp_mp_send_fds);
if (ret < 0 && rte_errno != ENOTSUP) {
- AF_XDP_LOG(ERR, "%s: Failed to register multi-process IPC callback: %s\n",
+ AF_XDP_LOG_LINE(ERR, "%s: Failed to register multi-process IPC callback: %s",
name, strerror(rte_errno));
return -1;
}
@@ -2534,7 +2534,7 @@ rte_pmd_af_xdp_remove(struct rte_vdev_device *dev)
{
struct rte_eth_dev *eth_dev = NULL;
- AF_XDP_LOG(INFO, "Removing AF_XDP ethdev on numa socket %u\n",
+ AF_XDP_LOG_LINE(INFO, "Removing AF_XDP ethdev on numa socket %u",
rte_socket_id());
if (dev == NULL)
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 6733462c86..ed44c1645d 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -240,18 +240,18 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
unsigned int count;
int ret;
- PMD_DRV_LOG(DEBUG, "Sending request %u to host\n", request->req_id);
+ PMD_DRV_LOG_LINE(DEBUG, "Sending request %u to host", request->req_id);
request->result = -ENOTSUP;
/* Discard any stale responses before starting a new request */
while (avp_fifo_get(avp->resp_q, (void **)&resp_addr, 1))
- PMD_DRV_LOG(DEBUG, "Discarding stale response\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Discarding stale response");
rte_memcpy(avp->sync_addr, request, sizeof(*request));
count = avp_fifo_put(avp->req_q, &avp->host_sync_addr, 1);
if (count < 1) {
- PMD_DRV_LOG(ERR, "Cannot send request %u to host\n",
+ PMD_DRV_LOG_LINE(ERR, "Cannot send request %u to host",
request->req_id);
ret = -EBUSY;
goto done;
@@ -268,7 +268,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
}
if (retry == 0) {
- PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
+ PMD_DRV_LOG_LINE(ERR, "Timeout while waiting for a response for %u",
request->req_id);
ret = -ETIME;
goto done;
@@ -278,7 +278,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
/* retrieve the response */
count = avp_fifo_get(avp->resp_q, (void **)&resp_addr, 1);
if ((count != 1) || (resp_addr != avp->host_sync_addr)) {
- PMD_DRV_LOG(ERR, "Invalid response from host, count=%u resp=%p host_sync_addr=%p\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid response from host, count=%u resp=%p host_sync_addr=%p",
count, resp_addr, avp->host_sync_addr);
ret = -ENODATA;
goto done;
@@ -288,7 +288,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
rte_memcpy(request, avp->sync_addr, sizeof(*request));
ret = 0;
- PMD_DRV_LOG(DEBUG, "Result %d received for request %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Result %d received for request %u",
request->result, request->req_id);
done:
@@ -383,7 +383,7 @@ avp_dev_translate_address(struct rte_eth_dev *eth_dev,
offset += (host_phys_addr - map->phys_addr);
addr = RTE_PTR_ADD(addr, (uintptr_t)offset);
- PMD_DRV_LOG(DEBUG, "Translating host physical 0x%" PRIx64 " to guest virtual 0x%p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Translating host physical 0x%" PRIx64 " to guest virtual 0x%p",
host_phys_addr, addr);
return addr;
@@ -425,7 +425,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
if ((resource->phys_addr == 0) || (resource->len == 0))
continue;
- PMD_DRV_LOG(DEBUG, "resource[%u]: phys=0x%" PRIx64 " len=%" PRIu64 " addr=%p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "resource[%u]: phys=0x%" PRIx64 " len=%" PRIu64 " addr=%p",
i, resource->phys_addr,
resource->len, resource->addr);
@@ -434,7 +434,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
memmap = (struct rte_avp_memmap_info *)resource->addr;
if ((memmap->magic != RTE_AVP_MEMMAP_MAGIC) ||
(memmap->version != RTE_AVP_MEMMAP_VERSION)) {
- PMD_DRV_LOG(ERR, "Invalid memmap magic 0x%08x and version %u\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid memmap magic 0x%08x and version %u",
memmap->magic, memmap->version);
return -EINVAL;
}
@@ -444,7 +444,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
info = (struct rte_avp_device_info *)resource->addr;
if ((info->magic != RTE_AVP_DEVICE_MAGIC) ||
avp_dev_version_check(info->version)) {
- PMD_DRV_LOG(ERR, "Invalid device info magic 0x%08x or version 0x%08x > 0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid device info magic 0x%08x or version 0x%08x > 0x%08x",
info->magic, info->version,
AVP_DPDK_DRIVER_VERSION);
return -EINVAL;
@@ -454,7 +454,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
case RTE_AVP_PCI_MEMORY_BAR:
case RTE_AVP_PCI_MMIO_BAR:
if (resource->addr == NULL) {
- PMD_DRV_LOG(ERR, "Missing address space for BAR%u\n",
+ PMD_DRV_LOG_LINE(ERR, "Missing address space for BAR%u",
i);
return -EINVAL;
}
@@ -476,13 +476,13 @@ avp_dev_detach(struct rte_eth_dev *eth_dev)
struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
int ret;
- PMD_DRV_LOG(NOTICE, "Detaching port %u from AVP device 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Detaching port %u from AVP device 0x%" PRIx64 "",
eth_dev->data->port_id, avp->device_id);
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(NOTICE, "port %u already detached\n",
+ PMD_DRV_LOG_LINE(NOTICE, "port %u already detached",
eth_dev->data->port_id);
ret = 0;
goto unlock;
@@ -491,7 +491,7 @@ avp_dev_detach(struct rte_eth_dev *eth_dev)
/* shutdown the device first so the host stops sending us packets. */
ret = avp_dev_ctrl_shutdown(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to send/recv shutdown to host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to send/recv shutdown to host, ret=%d",
ret);
avp->flags &= ~AVP_F_DETACHED;
goto unlock;
@@ -540,7 +540,7 @@ _avp_set_rx_queue_mappings(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
rxq->queue_limit = rxq->queue_base + queue_count - 1;
}
- PMD_DRV_LOG(DEBUG, "rxq %u at %p base %u limit %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "rxq %u at %p base %u limit %u",
rx_queue_id, rxq, rxq->queue_base, rxq->queue_limit);
rxq->queue_id = rxq->queue_base;
@@ -574,7 +574,7 @@ _avp_set_queue_counts(struct rte_eth_dev *eth_dev)
avp->num_rx_queues = RTE_MAX(host_info->min_rx_queues,
eth_dev->data->nb_rx_queues);
- PMD_DRV_LOG(DEBUG, "Requesting %u Tx and %u Rx queues from host\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Requesting %u Tx and %u Rx queues from host",
avp->num_tx_queues, avp->num_rx_queues);
}
@@ -586,13 +586,13 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
unsigned int i;
int ret;
- PMD_DRV_LOG(NOTICE, "Attaching port %u to AVP device 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Attaching port %u to AVP device 0x%" PRIx64 "",
eth_dev->data->port_id, avp->device_id);
rte_spinlock_lock(&avp->lock);
if (!(avp->flags & AVP_F_DETACHED)) {
- PMD_DRV_LOG(NOTICE, "port %u already attached\n",
+ PMD_DRV_LOG_LINE(NOTICE, "port %u already attached",
eth_dev->data->port_id);
ret = 0;
goto unlock;
@@ -611,7 +611,7 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
*/
ret = avp_dev_create(RTE_ETH_DEV_TO_PCI(eth_dev), eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to re-create AVP device, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-create AVP device, ret=%d",
ret);
goto unlock;
}
@@ -643,7 +643,7 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
ret = avp_dev_ctrl_set_config(eth_dev, &config);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Config request failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Config request failed by host, ret=%d",
ret);
goto unlock;
}
@@ -692,7 +692,7 @@ avp_dev_interrupt_handler(void *data)
ret = avp_dev_attach(eth_dev);
break;
default:
- PMD_DRV_LOG(ERR, "unexpected migration status, status=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "unexpected migration status, status=%u",
value);
ret = -EINVAL;
}
@@ -703,17 +703,17 @@ avp_dev_interrupt_handler(void *data)
RTE_PTR_ADD(registers,
RTE_AVP_MIGRATION_ACK_OFFSET));
- PMD_DRV_LOG(NOTICE, "AVP migration interrupt handled\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP migration interrupt handled");
}
if (status & ~RTE_AVP_MIGRATION_INTERRUPT_MASK)
- PMD_DRV_LOG(WARNING, "AVP unexpected interrupt, status=0x%08x\n",
+ PMD_DRV_LOG_LINE(WARNING, "AVP unexpected interrupt, status=0x%08x",
status);
/* re-enable UIO interrupt handling */
ret = rte_intr_ack(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to re-enable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-enable UIO interrupts, ret=%d",
ret);
/* continue */
}
@@ -732,7 +732,7 @@ avp_dev_enable_interrupts(struct rte_eth_dev *eth_dev)
/* enable UIO interrupt handling */
ret = rte_intr_enable(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to enable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to enable UIO interrupts, ret=%d",
ret);
return ret;
}
@@ -761,7 +761,7 @@ avp_dev_disable_interrupts(struct rte_eth_dev *eth_dev)
/* enable UIO interrupt handling */
ret = rte_intr_disable(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to disable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to disable UIO interrupts, ret=%d",
ret);
return ret;
}
@@ -780,7 +780,7 @@ avp_dev_setup_interrupts(struct rte_eth_dev *eth_dev)
avp_dev_interrupt_handler,
(void *)eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to register UIO interrupt callback, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to register UIO interrupt callback, ret=%d",
ret);
return ret;
}
@@ -826,7 +826,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
resource = &pci_dev->mem_resource[RTE_AVP_PCI_DEVICE_BAR];
if (resource->addr == NULL) {
- PMD_DRV_LOG(ERR, "BAR%u is not mapped\n",
+ PMD_DRV_LOG_LINE(ERR, "BAR%u is not mapped",
RTE_AVP_PCI_DEVICE_BAR);
return -EFAULT;
}
@@ -834,22 +834,22 @@ avp_dev_create(struct rte_pci_device *pci_dev,
if ((host_info->magic != RTE_AVP_DEVICE_MAGIC) ||
avp_dev_version_check(host_info->version)) {
- PMD_DRV_LOG(ERR, "Invalid AVP PCI device, magic 0x%08x version 0x%08x > 0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid AVP PCI device, magic 0x%08x version 0x%08x > 0x%08x",
host_info->magic, host_info->version,
AVP_DPDK_DRIVER_VERSION);
return -EINVAL;
}
- PMD_DRV_LOG(DEBUG, "AVP host device is v%u.%u.%u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host device is v%u.%u.%u",
RTE_AVP_GET_RELEASE_VERSION(host_info->version),
RTE_AVP_GET_MAJOR_VERSION(host_info->version),
RTE_AVP_GET_MINOR_VERSION(host_info->version));
- PMD_DRV_LOG(DEBUG, "AVP host supports %u to %u TX queue(s)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports %u to %u TX queue(s)",
host_info->min_tx_queues, host_info->max_tx_queues);
- PMD_DRV_LOG(DEBUG, "AVP host supports %u to %u RX queue(s)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports %u to %u RX queue(s)",
host_info->min_rx_queues, host_info->max_rx_queues);
- PMD_DRV_LOG(DEBUG, "AVP host supports features 0x%08x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports features 0x%08x",
host_info->features);
if (avp->magic != AVP_ETHDEV_MAGIC) {
@@ -876,7 +876,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
/* TODO... requires validation of host values */
if ((host_info->features & avp->features) != avp->features) {
- PMD_DRV_LOG(ERR, "AVP host features mismatched; 0x%08x, host=0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "AVP host features mismatched; 0x%08x, host=0x%08x",
avp->features, host_info->features);
/* this should not be possible; continue for now */
}
@@ -886,9 +886,9 @@ avp_dev_create(struct rte_pci_device *pci_dev,
avp->device_id = host_info->device_id;
/* translate incoming host addresses to guest address space */
- PMD_DRV_LOG(DEBUG, "AVP first host tx queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host tx queue at 0x%" PRIx64 "",
host_info->tx_phys);
- PMD_DRV_LOG(DEBUG, "AVP first host alloc queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host alloc queue at 0x%" PRIx64 "",
host_info->alloc_phys);
for (i = 0; i < avp->max_tx_queues; i++) {
avp->tx_q[i] = avp_dev_translate_address(eth_dev,
@@ -898,9 +898,9 @@ avp_dev_create(struct rte_pci_device *pci_dev,
host_info->alloc_phys + (i * host_info->alloc_size));
}
- PMD_DRV_LOG(DEBUG, "AVP first host rx queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host rx queue at 0x%" PRIx64 "",
host_info->rx_phys);
- PMD_DRV_LOG(DEBUG, "AVP first host free queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host free queue at 0x%" PRIx64 "",
host_info->free_phys);
for (i = 0; i < avp->max_rx_queues; i++) {
avp->rx_q[i] = avp_dev_translate_address(eth_dev,
@@ -909,13 +909,13 @@ avp_dev_create(struct rte_pci_device *pci_dev,
host_info->free_phys + (i * host_info->free_size));
}
- PMD_DRV_LOG(DEBUG, "AVP host request queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host request queue at 0x%" PRIx64 "",
host_info->req_phys);
- PMD_DRV_LOG(DEBUG, "AVP host response queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host response queue at 0x%" PRIx64 "",
host_info->resp_phys);
- PMD_DRV_LOG(DEBUG, "AVP host sync address at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host sync address at 0x%" PRIx64 "",
host_info->sync_phys);
- PMD_DRV_LOG(DEBUG, "AVP host mbuf address at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host mbuf address at 0x%" PRIx64 "",
host_info->mbuf_phys);
avp->req_q = avp_dev_translate_address(eth_dev, host_info->req_phys);
avp->resp_q = avp_dev_translate_address(eth_dev, host_info->resp_phys);
@@ -935,7 +935,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
* store the maximum packet length that is supported by the host.
*/
avp->max_rx_pkt_len = host_info->max_rx_pkt_len;
- PMD_DRV_LOG(DEBUG, "AVP host max receive packet length is %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host max receive packet length is %u",
host_info->max_rx_pkt_len);
return 0;
@@ -966,7 +966,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
* be valid.
*/
if (eth_dev->data->scattered_rx) {
- PMD_DRV_LOG(NOTICE, "AVP device configured for chained mbufs\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP device configured for chained mbufs");
eth_dev->rx_pkt_burst = avp_recv_scattered_pkts;
eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts;
}
@@ -978,14 +978,14 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
/* Check current migration status */
if (avp_dev_migration_pending(eth_dev)) {
- PMD_DRV_LOG(ERR, "VM live migration operation in progress\n");
+ PMD_DRV_LOG_LINE(ERR, "VM live migration operation in progress");
return -EBUSY;
}
/* Check BAR resources */
ret = avp_dev_check_regions(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to validate BAR resources, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to validate BAR resources, ret=%d",
ret);
return ret;
}
@@ -993,14 +993,14 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
/* Enable interrupts */
ret = avp_dev_setup_interrupts(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to enable interrupts, ret=%d\n", ret);
+ PMD_DRV_LOG_LINE(ERR, "Failed to enable interrupts, ret=%d", ret);
return ret;
}
/* Handle each subtype */
ret = avp_dev_create(pci_dev, eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to create device, ret=%d\n", ret);
+ PMD_DRV_LOG_LINE(ERR, "Failed to create device, ret=%d", ret);
return ret;
}
@@ -1008,7 +1008,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
eth_dev->data->mac_addrs = rte_zmalloc("avp_ethdev",
RTE_ETHER_ADDR_LEN, 0);
if (eth_dev->data->mac_addrs == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate %d bytes needed to store MAC addresses\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate %d bytes needed to store MAC addresses",
RTE_ETHER_ADDR_LEN);
return -ENOMEM;
}
@@ -1101,7 +1101,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
struct avp_queue *rxq;
if (rx_queue_id >= eth_dev->data->nb_rx_queues) {
- PMD_DRV_LOG(ERR, "RX queue id is out of range: rx_queue_id=%u, nb_rx_queues=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX queue id is out of range: rx_queue_id=%u, nb_rx_queues=%u",
rx_queue_id, eth_dev->data->nb_rx_queues);
return -EINVAL;
}
@@ -1116,14 +1116,14 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
if (avp_dev_enable_scattered(eth_dev, avp)) {
if (!eth_dev->data->scattered_rx) {
- PMD_DRV_LOG(NOTICE, "AVP device configured for chained mbufs\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP device configured for chained mbufs");
eth_dev->data->scattered_rx = 1;
eth_dev->rx_pkt_burst = avp_recv_scattered_pkts;
eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts;
}
}
- PMD_DRV_LOG(DEBUG, "AVP max_rx_pkt_len=(%u,%u) mbuf_size=(%u,%u)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP max_rx_pkt_len=(%u,%u) mbuf_size=(%u,%u)",
avp->max_rx_pkt_len,
eth_dev->data->mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN,
avp->host_mbuf_size,
@@ -1133,7 +1133,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
rxq = rte_zmalloc_socket("ethdev RX queue", sizeof(struct avp_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (rxq == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate new Rx queue object\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate new Rx queue object");
return -ENOMEM;
}
@@ -1145,7 +1145,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
/* setup the queue receive mapping for the current queue. */
_avp_set_rx_queue_mappings(eth_dev, rx_queue_id);
- PMD_DRV_LOG(DEBUG, "Rx queue %u setup at %p\n", rx_queue_id, rxq);
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue %u setup at %p", rx_queue_id, rxq);
(void)nb_rx_desc;
(void)rx_conf;
@@ -1163,7 +1163,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
struct avp_queue *txq;
if (tx_queue_id >= eth_dev->data->nb_tx_queues) {
- PMD_DRV_LOG(ERR, "TX queue id is out of range: tx_queue_id=%u, nb_tx_queues=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "TX queue id is out of range: tx_queue_id=%u, nb_tx_queues=%u",
tx_queue_id, eth_dev->data->nb_tx_queues);
return -EINVAL;
}
@@ -1172,7 +1172,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct avp_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (txq == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate new Tx queue object\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate new Tx queue object");
return -ENOMEM;
}
@@ -1186,7 +1186,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
txq->dev_data = eth_dev->data;
eth_dev->data->tx_queues[tx_queue_id] = (void *)txq;
- PMD_DRV_LOG(DEBUG, "Tx queue %u setup at %p\n", tx_queue_id, txq);
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue %u setup at %p", tx_queue_id, txq);
(void)nb_tx_desc;
(void)tx_conf;
@@ -1428,7 +1428,7 @@ avp_recv_scattered_pkts(void *rx_queue,
/* retrieve pending packets */
n = avp_fifo_get(rx_q, (void **)&avp_bufs, count);
- PMD_RX_LOG(DEBUG, "Receiving %u packets from Rx queue at %p\n",
+ PMD_RX_LOG_LINE(DEBUG, "Receiving %u packets from Rx queue at %p",
count, rx_q);
count = 0;
@@ -1525,7 +1525,7 @@ avp_recv_pkts(void *rx_queue,
/* retrieve pending packets */
n = avp_fifo_get(rx_q, (void **)&avp_bufs, count);
- PMD_RX_LOG(DEBUG, "Receiving %u packets from Rx queue at %p\n",
+ PMD_RX_LOG_LINE(DEBUG, "Receiving %u packets from Rx queue at %p",
count, rx_q);
count = 0;
@@ -1761,14 +1761,13 @@ avp_xmit_scattered_pkts(void *tx_queue,
return 0;
}
- PMD_TX_LOG(DEBUG, "Sending %u packets on Tx queue at %p\n",
+ PMD_TX_LOG_LINE(DEBUG, "Sending %u packets on Tx queue at %p",
nb_pkts, tx_q);
/* retrieve sufficient send buffers */
n = avp_fifo_get(alloc_q, (void **)&avp_bufs, segments);
if (unlikely(n != segments)) {
- PMD_TX_LOG(DEBUG, "Failed to allocate buffers "
- "n=%u, segments=%u, orig=%u\n",
+ PMD_TX_LOG_LINE(DEBUG, "Failed to allocate buffers n=%u, segments=%u, orig=%u",
n, segments, orig_nb_pkts);
txq->errors += orig_nb_pkts;
return 0;
@@ -1856,7 +1855,7 @@ avp_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
return 0;
}
- PMD_TX_LOG(DEBUG, "Sending %u packets on Tx queue at %p\n",
+ PMD_TX_LOG_LINE(DEBUG, "Sending %u packets on Tx queue at %p",
count, tx_q);
/* retrieve sufficient send buffers */
@@ -1987,7 +1986,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2003,7 +2002,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
RTE_ETH_VLAN_EXTEND_MASK);
ret = avp_vlan_offload_set(eth_dev, mask);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "VLAN offload set failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "VLAN offload set failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2019,7 +2018,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
ret = avp_dev_ctrl_set_config(eth_dev, &config);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Config request failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Config request failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2041,7 +2040,7 @@ avp_dev_start(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2049,7 +2048,7 @@ avp_dev_start(struct rte_eth_dev *eth_dev)
/* update link state */
ret = avp_dev_ctrl_set_link_state(eth_dev, 1);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Link state change failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Link state change failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2078,7 +2077,7 @@ avp_dev_stop(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2089,7 +2088,7 @@ avp_dev_stop(struct rte_eth_dev *eth_dev)
/* update link state */
ret = avp_dev_ctrl_set_link_state(eth_dev, 0);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Link state change failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Link state change failed by host, ret=%d",
ret);
}
@@ -2114,7 +2113,7 @@ avp_dev_close(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
goto unlock;
}
@@ -2124,14 +2123,14 @@ avp_dev_close(struct rte_eth_dev *eth_dev)
ret = avp_dev_disable_interrupts(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to disable interrupts\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to disable interrupts");
/* continue */
}
/* update device state */
ret = avp_dev_ctrl_shutdown(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Device shutdown failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Device shutdown failed by host, ret=%d",
ret);
/* continue */
}
@@ -2167,7 +2166,7 @@ avp_dev_promiscuous_enable(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if ((avp->flags & AVP_F_PROMISC) == 0) {
avp->flags |= AVP_F_PROMISC;
- PMD_DRV_LOG(DEBUG, "Promiscuous mode enabled on %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Promiscuous mode enabled on %u",
eth_dev->data->port_id);
}
rte_spinlock_unlock(&avp->lock);
@@ -2183,7 +2182,7 @@ avp_dev_promiscuous_disable(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if ((avp->flags & AVP_F_PROMISC) != 0) {
avp->flags &= ~AVP_F_PROMISC;
- PMD_DRV_LOG(DEBUG, "Promiscuous mode disabled on %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Promiscuous mode disabled on %u",
eth_dev->data->port_id);
}
rte_spinlock_unlock(&avp->lock);
@@ -2224,18 +2223,18 @@ avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
else
avp->features &= ~RTE_AVP_FEATURE_VLAN_OFFLOAD;
} else {
- PMD_DRV_LOG(ERR, "VLAN strip offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN strip offload not supported");
}
}
if (mask & RTE_ETH_VLAN_FILTER_MASK) {
if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
- PMD_DRV_LOG(ERR, "VLAN filter offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN filter offload not supported");
}
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
- PMD_DRV_LOG(ERR, "VLAN extend offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN extend offload not supported");
}
return 0;
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 574b720b30..3f2721df1a 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -8,24 +8,23 @@
#include <rte_log.h>
#ifdef RTE_LIBRTE_AVP_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt, __func__, ## args)
+#define PMD_RX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_AVP_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt, __func__, ## args)
+#define PMD_TX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
extern int avp_logtype_driver;
#define RTE_LOGTYPE_AVP_DRIVER avp_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
- "%s(): " fmt, __func__, ## args)
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _AVP_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index ebe64295aa..9173a6fea6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -107,7 +107,7 @@ static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata,
return 0;
}
- PMD_DRV_LOG(ERR, "Mdio write operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "Mdio write operation timed out");
return -ETIMEDOUT;
}
@@ -154,7 +154,7 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata,
goto success;
}
- PMD_DRV_LOG(ERR, "Mdio read operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "Mdio read operation timed out");
return -ETIMEDOUT;
success:
@@ -272,7 +272,7 @@ static int axgbe_read_mmd_regs(struct axgbe_port *pdata, int prtad,
{
switch (pdata->vdata->xpcs_access) {
case AXGBE_XPCS_ACCESS_V1:
- PMD_DRV_LOG(ERR, "PHY_Version 1 is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "PHY_Version 1 is not supported");
return -1;
case AXGBE_XPCS_ACCESS_V2:
default:
@@ -285,7 +285,7 @@ static void axgbe_write_mmd_regs(struct axgbe_port *pdata, int prtad,
{
switch (pdata->vdata->xpcs_access) {
case AXGBE_XPCS_ACCESS_V1:
- PMD_DRV_LOG(ERR, "PHY_Version 1 is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "PHY_Version 1 is not supported");
return;
case AXGBE_XPCS_ACCESS_V2:
default:
@@ -369,7 +369,7 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, ehfc);
- PMD_DRV_LOG(DEBUG, "flow control %s for RXq%u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "flow control %s for RXq%u",
ehfc ? "enabled" : "disabled", i);
}
@@ -608,8 +608,8 @@ static int axgbe_update_vlan_hash_table(struct axgbe_port *pdata)
vid_valid = pdata->active_vlans[vid_idx];
vid_valid = (unsigned long)vid_valid >> (vid - (64 * vid_idx));
if (vid_valid & 1)
- PMD_DRV_LOG(DEBUG,
- "vid:%d pdata->active_vlans[%ld]=0x%lx\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vid:%d pdata->active_vlans[%ld]=0x%lx",
vid, vid_idx, pdata->active_vlans[vid_idx]);
else
continue;
@@ -617,13 +617,13 @@ static int axgbe_update_vlan_hash_table(struct axgbe_port *pdata)
vid_le = rte_cpu_to_le_16(vid);
crc = bitrev32(~axgbe_vid_crc32_le(vid_le)) >> 28;
vlan_hash_table |= (1 << crc);
- PMD_DRV_LOG(DEBUG, "crc = %d vlan_hash_table = 0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "crc = %d vlan_hash_table = 0x%x",
crc, vlan_hash_table);
}
/* Set the VLAN Hash Table filtering register */
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANHTR, VLHT, vlan_hash_table);
reg = AXGMAC_IOREAD(pdata, MAC_VLANHTR);
- PMD_DRV_LOG(DEBUG, "vlan_hash_table reg val = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan_hash_table reg val = 0x%x", reg);
return 0;
}
@@ -927,7 +927,7 @@ static int axgbe_config_rss(struct axgbe_port *pdata)
i % pdata->eth_dev->data->nb_rx_queues);
axgbe_rss_options(pdata);
if (axgbe_enable_rss(pdata)) {
- PMD_DRV_LOG(ERR, "Error in enabling RSS support\n");
+ PMD_DRV_LOG_LINE(ERR, "Error in enabling RSS support");
return -1;
}
} else {
@@ -1012,7 +1012,7 @@ static int wrapper_rx_desc_init(struct axgbe_port *pdata)
for (j = 0; j < rxq->nb_desc; j++) {
mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (mbuf == NULL) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed queue_id = %u, idx = %d\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed queue_id = %u, idx = %d",
(unsigned int)rxq->queue_id, j);
axgbe_dev_rx_queue_release(pdata->eth_dev, i);
return -ENOMEM;
@@ -1138,7 +1138,7 @@ static void axgbe_config_rx_fifo_size(struct axgbe_port *pdata)
axgbe_calculate_flow_control_threshold(pdata);
axgbe_config_flow_control_threshold(pdata);
- PMD_DRV_LOG(DEBUG, "%d Rx hardware queues, %d byte fifo per queue\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%d Rx hardware queues, %d byte fifo per queue",
pdata->rx_q_count, q_fifo_size);
}
@@ -1164,7 +1164,7 @@ static void axgbe_config_tx_fifo_size(struct axgbe_port *pdata)
for (i = 0; i < pdata->tx_q_count; i++)
AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_TQOMR, TQS, p_fifo);
- PMD_DRV_LOG(DEBUG, "%d Tx hardware queues, %d byte fifo per queue\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%d Tx hardware queues, %d byte fifo per queue",
pdata->tx_q_count, q_fifo_size);
}
@@ -1181,12 +1181,12 @@ static void axgbe_config_queue_mapping(struct axgbe_port *pdata)
for (i = 0, queue = 0; i < pdata->hw_feat.tc_cnt; i++) {
for (j = 0; j < qptc; j++) {
- PMD_DRV_LOG(DEBUG, "TXq%u mapped to TC%u\n", queue, i);
+ PMD_DRV_LOG_LINE(DEBUG, "TXq%u mapped to TC%u", queue, i);
AXGMAC_MTL_IOWRITE_BITS(pdata, queue, MTL_Q_TQOMR,
Q2TCMAP, i);
}
if (i < qptc_extra) {
- PMD_DRV_LOG(DEBUG, "TXq%u mapped to TC%u\n", queue, i);
+ PMD_DRV_LOG_LINE(DEBUG, "TXq%u mapped to TC%u", queue, i);
AXGMAC_MTL_IOWRITE_BITS(pdata, queue, MTL_Q_TQOMR,
Q2TCMAP, i);
}
@@ -1254,7 +1254,7 @@ void axgbe_set_mac_hash_table(struct axgbe_port *pdata, u8 *addr, bool add)
pdata->uc_hash_table[htable_index] &= ~htable_bitmask;
pdata->uc_hash_mac_addr--;
}
- PMD_DRV_LOG(DEBUG, "%s MAC hash table Bit %d at Index %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s MAC hash table Bit %d at Index %#x",
add ? "set" : "clear", (crc & 0x1f), htable_index);
AXGMAC_IOWRITE(pdata, MAC_HTR(htable_index),
@@ -1283,7 +1283,7 @@ void axgbe_set_mac_addn_addr(struct axgbe_port *pdata, u8 *addr, uint32_t index)
AXGMAC_SET_BITS(mac_addr_hi, MAC_MACA1HR, AE, 1);
}
- PMD_DRV_LOG(DEBUG, "%s mac address at %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s mac address at %#x",
addr ? "set" : "clear", index);
AXGMAC_IOWRITE(pdata, MAC_MACAHR(index), mac_addr_hi);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 8b1f3b2742..17b7b5c543 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -319,14 +319,14 @@ axgbe_dev_interrupt_handler(void *param)
pdata->phy_if.an_isr(pdata);
/*DMA related interrupts*/
dma_isr = AXGMAC_IOREAD(pdata, DMA_ISR);
- PMD_DRV_LOG(DEBUG, "DMA_ISR=%#010x\n", dma_isr);
+ PMD_DRV_LOG_LINE(DEBUG, "DMA_ISR=%#010x", dma_isr);
if (dma_isr) {
if (dma_isr & 1) {
dma_ch_isr =
AXGMAC_DMA_IOREAD((struct axgbe_rx_queue *)
pdata->rx_queues[0],
DMA_CH_SR);
- PMD_DRV_LOG(DEBUG, "DMA_CH0_ISR=%#010x\n", dma_ch_isr);
+ PMD_DRV_LOG_LINE(DEBUG, "DMA_CH0_ISR=%#010x", dma_ch_isr);
AXGMAC_DMA_IOWRITE((struct axgbe_rx_queue *)
pdata->rx_queues[0],
DMA_CH_SR, dma_ch_isr);
@@ -378,17 +378,17 @@ axgbe_dev_start(struct rte_eth_dev *dev)
/* Multiqueue RSS */
ret = axgbe_dev_rx_mq_config(dev);
if (ret) {
- PMD_DRV_LOG(ERR, "Unable to config RX MQ\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to config RX MQ");
return ret;
}
ret = axgbe_phy_reset(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "phy reset failed\n");
+ PMD_DRV_LOG_LINE(ERR, "phy reset failed");
return ret;
}
ret = pdata->hw_if.init(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "dev_init failed\n");
+ PMD_DRV_LOG_LINE(ERR, "dev_init failed");
return ret;
}
@@ -510,7 +510,7 @@ axgbe_dev_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (index > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", index);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", index);
return -EINVAL;
}
axgbe_set_mac_addn_addr(pdata, (u8 *)mac_addr, index);
@@ -527,12 +527,12 @@ axgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
int ret;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (reta_size == 0 || reta_size > AXGBE_RSS_MAX_TABLE_SIZE) {
- PMD_DRV_LOG(ERR, "reta_size %d is not supported\n", reta_size);
+ PMD_DRV_LOG_LINE(ERR, "reta_size %d is not supported", reta_size);
return -EINVAL;
}
@@ -558,12 +558,12 @@ axgbe_dev_rss_reta_query(struct rte_eth_dev *dev,
unsigned int i, idx, shift;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (reta_size == 0 || reta_size > AXGBE_RSS_MAX_TABLE_SIZE) {
- PMD_DRV_LOG(ERR, "reta_size %d is not supported\n", reta_size);
+ PMD_DRV_LOG_LINE(ERR, "reta_size %d is not supported", reta_size);
return -EINVAL;
}
@@ -585,12 +585,12 @@ axgbe_dev_rss_hash_update(struct rte_eth_dev *dev,
int ret;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (rss_conf == NULL) {
- PMD_DRV_LOG(ERR, "rss_conf value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "rss_conf value isn't valid");
return -EINVAL;
}
@@ -628,12 +628,12 @@ axgbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct axgbe_port *pdata = dev->data->dev_private;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (rss_conf == NULL) {
- PMD_DRV_LOG(ERR, "rss_conf value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "rss_conf value isn't valid");
return -EINVAL;
}
@@ -668,7 +668,7 @@ axgbe_dev_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (index > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", index);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", index);
return;
}
axgbe_set_mac_addn_addr(pdata, NULL, index);
@@ -685,7 +685,7 @@ axgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
uint32_t i;
if (nb_mc_addr > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", nb_mc_addr);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", nb_mc_addr);
return -EINVAL;
}
@@ -711,7 +711,7 @@ axgbe_dev_uc_hash_table_set(struct rte_eth_dev *dev,
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (!hw_feat->hash_table_size) {
- PMD_DRV_LOG(ERR, "MAC Hash Table not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "MAC Hash Table not supported");
return -ENOTSUP;
}
@@ -735,7 +735,7 @@ axgbe_dev_uc_all_hash_table_set(struct rte_eth_dev *dev, uint8_t add)
uint32_t index;
if (!hw_feat->hash_table_size) {
- PMD_DRV_LOG(ERR, "MAC Hash Table not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "MAC Hash Table not supported");
return -ENOTSUP;
}
@@ -745,7 +745,7 @@ axgbe_dev_uc_all_hash_table_set(struct rte_eth_dev *dev, uint8_t add)
else
pdata->uc_hash_table[index] = 0;
- PMD_DRV_LOG(DEBUG, "%s MAC hash table at Index %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s MAC hash table at Index %#x",
add ? "set" : "clear", index);
AXGMAC_IOWRITE(pdata, MAC_HTR(index),
@@ -784,7 +784,7 @@ axgbe_dev_link_update(struct rte_eth_dev *dev,
RTE_ETH_LINK_SPEED_FIXED);
ret = rte_eth_linkstatus_set(dev, &link);
if (ret == 0)
- PMD_DRV_LOG(ERR, "Link status changed\n");
+ PMD_DRV_LOG_LINE(ERR, "Link status changed");
return ret;
}
@@ -1084,7 +1084,7 @@ axgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
for (i = 0; i < n; i++) {
if (ids[i] >= AXGBE_XSTATS_COUNT) {
- PMD_DRV_LOG(ERR, "id value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "id value isn't valid");
return -1;
}
values[i] = values_copy[ids[i]];
@@ -1108,7 +1108,7 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
for (i = 0; i < size; i++) {
if (ids[i] >= AXGBE_XSTATS_COUNT) {
- PMD_DRV_LOG(ERR, "id value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "id value isn't valid");
return -1;
}
strcpy(xstats_names[i].name, xstats_names_copy[ids[i]].name);
@@ -1157,7 +1157,7 @@ axgbe_dev_stats_get(struct rte_eth_dev *dev,
+ rxq->rx_mbuf_alloc_failed;
stats->ierrors += rxq->errors;
} else {
- PMD_DRV_LOG(DEBUG, "Rx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1171,7 +1171,7 @@ axgbe_dev_stats_get(struct rte_eth_dev *dev,
stats->obytes += txq->bytes;
stats->oerrors += txq->errors;
} else {
- PMD_DRV_LOG(DEBUG, "Tx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1194,7 +1194,7 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
rxq->errors = 0;
rxq->rx_mbuf_alloc_failed = 0;
} else {
- PMD_DRV_LOG(DEBUG, "Rx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1205,7 +1205,7 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
txq->bytes = 0;
txq->errors = 0;
} else {
- PMD_DRV_LOG(DEBUG, "Tx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1500,7 +1500,7 @@ static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
/* mtu setting is forbidden if port is start */
if (dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "port %d must be stopped before configuration",
+ PMD_DRV_LOG_LINE(ERR, "port %d must be stopped before configuration",
dev->data->port_id);
return -EBUSY;
}
@@ -1624,7 +1624,7 @@ axgbe_timesync_write_time(struct rte_eth_dev *dev,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSUPDT))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out update timestamp\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out update timestamp");
return 0;
}
@@ -1641,7 +1641,7 @@ axgbe_update_tstamp_addend(struct axgbe_port *pdata,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSADDREG))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out updating timestamp addend register\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out updating timestamp addend register");
}
static void
@@ -1661,7 +1661,7 @@ axgbe_set_tstamp_time(struct axgbe_port *pdata, unsigned int sec,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSINIT))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out initializing timestamp\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out initializing timestamp");
}
static int
@@ -1696,7 +1696,7 @@ axgbe_timesync_enable(struct rte_eth_dev *dev)
/* Exit if timestamping is not enabled */
if (!AXGMAC_GET_BITS(mac_tscr, MAC_TSCR, TSENA)) {
- PMD_DRV_LOG(ERR, "Exiting as timestamp is not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "Exiting as timestamp is not enabled");
return 0;
}
@@ -1720,7 +1720,7 @@ axgbe_timesync_enable(struct rte_eth_dev *dev)
pdata->systime_tc.cc_shift = 0;
pdata->systime_tc.nsec_mask = 0;
- PMD_DRV_LOG(DEBUG, "Initializing system time counter with realtime\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Initializing system time counter with realtime");
/* Updating the counter once with clock real time */
clock_gettime(CLOCK_REALTIME, ×tamp);
@@ -1773,8 +1773,8 @@ axgbe_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
if (nsec != 0xffffffffffffffffULL) {
if (pmt == 0x01)
*timestamp = rte_ns_to_timespec(nsec);
- PMD_DRV_LOG(DEBUG,
- "flags = 0x%x nsec = %"PRIu64"\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "flags = 0x%x nsec = %"PRIu64,
flags, nsec);
}
}
@@ -1801,13 +1801,13 @@ axgbe_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
tx_snr = AXGMAC_IOREAD(pdata, MAC_TXSNR);
}
if (AXGMAC_GET_BITS(tx_snr, MAC_TXSNR, TXTSSTSMIS)) {
- PMD_DRV_LOG(DEBUG, "Waiting for TXTSSTSMIS\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Waiting for TXTSSTSMIS");
return 0;
}
nsec = tx_ssr;
nsec *= NSEC_PER_SEC;
nsec += tx_snr;
- PMD_DRV_LOG(DEBUG, "nsec = %"PRIu64" tx_ssr = %d tx_snr = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "nsec = %"PRIu64" tx_ssr = %d tx_snr = %d",
nsec, tx_ssr, tx_snr);
*timestamp = rte_ns_to_timespec(nsec);
return 0;
@@ -1823,11 +1823,11 @@ axgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vid, int on)
vid_idx = VLAN_TABLE_IDX(vid);
if (on) {
- PMD_DRV_LOG(DEBUG, "Set VLAN vid=%d for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Set VLAN vid=%d for device = %s",
vid, pdata->eth_dev->device->name);
pdata->active_vlans[vid_idx] |= vid_bit;
} else {
- PMD_DRV_LOG(DEBUG, "Reset VLAN vid=%d for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Reset VLAN vid=%d for device = %s",
vid, pdata->eth_dev->device->name);
pdata->active_vlans[vid_idx] &= ~vid_bit;
}
@@ -1845,50 +1845,50 @@ axgbe_vlan_tpid_set(struct rte_eth_dev *dev,
uint32_t qinq = 0;
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "EDVLP: qinq = 0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "EDVLP: qinq = 0x%x", qinq);
switch (vlan_type) {
case RTE_ETH_VLAN_TYPE_INNER:
- PMD_DRV_LOG(DEBUG, "RTE_ETH_VLAN_TYPE_INNER\n");
+ PMD_DRV_LOG_LINE(DEBUG, "RTE_ETH_VLAN_TYPE_INNER");
if (qinq) {
if (tpid != 0x8100 && tpid != 0x88a8)
- PMD_DRV_LOG(ERR,
- "tag supported 0x8100/0x88A8\n");
- PMD_DRV_LOG(DEBUG, "qinq with inner tag\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "tag supported 0x8100/0x88A8");
+ PMD_DRV_LOG_LINE(DEBUG, "qinq with inner tag");
/*Enable Inner VLAN Tag */
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, ERIVLT, 1);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, ERIVLT);
- PMD_DRV_LOG(DEBUG, "bit ERIVLT = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit ERIVLT = 0x%x", reg);
} else {
- PMD_DRV_LOG(ERR,
- "Inner type not supported in single tag\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Inner type not supported in single tag");
}
break;
case RTE_ETH_VLAN_TYPE_OUTER:
- PMD_DRV_LOG(DEBUG, "RTE_ETH_VLAN_TYPE_OUTER\n");
+ PMD_DRV_LOG_LINE(DEBUG, "RTE_ETH_VLAN_TYPE_OUTER");
if (qinq) {
- PMD_DRV_LOG(DEBUG, "double tagging is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "double tagging is enabled");
/*Enable outer VLAN tag*/
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, ERIVLT, 0);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, ERIVLT);
- PMD_DRV_LOG(DEBUG, "bit ERIVLT = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit ERIVLT = 0x%x", reg);
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANIR, CSVL, 1);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANIR, CSVL);
- PMD_DRV_LOG(DEBUG, "bit CSVL = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit CSVL = 0x%x", reg);
} else {
if (tpid != 0x8100 && tpid != 0x88a8)
- PMD_DRV_LOG(ERR,
- "tag supported 0x8100/0x88A8\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "tag supported 0x8100/0x88A8");
}
break;
case RTE_ETH_VLAN_TYPE_MAX:
- PMD_DRV_LOG(ERR, "RTE_ETH_VLAN_TYPE_MAX\n");
+ PMD_DRV_LOG_LINE(ERR, "RTE_ETH_VLAN_TYPE_MAX");
break;
case RTE_ETH_VLAN_TYPE_UNKNOWN:
- PMD_DRV_LOG(ERR, "RTE_ETH_VLAN_TYPE_UNKNOWN\n");
+ PMD_DRV_LOG_LINE(ERR, "RTE_ETH_VLAN_TYPE_UNKNOWN");
break;
}
return 0;
@@ -1900,7 +1900,7 @@ static void axgbe_vlan_extend_enable(struct axgbe_port *pdata)
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, EDVLP, 1);
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "vlan double tag enabled EDVLP:qinq=0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan double tag enabled EDVLP:qinq=0x%x", qinq);
}
static void axgbe_vlan_extend_disable(struct axgbe_port *pdata)
@@ -1909,7 +1909,7 @@ static void axgbe_vlan_extend_disable(struct axgbe_port *pdata)
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, EDVLP, 0);
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "vlan double tag disable EDVLP:qinq=0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan double tag disable EDVLP:qinq=0x%x", qinq);
}
static int
@@ -1924,29 +1924,29 @@ axgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
if (mask & RTE_ETH_VLAN_STRIP_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
- PMD_DRV_LOG(DEBUG, "Strip ON for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Strip ON for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.enable_rx_vlan_stripping(pdata);
} else {
- PMD_DRV_LOG(DEBUG, "Strip OFF for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Strip OFF for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.disable_rx_vlan_stripping(pdata);
}
}
if (mask & RTE_ETH_VLAN_FILTER_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) {
- PMD_DRV_LOG(DEBUG, "Filter ON for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Filter ON for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.enable_rx_vlan_filtering(pdata);
} else {
- PMD_DRV_LOG(DEBUG, "Filter OFF for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Filter OFF for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.disable_rx_vlan_filtering(pdata);
}
}
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND) {
- PMD_DRV_LOG(DEBUG, "enabling vlan extended mode\n");
+ PMD_DRV_LOG_LINE(DEBUG, "enabling vlan extended mode");
axgbe_vlan_extend_enable(pdata);
/* Set global registers with default ethertype*/
axgbe_vlan_tpid_set(dev, RTE_ETH_VLAN_TYPE_OUTER,
@@ -1954,7 +1954,7 @@ axgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
axgbe_vlan_tpid_set(dev, RTE_ETH_VLAN_TYPE_INNER,
RTE_ETHER_TYPE_VLAN);
} else {
- PMD_DRV_LOG(DEBUG, "disabling vlan extended mode\n");
+ PMD_DRV_LOG_LINE(DEBUG, "disabling vlan extended mode");
axgbe_vlan_extend_disable(pdata);
}
}
@@ -2283,7 +2283,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
break;
}
if (unknown_cpu) {
- PMD_DRV_LOG(ERR, "Unknown CPU family, no supported axgbe device found\n");
+ PMD_DRV_LOG_LINE(ERR, "Unknown CPU family, no supported axgbe device found");
return -ENODEV;
}
}
@@ -2377,7 +2377,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
/* Issue software reset to DMA */
ret = pdata->hw_if.exit(pdata);
if (ret)
- PMD_DRV_LOG(ERR, "hw_if->exit EBUSY error\n");
+ PMD_DRV_LOG_LINE(ERR, "hw_if->exit EBUSY error");
/* Set default configuration data */
axgbe_default_config(pdata);
diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c
index a2798f484e..484ee1b4e4 100644
--- a/drivers/net/axgbe/axgbe_i2c.c
+++ b/drivers/net/axgbe/axgbe_i2c.c
@@ -162,13 +162,13 @@ static int axgbe_i2c_isr(struct axgbe_port *pdata)
isr = XI2C_IOREAD(pdata, IC_RAW_INTR_STAT);
- PMD_DRV_LOG(DEBUG, "I2C interrupt received: status=%#010x\n", isr);
+ PMD_DRV_LOG_LINE(DEBUG, "I2C interrupt received: status=%#010x", isr);
axgbe_i2c_clear_isr_interrupts(pdata, isr);
if (isr & AXGBE_INTR_TX_ABRT) {
- PMD_DRV_LOG(DEBUG,
- "I2C TX_ABRT received (%#010x) for target %#04x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "I2C TX_ABRT received (%#010x) for target %#04x",
state->tx_abort_source, state->op->target);
axgbe_i2c_disable_interrupts(pdata);
@@ -232,7 +232,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
pthread_mutex_lock(&pdata->i2c_mutex);
ret = axgbe_i2c_disable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to disable i2c master");
pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
@@ -249,7 +249,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
axgbe_i2c_clear_all_interrupts(pdata);
ret = axgbe_i2c_enable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to enable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to enable i2c master");
pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
@@ -268,7 +268,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
}
}
- PMD_DRV_LOG(ERR, "i2c operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "i2c operation timed out");
axgbe_i2c_disable_interrupts(pdata);
axgbe_i2c_disable(pdata);
ret = -ETIMEDOUT;
@@ -293,7 +293,7 @@ static void axgbe_i2c_stop(struct axgbe_port *pdata)
if (!pdata->i2c.started)
return;
- PMD_DRV_LOG(DEBUG, "stopping I2C\n");
+ PMD_DRV_LOG_LINE(DEBUG, "stopping I2C");
pdata->i2c.started = 0;
axgbe_i2c_disable_interrupts(pdata);
@@ -306,7 +306,7 @@ static int axgbe_i2c_start(struct axgbe_port *pdata)
if (pdata->i2c.started)
return 0;
- PMD_DRV_LOG(DEBUG, "starting I2C\n");
+ PMD_DRV_LOG_LINE(DEBUG, "starting I2C");
pdata->i2c.started = 1;
@@ -321,7 +321,7 @@ static int axgbe_i2c_init(struct axgbe_port *pdata)
ret = axgbe_i2c_disable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to disable i2c master");
return ret;
}
diff --git a/drivers/net/axgbe/axgbe_logs.h b/drivers/net/axgbe/axgbe_logs.h
index d148701716..3962895c5a 100644
--- a/drivers/net/axgbe/axgbe_logs.h
+++ b/drivers/net/axgbe/axgbe_logs.h
@@ -19,8 +19,8 @@ extern int axgbe_logtype_init;
#endif
extern int axgbe_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, axgbe_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
+#define RTE_LOGTYPE_AXGBE_DRIVER axgbe_logtype_driver
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _AXGBE_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 130a67479e..952a0add62 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -203,7 +203,7 @@ static void axgbe_change_mode(struct axgbe_port *pdata,
case AXGBE_MODE_UNKNOWN:
break;
default:
- PMD_DRV_LOG(ERR, "invalid operation mode requested (%u)\n", mode);
+ PMD_DRV_LOG_LINE(ERR, "invalid operation mode requested (%u)", mode);
}
}
@@ -285,7 +285,7 @@ static void axgbe_an73_restart(struct axgbe_port *pdata)
axgbe_an73_enable_interrupts(pdata);
axgbe_an73_set(pdata, true, true);
- PMD_DRV_LOG(DEBUG, "CL73 AN enabled/restarted\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN enabled/restarted");
}
static void axgbe_an73_disable(struct axgbe_port *pdata)
@@ -294,7 +294,7 @@ static void axgbe_an73_disable(struct axgbe_port *pdata)
axgbe_an73_disable_interrupts(pdata);
pdata->an_start = 0;
- PMD_DRV_LOG(DEBUG, "CL73 AN disabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN disabled");
}
static void axgbe_an_restart(struct axgbe_port *pdata)
@@ -372,7 +372,7 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
pdata->kr_start_time = rte_get_timer_cycles();
- PMD_DRV_LOG(DEBUG, "KR training initiated\n");
+ PMD_DRV_LOG_LINE(DEBUG, "KR training initiated");
if (pdata->phy_if.phy_impl.kr_training_post)
pdata->phy_if.phy_impl.kr_training_post(pdata);
@@ -455,8 +455,8 @@ static enum axgbe_an axgbe_an73_page_received(struct axgbe_port *pdata)
pdata->an_start = rte_get_timer_cycles();
- PMD_DRV_LOG(NOTICE,
- "CL73 AN timed out, resetting state\n");
+ PMD_DRV_LOG_LINE(NOTICE,
+ "CL73 AN timed out, resetting state");
}
}
@@ -548,7 +548,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
pdata->an_state = AXGBE_AN_ERROR;
}
- PMD_DRV_LOG(DEBUG, "CL73 AN : %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN : %s",
axgbe_state_as_string(pdata->an_state));
again:
@@ -582,7 +582,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
pdata->eth_dev->data->dev_link.link_status =
RTE_ETH_LINK_DOWN;
} else if (pdata->an_state == AXGBE_AN_ERROR) {
- PMD_DRV_LOG(ERR, "error during auto-negotiation, state=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "error during auto-negotiation, state=%u",
cur_state);
pdata->an_int = 0;
axgbe_an73_clear_interrupts(pdata);
@@ -597,7 +597,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
if (pdata->phy_if.phy_impl.an_post)
pdata->phy_if.phy_impl.an_post(pdata);
- PMD_DRV_LOG(DEBUG, "CL73 AN result: %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN result: %s",
axgbe_state_as_string(pdata->an_result));
}
@@ -641,7 +641,7 @@ static void axgbe_an37_state_machine(struct axgbe_port *pdata)
}
if (pdata->an_state == AXGBE_AN_ERROR) {
- PMD_DRV_LOG(ERR, "error during auto-negotiation, state=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "error during auto-negotiation, state=%u",
cur_state);
pdata->an_int = 0;
axgbe_an37_clear_interrupts(pdata);
@@ -703,7 +703,7 @@ static void axgbe_an37_isr(struct axgbe_port *pdata)
static void axgbe_an_isr(struct axgbe_port *pdata)
{
- PMD_DRV_LOG(DEBUG, "AN interrupt received\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN interrupt received");
switch (pdata->an_mode) {
case AXGBE_AN_MODE_CL73:
@@ -813,7 +813,7 @@ static void axgbe_an73_init(struct axgbe_port *pdata)
XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_AN_ADVERTISE, reg);
- PMD_DRV_LOG(DEBUG, "CL73 AN initialized\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN initialized");
}
static void axgbe_an_init(struct axgbe_port *pdata)
@@ -865,7 +865,7 @@ static int axgbe_phy_config_fixed(struct axgbe_port *pdata)
{
enum axgbe_mode mode;
- PMD_DRV_LOG(DEBUG, "fixed PHY configuration\n");
+ PMD_DRV_LOG_LINE(DEBUG, "fixed PHY configuration");
/* Disable auto-negotiation */
axgbe_an_disable(pdata);
@@ -912,9 +912,9 @@ static int __axgbe_phy_config_aneg(struct axgbe_port *pdata, bool set_mode)
ret = axgbe_phy_config_fixed(pdata);
if (ret || !pdata->kr_redrv)
goto out;
- PMD_DRV_LOG(DEBUG, "AN redriver support\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN redriver support");
} else {
- PMD_DRV_LOG(DEBUG, "AN PHY configuration\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN PHY configuration");
}
/* Disable auto-negotiation interrupt */
@@ -1018,7 +1018,7 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
}
}
- PMD_DRV_LOG(NOTICE, "AN link timeout\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AN link timeout");
axgbe_phy_config_aneg(pdata);
}
}
@@ -1161,7 +1161,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
static void axgbe_phy_stop(struct axgbe_port *pdata)
{
- PMD_DRV_LOG(DEBUG, "stopping PHY\n");
+ PMD_DRV_LOG_LINE(DEBUG, "stopping PHY");
if (!pdata->phy_started)
return;
/* Indicate the PHY is down */
@@ -1177,7 +1177,7 @@ static int axgbe_phy_start(struct axgbe_port *pdata)
{
int ret;
- PMD_DRV_LOG(DEBUG, "starting PHY\n");
+ PMD_DRV_LOG_LINE(DEBUG, "starting PHY");
ret = pdata->phy_if.phy_impl.start(pdata);
if (ret)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index b1a453ccc8..9249e11335 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -312,7 +312,7 @@ static int axgbe_phy_redrv_write(struct axgbe_port *pdata, unsigned int reg,
}
if (redrv_data[0] != 0xff) {
- PMD_DRV_LOG(ERR, "Redriver write checksum error\n");
+ PMD_DRV_LOG_LINE(ERR, "Redriver write checksum error");
ret = -EIO;
}
@@ -437,7 +437,7 @@ static int axgbe_phy_get_comm_ownership(struct axgbe_port *pdata)
pthread_mutex_unlock(&pdata->phy_mutex);
- PMD_DRV_LOG(ERR, "unable to obtain hardware mutexes\n");
+ PMD_DRV_LOG_LINE(ERR, "unable to obtain hardware mutexes");
return -ETIMEDOUT;
}
@@ -679,7 +679,7 @@ static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)
ret = axgbe_phy_sfp_get_mux(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error setting SFP MUX\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error setting SFP MUX");
return ret;
}
@@ -689,7 +689,7 @@ static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)
&eeprom_addr, sizeof(eeprom_addr),
&sfp_eeprom, sizeof(sfp_eeprom));
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error reading SFP EEPROM\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error reading SFP EEPROM");
goto put;
}
@@ -735,7 +735,7 @@ static void axgbe_phy_sfp_signals(struct axgbe_port *pdata)
&gpio_reg, sizeof(gpio_reg),
gpio_ports, sizeof(gpio_ports));
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error reading SFP GPIOs\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error reading SFP GPIOs");
return;
}
@@ -836,7 +836,7 @@ static void axgbe_phy_sfp_detect(struct axgbe_port *pdata)
axgbe_phy_sfp_parse_eeprom(pdata);
axgbe_phy_sfp_external_phy(pdata);
- PMD_DRV_LOG(DEBUG, "SFP Base: %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "SFP Base: %s",
axgbe_base_as_string(phy_data->sfp_base));
put:
@@ -1064,7 +1064,7 @@ static unsigned int axgbe_phy_an_advertising(struct axgbe_port *pdata)
advertising |= ADVERTISED_1000baseKX_Full;
break;
case AXGBE_PORT_MODE_10GBASE_T:
- PMD_DRV_LOG(ERR, "10GBASE_T mode is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBASE_T mode is not supported");
break;
case AXGBE_PORT_MODE_10GBASE_R:
advertising |= ADVERTISED_10000baseKR_Full;
@@ -1251,7 +1251,7 @@ static void axgbe_rx_adaptation(struct axgbe_port *pdata)
/* If the block lock is found, update the helpers
* and declare the link up
*/
- PMD_DRV_LOG(NOTICE, "Rx adaptation - Block_lock done\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Rx adaptation - Block_lock done");
pdata->rx_adapt_done = true;
pdata->mode_set = false;
return;
@@ -1271,7 +1271,7 @@ static void axgbe_phy_rx_adaptation(struct axgbe_port *pdata)
/* step 1: Check for RX_VALID && LF_SIGDET */
if ((reg & XGBE_PMA_RX_VAL_SIG_MASK) != XGBE_PMA_RX_VAL_SIG_MASK) {
- PMD_DRV_LOG(NOTICE, "RX_VALID or LF_SIGDET is unset, issue rrc\n");
+ PMD_DRV_LOG_LINE(NOTICE, "RX_VALID or LF_SIGDET is unset, issue rrc");
axgbe_phy_rrc(pdata);
if (pdata->rx_adapt_retries++ >= MAX_RX_ADAPT_RETRIES) {
pdata->rx_adapt_retries = 0;
@@ -1301,7 +1301,7 @@ static void axgbe_phy_rx_reset(struct axgbe_port *pdata)
XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL1,
XGBE_PMA_RX_RST_0_MASK, XGBE_PMA_RX_RST_0_RESET_OFF);
rte_delay_us(45);
- PMD_DRV_LOG(ERR, "firmware mailbox reset performed\n");
+ PMD_DRV_LOG_LINE(ERR, "firmware mailbox reset performed");
}
}
@@ -1331,7 +1331,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
/* Log if a previous command did not complete */
if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS)) {
- PMD_DRV_LOG(NOTICE, "firmware mailbox not ready for command\n");
+ PMD_DRV_LOG_LINE(NOTICE, "firmware mailbox not ready for command");
axgbe_phy_rx_reset(pdata);
}
@@ -1351,7 +1351,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
goto do_rx_adaptation;
rte_delay_us(1500);
}
- PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n");
+ PMD_DRV_LOG_LINE(NOTICE, "firmware mailbox command did not complete");
/* Reset on error */
axgbe_phy_rx_reset(pdata);
goto reenable_pll;
@@ -1360,7 +1360,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
do_rx_adaptation:
if (pdata->en_rx_adap && sub_cmd == AXGBE_MB_SUBCMD_RX_ADAP &&
(cmd == AXGBE_MB_CMD_SET_10G_KR || cmd == AXGBE_MB_CMD_SET_10G_SFI)) {
- PMD_DRV_LOG(NOTICE, "Enabling RX adaptation\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Enabling RX adaptation");
pdata->mode_set = true;
axgbe_phy_rx_adaptation(pdata);
/* return from here to avoid enabling PLL ctrl
@@ -1384,7 +1384,7 @@ static void axgbe_phy_rrc(struct axgbe_port *pdata)
/* Receiver Reset Cycle */
axgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_RRC, AXGBE_MB_SUBCMD_NONE);
- PMD_DRV_LOG(DEBUG, "receiver reset complete\n");
+ PMD_DRV_LOG_LINE(DEBUG, "receiver reset complete");
}
static void axgbe_phy_power_off(struct axgbe_port *pdata)
@@ -1396,7 +1396,7 @@ static void axgbe_phy_power_off(struct axgbe_port *pdata)
phy_data->cur_mode = AXGBE_MODE_UNKNOWN;
- PMD_DRV_LOG(DEBUG, "phy powered off\n");
+ PMD_DRV_LOG_LINE(DEBUG, "phy powered off");
}
static bool enable_rx_adap(struct axgbe_port *pdata, enum axgbe_mode mode)
@@ -1453,7 +1453,7 @@ static void axgbe_phy_sfi_mode(struct axgbe_port *pdata)
phy_data->cur_mode = AXGBE_MODE_SFI;
- PMD_DRV_LOG(DEBUG, "10GbE SFI mode set\n");
+ PMD_DRV_LOG_LINE(DEBUG, "10GbE SFI mode set");
}
static void axgbe_phy_kr_mode(struct axgbe_port *pdata)
@@ -1471,7 +1471,7 @@ static void axgbe_phy_kr_mode(struct axgbe_port *pdata)
AXGBE_MB_SUBCMD_NONE);
phy_data->cur_mode = AXGBE_MODE_KR;
- PMD_DRV_LOG(DEBUG, "10GbE KR mode set\n");
+ PMD_DRV_LOG_LINE(DEBUG, "10GbE KR mode set");
}
static void axgbe_phy_kx_2500_mode(struct axgbe_port *pdata)
@@ -1987,7 +1987,7 @@ static int axgbe_phy_mdio_reset_setup(struct axgbe_port *pdata)
case AXGBE_MDIO_RESET_INT_GPIO:
break;
default:
- PMD_DRV_LOG(ERR, "unsupported MDIO reset (%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "unsupported MDIO reset (%#x)",
phy_data->mdio_reset);
return -EINVAL;
}
@@ -2270,7 +2270,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Check if enabled */
if (!axgbe_phy_port_enabled(pdata)) {
- PMD_DRV_LOG(ERR, "device is not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "device is not enabled");
return -ENODEV;
}
@@ -2281,7 +2281,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
phy_data = rte_zmalloc("phy_data memory", sizeof(*phy_data), 0);
if (!phy_data) {
- PMD_DRV_LOG(ERR, "phy_data allocation failed\n");
+ PMD_DRV_LOG_LINE(ERR, "phy_data allocation failed");
return -ENOMEM;
}
pdata->phy_data = phy_data;
@@ -2300,14 +2300,14 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Validate the connection requested */
if (axgbe_phy_conn_type_mismatch(pdata)) {
- PMD_DRV_LOG(ERR, "phy mode/connection mismatch (%#x/%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "phy mode/connection mismatch (%#x/%#x)",
phy_data->port_mode, phy_data->conn_type);
return -EINVAL;
}
/* Validate the mode requested */
if (axgbe_phy_port_mode_mismatch(pdata)) {
- PMD_DRV_LOG(ERR, "phy mode/speed mismatch (%#x/%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "phy mode/speed mismatch (%#x/%#x)",
phy_data->port_mode, phy_data->port_speeds);
return -EINVAL;
}
@@ -2319,7 +2319,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Validate the re-driver information */
if (axgbe_phy_redrv_error(phy_data)) {
- PMD_DRV_LOG(ERR, "phy re-driver settings error\n");
+ PMD_DRV_LOG_LINE(ERR, "phy re-driver settings error");
return -EINVAL;
}
pdata->kr_redrv = phy_data->redrv;
@@ -2499,7 +2499,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
ret = pdata->hw_if.set_ext_mii_mode(pdata, phy_data->mdio_addr,
phy_data->phydev_mode);
if (ret) {
- PMD_DRV_LOG(ERR, "mdio port/clause not compatible (%d/%u)\n",
+ PMD_DRV_LOG_LINE(ERR, "mdio port/clause not compatible (%d/%u)",
phy_data->mdio_addr, phy_data->phydev_mode);
return -EINVAL;
}
@@ -2509,7 +2509,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
ret = pdata->hw_if.set_ext_mii_mode(pdata, phy_data->redrv_addr,
AXGBE_MDIO_MODE_CL22);
if (ret) {
- PMD_DRV_LOG(ERR, "redriver mdio port not compatible (%u)\n",
+ PMD_DRV_LOG_LINE(ERR, "redriver mdio port not compatible (%u)",
phy_data->redrv_addr);
return -EINVAL;
}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index a9ff291cef..974ade9ab7 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -92,7 +92,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
dma = rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, size, 128,
socket_id);
if (!dma) {
- PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for rx_ring failed\n");
+ PMD_DRV_LOG_LINE(ERR, "ring_dma_zone_reserve for rx_ring failed");
axgbe_rx_queue_release(rxq);
return -ENOMEM;
}
@@ -105,7 +105,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->sw_ring) {
- PMD_DRV_LOG(ERR, "rte_zmalloc for sw_ring failed\n");
+ PMD_DRV_LOG_LINE(ERR, "rte_zmalloc for sw_ring failed");
axgbe_rx_queue_release(rxq);
return -ENOMEM;
}
@@ -139,8 +139,8 @@ static void axgbe_prepare_rx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), rx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Rx queue %u to empty\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Rx queue %u to empty",
queue);
}
@@ -224,8 +224,8 @@ axgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
break;
tmbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (unlikely(!tmbuf)) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed port_id = %u"
- " queue_id = %u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed port_id = %u"
+ " queue_id = %u",
(unsigned int)rxq->port_id,
(unsigned int)rxq->queue_id);
rte_eth_devices[
@@ -359,8 +359,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
tmbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (unlikely(!tmbuf)) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed port_id = %u"
- " queue_id = %u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed port_id = %u"
+ " queue_id = %u",
(unsigned int)rxq->port_id,
(unsigned int)rxq->queue_id);
rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;
@@ -677,8 +677,8 @@ static void axgbe_txq_prepare_tx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), tx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Tx queue %u to empty\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Tx queue %u to empty",
queue);
}
@@ -721,8 +721,8 @@ static void axgbe_prepare_tx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), tx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Tx DMA channel %u to stop\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Tx DMA channel %u to stop",
queue);
}
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index aaa7ea00cc..8ac20961d9 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1207,12 +1207,8 @@ extern const struct rte_flow_ops bnxt_flow_meter_ops;
extern int bnxt_logtype_driver;
#define RTE_LOGTYPE_BNXT bnxt_logtype_driver
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnxt_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt, ## args)
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, BNXT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#define BNXT_LINK_SPEEDS_V2_OPTIONS(f) \
((f) & HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index a4509abd60..64e57c79da 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -59,7 +59,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
if (!BNXT_TRUFLOW_EN(bp))
return;
- PMD_DRV_LOG(INFO, "Default vnic change async event received\n");
+ PMD_DRV_LOG_LINE(INFO, "Default vnic change async event received");
event_data = rte_le_to_cpu_32(async_cmp->event_data1);
vnic_state = (event_data & BNXT_DEFAULT_VNIC_STATE_MASK) >>
@@ -72,7 +72,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
vf_fid = (event_data & BNXT_DEFAULT_VNIC_CHANGE_VF_ID_MASK) >>
BNXT_DEFAULT_VNIC_CHANGE_VF_ID_SFT;
- PMD_DRV_LOG(INFO, "async event received vf_id 0x%x\n", vf_fid);
+ PMD_DRV_LOG_LINE(INFO, "async event received vf_id 0x%x", vf_fid);
for (vf_id = 0; vf_id < BNXT_MAX_VF_REPS(bp); vf_id++) {
eth_dev = bp->rep_info[vf_id].vfr_eth_dev;
@@ -97,16 +97,16 @@ static void bnxt_handle_event_error_report(struct bnxt *bp,
{
switch (BNXT_EVENT_ERROR_REPORT_TYPE(data1)) {
case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM:
- PMD_DRV_LOG(WARNING, "Port:%d Pause Storm detected!\n",
+ PMD_DRV_LOG_LINE(WARNING, "Port:%d Pause Storm detected!",
bp->eth_dev->data->port_id);
break;
case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED:
- PMD_DRV_LOG(WARNING, "Port:%d Speed change not supported with dual rate transceivers on this board",
+ PMD_DRV_LOG_LINE(WARNING, "Port:%d Speed change not supported with dual rate transceivers on this board",
bp->eth_dev->data->port_id);
break;
default:
- PMD_DRV_LOG(INFO, "FW reported unknown error type data1 %d"
- " data2: %d\n", data1, data2);
+ PMD_DRV_LOG_LINE(INFO, "FW reported unknown error type data1 %d"
+ " data2: %d", data1, data2);
break;
}
}
@@ -121,13 +121,13 @@ void bnxt_handle_vf_cfg_change(void *arg)
if (eth_dev->data->dev_started) {
rc = bnxt_dev_stop_op(eth_dev);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to stop Port:%u\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(ERR, "Failed to stop Port:%u", eth_dev->data->port_id);
return;
}
rc = bnxt_dev_start_op(eth_dev);
if (rc != 0)
- PMD_DRV_LOG(ERR, "Failed to start Port:%u\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(ERR, "Failed to start Port:%u", eth_dev->data->port_id);
}
}
@@ -144,7 +144,7 @@ bnxt_process_vf_flr(struct bnxt *bp, uint32_t data1)
vfid = (data1 & HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK) >>
HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT;
- PMD_DRV_LOG(INFO, "VF FLR async event received pfid: %u, vfid: %u\n",
+ PMD_DRV_LOG_LINE(INFO, "VF FLR async event received pfid: %u, vfid: %u",
pfid, vfid);
}
@@ -176,17 +176,17 @@ void bnxt_handle_async_event(struct bnxt *bp,
RTE_ETH_EVENT_INTR_LSC, NULL);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
- PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
+ PMD_DRV_LOG_LINE(INFO, "Async event: PF driver unloaded");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
- PMD_DRV_LOG(INFO, "Port %u: VF config change async event\n", port_id);
- PMD_DRV_LOG(INFO, "event: data1 %#x data2 %#x\n", data1, data2);
+ PMD_DRV_LOG_LINE(INFO, "Port %u: VF config change async event", port_id);
+ PMD_DRV_LOG_LINE(INFO, "event: data1 %#x data2 %#x", data1, data2);
bnxt_hwrm_func_qcfg(bp, NULL);
if (BNXT_VF(bp))
rte_eal_alarm_set(1, bnxt_handle_vf_cfg_change, (void *)bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED:
- PMD_DRV_LOG(INFO, "Port conn async event\n");
+ PMD_DRV_LOG_LINE(INFO, "Port conn async event");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
/*
@@ -216,13 +216,13 @@ void bnxt_handle_async_event(struct bnxt *bp,
BNXT_MIN_FW_READY_TIMEOUT;
if ((event_data & EVENT_DATA1_REASON_CODE_MASK) ==
EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL) {
- PMD_DRV_LOG(INFO,
- "Port %u: Firmware fatal reset event received\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Firmware fatal reset event received",
port_id);
bp->flags |= BNXT_FLAG_FATAL_ERROR;
} else {
- PMD_DRV_LOG(INFO,
- "Port %u: Firmware non-fatal reset event received\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Firmware non-fatal reset event received",
port_id);
}
@@ -243,7 +243,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
info->flags |= BNXT_FLAG_RECOVERY_ENABLED;
} else {
info->flags &= ~BNXT_FLAG_RECOVERY_ENABLED;
- PMD_DRV_LOG(INFO, "Driver recovery watchdog is disabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Driver recovery watchdog is disabled");
return;
}
@@ -253,8 +253,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
info->flags &= ~BNXT_FLAG_PRIMARY_FUNC;
status = bnxt_read_fw_status_reg(bp, BNXT_FW_STATUS_REG);
- PMD_DRV_LOG(INFO,
- "Port: %u Driver recovery watchdog, role: %s, FW status: 0x%x (%s)\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port: %u Driver recovery watchdog, role: %s, FW status: 0x%x (%s)",
port_id, bnxt_is_primary_func(bp) ? "primary" : "backup", status,
(status == BNXT_FW_STATUS_HEALTHY) ? "healthy" : "unhealthy");
@@ -269,15 +269,15 @@ void bnxt_handle_async_event(struct bnxt *bp,
bnxt_schedule_fw_health_check(bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION:
- PMD_DRV_LOG(INFO, "Port: %u DNC event: data1 %#x data2 %#x\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u DNC event: data1 %#x data2 %#x",
port_id, data1, data2);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE:
bnxt_process_default_vnic_change(bp, async_cmp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ECHO_REQUEST:
- PMD_DRV_LOG(INFO,
- "Port %u: Received fw echo request: data1 %#x data2 %#x\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Received fw echo request: data1 %#x data2 %#x",
port_id, data1, data2);
if (bp->recovery_info)
bnxt_hwrm_fw_echo_reply(bp, data1, data2);
@@ -289,7 +289,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
bnxt_process_vf_flr(bp, data1);
break;
default:
- PMD_DRV_LOG(DEBUG, "handle_async_event id = 0x%x\n", event_id);
+ PMD_DRV_LOG_LINE(DEBUG, "handle_async_event id = 0x%x", event_id);
break;
}
}
@@ -305,7 +305,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
int rc;
if (bp->pf->active_vfs <= 0) {
- PMD_DRV_LOG(ERR, "Forwarded VF with no active VFs\n");
+ PMD_DRV_LOG_LINE(ERR, "Forwarded VF with no active VFs");
return;
}
@@ -324,8 +324,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
if (fw_vf_id < bp->pf->first_vf_id ||
fw_vf_id >= bp->pf->first_vf_id + bp->pf->active_vfs) {
- PMD_DRV_LOG(ERR,
- "FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)",
fw_vf_id, bp->pf->first_vf_id,
(bp->pf->first_vf_id) + bp->pf->active_vfs - 1,
bp->pf->first_vf_id, bp->pf->active_vfs);
@@ -363,8 +363,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
/* Forward */
rc = bnxt_hwrm_exec_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to send FWD req VF 0x%x, type 0x%x.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to send FWD req VF 0x%x, type 0x%x.",
fw_vf_id - bp->pf->first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
@@ -374,8 +374,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
reject:
rc = bnxt_hwrm_reject_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to send REJECT req VF 0x%x, type 0x%x.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to send REJECT req VF 0x%x, type 0x%x.",
fw_vf_id - bp->pf->first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
@@ -388,7 +388,7 @@ int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
bool evt = 0;
if (bp == NULL || cmp == NULL) {
- PMD_DRV_LOG(ERR, "invalid NULL argument\n");
+ PMD_DRV_LOG_LINE(ERR, "invalid NULL argument");
return evt;
}
@@ -408,7 +408,7 @@ int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
break;
default:
/* Ignore any other events */
- PMD_DRV_LOG(DEBUG, "Ignoring %02x completion\n", CMP_TYPE(cmp));
+ PMD_DRV_LOG_LINE(DEBUG, "Ignoring %02x completion", CMP_TYPE(cmp));
break;
}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e63febe782..ac717730c1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -432,7 +432,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
if (rc)
goto err_out;
- PMD_DRV_LOG(DEBUG, "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "vnic[%d] = %p vnic->fw_grp_ids = %p",
vnic_id, vnic, vnic->fw_grp_ids);
/* populate the fw group table */
@@ -451,7 +451,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
* Cap max Rx rings to same value
*/
if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_P5) {
- PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
+ PMD_DRV_LOG_LINE(ERR, "RxQ cnt %d > reta_size %d",
bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_P5);
goto err_out;
}
@@ -463,8 +463,8 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
break;
}
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM vnic %d ctx %d alloc failure rc: %x\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM vnic %d ctx %d alloc failure rc: %x",
vnic_id, j, rc);
goto err_out;
}
@@ -492,15 +492,15 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
for (j = 0; j < bp->rx_num_qs_per_vnic; j++) {
rxq = bp->eth_dev->data->rx_queues[j];
- PMD_DRV_LOG(DEBUG,
- "rxq[%d]->vnic=%p vnic->fw_grp_ids=%p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "rxq[%d]->vnic=%p vnic->fw_grp_ids=%p",
j, rxq->vnic, rxq->vnic->fw_grp_ids);
if (BNXT_HAS_RING_GRPS(bp) && rxq->rx_deferred_start)
vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
}
- PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);
+ PMD_DRV_LOG_LINE(DEBUG, "vnic->rx_queue_cnt = %d", vnic->rx_queue_cnt);
rc = bnxt_vnic_rss_configure(bp, vnic);
if (rc)
@@ -516,7 +516,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
return 0;
err_out:
- PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM vnic %d cfg failure rc: %x",
vnic_id, rc);
return rc;
}
@@ -530,9 +530,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"rx_fc_in_tbl.va = %p rx_fc_in_tbl.dma = %p"
- " rx_fc_in_tbl.ctx_id = %d\n",
+ " rx_fc_in_tbl.ctx_id = %d",
bp->flow_stat->rx_fc_in_tbl.va,
(void *)((uintptr_t)bp->flow_stat->rx_fc_in_tbl.dma),
bp->flow_stat->rx_fc_in_tbl.ctx_id);
@@ -542,9 +542,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"rx_fc_out_tbl.va = %p rx_fc_out_tbl.dma = %p"
- " rx_fc_out_tbl.ctx_id = %d\n",
+ " rx_fc_out_tbl.ctx_id = %d",
bp->flow_stat->rx_fc_out_tbl.va,
(void *)((uintptr_t)bp->flow_stat->rx_fc_out_tbl.dma),
bp->flow_stat->rx_fc_out_tbl.ctx_id);
@@ -554,9 +554,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"tx_fc_in_tbl.va = %p tx_fc_in_tbl.dma = %p"
- " tx_fc_in_tbl.ctx_id = %d\n",
+ " tx_fc_in_tbl.ctx_id = %d",
bp->flow_stat->tx_fc_in_tbl.va,
(void *)((uintptr_t)bp->flow_stat->tx_fc_in_tbl.dma),
bp->flow_stat->tx_fc_in_tbl.ctx_id);
@@ -566,9 +566,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"tx_fc_out_tbl.va = %p tx_fc_out_tbl.dma = %p"
- " tx_fc_out_tbl.ctx_id = %d\n",
+ " tx_fc_out_tbl.ctx_id = %d",
bp->flow_stat->tx_fc_out_tbl.va,
(void *)((uintptr_t)bp->flow_stat->tx_fc_out_tbl.dma),
bp->flow_stat->tx_fc_out_tbl.ctx_id);
@@ -706,7 +706,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
rc = bnxt_get_hwrm_link_config(bp, &new);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to get link settings\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to get link settings");
return rc;
}
@@ -723,7 +723,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
(BNXT_LINK_SPEEDS_V2(bp) && dev_conf->link_speeds != curr_speed_bit)) {
rc = bnxt_set_hwrm_link_config(bp, true);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update PHY settings\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to update PHY settings");
return rc;
}
}
@@ -820,19 +820,19 @@ static int bnxt_start_nic(struct bnxt *bp)
rc = bnxt_vnic_queue_db_init(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "could not allocate vnic db\n");
+ PMD_DRV_LOG_LINE(ERR, "could not allocate vnic db");
goto err_out;
}
rc = bnxt_alloc_hwrm_rings(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM ring alloc failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM ring alloc failure rc: %x", rc);
goto err_out;
}
rc = bnxt_alloc_all_hwrm_ring_grps(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM ring grp alloc failure: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM ring grp alloc failure: %x", rc);
goto err_out;
}
@@ -844,8 +844,8 @@ static int bnxt_start_nic(struct bnxt *bp)
struct bnxt_vnic_info *vnic = &bp->vnic_info[j++];
if (!vnic) {
- PMD_DRV_LOG(ERR,
- "Num pools more than FW profile\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Num pools more than FW profile");
rc = -EINVAL;
goto err_out;
}
@@ -857,7 +857,7 @@ static int bnxt_start_nic(struct bnxt *bp)
skip_cosq_cfg:
rc = bnxt_mq_rx_configure(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "MQ mode configure failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "MQ mode configure failure rc: %x", rc);
goto err_out;
}
@@ -893,8 +893,8 @@ static int bnxt_start_nic(struct bnxt *bp)
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM cfa l2 rx mask failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM cfa l2 rx mask failure rc: %x", rc);
goto err_out;
}
@@ -903,9 +903,9 @@ static int bnxt_start_nic(struct bnxt *bp)
!RTE_ETH_DEV_SRIOV(bp->eth_dev).active) &&
bp->eth_dev->data->dev_conf.intr_conf.rxq != 0) {
intr_vector = bp->eth_dev->data->nb_rx_queues;
- PMD_DRV_LOG(DEBUG, "intr_vector = %d\n", intr_vector);
+ PMD_DRV_LOG_LINE(DEBUG, "intr_vector = %d", intr_vector);
if (intr_vector > bp->rx_cp_nr_rings) {
- PMD_DRV_LOG(ERR, "At most %d intr queues supported",
+ PMD_DRV_LOG_LINE(ERR, "At most %d intr queues supported",
bp->rx_cp_nr_rings);
return -ENOTSUP;
}
@@ -917,13 +917,13 @@ static int bnxt_start_nic(struct bnxt *bp)
if (rte_intr_dp_is_en(intr_handle)) {
if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
bp->eth_dev->data->nb_rx_queues)) {
- PMD_DRV_LOG(ERR, "Failed to allocate %d rx_queues"
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate %d rx_queues"
" intr_vec", bp->eth_dev->data->nb_rx_queues);
rc = -ENOMEM;
goto err_out;
}
- PMD_DRV_LOG(DEBUG, "intr_handle->nb_efd = %d "
- "intr_handle->max_intr = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "intr_handle->nb_efd = %d "
+ "intr_handle->max_intr = %d",
rte_intr_nb_efd_get(intr_handle),
rte_intr_max_intr_get(intr_handle));
for (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;
@@ -950,7 +950,7 @@ static int bnxt_start_nic(struct bnxt *bp)
bp->mark_table = rte_zmalloc("bnxt_mark_table", BNXT_MARK_TABLE_SZ, 0);
if (!bp->mark_table)
- PMD_DRV_LOG(ERR, "Allocation of mark table failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Allocation of mark table failed");
return 0;
@@ -1239,7 +1239,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
if (BNXT_VF(bp) && (bp->flags & BNXT_FLAG_NEW_RM)) {
rc = bnxt_hwrm_check_vf_rings(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM insufficient resources\n");
+ PMD_DRV_LOG_LINE(ERR, "HWRM insufficient resources");
return -ENOSPC;
}
@@ -1258,7 +1258,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
rc = bnxt_hwrm_func_reserve_vf_resc(bp, false);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM resource alloc fail:%x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM resource alloc fail:%x", rc);
pthread_mutex_unlock(&bp->def_cp_lock);
return -ENOSPC;
}
@@ -1302,7 +1302,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
/* application provides the hash key to program */
if (rss_conf->rss_key != NULL) {
if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE)
- PMD_DRV_LOG(WARNING, "port %u RSS key len must be %d bytes long",
+ PMD_DRV_LOG_LINE(WARNING, "port %u RSS key len must be %d bytes long",
eth_dev->data->port_id, HW_HASH_KEY_SIZE);
else
memcpy(bp->rss_conf.rss_key, rss_conf->rss_key, HW_HASH_KEY_SIZE);
@@ -1315,14 +1315,14 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
return 0;
resource_error:
- PMD_DRV_LOG(ERR,
- "Insufficient resources to support requested config\n");
- PMD_DRV_LOG(ERR,
- "Num Queues Requested: Tx %d, Rx %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Insufficient resources to support requested config");
+ PMD_DRV_LOG_LINE(ERR,
+ "Num Queues Requested: Tx %d, Rx %d",
eth_dev->data->nb_tx_queues,
eth_dev->data->nb_rx_queues);
- PMD_DRV_LOG(ERR,
- "MAX: TxQ %d, RxQ %d, CQ %d Stat %d, Grp %d, Vnic %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "MAX: TxQ %d, RxQ %d, CQ %d Stat %d, Grp %d, Vnic %d",
bp->max_tx_rings, bp->max_rx_rings, bp->max_cp_rings,
bp->max_stat_ctx, bp->max_ring_grps, bp->max_vnics);
return -ENOSPC;
@@ -1333,13 +1333,13 @@ void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
struct rte_eth_link *link = ð_dev->data->dev_link;
if (link->link_status)
- PMD_DRV_LOG(DEBUG, "Port %d Link Up - speed %u Mbps - %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Port %d Link Up - speed %u Mbps - %s",
eth_dev->data->port_id,
(uint32_t)link->link_speed,
(link->link_duplex == RTE_ETH_LINK_FULL_DUPLEX) ?
- ("full-duplex") : ("half-duplex\n"));
+ ("full-duplex") : ("half-duplex"));
else
- PMD_DRV_LOG(INFO, "Port %d Link Down\n",
+ PMD_DRV_LOG_LINE(INFO, "Port %d Link Down",
eth_dev->data->port_id);
}
@@ -1411,8 +1411,8 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
#if defined(RTE_ARCH_X86)
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1) {
- PMD_DRV_LOG(INFO,
- "Using AVX2 vector mode receive for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using AVX2 vector mode receive for port %d",
eth_dev->data->port_id);
bp->flags |= BNXT_FLAG_RX_VECTOR_PKT_MODE;
if (bnxt_compressed_rx_cqe_mode_enabled(bp))
@@ -1421,8 +1421,8 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
}
#endif
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
- PMD_DRV_LOG(INFO,
- "Using SSE vector mode receive for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using SSE vector mode receive for port %d",
eth_dev->data->port_id);
bp->flags |= BNXT_FLAG_RX_VECTOR_PKT_MODE;
if (bnxt_compressed_rx_cqe_mode_enabled(bp)) {
@@ -1436,10 +1436,10 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
}
use_scalar_rx:
- PMD_DRV_LOG(INFO, "Vector mode receive disabled for port %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Vector mode receive disabled for port %d",
eth_dev->data->port_id);
- PMD_DRV_LOG(INFO,
- "Port %d scatter: %d rx offload: %" PRIX64 "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %d scatter: %d rx offload: %" PRIX64,
eth_dev->data->port_id,
eth_dev->data->scattered_rx,
eth_dev->data->dev_conf.rxmode.offloads);
@@ -1468,24 +1468,24 @@ bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
#if defined(RTE_ARCH_X86)
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1) {
- PMD_DRV_LOG(INFO,
- "Using AVX2 vector mode transmit for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using AVX2 vector mode transmit for port %d",
eth_dev->data->port_id);
return bnxt_xmit_pkts_vec_avx2;
}
#endif
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
- PMD_DRV_LOG(INFO,
- "Using SSE vector mode transmit for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using SSE vector mode transmit for port %d",
eth_dev->data->port_id);
return bnxt_xmit_pkts_vec;
}
use_scalar_tx:
- PMD_DRV_LOG(INFO, "Vector mode transmit disabled for port %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Vector mode transmit disabled for port %d",
eth_dev->data->port_id);
- PMD_DRV_LOG(INFO,
- "Port %d scatter: %d tx offload: %" PRIX64 "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %d scatter: %d tx offload: %" PRIX64,
eth_dev->data->port_id,
eth_dev->data->scattered_rx,
offloads);
@@ -1557,7 +1557,7 @@ static void bnxt_free_switch_domain(struct bnxt *bp)
rc = rte_eth_switch_domain_free(bp->switch_domain_id);
if (rc)
- PMD_DRV_LOG(ERR, "free switch domain:%d fail: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "free switch domain:%d fail: %d",
bp->switch_domain_id, rc);
}
@@ -1581,7 +1581,7 @@ static void bnxt_ptp_get_current_time(void *arg)
rte_spinlock_unlock(&ptp->ptp_lock);
rc = rte_eal_alarm_set(US_PER_S, bnxt_ptp_get_current_time, (void *)bp);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to re-schedule PTP alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-schedule PTP alarm");
bp->flags2 &= ~BNXT_FLAGS2_PTP_ALARM_SCHEDULED;
}
}
@@ -1625,7 +1625,7 @@ static int bnxt_ptp_start(struct bnxt *bp)
rc = bnxt_schedule_ptp_alarm(bp);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to schedule PTP alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to schedule PTP alarm");
} else {
bp->flags2 |= BNXT_FLAGS2_PTP_TIMESYNC_ENABLED;
bp->flags2 |= BNXT_FLAGS2_PTP_ALARM_SCHEDULED;
@@ -1717,8 +1717,8 @@ int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
pthread_mutex_lock(&bp->err_recovery_lock);
if (bp->flags & BNXT_FLAG_FW_RESET) {
- PMD_DRV_LOG(ERR,
- "Adapter recovering from error..Please retry\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Adapter recovering from error..Please retry");
pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
@@ -1735,8 +1735,8 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
- PMD_DRV_LOG(ERR,
- "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d",
bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
do {
@@ -1844,8 +1844,8 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
pthread_mutex_lock(&bp->err_recovery_lock);
if (bp->flags & BNXT_FLAG_FW_RESET) {
- PMD_DRV_LOG(ERR,
- "Adapter recovering from error...Please retry\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Adapter recovering from error...Please retry");
pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
@@ -1912,8 +1912,8 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic,
/* Attach requested MAC address to the new l2_filter */
STAILQ_FOREACH(filter, &vnic->filter, next) {
if (filter->mac_index == index) {
- PMD_DRV_LOG(DEBUG,
- "MAC addr already existed for pool %d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "MAC addr already existed for pool %d",
pool);
return 0;
}
@@ -1921,7 +1921,7 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic,
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "L2 filter alloc failed");
return -ENODEV;
}
@@ -1960,12 +1960,12 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
return rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
- PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot add MAC address to a VF interface");
return -ENOTSUP;
}
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC not found for pool %d!\n", pool);
+ PMD_DRV_LOG_LINE(ERR, "VNIC not found for pool %d!", pool);
return -EINVAL;
}
@@ -2009,8 +2009,8 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
if (rc) {
new.link_speed = RTE_ETH_LINK_SPEED_100M;
new.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
- PMD_DRV_LOG(ERR,
- "Failed to retrieve link rc = 0x%x!\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to retrieve link rc = 0x%x!", rc);
goto out;
}
@@ -2200,14 +2200,14 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
return -EINVAL;
if (reta_size != tbl_size) {
- PMD_DRV_LOG(ERR, "The configured hash table lookup size "
+ PMD_DRV_LOG_LINE(ERR, "The configured hash table lookup size "
"(%d) must equal the size supported by the hardware "
- "(%d)\n", reta_size, tbl_size);
+ "(%d)", reta_size, tbl_size);
return -EINVAL;
}
if (bnxt_vnic_reta_config_update(bp, vnic, reta_conf, reta_size)) {
- PMD_DRV_LOG(ERR, "Error in setting the reta config\n");
+ PMD_DRV_LOG_LINE(ERR, "Error in setting the reta config");
return -EINVAL;
}
for (i = 0; i < reta_size; i++) {
@@ -2254,9 +2254,9 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
return -EINVAL;
if (reta_size != tbl_size) {
- PMD_DRV_LOG(ERR, "The configured hash table lookup size "
+ PMD_DRV_LOG_LINE(ERR, "The configured hash table lookup size "
"(%d) must equal the size supported by the hardware "
- "(%d)\n", reta_size, tbl_size);
+ "(%d)", reta_size, tbl_size);
return -EINVAL;
}
@@ -2274,7 +2274,7 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
qid = bnxt_rss_to_qid(bp, vnic->rss_table[i]);
if (qid == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR, "Inv. entry in rss table.\n");
+ PMD_DRV_LOG_LINE(ERR, "Inv. entry in rss table.");
return -EINVAL;
}
reta_conf[idx].reta[sft] = qid;
@@ -2302,7 +2302,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
*/
if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
if (!rss_conf->rss_hf)
- PMD_DRV_LOG(ERR, "Hash type NONE\n");
+ PMD_DRV_LOG_LINE(ERR, "Hash type NONE");
} else {
if (rss_conf->rss_hf & bnxt_eth_rss_support(bp))
return -EINVAL;
@@ -2332,8 +2332,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
goto rss_config;
if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE) {
- PMD_DRV_LOG(ERR,
- "Invalid hashkey length, should be %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid hashkey length, should be %d bytes",
HW_HASH_KEY_SIZE);
return -EINVAL;
}
@@ -2421,8 +2421,8 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
return rc;
if (!BNXT_SINGLE_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Flow Control Settings cannot be modified on VF or on shared PF\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Flow Control Settings cannot be modified on VF or on shared PF");
return -ENOTSUP;
}
@@ -2486,10 +2486,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
switch (udp_tunnel->prot_type) {
case RTE_ETH_TUNNEL_TYPE_VXLAN:
if (bp->vxlan_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->vxlan_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->vxlan_port_cnt++;
@@ -2500,10 +2500,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_GENEVE:
if (bp->geneve_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->geneve_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->geneve_port_cnt++;
@@ -2514,10 +2514,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_ECPRI:
if (bp->ecpri_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->ecpri_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->ecpri_port_cnt++;
@@ -2527,7 +2527,7 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI;
break;
default:
- PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Tunnel type is not supported");
return -ENOTSUP;
}
rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port,
@@ -2567,11 +2567,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
switch (udp_tunnel->prot_type) {
case RTE_ETH_TUNNEL_TYPE_VXLAN:
if (!bp->vxlan_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->vxlan_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->vxlan_port);
return -EINVAL;
}
@@ -2584,11 +2584,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_GENEVE:
if (!bp->geneve_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->geneve_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->geneve_port);
return -EINVAL;
}
@@ -2601,11 +2601,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_ECPRI:
if (!bp->ecpri_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->ecpri_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->ecpri_port);
return -EINVAL;
}
@@ -2617,7 +2617,7 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
port = bp->ecpri_fw_dst_port_id;
break;
default:
- PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Tunnel type is not supported");
return -ENOTSUP;
}
@@ -2644,8 +2644,8 @@ static int bnxt_del_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
STAILQ_REMOVE(&vnic->filter, filter,
bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
- PMD_DRV_LOG(INFO,
- "Deleted vlan filter for %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Deleted vlan filter for %d",
vlan_id);
return 0;
}
@@ -2686,8 +2686,8 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
*/
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR,
- "MAC/VLAN filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "MAC/VLAN filter alloc failed");
return -ENOMEM;
}
/* MAC + VLAN ID filter */
@@ -2718,8 +2718,8 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
else
STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
- PMD_DRV_LOG(INFO,
- "Added Vlan filter for %d\n", vlan_id);
+ PMD_DRV_LOG_LINE(INFO,
+ "Added Vlan filter for %d", vlan_id);
return rc;
}
@@ -2734,7 +2734,7 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
return rc;
if (!eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "port must be started before setting vlan\n");
+ PMD_DRV_LOG_LINE(ERR, "port must be started before setting vlan");
return -EINVAL;
}
@@ -2796,7 +2796,7 @@ bnxt_config_vlan_hw_filter(struct bnxt *bp, uint64_t rx_offloads)
/* This filter will allow only untagged packets */
bnxt_add_vlan_filter(bp, 0);
}
- PMD_DRV_LOG(DEBUG, "VLAN Filtering: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN Filtering: %d",
!!(rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER));
return 0;
@@ -2868,7 +2868,7 @@ bnxt_config_vlan_hw_stripping(struct bnxt *bp, uint64_t rx_offloads)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG, "VLAN Strip Offload: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN Strip Offload: %d",
!!(rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP));
return rc;
@@ -2905,9 +2905,9 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
- PMD_DRV_LOG(DEBUG, "Extend VLAN supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Extend VLAN supported");
else
- PMD_DRV_LOG(INFO, "Extend VLAN unsupported\n");
+ PMD_DRV_LOG_LINE(INFO, "Extend VLAN unsupported");
}
return 0;
@@ -2923,14 +2923,14 @@ bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type,
if (vlan_type != RTE_ETH_VLAN_TYPE_INNER &&
vlan_type != RTE_ETH_VLAN_TYPE_OUTER) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Unsupported vlan type.");
return -EINVAL;
}
if (!qinq) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"QinQ not enabled. Needs to be ON as we can "
- "accelerate only outer vlan\n");
+ "accelerate only outer vlan");
return -EINVAL;
}
@@ -2957,14 +2957,14 @@ bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type,
TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300;
break;
default:
- PMD_DRV_LOG(ERR, "Invalid TPID: %x\n", tpid);
+ PMD_DRV_LOG_LINE(ERR, "Invalid TPID: %x", tpid);
return -EINVAL;
}
bp->outer_tpid_bd |= tpid;
- PMD_DRV_LOG(INFO, "outer_tpid_bd = %x\n", bp->outer_tpid_bd);
+ PMD_DRV_LOG_LINE(INFO, "outer_tpid_bd = %x", bp->outer_tpid_bd);
} else if (vlan_type == RTE_ETH_VLAN_TYPE_INNER) {
- PMD_DRV_LOG(ERR,
- "Can accelerate only outer vlan in QinQ\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Can accelerate only outer vlan in QinQ");
return -EINVAL;
}
@@ -3009,7 +3009,7 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
rc = bnxt_add_mac_filter(bp, vnic, addr, 0, 0);
}
- PMD_DRV_LOG(DEBUG, "Set MAC addr\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Set MAC addr");
return rc;
}
@@ -3032,16 +3032,16 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
bp->nb_mc_addr = nb_mc_addr;
if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
- PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%u) exceeded Max supported (%u)\n",
+ PMD_DRV_LOG_LINE(INFO, "Number of Mcast MACs added (%u) exceeded Max supported (%u)",
nb_mc_addr, BNXT_MAX_MC_ADDRS);
- PMD_DRV_LOG(INFO, "Turning on Mcast promiscuous mode\n");
+ PMD_DRV_LOG_LINE(INFO, "Turning on Mcast promiscuous mode");
vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
goto allmulti;
}
/* TODO Check for Duplicate mcast addresses */
if (vnic->flags & BNXT_VNIC_INFO_ALLMULTI) {
- PMD_DRV_LOG(INFO, "Turning off Mcast promiscuous mode\n");
+ PMD_DRV_LOG_LINE(INFO, "Turning off Mcast promiscuous mode");
vnic->flags &= ~BNXT_VNIC_INFO_ALLMULTI;
}
for (i = 0; i < nb_mc_addr; i++)
@@ -3213,7 +3213,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
/* Return if port is active */
if (eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "Stop port before changing MTU\n");
+ PMD_DRV_LOG_LINE(ERR, "Stop port before changing MTU");
return -EBUSY;
}
@@ -3232,14 +3232,14 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
rc = bnxt_vnic_mru_config(bp, new_mtu);
if (rc) {
- PMD_DRV_LOG(ERR, "failed to update mtu in vnic context\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to update mtu in vnic context");
return rc;
}
if (bnxt_hwrm_config_host_mtu(bp))
- PMD_DRV_LOG(WARNING, "Failed to configure host MTU\n");
+ PMD_DRV_LOG_LINE(WARNING, "Failed to configure host MTU");
- PMD_DRV_LOG(INFO, "New MTU is %d\n", new_mtu);
+ PMD_DRV_LOG_LINE(INFO, "New MTU is %d", new_mtu);
return rc;
}
@@ -3256,7 +3256,7 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
return rc;
if (!BNXT_SINGLE_PF(bp)) {
- PMD_DRV_LOG(ERR, "PVID cannot be modified on VF or on shared PF\n");
+ PMD_DRV_LOG_LINE(ERR, "PVID cannot be modified on VF or on shared PF");
return -ENOTSUP;
}
bp->vlan = on ? pvid : 0;
@@ -3532,7 +3532,7 @@ bnxt_flow_ops_get_op(struct rte_eth_dev *dev,
bp = vfr->parent_dev->data->dev_private;
/* parent is deleted while children are still valid */
if (!bp) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR Error\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR Error",
dev->data->port_id);
return -EIO;
}
@@ -3910,7 +3910,7 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT "\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT,
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function);
@@ -3934,7 +3934,7 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d",
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function,
in_eeprom->offset, in_eeprom->length);
@@ -4010,13 +4010,13 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d",
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function,
in_eeprom->offset, in_eeprom->length);
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "NVM write not supported from a VF\n");
+ PMD_DRV_LOG_LINE(ERR, "NVM write not supported from a VF");
return -EINVAL;
}
@@ -4061,14 +4061,14 @@ static int bnxt_get_module_info(struct rte_eth_dev *dev,
*/
if (bp->link_info->module_status >
HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_WARNINGMSG) {
- PMD_DRV_LOG(NOTICE, "Port %u : Module is not inserted or is powered down\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Module is not inserted or is powered down",
dev->data->port_id);
return -ENOTSUP;
}
/* This feature is not supported in older firmware versions */
if (bp->hwrm_spec_code < 0x10202) {
- PMD_DRV_LOG(NOTICE, "Port %u : Feature is not supported in older firmware\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Feature is not supported in older firmware",
dev->data->port_id);
return -ENOTSUP;
}
@@ -4099,11 +4099,11 @@ static int bnxt_get_module_info(struct rte_eth_dev *dev,
modinfo->eeprom_len = RTE_ETH_MODULE_SFF_8636_LEN;
break;
default:
- PMD_DRV_LOG(NOTICE, "Port %u : Unsupported module\n", dev->data->port_id);
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Unsupported module", dev->data->port_id);
return -ENOTSUP;
}
- PMD_DRV_LOG(INFO, "Port %u : modinfo->type = %d modinfo->eeprom_len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Port %u : modinfo->type = %d modinfo->eeprom_len = %d",
dev->data->port_id, modinfo->type, modinfo->eeprom_len);
return 0;
@@ -4327,7 +4327,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
case BNXT_FW_STATUS_REG_TYPE_CFG:
ret = rte_pci_write_config(bp->pdev, &val, sizeof(val), offset);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to write %#x at PCI offset %#x",
+ PMD_DRV_LOG_LINE(ERR, "Failed to write %#x at PCI offset %#x",
val, offset);
return;
}
@@ -4365,7 +4365,8 @@ bnxt_check_fw_reset_done(struct bnxt *bp)
do {
rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset 0x%x",
+ PCI_SUBSYSTEM_ID_OFFSET);
return rc;
}
if (val != 0xffff)
@@ -4374,7 +4375,7 @@ bnxt_check_fw_reset_done(struct bnxt *bp)
} while (timeout--);
if (val == 0xffff) {
- PMD_DRV_LOG(ERR, "Firmware reset aborted, PCI config space invalid\n");
+ PMD_DRV_LOG_LINE(ERR, "Firmware reset aborted, PCI config space invalid");
return -1;
}
@@ -4453,7 +4454,7 @@ static int bnxt_restore_mcast_mac_filters(struct bnxt *bp)
ret = bnxt_dev_set_mc_addr_list_op(bp->eth_dev, bp->mcast_addr_list,
bp->nb_mc_addr);
if (ret)
- PMD_DRV_LOG(ERR, "Failed to restore multicast MAC addreeses\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to restore multicast MAC addreeses");
return ret;
}
@@ -4504,7 +4505,7 @@ static int bnxt_check_fw_ready(struct bnxt *bp)
} while (rc && timeout > 0);
if (rc)
- PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
+ PMD_DRV_LOG_LINE(ERR, "FW is not Ready after reset");
return rc;
}
@@ -4524,7 +4525,7 @@ static void bnxt_dev_recover(void *arg)
/* Clear Error flag so that device re-init should happen */
bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
- PMD_DRV_LOG(INFO, "Port: %u Starting recovery...\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Starting recovery...",
bp->eth_dev->data->port_id);
rc = bnxt_check_fw_ready(bp);
@@ -4533,8 +4534,8 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_init_resources(bp, true);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize resources after reset\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize resources after reset");
goto err;
}
/* clear reset flag as the device is initialized now */
@@ -4542,7 +4543,7 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_dev_start_op(bp->eth_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to start port after reset\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to start port after reset");
goto err_start;
}
@@ -4556,7 +4557,7 @@ static void bnxt_dev_recover(void *arg)
bp->eth_dev->tx_pkt_burst;
rte_mb();
- PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Recovered from FW reset",
bp->eth_dev->data->port_id);
pthread_mutex_unlock(&bp->err_recovery_lock);
rte_eth_dev_callback_process(bp->eth_dev,
@@ -4576,7 +4577,7 @@ static void bnxt_dev_recover(void *arg)
RTE_ETH_EVENT_INTR_RMV,
NULL);
pthread_mutex_unlock(&bp->err_recovery_lock);
- PMD_DRV_LOG(ERR, "Port %u: Failed to recover from FW reset\n",
+ PMD_DRV_LOG_LINE(ERR, "Port %u: Failed to recover from FW reset",
bp->eth_dev->data->port_id);
}
@@ -4588,7 +4589,7 @@ void bnxt_dev_reset_and_resume(void *arg)
int rc;
bnxt_dev_cleanup(bp);
- PMD_DRV_LOG(INFO, "Port: %u Finished bnxt_dev_cleanup\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Finished bnxt_dev_cleanup",
bp->eth_dev->data->port_id);
bnxt_wait_for_device_shutdown(bp);
@@ -4602,7 +4603,8 @@ void bnxt_dev_reset_and_resume(void *arg)
if (bp->flags & BNXT_FLAG_FATAL_ERROR) {
rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset 0x%x",
+ PCI_SUBSYSTEM_ID_OFFSET);
return;
}
if (val == 0xffff) {
@@ -4613,7 +4615,7 @@ void bnxt_dev_reset_and_resume(void *arg)
rc = rte_eal_alarm_set(us, bnxt_dev_recover, (void *)bp);
if (rc)
- PMD_DRV_LOG(ERR, "Port %u: Error setting recovery alarm",
+ PMD_DRV_LOG_LINE(ERR, "Port %u: Error setting recovery alarm",
bp->eth_dev->data->port_id);
}
@@ -4631,7 +4633,7 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)
case BNXT_FW_STATUS_REG_TYPE_CFG:
ret = rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
if (ret < 0)
- PMD_DRV_LOG(ERR, "Failed to read PCI offset %#x",
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset %#x",
offset);
break;
case BNXT_FW_STATUS_REG_TYPE_GRC:
@@ -4662,7 +4664,7 @@ static int bnxt_fw_reset_all(struct bnxt *bp)
/* Reset with the help of Kong processor */
rc = bnxt_hwrm_fw_reset(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to reset FW\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to reset FW");
}
return rc;
@@ -4679,7 +4681,7 @@ static void bnxt_fw_reset_cb(void *arg)
bnxt_is_recovery_enabled(bp)) {
rc = bnxt_fw_reset_all(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Adapter recovery failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Adapter recovery failed");
return;
}
}
@@ -4740,7 +4742,7 @@ static void bnxt_check_fw_health(void *arg)
bnxt_stop_rxtx(bp->eth_dev);
- PMD_DRV_LOG(ERR, "Detected FW dead condition\n");
+ PMD_DRV_LOG_LINE(ERR, "Detected FW dead condition");
rte_eth_dev_callback_process(bp->eth_dev,
RTE_ETH_EVENT_ERR_RECOVERING,
@@ -4871,7 +4873,7 @@ static int bnxt_map_pci_bars(struct rte_eth_dev *eth_dev)
bp->bar0 = (void *)pci_dev->mem_resource[0].addr;
bp->doorbell_base = (void *)pci_dev->mem_resource[2].addr;
if (!bp->bar0 || !bp->doorbell_base) {
- PMD_DRV_LOG(ERR, "Unable to access Hardware\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to access Hardware");
return -ENODEV;
}
@@ -5134,8 +5136,8 @@ int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp)
ctxm->max_entries);
ctx_pg[i].entries = entries;
mem_size = ctxm->entry_size * entries;
- PMD_DRV_LOG(DEBUG,
- "Type:0x%x instance:%d entries:%d size:%d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Type:0x%x instance:%d entries:%d size:%d",
ctxm->type, i, ctx_pg[i].entries, mem_size);
rc = bnxt_alloc_ctx_mem_blk(bp, &ctx_pg[i],
ctxm->init_value ? ctxm : NULL,
@@ -5186,7 +5188,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
rc = bnxt_hwrm_func_backing_store_qcaps(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Query context mem capability failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Query context mem capability failed");
return rc;
}
@@ -5270,8 +5272,8 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
rc = bnxt_hwrm_func_backing_store_cfg(bp, ena);
done:
if (rc)
- PMD_DRV_LOG(ERR,
- "Failed to configure context mem: rc = %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to configure context mem: rc = %d", rc);
else
ctx->flags |= BNXT_CTX_FLAG_INITED;
@@ -5375,14 +5377,14 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
int rc = 0;
if (bp->max_l2_ctx > RTE_ETH_NUM_RECEIVE_MAC_ADDR)
- PMD_DRV_LOG(INFO, "Max number of MAC addrs supported is %d, but will be limited to %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Max number of MAC addrs supported is %d, but will be limited to %d",
bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
RTE_ETHER_ADDR_LEN * max_mac_addr,
0);
if (eth_dev->data->mac_addrs == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc MAC addr tbl\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc MAC addr tbl");
return -ENOMEM;
}
@@ -5391,10 +5393,10 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
return -EINVAL;
/* Generate a random MAC address, if none was assigned by PF */
- PMD_DRV_LOG(INFO, "VF MAC address not assigned by Host PF\n");
+ PMD_DRV_LOG_LINE(INFO, "VF MAC address not assigned by Host PF");
bnxt_eth_hw_addr_random(bp->mac_addr);
- PMD_DRV_LOG(INFO,
- "Assign random MAC:" RTE_ETHER_ADDR_PRT_FMT "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Assign random MAC:" RTE_ETHER_ADDR_PRT_FMT,
bp->mac_addr[0], bp->mac_addr[1], bp->mac_addr[2],
bp->mac_addr[3], bp->mac_addr[4], bp->mac_addr[5]);
@@ -5414,12 +5416,12 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
sizeof(struct rte_ether_addr) *
BNXT_MAX_MC_ADDRS, 0);
if (bp->mcast_addr_list == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate multicast addr table\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate multicast addr table");
return -ENOMEM;
}
bp->mc_list_dma_addr = rte_malloc_virt2iova(bp->mcast_addr_list);
if (bp->mc_list_dma_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR, "Fail to map mcast_addr_list to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR, "Fail to map mcast_addr_list to physical memory");
return -ENOMEM;
}
@@ -5437,7 +5439,7 @@ static int bnxt_restore_dflt_mac(struct bnxt *bp)
/* Restore the old MAC configured */
rc = bnxt_hwrm_set_mac(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to restore MAC address\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to restore MAC address");
return rc;
}
@@ -5488,7 +5490,7 @@ static void bnxt_check_fw_status(struct bnxt *bp)
fw_status = bnxt_read_fw_status_reg(bp, BNXT_FW_STATUS_REG);
if (fw_status != BNXT_FW_STATUS_HEALTHY)
- PMD_DRV_LOG(ERR, "Firmware not responding, status: %#x\n",
+ PMD_DRV_LOG_LINE(ERR, "Firmware not responding, status: %#x",
fw_status);
}
@@ -5619,25 +5621,25 @@ bnxt_init_locks(struct bnxt *bp)
err = pthread_mutex_init(&bp->flow_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize flow_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
return err;
}
err = pthread_mutex_init(&bp->def_cp_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
return err;
}
err = pthread_mutex_init(&bp->health_check_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize health_check_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
return err;
}
err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
if (err)
- PMD_DRV_LOG(ERR, "Unable to initialize err_recovery_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
return err;
}
@@ -5650,11 +5652,11 @@ static int bnxt_alloc_switch_domain(struct bnxt *bp)
if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) {
rc = rte_eth_switch_domain_alloc(&bp->switch_domain_id);
if (rc)
- PMD_DRV_LOG(ERR,
- "Failed to alloc switch domain: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc switch domain: %d", rc);
else
- PMD_DRV_LOG(INFO,
- "Switch domain allocated %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Switch domain allocated %d",
bp->switch_domain_id);
}
@@ -5689,7 +5691,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
rc = bnxt_hwrm_func_driver_register(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to register driver");
+ PMD_DRV_LOG_LINE(ERR, "Failed to register driver");
return -EBUSY;
}
@@ -5697,13 +5699,13 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
if (bp->pdev->max_vfs) {
rc = bnxt_hwrm_allocate_vfs(bp, bp->pdev->max_vfs);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate VFs\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate VFs");
return rc;
}
} else {
rc = bnxt_hwrm_allocate_pf_only(bp);
if (rc) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Failed to allocate PF resources");
return rc;
}
@@ -5714,7 +5716,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
bp->rss_conf.rss_key = rte_zmalloc("bnxt_rss_key",
HW_HASH_KEY_SIZE, 0);
if (bp->rss_conf.rss_key == NULL) {
- PMD_DRV_LOG(ERR, "port %u cannot allocate RSS hash key memory",
+ PMD_DRV_LOG_LINE(ERR, "port %u cannot allocate RSS hash key memory",
bp->eth_dev->data->port_id);
return -ENOMEM;
}
@@ -5734,7 +5736,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
rc = bnxt_init_ctx_mem(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to init adv_flow_counters\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to init adv_flow_counters");
return rc;
}
@@ -5750,28 +5752,28 @@ bnxt_parse_devarg_flow_xstat(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to flow_xstat devarg.");
return -EINVAL;
}
flow_xstat = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(flow_xstat == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to flow_xstat devarg.");
return -EINVAL;
}
if (BNXT_DEVARG_FLOW_XSTAT_INVALID(flow_xstat)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to flow_xstat devarg.");
return -EINVAL;
}
bp->flags |= BNXT_FLAG_FLOW_XSTATS_EN;
if (BNXT_FLOW_XSTATS_EN(bp))
- PMD_DRV_LOG(INFO, "flow_xstat feature enabled.\n");
+ PMD_DRV_LOG_LINE(INFO, "flow_xstat feature enabled.");
return 0;
}
@@ -5785,28 +5787,28 @@ bnxt_parse_devarg_max_num_kflows(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to max_num_kflows devarg.");
return -EINVAL;
}
max_num_kflows = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(max_num_kflows == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to max_num_kflows devarg.");
return -EINVAL;
}
if (bnxt_devarg_max_num_kflow_invalid(max_num_kflows)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to max_num_kflows devarg.");
return -EINVAL;
}
bp->max_num_kflows = max_num_kflows;
if (bp->max_num_kflows)
- PMD_DRV_LOG(INFO, "max_num_kflows set as %ldK.\n",
+ PMD_DRV_LOG_LINE(INFO, "max_num_kflows set as %ldK.",
max_num_kflows);
return 0;
@@ -5821,30 +5823,30 @@ bnxt_parse_devarg_cqe_mode(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to cqe-mode "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
cqe_mode = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(cqe_mode == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to cqe-mode "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_CQE_MODE_INVALID(cqe_mode)) {
- PMD_DRV_LOG(ERR, "Invalid cqe-mode(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid cqe-mode(%d) devargs.",
(uint16_t)cqe_mode);
return -EINVAL;
}
if (cqe_mode == 1)
bp->flags2 |= BNXT_FLAGS2_COMPRESSED_RX_CQE;
- PMD_DRV_LOG(INFO, "cqe-mode=%d feature enabled.\n", (uint8_t)cqe_mode);
+ PMD_DRV_LOG_LINE(INFO, "cqe-mode=%d feature enabled.", (uint8_t)cqe_mode);
return 0;
}
@@ -5858,29 +5860,29 @@ bnxt_parse_devarg_app_id(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to app-id "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
app_id = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(app_id == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to app_id "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_APP_ID_INVALID(app_id)) {
- PMD_DRV_LOG(ERR, "Invalid app-id(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid app-id(%d) devargs.",
(uint16_t)app_id);
return -EINVAL;
}
bp->app_id = app_id;
- PMD_DRV_LOG(INFO, "app-id=%d feature enabled.\n", (uint16_t)app_id);
+ PMD_DRV_LOG_LINE(INFO, "app-id=%d feature enabled.", (uint16_t)app_id);
return 0;
}
@@ -5894,29 +5896,29 @@ bnxt_parse_devarg_ieee_1588(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to ieee-1588 "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
ieee_1588 = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(ieee_1588 == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to ieee_1588 "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_IEEE_1588_INVALID(ieee_1588)) {
- PMD_DRV_LOG(ERR, "Invalid ieee-1588(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid ieee-1588(%d) devargs.",
(uint16_t)ieee_1588);
return -EINVAL;
}
bp->ieee_1588 = ieee_1588;
- PMD_DRV_LOG(INFO, "ieee-1588=%d feature enabled.\n", (uint16_t)ieee_1588);
+ PMD_DRV_LOG_LINE(INFO, "ieee-1588=%d feature enabled.", (uint16_t)ieee_1588);
return 0;
}
@@ -5930,30 +5932,30 @@ bnxt_parse_devarg_rep_is_pf(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to rep_is_pf devargs.");
return -EINVAL;
}
rep_is_pf = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_is_pf == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to rep_is_pf devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_IS_PF_INVALID(rep_is_pf)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_is_pf devargs.");
return -EINVAL;
}
vfr_bp->flags |= rep_is_pf;
if (BNXT_REP_PF(vfr_bp))
- PMD_DRV_LOG(INFO, "PF representor\n");
+ PMD_DRV_LOG_LINE(INFO, "PF representor");
else
- PMD_DRV_LOG(INFO, "VF representor\n");
+ PMD_DRV_LOG_LINE(INFO, "VF representor");
return 0;
}
@@ -5967,31 +5969,31 @@ bnxt_parse_devarg_rep_based_pf(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_based_pf "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_based_pf = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_based_pf == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_based_pf "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_BASED_PF_INVALID(rep_based_pf)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_based_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_based_pf devargs.");
return -EINVAL;
}
vfr_bp->rep_based_pf = rep_based_pf;
vfr_bp->flags |= BNXT_REP_BASED_PF_VALID;
- PMD_DRV_LOG(INFO, "rep-based-pf = %d\n", vfr_bp->rep_based_pf);
+ PMD_DRV_LOG_LINE(INFO, "rep-based-pf = %d", vfr_bp->rep_based_pf);
return 0;
}
@@ -6005,30 +6007,30 @@ bnxt_parse_devarg_rep_q_r2f(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_q_r2f = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_q_r2f == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_Q_R2F_INVALID(rep_q_r2f)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_q_r2f devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_q_r2f devargs.");
return -EINVAL;
}
vfr_bp->rep_q_r2f = rep_q_r2f;
vfr_bp->flags |= BNXT_REP_Q_R2F_VALID;
- PMD_DRV_LOG(INFO, "rep-q-r2f = %d\n", vfr_bp->rep_q_r2f);
+ PMD_DRV_LOG_LINE(INFO, "rep-q-r2f = %d", vfr_bp->rep_q_r2f);
return 0;
}
@@ -6042,30 +6044,30 @@ bnxt_parse_devarg_rep_q_f2r(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_q_f2r = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_q_f2r == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_Q_F2R_INVALID(rep_q_f2r)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_q_f2r devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_q_f2r devargs.");
return -EINVAL;
}
vfr_bp->rep_q_f2r = rep_q_f2r;
vfr_bp->flags |= BNXT_REP_Q_F2R_VALID;
- PMD_DRV_LOG(INFO, "rep-q-f2r = %d\n", vfr_bp->rep_q_f2r);
+ PMD_DRV_LOG_LINE(INFO, "rep-q-f2r = %d", vfr_bp->rep_q_f2r);
return 0;
}
@@ -6079,30 +6081,30 @@ bnxt_parse_devarg_rep_fc_r2f(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_fc_r2f = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_fc_r2f == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_FC_R2F_INVALID(rep_fc_r2f)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_fc_r2f devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_fc_r2f devargs.");
return -EINVAL;
}
vfr_bp->flags |= BNXT_REP_FC_R2F_VALID;
vfr_bp->rep_fc_r2f = rep_fc_r2f;
- PMD_DRV_LOG(INFO, "rep-fc-r2f = %lu\n", rep_fc_r2f);
+ PMD_DRV_LOG_LINE(INFO, "rep-fc-r2f = %lu", rep_fc_r2f);
return 0;
}
@@ -6116,30 +6118,30 @@ bnxt_parse_devarg_rep_fc_f2r(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_fc_f2r = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_fc_f2r == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_FC_F2R_INVALID(rep_fc_f2r)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_fc_f2r devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_fc_f2r devargs.");
return -EINVAL;
}
vfr_bp->flags |= BNXT_REP_FC_F2R_VALID;
vfr_bp->rep_fc_f2r = rep_fc_f2r;
- PMD_DRV_LOG(INFO, "rep-fc-f2r = %lu\n", rep_fc_f2r);
+ PMD_DRV_LOG_LINE(INFO, "rep-fc-f2r = %lu", rep_fc_f2r);
return 0;
}
@@ -6229,8 +6231,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
rc = bnxt_map_pci_bars(eth_dev);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize board rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize board rc: %x", rc);
return rc;
}
@@ -6248,8 +6250,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
rc = bnxt_alloc_hwrm_resources(bp);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate response buffer rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate response buffer rc: %x", rc);
return rc;
}
rc = bnxt_alloc_leds_info(bp);
@@ -6278,8 +6280,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
bnxt_cfa_code_dynfield_offset =
rte_mbuf_dynfield_register(&bnxt_cfa_code_dynfield_desc);
if (bnxt_cfa_code_dynfield_offset < 0) {
- PMD_DRV_LOG(ERR,
- "Failed to register mbuf field for TruFlow mark\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to register mbuf field for TruFlow mark");
return -rte_errno;
}
}
@@ -6296,7 +6298,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
int rc;
if (version_printed++ == 0)
- PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
+ PMD_DRV_LOG_LINE(INFO, "%s", bnxt_version);
eth_dev->dev_ops = &bnxt_dev_ops;
eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
@@ -6338,8 +6340,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
if (rc)
goto error_free;
- PMD_DRV_LOG(INFO,
- "Found %s device at mem %" PRIX64 ", node addr %pM\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Found %s device at mem %" PRIX64 ", node addr %pM",
DRV_MODULE_NAME,
pci_dev->mem_resource[0].phys_addr,
pci_dev->mem_resource[0].addr);
@@ -6460,7 +6462,7 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return -EPERM;
- PMD_DRV_LOG(DEBUG, "Calling Device uninit\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Calling Device uninit");
if (eth_dev->state != RTE_ETH_DEV_UNUSED)
bnxt_dev_close_op(eth_dev);
@@ -6481,11 +6483,11 @@ static int bnxt_pci_remove_dev_with_reps(struct rte_eth_dev *eth_dev)
vf_rep_eth_dev = bp->rep_info[i].vfr_eth_dev;
if (!vf_rep_eth_dev)
continue;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR pci remove\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR pci remove",
vf_rep_eth_dev->data->port_id);
rte_eth_dev_destroy(vf_rep_eth_dev, bnxt_representor_uninit);
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci remove\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci remove",
eth_dev->data->port_id);
ret = rte_eth_dev_destroy(eth_dev, bnxt_dev_uninit);
@@ -6511,14 +6513,14 @@ static int bnxt_init_rep_info(struct bnxt *bp)
sizeof(bp->rep_info[0]) * BNXT_MAX_VF_REPS(bp),
0);
if (!bp->rep_info) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for rep info\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for rep info");
return -ENOMEM;
}
bp->cfa_code_map = rte_zmalloc("bnxt_cfa_code_map",
sizeof(*bp->cfa_code_map) *
BNXT_MAX_CFA_CODE, 0);
if (!bp->cfa_code_map) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for cfa_code_map\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for cfa_code_map");
bnxt_free_rep_info(bp);
return -ENOMEM;
}
@@ -6528,7 +6530,7 @@ static int bnxt_init_rep_info(struct bnxt *bp)
rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Unable to initialize vfr_start_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
bnxt_free_rep_info(bp);
return rc;
}
@@ -6553,27 +6555,27 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
if (eth_da->type == RTE_ETH_REPRESENTOR_NONE)
return 0;
if (eth_da->type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type %d\n",
+ PMD_DRV_LOG_LINE(ERR, "unsupported representor type %d",
eth_da->type);
return -ENOTSUP;
}
num_rep = eth_da->nb_representor_ports;
if (num_rep > max_vf_reps) {
- PMD_DRV_LOG(ERR, "nb_representor_ports = %d > %d MAX VF REPS\n",
+ PMD_DRV_LOG_LINE(ERR, "nb_representor_ports = %d > %d MAX VF REPS",
num_rep, max_vf_reps);
return -EINVAL;
}
if (num_rep >= RTE_MAX_ETHPORTS) {
- PMD_DRV_LOG(ERR,
- "nb_representor_ports = %d > %d MAX ETHPORTS\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "nb_representor_ports = %d > %d MAX ETHPORTS",
num_rep, RTE_MAX_ETHPORTS);
return -EINVAL;
}
if (!(BNXT_PF(backing_bp) || BNXT_VF_IS_TRUSTED(backing_bp))) {
- PMD_DRV_LOG(ERR,
- "Not a PF or trusted VF. No Representor support\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Not a PF or trusted VF. No Representor support");
/* Returning an error is not an option.
* Applications are not handling this correctly
*/
@@ -6591,7 +6593,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
};
if (representor.vf_id >= max_vf_reps) {
- PMD_DRV_LOG(ERR, "VF-Rep id %d >= %d MAX VF ID\n",
+ PMD_DRV_LOG_LINE(ERR, "VF-Rep id %d >= %d MAX VF ID",
representor.vf_id, max_vf_reps);
continue;
}
@@ -6683,20 +6685,20 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
bnxt_representor_init,
&representor);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to create bnxt vf "
+ PMD_DRV_LOG_LINE(ERR, "failed to create bnxt vf "
"representor %s.", name);
goto err;
}
vf_rep_eth_dev = rte_eth_dev_allocated(name);
if (!vf_rep_eth_dev) {
- PMD_DRV_LOG(ERR, "Failed to find the eth_dev"
+ PMD_DRV_LOG_LINE(ERR, "Failed to find the eth_dev"
" for VF-Rep: %s.", name);
ret = -ENODEV;
goto err;
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR pci probe\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR pci probe",
backing_eth_dev->data->port_id);
backing_bp->rep_info[representor.vf_id].vfr_eth_dev =
vf_rep_eth_dev;
@@ -6735,7 +6737,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
num_rep = eth_da.nb_representor_ports;
- PMD_DRV_LOG(DEBUG, "nb_representor_ports = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "nb_representor_ports = %d",
num_rep);
/* We could come here after first level of probe is already invoked
@@ -6754,7 +6756,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
backing_eth_dev = rte_eth_dev_allocated(pci_dev->device.name);
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci probe\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci probe",
backing_eth_dev->data->port_id);
if (!num_rep)
@@ -6779,7 +6781,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
* +ve value will at least help in proper cleanup
*/
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci remove\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci remove", eth_dev->data->port_id);
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
if (rte_eth_dev_is_repr(eth_dev))
return rte_eth_dev_destroy(eth_dev,
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index ff563f08bb..7b90ba651f 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -28,7 +28,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
filter = bnxt_get_unused_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "No more free filter resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free filter resources");
return NULL;
}
@@ -49,7 +49,7 @@ struct bnxt_filter_info *bnxt_alloc_vf_filter(struct bnxt *bp, uint16_t vf)
filter = rte_zmalloc("bnxt_vf_filter_info", sizeof(*filter), 0);
if (!filter) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for VF %hu filters\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for VF %hu filters",
vf);
return NULL;
}
@@ -126,20 +126,20 @@ void bnxt_free_filter_mem(struct bnxt *bp)
/* Call HWRM to try to free filter again */
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
if (rc)
- PMD_DRV_LOG(ERR,
- "Cannot free ntuple filter: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot free ntuple filter: %d",
rc);
}
filter->fw_ntuple_filter_id = UINT64_MAX;
if (filter->fw_l2_filter_id != ((uint64_t)-1) &&
filter->filter_type == HWRM_CFA_L2_FILTER) {
- PMD_DRV_LOG(DEBUG, "L2 filter is not free\n");
+ PMD_DRV_LOG_LINE(DEBUG, "L2 filter is not free");
/* Call HWRM to try to free filter again */
rc = bnxt_hwrm_clear_l2_filter(bp, filter);
if (rc)
- PMD_DRV_LOG(ERR,
- "Cannot free L2 filter: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot free L2 filter: %d",
rc);
}
filter->fw_l2_filter_id = UINT64_MAX;
@@ -170,7 +170,7 @@ int bnxt_alloc_filter_mem(struct bnxt *bp)
max_filters * sizeof(struct bnxt_filter_info),
0);
if (filter_mem == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for %d filters",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for %d filters",
max_filters);
return -ENOMEM;
}
@@ -186,7 +186,7 @@ struct bnxt_filter_info *bnxt_get_unused_filter(struct bnxt *bp)
/* Find the 1st unused filter from the free_filter_list pool*/
filter = STAILQ_FIRST(&bp->free_filter_list);
if (!filter) {
- PMD_DRV_LOG(ERR, "No more free filter resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free filter resources");
return NULL;
}
STAILQ_REMOVE_HEAD(&bp->free_filter_list, next);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index f25bc6ff78..03413e9121 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -106,15 +106,15 @@ bnxt_filter_type_check(const struct rte_flow_item pattern[],
use_ntuple |= 1;
break;
default:
- PMD_DRV_LOG(DEBUG, "Unknown Flow type\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unknown Flow type");
use_ntuple |= 0;
}
item++;
}
if (has_vlan && use_ntuple) {
- PMD_DRV_LOG(ERR,
- "VLAN flow cannot use NTUPLE filter\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VLAN flow cannot use NTUPLE filter");
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
@@ -158,7 +158,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
use_ntuple = bnxt_filter_type_check(pattern, error);
if (use_ntuple < 0)
return use_ntuple;
- PMD_DRV_LOG(DEBUG, "Use NTUPLE %d\n", use_ntuple);
+ PMD_DRV_LOG_LINE(DEBUG, "Use NTUPLE %d", use_ntuple);
filter->filter_type = use_ntuple ?
HWRM_CFA_NTUPLE_FILTER : HWRM_CFA_L2_FILTER;
@@ -181,7 +181,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
inner =
((const struct rte_flow_item_any *)item->spec)->num > 3;
if (inner)
- PMD_DRV_LOG(DEBUG, "Parse inner header\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Parse inner header");
break;
case RTE_FLOW_ITEM_TYPE_ETH:
if (!item->spec)
@@ -229,8 +229,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
"DMAC is invalid");
- PMD_DRV_LOG(ERR,
- "DMAC is invalid!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "DMAC is invalid!");
return -rte_errno;
}
rte_memcpy(filter->dst_macaddr,
@@ -242,8 +242,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
BNXT_FLOW_L2_INNER_DST_VALID_FLAG :
BNXT_FLOW_L2_DST_VALID_FLAG;
filter->priority = attr->priority;
- PMD_DRV_LOG(DEBUG,
- "Creating a priority flow\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Creating a priority flow");
}
if (rte_is_broadcast_ether_addr(ð_mask->hdr.src_addr)) {
src = ð_spec->hdr.src_addr;
@@ -253,8 +253,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
"SMAC is invalid");
- PMD_DRV_LOG(ERR,
- "SMAC is invalid!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "SMAC is invalid!");
return -rte_errno;
}
rte_memcpy(filter->src_macaddr,
@@ -267,7 +267,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
BNXT_FLOW_L2_SRC_VALID_FLAG;
} /*
* else {
- * PMD_DRV_LOG(ERR, "Handle this condition\n");
+ * PMD_DRV_LOG_LINE(ERR, "Handle this condition");
* }
*/
if (eth_mask->hdr.ether_type) {
@@ -783,18 +783,18 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
nf->valid_flags & BNXT_FLOW_L2_DST_VALID_FLAG) {
filter1->flags |=
HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST;
- PMD_DRV_LOG(DEBUG, "Create Outer filter\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create Outer filter");
}
if (nf->filter_type == HWRM_CFA_L2_FILTER &&
(nf->valid_flags & BNXT_FLOW_L2_SRC_VALID_FLAG ||
nf->valid_flags & BNXT_FLOW_L2_INNER_SRC_VALID_FLAG)) {
- PMD_DRV_LOG(DEBUG, "Create L2 filter for SRC MAC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create L2 filter for SRC MAC");
filter1->flags |=
HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_SOURCE_VALID;
memcpy(filter1->l2_addr, nf->src_macaddr, RTE_ETHER_ADDR_LEN);
} else {
- PMD_DRV_LOG(DEBUG, "Create L2 filter for DST MAC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create L2 filter for DST MAC");
memcpy(filter1->l2_addr, nf->dst_macaddr, RTE_ETHER_ADDR_LEN);
}
@@ -988,8 +988,8 @@ static int match_vnic_rss_cfg(struct bnxt *bp,
}
if (match != vnic->rx_queue_cnt) {
- PMD_DRV_LOG(ERR,
- "VNIC queue count %d vs queues matched %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC queue count %d vs queues matched %d",
match, vnic->rx_queue_cnt);
return -EINVAL;
}
@@ -1021,8 +1021,8 @@ bnxt_update_filter_flags_en(struct bnxt_filter_info *filter,
filter->fw_l2_filter_id = filter1->fw_l2_filter_id;
filter->l2_ref_cnt = filter1->l2_ref_cnt;
filter->flow_id = filter1->flow_id;
- PMD_DRV_LOG(DEBUG,
- "l2_filter: %p fw_l2_filter_id %" PRIx64 " l2_ref_cnt %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "l2_filter: %p fw_l2_filter_id %" PRIx64 " l2_ref_cnt %u",
filter1, filter->fw_l2_filter_id, filter->l2_ref_cnt);
}
@@ -1087,7 +1087,7 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
/* Validate Rx queues */
for (i = 0; i < rss->queue_num; i++) {
- PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n", rss->queue[i]);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS action Queue %d", rss->queue[i]);
if (rss->queue[i] >= bp->rx_nr_rings ||
!bp->rx_queues[rss->queue[i]]) {
@@ -1306,11 +1306,11 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
rc = -rte_errno;
goto ret;
}
- PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index);
+ PMD_DRV_LOG_LINE(DEBUG, "Queue index %d", act_q->index);
vnic_id = attr->group;
if (!vnic_id) {
- PMD_DRV_LOG(DEBUG, "Group id is 0\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Group id is 0");
vnic_id = act_q->index;
}
@@ -1319,8 +1319,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic = &bp->vnic_info[vnic_id];
if (vnic->rx_queue_cnt) {
if (vnic->start_grp_id != act_q->index) {
- PMD_DRV_LOG(ERR,
- "VNIC already in use\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC already in use");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1339,8 +1339,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto use_vnic;
if (!rxq) {
- PMD_DRV_LOG(ERR,
- "Queue invalid or used with other VNIC\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Queue invalid or used with other VNIC");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1357,20 +1357,20 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic->end_grp_id = act_q->index;
vnic->func_default = 0; //This is not a default VNIC.
- PMD_DRV_LOG(DEBUG, "VNIC found\n");
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC found");
rc = bnxt_vnic_prep(bp, vnic, act, error);
if (rc)
goto ret;
- PMD_DRV_LOG(DEBUG,
- "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vnic[%d] = %p vnic->fw_grp_ids = %p",
act_q->index, vnic, vnic->fw_grp_ids);
use_vnic:
vnic->ff_pool_idx = vnic_id;
- PMD_DRV_LOG(DEBUG,
- "Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Setting vnic ff_idx %d", vnic->ff_pool_idx);
filter->dst_id = vnic->fw_vnic_id;
/* For ntuple filter, create the L2 filter with default VNIC.
@@ -1392,7 +1392,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto ret;
}
- PMD_DRV_LOG(DEBUG, "new fltr: %p l2fltr: %p l2_ref_cnt: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "new fltr: %p l2fltr: %p l2_ref_cnt: %d",
filter, filter1, filter1->l2_ref_cnt);
bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
break;
@@ -1528,8 +1528,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (vnic->rx_queue_cnt) {
rc = match_vnic_rss_cfg(bp, vnic, rss);
if (rc) {
- PMD_DRV_LOG(ERR,
- "VNIC and RSS config mismatch\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC and RSS config mismatch");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1542,7 +1542,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
for (i = 0; i < rss->queue_num; i++) {
- PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS action Queue %d",
rss->queue[i]);
if (!rss->queue[i] ||
@@ -1560,8 +1560,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR,
- "queue active with other VNIC\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "queue active with other VNIC");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1584,13 +1584,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (rc)
goto ret;
- PMD_DRV_LOG(DEBUG,
- "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vnic[%d] = %p vnic->fw_grp_ids = %p",
vnic_id, vnic, vnic->fw_grp_ids);
vnic->ff_pool_idx = vnic_id;
- PMD_DRV_LOG(DEBUG,
- "Setting vnic ff_pool_idx %d\n", vnic->ff_pool_idx);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Setting vnic ff_pool_idx %d", vnic->ff_pool_idx);
/* This can be done only after vnic_grp_alloc is done. */
for (i = 0; i < vnic->rx_queue_cnt; i++) {
@@ -1632,7 +1632,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
bnxt_hwrm_vnic_rss_cfg(bp, vnic);
} else {
- PMD_DRV_LOG(DEBUG, "No RSS config required\n");
+ PMD_DRV_LOG_LINE(DEBUG, "No RSS config required");
}
vnic_found:
@@ -1648,7 +1648,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto ret;
}
- PMD_DRV_LOG(DEBUG, "L2 filter created\n");
+ PMD_DRV_LOG_LINE(DEBUG, "L2 filter created");
bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
break;
case RTE_FLOW_ACTION_TYPE_MARK:
@@ -1663,8 +1663,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
- PMD_DRV_LOG(DEBUG,
- "Disabling vector processing for mark\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Disabling vector processing for mark");
bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
}
@@ -1672,7 +1672,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
filter->mark = ((const struct rte_flow_action_mark *)
act->conf)->id;
- PMD_DRV_LOG(DEBUG, "Mark the flow %d\n", filter->mark);
+ PMD_DRV_LOG_LINE(DEBUG, "Mark the flow %d", filter->mark);
break;
default:
rte_flow_error_set(error,
@@ -1718,7 +1718,7 @@ struct bnxt_vnic_info *find_matching_vnic(struct bnxt *bp,
vnic = &bp->vnic_info[i];
if (vnic->fw_vnic_id != INVALID_VNIC_ID &&
filter->dst_id == vnic->fw_vnic_id) {
- PMD_DRV_LOG(DEBUG, "Found matching VNIC Id %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Found matching VNIC Id %d",
vnic->ff_pool_idx);
return vnic;
}
@@ -1764,7 +1764,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
if (STAILQ_EMPTY(&vnic->filter)) {
bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
- PMD_DRV_LOG(DEBUG, "Free VNIC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Free VNIC");
}
}
@@ -1891,7 +1891,7 @@ void bnxt_flow_cnt_alarm_cb(void *arg)
struct bnxt *bp = arg;
if (!bp->flow_stat->rx_fc_out_tbl.va) {
- PMD_DRV_LOG(ERR, "bp->flow_stat->rx_fc_out_tbl.va is NULL?\n");
+ PMD_DRV_LOG_LINE(ERR, "bp->flow_stat->rx_fc_out_tbl.va is NULL?");
bnxt_cancel_fc_thread(bp);
return;
}
@@ -1908,7 +1908,7 @@ void bnxt_flow_cnt_alarm_cb(void *arg)
rc = bnxt_flow_stats_req(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Flow stat alarm not rescheduled.\n");
+ PMD_DRV_LOG_LINE(ERR, "Flow stat alarm not rescheduled.");
return;
}
@@ -2020,7 +2020,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bnxt_acquire_flow_lock(bp);
ret = bnxt_flow_args_validate(attr, pattern, actions, error);
if (ret != 0) {
- PMD_DRV_LOG(ERR, "Not a validate flow.\n");
+ PMD_DRV_LOG_LINE(ERR, "Not a validate flow.");
goto free_flow;
}
@@ -2039,15 +2039,15 @@ bnxt_flow_create(struct rte_eth_dev *dev,
ret = bnxt_match_filter(bp, filter);
if (ret == -EEXIST) {
- PMD_DRV_LOG(DEBUG, "Flow already exists.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Flow already exists.");
/* Clear the filter that was created as part of
* validate_and_parse_flow() above
*/
bnxt_hwrm_clear_l2_filter(bp, filter);
goto free_filter;
} else if (ret == -EXDEV) {
- PMD_DRV_LOG(DEBUG, "Flow with same pattern exists\n");
- PMD_DRV_LOG(DEBUG, "Updating with different destination\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Flow with same pattern exists");
+ PMD_DRV_LOG_LINE(DEBUG, "Updating with different destination");
update_flow = true;
}
@@ -2099,8 +2099,8 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
if (ret) {
- PMD_DRV_LOG(ERR,
- "Unable to free existing tunnel\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unable to free existing tunnel");
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL,
@@ -2155,8 +2155,8 @@ bnxt_flow_create(struct rte_eth_dev *dev,
}
if (filter->valid_flags & BNXT_FLOW_MARK_FLAG) {
- PMD_DRV_LOG(DEBUG,
- "Mark action: mark id 0x%x, flow id 0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Mark action: mark id 0x%x, flow id 0x%x",
filter->mark, filter->flow_id);
/* TCAM and EM should be 16-bit only.
@@ -2182,7 +2182,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bp->flow_stat->flow_count++;
bnxt_release_flow_lock(bp);
bnxt_setup_flow_counter(bp);
- PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Successfully created flow.");
return flow;
}
@@ -2232,15 +2232,15 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
"tunnel_redirect info cmd fail");
return ret;
}
- PMD_DRV_LOG(INFO, "Pre-existing tunnel fid = %x vf->fid = %x\n",
+ PMD_DRV_LOG_LINE(INFO, "Pre-existing tunnel fid = %x vf->fid = %x",
tun_dst_fid + bp->first_vf_id, bp->fw_fid);
/* Tunnel doesn't belong to this VF, so don't send HWRM
* cmd, just delete the flow from driver
*/
if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) {
- PMD_DRV_LOG(ERR,
- "Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free");
} else {
ret = bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
@@ -2314,7 +2314,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
ret = bnxt_match_filter(bp, filter);
if (ret == 0)
- PMD_DRV_LOG(ERR, "Could not find matching flow\n");
+ PMD_DRV_LOG_LINE(ERR, "Could not find matching flow");
if (filter->valid_flags & BNXT_FLOW_MARK_FLAG) {
flow_id = filter->flow_id & BNXT_FLOW_ID_MASK;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fc142672f6..bcbcb56546 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -323,7 +323,7 @@ static int page_getenum(size_t size)
return 22;
if (size <= 1 << 30)
return 30;
- PMD_DRV_LOG(ERR, "Page size %zu out of range\n", size);
+ PMD_DRV_LOG_LINE(ERR, "Page size %zu out of range", size);
return sizeof(int) * 8 - 1;
}
@@ -402,7 +402,7 @@ bnxt_check_cq_hwrm_done(struct bnxt_cp_ring_info *cpr,
done = bnxt_flush_rx_cmp(cpr);
if (done)
- PMD_DRV_LOG(DEBUG, "HWRM DONE for %s ring\n",
+ PMD_DRV_LOG_LINE(DEBUG, "HWRM DONE for %s ring",
rx ? "Rx" : "Tx");
/* We are about to timeout and still haven't seen the
@@ -410,7 +410,7 @@ bnxt_check_cq_hwrm_done(struct bnxt_cp_ring_info *cpr,
*/
if (!done && timeout) {
done = 1;
- PMD_DRV_LOG(DEBUG, "Timing out for %s ring\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Timing out for %s ring",
rx ? "Rx" : "Tx");
}
} else {
@@ -555,8 +555,8 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
rte_cpu_to_le_16(req->req_type) == HWRM_VER_GET)
return -ETIMEDOUT;
- PMD_DRV_LOG(ERR,
- "Error(timeout) sending msg 0x%04x, seq_id %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error(timeout) sending msg 0x%04x, seq_id %d",
req->req_type, req->seq_id);
bp->flags |= BNXT_FLAG_FW_TIMEDOUT;
return -ETIMEDOUT;
@@ -604,7 +604,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
#define HWRM_CHECK_RESULT() do {\
if (rc) { \
- PMD_DRV_LOG(ERR, "failed rc:%d\n", rc); \
+ PMD_DRV_LOG_LINE(ERR, "failed rc:%d", rc); \
rte_spinlock_unlock(&bp->hwrm_lock); \
if (rc == HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED) \
rc = -EACCES; \
@@ -625,15 +625,15 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
if (resp->resp_len >= 16) { \
struct hwrm_err_output *tmp_hwrm_err_op = \
(void *)resp; \
- PMD_DRV_LOG(ERR, \
- "error %d:%d:%08x:%04x\n", \
+ PMD_DRV_LOG_LINE(ERR, \
+ "error %d:%d:%08x:%04x", \
rc, tmp_hwrm_err_op->cmd_err, \
rte_le_to_cpu_32(\
tmp_hwrm_err_op->opaque_0), \
rte_le_to_cpu_16(\
tmp_hwrm_err_op->opaque_1)); \
} else { \
- PMD_DRV_LOG(ERR, "error %d\n", rc); \
+ PMD_DRV_LOG_LINE(ERR, "error %d", rc); \
} \
rte_spinlock_unlock(&bp->hwrm_lock); \
if (rc == HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED) \
@@ -804,7 +804,7 @@ int bnxt_hwrm_clear_l2_filter(struct bnxt *bp,
if (filter->matching_l2_fltr_ptr)
l2_filter = filter->matching_l2_fltr_ptr;
- PMD_DRV_LOG(DEBUG, "filter: %p l2_filter: %p ref_cnt: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "filter: %p l2_filter: %p ref_cnt: %d",
filter, l2_filter, l2_filter->l2_ref_cnt);
if (l2_filter->l2_ref_cnt == 0)
@@ -854,8 +854,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
//TODO: Is there a better way to add VLANs to each VNIC in case of VMDQ
if ((dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) &&
conf->pool_map[j].pools & (1UL << j)) {
- PMD_DRV_LOG(DEBUG,
- "Add vlan %u to vmdq pool %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Add vlan %u to vmdq pool %u",
conf->pool_map[j].vlan_id, j);
filter->l2_ivlan = conf->pool_map[j].vlan_id;
@@ -1052,7 +1052,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info = rte_zmalloc("bnxt_vf_info", sizeof(*vf_info) * max_vfs, 0);
if (vf_info == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc vf info\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc vf info");
return -ENOMEM;
}
@@ -1062,7 +1062,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info[i].vlan_table = rte_zmalloc("VF VLAN table",
getpagesize(), getpagesize());
if (vf_info[i].vlan_table == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc VLAN table for VF %d\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc VLAN table for VF %d", i);
goto err;
}
rte_mem_lock_page(vf_info[i].vlan_table);
@@ -1070,7 +1070,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info[i].vlan_as_table = rte_zmalloc("VF VLAN AS table",
getpagesize(), getpagesize());
if (vf_info[i].vlan_as_table == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc VLAN AS table for VF %d\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc VLAN AS table for VF %d", i);
goto err;
}
rte_mem_lock_page(vf_info[i].vlan_as_table);
@@ -1138,7 +1138,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->max_vnics = rte_le_to_cpu_16(BNXT_MAX_VNICS_COS_CLASSIFY);
else
bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
- PMD_DRV_LOG(DEBUG, "Max l2_cntxts is %d vnics is %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Max l2_cntxts is %d vnics is %d",
bp->max_l2_ctx, bp->max_vnics);
bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
@@ -1152,7 +1152,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) {
bp->flags |= BNXT_FLAG_PTP_SUPPORTED;
- PMD_DRV_LOG(DEBUG, "PTP SUPPORTED\n");
+ PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED");
HWRM_UNLOCK();
bnxt_hwrm_ptp_qcfg(bp);
}
@@ -1163,7 +1163,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERROR_RECOVERY_CAPABLE) {
bp->fw_cap |= BNXT_FW_CAP_ERROR_RECOVERY;
- PMD_DRV_LOG(DEBUG, "Adapter Error recovery SUPPORTED\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Adapter Error recovery SUPPORTED");
}
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERR_RECOVER_RELOAD)
@@ -1176,18 +1176,18 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN;
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "Backing store v2 supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Backing store v2 supported");
if (BNXT_CHIP_P7(bp))
bp->fw_cap |= BNXT_FW_CAP_BACKING_STORE_V2;
}
if (!(flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED)) {
bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
- PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN acceleration for TX is enabled");
}
bp->tunnel_disable_flag = rte_le_to_cpu_16(resp->tunnel_disable_flag);
if (bp->tunnel_disable_flag)
- PMD_DRV_LOG(DEBUG, "Tunnel parsing capability is disabled, flags : %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tunnel parsing capability is disabled, flags : %#x",
bp->tunnel_disable_flag);
if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED)
@@ -1246,7 +1246,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_COS_CLASSIFY;
- PMD_DRV_LOG(INFO, "CoS assignment capability enabled\n");
+ PMD_DRV_LOG_LINE(INFO, "CoS assignment capability enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
@@ -1254,7 +1254,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_TRUSTED_VF_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS_TRUSTED_VF;
- PMD_DRV_LOG(DEBUG, "Trusted VF's outer RSS capability is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Trusted VF's outer RSS capability is enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
@@ -1262,7 +1262,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_VLAN_RX_STRIP;
- PMD_DRV_LOG(DEBUG, "Rx VLAN strip capability enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Rx VLAN strip capability enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_XOR_CAP)
@@ -1549,7 +1549,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
else
HWRM_CHECK_RESULT();
- PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
+ PMD_DRV_LOG_LINE(INFO, "%d.%d.%d:%d.%d.%d.%d",
resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b,
@@ -1558,7 +1558,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
((uint32_t)resp->hwrm_fw_min_8b << 16) |
((uint32_t)resp->hwrm_fw_bld_8b << 8) |
resp->hwrm_fw_rsvd_8b;
- PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n",
+ PMD_DRV_LOG_LINE(INFO, "Driver HWRM version: %d.%d.%d",
HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE);
fw_version = resp->hwrm_intf_maj_8b << 16;
@@ -1574,13 +1574,13 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT;
if (resp->hwrm_intf_maj_8b != HWRM_VERSION_MAJOR) {
- PMD_DRV_LOG(ERR, "Unsupported firmware API version\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported firmware API version");
rc = -EINVAL;
goto error;
}
if (bp->max_req_len > resp->max_req_win_len) {
- PMD_DRV_LOG(ERR, "Unsupported request length\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported request length");
rc = -EINVAL;
goto error;
}
@@ -1602,7 +1602,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED) &&
(dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED)) {
- PMD_DRV_LOG(DEBUG, "Short command supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Short command supported");
bp->flags |= BNXT_FLAG_SHORT_CMD;
}
@@ -1627,8 +1627,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
rte_malloc_virt2iova(bp->hwrm_short_cmd_req_addr);
if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) {
rte_free(bp->hwrm_short_cmd_req_addr);
- PMD_DRV_LOG(ERR,
- "Unable to map buffer to physical memory.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unable to map buffer to physical memory.");
rc = -ENOMEM;
goto error;
}
@@ -1636,26 +1636,26 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_KONG_MB_CHNL_SUPPORTED) {
bp->flags |= BNXT_FLAG_KONG_MB_EN;
- PMD_DRV_LOG(DEBUG, "Kong mailbox channel enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Kong mailbox channel enabled");
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_TRUSTED_VF_SUPPORTED)
- PMD_DRV_LOG(DEBUG, "FW supports Trusted VFs\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports Trusted VFs");
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_ADV_FLOW_MGNT_SUPPORTED) {
bp->fw_cap |= BNXT_FW_CAP_ADV_FLOW_MGMT;
- PMD_DRV_LOG(DEBUG, "FW supports advanced flow management\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports advanced flow management");
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_ADV_FLOW_COUNTERS_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "FW supports advanced flow counters\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports advanced flow counters");
bp->fw_cap |= BNXT_FW_CAP_ADV_FLOW_COUNTERS;
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TRUFLOW_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "Host-based truflow feature enabled.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Host-based truflow feature enabled.");
bp->fw_cap |= BNXT_FW_CAP_TRUFLOW_EN;
}
@@ -1680,7 +1680,7 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "Port %u: Unregistered with fw\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Port %u: Unregistered with fw",
bp->eth_dev->data->port_id);
return rc;
@@ -1699,7 +1699,7 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
/* Setting Fixed Speed. But AutoNeg is ON, So disable it */
if (bp->link_info->auto_mode && conf->link_speed) {
req.auto_mode = HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE;
- PMD_DRV_LOG(DEBUG, "Disabling AutoNeg\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling AutoNeg");
}
req.flags = rte_cpu_to_le_32(conf->phy_flags);
@@ -1760,7 +1760,7 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
} else {
req.flags =
rte_cpu_to_le_32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN);
- PMD_DRV_LOG(INFO, "Force Link Down\n");
+ PMD_DRV_LOG_LINE(INFO, "Force Link Down");
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -1828,9 +1828,9 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
/* Display the captured P7 phy details */
if (BNXT_LINK_SPEEDS_V2(bp)) {
- PMD_DRV_LOG(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
+ PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
"Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x\n"
- "Auto_link_speedsv2:%x, Active_lanes:%d\n",
+ "Auto_link_speedsv2:%x, Active_lanes:%d",
link_info->phy_type,
link_info->media_type,
link_info->phy_link_status,
@@ -1850,8 +1850,8 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
desc = ((struct link_speeds2_tbl *)
bnxt_get_hwrm_to_rte_speeds2_entry(link_info->link_speed))->desc;
- PMD_DRV_LOG(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
- "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
+ "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
desc,
!(link_info->auto_mode) ? "Forced" : "AutoNegotiated",
link_status_str[link_info->phy_link_status % MAX_LINK_STR],
@@ -1865,11 +1865,11 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
return rc;
}
- PMD_DRV_LOG(DEBUG, "Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x",
link_info->link_speed, link_info->auto_mode,
link_info->auto_link_speed, link_info->auto_link_speed_mask,
link_info->support_speeds, link_info->force_link_speed);
- PMD_DRV_LOG(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x",
link_info->link_signal_mode,
link_info->auto_pam4_link_speed_mask,
link_info->support_pam4_speeds,
@@ -1958,7 +1958,7 @@ static bool bnxt_find_lossy_profile(struct bnxt *bp, bool use_prof_type)
int i;
for (i = 0; i < BNXT_COS_QUEUE_COUNT; i++) {
- PMD_DRV_LOG(DEBUG, "profile %d, profile_id %d, type %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "profile %d, profile_id %d, type %d",
bp->tx_cos_queue[i].profile,
bp->tx_cos_queue[i].id,
bp->tx_cos_queue[i].profile_type);
@@ -2069,7 +2069,7 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
}
}
- PMD_DRV_LOG(DEBUG, "Tx COS Queue ID %d\n", bp->tx_cosq_id[0]);
+ PMD_DRV_LOG_LINE(DEBUG, "Tx COS Queue ID %d", bp->tx_cosq_id[0]);
bp->max_tc = resp->max_configurable_queues;
bp->max_lltc = resp->max_configurable_lossless_queues;
@@ -2165,7 +2165,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID;
break;
default:
- PMD_DRV_LOG(ERR, "hwrm alloc invalid ring type %d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm alloc invalid ring type %d",
ring_type);
HWRM_UNLOCK();
return -EINVAL;
@@ -2179,33 +2179,33 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
rc = rte_le_to_cpu_16(resp->error_code);
switch (ring_type) {
case HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc cp failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc cp failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc rx failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc rx failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX_AGG:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc rx agg failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc rx agg failed. rc:%d",
rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_TX:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc tx failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc tx failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc nq failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc nq failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
default:
- PMD_DRV_LOG(ERR, "Invalid ring. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Invalid ring. rc:%d", rc);
HWRM_UNLOCK();
return rc;
}
@@ -2243,27 +2243,27 @@ int bnxt_hwrm_ring_free(struct bnxt *bp,
switch (ring_type) {
case HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL:
- PMD_DRV_LOG(ERR, "hwrm_ring_free cp failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free cp failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_RX:
- PMD_DRV_LOG(ERR, "hwrm_ring_free rx failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free rx failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_TX:
- PMD_DRV_LOG(ERR, "hwrm_ring_free tx failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free tx failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_NQ:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_free nq failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_free nq failed. rc:%d", rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_free agg failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_free agg failed. rc:%d", rc);
return rc;
default:
- PMD_DRV_LOG(ERR, "Invalid ring, rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Invalid ring, rc:%d", rc);
return rc;
}
}
@@ -2411,7 +2411,7 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->fw_vnic_id = rte_le_to_cpu_16(resp->vnic_id);
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2452,7 +2452,7 @@ static int bnxt_hwrm_vnic_plcmodes_cfg(struct bnxt *bp,
struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2487,7 +2487,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
uint32_t enables = 0;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2562,7 +2562,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
if (bnxt_compressed_rx_cqe_mode_enabled(bp)) {
req.l2_cqe_mode = HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_COMPRESSED;
enables |= HWRM_VNIC_CFG_INPUT_ENABLES_L2_CQE_MODE;
- PMD_DRV_LOG(DEBUG, "Enabling compressed Rx CQE\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Enabling compressed Rx CQE");
}
req.enables = rte_cpu_to_le_32(enables);
@@ -2602,7 +2602,7 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
struct hwrm_vnic_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC QCFG ID %d\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC QCFG ID %d", vnic->fw_vnic_id);
return rc;
}
HWRM_PREP(&req, HWRM_VNIC_QCFG, BNXT_USE_CHIMP_MB);
@@ -2670,7 +2670,7 @@ int _bnxt_hwrm_vnic_ctx_free(struct bnxt *bp,
bp->hwrm_cmd_resp_addr;
if (ctx_idx == (uint16_t)HWRM_NA_SIGNATURE) {
- PMD_DRV_LOG(DEBUG, "VNIC RSS Rule %x\n", vnic->rss_rule);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC RSS Rule %x", vnic->rss_rule);
return rc;
}
HWRM_PREP(&req, HWRM_VNIC_RSS_COS_LB_CTX_FREE, BNXT_USE_CHIMP_MB);
@@ -2714,7 +2714,7 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_free_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC FREE ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC FREE ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2779,7 +2779,7 @@ bnxt_hwrm_vnic_rss_qcfg_p5(struct bnxt *bp)
BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "RSS QCFG: Hash level %d\n", resp->hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS QCFG: Hash level %d", resp->hash_mode_flags);
return rc;
}
@@ -2826,7 +2826,7 @@ bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "RSS CFG: Hash level %d\n", req.hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS CFG: Hash level %d", req.hash_mode_flags);
}
return rc;
@@ -2874,7 +2874,7 @@ bnxt_hwrm_vnic_rss_cfg_hash_mode_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic
req.vnic_id = rte_cpu_to_le_16(BNXT_DFLT_VNIC_ID_INVALID);
req.rss_ctx_idx = rte_cpu_to_le_16(BNXT_RSS_CTX_IDX_INVALID);
- PMD_DRV_LOG(DEBUG, "RSS CFG: Hash level %d\n", req.hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS CFG: Hash level %d", req.hash_mode_flags);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
BNXT_USE_CHIMP_MB);
@@ -2949,7 +2949,7 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp,
uint16_t size;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -3013,18 +3013,18 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
return 0;
/* Return an error if enabling TPA w/ compressed Rx CQE. */
- PMD_DRV_LOG(ERR, "No HW support for LRO with compressed Rx\n");
+ PMD_DRV_LOG_LINE(ERR, "No HW support for LRO with compressed Rx");
return -ENOTSUP;
}
if ((BNXT_CHIP_P5(bp) || BNXT_CHIP_P7(bp)) && !bp->max_tpa_v2) {
if (enable)
- PMD_DRV_LOG(ERR, "No HW support for LRO\n");
+ PMD_DRV_LOG_LINE(ERR, "No HW support for LRO");
return -ENOTSUP;
}
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "Invalid vNIC ID\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Invalid vNIC ID");
return 0;
}
@@ -3419,8 +3419,8 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
bp->hwrm_cmd_resp_dma_addr =
rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr);
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
rte_spinlock_init(&bp->hwrm_lock);
@@ -3471,7 +3471,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
while (!STAILQ_EMPTY(&vnic->flow_list)) {
flow = STAILQ_FIRST(&vnic->flow_list);
filter = flow->filter;
- PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
+ PMD_DRV_LOG_LINE(DEBUG, "filter type %d", filter->filter_type);
rc = bnxt_clear_one_vnic_filter(bp, filter);
STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
@@ -3658,8 +3658,8 @@ static uint16_t bnxt_parse_eth_link_speed(struct bnxt *bp, uint32_t conf_link_sp
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
break;
default:
- PMD_DRV_LOG(ERR,
- "Unsupported link speed %d; default to AUTO\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported link speed %d; default to AUTO",
conf_link_speed);
break;
}
@@ -3691,21 +3691,21 @@ static int bnxt_validate_link_speed(struct bnxt *bp)
one_speed = link_speed & ~RTE_ETH_LINK_SPEED_FIXED;
if (one_speed & (one_speed - 1)) {
- PMD_DRV_LOG(ERR,
- "Invalid advertised speeds (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid advertised speeds (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
if ((one_speed & link_speed_capa) != one_speed) {
- PMD_DRV_LOG(ERR,
- "Unsupported advertised speed (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported advertised speed (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
} else {
if (!(link_speed & link_speed_capa)) {
- PMD_DRV_LOG(ERR,
- "Unsupported advertised speeds (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported advertised speeds (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
@@ -3814,7 +3814,7 @@ static uint32_t bnxt_parse_hw_link_speed(struct bnxt *bp, uint16_t hw_link_speed
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB:
default:
- PMD_DRV_LOG(ERR, "HWRM link speed %d not defined\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM link speed %d not defined",
hw_link_speed);
break;
}
@@ -3835,7 +3835,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex)
eth_link_duplex = RTE_ETH_LINK_HALF_DUPLEX;
break;
default:
- PMD_DRV_LOG(ERR, "HWRM link duplex %d not defined\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM link duplex %d not defined",
hw_link_duplex);
break;
}
@@ -3849,11 +3849,11 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
rc = bnxt_hwrm_port_phy_qcaps(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Get link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Get link config failed with rc %d", rc);
rc = bnxt_hwrm_port_phy_qcfg(bp, link_info);
if (rc) {
- PMD_DRV_LOG(ERR, "Get link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Get link config failed with rc %d", rc);
goto exit;
}
@@ -3882,14 +3882,14 @@ static int bnxt_hwrm_port_phy_cfg_v2(struct bnxt *bp, struct bnxt_link_info *con
if (!conf->link_up) {
req.flags =
rte_cpu_to_le_32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN);
- PMD_DRV_LOG(ERR, "Force Link Down\n");
+ PMD_DRV_LOG_LINE(ERR, "Force Link Down");
goto link_down;
}
/* Setting Fixed Speed. But AutoNeg is ON, So disable it */
if (bp->link_info->auto_mode && conf->link_speed) {
req.auto_mode = HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE;
- PMD_DRV_LOG(DEBUG, "Disabling AutoNeg\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling AutoNeg");
}
req.flags = rte_cpu_to_le_32(conf->phy_flags);
if (!conf->link_speed) {
@@ -3955,7 +3955,7 @@ static int bnxt_set_hwrm_link_config_v2(struct bnxt *bp, bool link_up)
HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE ||
bp->link_info->media_type ==
HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP) {
- PMD_DRV_LOG(ERR, "10GBase-T devices must autoneg\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBase-T devices must autoneg");
return -EINVAL;
}
@@ -3970,7 +3970,7 @@ static int bnxt_set_hwrm_link_config_v2(struct bnxt *bp, bool link_up)
port_phy_cfg:
rc = bnxt_hwrm_port_phy_cfg_v2(bp, &link_req);
if (rc)
- PMD_DRV_LOG(ERR, "Set link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Set link config failed with rc %d", rc);
return rc;
}
@@ -4005,7 +4005,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
* The speed should be forced and autoneg disabled
* to configure 40G speed.
*/
- PMD_DRV_LOG(INFO, "Disabling autoneg for 40G\n");
+ PMD_DRV_LOG_LINE(INFO, "Disabling autoneg for 40G");
autoneg = 0;
}
@@ -4014,7 +4014,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
bp->link_info->force_pam4_link_speed ==
HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB) {
autoneg = 0;
- PMD_DRV_LOG(DEBUG, "Disabling autoneg for 200G\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling autoneg for 200G");
}
speed = bnxt_parse_eth_link_speed(bp, dev_conf->link_speeds,
@@ -4037,7 +4037,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE ||
bp->link_info->media_type ==
HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP) {
- PMD_DRV_LOG(ERR, "10GBase-T devices must autoneg\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBase-T devices must autoneg");
return -EINVAL;
}
@@ -4072,8 +4072,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
port_phy_cfg:
rc = bnxt_hwrm_port_phy_cfg(bp, &link_req);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Set link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Set link config failed with rc %d", rc);
}
error:
@@ -4111,12 +4111,12 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
!BNXT_VF_IS_TRUSTED(bp) &&
(flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) {
bp->flags |= BNXT_FLAG_TRUSTED_VF_EN;
- PMD_DRV_LOG(INFO, "Trusted VF cap enabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Trusted VF cap enabled");
} else if (BNXT_VF(bp) &&
BNXT_VF_IS_TRUSTED(bp) &&
!(flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) {
bp->flags &= ~BNXT_FLAG_TRUSTED_VF_EN;
- PMD_DRV_LOG(INFO, "Trusted VF cap disabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Trusted VF cap disabled");
}
if (mtu)
@@ -4176,13 +4176,13 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
if (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST) {
bp->flags |= BNXT_FLAG_MULTI_HOST;
bp->multi_host_pf_pci_id = resp->pci_id;
- PMD_DRV_LOG(INFO, "Mult-Host system Parent PCI-ID: 0x%x\n", resp->pci_id);
+ PMD_DRV_LOG_LINE(INFO, "Mult-Host system Parent PCI-ID: 0x%x", resp->pci_id);
}
/* check for the multi-root support */
if (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_ROOT) {
bp->flags2 |= BNXT_FLAGS2_MULTIROOT_EN;
- PMD_DRV_LOG(DEBUG, "PF enabled with multi root capability\n");
+ PMD_DRV_LOG_LINE(DEBUG, "PF enabled with multi root capability");
}
HWRM_UNLOCK();
@@ -4515,7 +4515,7 @@ int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)
int rc;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "Attempt to allocate VFs on a VF!\n");
+ PMD_DRV_LOG_LINE(ERR, "Attempt to allocate VFs on a VF!");
return -EINVAL;
}
@@ -4584,10 +4584,10 @@ bnxt_process_vf_resc_config_new(struct bnxt *bp, int num_vfs)
sizeof(req),
BNXT_USE_CHIMP_MB);
if (rc || resp->error_code) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize VF %d\n", i);
- PMD_DRV_LOG(ERR,
- "Not all VFs available. (%d, %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize VF %d", i);
+ PMD_DRV_LOG_LINE(ERR,
+ "Not all VFs available. (%d, %d)",
rc, resp->error_code);
HWRM_UNLOCK();
@@ -4635,10 +4635,10 @@ bnxt_process_vf_resc_config_old(struct bnxt *bp, int num_vfs)
HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR);
if (rc || resp->error_code) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize VF %d\n", i);
- PMD_DRV_LOG(ERR,
- "Not all VFs available. (%d, %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize VF %d", i);
+ PMD_DRV_LOG_LINE(ERR,
+ "Not all VFs available. (%d, %d)",
rc, resp->error_code);
HWRM_UNLOCK();
@@ -4709,7 +4709,7 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)
int rc;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "Attempt to allocate VFs on a VF!\n");
+ PMD_DRV_LOG_LINE(ERR, "Attempt to allocate VFs on a VF!");
return -EINVAL;
}
@@ -4937,8 +4937,8 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp, int num_vfs)
req.req_buf_page_addr0 =
rte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf->vf_req_buf));
if (req.req_buf_page_addr0 == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map buffer address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map buffer address to physical memory");
HWRM_UNLOCK();
return -ENOMEM;
}
@@ -5562,8 +5562,8 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
HWRM_PREP(&req, HWRM_NVM_GET_DIR_ENTRIES, BNXT_USE_CHIMP_MB);
@@ -5597,8 +5597,8 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
HWRM_PREP(&req, HWRM_NVM_READ, BNXT_USE_CHIMP_MB);
@@ -5650,8 +5650,8 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
memcpy(buf, data, data_len);
@@ -5715,8 +5715,8 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
if (req.vnic_id_tbl_addr == RTE_BAD_IOVA) {
HWRM_UNLOCK();
- PMD_DRV_LOG(ERR,
- "unable to map VNIC ID table address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map VNIC ID table address to physical memory");
return -ENOMEM;
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -5846,7 +5846,7 @@ int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)
}
}
/* Could not find a default VNIC. */
- PMD_DRV_LOG(ERR, "No default VNIC\n");
+ PMD_DRV_LOG_LINE(ERR, "No default VNIC");
exit:
rte_free(vnic_ids);
return rc;
@@ -6364,8 +6364,8 @@ int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
i++, p++)
ctxm->split[i] = rte_le_to_cpu_32(*p);
- PMD_DRV_LOG(DEBUG,
- "type:0x%x size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "type:0x%x size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x",
ctxm->type, ctxm->entry_size,
ctxm->entry_multiple, ctxm->max_entries, ctxm->min_entries,
ctxm->split_entry_cnt, init_val, init_off,
@@ -6378,7 +6378,7 @@ int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
HWRM_UNLOCK();
} while (types < bp->ctx->types && type != BNXT_CTX_INV);
ctx->ctx_arr[last_valid_idx].last = true;
- PMD_DRV_LOG(DEBUG, "Last valid type 0x%x\n", last_valid_type);
+ PMD_DRV_LOG_LINE(DEBUG, "Last valid type 0x%x", last_valid_type);
rc = bnxt_alloc_all_ctx_pg_info(bp);
if (rc == 0)
@@ -6409,11 +6409,11 @@ int bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
HWRM_UNLOCK();
if (flags & HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_TYPE_VALID) {
- PMD_DRV_LOG(DEBUG, "Valid types 0x%x\n", req.type);
+ PMD_DRV_LOG_LINE(DEBUG, "Valid types 0x%x", req.type);
types++;
}
} while (type != HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID);
- PMD_DRV_LOG(DEBUG, "Number of valid types %d\n", types);
+ PMD_DRV_LOG_LINE(DEBUG, "Number of valid types %d", types);
return types;
}
@@ -6553,8 +6553,8 @@ int bnxt_hwrm_func_backing_store_cfg_v2(struct bnxt *bp,
int b = 1;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(INFO,
- "Backing store config V2 can be issued on PF only\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "Backing store config V2 can be issued on PF only");
return 0;
}
@@ -6586,8 +6586,8 @@ int bnxt_hwrm_func_backing_store_cfg_v2(struct bnxt *bp,
bnxt_hwrm_set_pg_attr(&ctx_pg->ring_mem,
&req.page_size_pbl_level,
&req.page_dir);
- PMD_DRV_LOG(DEBUG,
- "Backing store config V2 type:0x%x last %d, instance %d, hw %d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Backing store config V2 type:0x%x last %d, instance %d, hw %d",
req.type, ctxm->last, j, w);
if (ctxm->last && i == (w - 1))
req.flags =
@@ -6830,7 +6830,7 @@ int bnxt_hwrm_tunnel_redirect_info(struct bnxt *bp, uint8_t tun_type,
if (dst_fid)
*dst_fid = rte_le_to_cpu_16(resp->dest_fid);
- PMD_DRV_LOG(DEBUG, "dst_fid: %x\n", resp->dest_fid);
+ PMD_DRV_LOG_LINE(DEBUG, "dst_fid: %x", resp->dest_fid);
HWRM_UNLOCK();
@@ -6894,7 +6894,7 @@ int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
return 0;
if (flags & HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_HOT_FW_RESET_DONE) {
- PMD_DRV_LOG(INFO, "FW reset happened while port was down\n");
+ PMD_DRV_LOG_LINE(INFO, "FW reset happened while port was down");
bp->flags |= BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE;
}
@@ -7057,8 +7057,8 @@ int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc)
struct hwrm_cfa_counter_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7081,8 +7081,8 @@ int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id)
struct hwrm_cfa_ctx_mem_rgtr_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7097,7 +7097,7 @@ int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id)
HWRM_CHECK_RESULT();
if (ctx_id) {
*ctx_id = rte_le_to_cpu_16(resp->ctx_id);
- PMD_DRV_LOG(DEBUG, "ctx_id = %d\n", *ctx_id);
+ PMD_DRV_LOG_LINE(DEBUG, "ctx_id = %d", *ctx_id);
}
HWRM_UNLOCK();
@@ -7111,8 +7111,8 @@ int bnxt_hwrm_ctx_unrgtr(struct bnxt *bp, uint16_t ctx_id)
struct hwrm_cfa_ctx_mem_unrgtr_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7138,8 +7138,8 @@ int bnxt_hwrm_cfa_counter_cfg(struct bnxt *bp, enum bnxt_flow_dir dir,
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7177,8 +7177,8 @@ int bnxt_hwrm_cfa_counter_qstats(struct bnxt *bp,
int rc = 0;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7234,8 +7234,8 @@ int bnxt_hwrm_cfa_pair_exists(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc = 0;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7262,8 +7262,8 @@ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7296,7 +7296,7 @@ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep_bp)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "%s %d allocated\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s %d allocated",
BNXT_REP_PF(rep_bp) ? "PFR" : "VFR", rep_bp->vf_id);
return rc;
}
@@ -7308,8 +7308,8 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7323,7 +7323,7 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "%s %d freed\n", BNXT_REP_PF(rep_bp) ? "PFR" : "VFR",
+ PMD_DRV_LOG_LINE(DEBUG, "%s %d freed", BNXT_REP_PF(rep_bp) ? "PFR" : "VFR",
rep_bp->vf_id);
return rc;
}
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index edf16bd33e..ac00ee1cbb 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -110,7 +110,7 @@ int bnxt_free_int(struct bnxt *bp)
} while (count++ < 10);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "irq cb unregister failed rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "irq cb unregister failed rc: %d",
rc);
return rc;
}
@@ -177,7 +177,7 @@ int bnxt_setup_int(struct bnxt *bp)
bp->irq_tbl[i].handler = bnxt_int_handler;
}
} else {
- PMD_DRV_LOG(ERR, "bnxt_irq_tbl setup failed\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_irq_tbl setup failed");
return -ENOMEM;
}
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 79b3583636..1f0267078b 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -159,11 +159,11 @@ bnxt_get_dflt_vnic_svif(struct bnxt *bp, struct bnxt_representor *vf_rep_bp)
&vf_rep_bp->dflt_vnic_id,
&vf_rep_bp->svif);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to get default vnic id of VF\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to get default vnic id of VF");
vf_rep_bp->dflt_vnic_id = BNXT_DFLT_VNIC_ID_INVALID;
vf_rep_bp->svif = BNXT_SVIF_INVALID;
} else {
- PMD_DRV_LOG(INFO, "vf_rep->dflt_vnic_id = %d\n",
+ PMD_DRV_LOG_LINE(INFO, "vf_rep->dflt_vnic_id = %d",
vf_rep_bp->dflt_vnic_id);
}
if (vf_rep_bp->dflt_vnic_id != BNXT_DFLT_VNIC_ID_INVALID &&
@@ -185,7 +185,7 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
uint16_t first_vf_id;
int rc = 0;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR init\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR init", eth_dev->data->port_id);
vf_rep_bp->vf_id = rep_params->vf_id;
vf_rep_bp->switch_domain_id = rep_params->switch_domain_id;
vf_rep_bp->parent_dev = rep_params->parent_dev;
@@ -224,8 +224,8 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
bnxt_print_link_info(eth_dev);
- PMD_DRV_LOG(INFO,
- "Switch domain id %d: Representor Device %d init done\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Switch domain id %d: Representor Device %d init done",
vf_rep_bp->switch_domain_id, vf_rep_bp->vf_id);
if (BNXT_REP_BASED_PF(vf_rep_bp)) {
@@ -239,12 +239,12 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
if (rc)
return rc;
if (first_vf_id == 0xffff) {
- PMD_DRV_LOG(ERR,
- "Invalid first_vf_id fid:%x\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid first_vf_id fid:%x",
vf_rep_bp->fw_fid);
return -EINVAL;
}
- PMD_DRV_LOG(INFO, "first_vf_id = %x parent_fid:%x\n",
+ PMD_DRV_LOG_LINE(INFO, "first_vf_id = %x parent_fid:%x",
first_vf_id, vf_rep_bp->fw_fid);
vf_rep_bp->fw_fid = rep_params->vf_id + first_vf_id;
}
@@ -256,7 +256,7 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
vf_rep_bp->parent_pf_idx = parent_bp->fw_fid - 1;
}
- PMD_DRV_LOG(INFO, "vf_rep->fw_fid = %d\n", vf_rep_bp->fw_fid);
+ PMD_DRV_LOG_LINE(INFO, "vf_rep->fw_fid = %d", vf_rep_bp->fw_fid);
return 0;
}
@@ -271,11 +271,11 @@ int bnxt_representor_uninit(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR uninit\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR uninit", eth_dev->data->port_id);
eth_dev->data->mac_addrs = NULL;
if (!bnxt_rep_check_parent(rep)) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d already freed\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d already freed",
eth_dev->data->port_id);
return 0;
}
@@ -370,15 +370,15 @@ static int bnxt_vfr_alloc(struct rte_eth_dev *vfr_ethdev)
struct bnxt *parent_bp;
if (!vfr || !vfr->parent_dev) {
- PMD_DRV_LOG(ERR,
- "No memory allocated for representor\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "No memory allocated for representor");
return -ENOMEM;
}
parent_bp = vfr->parent_dev->data->dev_private;
if (parent_bp && !parent_bp->ulp_ctx) {
- PMD_DRV_LOG(ERR,
- "ulp context not allocated for parent\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "ulp context not allocated for parent");
return -EIO;
}
@@ -393,11 +393,11 @@ static int bnxt_vfr_alloc(struct rte_eth_dev *vfr_ethdev)
*/
rc = bnxt_tf_vfr_alloc(vfr_ethdev);
if (!rc)
- PMD_DRV_LOG(DEBUG, "allocated representor %d in FW\n",
+ PMD_DRV_LOG_LINE(DEBUG, "allocated representor %d in FW",
vfr->vf_id);
else
- PMD_DRV_LOG(ERR,
- "Failed to alloc representor %d in FW\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc representor %d in FW",
vfr->vf_id);
return rc;
@@ -480,14 +480,14 @@ static int bnxt_vfr_free(struct bnxt_representor *vfr)
struct bnxt *parent_bp;
if (!vfr || !vfr->parent_dev) {
- PMD_DRV_LOG(ERR,
- "No memory allocated for representor\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "No memory allocated for representor");
return -ENOMEM;
}
parent_bp = vfr->parent_dev->data->dev_private;
if (!parent_bp) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR already freed\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR already freed",
vfr->dpdk_port_id);
return 0;
}
@@ -498,12 +498,12 @@ static int bnxt_vfr_free(struct bnxt_representor *vfr)
rc = bnxt_tf_vfr_free(vfr);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to free representor %d in FW\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to free representor %d in FW",
vfr->vf_id);
}
- PMD_DRV_LOG(DEBUG, "freed representor %d in FW\n",
+ PMD_DRV_LOG_LINE(DEBUG, "freed representor %d in FW",
vfr->vf_id);
vfr->vfr_tx_cfa_action = 0;
@@ -549,11 +549,11 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* MAC Specifics */
if (!bnxt_rep_check_parent(rep_bp)) {
/* Need not be an error scenario, if parent is closed first */
- PMD_DRV_LOG(INFO, "Rep parent port does not exist.\n");
+ PMD_DRV_LOG_LINE(INFO, "Rep parent port does not exist.");
return rc;
}
parent_bp = rep_bp->parent_dev->data->dev_private;
- PMD_DRV_LOG(DEBUG, "Representor dev_info_get_op\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Representor dev_info_get_op");
dev_info->max_mac_addrs = parent_bp->max_l2_ctx;
dev_info->max_hash_mac_addrs = 0;
@@ -592,7 +592,7 @@ int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev)
{
struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
- PMD_DRV_LOG(DEBUG, "Representor dev_configure_op\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Representor dev_configure_op");
rep_bp->rx_queues = (void *)eth_dev->data->rx_queues;
rep_bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
rep_bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
@@ -640,30 +640,30 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
int rc = 0;
if (queue_idx >= rep_bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Cannot create Rx ring %d. %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Rx ring %d. %d rings available",
queue_idx, rep_bp->rx_nr_rings);
return -EINVAL;
}
if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
if (!parent_bp->rx_queues) {
- PMD_DRV_LOG(ERR, "Parent Rx qs not configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent Rx qs not configured yet");
return -EINVAL;
}
parent_rxq = parent_bp->rx_queues[queue_idx];
if (!parent_rxq) {
- PMD_DRV_LOG(ERR, "Parent RxQ has not been configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent RxQ has not been configured yet");
return -EINVAL;
}
if (nb_desc != parent_rxq->nb_rx_desc) {
- PMD_DRV_LOG(ERR, "nb_desc %d do not match parent rxq", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d do not match parent rxq", nb_desc);
return -EINVAL;
}
@@ -677,7 +677,7 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct bnxt_rx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!rxq) {
- PMD_DRV_LOG(ERR, "bnxt_vfr_rx_queue allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_vfr_rx_queue allocation failed!");
return -ENOMEM;
}
@@ -694,7 +694,7 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq->rx_ring->rx_ring_struct->ring_size,
RTE_CACHE_LINE_SIZE, socket_id);
if (!buf_ring) {
- PMD_DRV_LOG(ERR, "bnxt_rx_vfr_buf_ring allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_rx_vfr_buf_ring allocation failed!");
rc = -ENOMEM;
goto out;
}
@@ -740,30 +740,30 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
struct bnxt_vf_rep_tx_queue *vfr_txq;
if (queue_idx >= rep_bp->tx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Cannot create Tx rings %d. %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Tx rings %d. %d rings available",
queue_idx, rep_bp->tx_nr_rings);
return -EINVAL;
}
if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
if (!parent_bp->tx_queues) {
- PMD_DRV_LOG(ERR, "Parent Tx qs not configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent Tx qs not configured yet");
return -EINVAL;
}
parent_txq = parent_bp->tx_queues[queue_idx];
if (!parent_txq) {
- PMD_DRV_LOG(ERR, "Parent TxQ has not been configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent TxQ has not been configured yet");
return -EINVAL;
}
if (nb_desc != parent_txq->nb_tx_desc) {
- PMD_DRV_LOG(ERR, "nb_desc %d do not match parent txq", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d do not match parent txq", nb_desc);
return -EINVAL;
}
@@ -777,14 +777,14 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct bnxt_vf_rep_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!vfr_txq) {
- PMD_DRV_LOG(ERR, "bnxt_vfr_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_vfr_tx_queue allocation failed!");
return -ENOMEM;
}
txq = rte_zmalloc_socket("bnxt_tx_queue",
sizeof(struct bnxt_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq) {
- PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_tx_queue allocation failed!");
rte_free(vfr_txq);
return -ENOMEM;
}
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 9e512321d9..3d63956bd8 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -50,7 +50,7 @@ static void bnxt_init_ring_grps(struct bnxt *bp)
int bnxt_alloc_ring_grps(struct bnxt *bp)
{
if (bp->max_tx_rings == 0) {
- PMD_DRV_LOG(ERR, "No TX rings available!\n");
+ PMD_DRV_LOG_LINE(ERR, "No TX rings available!");
return -EBUSY;
}
@@ -61,7 +61,7 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)
bp->max_ring_grps = BNXT_MAX_RSS_CTXTS_P5;
} else if (bp->max_ring_grps < bp->rx_cp_nr_rings) {
/* 1 ring is for default completion ring */
- PMD_DRV_LOG(ERR, "Insufficient resource: Ring Group\n");
+ PMD_DRV_LOG_LINE(ERR, "Insufficient resource: Ring Group");
return -ENOSPC;
}
@@ -70,8 +70,8 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)
sizeof(*bp->grp_info) *
bp->max_ring_grps, 0);
if (!bp->grp_info) {
- PMD_DRV_LOG(ERR,
- "Failed to alloc grp info tbl.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc grp info tbl.");
return -ENOMEM;
}
bnxt_init_ring_grps(bp);
@@ -416,7 +416,7 @@ static int bnxt_alloc_cmpl_ring(struct bnxt *bp, int queue_index,
if (nqr) {
nq_ring_id = nqr->cp_ring_struct->fw_ring_id;
} else {
- PMD_DRV_LOG(ERR, "NQ ring is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "NQ ring is NULL");
return -EINVAL;
}
}
@@ -657,8 +657,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
if (rxq->rx_started) {
if (bnxt_init_one_rx_ring(rxq)) {
- PMD_DRV_LOG(ERR,
- "ring%d bnxt_init_one_rx_ring failed!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "ring%d bnxt_init_one_rx_ring failed!",
queue_index);
rc = -ENOMEM;
goto err_out;
@@ -675,8 +675,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
return 0;
err_out:
- PMD_DRV_LOG(ERR,
- "Failed to allocate receive queue %d, rc %d.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate receive queue %d, rc %d.",
queue_index, rc);
return rc;
}
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 913856e6eb..1c25c57ca6 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -94,8 +94,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
RTE_MIN(bp->max_l2_ctx,
RTE_MIN(bp->max_rsscos_ctx,
RTE_ETH_64_POOLS)));
- PMD_DRV_LOG(DEBUG,
- "pools = %u max_pools = %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "pools = %u max_pools = %u",
pools, max_pools);
if (pools > max_pools)
pools = max_pools;
@@ -104,7 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : 1;
break;
default:
- PMD_DRV_LOG(ERR, "Unsupported mq_mod %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unsupported mq_mod %d",
dev_conf->rxmode.mq_mode);
rc = -EINVAL;
goto err_out;
@@ -115,7 +115,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
nb_q_per_grp = bp->rx_cp_nr_rings / pools;
- PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "pools = %u nb_q_per_grp = %u",
pools, nb_q_per_grp);
start_grp_id = 0;
end_grp_id = nb_q_per_grp;
@@ -123,7 +123,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
for (i = 0; i < pools; i++) {
vnic = &bp->vnic_info[i];
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "VNIC alloc failed");
rc = -ENOMEM;
goto err_out;
}
@@ -133,8 +133,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
for (j = 0; j < nb_q_per_grp; j++, ring_idx++) {
rxq = bp->eth_dev->data->rx_queues[ring_idx];
rxq->vnic = vnic;
- PMD_DRV_LOG(DEBUG,
- "rxq[%d] = %p vnic[%d] = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "rxq[%d] = %p vnic[%d] = %p",
ring_idx, rxq, i, vnic);
}
if (i == 0) {
@@ -155,7 +155,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
}
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "L2 filter alloc failed");
rc = -ENOMEM;
goto err_out;
}
@@ -332,14 +332,14 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
return rc;
if (queue_idx >= bnxt_max_rings(bp)) {
- PMD_DRV_LOG(ERR,
- "Cannot create Rx ring %d. Only %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Rx ring %d. Only %d rings available",
queue_idx, bp->max_rx_rings);
return -EINVAL;
}
if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_RX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
@@ -351,7 +351,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq = rte_zmalloc_socket("bnxt_rx_queue", sizeof(struct bnxt_rx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!rxq) {
- PMD_DRV_LOG(ERR, "bnxt_rx_queue allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_rx_queue allocation failed!");
return -ENOMEM;
}
rxq->bp = bp;
@@ -360,22 +360,22 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq->rx_free_thresh =
RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_RX_BURST);
- PMD_DRV_LOG(DEBUG,
- "App supplied RXQ drop_en status : %d\n", rx_conf->rx_drop_en);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "App supplied RXQ drop_en status : %d", rx_conf->rx_drop_en);
rxq->drop_en = BNXT_DEFAULT_RX_DROP_EN;
- PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
+ PMD_DRV_LOG_LINE(DEBUG, "RX Buf MTU %d", eth_dev->data->mtu);
eth_dev->data->rx_queues[queue_idx] = rxq;
rc = bnxt_init_rx_ring_struct(rxq, socket_id);
if (rc) {
- PMD_DRV_LOG(ERR,
- "init_rx_ring_struct failed!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "init_rx_ring_struct failed!");
goto err;
}
- PMD_DRV_LOG(DEBUG, "RX Buf size is %d\n", rxq->rx_buf_size);
+ PMD_DRV_LOG_LINE(DEBUG, "RX Buf size is %d", rxq->rx_buf_size);
rxq->queue_id = queue_idx;
rxq->port_id = eth_dev->data->port_id;
if (rx_offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC)
@@ -387,8 +387,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rc = bnxt_alloc_rings(bp, socket_id, queue_idx, NULL, rxq, rxq->cp_ring,
NULL, "rxr");
if (rc) {
- PMD_DRV_LOG(ERR,
- "ring_dma_zone_reserve for rx_ring failed!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "ring_dma_zone_reserve for rx_ring failed!");
goto err;
}
rxq->rx_mbuf_alloc_fail = 0;
@@ -469,13 +469,13 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
return rc;
if (rxq == NULL) {
- PMD_DRV_LOG(ERR, "Invalid Rx queue %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Rx queue %d", rx_queue_id);
return -EINVAL;
}
vnic = bnxt_vnic_queue_id_get_next(bp, rx_queue_id, &vnic_idx);
if (vnic == NULL) {
- PMD_DRV_LOG(ERR, "VNIC not initialized for RxQ %d\n",
+ PMD_DRV_LOG_LINE(ERR, "VNIC not initialized for RxQ %d",
rx_queue_id);
return -EINVAL;
}
@@ -511,23 +511,23 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
/* Reconfigure default receive ring and MRU. */
bnxt_hwrm_vnic_cfg(bp, vnic);
- PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(INFO, "Rx queue started %d", rx_queue_id);
if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
if (BNXT_HAS_RING_GRPS(bp)) {
if (vnic->fw_grp_ids[rx_queue_id] !=
INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR, "invalid ring id %d\n",
+ PMD_DRV_LOG_LINE(ERR, "invalid ring id %d",
rx_queue_id);
return 0;
}
vnic->fw_grp_ids[rx_queue_id] = fw_grp_id;
- PMD_DRV_LOG(DEBUG, "vnic = %p fw_grp_id = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "vnic = %p fw_grp_id = %d",
vnic, fw_grp_id);
}
- PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx Queue Count %d",
vnic->rx_queue_cnt);
rc += bnxt_vnic_rss_queue_status_update(bp, vnic);
}
@@ -541,8 +541,8 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
rxq->rx_started = false;
}
- PMD_DRV_LOG(INFO,
- "queue %d, rx_deferred_start %d, state %d!\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "queue %d, rx_deferred_start %d, state %d!",
rx_queue_id, rxq->rx_deferred_start,
bp->eth_dev->data->rx_queue_state[rx_queue_id]);
@@ -568,25 +568,25 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
* Default CQ for async notifications
*/
if (!BNXT_NUM_ASYNC_CPR(bp) && !rx_queue_id) {
- PMD_DRV_LOG(ERR, "Cannot stop Rx queue id %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Cannot stop Rx queue id %d", rx_queue_id);
return -EINVAL;
}
rxq = bp->rx_queues[rx_queue_id];
if (!rxq) {
- PMD_DRV_LOG(ERR, "Invalid Rx queue %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Rx queue %d", rx_queue_id);
return -EINVAL;
}
vnic = bnxt_vnic_queue_id_get_next(bp, q_id, &vnic_idx);
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC not initialized for RxQ %d\n", q_id);
+ PMD_DRV_LOG_LINE(ERR, "VNIC not initialized for RxQ %d", q_id);
return -EINVAL;
}
dev->data->rx_queue_state[q_id] = RTE_ETH_QUEUE_STATE_STOPPED;
rxq->rx_started = false;
- PMD_DRV_LOG(DEBUG, "Rx queue stopped\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue stopped");
do {
active_queue_cnt = 0;
@@ -594,7 +594,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
if (BNXT_HAS_RING_GRPS(bp))
vnic->fw_grp_ids[q_id] = INVALID_HW_RING_ID;
- PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx Queue Count %d",
vnic->rx_queue_cnt);
rc = bnxt_vnic_rss_queue_status_update(bp, vnic);
}
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b59989b5a1..d51a66ae77 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -76,12 +76,12 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
rxbd = &rxr->ag_desc_ring[prod];
rx_buf = &rxr->ag_buf_ring[prod];
if (rxbd == NULL) {
- PMD_DRV_LOG(ERR, "Jumbo Frame. rxbd is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "Jumbo Frame. rxbd is NULL");
return -EINVAL;
}
if (rx_buf == NULL) {
- PMD_DRV_LOG(ERR, "Jumbo Frame. rx_buf is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "Jumbo Frame. rx_buf is NULL");
return -EINVAL;
}
@@ -159,7 +159,7 @@ static void bnxt_rx_ring_reset(void *arg)
rc = bnxt_hwrm_rx_ring_reset(bp, i);
if (rc) {
- PMD_DRV_LOG(ERR, "Rx ring%d reset failed\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Rx ring%d reset failed", i);
continue;
}
@@ -247,7 +247,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
data_cons = tpa_start->opaque;
tpa_info = &rxr->tpa_info[agg_id];
if (unlikely(data_cons != rxr->rx_next_cons)) {
- PMD_DRV_LOG(ERR, "TPA cons %x, expected cons %x\n",
+ PMD_DRV_LOG_LINE(ERR, "TPA cons %x, expected cons %x",
data_cons, rxr->rx_next_cons);
bnxt_sched_ring_reset(rxq);
return;
@@ -318,7 +318,7 @@ static int bnxt_prod_ag_mbuf(struct bnxt_rx_queue *rxq)
/* TODO batch allocation for better performance */
while (rte_bitmap_get(rxr->ag_bitmap, bmap_next)) {
if (unlikely(bnxt_alloc_ag_data(rxq, rxr, raw_next))) {
- PMD_DRV_LOG(ERR, "agg mbuf alloc failed: prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "agg mbuf alloc failed: prod=0x%x",
raw_next);
break;
}
@@ -432,7 +432,7 @@ static inline struct rte_mbuf *bnxt_tpa_end(
struct bnxt_tpa_info *tpa_info;
if (unlikely(rxq->in_reset)) {
- PMD_DRV_LOG(ERR, "rxq->in_reset: raw_cp_cons:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "rxq->in_reset: raw_cp_cons:%d",
*raw_cp_cons);
bnxt_discard_rx(rxq->bp, cpr, raw_cp_cons, tpa_end);
return NULL;
@@ -1093,7 +1093,7 @@ static int bnxt_crx_pkt(struct rte_mbuf **rx_pkt,
bnxt_set_vlan_crx(rxcmp, mbuf);
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod)) {
- PMD_DRV_LOG(ERR, "mbuf alloc failed with prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "mbuf alloc failed with prod=0x%x",
raw_prod);
rc = -ENOMEM;
goto rx;
@@ -1186,7 +1186,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
cons = rxcmp->opaque;
if (unlikely(cons != rxr->rx_next_cons)) {
bnxt_discard_rx(bp, cpr, &tmp_raw_cons, rxcmp);
- PMD_DRV_LOG(ERR, "RX cons %x != expected cons %x\n",
+ PMD_DRV_LOG_LINE(ERR, "RX cons %x != expected cons %x",
cons, rxr->rx_next_cons);
bnxt_sched_ring_reset(rxq);
rc = -EBUSY;
@@ -1272,7 +1272,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
*/
raw_prod = RING_NEXT(raw_prod);
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod)) {
- PMD_DRV_LOG(ERR, "mbuf alloc failed with prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "mbuf alloc failed with prod=0x%x",
raw_prod);
rc = -ENOMEM;
goto rx;
@@ -1398,7 +1398,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
cpr->cp_ring_struct->ring_size))
break;
if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_HWRM_DONE) {
- PMD_DRV_LOG(ERR, "Rx flush done\n");
+ PMD_DRV_LOG_LINE(ERR, "Rx flush done");
} else if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_RX_L2_COMPRESS) {
rc = bnxt_crx_pkt(&rx_pkts[nb_rx_pkts], rxq,
(struct rx_pkt_compress_cmpl *)rxcmp,
@@ -1631,8 +1631,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
for (i = 0; i < ring->ring_size; i++) {
if (unlikely(!rxr->rx_buf_ring[i])) {
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod) != 0) {
- PMD_DRV_LOG(WARNING,
- "RxQ %d allocated %d of %d mbufs\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "RxQ %d allocated %d of %d mbufs",
rxq->queue_id, i, ring->ring_size);
return -ENOMEM;
}
@@ -1661,8 +1661,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
for (i = 0; i < ring->ring_size; i++) {
if (unlikely(!rxr->ag_buf_ring[i])) {
if (bnxt_alloc_ag_data(rxq, rxr, raw_prod) != 0) {
- PMD_DRV_LOG(WARNING,
- "RxQ %d allocated %d of %d mbufs\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "RxQ %d allocated %d of %d mbufs",
rxq->queue_id, i, ring->ring_size);
return -ENOMEM;
}
@@ -1670,7 +1670,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
rxr->ag_raw_prod = raw_prod;
raw_prod = RING_NEXT(raw_prod);
}
- PMD_DRV_LOG(DEBUG, "AGG Done!\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AGG Done!");
if (rxr->tpa_info) {
unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);
@@ -1687,7 +1687,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
}
}
}
- PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
+ PMD_DRV_LOG_LINE(DEBUG, "TPA alloc Done!");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
index 976f258044..43d9528134 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
@@ -869,7 +869,7 @@ bnxt_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 04864e0b95..0ff1641c19 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -432,7 +432,7 @@ bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index e367fbfbd1..9f1a02f0ab 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -679,7 +679,7 @@ bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index b9cce227d9..5e59afe79f 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -781,7 +781,7 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
return ret;
if (!eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+ PMD_DRV_LOG_LINE(ERR, "Device Initialization not complete!");
return -EINVAL;
}
@@ -1180,13 +1180,13 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
if (BNXT_VF(bp) || !BNXT_SINGLE_PF(bp) ||
!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- PMD_DRV_LOG(ERR, "Operation not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported");
return -ENOTSUP;
}
ret = bnxt_hwrm_port_clr_stats(bp);
if (ret != 0)
- PMD_DRV_LOG(ERR, "Failed to reset xstats: %s\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to reset xstats: %s",
strerror(-ret));
bnxt_clear_prev_stat(bp);
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 05032f7807..c864935992 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -135,14 +135,14 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
return rc;
if (queue_idx >= bnxt_max_rings(bp)) {
- PMD_DRV_LOG(ERR,
- "Cannot create Tx ring %d. Only %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Tx ring %d. Only %d rings available",
queue_idx, bp->max_tx_rings);
return -EINVAL;
}
if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_TX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
@@ -154,7 +154,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
txq = rte_zmalloc_socket("bnxt_tx_queue", sizeof(struct bnxt_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq) {
- PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_tx_queue allocation failed!");
return -ENOMEM;
}
@@ -165,7 +165,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct rte_mbuf *) * nb_desc,
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq->free) {
- PMD_DRV_LOG(ERR, "allocation of tx mbuf free array failed!");
+ PMD_DRV_LOG_LINE(ERR, "allocation of tx mbuf free array failed!");
rc = -ENOMEM;
goto err;
}
@@ -187,20 +187,20 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
/* Allocate TX ring hardware descriptors */
if (bnxt_alloc_rings(bp, socket_id, queue_idx, txq, NULL, txq->cp_ring,
NULL, "txr")) {
- PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!");
+ PMD_DRV_LOG_LINE(ERR, "ring_dma_zone_reserve for tx_ring failed!");
rc = -ENOMEM;
goto err;
}
if (bnxt_init_one_tx_ring(txq)) {
- PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_init_one_tx_ring failed!");
rc = -ENOMEM;
goto err;
}
rc = pthread_mutex_init(&txq->txq_lock, NULL);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "TxQ mutex init failed!");
+ PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
goto err;
}
return 0;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 83c003d258..6a38c7c6e4 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -140,7 +140,7 @@ bnxt_zero_data_len_tso_segsz(struct rte_mbuf *tx_pkt, uint8_t data_len_chk)
}
if (len_to_check == 0) {
- PMD_DRV_LOG(ERR, "Error! Tx pkt %s == 0\n", type_str);
+ PMD_DRV_LOG_LINE(ERR, "Error! Tx pkt %s == 0", type_str);
rte_pktmbuf_dump(stdout, tx_pkt, 64);
rte_dump_stack();
return true;
@@ -226,8 +226,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
/* Check if number of Tx descriptors is above HW limit */
if (unlikely(nr_bds > BNXT_MAX_TSO_SEGS)) {
- PMD_DRV_LOG(ERR,
- "Num descriptors %d exceeds HW limit\n", nr_bds);
+ PMD_DRV_LOG_LINE(ERR,
+ "Num descriptors %d exceeds HW limit", nr_bds);
return -ENOSPC;
}
@@ -237,8 +237,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
char *seg = rte_pktmbuf_append(tx_pkt, pad);
if (!seg) {
- PMD_DRV_LOG(ERR,
- "Failed to pad mbuf by %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to pad mbuf by %d bytes",
pad);
return -ENOMEM;
}
@@ -593,7 +593,7 @@ uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
@@ -639,7 +639,7 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
txq->tx_started = true;
- PMD_DRV_LOG(DEBUG, "Tx queue started\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue started");
return 0;
}
@@ -659,7 +659,7 @@ int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
txq->tx_started = false;
- PMD_DRV_LOG(DEBUG, "Tx queue stopped\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue stopped");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 16373be015..29124a6b9d 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -86,7 +86,7 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp)
/* Find the 1st unused vnic from the free_vnic_list pool*/
vnic = STAILQ_FIRST(&bp->free_vnic_list);
if (!vnic) {
- PMD_DRV_LOG(ERR, "No more free VNIC resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free VNIC resources");
return NULL;
}
STAILQ_REMOVE_HEAD(&bp->free_vnic_list, next);
@@ -164,8 +164,8 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
RTE_MEMZONE_SIZE_HINT_ONLY,
BNXT_PAGE_SIZE);
if (mz == NULL) {
- PMD_DRV_LOG(ERR,
- "Cannot allocate vnic_attributes memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot allocate vnic_attributes memory");
return -ENOMEM;
}
}
@@ -207,7 +207,7 @@ void bnxt_free_vnic_mem(struct bnxt *bp)
for (i = 0; i < max_vnics; i++) {
vnic = &bp->vnic_info[i];
if (vnic->fw_vnic_id != (uint16_t)HWRM_NA_SIGNATURE) {
- PMD_DRV_LOG(ERR, "VNIC is not freed yet!\n");
+ PMD_DRV_LOG_LINE(ERR, "VNIC is not freed yet!");
/* TODO Call HWRM to free VNIC */
}
}
@@ -226,7 +226,7 @@ int bnxt_alloc_vnic_mem(struct bnxt *bp)
vnic_mem = rte_zmalloc("bnxt_vnic_info",
max_vnics * sizeof(struct bnxt_vnic_info), 0);
if (vnic_mem == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for %d VNICs",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for %d VNICs",
max_vnics);
return -ENOMEM;
}
@@ -242,8 +242,8 @@ int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->fw_grp_ids = rte_zmalloc("vnic_fw_grp_ids", size, 0);
if (!vnic->fw_grp_ids) {
- PMD_DRV_LOG(ERR,
- "Failed to alloc %d bytes for group ids\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc %d bytes for group ids",
size);
return -ENOMEM;
}
@@ -311,8 +311,8 @@ int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl)
if ((BNXT_CHIP_P5(bp) && BNXT_VNIC_OUTER_RSS_UNSUPPORTED(bp)) ||
(!BNXT_CHIP_P5(bp) && !(bp->vnic_cap_flags & BNXT_VNIC_CAP_OUTER_RSS))) {
if (lvl)
- PMD_DRV_LOG(INFO,
- "Given RSS level is unsupported, using default RSS level\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "Given RSS level is unsupported, using default RSS level");
return mode;
}
@@ -448,7 +448,7 @@ bnxt_vnic_queue_delete(struct bnxt *bp, uint16_t vnic_idx)
struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_idx];
if (bnxt_hwrm_vnic_free(bp, vnic))
- PMD_DRV_LOG(ERR, "Failed to delete queue\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to delete queue");
if (vnic->fw_grp_ids) {
rte_free(vnic->fw_grp_ids);
@@ -476,7 +476,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
vnic = &bp->vnic_info[vnic_id];
if (vnic->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "invalid queue configuration %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "invalid queue configuration %d", vnic_id);
return NULL;
}
@@ -498,7 +498,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
/* Allocate vnic group for p4 platform */
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to allocate vnic groups\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to allocate vnic groups");
goto cleanup;
}
@@ -508,7 +508,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to allocate vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to allocate vnic %d", q_index);
goto cleanup;
}
@@ -523,7 +523,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
vnic->mru = saved_mru;
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to configure vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure vnic %d", q_index);
goto cleanup;
}
@@ -531,11 +531,11 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
(rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) ?
true : false);
if (rc)
- PMD_DRV_LOG(DEBUG, "Failed to configure TPA on this vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure TPA on this vnic %d", q_index);
rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to configure vnic plcmode %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure vnic plcmode %d",
q_index);
goto cleanup;
}
@@ -573,14 +573,14 @@ bnxt_vnic_queue_db_add(struct bnxt *bp, uint64_t *q_list)
(const void *)q_list);
if (vnic_id < 0 || vnic_id >= bp->max_vnics) {
- PMD_DRV_LOG(DEBUG, "unable to assign vnic index %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "unable to assign vnic index %d",
vnic_id);
return rc;
}
vnic_info = &bp->vnic_info[vnic_id];
if (vnic_info->fw_vnic_id != INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "Invalid ring id for %d.\n", vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "Invalid ring id for %d.", vnic_id);
return rc;
}
return vnic_id;
@@ -598,7 +598,7 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
int32_t out_idx;
if (!(dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS)) {
- PMD_DRV_LOG(ERR, "Error Rss is not supported on this port\n");
+ PMD_DRV_LOG_LINE(ERR, "Error Rss is not supported on this port");
return rc;
}
@@ -610,7 +610,7 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
/* Check to see if the queues id are in supported range */
if (rss_info->queue_num > bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR, "Error unsupported queue num.\n");
+ PMD_DRV_LOG_LINE(ERR, "Error unsupported queue num.");
return rc;
}
@@ -618,8 +618,8 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
for (idx = 0; idx < BNXT_VNIC_MAX_QUEUE_SIZE; idx++) {
if (BNXT_VNIC_BITMAP_GET(rss_info->queue_list, idx)) {
if (idx >= bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Error %d beyond support size %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error %d beyond support size %u",
idx, bp->rx_nr_rings);
return rc;
}
@@ -711,7 +711,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* Allocate vnic group for p4 platform */
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate vnic groups\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate vnic groups");
goto fail_cleanup;
}
@@ -722,7 +722,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* Allocate the vnic in the firmware */
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate vnic %d", idx);
goto fail_cleanup;
}
@@ -735,8 +735,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
break;
}
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM ctx %d alloc failure rc: %x\n", idx, rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM ctx %d alloc failure rc: %x", idx, rc);
goto fail_cleanup;
}
vnic->num_lb_ctxts = nr_ctxs;
@@ -749,7 +749,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
rc = bnxt_hwrm_vnic_cfg(bp, vnic);
vnic->mru = saved_mru;
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to configure vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(ERR, "Failed to configure vnic %d", idx);
goto fail_cleanup;
}
@@ -757,11 +757,11 @@ bnxt_vnic_rss_create(struct bnxt *bp,
(rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) ?
true : false);
if (rc)
- PMD_DRV_LOG(DEBUG, "Failed to configure TPA on this vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure TPA on this vnic %d", idx);
rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to configure vnic plcmode %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to configure vnic plcmode %d",
idx);
goto fail_cleanup;
}
@@ -771,8 +771,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* If only unsupported type(s) are specified then quit */
if (rss_info->rss_types == 0) {
- PMD_DRV_LOG(ERR,
- "Unsupported RSS hash type(s)\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported RSS hash type(s)");
goto fail_cleanup;
}
@@ -805,8 +805,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
if (rc) {
memset(vnic->rss_hash_key, 0, HW_HASH_KEY_SIZE);
- PMD_DRV_LOG(ERR,
- "Failed to configure vnic rss details %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to configure vnic rss details %d",
idx);
goto fail_cleanup;
}
@@ -834,7 +834,7 @@ bnxt_vnic_rss_queue_status_update(struct bnxt *bp, struct bnxt_vnic_info *vnic)
/* configure the rss table */
if (bnxt_hwrm_vnic_rss_cfg(bp, vnic)) {
- PMD_DRV_LOG(DEBUG, "Failed to update vnic rss details\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to update vnic rss details");
return -EINVAL;
}
return 0;
@@ -854,8 +854,8 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
/* validate key length */
if (rss_info->key_len != 0 && rss_info->key_len != HW_HASH_KEY_SIZE) {
- PMD_DRV_LOG(ERR,
- "Invalid hashkey length, should be %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid hashkey length, should be %d bytes",
HW_HASH_KEY_SIZE);
return -EINVAL;
}
@@ -865,8 +865,8 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
/* If only unsupported type(s) are specified then quit */
if (!rss_info->rss_types) {
- PMD_DRV_LOG(ERR,
- "Unsupported RSS hash type\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported RSS hash type");
return -EINVAL;
}
@@ -912,10 +912,10 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
if (apply) {
if (bnxt_hwrm_vnic_rss_cfg(bp, vnic)) {
memcpy(vnic->rss_hash_key, old_rss_hash_key, HW_HASH_KEY_SIZE);
- PMD_DRV_LOG(ERR, "Error configuring vnic RSS config\n");
+ PMD_DRV_LOG_LINE(ERR, "Error configuring vnic RSS config");
return -EINVAL;
}
- PMD_DRV_LOG(INFO, "Rss config successfully applied\n");
+ PMD_DRV_LOG_LINE(INFO, "Rss config successfully applied");
}
return 0;
}
@@ -947,7 +947,7 @@ int32_t bnxt_vnic_queue_db_init(struct bnxt *bp)
hash_tbl_params.socket_id = rte_socket_id();
bp->vnic_queue_db.rss_q_db = rte_hash_create(&hash_tbl_params);
if (bp->vnic_queue_db.rss_q_db == NULL) {
- PMD_DRV_LOG(ERR, "Failed to create rss hash tbl\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to create rss hash tbl");
return -ENOMEM;
}
return 0;
@@ -967,13 +967,13 @@ void bnxt_vnic_queue_db_update_dlft_vnic(struct bnxt *bp)
vnic_id = bnxt_vnic_queue_db_add(bp, bitmap);
if (vnic_id < 0) {
- PMD_DRV_LOG(ERR, "Unable to alloc vnic for default rss\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to alloc vnic for default rss");
return;
}
dflt_vnic = bnxt_vnic_queue_db_get_vnic(bp, vnic_id);
if (dflt_vnic == NULL) {
- PMD_DRV_LOG(ERR, "Invalid vnic for default rss %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic for default rss %d", vnic_id);
return;
}
/* Update the default vnic structure */
@@ -995,7 +995,7 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
/* validate the given queue id */
if (q_index >= bp->rx_nr_rings || q_index >= BNXT_VNIC_MAX_QUEUE_SIZE) {
- PMD_DRV_LOG(ERR, "invalid queue id should be less than %d\n",
+ PMD_DRV_LOG_LINE(ERR, "invalid queue id should be less than %d",
bp->rx_nr_rings);
return rc;
}
@@ -1009,14 +1009,14 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
/* Assign the vnic slot */
idx = bnxt_vnic_queue_db_add(bp, queue_list);
if (idx < 0) {
- PMD_DRV_LOG(DEBUG, "Unable to alloc vnic for queue\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unable to alloc vnic for queue");
return rc;
}
/* Allocate a new one */
vnic_info = bnxt_vnic_queue_create(bp, idx, q_index);
if (!vnic_info) {
- PMD_DRV_LOG(ERR, "failed to create vnic - %d\n",
+ PMD_DRV_LOG_LINE(ERR, "failed to create vnic - %d",
q_index);
bnxt_vnic_queue_db_del(bp, queue_list);
return rc; /* failed */
@@ -1024,7 +1024,7 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
} else {
vnic_info = bnxt_vnic_queue_db_get_vnic(bp, idx);
if (vnic_info == NULL) {
- PMD_DRV_LOG(ERR, "Unable to lookup vnic for queue %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unable to lookup vnic for queue %d",
q_index);
return rc;
}
@@ -1045,14 +1045,14 @@ bnxt_vnic_queue_action_free(struct bnxt *bp, uint16_t vnic_id)
/* validate the given vnic idx */
if (vnic_idx >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic idx %d\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic idx %d", vnic_idx);
return rc;
}
/* validate the vnic info */
vnic_info = &bp->vnic_info[vnic_idx];
if (!vnic_info->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "Invalid vnic idx, no queues being used\n");
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic idx, no queues being used");
return rc;
}
if (vnic_info->ref_cnt) {
@@ -1062,7 +1062,7 @@ bnxt_vnic_queue_action_free(struct bnxt *bp, uint16_t vnic_id)
vnic_info->queue_bitmap);
/* Check to ensure there is no corruption */
if (idx != vnic_idx)
- PMD_DRV_LOG(ERR, "bad vnic idx %d\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "bad vnic idx %d", vnic_idx);
bnxt_vnic_queue_delete(bp, vnic_idx);
}
@@ -1083,26 +1083,26 @@ bnxt_vnic_rss_action_alloc(struct bnxt *bp,
/* validate the given parameters */
rc = bnxt_vnic_queue_db_rss_validate(bp, rss_info, &idx);
if (rc == -EINVAL) {
- PMD_DRV_LOG(ERR, "Failed to apply the rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to apply the rss action.");
return rc;
} else if (rc == -ENOENT) {
/* Allocate a new entry */
idx = bnxt_vnic_queue_db_add(bp, rss_info->queue_list);
if (idx < 0) {
- PMD_DRV_LOG(DEBUG, "Unable to alloc vnic for rss\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unable to alloc vnic for rss");
return rc;
}
/* create the rss vnic */
vnic_info = bnxt_vnic_rss_create(bp, rss_info, idx);
if (!vnic_info) {
- PMD_DRV_LOG(ERR, "Failed to create rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to create rss action.");
bnxt_vnic_queue_db_del(bp, rss_info->queue_list);
return rc;
}
} else {
vnic_info = bnxt_vnic_queue_db_get_vnic(bp, idx);
if (vnic_info == NULL) {
- PMD_DRV_LOG(ERR, "Unable to lookup vnic for idx %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unable to lookup vnic for idx %d",
idx);
return rc;
}
@@ -1112,7 +1112,7 @@ bnxt_vnic_rss_action_alloc(struct bnxt *bp,
/* check configuration has changed then update hash details */
rc = bnxt_vnic_rss_hash_algo_update(bp, vnic_info, rss_info);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update the rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to update the rss action.");
return rc;
}
}
@@ -1133,14 +1133,14 @@ bnxt_vnic_rss_action_free(struct bnxt *bp, uint16_t vnic_id)
/* validate the given vnic id */
if (vnic_id >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic id %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic id %d", vnic_id);
return rc;
}
/* validate vnic info */
vnic_info = &bp->vnic_info[vnic_id];
if (!vnic_info->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "Invalid vnic id, not using any queues\n");
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic id, not using any queues");
return rc;
}
@@ -1165,7 +1165,7 @@ bnxt_vnic_rss_action_free(struct bnxt *bp, uint16_t vnic_id)
/* check to ensure there is no corruption */
if (idx != vnic_id)
- PMD_DRV_LOG(ERR, "bad vnic idx %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "bad vnic idx %d", vnic_id);
bnxt_vnic_rss_delete(bp, vnic_id);
}
}
@@ -1192,7 +1192,7 @@ bnxt_vnic_reta_config_update(struct bnxt *bp,
q_id = reta_conf[idx].reta[sft];
if (q_id >= bp->vnic_queue_db.num_queues ||
!bp->eth_dev->data->rx_queues[q_id]) {
- PMD_DRV_LOG(ERR, "Queue id %d is invalid\n", q_id);
+ PMD_DRV_LOG_LINE(ERR, "Queue id %d is invalid", q_id);
return -EINVAL;
}
BNXT_VNIC_BITMAP_SET(l_bitmap, q_id);
@@ -1273,7 +1273,7 @@ bnxt_vnic_queue_db_get_vnic(struct bnxt *bp, uint16_t vnic_idx)
struct bnxt_vnic_info *vnic_info;
if (vnic_idx >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic index %u\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic index %u", vnic_idx);
return NULL;
}
vnic_info = &bp->vnic_info[vnic_idx];
@@ -1338,7 +1338,7 @@ int bnxt_rte_flow_to_hwrm_ring_select_mode(enum rte_eth_hash_function hash_f,
hash_f != RTE_ETH_HASH_FUNCTION_DEFAULT) {
if (hash_f == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ||
(!BNXT_CHIP_P7(bp) && hash_f == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)) {
- PMD_DRV_LOG(ERR, "Unsupported hash function\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported hash function");
return -ENOTSUP;
}
}
@@ -1355,7 +1355,7 @@ int bnxt_rte_flow_to_hwrm_ring_select_mode(enum rte_eth_hash_function hash_f,
vnic->rss_types_local = types;
return 0;
}
- PMD_DRV_LOG(ERR, "Hash function not supported with checksun type\n");
+ PMD_DRV_LOG_LINE(ERR, "Hash function not supported with checksun type");
return -ENOTSUP;
}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 964a5aeb05..e9b5739050 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -57,8 +57,8 @@ int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)
bp = eth_dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set Tx loopback on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set Tx loopback on non-PF port %d!",
port);
return -ENOTSUP;
}
@@ -99,8 +99,8 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
bp = eth_dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set all queues drop on non-PF port!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set all queues drop on non-PF port!");
return -ENOTSUP;
}
@@ -112,7 +112,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
bp->vnic_info[i].bd_stall = !on;
rc = bnxt_hwrm_vnic_cfg(bp, &bp->vnic_info[i]);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update PF VNIC %d.\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update PF VNIC %d.", i);
return rc;
}
}
@@ -123,7 +123,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
rte_pmd_bnxt_set_all_queues_drop_en_cb, &on,
bnxt_hwrm_vnic_cfg);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", i);
break;
}
}
@@ -147,8 +147,8 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -160,8 +160,8 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d mac address on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d mac address on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -189,8 +189,8 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -211,7 +211,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
/* Requested BW can't be greater than link speed */
if (tot_rate > eth_dev->data->dev_link.link_speed) {
- PMD_DRV_LOG(ERR, "Rate > Link speed. Set to %d\n", tot_rate);
+ PMD_DRV_LOG_LINE(ERR, "Rate > Link speed. Set to %d", tot_rate);
return -EINVAL;
}
@@ -247,8 +247,8 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -256,8 +256,8 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set mac spoof on non-PF port %d!\n", port);
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set mac spoof on non-PF port %d!", port);
return -EINVAL;
}
@@ -306,8 +306,8 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -315,8 +315,8 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VLAN spoof on non-PF port %d!\n", port);
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VLAN spoof on non-PF port %d!", port);
return -EINVAL;
}
@@ -334,7 +334,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = -1;
}
} else {
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", vf);
}
return rc;
@@ -363,8 +363,8 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -375,8 +375,8 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d stripq on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d stripq on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -385,7 +385,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
rte_pmd_bnxt_set_vf_vlan_stripq_cb, &on,
bnxt_hwrm_vnic_cfg);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", vf);
return rc;
}
@@ -407,8 +407,8 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -422,7 +422,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
return -EINVAL;
if (rx_mask & RTE_ETH_VMDQ_ACCEPT_UNTAG) {
- PMD_DRV_LOG(ERR, "Currently cannot toggle this setting\n");
+ PMD_DRV_LOG_LINE(ERR, "Currently cannot toggle this setting");
return -ENOTSUP;
}
@@ -445,7 +445,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
&bp->pf->vf_info[vf].l2_rx_mask,
bnxt_set_rx_mask_no_vlan);
if (rc)
- PMD_DRV_LOG(ERR, "bnxt_hwrm_func_vf_vnic_set_rxmask failed\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_hwrm_func_vf_vnic_set_rxmask failed");
return rc;
}
@@ -457,8 +457,8 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
struct bnxt_vnic_info vnic;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VLAN table on non-PF port!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VLAN table on non-PF port!");
return -EINVAL;
}
@@ -470,7 +470,7 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
/* This simply indicates there's no driver loaded.
* This is not an error.
*/
- PMD_DRV_LOG(ERR, "Unable to get default VNIC for VF %d\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Unable to get default VNIC for VF %d", vf);
} else {
memset(&vnic, 0, sizeof(vnic));
vnic.fw_vnic_id = dflt_vnic;
@@ -534,10 +534,10 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
/* Now check that there's space */
if (cnt == getpagesize() / sizeof(struct
bnxt_vlan_antispoof_table_entry)) {
- PMD_DRV_LOG(ERR,
- "VLAN anti-spoof table is full\n");
- PMD_DRV_LOG(ERR,
- "VF %d cannot add VLAN %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "VLAN anti-spoof table is full");
+ PMD_DRV_LOG_LINE(ERR,
+ "VF %d cannot add VLAN %u",
i, vlan);
rc = -1;
continue;
@@ -598,8 +598,8 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -610,8 +610,8 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to get VF %d stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to get VF %d stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -634,8 +634,8 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -646,8 +646,8 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to reset VF %d stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to reset VF %d stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -668,8 +668,8 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -680,8 +680,8 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to query VF %d RX stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to query VF %d RX stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -703,8 +703,8 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -715,8 +715,8 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to query VF %d TX drops on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to query VF %d TX drops on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -742,8 +742,8 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -754,8 +754,8 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to config VF %d MAC on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to config VF %d MAC on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -825,8 +825,8 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -837,8 +837,8 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d vlan insert on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d vlan insert on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -869,8 +869,8 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
dev = &rte_eth_devices[port];
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -878,8 +878,8 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set persist stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set persist stats on non-PF port %d!",
port);
return -EINVAL;
}
diff --git a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
index d72ac83295..9c527e152d 100644
--- a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
@@ -62,8 +62,8 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
DP_DEFRAG_TO_FIT);
if (index == DP_INVALID_INDEX) {
- PMD_DRV_LOG(ERR,
- "%s, EM entry index allocation failed\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "%s, EM entry index allocation failed",
tf_dir_2_str(parms->dir));
return -1;
}
diff --git a/drivers/net/bnxt/tf_core/tf_em_internal.c b/drivers/net/bnxt/tf_core/tf_em_internal.c
index 46de63a9da..7f7a663789 100644
--- a/drivers/net/bnxt/tf_core/tf_em_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_internal.c
@@ -56,8 +56,8 @@ tf_em_insert_int_entry(struct tf *tfp,
pool = (struct dpool *)tfs->em_pool[parms->dir];
index = dpool_alloc(pool, TF_SESSION_EM_ENTRY_SIZE, 0);
if (index == DP_INVALID_INDEX) {
- PMD_DRV_LOG(ERR,
- "%s, EM entry index allocation failed\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "%s, EM entry index allocation failed",
tf_dir_2_str(parms->dir));
return -1;
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
index cd4cd8ac74..747f1da557 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
@@ -11,7 +11,8 @@
#include "bnxt_ulp.h"
#include "ulp_template_db_enum.h"
-#define BNXT_TF_DBG(lvl, fmt, args...) PMD_DRV_LOG(lvl, fmt, ## args)
+#define BNXT_TF_DBG(lvl, fmt, ...) \
+ RTE_LOG(lvl, BNXT, "%s(): " fmt, __func__, ## __VA_ARGS__)
#define BNXT_TF_INF(fmt, args...)
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
index 96d61c3ed2..75a0b77ac2 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
@@ -54,19 +54,19 @@ bnxt_pmd_get_bp(uint16_t port)
struct rte_eth_dev *dev;
if (!rte_eth_dev_is_valid_port(port)) {
- PMD_DRV_LOG(ERR, "Invalid port %d\n", port);
+ PMD_DRV_LOG_LINE(ERR, "Invalid port %d", port);
return NULL;
}
dev = &rte_eth_devices[port];
if (!is_bnxt_supported(dev)) {
- PMD_DRV_LOG(ERR, "Device %d not supported\n", port);
+ PMD_DRV_LOG_LINE(ERR, "Device %d not supported", port);
return NULL;
}
bp = (struct bnxt *)dev->data->dev_private;
if (!BNXT_TRUFLOW_EN(bp)) {
- PMD_DRV_LOG(ERR, "TRUFLOW not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "TRUFLOW not enabled");
return NULL;
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 33028c470f..361bed7b3e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -1347,7 +1347,7 @@ ulp_ctx_attach(struct bnxt *bp,
/* Create a TF Client */
rc = ulp_ctx_session_open(bp, session);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to open ctxt session, rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Failed to open ctxt session, rc:%d", rc);
tfp->session = NULL;
return rc;
}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index c39cde39aa..2360788f8f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -86,7 +86,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to initialize fc mutex\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize fc mutex");
goto error;
}
@@ -269,16 +269,16 @@ ulp_bulk_get_flow_stats(struct tf *tfp,
((uintptr_t)(fc_info->shadow_hw_tbl[dir].mem_pa));
if (!stats) {
- PMD_DRV_LOG(ERR,
- "BULK: Memory not initialized id:0x%x dir:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "BULK: Memory not initialized id:0x%x dir:%d",
parms.starting_idx, dir);
return -EINVAL;
}
rc = tf_tbl_bulk_get(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "BULK: Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "BULK: Get failed for id:0x%x rc:%d",
parms.starting_idx, rc);
return rc;
}
@@ -337,8 +337,8 @@ ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
parms.data = (uint8_t *)&stats;
rc = tf_get_tbl_entry(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Get failed for id:0x%x rc:%d",
parms.idx, rc);
return rc;
}
@@ -358,7 +358,7 @@ ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
sparms.data_sz_in_bytes = sizeof(uint64_t);
rc = tf_set_tbl_entry(tfp, &sparms);
if (rc) {
- PMD_DRV_LOG(ERR, "Set failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Set failed for id:0x%x rc:%d",
sparms.idx, rc);
return rc;
}
@@ -391,8 +391,8 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,
parms.data = (uint8_t *)&stats;
rc = tf_get_tbl_entry(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Get failed for id:0x%x rc:%d",
parms.idx, rc);
return rc;
}
@@ -419,7 +419,7 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,
if (ulp_flow_db_parent_flow_count_update(ctxt, pc_idx,
t_sw->pkt_count,
t_sw->byte_count)) {
- PMD_DRV_LOG(ERR, "Error updating parent counters\n");
+ PMD_DRV_LOG_LINE(ERR, "Error updating parent counters");
}
}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 852deef3b4..074cb4ff45 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -413,7 +413,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to initialize ha mutex\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
goto cleanup;
}
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index e0c239e88f..a846ab6dae 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -503,17 +503,17 @@ __extension__ ({ \
if (ret == 0) { \
mp_proc_##f(_a, rsp, ## __VA_ARGS__); \
} else { \
- PMD_DRV_LOG(ERR, \
- "%s returned error: %d\n", \
+ PMD_DRV_LOG_LINE(ERR, \
+ "%s returned error: %d", \
mp_name_ ## f, rsp->result);\
} \
free(mp_rep.msgs); \
} else if (rte_errno == ENOTSUP) { \
- PMD_DRV_LOG(ERR, \
- "No IPC, can't proxy to primary\n");\
+ PMD_DRV_LOG_LINE(ERR, \
+ "No IPC, can't proxy to primary");\
ret = -rte_errno; \
} else { \
- PMD_DRV_LOG(ERR, "Request %s failed: %s\n", \
+ PMD_DRV_LOG_LINE(ERR, "Request %s failed: %s", \
mp_name_ ## f, \
rte_strerror(rte_errno)); \
ret = -EIO; \
@@ -778,10 +778,10 @@ static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
}
if (tx_info)
- PMD_TX_LOG(ERR, "tx_info doesn't have valid mbuf. queue %d:%d req_id %u\n",
+ PMD_TX_LOG_LINE(ERR, "tx_info doesn't have valid mbuf. queue %d:%d req_id %u",
tx_ring->port_id, tx_ring->id, req_id);
else
- PMD_TX_LOG(ERR, "Invalid req_id: %hu in queue %d:%d\n",
+ PMD_TX_LOG_LINE(ERR, "Invalid req_id: %hu in queue %d:%d",
req_id, tx_ring->port_id, tx_ring->id);
/* Trigger device reset */
@@ -798,7 +798,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
/* Allocate only the host info */
rc = ena_com_allocate_host_info(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot allocate host info\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot allocate host info");
return;
}
@@ -825,9 +825,9 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
rc = ena_com_set_host_attributes(ena_dev);
if (rc) {
if (rc == ENA_COM_UNSUPPORTED)
- PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(WARNING, "Cannot set host attributes");
else
- PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set host attributes");
goto err;
}
@@ -862,16 +862,16 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
rc = ena_com_allocate_debug_area(&adapter->ena_dev, debug_area_size);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot allocate debug area\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot allocate debug area");
return;
}
rc = ena_com_set_host_attributes(&adapter->ena_dev);
if (rc) {
if (rc == ENA_COM_UNSUPPORTED)
- PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(WARNING, "Cannot set host attributes");
else
- PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set host attributes");
goto err;
}
@@ -904,7 +904,7 @@ static int ena_close(struct rte_eth_dev *dev)
rte_intr_disable(intr_handle);
rc = rte_intr_callback_unregister_sync(intr_handle, ena_control_path_handler, dev);
if (unlikely(rc != 0))
- PMD_INIT_LOG(ERR, "Failed to unregister interrupt handler\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to unregister interrupt handler");
} else {
rte_eal_alarm_cancel(ena_control_path_poll_handler, dev);
}
@@ -944,19 +944,19 @@ ena_dev_reset(struct rte_eth_dev *dev)
/* Cannot release memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_reset not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_reset not supported in secondary.");
return -EPERM;
}
rc = eth_ena_dev_uninit(dev);
if (rc) {
- PMD_INIT_LOG(CRIT, "Failed to un-initialize device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to un-initialize device");
return rc;
}
rc = eth_ena_dev_init(dev);
if (rc)
- PMD_INIT_LOG(CRIT, "Cannot initialize device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Cannot initialize device");
return rc;
}
@@ -995,7 +995,7 @@ static void ena_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
ring->configured = 0;
- PMD_DRV_LOG(NOTICE, "Rx queue %d:%d released\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Rx queue %d:%d released",
ring->port_id, ring->id);
}
@@ -1016,7 +1016,7 @@ static void ena_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
ring->configured = 0;
- PMD_DRV_LOG(NOTICE, "Tx queue %d:%d released\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Tx queue %d:%d released",
ring->port_id, ring->id);
}
@@ -1091,8 +1091,8 @@ static int ena_queue_start_all(struct rte_eth_dev *dev,
rc = ena_queue_start(dev, &queues[i]);
if (rc) {
- PMD_INIT_LOG(ERR,
- "Failed to start queue[%d] of type(%d)\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Failed to start queue[%d] of type(%d)",
i, ring_type);
goto err;
}
@@ -1173,8 +1173,8 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
* queue depth when working in large llq policy.
*/
max_tx_queue_size >>= 1;
- PMD_INIT_LOG(INFO,
- "large LLQ policy requires limiting Tx queue size to %u entries\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "large LLQ policy requires limiting Tx queue size to %u entries",
max_tx_queue_size);
} else if (dev->max_wide_llq_depth < max_tx_queue_size) {
/* In case the queue depth that the driver calculated exceeds
@@ -1184,20 +1184,20 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
max_tx_queue_size = dev->max_wide_llq_depth;
}
} else {
- PMD_INIT_LOG(INFO,
- "Forcing large LLQ headers failed since device lacks this support\n");
+ PMD_INIT_LOG_LINE(INFO,
+ "Forcing large LLQ headers failed since device lacks this support");
}
}
if (unlikely(max_rx_queue_size == 0 || max_tx_queue_size == 0)) {
- PMD_INIT_LOG(ERR, "Invalid queue size\n");
+ PMD_INIT_LOG_LINE(ERR, "Invalid queue size");
return -EFAULT;
}
ctx->max_tx_queue_size = max_tx_queue_size;
ctx->max_rx_queue_size = max_rx_queue_size;
- PMD_DRV_LOG(INFO, "tx queue size %u\n", max_tx_queue_size);
+ PMD_DRV_LOG_LINE(INFO, "tx queue size %u", max_tx_queue_size);
return 0;
}
@@ -1228,7 +1228,7 @@ static int ena_stats_get(struct rte_eth_dev *dev,
&ena_stats);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc)) {
- PMD_DRV_LOG(ERR, "Could not retrieve statistics from ENA\n");
+ PMD_DRV_LOG_LINE(ERR, "Could not retrieve statistics from ENA");
return rc;
}
@@ -1286,9 +1286,9 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
rc = ENA_PROXY(adapter, ena_com_set_dev_mtu, ena_dev, mtu);
if (rc)
- PMD_DRV_LOG(ERR, "Could not set MTU: %d\n", mtu);
+ PMD_DRV_LOG_LINE(ERR, "Could not set MTU: %d", mtu);
else
- PMD_DRV_LOG(NOTICE, "MTU set to: %d\n", mtu);
+ PMD_DRV_LOG_LINE(NOTICE, "MTU set to: %d", mtu);
return rc;
}
@@ -1302,7 +1302,7 @@ static int ena_start(struct rte_eth_dev *dev)
/* Cannot allocate memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_start not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_start not supported in secondary.");
return -EPERM;
}
@@ -1361,7 +1361,7 @@ static int ena_stop(struct rte_eth_dev *dev)
/* Cannot free memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_stop not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_stop not supported in secondary.");
return -EPERM;
}
@@ -1372,7 +1372,7 @@ static int ena_stop(struct rte_eth_dev *dev)
if (adapter->trigger_reset) {
rc = ena_com_dev_reset(ena_dev, adapter->reset_reason);
if (rc)
- PMD_DRV_LOG(ERR, "Device reset failed, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Device reset failed, rc: %d", rc);
}
rte_intr_disable(intr_handle);
@@ -1434,8 +1434,8 @@ static int ena_create_io_queue(struct rte_eth_dev *dev, struct ena_ring *ring)
rc = ena_com_create_io_queue(ena_dev, &ctx);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to create IO queue[%d] (qid:%d), rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to create IO queue[%d] (qid:%d), rc: %d",
ring->id, ena_qid, rc);
return rc;
}
@@ -1444,8 +1444,8 @@ static int ena_create_io_queue(struct rte_eth_dev *dev, struct ena_ring *ring)
&ring->ena_com_io_sq,
&ring->ena_com_io_cq);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to get IO queue[%d] handlers, rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to get IO queue[%d] handlers, rc: %d",
ring->id, rc);
ena_com_destroy_io_queue(ena_dev, ena_qid);
return rc;
@@ -1503,7 +1503,7 @@ static int ena_queue_start(struct rte_eth_dev *dev, struct ena_ring *ring)
rc = ena_create_io_queue(dev, ring);
if (rc) {
- PMD_INIT_LOG(ERR, "Failed to create IO queue\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to create IO queue");
return rc;
}
@@ -1521,7 +1521,7 @@ static int ena_queue_start(struct rte_eth_dev *dev, struct ena_ring *ring)
if (rc != bufs_num) {
ena_com_destroy_io_queue(&ring->adapter->ena_dev,
ENA_IO_RXQ_IDX(ring->id));
- PMD_INIT_LOG(ERR, "Failed to populate Rx ring\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to populate Rx ring");
return ENA_COM_FAULT;
}
/* Flush per-core RX buffers pools cache as they can be used on other
@@ -1546,22 +1546,22 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
txq = &adapter->tx_ring[queue_idx];
if (txq->configured) {
- PMD_DRV_LOG(CRIT,
- "API violation. Queue[%d] is already configured\n",
+ PMD_DRV_LOG_LINE(CRIT,
+ "API violation. Queue[%d] is already configured",
queue_idx);
return ENA_COM_FAULT;
}
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Tx queue: %d is not a power of 2.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Tx queue: %d is not a power of 2.",
nb_desc);
return -EINVAL;
}
if (nb_desc > adapter->max_tx_ring_size) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Tx queue (max size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Tx queue (max size: %d)",
adapter->max_tx_ring_size);
return -EINVAL;
}
@@ -1580,8 +1580,8 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->tx_buffer_info) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Tx buffer info\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Tx buffer info");
return -ENOMEM;
}
@@ -1590,8 +1590,8 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->empty_tx_reqs) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for empty Tx requests\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for empty Tx requests");
rte_free(txq->tx_buffer_info);
return -ENOMEM;
}
@@ -1602,7 +1602,7 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->push_buf_intermediate_buf) {
- PMD_DRV_LOG(ERR, "Failed to alloc push buffer for LLQ\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc push buffer for LLQ");
rte_free(txq->tx_buffer_info);
rte_free(txq->empty_tx_reqs);
return -ENOMEM;
@@ -1648,22 +1648,22 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
rxq = &adapter->rx_ring[queue_idx];
if (rxq->configured) {
- PMD_DRV_LOG(CRIT,
- "API violation. Queue[%d] is already configured\n",
+ PMD_DRV_LOG_LINE(CRIT,
+ "API violation. Queue[%d] is already configured",
queue_idx);
return ENA_COM_FAULT;
}
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx queue: %d is not a power of 2.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx queue: %d is not a power of 2.",
nb_desc);
return -EINVAL;
}
if (nb_desc > adapter->max_rx_ring_size) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx queue (max size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx queue (max size: %d)",
adapter->max_rx_ring_size);
return -EINVAL;
}
@@ -1671,8 +1671,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
/* ENA isn't supporting buffers smaller than 1400 bytes */
buffer_size = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
if (buffer_size < ENA_RX_BUF_MIN_SIZE) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx buffer: %zu (min size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx buffer: %zu (min size: %d)",
buffer_size, ENA_RX_BUF_MIN_SIZE);
return -EINVAL;
}
@@ -1690,8 +1690,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->rx_buffer_info) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Rx buffer info\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Rx buffer info");
return -ENOMEM;
}
@@ -1700,8 +1700,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->rx_refill_buffer) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Rx refill buffer\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Rx refill buffer");
rte_free(rxq->rx_buffer_info);
rxq->rx_buffer_info = NULL;
return -ENOMEM;
@@ -1712,8 +1712,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->empty_rx_reqs) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for empty Rx requests\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for empty Rx requests");
rte_free(rxq->rx_buffer_info);
rxq->rx_buffer_info = NULL;
rte_free(rxq->rx_refill_buffer);
@@ -1754,7 +1754,7 @@ static int ena_add_single_rx_desc(struct ena_com_io_sq *io_sq,
/* pass resource to device */
rc = ena_com_add_single_rx_desc(io_sq, &ebuf, id);
if (unlikely(rc != 0))
- PMD_RX_LOG(WARNING, "Failed adding Rx desc\n");
+ PMD_RX_LOG_LINE(WARNING, "Failed adding Rx desc");
return rc;
}
@@ -1777,7 +1777,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
in_use = rxq->ring_size - 1 -
ena_com_free_q_entries(rxq->ena_com_io_sq);
if (unlikely((in_use + count) >= rxq->ring_size))
- PMD_RX_LOG(ERR, "Bad Rx ring state\n");
+ PMD_RX_LOG_LINE(ERR, "Bad Rx ring state");
#endif
/* get resources for incoming packets */
@@ -1785,7 +1785,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
if (unlikely(rc < 0)) {
rte_atomic64_inc(&rxq->adapter->drv_stats->rx_nombuf);
++rxq->rx_stats.mbuf_alloc_fail;
- PMD_RX_LOG(DEBUG, "There are not enough free buffers\n");
+ PMD_RX_LOG_LINE(DEBUG, "There are not enough free buffers");
return 0;
}
@@ -1808,8 +1808,8 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
}
if (unlikely(i < count)) {
- PMD_RX_LOG(WARNING,
- "Refilled Rx queue[%d] with only %d/%d buffers\n",
+ PMD_RX_LOG_LINE(WARNING,
+ "Refilled Rx queue[%d] with only %d/%d buffers",
rxq->id, i, count);
rte_pktmbuf_free_bulk(&mbufs[i], count - i);
++rxq->rx_stats.refill_partial;
@@ -1835,9 +1835,9 @@ static size_t ena_get_metrics_entries(struct ena_adapter *adapter)
metrics_num = ENA_STATS_ARRAY_METRICS;
else if (ena_com_get_cap(ena_dev, ENA_ADMIN_ENI_STATS))
metrics_num = ENA_STATS_ARRAY_METRICS_LEGACY;
- PMD_DRV_LOG(NOTICE, "0x%x customer metrics are supported\n", (unsigned int)metrics_num);
+ PMD_DRV_LOG_LINE(NOTICE, "0x%x customer metrics are supported", (unsigned int)metrics_num);
if (metrics_num > ENA_MAX_CUSTOMER_METRICS) {
- PMD_DRV_LOG(NOTICE, "Not enough space for the requested customer metrics\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Not enough space for the requested customer metrics");
metrics_num = ENA_MAX_CUSTOMER_METRICS;
}
return metrics_num;
@@ -1855,7 +1855,7 @@ static int ena_device_init(struct ena_adapter *adapter,
/* Initialize mmio registers */
rc = ena_com_mmio_reg_read_request_init(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to init MMIO read less\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to init MMIO read less");
return rc;
}
@@ -1868,14 +1868,14 @@ static int ena_device_init(struct ena_adapter *adapter,
/* reset device */
rc = ena_com_dev_reset(ena_dev, ENA_REGS_RESET_NORMAL);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot reset device\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot reset device");
goto err_mmio_read_less;
}
/* check FW version */
rc = ena_com_validate_version(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Device version is too low\n");
+ PMD_DRV_LOG_LINE(ERR, "Device version is too low");
goto err_mmio_read_less;
}
@@ -1884,8 +1884,8 @@ static int ena_device_init(struct ena_adapter *adapter,
/* ENA device administration layer init */
rc = ena_com_admin_init(ena_dev, &aenq_handlers);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Cannot initialize ENA admin queue\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot initialize ENA admin queue");
goto err_mmio_read_less;
}
@@ -1900,8 +1900,8 @@ static int ena_device_init(struct ena_adapter *adapter,
/* Get Device Attributes and features */
rc = ena_com_get_dev_attr_feat(ena_dev, get_feat_ctx);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Cannot get attribute for ENA device, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot get attribute for ENA device, rc: %d", rc);
goto err_admin_init;
}
@@ -1952,7 +1952,7 @@ static void ena_control_path_poll_handler(void *cb_arg)
rc = rte_eal_alarm_set(adapter->control_path_poll_interval,
ena_control_path_poll_handler, cb_arg);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to retrigger control path alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to retrigger control path alarm");
ena_trigger_reset(adapter, ENA_REGS_RESET_GENERIC);
}
}
@@ -1968,7 +1968,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
if (unlikely((rte_get_timer_cycles() - adapter->timestamp_wd) >=
adapter->keep_alive_timeout)) {
- PMD_DRV_LOG(ERR, "Keep alive timeout\n");
+ PMD_DRV_LOG_LINE(ERR, "Keep alive timeout");
ena_trigger_reset(adapter, ENA_REGS_RESET_KEEP_ALIVE_TO);
++adapter->dev_stats.wd_expired;
}
@@ -1978,7 +1978,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
static void check_for_admin_com_state(struct ena_adapter *adapter)
{
if (unlikely(!ena_com_get_admin_running_state(&adapter->ena_dev))) {
- PMD_DRV_LOG(ERR, "ENA admin queue is not in running state\n");
+ PMD_DRV_LOG_LINE(ERR, "ENA admin queue is not in running state");
ena_trigger_reset(adapter, ENA_REGS_RESET_ADMIN_TO);
}
}
@@ -2003,9 +2003,9 @@ static int check_for_tx_completion_in_queue(struct ena_adapter *adapter,
completion_delay = rte_get_timer_cycles() - timestamp;
if (completion_delay > adapter->missing_tx_completion_to) {
if (unlikely(!tx_buf->print_once)) {
- PMD_TX_LOG(WARNING,
+ PMD_TX_LOG_LINE(WARNING,
"Found a Tx that wasn't completed on time, qid %d, index %d. "
- "Missing Tx outstanding for %" PRIu64 " msecs.\n",
+ "Missing Tx outstanding for %" PRIu64 " msecs.",
tx_ring->id, i, completion_delay /
rte_get_timer_hz() * 1000);
tx_buf->print_once = true;
@@ -2015,9 +2015,9 @@ static int check_for_tx_completion_in_queue(struct ena_adapter *adapter,
}
if (unlikely(missed_tx > tx_ring->missing_tx_completion_threshold)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"The number of lost Tx completions is above the threshold (%d > %d). "
- "Trigger the device reset.\n",
+ "Trigger the device reset.",
missed_tx,
tx_ring->missing_tx_completion_threshold);
adapter->reset_reason = ENA_REGS_RESET_MISS_TX_CMPL;
@@ -2078,7 +2078,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
check_for_tx_completions(adapter);
if (unlikely(adapter->trigger_reset)) {
- PMD_DRV_LOG(ERR, "Trigger reset is on\n");
+ PMD_DRV_LOG_LINE(ERR, "Trigger reset is on");
rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
NULL);
}
@@ -2116,32 +2116,32 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
u32 llq_feature_mask;
if (adapter->llq_header_policy == ENA_LLQ_POLICY_DISABLED) {
- PMD_DRV_LOG(WARNING,
+ PMD_DRV_LOG_LINE(WARNING,
"NOTE: LLQ has been disabled as per user's request. "
- "This may lead to a huge performance degradation!\n");
+ "This may lead to a huge performance degradation!");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
llq_feature_mask = 1 << ENA_ADMIN_LLQ;
if (!(ena_dev->supported_features & llq_feature_mask)) {
- PMD_DRV_LOG(INFO,
- "LLQ is not supported. Fallback to host mode policy.\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "LLQ is not supported. Fallback to host mode policy.");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
if (adapter->dev_mem_base == NULL) {
- PMD_DRV_LOG(ERR,
- "LLQ is advertised as supported, but device doesn't expose mem bar\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "LLQ is advertised as supported, but device doesn't expose mem bar");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
rc = ena_com_config_dev_mode(ena_dev, llq, llq_default_configurations);
if (unlikely(rc)) {
- PMD_INIT_LOG(WARNING,
- "Failed to config dev mode. Fallback to host mode policy.\n");
+ PMD_INIT_LOG_LINE(WARNING,
+ "Failed to config dev mode. Fallback to host mode policy.");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
@@ -2185,7 +2185,7 @@ static uint32_t ena_calc_max_io_queue_num(struct ena_com_dev *ena_dev,
max_num_io_queues = RTE_MIN(max_num_io_queues, io_tx_cq_num);
if (unlikely(max_num_io_queues == 0)) {
- PMD_DRV_LOG(ERR, "Number of IO queues cannot not be 0\n");
+ PMD_DRV_LOG_LINE(ERR, "Number of IO queues cannot not be 0");
return -EFAULT;
}
@@ -2290,7 +2290,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
- PMD_INIT_LOG(INFO, "Initializing " PCI_PRI_FMT "\n",
+ PMD_INIT_LOG_LINE(INFO, "Initializing " PCI_PRI_FMT,
pci_dev->addr.domain,
pci_dev->addr.bus,
pci_dev->addr.devid,
@@ -2302,7 +2302,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
adapter->dev_mem_base = pci_dev->mem_resource[ENA_MEM_BAR].addr;
if (!adapter->regs) {
- PMD_INIT_LOG(CRIT, "Failed to access registers BAR(%d)\n",
+ PMD_INIT_LOG_LINE(CRIT, "Failed to access registers BAR(%d)",
ENA_REGS_BAR);
return -ENXIO;
}
@@ -2327,21 +2327,21 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
/* Get user bypass */
rc = ena_parse_devargs(adapter, pci_dev->device.devargs);
if (rc != 0) {
- PMD_INIT_LOG(CRIT, "Failed to parse devargs\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to parse devargs");
goto err;
}
adapter->llq_header_policy = ena_define_llq_hdr_policy(adapter);
rc = ena_com_allocate_customer_metrics_buffer(ena_dev);
if (rc != 0) {
- PMD_INIT_LOG(CRIT, "Failed to allocate customer metrics buffer\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to allocate customer metrics buffer");
goto err;
}
/* device specific initialization routine */
rc = ena_device_init(adapter, pci_dev, &get_feat_ctx);
if (rc) {
- PMD_INIT_LOG(CRIT, "Failed to init ENA device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to init ENA device");
goto err_metrics_delete;
}
@@ -2355,7 +2355,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = ena_set_queues_placement_policy(adapter, ena_dev,
&get_feat_ctx.llq, &llq_config);
if (unlikely(rc)) {
- PMD_INIT_LOG(CRIT, "Failed to set placement policy\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to set placement policy");
return rc;
}
@@ -2363,9 +2363,9 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
queue_type_str = "Regular";
} else {
queue_type_str = "Low latency";
- PMD_DRV_LOG(INFO, "LLQ entry size %uB\n", llq_config.llq_ring_entry_size_value);
+ PMD_DRV_LOG_LINE(INFO, "LLQ entry size %uB", llq_config.llq_ring_entry_size_value);
}
- PMD_DRV_LOG(INFO, "Placement policy: %s\n", queue_type_str);
+ PMD_DRV_LOG_LINE(INFO, "Placement policy: %s", queue_type_str);
calc_queue_ctx.ena_dev = ena_dev;
calc_queue_ctx.get_feat_ctx = &get_feat_ctx;
@@ -2409,7 +2409,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = ena_com_rss_init(ena_dev, ENA_RX_RSS_TABLE_LOG_SIZE);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to initialize RSS in ENA device\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize RSS in ENA device");
goto err_delete_debug_area;
}
@@ -2417,8 +2417,8 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
sizeof(*adapter->drv_stats),
RTE_CACHE_LINE_SIZE);
if (!adapter->drv_stats) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for adapter statistics\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for adapter statistics");
rc = -ENOMEM;
goto err_rss_destroy;
}
@@ -2435,7 +2435,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = rte_eal_alarm_set(adapter->control_path_poll_interval,
ena_control_path_poll_handler, eth_dev);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set control path alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set control path alarm");
goto err_control_path_destroy;
}
}
@@ -2780,8 +2780,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
#ifdef RTE_ETHDEV_DEBUG_RX
/* Check adapter state */
if (unlikely(rx_ring->adapter->state != ENA_ADAPTER_STATE_RUNNING)) {
- PMD_RX_LOG(ALERT,
- "Trying to receive pkts while device is NOT running\n");
+ PMD_RX_LOG_LINE(ALERT,
+ "Trying to receive pkts while device is NOT running");
return 0;
}
#endif
@@ -2800,8 +2800,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
rx_ring->ena_com_io_sq,
&ena_rx_ctx);
if (unlikely(rc)) {
- PMD_RX_LOG(ERR,
- "Failed to get the packet from the device, rc: %d\n",
+ PMD_RX_LOG_LINE(ERR,
+ "Failed to get the packet from the device, rc: %d",
rc);
if (rc == ENA_COM_NO_SPACE) {
++rx_ring->rx_stats.bad_desc_num;
@@ -2883,8 +2883,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
/* SCTP checksum offload is not supported by the ENA. */
if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) ||
l4_csum_flag == RTE_MBUF_F_TX_SCTP_CKSUM) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "] has unsupported offloads flags set: 0x%" PRIu64 "\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "] has unsupported offloads flags set: 0x%" PRIu64,
i, ol_flags);
rte_errno = ENOTSUP;
return i;
@@ -2894,8 +2894,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
!(tx_ring->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV &&
m->nb_segs == tx_ring->sgl_size &&
m->data_len < tx_ring->tx_max_header_size))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "] has too many segments: %" PRIu16 "\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "] has too many segments: %" PRIu16,
i, m->nb_segs);
rte_errno = EINVAL;
return i;
@@ -2909,8 +2909,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
!(tx_ring->offloads & RTE_ETH_TX_OFFLOAD_TCP_CKSUM)) ||
(l4_csum_flag == RTE_MBUF_F_TX_UDP_CKSUM &&
!(tx_ring->offloads & RTE_ETH_TX_OFFLOAD_UDP_CKSUM))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "]: requested offloads: %" PRIu16 " are not enabled for the queue[%u]\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "]: requested offloads: %" PRIu16 " are not enabled for the queue[%u]",
i, m->nb_segs, tx_ring->id);
rte_errno = EINVAL;
return i;
@@ -2921,8 +2921,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
*/
if (unlikely(ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK) &&
(m->l2_len == 0 || m->l3_len == 0))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "]: l2_len or l3_len values are 0 while the offload was requested\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "]: l2_len or l3_len values are 0 while the offload was requested",
i);
rte_errno = EINVAL;
return i;
@@ -3122,7 +3122,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
*/
if (!ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq,
mbuf->nb_segs + 2)) {
- PMD_TX_LOG(DEBUG, "Not enough space in the tx queue\n");
+ PMD_TX_LOG_LINE(DEBUG, "Not enough space in the tx queue");
return ENA_COM_NO_MEM;
}
@@ -3147,8 +3147,8 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
if (unlikely(ena_com_is_doorbell_needed(tx_ring->ena_com_io_sq,
&ena_tx_ctx))) {
- PMD_TX_LOG(DEBUG,
- "LLQ Tx max burst size of queue %d achieved, writing doorbell to send burst\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "LLQ Tx max burst size of queue %d achieved, writing doorbell to send burst",
tx_ring->id);
ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
tx_ring->tx_stats.doorbells++;
@@ -3159,7 +3159,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
rc = ena_com_prepare_tx(tx_ring->ena_com_io_sq, &ena_tx_ctx,
&nb_hw_desc);
if (unlikely(rc)) {
- PMD_DRV_LOG(ERR, "Failed to prepare Tx buffers, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Failed to prepare Tx buffers, rc: %d", rc);
++tx_ring->tx_stats.prepare_ctx_err;
ena_trigger_reset(tx_ring->adapter,
ENA_REGS_RESET_DRIVER_INVALID_STATE);
@@ -3262,8 +3262,8 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
#ifdef RTE_ETHDEV_DEBUG_TX
/* Check adapter state */
if (unlikely(tx_ring->adapter->state != ENA_ADAPTER_STATE_RUNNING)) {
- PMD_TX_LOG(ALERT,
- "Trying to xmit pkts while device is NOT running\n");
+ PMD_TX_LOG_LINE(ALERT,
+ "Trying to xmit pkts while device is NOT running");
return 0;
}
#endif
@@ -3303,7 +3303,7 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
if (ena_com_get_cap(ena_dev, ENA_ADMIN_CUSTOMER_METRICS)) {
if (num_metrics != ENA_STATS_ARRAY_METRICS) {
- PMD_DRV_LOG(ERR, "Detected discrepancy in the number of customer metrics");
+ PMD_DRV_LOG_LINE(ERR, "Detected discrepancy in the number of customer metrics");
return;
}
rte_spinlock_lock(&adapter->admin_lock);
@@ -3314,13 +3314,13 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
num_metrics * sizeof(uint64_t));
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != 0) {
- PMD_DRV_LOG(WARNING, "Failed to get customer metrics, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING, "Failed to get customer metrics, rc: %d", rc);
return;
}
} else if (ena_com_get_cap(ena_dev, ENA_ADMIN_ENI_STATS)) {
if (num_metrics != ENA_STATS_ARRAY_METRICS_LEGACY) {
- PMD_DRV_LOG(ERR, "Detected discrepancy in the number of legacy metrics");
+ PMD_DRV_LOG_LINE(ERR, "Detected discrepancy in the number of legacy metrics");
return;
}
@@ -3331,8 +3331,8 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
(struct ena_admin_eni_stats *)buf);
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != 0) {
- PMD_DRV_LOG(WARNING,
- "Failed to get ENI metrics, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Failed to get ENI metrics, rc: %d", rc);
return;
}
}
@@ -3353,8 +3353,8 @@ static void ena_copy_ena_srd_info(struct ena_adapter *adapter,
(struct ena_admin_ena_srd_info *)srd_info);
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != ENA_COM_OK && rc != ENA_COM_UNSUPPORTED) {
- PMD_DRV_LOG(WARNING,
- "Failed to get ENA express srd info, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Failed to get ENA express srd info, rc: %d", rc);
return;
}
}
@@ -3445,8 +3445,8 @@ static int ena_xstats_get_names_by_id(struct rte_eth_dev *dev,
for (i = 0; i < size; ++i) {
id = ids[i];
if (id > xstats_count) {
- PMD_DRV_LOG(ERR,
- "ID value out of range: id=%" PRIu64 ", xstats_num=%" PRIu64 "\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "ID value out of range: id=%" PRIu64 ", xstats_num=%" PRIu64,
id, xstats_count);
return -EINVAL;
}
@@ -3687,45 +3687,45 @@ static int ena_process_uint_devarg(const char *key,
uint64_value = strtoull(value, &str_end, DECIMAL_BASE);
if (value == str_end) {
- PMD_INIT_LOG(ERR,
- "Invalid value for key '%s'. Only uint values are accepted.\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Invalid value for key '%s'. Only uint values are accepted.",
key);
return -EINVAL;
}
if (strcmp(key, ENA_DEVARG_MISS_TXC_TO) == 0) {
if (uint64_value > ENA_MAX_TX_TIMEOUT_SECONDS) {
- PMD_INIT_LOG(ERR,
- "Tx timeout too high: %" PRIu64 " sec. Maximum allowed: %d sec.\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Tx timeout too high: %" PRIu64 " sec. Maximum allowed: %d sec.",
uint64_value, ENA_MAX_TX_TIMEOUT_SECONDS);
return -EINVAL;
} else if (uint64_value == 0) {
- PMD_INIT_LOG(INFO,
- "Check for missing Tx completions has been disabled.\n");
+ PMD_INIT_LOG_LINE(INFO,
+ "Check for missing Tx completions has been disabled.");
adapter->missing_tx_completion_to =
ENA_HW_HINTS_NO_TIMEOUT;
} else {
- PMD_INIT_LOG(INFO,
- "Tx packet completion timeout set to %" PRIu64 " seconds.\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "Tx packet completion timeout set to %" PRIu64 " seconds.",
uint64_value);
adapter->missing_tx_completion_to =
uint64_value * rte_get_timer_hz();
}
} else if (strcmp(key, ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL) == 0) {
if (uint64_value > ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC) {
- PMD_INIT_LOG(ERR,
+ PMD_INIT_LOG_LINE(ERR,
"Control path polling interval is too long: %" PRIu64 " msecs. "
- "Maximum allowed: %d msecs.\n",
+ "Maximum allowed: %d msecs.",
uint64_value, ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC);
return -EINVAL;
} else if (uint64_value == 0) {
- PMD_INIT_LOG(INFO,
+ PMD_INIT_LOG_LINE(INFO,
"Control path polling interval is set to zero. Operating in "
- "interrupt mode.\n");
+ "interrupt mode.");
adapter->control_path_poll_interval = 0;
} else {
- PMD_INIT_LOG(INFO,
- "Control path polling interval is set to %" PRIu64 " msecs.\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "Control path polling interval is set to %" PRIu64 " msecs.",
uint64_value);
adapter->control_path_poll_interval = uint64_value * USEC_PER_MSEC;
}
@@ -3747,8 +3747,8 @@ static int ena_process_bool_devarg(const char *key,
} else if (strcmp(value, "0") == 0) {
bool_value = false;
} else {
- PMD_INIT_LOG(ERR,
- "Invalid value: '%s' for key '%s'. Accepted: '0' or '1'\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Invalid value: '%s' for key '%s'. Accepted: '0' or '1'",
value, key);
return -EINVAL;
}
@@ -3783,7 +3783,7 @@ static int ena_parse_devargs(struct ena_adapter *adapter,
kvlist = rte_kvargs_parse(devargs->args, allowed_args);
if (kvlist == NULL) {
- PMD_INIT_LOG(ERR, "Invalid device arguments: %s\n",
+ PMD_INIT_LOG_LINE(ERR, "Invalid device arguments: %s",
devargs->args);
return -EINVAL;
}
@@ -3827,8 +3827,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
return 0;
if (!rte_intr_cap_multiple(intr_handle)) {
- PMD_DRV_LOG(ERR,
- "Rx interrupt requested, but it isn't supported by the PCI driver\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Rx interrupt requested, but it isn't supported by the PCI driver");
return -ENOTSUP;
}
@@ -3838,8 +3838,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
/* Verify if there are enough vectors available. */
vectors_nb = dev->data->nb_rx_queues;
if (vectors_nb > RTE_MAX_RXTX_INTR_VEC_ID) {
- PMD_DRV_LOG(ERR,
- "Too many Rx interrupts requested, maximum number: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Too many Rx interrupts requested, maximum number: %d",
RTE_MAX_RXTX_INTR_VEC_ID);
rc = -ENOTSUP;
goto enable_intr;
@@ -3848,8 +3848,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
/* Allocate the vector list */
if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
dev->data->nb_rx_queues)) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate interrupt vector for %d queues\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate interrupt vector for %d queues",
dev->data->nb_rx_queues);
rc = -ENOMEM;
goto enable_intr;
@@ -3860,8 +3860,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
goto free_intr_vec;
if (!rte_intr_allow_others(intr_handle)) {
- PMD_DRV_LOG(ERR,
- "Not enough interrupts available to use both ENA Admin and Rx interrupts\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Not enough interrupts available to use both ENA Admin and Rx interrupts");
goto disable_intr_efd;
}
@@ -3920,8 +3920,8 @@ static int ena_configure_aenq(struct ena_adapter *adapter)
*/
if (adapter->edev_data->dev_conf.intr_conf.lsc != 0) {
if (!(aenq_groups & BIT(ENA_ADMIN_LINK_CHANGE))) {
- PMD_DRV_LOG(ERR,
- "LSC requested, but it's not supported by the AENQ\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "LSC requested, but it's not supported by the AENQ");
return -EINVAL;
}
} else {
@@ -3933,7 +3933,7 @@ static int ena_configure_aenq(struct ena_adapter *adapter)
rc = ena_com_set_aenq_config(&adapter->ena_dev, aenq_groups);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Cannot configure AENQ groups, rc=%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Cannot configure AENQ groups, rc=%d", rc);
return rc;
}
@@ -3971,8 +3971,8 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
rc = snprintf(z_name, RTE_MEMZONE_NAMESIZE, "ena_p%d_mz%" PRIu64 "",
data->port_id, adapter->memzone_cnt);
if (rc >= RTE_MEMZONE_NAMESIZE) {
- PMD_DRV_LOG(ERR,
- "Name for the ena_com memzone is too long. Port: %d, mz_num: %" PRIu64 "\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Name for the ena_com memzone is too long. Port: %d, mz_num: %" PRIu64,
data->port_id, adapter->memzone_cnt);
goto error;
}
@@ -3981,7 +3981,7 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
memzone = rte_memzone_reserve_aligned(z_name, size, socket_id,
RTE_MEMZONE_IOVA_CONTIG, alignment);
if (memzone == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate ena_com memzone: %s\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate ena_com memzone: %s",
z_name);
goto error;
}
@@ -4070,7 +4070,7 @@ static void ena_notification(void *adapter_data,
struct ena_admin_ena_hw_hints *hints;
if (aenq_e->aenq_common_desc.group != ENA_ADMIN_NOTIFICATION)
- PMD_DRV_LOG(WARNING, "Invalid AENQ group: %x. Expected: %x\n",
+ PMD_DRV_LOG_LINE(WARNING, "Invalid AENQ group: %x. Expected: %x",
aenq_e->aenq_common_desc.group,
ENA_ADMIN_NOTIFICATION);
@@ -4081,7 +4081,7 @@ static void ena_notification(void *adapter_data,
ena_update_hints(adapter, hints);
break;
default:
- PMD_DRV_LOG(ERR, "Invalid AENQ notification link state: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid AENQ notification link state: %d",
aenq_e->aenq_common_desc.syndrome);
}
}
@@ -4121,8 +4121,8 @@ static void ena_suboptimal_configuration(__rte_unused void *adapter_data,
num_bits = BITS_PER_TYPE(desc->notifications_bitmap);
for (bit = 0; bit < num_bits; bit++) {
if (desc->notifications_bitmap & RTE_BIT64(bit)) {
- PMD_DRV_LOG(WARNING,
- "Sub-optimal configuration notification code: %d\n", bit + 1);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Sub-optimal configuration notification code: %d", bit + 1);
}
}
}
@@ -4133,8 +4133,8 @@ static void ena_suboptimal_configuration(__rte_unused void *adapter_data,
static void unimplemented_aenq_handler(__rte_unused void *data,
__rte_unused struct ena_admin_aenq_entry *aenq_e)
{
- PMD_DRV_LOG(ERR,
- "Unknown event was received or event with unimplemented handler\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unknown event was received or event with unimplemented handler");
}
static struct ena_aenq_handlers aenq_handlers = {
@@ -4168,7 +4168,7 @@ ena_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
if (!rte_eth_dev_is_valid_port(req->port_id)) {
rte_errno = ENODEV;
res = -rte_errno;
- PMD_DRV_LOG(ERR, "Unknown port %d in request %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unknown port %d in request %d",
req->port_id, req->type);
goto end;
}
@@ -4205,7 +4205,7 @@ ena_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
(struct ena_admin_ena_srd_info *)&adapter->srd_stats);
break;
default:
- PMD_DRV_LOG(ERR, "Unknown request type %d\n", req->type);
+ PMD_DRV_LOG_LINE(ERR, "Unknown request type %d", req->type);
res = -EINVAL;
break;
}
@@ -4233,7 +4233,7 @@ static bool ena_use_large_llq_hdr(struct ena_adapter *adapter, uint8_t recommend
if (adapter->llq_header_policy == ENA_LLQ_POLICY_LARGE) {
return true;
} else if (adapter->llq_header_policy == ENA_LLQ_POLICY_RECOMMENDED) {
- PMD_DRV_LOG(INFO, "Recommended device entry size policy %u\n",
+ PMD_DRV_LOG_LINE(INFO, "Recommended device entry size policy %u",
recommended_entry_size);
if (recommended_entry_size == ENA_ADMIN_LIST_ENTRY_SIZE_256B)
return true;
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index 43f16458ea..5c9ec1772b 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -7,31 +7,31 @@
#define _ENA_LOGS_H_
extern int ena_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_init, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_INIT ena_logtype_init
+#define PMD_INIT_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_INIT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ena_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_rx, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_RX ena_logtype_rx
+#define PMD_RX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_RX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ena_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_tx, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_TX ena_logtype_tx
+#define PMD_TX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_TX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
extern int ena_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_driver, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_DRIVER ena_logtype_driver
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_rss.c b/drivers/net/ena/ena_rss.c
index d0ba9d5c0a..85c6152f0c 100644
--- a/drivers/net/ena/ena_rss.c
+++ b/drivers/net/ena/ena_rss.c
@@ -76,14 +76,14 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
return -EINVAL;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR,
- "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "RSS was not configured for the PMD");
return -ENOTSUP;
}
if (reta_size > ENA_RX_RSS_TABLE_SIZE) {
- PMD_DRV_LOG(WARNING,
- "Requested indirection table size (%d) is bigger than supported: %d\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "Requested indirection table size (%d) is bigger than supported: %d",
reta_size, ENA_RX_RSS_TABLE_SIZE);
return -EINVAL;
}
@@ -103,8 +103,8 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
rc = ena_com_indirect_table_fill_entry(ena_dev, i,
entry_value);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Cannot fill indirection table\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot fill indirection table");
rte_spinlock_unlock(&adapter->admin_lock);
return rc;
}
@@ -114,11 +114,11 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
rc = ena_mp_indirect_table_set(adapter);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Cannot set the indirection table\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set the indirection table");
return rc;
}
- PMD_DRV_LOG(DEBUG, "RSS configured %d entries for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS configured %d entries for port %d",
reta_size, dev->data->port_id);
return 0;
@@ -140,8 +140,8 @@ int ena_rss_reta_query(struct rte_eth_dev *dev,
return -EINVAL;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR,
- "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "RSS was not configured for the PMD");
return -ENOTSUP;
}
@@ -149,7 +149,7 @@ int ena_rss_reta_query(struct rte_eth_dev *dev,
rc = ena_mp_indirect_table_get(adapter, indirect_table);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Cannot get indirection table\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot get indirection table");
return rc;
}
@@ -177,8 +177,8 @@ static int ena_fill_indirect_table_default(struct ena_com_dev *ena_dev,
rc = ena_com_indirect_table_fill_entry(ena_dev, i,
ENA_IO_RXQ_IDX(val));
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(DEBUG,
- "Failed to set %zu indirection table entry with val %" PRIu16 "\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Failed to set %zu indirection table entry with val %" PRIu16 "",
i, val);
return rc;
}
@@ -380,8 +380,8 @@ static int ena_set_hash_fields(struct ena_com_dev *ena_dev, uint64_t rss_hf)
(enum ena_admin_flow_hash_proto)i,
selected_fields[i].fields);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(DEBUG,
- "Failed to set ENA HF %d with fields %" PRIu16 "\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Failed to set ENA HF %d with fields %" PRIu16 "",
i, selected_fields[i].fields);
return rc;
}
@@ -411,23 +411,23 @@ static int ena_rss_hash_set(struct ena_com_dev *ena_dev,
rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ,
rss_key, ENA_HASH_KEY_SIZE, 0);
if (rc != 0 && !(default_allowed && rc == ENA_COM_UNSUPPORTED)) {
- PMD_DRV_LOG(ERR,
- "Failed to set RSS hash function in the device\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to set RSS hash function in the device");
return rc;
}
rc = ena_set_hash_fields(ena_dev, rss_conf->rss_hf);
if (rc == ENA_COM_UNSUPPORTED) {
if (rss_conf->rss_key == NULL && !default_allowed) {
- PMD_DRV_LOG(ERR,
- "Setting RSS hash fields is not supported\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Setting RSS hash fields is not supported");
return -ENOTSUP;
}
- PMD_DRV_LOG(WARNING,
- "Setting RSS hash fields is not supported. Using default values: 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "Setting RSS hash fields is not supported. Using default values: 0x%"PRIx64,
(uint64_t)(ENA_ALL_RSS_HF));
} else if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash fields\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash fields");
return rc;
}
@@ -456,8 +456,8 @@ static int ena_get_rss_hash_key(struct ena_com_dev *ena_dev, uint8_t *rss_key)
* explicitly set, this operation shouldn't be supported.
*/
if (ena_dev->rss.hash_key == NULL) {
- PMD_DRV_LOG(WARNING,
- "Retrieving default RSS hash key is not supported\n");
+ PMD_DRV_LOG_LINE(WARNING,
+ "Retrieving default RSS hash key is not supported");
return -ENOTSUP;
}
@@ -489,25 +489,25 @@ int ena_rss_configure(struct ena_adapter *adapter)
rc = ena_fill_indirect_table_default(ena_dev, ENA_RX_RSS_TABLE_SIZE,
adapter->edev_data->nb_rx_queues);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Failed to fill indirection table with default values\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to fill indirection table with default values");
return rc;
}
rc = ena_com_indirect_table_set(ena_dev);
if (unlikely(rc != 0 && rc != ENA_COM_UNSUPPORTED)) {
- PMD_DRV_LOG(ERR,
- "Failed to set indirection table in the device\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to set indirection table in the device");
return rc;
}
rc = ena_rss_hash_set(ena_dev, rss_conf, true);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash");
return rc;
}
- PMD_DRV_LOG(DEBUG, "RSS configured for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS configured for port %d",
adapter->edev_data->port_id);
return 0;
@@ -523,7 +523,7 @@ int ena_rss_hash_update(struct rte_eth_dev *dev,
rc = ena_rss_hash_set(&adapter->ena_dev, rss_conf, false);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash");
return rc;
}
@@ -542,15 +542,15 @@ int ena_rss_hash_conf_get(struct rte_eth_dev *dev,
static bool warn_once;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR, "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS was not configured for the PMD");
return -ENOTSUP;
}
if (rss_conf->rss_key != NULL) {
rc = ena_get_rss_hash_key(ena_dev, rss_conf->rss_key);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Cannot retrieve RSS hash key, err: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot retrieve RSS hash key, err: %d",
rc);
return rc;
}
@@ -569,15 +569,15 @@ int ena_rss_hash_conf_get(struct rte_eth_dev *dev,
* interested only in the key value.
*/
if (!warn_once) {
- PMD_DRV_LOG(WARNING,
- "Reading hash control from the device is not supported. .rss_hf will contain a default value.\n");
+ PMD_DRV_LOG_LINE(WARNING,
+ "Reading hash control from the device is not supported. .rss_hf will contain a default value.");
warn_once = true;
}
rss_hf = ENA_ALL_RSS_HF;
break;
} else if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Failed to retrieve hash ctrl for proto: %d with err: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to retrieve hash ctrl for proto: %d with err: %d",
i, rc);
return rc;
}
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 21bbb008e0..6ccb228872 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -22,9 +22,11 @@
#include "rte_eth_vhost.h"
RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
+#define RTE_LOGTYPE_VHOST vhost_logtype
-#define VHOST_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
+#define VHOST_LOG_LINE(level, ...) \
+ RTE_LOG(level, VHOST, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
+ RTE_FMT_TAIL(__VA_ARGS__ ,)))
enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
@@ -298,7 +300,7 @@ vhost_dev_csum_configure(struct rte_eth_dev *eth_dev)
if (internal->features & (1ULL << VIRTIO_NET_F_CSUM)) {
if (!(rxmode->offloads &
(RTE_ETH_RX_OFFLOAD_UDP_CKSUM | RTE_ETH_RX_OFFLOAD_TCP_CKSUM))) {
- VHOST_LOG(NOTICE, "Rx csum will be done in SW, may impact performance.\n");
+ VHOST_LOG_LINE(NOTICE, "Rx csum will be done in SW, may impact performance.");
internal->rx_sw_csum = true;
}
}
@@ -306,7 +308,7 @@ vhost_dev_csum_configure(struct rte_eth_dev *eth_dev)
if (!(internal->features & (1ULL << VIRTIO_NET_F_GUEST_CSUM))) {
if (txmode->offloads &
(RTE_ETH_TX_OFFLOAD_UDP_CKSUM | RTE_ETH_TX_OFFLOAD_TCP_CKSUM)) {
- VHOST_LOG(NOTICE, "Tx csum will be done in SW, may impact performance.\n");
+ VHOST_LOG_LINE(NOTICE, "Tx csum will be done in SW, may impact performance.");
internal->tx_sw_csum = true;
}
}
@@ -557,7 +559,7 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
return;
if (rte_vhost_get_vhost_vring(vq->vid, (rxq_idx << 1) + 1, &vring) < 0) {
- VHOST_LOG(DEBUG, "Failed to get rxq-%d's vring, skip!\n", rxq_idx);
+ VHOST_LOG_LINE(DEBUG, "Failed to get rxq-%d's vring, skip!", rxq_idx);
return;
}
@@ -566,10 +568,10 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
/* Remove previous kickfd from proxy epoll */
if (vq->kickfd >= 0 && vq->kickfd != vring.kickfd) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_DEL, vq->kickfd, &vq->ev) < 0) {
- VHOST_LOG(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s",
vq->kickfd, rxq_idx, strerror(errno));
} else {
- VHOST_LOG(DEBUG, "Unregistered %d from rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Unregistered %d from rxq-%d epoll",
vq->kickfd, rxq_idx);
}
vq->kickfd = -1;
@@ -578,11 +580,11 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
/* Add new one, if valid */
if (vq->kickfd != vring.kickfd && vring.kickfd >= 0) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_ADD, vring.kickfd, &vq->ev) < 0) {
- VHOST_LOG(ERR, "Failed to register %d in rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(ERR, "Failed to register %d in rxq-%d epoll: %s",
vring.kickfd, rxq_idx, strerror(errno));
} else {
vq->kickfd = vring.kickfd;
- VHOST_LOG(DEBUG, "Registered %d in rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Registered %d in rxq-%d epoll",
vq->kickfd, rxq_idx);
}
}
@@ -643,7 +645,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
dev->intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
if (dev->intr_handle == NULL) {
- VHOST_LOG(ERR, "Fail to allocate intr_handle\n");
+ VHOST_LOG_LINE(ERR, "Fail to allocate intr_handle");
ret = -ENOMEM;
goto error;
}
@@ -653,17 +655,17 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
}
if (rte_intr_vec_list_alloc(dev->intr_handle, NULL, nb_rxq)) {
- VHOST_LOG(ERR, "Failed to allocate memory for interrupt vector\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for interrupt vector");
ret = -ENOMEM;
goto error;
}
- VHOST_LOG(DEBUG, "Prepare intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Prepare intr vec");
for (i = 0; i < nb_rxq; i++) {
int epoll_fd = epoll_create1(0);
if (epoll_fd < 0) {
- VHOST_LOG(ERR, "Failed to create proxy epoll fd for rxq-%d\n", i);
+ VHOST_LOG_LINE(ERR, "Failed to create proxy epoll fd for rxq-%d", i);
ret = -errno;
goto error;
}
@@ -707,7 +709,7 @@ eth_vhost_configure_intr(struct rte_eth_dev *dev)
{
int i;
- VHOST_LOG(DEBUG, "Configure intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Configure intr vec");
for (i = 0; i < dev->data->nb_rx_queues; i++)
eth_vhost_update_intr(dev, i);
}
@@ -718,7 +720,7 @@ eth_vhost_unconfigure_intr(struct rte_eth_dev *eth_dev)
struct vhost_queue *vq;
int i;
- VHOST_LOG(DEBUG, "Unconfigure intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Unconfigure intr vec");
for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
vq = eth_dev->data->rx_queues[i];
if (vq == NULL || vq->vid < 0)
@@ -729,10 +731,10 @@ eth_vhost_unconfigure_intr(struct rte_eth_dev *eth_dev)
/* Remove previous kickfd from proxy epoll */
if (vq->kickfd >= 0) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_DEL, vq->kickfd, &vq->ev) < 0) {
- VHOST_LOG(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s",
vq->kickfd, i, strerror(errno));
} else {
- VHOST_LOG(DEBUG, "Unregistered %d from rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Unregistered %d from rxq-%d epoll",
vq->kickfd, i);
}
vq->kickfd = -1;
@@ -826,7 +828,7 @@ new_device(int vid)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(INFO, "Invalid device name: %s\n", ifname);
+ VHOST_LOG_LINE(INFO, "Invalid device name: %s", ifname);
return -1;
}
@@ -841,7 +843,7 @@ new_device(int vid)
#endif
if (rte_vhost_get_negotiated_features(vid, &internal->features)) {
- VHOST_LOG(ERR, "Failed to get device features\n");
+ VHOST_LOG_LINE(ERR, "Failed to get device features");
return -1;
}
@@ -864,7 +866,7 @@ new_device(int vid)
rte_atomic32_set(&internal->dev_attached, 1);
update_queuing_status(eth_dev, false);
- VHOST_LOG(INFO, "Vhost device %d created\n", vid);
+ VHOST_LOG_LINE(INFO, "Vhost device %d created", vid);
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
@@ -885,7 +887,7 @@ destroy_device(int vid)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(ERR, "Invalid interface name: %s\n", ifname);
+ VHOST_LOG_LINE(ERR, "Invalid interface name: %s", ifname);
return;
}
eth_dev = list->eth_dev;
@@ -921,7 +923,7 @@ destroy_device(int vid)
state->max_vring = 0;
rte_spinlock_unlock(&state->lock);
- VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
+ VHOST_LOG_LINE(INFO, "Vhost device %d destroyed", vid);
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
}
@@ -937,7 +939,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(ERR, "Invalid interface name: %s\n", ifname);
+ VHOST_LOG_LINE(ERR, "Invalid interface name: %s", ifname);
return -1;
}
@@ -959,7 +961,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
update_queuing_status(eth_dev, false);
- VHOST_LOG(INFO, "vring%u is %s\n",
+ VHOST_LOG_LINE(INFO, "vring%u is %s",
vring, enable ? "enabled" : "disabled");
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
@@ -1018,12 +1020,12 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
if (rte_vhost_driver_callback_register(internal->iface_name,
&vhost_ops) < 0) {
- VHOST_LOG(ERR, "Can't register callbacks\n");
+ VHOST_LOG_LINE(ERR, "Can't register callbacks");
goto drv_unreg;
}
if (rte_vhost_driver_start(internal->iface_name) < 0) {
- VHOST_LOG(ERR, "Failed to start driver for %s\n",
+ VHOST_LOG_LINE(ERR, "Failed to start driver for %s",
internal->iface_name);
goto drv_unreg;
}
@@ -1053,13 +1055,13 @@ rte_eth_vhost_get_queue_event(uint16_t port_id,
int idx;
if (port_id >= RTE_MAX_ETHPORTS) {
- VHOST_LOG(ERR, "Invalid port id\n");
+ VHOST_LOG_LINE(ERR, "Invalid port id");
return -1;
}
state = vring_states[port_id];
if (!state) {
- VHOST_LOG(ERR, "Unused port\n");
+ VHOST_LOG_LINE(ERR, "Unused port");
return -1;
}
@@ -1139,7 +1141,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
eth_vhost_uninstall_intr(eth_dev);
if (dev_conf->intr_conf.rxq && eth_vhost_install_intr(eth_dev) < 0) {
- VHOST_LOG(ERR, "Failed to install interrupt handler.\n");
+ VHOST_LOG_LINE(ERR, "Failed to install interrupt handler.");
return -1;
}
@@ -1235,7 +1237,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
vq = rte_zmalloc_socket(NULL, sizeof(struct vhost_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (vq == NULL) {
- VHOST_LOG(ERR, "Failed to allocate memory for rx queue\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for rx queue");
return -ENOMEM;
}
@@ -1259,7 +1261,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
vq = rte_zmalloc_socket(NULL, sizeof(struct vhost_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (vq == NULL) {
- VHOST_LOG(ERR, "Failed to allocate memory for tx queue\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for tx queue");
return -ENOMEM;
}
@@ -1279,7 +1281,7 @@ eth_dev_info(struct rte_eth_dev *dev,
internal = dev->data->dev_private;
if (internal == NULL) {
- VHOST_LOG(ERR, "Invalid device specified\n");
+ VHOST_LOG_LINE(ERR, "Invalid device specified");
return -ENODEV;
}
@@ -1508,7 +1510,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
struct rte_eth_dev *eth_dev = NULL;
struct rte_ether_addr *eth_addr = NULL;
- VHOST_LOG(INFO, "Creating VHOST-USER backend on numa socket %u\n",
+ VHOST_LOG_LINE(INFO, "Creating VHOST-USER backend on numa socket %u",
numa_node);
/* reserve an ethdev entry */
@@ -1613,12 +1615,12 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev;
const char *name = rte_vdev_device_name(dev);
- VHOST_LOG(INFO, "Initializing pmd_vhost for %s\n", name);
+ VHOST_LOG_LINE(INFO, "Initializing pmd_vhost for %s", name);
if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
eth_dev = rte_eth_dev_attach_secondary(name);
if (!eth_dev) {
- VHOST_LOG(ERR, "Failed to probe %s\n", name);
+ VHOST_LOG_LINE(ERR, "Failed to probe %s", name);
return -1;
}
eth_dev->rx_pkt_burst = eth_vhost_rx;
@@ -1736,7 +1738,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
ret = eth_dev_vhost_create(dev, iface_name, queues,
dev->device.numa_node, flags, disable_flags);
if (ret == -1)
- VHOST_LOG(ERR, "Failed to create %s\n", name);
+ VHOST_LOG_LINE(ERR, "Failed to create %s", name);
out_free:
rte_kvargs_free(kvlist);
@@ -1750,7 +1752,7 @@ rte_pmd_vhost_remove(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev = NULL;
name = rte_vdev_device_name(dev);
- VHOST_LOG(INFO, "Un-Initializing pmd_vhost for %s\n", name);
+ VHOST_LOG_LINE(INFO, "Un-Initializing pmd_vhost for %s", name);
/* find an ethdev entry */
eth_dev = rte_eth_dev_allocated(name);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 09/11] drivers: remove redundant newline from logs
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (7 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 08/11] drivers: replace logging helpers David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-09 1:09 ` fengchengwen
2024-09-07 14:54 ` [PATCH 10/11] drivers: split multilines log messages David Marchand
` (2 subsequent siblings)
11 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev
Cc: stable, Nicolas Chautru, Gagandeep Singh, Hemant Agrawal,
Nipun Gupta, Nikhil Agarwal, Sachin Saxena, Rosen Xu, Long Li,
Wei Hu, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
Satha Rao, Harman Kalra, Anoob Joseph, Jingjing Wu, Kai Ji,
Lee Daly, Pablo de Lara, Fan Zhang, Ashish Gupta, Sunila Sahu,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Sunil Uttarwar,
Ankur Dwivedi, Tejasree Kondoj, Zhangfei Gao, Jay Zhou,
Chengwen Feng, Bruce Richardson, Kevin Laatz, Conor Walsh,
Pavan Nikhilesh, Shijith Thotton, Jerin Jacob, Liang Ma,
Peter Mccarthy, Harry van Haaren, Srikanth Yalavarthi,
Igor Russkikh, Selwin Sebastian, Julien Aube, Apeksha Gupta,
John Daley, Hyong Youb Kim, Gaetan Rivet, Jeroen de Borst,
Rushil Gupta, Joshua Washington, Ziyang Xuan, Xiaoyun Wang,
Jie Hai, Yisen Zhuang, Jakub Grajciar, Matan Azrad,
Viacheslav Ovsiienko, Jiawen Wu, Vamsi Attunuru,
Devendra Singh Rawat, Alok Prasad, Maciej Czekaj, Jian Wang,
Maxime Coquelin, Chenbo Xia, Jochen Behrens, Liron Himi,
Chaoyong He
Fix places where two newline characters may be logged.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/baseband/acc/rte_acc100_pmd.c | 20 +--
drivers/baseband/acc/rte_vrb_pmd.c | 26 ++--
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 16 +--
drivers/baseband/la12xx/bbdev_la12xx.c | 4 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 4 +-
drivers/bus/cdx/cdx_vfio.c | 8 +-
drivers/bus/dpaa/include/fman.h | 3 +-
drivers/bus/fslmc/fslmc_bus.c | 8 +-
drivers/bus/fslmc/fslmc_vfio.c | 10 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/ifpga/ifpga_bus.c | 8 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/roc_dev.c | 2 +-
drivers/common/cnxk/roc_model.c | 2 +-
drivers/common/cnxk/roc_nix_ops.c | 20 +--
drivers/common/cnxk/roc_nix_tm.c | 2 +-
drivers/common/cnxk/roc_nix_tm_mark.c | 2 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_nix_tm_utils.c | 2 +-
drivers/common/cnxk/roc_sso.c | 2 +-
drivers/common/cnxk/roc_tim.c | 2 +-
drivers/common/cpt/cpt_ucode.h | 4 +-
drivers/common/idpf/idpf_common_logs.h | 5 +-
drivers/common/octeontx/octeontx_mbox.c | 4 +-
drivers/common/qat/qat_pf2vf.c | 4 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 78 ++++++------
drivers/compress/octeontx/otx_zip.h | 12 +-
drivers/compress/octeontx/otx_zip_pmd.c | 14 +--
drivers/compress/zlib/zlib_pmd.c | 26 ++--
drivers/compress/zlib/zlib_pmd_ops.c | 4 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_session.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 32 ++---
drivers/crypto/caam_jr/caam_jr_uio.c | 6 +-
drivers/crypto/ccp/ccp_dev.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cnxk_se.h | 6 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 44 +++----
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 16 +--
drivers/crypto/dpaa_sec/dpaa_sec.c | 27 ++--
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 6 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 4 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 28 ++---
drivers/crypto/ipsec_mb/pmd_snow3g.c | 4 +-
.../crypto/octeontx/otx_cryptodev_hw_access.h | 6 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 42 +++----
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 44 +++----
drivers/crypto/qat/qat_asym.c | 2 +-
drivers/crypto/qat/qat_sym_session.c | 12 +-
drivers/crypto/uadk/uadk_crypto_pmd.c | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/dma/dpaa/dpaa_qdma.c | 40 +++---
drivers/dma/dpaa2/dpaa2_qdma.c | 10 +-
drivers/dma/hisilicon/hisi_dmadev.c | 6 +-
drivers/dma/idxd/idxd_common.c | 2 +-
drivers/dma/idxd/idxd_pci.c | 6 +-
drivers/dma/ioat/ioat_dmadev.c | 14 +--
drivers/event/cnxk/cnxk_tim_evdev.c | 2 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 14 +--
drivers/event/octeontx/timvf_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 30 ++---
drivers/event/opdl/opdl_test.c | 116 +++++++++---------
drivers/event/sw/sw_evdev.c | 22 ++--
drivers/event/sw/sw_evdev_xstats.c | 4 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 8 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 22 ++--
.../mempool/octeontx/rte_mempool_octeontx.c | 6 +-
drivers/ml/cnxk/cn10k_ml_dev.c | 32 ++---
drivers/ml/cnxk/cnxk_ml_ops.c | 20 +--
drivers/net/atlantic/atl_rxtx.c | 4 +-
drivers/net/atlantic/hw_atl/hw_atl_utils.c | 12 +-
drivers/net/axgbe/axgbe_ethdev.c | 2 +-
drivers/net/bnx2x/bnx2x.c | 8 +-
drivers/net/cnxk/cn10k_ethdev.c | 2 +-
drivers/net/cnxk/cn9k_ethdev.c | 2 +-
drivers/net/cnxk/cnxk_eswitch_devargs.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.c | 4 +-
drivers/net/cnxk/cnxk_ethdev_mcs.c | 14 +--
drivers/net/cnxk/cnxk_ethdev_ops.c | 2 +-
drivers/net/cnxk/cnxk_rep.c | 8 +-
drivers/net/cnxk/cnxk_rep.h | 2 +-
drivers/net/cpfl/cpfl_ethdev.c | 2 +-
drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
drivers/net/cpfl/cpfl_fxp_rule.c | 8 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 16 +--
drivers/net/dpaa2/dpaa2_flow.c | 36 +++---
drivers/net/dpaa2/dpaa2_mux.c | 4 +-
drivers/net/dpaa2/dpaa2_recycle.c | 6 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 14 +--
drivers/net/dpaa2/dpaa2_sparser.c | 8 +-
drivers/net/dpaa2/dpaa2_tm.c | 24 ++--
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/enetc/enetc_ethdev.c | 4 +-
drivers/net/enetfec/enet_ethdev.c | 4 +-
drivers/net/enetfec/enet_uio.c | 10 +-
drivers/net/enic/enic_ethdev.c | 20 +--
drivers/net/enic/enic_flow.c | 20 +--
drivers/net/enic/enic_vf_representor.c | 16 +--
drivers/net/failsafe/failsafe_args.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/failsafe/failsafe_ether.c | 4 +-
drivers/net/failsafe/failsafe_intr.c | 6 +-
drivers/net/gve/base/gve_adminq.c | 4 +-
drivers/net/gve/gve_rx.c | 2 +-
drivers/net/gve/gve_tx.c | 2 +-
drivers/net/hinic/base/hinic_pmd_eqs.c | 2 +-
drivers/net/hinic/base/hinic_pmd_mbox.c | 6 +-
drivers/net/hinic/base/hinic_pmd_niccfg.c | 8 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 4 +-
drivers/net/hns3/hns3_dump.c | 12 +-
drivers/net/hns3/hns3_intr.c | 12 +-
drivers/net/hns3/hns3_ptp.c | 2 +-
drivers/net/hns3/hns3_regs.c | 4 +-
drivers/net/i40e/i40e_ethdev.c | 51 ++++----
drivers/net/i40e/i40e_pf.c | 8 +-
drivers/net/i40e/i40e_rxtx.c | 42 +++----
drivers/net/iavf/iavf_ethdev.c | 12 +-
drivers/net/iavf/iavf_rxtx.c | 16 +--
drivers/net/ice/ice_dcf_ethdev.c | 4 +-
drivers/net/ice/ice_dcf_vf_representor.c | 14 +--
drivers/net/ice/ice_ethdev.c | 50 ++++----
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 8 +-
drivers/net/ice/ice_rxtx.c | 18 +--
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 23 ++--
drivers/net/ipn3ke/ipn3ke_representor.c | 20 +--
drivers/net/ipn3ke/ipn3ke_tm.c | 10 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +-
drivers/net/ixgbe/ixgbe_ipsec.c | 24 ++--
drivers/net/ixgbe/ixgbe_pf.c | 18 +--
drivers/net/ixgbe/rte_pmd_ixgbe.c | 8 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/ngbe/base/ngbe_hw.c | 2 +-
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
drivers/net/ngbe/ngbe_pf.c | 10 +-
drivers/net/octeon_ep/cnxk_ep_tx.c | 2 +-
drivers/net/octeon_ep/cnxk_ep_vf.c | 12 +-
drivers/net/octeon_ep/otx2_ep_vf.c | 18 +--
drivers/net/octeon_ep/otx_ep_common.h | 2 +-
drivers/net/octeon_ep/otx_ep_ethdev.c | 82 ++++++-------
drivers/net/octeon_ep/otx_ep_mbox.c | 30 ++---
drivers/net/octeon_ep/otx_ep_rxtx.c | 74 +++++------
drivers/net/octeon_ep/otx_ep_vf.c | 20 +--
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 4 +-
drivers/net/pfe/pfe_ethdev.c | 22 ++--
drivers/net/pfe/pfe_hif.c | 12 +-
drivers/net/pfe/pfe_hif_lib.c | 2 +-
drivers/net/qede/qede_rxtx.c | 66 +++++-----
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/txgbe/txgbe_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ipsec.c | 24 ++--
drivers/net/txgbe/txgbe_pf.c | 20 +--
drivers/net/virtio/virtio_user/vhost_vdpa.c | 2 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 14 +--
drivers/raw/ifpga/afu_pmd_n3000.c | 2 +-
drivers/raw/ifpga/ifpga_rawdev.c | 94 +++++++-------
drivers/regex/cn9k/cn9k_regexdev.c | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 10 +-
drivers/vdpa/nfp/nfp_vdpa.c | 2 +-
172 files changed, 1087 insertions(+), 1105 deletions(-)
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index ab69350080..5c91acab7e 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -229,7 +229,7 @@ fetch_acc100_config(struct rte_bbdev *dev)
}
rte_bbdev_log_debug(
- "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u AQ %u %u %u %u Len %u %u %u %u\n",
+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u AQ %u %u %u %u Len %u %u %u %u",
(d->pf_device) ? "PF" : "VF",
(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
@@ -2672,7 +2672,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
uint32_t harq_index;
if (harq_in_length == 0) {
- rte_bbdev_log(ERR, "Loopback of invalid null size\n");
+ rte_bbdev_log(ERR, "Loopback of invalid null size");
return -EINVAL;
}
@@ -2710,7 +2710,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
fcw->hcin_en = 1;
fcw->hcout_en = 1;
- rte_bbdev_log(DEBUG, "Loopback IN %d Index %d offset %d length %d %d\n",
+ rte_bbdev_log(DEBUG, "Loopback IN %d Index %d offset %d length %d %d",
ddr_mem_in, harq_index,
harq_layout[harq_index].offset, harq_in_length,
harq_dma_length_in);
@@ -2726,7 +2726,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
fcw->hcin_size0 = harq_in_length;
}
harq_layout[harq_index].val = 0;
- rte_bbdev_log(DEBUG, "Loopback FCW Config %d %d %d\n",
+ rte_bbdev_log(DEBUG, "Loopback FCW Config %d %d %d",
fcw->hcin_size0, fcw->hcin_offset, fcw->hcin_size1);
fcw->hcout_size0 = harq_in_length;
fcw->hcin_decomp_mode = h_comp;
@@ -3450,7 +3450,7 @@ acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
}
avail -= 1;
- rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d\n",
+ rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d",
i, ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,
ops[i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,
ops[i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,
@@ -3566,7 +3566,7 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x num %d\n", desc, rsp.val, desc->req.numCBs);
+ rte_bbdev_log_debug("Resp. desc %p: %x num %d", desc, rsp.val, desc->req.numCBs);
/* Dequeue */
op = desc->req.op_addr;
@@ -3643,7 +3643,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
atom_desc.atom_hdr = rte_atomic_load_explicit((uint64_t __rte_atomic *)desc,
rte_memory_order_relaxed);
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x descs %d cbs %d\n",
+ rte_bbdev_log_debug("Resp. desc %p: %x descs %d cbs %d",
desc, rsp.val, descs_in_tb, desc->req.numCBs);
op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
@@ -3739,7 +3739,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x\n", desc, rsp.val);
+ rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val);
/* Dequeue */
op = desc->req.op_addr;
@@ -3818,7 +3818,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
atom_desc.atom_hdr = rte_atomic_load_explicit((uint64_t __rte_atomic *)desc,
rte_memory_order_relaxed);
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d\n",
+ rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d",
desc, rsp.val, cb_idx, cbs_in_tb);
op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
@@ -4552,7 +4552,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf)
}
if (aram_address > ACC100_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, ACC100_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index 585dc49bd6..fad984ccc1 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -348,7 +348,7 @@ fetch_acc_config(struct rte_bbdev *dev)
}
rte_bbdev_log_debug(
- "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u\n",
+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u",
(d->pf_device) ? "PF" : "VF",
(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
@@ -464,7 +464,7 @@ vrb_dev_interrupt_handler(void *cb_arg)
}
} else {
rte_bbdev_log_debug(
- "VRB VF Interrupt received, Info Ring data: 0x%x\n",
+ "VRB VF Interrupt received, Info Ring data: 0x%x",
ring_data->val);
switch (int_nb) {
case ACC_VF_INT_DMA_DL_DESC_IRQ:
@@ -698,7 +698,7 @@ vrb_intr_enable(struct rte_bbdev *dev)
if (d->device_variant == VRB1_VARIANT) {
/* On VRB1: cannot enable MSI/IR to avoid potential back-pressure corner case. */
- rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt\n",
+ rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt",
dev->data->name);
return -ENOTSUP;
}
@@ -800,7 +800,7 @@ vrb_intr_enable(struct rte_bbdev *dev)
return 0;
}
- rte_bbdev_log(ERR, "Device (%s) supports only VFIO MSI/MSI-X interrupts\n",
+ rte_bbdev_log(ERR, "Device (%s) supports only VFIO MSI/MSI-X interrupts",
dev->data->name);
return -ENOTSUP;
}
@@ -1023,7 +1023,7 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id, q->aq_id));
rte_bbdev_log_debug(
- "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
+ "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p",
dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,
q->aq_id, q->aq_depth, q->mmio_reg_enqueue,
d->mmio_base);
@@ -1076,7 +1076,7 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
);
} else if (op_type == RTE_BBDEV_OP_MLDTS) {
struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op;
- rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x\n",
+ rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x",
index,
op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers,
op_mldts->mldts.r_rep,
@@ -2492,7 +2492,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
hq_output = op->ldpc_dec.harq_combined_output.data;
hq_len = op->ldpc_dec.harq_combined_output.length;
if (unlikely(!mbuf_append(hq_output_head, hq_output, hq_len))) {
- rte_bbdev_log(ERR, "HARQ output mbuf issue %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output mbuf issue %d %d",
hq_output->buf_len,
hq_len);
return -1;
@@ -2985,7 +2985,7 @@ vrb_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
break;
}
avail -= 1;
- rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d %d\n",
+ rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d %d",
i, ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,
ops[i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,
ops[i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,
@@ -3304,7 +3304,7 @@ vrb_dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x %x %x\n", desc, rsp.val, desc->rsp.add_info_0,
+ rte_bbdev_log_debug("Resp. desc %p: %x %x %x", desc, rsp.val, desc->rsp.add_info_0,
desc->rsp.add_info_1);
/* Dequeue. */
@@ -3411,7 +3411,7 @@ vrb_dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
}
if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK)) {
- rte_bbdev_log_debug("TB-CRC Check %x\n", tb_crc_check);
+ rte_bbdev_log_debug("TB-CRC Check %x", tb_crc_check);
if (tb_crc_check > 0)
op->status |= 1 << RTE_BBDEV_CRC_ERROR;
}
@@ -3946,7 +3946,7 @@ vrb2_check_mld_r_constraint(struct rte_bbdev_mldts_op *op) {
layer_idx = RTE_MIN(op->mldts.num_layers - VRB2_MLD_MIN_LAYER,
VRB2_MLD_MAX_LAYER - VRB2_MLD_MIN_LAYER);
rrep_idx = RTE_MIN(op->mldts.r_rep, VRB2_MLD_MAX_RREP);
- rte_bbdev_log_debug("RB %d index %d %d max %d\n", op->mldts.num_rbs, layer_idx, rrep_idx,
+ rte_bbdev_log_debug("RB %d index %d %d max %d", op->mldts.num_rbs, layer_idx, rrep_idx,
max_rb[layer_idx][rrep_idx]);
return (op->mldts.num_rbs <= max_rb[layer_idx][rrep_idx]);
@@ -4606,7 +4606,7 @@ vrb1_configure(const char *dev_name, struct rte_acc_conf *conf)
}
if (aram_address > VRB1_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, VRB1_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
@@ -4976,7 +4976,7 @@ vrb2_configure(const char *dev_name, struct rte_acc_conf *conf)
}
}
if (aram_address > VRB2_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, VRB2_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
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 9b253cde28..3e04e44ba2 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -1997,10 +1997,10 @@ fpga_5gnr_mutex_acquisition(struct fpga_5gnr_queue *q)
do {
if (cnt > 0)
usleep(FPGA_5GNR_TIMEOUT_CHECK_INTERVAL);
- rte_bbdev_log_debug("Acquiring Mutex for %x\n", q->ddr_mutex_uuid);
+ rte_bbdev_log_debug("Acquiring Mutex for %x", q->ddr_mutex_uuid);
fpga_5gnr_reg_write_32(q->d->mmio_base, FPGA_5GNR_FEC_MUTEX, mutex_ctrl);
mutex_read = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_MUTEX);
- rte_bbdev_log_debug("Mutex %x cnt %d owner %x\n",
+ rte_bbdev_log_debug("Mutex %x cnt %d owner %x",
mutex_read, cnt, q->ddr_mutex_uuid);
cnt++;
} while ((mutex_read >> 16) != q->ddr_mutex_uuid);
@@ -2038,7 +2038,7 @@ fpga_5gnr_harq_write_loopback(struct fpga_5gnr_queue *q,
reg_32 = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_HARQ_BUF_SIZE_REGS);
if (reg_32 < harq_in_length) {
left_length = reg_32;
- rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
+ rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size");
}
}
@@ -2108,17 +2108,17 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q,
reg = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_HARQ_BUF_SIZE_REGS);
if (reg < harq_in_length) {
harq_in_length = reg;
- rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
+ rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size");
}
}
if (!mbuf_append(harq_output, harq_output, harq_in_length)) {
- rte_bbdev_log(ERR, "HARQ output buffer warning %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output buffer warning %d %d",
harq_output->buf_len - rte_pktmbuf_headroom(harq_output),
harq_in_length);
harq_in_length = harq_output->buf_len - rte_pktmbuf_headroom(harq_output);
if (!mbuf_append(harq_output, harq_output, harq_in_length)) {
- rte_bbdev_log(ERR, "HARQ output buffer issue %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output buffer issue %d %d",
harq_output->buf_len, harq_in_length);
return -1;
}
@@ -2142,7 +2142,7 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q,
while (reg != 1) {
reg = fpga_5gnr_reg_read_8(q->d->mmio_base, FPGA_5GNR_FEC_DDR4_RD_RDY_REGS);
if (reg == FPGA_5GNR_DDR_OVERFLOW) {
- rte_bbdev_log(ERR, "Read address is overflow!\n");
+ rte_bbdev_log(ERR, "Read address is overflow!");
return -1;
}
}
@@ -3376,7 +3376,7 @@ int rte_fpga_5gnr_fec_configure(const char *dev_name, const struct rte_fpga_5gnr
return -ENODEV;
}
struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(bbdev->device);
- rte_bbdev_log(INFO, "Configure dev id %x\n", pci_dev->id.device_id);
+ rte_bbdev_log(INFO, "Configure dev id %x", pci_dev->id.device_id);
if (pci_dev->id.device_id == VC_5GNR_PF_DEVICE_ID)
return vc_5gnr_configure(dev_name, conf);
else if (pci_dev->id.device_id == AGX100_PF_DEVICE_ID)
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 1a56e73abd..af4b4f1e9a 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -201,7 +201,7 @@ la12xx_e200_queue_setup(struct rte_bbdev *dev,
q_priv->la12xx_core_id = LA12XX_LDPC_DEC_CORE;
break;
default:
- rte_bbdev_log(ERR, "Unsupported op type\n");
+ rte_bbdev_log(ERR, "Unsupported op type");
return -1;
}
@@ -269,7 +269,7 @@ la12xx_e200_queue_setup(struct rte_bbdev *dev,
ch->feca_blk_id = rte_cpu_to_be_32(priv->num_ldpc_dec_queues++);
break;
default:
- rte_bbdev_log(ERR, "Not supported op type\n");
+ rte_bbdev_log(ERR, "Not supported op type");
return -1;
}
ch->op_type = rte_cpu_to_be_32(q_priv->op_type);
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 574743a9da..1f661dd801 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -269,7 +269,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
dev_info->num_queues[op_cap->type] = num_queue_per_type;
}
- rte_bbdev_log_debug("got device info from %u\n", dev->data->dev_id);
+ rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
}
/* Release queue */
@@ -1951,7 +1951,7 @@ turbo_sw_bbdev_probe(struct rte_vdev_device *vdev)
parse_turbo_sw_params(&init_params, input_args);
rte_bbdev_log_debug(
- "Initialising %s on NUMA node %d with max queues: %d\n",
+ "Initialising %s on NUMA node %d with max queues: %d",
name, init_params.socket_id, init_params.queues_num);
return turbo_sw_bbdev_create(vdev, &init_params);
diff --git a/drivers/bus/cdx/cdx_vfio.c b/drivers/bus/cdx/cdx_vfio.c
index 79abc3f120..664f267471 100644
--- a/drivers/bus/cdx/cdx_vfio.c
+++ b/drivers/bus/cdx/cdx_vfio.c
@@ -638,7 +638,7 @@ rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev)
feature->flags |= VFIO_DEVICE_FEATURE_SET;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret) {
- CDX_BUS_ERR("Bus Master configuring not supported for device: %s, error: %d (%s)\n",
+ CDX_BUS_ERR("Bus Master configuring not supported for device: %s, error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
return ret;
@@ -648,7 +648,7 @@ rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev)
vfio_bm_feature->op = VFIO_DEVICE_FEATURE_SET_MASTER;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret < 0)
- CDX_BUS_ERR("BM Enable Error for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("BM Enable Error for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
@@ -682,7 +682,7 @@ rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev)
feature->flags |= VFIO_DEVICE_FEATURE_SET;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret) {
- CDX_BUS_ERR("Bus Master configuring not supported for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("Bus Master configuring not supported for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
return ret;
@@ -692,7 +692,7 @@ rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev)
vfio_bm_feature->op = VFIO_DEVICE_FEATURE_CLEAR_MASTER;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret < 0)
- CDX_BUS_ERR("BM Disable Error for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("BM Disable Error for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h
index 3a6dd555a7..19f6132bba 100644
--- a/drivers/bus/dpaa/include/fman.h
+++ b/drivers/bus/dpaa/include/fman.h
@@ -403,7 +403,8 @@ extern int fman_ccsr_map_fd;
#define FMAN_ERR(rc, fmt, args...) \
do { \
_errno = (rc); \
- DPAA_BUS_LOG(ERR, fmt "(%d)", ##args, errno); \
+ rte_log(RTE_LOG_ERR, dpaa_logtype_bus, "dpaa: " fmt "(%d)\n", \
+ ##args, errno); \
} while (0)
#define FMAN_IP_REV_1 0xC30C4
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index c155f4a2fd..097d6dca08 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -500,7 +500,7 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
const struct rte_dpaa2_device *dstart;
struct rte_dpaa2_device *dev;
- DPAA2_BUS_DEBUG("Finding a device named %s\n", (const char *)data);
+ DPAA2_BUS_DEBUG("Finding a device named %s", (const char *)data);
/* find_device is always called with an opaque object which should be
* passed along to the 'cmp' function iterating over all device obj
@@ -515,7 +515,7 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
}
while (dev != NULL) {
if (cmp(&dev->device, data) == 0) {
- DPAA2_BUS_DEBUG("Found device (%s)\n",
+ DPAA2_BUS_DEBUG("Found device (%s)",
dev->device.name);
return &dev->device;
}
@@ -629,14 +629,14 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
/* Expectation is that device would be name=device_name */
if (strncmp(str, "name=", 5) != 0) {
- DPAA2_BUS_DEBUG("Invalid device string (%s)\n", str);
+ DPAA2_BUS_DEBUG("Invalid device string (%s)", str);
return NULL;
}
/* Now that name=device_name format is available, split */
dup = strdup(str);
if (dup == NULL) {
- DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
+ DPAA2_BUS_DEBUG("Dup string (%s) failed!", str);
return NULL;
}
dev_name = dup + strlen("name=");
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index e12fd62f34..6981679a2d 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -232,7 +232,7 @@ fslmc_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
/* iova_addr may be set to RTE_BAD_IOVA */
if (iova_addr == RTE_BAD_IOVA) {
- DPAA2_BUS_DEBUG("Segment has invalid iova, skipping\n");
+ DPAA2_BUS_DEBUG("Segment has invalid iova, skipping");
cur_len += map_len;
continue;
}
@@ -389,7 +389,7 @@ rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size)
dma_map.vaddr = vaddr;
dma_map.iova = iova;
- DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64"\n",
+ DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64,
(uint64_t)dma_map.vaddr, (uint64_t)dma_map.iova,
(uint64_t)dma_map.size);
ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA,
@@ -480,13 +480,13 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
ret = ioctl(vfio_group_fd, VFIO_GROUP_GET_STATUS, &group_status);
if (ret) {
DPAA2_BUS_ERR(" %s cannot get group status, "
- "error %i (%s)\n", dev_addr,
+ "error %i (%s)", dev_addr,
errno, strerror(errno));
close(vfio_group_fd);
rte_vfio_clear_group(vfio_group_fd);
return -1;
} else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) {
- DPAA2_BUS_ERR(" %s VFIO group is not viable!\n", dev_addr);
+ DPAA2_BUS_ERR(" %s VFIO group is not viable!", dev_addr);
close(vfio_group_fd);
rte_vfio_clear_group(vfio_group_fd);
return -1;
@@ -503,7 +503,7 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
&vfio_container_fd);
if (ret) {
DPAA2_BUS_ERR(" %s cannot add VFIO group to container, "
- "error %i (%s)\n", dev_addr,
+ "error %i (%s)", dev_addr,
errno, strerror(errno));
close(vfio_group_fd);
close(vfio_container_fd);
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index 07256ed7ec..7e858a113f 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -86,7 +86,7 @@ rte_dpaa2_create_dpci_device(int vdev_fd __rte_unused,
sizeof(struct queue_storage_info_t),
RTE_CACHE_LINE_SIZE);
if (!rxq->q_storage) {
- DPAA2_BUS_ERR("q_storage allocation failed\n");
+ DPAA2_BUS_ERR("q_storage allocation failed");
ret = -ENOMEM;
goto err;
}
@@ -94,7 +94,7 @@ rte_dpaa2_create_dpci_device(int vdev_fd __rte_unused,
memset(rxq->q_storage, 0, sizeof(struct queue_storage_info_t));
ret = dpaa2_alloc_dq_storage(rxq->q_storage);
if (ret) {
- DPAA2_BUS_ERR("dpaa2_alloc_dq_storage failed\n");
+ DPAA2_BUS_ERR("dpaa2_alloc_dq_storage failed");
goto err;
}
}
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index ffb0c61214..11b31eee4f 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -180,7 +180,7 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
rawdev->dev_ops->firmware_load &&
rawdev->dev_ops->firmware_load(rawdev,
&afu_pr_conf)){
- IFPGA_BUS_ERR("firmware load error %d\n", ret);
+ IFPGA_BUS_ERR("firmware load error %d", ret);
goto end;
}
afu_dev->id.uuid.uuid_low = afu_pr_conf.afu_id.uuid.uuid_low;
@@ -316,7 +316,7 @@ ifpga_probe_all_drivers(struct rte_afu_device *afu_dev)
/* Check if a driver is already loaded */
if (rte_dev_is_probed(&afu_dev->device)) {
- IFPGA_BUS_DEBUG("Device %s is already probed\n",
+ IFPGA_BUS_DEBUG("Device %s is already probed",
rte_ifpga_device_name(afu_dev));
return -EEXIST;
}
@@ -353,7 +353,7 @@ ifpga_probe(void)
if (ret == -EEXIST)
continue;
if (ret < 0)
- IFPGA_BUS_ERR("failed to initialize %s device\n",
+ IFPGA_BUS_ERR("failed to initialize %s device",
rte_ifpga_device_name(afu_dev));
}
@@ -408,7 +408,7 @@ ifpga_remove_driver(struct rte_afu_device *afu_dev)
name = rte_ifpga_device_name(afu_dev);
if (afu_dev->driver == NULL) {
- IFPGA_BUS_DEBUG("no driver attach to device %s\n", name);
+ IFPGA_BUS_DEBUG("no driver attach to device %s", name);
return 1;
}
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 51583fe949..68ae09e2e9 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -53,7 +53,7 @@ rte_vdev_dev_iterate(const void *start,
if (str != NULL) {
kvargs = rte_kvargs_parse(str, vdev_params_keys);
if (kvargs == NULL) {
- VDEV_LOG(ERR, "cannot parse argument list\n");
+ VDEV_LOG(ERR, "cannot parse argument list");
rte_errno = EINVAL;
return NULL;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index b9139c6e6c..8a965d10d9 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -108,7 +108,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
/* no initialization when marked as blocked, return without error */
if (dev->device.devargs != NULL &&
dev->device.devargs->policy == RTE_DEV_BLOCKED) {
- VMBUS_LOG(INFO, " Device is blocked, not initializing\n");
+ VMBUS_LOG(INFO, " Device is blocked, not initializing");
return 1;
}
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index daf7684d8e..438ac72563 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -1564,7 +1564,7 @@ dev_init(struct dev *dev, struct plt_pci_device *pci_dev)
rc = plt_thread_create_control(&dev->sync.pfvf_msg_thread, name,
pf_vf_mbox_thread_main, dev);
if (rc != 0) {
- plt_err("Failed to create thread for VF mbox handling\n");
+ plt_err("Failed to create thread for VF mbox handling");
goto thread_fail;
}
}
diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
index 6dc2afe7f0..446ab3d2bd 100644
--- a/drivers/common/cnxk/roc_model.c
+++ b/drivers/common/cnxk/roc_model.c
@@ -153,7 +153,7 @@ cn10k_part_pass_get(uint32_t *part, uint32_t *pass)
dir = opendir(SYSFS_PCI_DEVICES);
if (dir == NULL) {
- plt_err("%s(): opendir failed: %s\n", __func__,
+ plt_err("%s(): opendir failed: %s", __func__,
strerror(errno));
return -errno;
}
diff --git a/drivers/common/cnxk/roc_nix_ops.c b/drivers/common/cnxk/roc_nix_ops.c
index 9e66ad1a49..efb0a41d07 100644
--- a/drivers/common/cnxk/roc_nix_ops.c
+++ b/drivers/common/cnxk/roc_nix_ops.c
@@ -220,7 +220,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
}
- plt_nix_dbg("tcpv4 lso fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tcpv4 lso fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TCP LSO
@@ -240,7 +240,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
}
- plt_nix_dbg("tcpv6 lso fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tcpv6 lso fmt=%u", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv4/TCP LSO
@@ -256,7 +256,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v4v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v4v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv6/TCP LSO
@@ -272,7 +272,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v4v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v4v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv4/TCP LSO
@@ -288,7 +288,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v6v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v6v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv6/TCP LSO
@@ -304,7 +304,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v6v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v6v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv4/TCP LSO
@@ -320,7 +320,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
- plt_nix_dbg("tun v4v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v4v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv6/TCP LSO
@@ -336,7 +336,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
- plt_nix_dbg("tun v4v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v4v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv4/TCP LSO
@@ -352,7 +352,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
- plt_nix_dbg("tun v6v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v6v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv6/TCP LSO
@@ -369,7 +369,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
- plt_nix_dbg("tun v6v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v6v6 fmt=%u", rsp->lso_format_idx);
rc = 0;
exit:
mbox_put(mbox);
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index ac522f8235..d890fad681 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -908,7 +908,7 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
if (rc) {
roc_nix_tm_dump(sq->roc_nix, NULL);
roc_nix_queues_ctx_dump(sq->roc_nix, NULL);
- plt_err("Failed to drain sq %u, rc=%d\n", sq->qid, rc);
+ plt_err("Failed to drain sq %u, rc=%d", sq->qid, rc);
return rc;
}
/* Freed all pending SQEs for this SQ, so disable this node */
diff --git a/drivers/common/cnxk/roc_nix_tm_mark.c b/drivers/common/cnxk/roc_nix_tm_mark.c
index e9a7604e79..092d0851b9 100644
--- a/drivers/common/cnxk/roc_nix_tm_mark.c
+++ b/drivers/common/cnxk/roc_nix_tm_mark.c
@@ -266,7 +266,7 @@ nix_tm_mark_init(struct nix *nix)
}
nix->tm_markfmt[i][j] = rsp->mark_format_idx;
- plt_tm_dbg("Mark type: %u, Mark Color:%u, id:%u\n", i,
+ plt_tm_dbg("Mark type: %u, Mark Color:%u, id:%u", i,
j, nix->tm_markfmt[i][j]);
}
}
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 9f3870a311..e24826bb5d 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -504,7 +504,7 @@ roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix)
/* Wait for sq entries to be flushed */
rc = roc_nix_tm_sq_flush_spin(sq);
if (rc) {
- plt_err("Failed to drain sq, rc=%d\n", rc);
+ plt_err("Failed to drain sq, rc=%d", rc);
goto cleanup;
}
}
diff --git a/drivers/common/cnxk/roc_nix_tm_utils.c b/drivers/common/cnxk/roc_nix_tm_utils.c
index 8e3da95a45..4a09cc2aae 100644
--- a/drivers/common/cnxk/roc_nix_tm_utils.c
+++ b/drivers/common/cnxk/roc_nix_tm_utils.c
@@ -583,7 +583,7 @@ nix_tm_topology_reg_prep(struct nix *nix, struct nix_tm_node *node,
/* Configure TL4 to send to SDP channel instead of CGX/LBK */
if (nix->sdp_link) {
relchan = nix->tx_chan_base & 0xff;
- plt_tm_dbg("relchan=%u schq=%u tx_chan_cnt=%u\n", relchan, schq,
+ plt_tm_dbg("relchan=%u schq=%u tx_chan_cnt=%u", relchan, schq,
nix->tx_chan_cnt);
reg[k] = NIX_AF_TL4X_SDP_LINK_CFG(schq);
regval[k] = BIT_ULL(12);
diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index 293b0c81a1..499f93e373 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -186,7 +186,7 @@ sso_rsrc_get(struct roc_sso *roc_sso)
mbox_alloc_msg_free_rsrc_cnt(mbox);
rc = mbox_process_msg(mbox, (void **)&rsrc_cnt);
if (rc) {
- plt_err("Failed to get free resource count\n");
+ plt_err("Failed to get free resource count");
rc = -EIO;
goto exit;
}
diff --git a/drivers/common/cnxk/roc_tim.c b/drivers/common/cnxk/roc_tim.c
index 095afbb9e6..83228fb2b6 100644
--- a/drivers/common/cnxk/roc_tim.c
+++ b/drivers/common/cnxk/roc_tim.c
@@ -342,7 +342,7 @@ tim_free_lf_count_get(struct dev *dev, uint16_t *nb_lfs)
mbox_alloc_msg_free_rsrc_cnt(mbox);
rc = mbox_process_msg(mbox, (void **)&rsrc_cnt);
if (rc) {
- plt_err("Failed to get free resource count\n");
+ plt_err("Failed to get free resource count");
mbox_put(mbox);
return -EIO;
}
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 87a3ac80b9..636f93604e 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2589,7 +2589,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
sess->cpt_op |= CPT_OP_CIPHER_DECRYPT;
sess->cpt_op |= CPT_OP_AUTH_VERIFY;
} else {
- CPT_LOG_DP_ERR("Unknown aead operation\n");
+ CPT_LOG_DP_ERR("Unknown aead operation");
return -1;
}
switch (aead_form->algo) {
@@ -2658,7 +2658,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
ctx->dec_auth = 1;
}
} else {
- CPT_LOG_DP_ERR("Unknown cipher operation\n");
+ CPT_LOG_DP_ERR("Unknown cipher operation");
return -1;
}
diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/common/idpf/idpf_common_logs.h
index e638c616d8..561836760c 100644
--- a/drivers/common/idpf/idpf_common_logs.h
+++ b/drivers/common/idpf/idpf_common_logs.h
@@ -10,7 +10,7 @@
extern int idpf_common_logtype;
#define RTE_LOGTYPE_IDPF_COMMON idpf_common_logtype
-#define DRV_LOG_RAW(level, ...) \
+#define DRV_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, \
idpf_common_logtype, \
RTE_FMT("%s(): " \
@@ -18,9 +18,6 @@ extern int idpf_common_logtype;
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
-#define DRV_LOG(level, fmt, args...) \
- DRV_LOG_RAW(level, fmt "\n", ## args)
-
#ifdef RTE_LIBRTE_IDPF_DEBUG_RX
#define RX_LOG(level, ...) \
RTE_LOG(level, \
diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
index 4fd3fda721..f98942c79c 100644
--- a/drivers/common/octeontx/octeontx_mbox.c
+++ b/drivers/common/octeontx/octeontx_mbox.c
@@ -264,7 +264,7 @@ octeontx_start_domain(void)
result = octeontx_mbox_send(&hdr, NULL, 0, NULL, 0);
if (result != 0) {
- mbox_log_err("Could not start domain. Err=%d. FuncErr=%d\n",
+ mbox_log_err("Could not start domain. Err=%d. FuncErr=%d",
result, hdr.res_code);
result = -EINVAL;
}
@@ -288,7 +288,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
sizeof(struct mbox_intf_ver),
&kernel_intf_ver, sizeof(kernel_intf_ver));
if (result != sizeof(kernel_intf_ver)) {
- mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
+ mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d",
result, hdr.res_code);
result = -EINVAL;
}
diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c
index 621f12fce2..9b25fdc6a0 100644
--- a/drivers/common/qat/qat_pf2vf.c
+++ b/drivers/common/qat/qat_pf2vf.c
@@ -36,7 +36,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
}
if ((pf2vf_msg.msg_type & type_mask) != pf2vf_msg.msg_type) {
- QAT_LOG(ERR, "PF2VF message type 0x%X out of range\n",
+ QAT_LOG(ERR, "PF2VF message type 0x%X out of range",
pf2vf_msg.msg_type);
return -EINVAL;
}
@@ -65,7 +65,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
(++count < ADF_IOV_MSG_ACK_MAX_RETRY));
if (val & ADF_PFVF_INT) {
- QAT_LOG(ERR, "ACK not received from remote\n");
+ QAT_LOG(ERR, "ACK not received from remote");
return -EIO;
}
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index ad44b0e01f..4bf9bac23e 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -267,7 +267,7 @@ qat_queue_create(struct qat_pci_device *qat_dev, struct qat_queue *queue,
if (qat_qp_check_queue_alignment(queue->base_phys_addr,
queue_size_bytes)) {
QAT_LOG(ERR, "Invalid alignment on queue create "
- " 0x%"PRIx64"\n",
+ " 0x%"PRIx64,
queue->base_phys_addr);
ret = -EFAULT;
goto queue_create_err;
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index cb23e929ed..0e783243a8 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -42,10 +42,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
/* Set private xform algorithm */
if (xform->compress.algo != RTE_COMP_ALGO_DEFLATE) {
if (xform->compress.algo == RTE_COMP_ALGO_NULL) {
- ISAL_PMD_LOG(ERR, "By-pass not supported\n");
+ ISAL_PMD_LOG(ERR, "By-pass not supported");
return -ENOTSUP;
}
- ISAL_PMD_LOG(ERR, "Algorithm not supported\n");
+ ISAL_PMD_LOG(ERR, "Algorithm not supported");
return -ENOTSUP;
}
priv_xform->compress.algo = RTE_COMP_ALGO_DEFLATE;
@@ -55,7 +55,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
priv_xform->compress.window_size =
RTE_COMP_ISAL_WINDOW_SIZE;
else {
- ISAL_PMD_LOG(ERR, "Window size not supported\n");
+ ISAL_PMD_LOG(ERR, "Window size not supported");
return -ENOTSUP;
}
@@ -74,7 +74,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
RTE_COMP_HUFFMAN_DYNAMIC;
break;
default:
- ISAL_PMD_LOG(ERR, "Huffman code not supported\n");
+ ISAL_PMD_LOG(ERR, "Huffman code not supported");
return -ENOTSUP;
}
@@ -92,10 +92,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
break;
case(RTE_COMP_CHECKSUM_CRC32_ADLER32):
ISAL_PMD_LOG(ERR, "Combined CRC and ADLER checksum not"
- " supported\n");
+ " supported");
return -ENOTSUP;
default:
- ISAL_PMD_LOG(ERR, "Checksum type not supported\n");
+ ISAL_PMD_LOG(ERR, "Checksum type not supported");
priv_xform->compress.chksum = IGZIP_DEFLATE;
break;
}
@@ -105,21 +105,21 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
*/
if (xform->compress.level < RTE_COMP_LEVEL_PMD_DEFAULT ||
xform->compress.level > RTE_COMP_LEVEL_MAX) {
- ISAL_PMD_LOG(ERR, "Compression level out of range\n");
+ ISAL_PMD_LOG(ERR, "Compression level out of range");
return -EINVAL;
}
/* Check for Compressdev API level 0, No compression
* not supported in ISA-L
*/
else if (xform->compress.level == RTE_COMP_LEVEL_NONE) {
- ISAL_PMD_LOG(ERR, "No Compression not supported\n");
+ ISAL_PMD_LOG(ERR, "No Compression not supported");
return -ENOTSUP;
}
/* If using fixed huffman code, level must be 0 */
else if (priv_xform->compress.deflate.huffman ==
RTE_COMP_HUFFMAN_FIXED) {
ISAL_PMD_LOG(DEBUG, "ISA-L level 0 used due to a"
- " fixed huffman code\n");
+ " fixed huffman code");
priv_xform->compress.level = RTE_COMP_ISAL_LEVEL_ZERO;
priv_xform->level_buffer_size =
ISAL_DEF_LVL0_DEFAULT;
@@ -169,7 +169,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
ISAL_PMD_LOG(DEBUG, "Requested ISA-L level"
" 3 or above; Level 3 optimized"
" for AVX512 & AVX2 only."
- " level changed to 2.\n");
+ " level changed to 2.");
priv_xform->compress.level =
RTE_COMP_ISAL_LEVEL_TWO;
priv_xform->level_buffer_size =
@@ -188,10 +188,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
/* Set private xform algorithm */
if (xform->decompress.algo != RTE_COMP_ALGO_DEFLATE) {
if (xform->decompress.algo == RTE_COMP_ALGO_NULL) {
- ISAL_PMD_LOG(ERR, "By pass not supported\n");
+ ISAL_PMD_LOG(ERR, "By pass not supported");
return -ENOTSUP;
}
- ISAL_PMD_LOG(ERR, "Algorithm not supported\n");
+ ISAL_PMD_LOG(ERR, "Algorithm not supported");
return -ENOTSUP;
}
priv_xform->decompress.algo = RTE_COMP_ALGO_DEFLATE;
@@ -210,10 +210,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
break;
case(RTE_COMP_CHECKSUM_CRC32_ADLER32):
ISAL_PMD_LOG(ERR, "Combined CRC and ADLER checksum not"
- " supported\n");
+ " supported");
return -ENOTSUP;
default:
- ISAL_PMD_LOG(ERR, "Checksum type not supported\n");
+ ISAL_PMD_LOG(ERR, "Checksum type not supported");
priv_xform->decompress.chksum = ISAL_DEFLATE;
break;
}
@@ -223,7 +223,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
priv_xform->decompress.window_size =
RTE_COMP_ISAL_WINDOW_SIZE;
else {
- ISAL_PMD_LOG(ERR, "Window size not supported\n");
+ ISAL_PMD_LOG(ERR, "Window size not supported");
return -ENOTSUP;
}
}
@@ -263,7 +263,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
remaining_offset);
if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
- ISAL_PMD_LOG(ERR, "Invalid source or destination buffer\n");
+ ISAL_PMD_LOG(ERR, "Invalid source or destination buffer");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -279,7 +279,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
remaining_data = op->src.length - qp->stream->total_in;
if (ret != COMP_OK) {
- ISAL_PMD_LOG(ERR, "Compression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Compression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -294,7 +294,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
RTE_MIN(remaining_data, src->data_len);
} else {
ISAL_PMD_LOG(ERR,
- "Not enough input buffer segments\n");
+ "Not enough input buffer segments");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -309,7 +309,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
qp->stream->avail_out = dst->data_len;
} else {
ISAL_PMD_LOG(ERR,
- "Not enough output buffer segments\n");
+ "Not enough output buffer segments");
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return -1;
@@ -378,14 +378,14 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
if (ret == ISAL_OUT_OVERFLOW) {
ISAL_PMD_LOG(ERR, "Decompression operation ran "
- "out of space, but can be recovered.\n%d bytes "
- "consumed\t%d bytes produced\n",
+ "out of space, but can be recovered.%d bytes "
+ "consumed\t%d bytes produced",
consumed_data, qp->state->total_out);
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
return ret;
} else if (ret < 0) {
- ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Decompression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -399,7 +399,7 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
qp->state->avail_out = dst->data_len;
} else {
ISAL_PMD_LOG(ERR,
- "Not enough output buffer segments\n");
+ "Not enough output buffer segments");
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return -1;
@@ -451,14 +451,14 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
IGZIP_HUFFTABLE_DEFAULT);
if (op->m_src->pkt_len < (op->src.length + op->src.offset)) {
- ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.\n");
+ ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
if (op->dst.offset >= op->m_dst->pkt_len) {
ISAL_PMD_LOG(ERR, "Output mbuf(s) not big enough"
- " for offset provided.\n");
+ " for offset provided.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -483,7 +483,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
ISAL_PMD_LOG(ERR, "Invalid source or destination"
- " buffers\n");
+ " buffers");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -493,7 +493,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that output buffer did not run out of space */
if (ret == STATELESS_OVERFLOW) {
- ISAL_PMD_LOG(ERR, "Output buffer not big enough\n");
+ ISAL_PMD_LOG(ERR, "Output buffer not big enough");
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return ret;
}
@@ -501,13 +501,13 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that input buffer has been fully consumed */
if (qp->stream->avail_in != (uint32_t)0) {
ISAL_PMD_LOG(ERR, "Input buffer could not be read"
- " entirely\n");
+ " entirely");
op->status = RTE_COMP_OP_STATUS_ERROR;
return -1;
}
if (ret != COMP_OK) {
- ISAL_PMD_LOG(ERR, "Compression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Compression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -543,14 +543,14 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
qp->state->crc_flag = priv_xform->decompress.chksum;
if (op->m_src->pkt_len < (op->src.length + op->src.offset)) {
- ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.\n");
+ ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
if (op->dst.offset >= op->m_dst->pkt_len) {
ISAL_PMD_LOG(ERR, "Output mbuf not big enough for "
- "offset provided.\n");
+ "offset provided.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -574,7 +574,7 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
if (unlikely(!qp->state->next_in || !qp->state->next_out)) {
ISAL_PMD_LOG(ERR, "Invalid source or destination"
- " buffers\n");
+ " buffers");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -583,7 +583,7 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
ret = isal_inflate_stateless(qp->state);
if (ret == ISAL_OUT_OVERFLOW) {
- ISAL_PMD_LOG(ERR, "Output buffer not big enough\n");
+ ISAL_PMD_LOG(ERR, "Output buffer not big enough");
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return ret;
}
@@ -591,13 +591,13 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that input buffer has been fully consumed */
if (qp->state->avail_in != (uint32_t)0) {
ISAL_PMD_LOG(ERR, "Input buffer could not be read"
- " entirely\n");
+ " entirely");
op->status = RTE_COMP_OP_STATUS_ERROR;
return -1;
}
if (ret != ISAL_DECOMP_OK && ret != ISAL_END_INPUT) {
- ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Decompression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -622,7 +622,7 @@ process_op(struct isal_comp_qp *qp, struct rte_comp_op *op,
process_isal_inflate(op, qp, priv_xform);
break;
default:
- ISAL_PMD_LOG(ERR, "Operation Not Supported\n");
+ ISAL_PMD_LOG(ERR, "Operation Not Supported");
return -ENOTSUP;
}
return 0;
@@ -641,7 +641,7 @@ isal_comp_pmd_enqueue_burst(void *queue_pair, struct rte_comp_op **ops,
for (i = 0; i < num_enq; i++) {
if (unlikely(ops[i]->op_type != RTE_COMP_OP_STATELESS)) {
ops[i]->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ISAL_PMD_LOG(ERR, "Stateful operation not Supported\n");
+ ISAL_PMD_LOG(ERR, "Stateful operation not Supported");
qp->qp_stats.enqueue_err_count++;
continue;
}
@@ -696,7 +696,7 @@ compdev_isal_create(const char *name, struct rte_vdev_device *vdev,
dev->dequeue_burst = isal_comp_pmd_dequeue_burst;
dev->enqueue_burst = isal_comp_pmd_enqueue_burst;
- ISAL_PMD_LOG(INFO, "\nISA-L library version used: "ISAL_VERSION_STRING);
+ ISAL_PMD_LOG(INFO, "ISA-L library version used: "ISAL_VERSION_STRING);
return 0;
}
@@ -739,7 +739,7 @@ compdev_isal_probe(struct rte_vdev_device *dev)
retval = rte_compressdev_pmd_parse_input_args(&init_params, args);
if (retval) {
ISAL_PMD_LOG(ERR,
- "Failed to parse initialisation arguments[%s]\n", args);
+ "Failed to parse initialisation arguments[%s]", args);
return -EINVAL;
}
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index bb19854b50..7353fd4957 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -206,7 +206,7 @@ zipvf_prepare_sgl(struct rte_mbuf *buf, int64_t offset, struct zipvf_sginfo *sg_
break;
}
- ZIP_PMD_LOG(DEBUG, "ZIP SGL buf[%d], len = %d, iova = 0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "ZIP SGL buf[%d], len = %d, iova = 0x%"PRIx64,
sgidx, sginfo[sgidx].sg_ctl.s.length, sginfo[sgidx].sg_addr.s.addr);
++sgidx;
}
@@ -219,7 +219,7 @@ zipvf_prepare_sgl(struct rte_mbuf *buf, int64_t offset, struct zipvf_sginfo *sg_
}
qp->num_sgbuf = ++sgidx;
- ZIP_PMD_LOG(DEBUG, "Tot_buf_len:%d max_segs:%"PRIx64"\n", tot_buf_len,
+ ZIP_PMD_LOG(DEBUG, "Tot_buf_len:%d max_segs:%"PRIx64, tot_buf_len,
qp->num_sgbuf);
return ret;
}
@@ -246,7 +246,7 @@ zipvf_prepare_in_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_com
inst->s.inp_ptr_ctl.s.length = qp->num_sgbuf;
inst->s.inp_ptr_ctl.s.fw = 0;
- ZIP_PMD_LOG(DEBUG, "Gather(input): len(nb_segs):%d, iova: 0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "Gather(input): len(nb_segs):%d, iova: 0x%"PRIx64,
inst->s.inp_ptr_ctl.s.length, inst->s.inp_ptr_addr.s.addr);
return ret;
}
@@ -256,7 +256,7 @@ zipvf_prepare_in_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_com
inst->s.inp_ptr_addr.s.addr = rte_pktmbuf_iova_offset(m_src, offset);
inst->s.inp_ptr_ctl.s.length = inlen;
- ZIP_PMD_LOG(DEBUG, "Direct input - inlen:%d\n", inlen);
+ ZIP_PMD_LOG(DEBUG, "Direct input - inlen:%d", inlen);
return ret;
}
@@ -282,7 +282,7 @@ zipvf_prepare_out_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_co
inst->s.out_ptr_addr.s.addr = rte_mem_virt2iova(qp->s_info);
inst->s.out_ptr_ctl.s.length = qp->num_sgbuf;
- ZIP_PMD_LOG(DEBUG, "Scatter(output): nb_segs:%d, iova:0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "Scatter(output): nb_segs:%d, iova:0x%"PRIx64,
inst->s.out_ptr_ctl.s.length, inst->s.out_ptr_addr.s.addr);
return ret;
}
@@ -296,7 +296,7 @@ zipvf_prepare_out_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_co
inst->s.out_ptr_ctl.s.length = inst->s.totaloutputlength;
- ZIP_PMD_LOG(DEBUG, "Direct output - outlen:%d\n", inst->s.totaloutputlength);
+ ZIP_PMD_LOG(DEBUG, "Direct output - outlen:%d", inst->s.totaloutputlength);
return ret;
}
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index fd20139da6..c8f456b319 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -161,7 +161,7 @@ zip_set_stream_parameters(struct rte_compressdev *dev,
*/
} else {
- ZIP_PMD_ERR("\nxform type not supported");
+ ZIP_PMD_ERR("xform type not supported");
ret = -1;
goto err;
}
@@ -527,7 +527,7 @@ zip_pmd_enqueue_burst(void *queue_pair,
}
qp->enqed = enqd;
- ZIP_PMD_LOG(DEBUG, "ops_enqd[nb_ops:%d]:%d\n", nb_ops, enqd);
+ ZIP_PMD_LOG(DEBUG, "ops_enqd[nb_ops:%d]:%d", nb_ops, enqd);
return enqd;
}
@@ -563,7 +563,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->status = RTE_COMP_OP_STATUS_SUCCESS;
} else {
/* FATAL error cannot do anything */
- ZIP_PMD_ERR("operation failed with error code:%d\n",
+ ZIP_PMD_ERR("operation failed with error code:%d",
zresult->s.compcode);
if (zresult->s.compcode == ZIP_COMP_E_DSTOP)
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
@@ -571,7 +571,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->status = RTE_COMP_OP_STATUS_ERROR;
}
- ZIP_PMD_LOG(DEBUG, "written %d\n", zresult->s.totalbyteswritten);
+ ZIP_PMD_LOG(DEBUG, "written %d", zresult->s.totalbyteswritten);
/* Update op stats */
switch (op->status) {
@@ -582,7 +582,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->produced = zresult->s.totalbyteswritten;
break;
default:
- ZIP_PMD_ERR("stats not updated for status:%d\n",
+ ZIP_PMD_ERR("stats not updated for status:%d",
op->status);
break;
}
@@ -598,7 +598,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
rte_mempool_put(qp->vf->sg_mp, qp->s_info);
}
- ZIP_PMD_LOG(DEBUG, "ops_deqd[nb_ops:%d]: %d\n", nb_ops, nb_dequeued);
+ ZIP_PMD_LOG(DEBUG, "ops_deqd[nb_ops:%d]: %d", nb_ops, nb_dequeued);
return nb_dequeued;
}
@@ -676,7 +676,7 @@ zip_pci_remove(struct rte_pci_device *pci_dev)
char compressdev_name[RTE_COMPRESSDEV_NAME_MAX_LEN];
if (pci_dev == NULL) {
- ZIP_PMD_ERR(" Invalid PCI Device\n");
+ ZIP_PMD_ERR(" Invalid PCI Device");
return -EINVAL;
}
rte_pci_device_name(&pci_dev->addr, compressdev_name,
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 98abd41013..92e808e78c 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -29,13 +29,13 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
break;
default:
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid flush value\n");
+ ZLIB_PMD_ERR("Invalid flush value");
return;
}
if (unlikely(!strm)) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid z_stream\n");
+ ZLIB_PMD_ERR("Invalid z_stream");
return;
}
/* Update z_stream with the inputs provided by application */
@@ -98,7 +98,7 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
op->produced += strm->total_out;
break;
default:
- ZLIB_PMD_ERR("stats not updated for status:%d\n",
+ ZLIB_PMD_ERR("stats not updated for status:%d",
op->status);
}
@@ -114,7 +114,7 @@ process_zlib_inflate(struct rte_comp_op *op, z_stream *strm)
if (unlikely(!strm)) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid z_stream\n");
+ ZLIB_PMD_ERR("Invalid z_stream");
return;
}
strm->next_in = rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *,
@@ -184,7 +184,7 @@ process_zlib_inflate(struct rte_comp_op *op, z_stream *strm)
op->produced += strm->total_out;
break;
default:
- ZLIB_PMD_ERR("stats not produced for status:%d\n",
+ ZLIB_PMD_ERR("stats not produced for status:%d",
op->status);
}
@@ -203,7 +203,7 @@ process_zlib_op(struct zlib_qp *qp, struct rte_comp_op *op)
(op->dst.offset > rte_pktmbuf_data_len(op->m_dst))) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
ZLIB_PMD_ERR("Invalid source or destination buffers or "
- "invalid Operation requested\n");
+ "invalid Operation requested");
} else {
private_xform = (struct zlib_priv_xform *)op->private_xform;
stream = &private_xform->stream;
@@ -238,7 +238,7 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
wbits = -(xform->compress.window_size);
break;
default:
- ZLIB_PMD_ERR("Compression algorithm not supported\n");
+ ZLIB_PMD_ERR("Compression algorithm not supported");
return -1;
}
/** Compression Level */
@@ -260,7 +260,7 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
if (level < RTE_COMP_LEVEL_MIN ||
level > RTE_COMP_LEVEL_MAX) {
ZLIB_PMD_ERR("Compression level %d "
- "not supported\n",
+ "not supported",
level);
return -1;
}
@@ -278,13 +278,13 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
strategy = Z_DEFAULT_STRATEGY;
break;
default:
- ZLIB_PMD_ERR("Compression strategy not supported\n");
+ ZLIB_PMD_ERR("Compression strategy not supported");
return -1;
}
if (deflateInit2(strm, level,
Z_DEFLATED, wbits,
DEF_MEM_LEVEL, strategy) != Z_OK) {
- ZLIB_PMD_ERR("Deflate init failed\n");
+ ZLIB_PMD_ERR("Deflate init failed");
return -1;
}
break;
@@ -298,12 +298,12 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
wbits = -(xform->decompress.window_size);
break;
default:
- ZLIB_PMD_ERR("Compression algorithm not supported\n");
+ ZLIB_PMD_ERR("Compression algorithm not supported");
return -1;
}
if (inflateInit2(strm, wbits) != Z_OK) {
- ZLIB_PMD_ERR("Inflate init failed\n");
+ ZLIB_PMD_ERR("Inflate init failed");
return -1;
}
break;
@@ -395,7 +395,7 @@ zlib_probe(struct rte_vdev_device *vdev)
retval = rte_compressdev_pmd_parse_input_args(&init_params, input_args);
if (retval < 0) {
ZLIB_PMD_LOG(ERR,
- "Failed to parse initialisation arguments[%s]\n",
+ "Failed to parse initialisation arguments[%s]",
input_args);
return -EINVAL;
}
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 445a3baa67..a530d15119 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -48,8 +48,8 @@ zlib_pmd_config(struct rte_compressdev *dev,
NULL, config->socket_id,
0);
if (mp == NULL) {
- ZLIB_PMD_ERR("Cannot create private xform pool on "
- "socket %d\n", config->socket_id);
+ ZLIB_PMD_ERR("Cannot create private xform pool on socket %d",
+ config->socket_id);
return -ENOMEM;
}
internals->mp = mp;
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index d1ede5e990..59e39a6c14 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -142,7 +142,7 @@ bcmfs_queue_create(struct bcmfs_queue *queue,
if (bcmfs_qp_check_queue_alignment(qp_mz->iova, align)) {
BCMFS_LOG(ERR, "Invalid alignment on queue create "
- " 0x%" PRIx64 "\n",
+ " 0x%" PRIx64,
queue->base_phys_addr);
ret = -EFAULT;
goto queue_create_err;
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index 78272d616c..d3b1e25d57 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -217,7 +217,7 @@ bcmfs_sym_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
bcmfs_private->fsdev->qps_in_use[qp_id] = *qp_addr;
cdev->data->queue_pairs[qp_id] = qp;
- BCMFS_LOG(NOTICE, "queue %d setup done\n", qp_id);
+ BCMFS_LOG(NOTICE, "queue %d setup done", qp_id);
return 0;
}
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.c b/drivers/crypto/bcmfs/bcmfs_sym_session.c
index 40813d1fe5..64bd4a317a 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.c
@@ -192,7 +192,7 @@ crypto_set_session_parameters(struct bcmfs_sym_session *sess,
rc = -EINVAL;
break;
default:
- BCMFS_DP_LOG(ERR, "Invalid chain order\n");
+ BCMFS_DP_LOG(ERR, "Invalid chain order");
rc = -EINVAL;
break;
}
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 6ed7a8f41c..27cdbf5ed4 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -309,7 +309,7 @@ caam_jr_prep_cdb(struct caam_jr_session *ses)
cdb = caam_jr_dma_mem_alloc(L1_CACHE_BYTES, sizeof(struct sec_cdb));
if (!cdb) {
- CAAM_JR_ERR("failed to allocate memory for cdb\n");
+ CAAM_JR_ERR("failed to allocate memory for cdb");
return -1;
}
@@ -606,7 +606,7 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring,
/*TODO for multiple ops, packets*/
ctx = container_of(current_desc, struct caam_jr_op_ctx, jobdes);
if (unlikely(sec_error_code)) {
- CAAM_JR_ERR("desc at cidx %d generated error 0x%x\n",
+ CAAM_JR_ERR("desc at cidx %d generated error 0x%x",
job_ring->cidx, sec_error_code);
hw_handle_job_ring_error(job_ring, sec_error_code);
//todo improve with exact errors
@@ -1368,7 +1368,7 @@ caam_jr_enqueue_op(struct rte_crypto_op *op, struct caam_jr_qp *qp)
}
if (unlikely(!ses->qp || ses->qp != qp)) {
- CAAM_JR_DP_DEBUG("Old:sess->qp=%p New qp = %p\n", ses->qp, qp);
+ CAAM_JR_DP_DEBUG("Old:sess->qp=%p New qp = %p", ses->qp, qp);
ses->qp = qp;
caam_jr_prep_cdb(ses);
}
@@ -1554,7 +1554,7 @@ caam_jr_cipher_init(struct rte_cryptodev *dev __rte_unused,
session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length,
RTE_CACHE_LINE_SIZE);
if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) {
- CAAM_JR_ERR("No Memory for cipher key\n");
+ CAAM_JR_ERR("No Memory for cipher key");
return -ENOMEM;
}
session->cipher_key.length = xform->cipher.key.length;
@@ -1576,7 +1576,7 @@ caam_jr_auth_init(struct rte_cryptodev *dev __rte_unused,
session->auth_key.data = rte_zmalloc(NULL, xform->auth.key.length,
RTE_CACHE_LINE_SIZE);
if (session->auth_key.data == NULL && xform->auth.key.length > 0) {
- CAAM_JR_ERR("No Memory for auth key\n");
+ CAAM_JR_ERR("No Memory for auth key");
return -ENOMEM;
}
session->auth_key.length = xform->auth.key.length;
@@ -1602,7 +1602,7 @@ caam_jr_aead_init(struct rte_cryptodev *dev __rte_unused,
session->aead_key.data = rte_zmalloc(NULL, xform->aead.key.length,
RTE_CACHE_LINE_SIZE);
if (session->aead_key.data == NULL && xform->aead.key.length > 0) {
- CAAM_JR_ERR("No Memory for aead key\n");
+ CAAM_JR_ERR("No Memory for aead key");
return -ENOMEM;
}
session->aead_key.length = xform->aead.key.length;
@@ -1755,7 +1755,7 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
RTE_CACHE_LINE_SIZE);
if (session->cipher_key.data == NULL &&
cipher_xform->key.length > 0) {
- CAAM_JR_ERR("No Memory for cipher key\n");
+ CAAM_JR_ERR("No Memory for cipher key");
return -ENOMEM;
}
@@ -1765,7 +1765,7 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
RTE_CACHE_LINE_SIZE);
if (session->auth_key.data == NULL &&
auth_xform->key.length > 0) {
- CAAM_JR_ERR("No Memory for auth key\n");
+ CAAM_JR_ERR("No Memory for auth key");
rte_free(session->cipher_key.data);
return -ENOMEM;
}
@@ -1810,11 +1810,11 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
case RTE_CRYPTO_AUTH_KASUMI_F9:
case RTE_CRYPTO_AUTH_AES_CBC_MAC:
case RTE_CRYPTO_AUTH_ZUC_EIA3:
- CAAM_JR_ERR("Crypto: Unsupported auth alg %u\n",
+ CAAM_JR_ERR("Crypto: Unsupported auth alg %u",
auth_xform->algo);
goto out;
default:
- CAAM_JR_ERR("Crypto: Undefined Auth specified %u\n",
+ CAAM_JR_ERR("Crypto: Undefined Auth specified %u",
auth_xform->algo);
goto out;
}
@@ -1834,11 +1834,11 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
case RTE_CRYPTO_CIPHER_3DES_ECB:
case RTE_CRYPTO_CIPHER_AES_ECB:
case RTE_CRYPTO_CIPHER_KASUMI_F8:
- CAAM_JR_ERR("Crypto: Unsupported Cipher alg %u\n",
+ CAAM_JR_ERR("Crypto: Unsupported Cipher alg %u",
cipher_xform->algo);
goto out;
default:
- CAAM_JR_ERR("Crypto: Undefined Cipher specified %u\n",
+ CAAM_JR_ERR("Crypto: Undefined Cipher specified %u",
cipher_xform->algo);
goto out;
}
@@ -1962,7 +1962,7 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
NULL, NULL, NULL, NULL,
SOCKET_ID_ANY, 0);
if (!internals->ctx_pool) {
- CAAM_JR_ERR("%s create failed\n", str);
+ CAAM_JR_ERR("%s create failed", str);
return -ENOMEM;
}
} else
@@ -2180,7 +2180,7 @@ init_job_ring(void *reg_base_addr, int irq_id)
}
}
if (job_ring == NULL) {
- CAAM_JR_ERR("No free job ring\n");
+ CAAM_JR_ERR("No free job ring");
return NULL;
}
@@ -2301,7 +2301,7 @@ caam_jr_dev_init(const char *name,
job_ring->uio_fd);
if (!dev->data->dev_private) {
- CAAM_JR_ERR("Ring memory allocation failed\n");
+ CAAM_JR_ERR("Ring memory allocation failed");
goto cleanup2;
}
@@ -2334,7 +2334,7 @@ caam_jr_dev_init(const char *name,
security_instance = rte_malloc("caam_jr",
sizeof(struct rte_security_ctx), 0);
if (security_instance == NULL) {
- CAAM_JR_ERR("memory allocation failed\n");
+ CAAM_JR_ERR("memory allocation failed");
//todo error handling.
goto cleanup2;
}
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index 0dcf971a15..8956f7750d 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -338,7 +338,7 @@ free_job_ring(int uio_fd)
}
if (job_ring == NULL) {
- CAAM_JR_ERR("JR not available for fd = %x\n", uio_fd);
+ CAAM_JR_ERR("JR not available for fd = %x", uio_fd);
return;
}
@@ -378,7 +378,7 @@ uio_job_ring *config_job_ring(void)
}
if (job_ring == NULL) {
- CAAM_JR_ERR("No free job ring\n");
+ CAAM_JR_ERR("No free job ring");
return NULL;
}
@@ -441,7 +441,7 @@ sec_configure(void)
dir->d_name, "name", uio_name);
CAAM_JR_INFO("sec device uio name: %s", uio_name);
if (ret != 0) {
- CAAM_JR_ERR("file_read_first_line failed\n");
+ CAAM_JR_ERR("file_read_first_line failed");
closedir(d);
return -1;
}
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 0c800fc350..5088d8ded6 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -362,7 +362,7 @@ ccp_find_lsb_regions(struct ccp_queue *cmd_q, uint64_t status)
if (ccp_get_bit(&cmd_q->lsbmask, j))
weight++;
- CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu\n",
+ CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu",
(int)cmd_q->id, weight, cmd_q->lsbmask);
return weight ? 0 : -EINVAL;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ca99bc6f42..700e141667 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -227,7 +227,7 @@ cryptodev_ccp_create(const char *name,
}
cryptodev_cnt++;
- CCP_LOG_DBG("CCP : Crypto device count = %d\n", cryptodev_cnt);
+ CCP_LOG_DBG("CCP : Crypto device count = %d", cryptodev_cnt);
dev->device = &pci_dev->device;
dev->device->driver = &pci_drv->driver;
dev->driver_id = ccp_cryptodev_driver_id;
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index dbd36a8a54..32415e815e 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1953,7 +1953,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
sess->cpt_op |= ROC_SE_OP_CIPHER_DECRYPT;
sess->cpt_op |= ROC_SE_OP_AUTH_VERIFY;
} else {
- plt_dp_err("Unknown aead operation\n");
+ plt_dp_err("Unknown aead operation");
return -1;
}
switch (aead_form->algo) {
@@ -2037,7 +2037,7 @@ fill_sm_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *ses
sess->cpt_op |= ROC_SE_OP_CIPHER_DECRYPT;
sess->roc_se_ctx.template_w4.s.opcode_minor = ROC_SE_FC_MINOR_OP_DECRYPT;
} else {
- plt_dp_err("Unknown cipher operation\n");
+ plt_dp_err("Unknown cipher operation");
return -1;
}
@@ -2114,7 +2114,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
ROC_SE_FC_MINOR_OP_HMAC_FIRST;
}
} else {
- plt_dp_err("Unknown cipher operation\n");
+ plt_dp_err("Unknown cipher operation");
return -1;
}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c1f7181d55..99b6359e52 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1146,7 +1146,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d"
- " data_off: 0x%x\n",
+ " data_off: 0x%x",
data_offset,
data_len,
sess->iv.length,
@@ -1172,7 +1172,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SET_FLE_FIN(sge);
DPAA2_SEC_DP_DEBUG(
- "CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d\n",
+ "CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -1212,7 +1212,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER SG: fdaddr =%" PRIx64 " bpid =%d meta =%d"
- " off =%d, len =%d\n",
+ " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_BPID(fd),
rte_dpaa2_bpid_info[bpid].meta_data_size,
@@ -1292,7 +1292,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER: cipher_off: 0x%x/length %d, ivlen=%d,"
- " data_off: 0x%x\n",
+ " data_off: 0x%x",
data_offset,
data_len,
sess->iv.length,
@@ -1303,7 +1303,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
fle->length = data_len + sess->iv.length;
DPAA2_SEC_DP_DEBUG(
- "CIPHER: 1 - flc = %p, fle = %p FLEaddr = %x-%x, length %d\n",
+ "CIPHER: 1 - flc = %p, fle = %p FLEaddr = %x-%x, length %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -1326,7 +1326,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER: fdaddr =%" PRIx64 " bpid =%d meta =%d"
- " off =%d, len =%d\n",
+ " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_BPID(fd),
rte_dpaa2_bpid_info[bpid].meta_data_size,
@@ -1348,12 +1348,12 @@ build_sec_fd(struct rte_crypto_op *op,
} else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
sess = SECURITY_GET_SESS_PRIV(op->sym->session);
} else {
- DPAA2_SEC_DP_ERR("Session type invalid\n");
+ DPAA2_SEC_DP_ERR("Session type invalid");
return -ENOTSUP;
}
if (!sess) {
- DPAA2_SEC_DP_ERR("Session not available\n");
+ DPAA2_SEC_DP_ERR("Session not available");
return -EINVAL;
}
@@ -1447,7 +1447,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1476,7 +1476,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
bpid = mempool_to_bpid(mb_pool);
ret = build_sec_fd(*ops, &fd_arr[loop], bpid, dpaa2_qp);
if (ret) {
- DPAA2_SEC_DP_DEBUG("FD build failed\n");
+ DPAA2_SEC_DP_DEBUG("FD build failed");
goto skip_tx;
}
ops++;
@@ -1494,7 +1494,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
num_tx += loop;
nb_ops -= loop;
- DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
+ DPAA2_SEC_DP_DEBUG("Enqueue fail");
/* freeing the fle buffers */
while (loop < frames_to_send) {
free_fle(&fd_arr[loop],
@@ -1570,7 +1570,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)
fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
- DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x\n",
+ DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x",
fle->addr_hi, fle->addr_lo, fle->fin_bpid_offset);
/* we are using the first FLE entry to store Mbuf.
@@ -1603,7 +1603,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)
}
DPAA2_SEC_DP_DEBUG("mbuf %p BMAN buf addr %p,"
- " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d\n",
+ " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d",
(void *)dst,
dst->buf_addr,
DPAA2_GET_FD_ADDR(fd),
@@ -1825,7 +1825,7 @@ dpaa2_sec_enqueue_burst_ordered(void *qp, struct rte_crypto_op **ops,
bpid = mempool_to_bpid(mb_pool);
ret = build_sec_fd(*ops, &fd_arr[loop], bpid, dpaa2_qp);
if (ret) {
- DPAA2_SEC_DP_DEBUG("FD build failed\n");
+ DPAA2_SEC_DP_DEBUG("FD build failed");
goto skip_tx;
}
ops++;
@@ -1842,7 +1842,7 @@ dpaa2_sec_enqueue_burst_ordered(void *qp, struct rte_crypto_op **ops,
if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
num_tx += loop;
nb_ops -= loop;
- DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
+ DPAA2_SEC_DP_DEBUG("Enqueue fail");
/* freeing the fle buffers */
while (loop < frames_to_send) {
free_fle(&fd_arr[loop],
@@ -1885,7 +1885,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1938,7 +1938,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely(
(status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_SEC_DP_DEBUG("No frame is delivered\n");
+ DPAA2_SEC_DP_DEBUG("No frame is delivered");
continue;
}
}
@@ -1949,7 +1949,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
if (unlikely(fd->simple.frc)) {
/* TODO Parse SEC errors */
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_NO_DUMP) {
- DPAA2_SEC_DP_ERR("SEC returned Error - %x\n",
+ DPAA2_SEC_DP_ERR("SEC returned Error - %x",
fd->simple.frc);
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_ERR_DUMP)
dpaa2_sec_dump(ops[num_rx], stdout);
@@ -1967,7 +1967,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
dpaa2_qp->rx_vq.rx_pkts += num_rx;
- DPAA2_SEC_DP_DEBUG("SEC RX pkts %d err pkts %" PRIu64 "\n", num_rx,
+ DPAA2_SEC_DP_DEBUG("SEC RX pkts %d err pkts %" PRIu64, num_rx,
dpaa2_qp->rx_vq.err_pkts);
/*Return the total number of packets received to DPAA2 app*/
return num_rx;
@@ -2017,7 +2017,7 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
if (qp_conf->nb_descriptors < (2 * FLE_POOL_CACHE_SIZE)) {
DPAA2_SEC_ERR("Minimum supported nb_descriptors %d,"
- " but given %d\n", (2 * FLE_POOL_CACHE_SIZE),
+ " but given %d", (2 * FLE_POOL_CACHE_SIZE),
qp_conf->nb_descriptors);
return -EINVAL;
}
@@ -2544,7 +2544,7 @@ dpaa2_sec_aead_init(struct rte_crypto_sym_xform *xform,
#ifdef CAAM_DESC_DEBUG
int i;
for (i = 0; i < bufsize; i++)
- DPAA2_SEC_DEBUG("DESC[%d]:0x%x\n",
+ DPAA2_SEC_DEBUG("DESC[%d]:0x%x",
i, priv->flc_desc[0].desc[i]);
#endif
return ret;
@@ -4254,7 +4254,7 @@ check_devargs_handler(const char *key, const char *value,
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_FULL_DUMP) {
DPAA2_SEC_WARN("WARN: DPAA2_SEC_DP_DUMP_LEVEL is not "
"supported, changing to FULL error"
- " prints\n");
+ " prints");
dpaa2_sec_dp_dump = DPAA2_SEC_DP_FULL_DUMP;
}
} else
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
index 4754b9d6f8..883584a6e2 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
@@ -605,7 +605,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
flc = &priv->flc_desc[0].flc;
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d\n",
+ "RAW CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d",
data_offset,
data_len,
sess->iv.length);
@@ -642,7 +642,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
DPAA2_SET_FLE_FIN(sge);
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d\n",
+ "RAW CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -678,7 +678,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: fdaddr =%" PRIx64 " off =%d, len =%d\n",
+ "RAW CIPHER SG: fdaddr =%" PRIx64 " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_OFFSET(fd),
DPAA2_GET_FD_LEN(fd));
@@ -721,7 +721,7 @@ dpaa2_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -811,7 +811,7 @@ sec_fd_to_userdata(const struct qbman_fd *fd)
void *userdata;
fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
- DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x\n",
+ DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x",
fle->addr_hi, fle->addr_lo, fle->fin_bpid_offset);
userdata = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));
/* free the fle memory */
@@ -847,7 +847,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -900,7 +900,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely(
(status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_SEC_DP_DEBUG("No frame is delivered\n");
+ DPAA2_SEC_DP_DEBUG("No frame is delivered");
continue;
}
}
@@ -929,7 +929,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
*dequeue_status = 1;
*n_success = num_rx;
- DPAA2_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA2_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
/*Return the total number of packets received to DPAA2 app*/
return num_rx;
}
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 1ddad6944e..225bf950e9 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -102,7 +102,7 @@ ern_sec_fq_handler(struct qman_portal *qm __rte_unused,
struct qman_fq *fq,
const struct qm_mr_entry *msg)
{
- DPAA_SEC_DP_ERR("sec fq %d error, RC = %x, seqnum = %x\n",
+ DPAA_SEC_DP_ERR("sec fq %d error, RC = %x, seqnum = %x",
fq->fqid, msg->ern.rc, msg->ern.seqnum);
}
@@ -851,7 +851,7 @@ dpaa_sec_deq(struct dpaa_sec_qp *qp, struct rte_crypto_op **ops, int nb_ops)
op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
} else {
if (dpaa_sec_dp_dump > DPAA_SEC_DP_NO_DUMP) {
- DPAA_SEC_DP_WARN("SEC return err:0x%x\n",
+ DPAA_SEC_DP_WARN("SEC return err:0x%x",
ctx->fd_status);
if (dpaa_sec_dp_dump > DPAA_SEC_DP_ERR_DUMP)
dpaa_sec_dump(ctx, qp, stdout);
@@ -1946,7 +1946,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
} else if (unlikely(ses->qp[rte_lcore_id() %
MAX_DPAA_CORES] != qp)) {
DPAA_SEC_DP_ERR("Old:sess->qp = %p"
- " New qp = %p\n",
+ " New qp = %p",
ses->qp[rte_lcore_id() %
MAX_DPAA_CORES], qp);
frames_to_send = loop;
@@ -2056,7 +2056,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
fd->cmd = 0x80000000 |
*((uint32_t *)((uint8_t *)op +
ses->pdcp.hfn_ovd_offset));
- DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u\n",
+ DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u",
*((uint32_t *)((uint8_t *)op +
ses->pdcp.hfn_ovd_offset)),
ses->pdcp.hfn_ovd);
@@ -2097,7 +2097,7 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
dpaa_qp->rx_pkts += num_rx;
dpaa_qp->rx_errs += nb_ops - num_rx;
- DPAA_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
return num_rx;
}
@@ -2160,7 +2160,7 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
NULL, NULL, NULL, NULL,
SOCKET_ID_ANY, 0);
if (!qp->ctx_pool) {
- DPAA_SEC_ERR("%s create failed\n", str);
+ DPAA_SEC_ERR("%s create failed", str);
return -ENOMEM;
}
} else
@@ -2466,7 +2466,7 @@ dpaa_sec_aead_init(struct rte_cryptodev *dev __rte_unused,
session->aead_key.data = rte_zmalloc(NULL, xform->aead.key.length,
RTE_CACHE_LINE_SIZE);
if (session->aead_key.data == NULL && xform->aead.key.length > 0) {
- DPAA_SEC_ERR("No Memory for aead key\n");
+ DPAA_SEC_ERR("No Memory for aead key");
return -ENOMEM;
}
session->aead_key.length = xform->aead.key.length;
@@ -2517,9 +2517,8 @@ dpaa_sec_detach_rxq(struct dpaa_sec_dev_private *qi, struct qman_fq *fq)
if (&qi->inq[i] == fq) {
ret = qman_retire_fq(fq, NULL);
if (ret != 0)
- DPAA_SEC_ERR("Queue %d is not retired"
- " err: %d\n", fq->fqid,
- ret);
+ DPAA_SEC_ERR("Queue %d is not retired err: %d",
+ fq->fqid, ret);
qman_oos_fq(fq);
qi->inq_attach[i] = 0;
return 0;
@@ -3475,7 +3474,7 @@ dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
qp->outq.cb.dqrr_dpdk_cb = dpaa_sec_process_atomic_event;
break;
case RTE_SCHED_TYPE_ORDERED:
- DPAA_SEC_ERR("Ordered queue schedule type is not supported\n");
+ DPAA_SEC_ERR("Ordered queue schedule type is not supported");
return -ENOTSUP;
default:
opts.fqd.fq_ctrl |= QM_FQCTRL_AVOIDBLOCK;
@@ -3574,7 +3573,7 @@ check_devargs_handler(__rte_unused const char *key, const char *value,
dpaa_sec_dp_dump = atoi(value);
if (dpaa_sec_dp_dump > DPAA_SEC_DP_FULL_DUMP) {
DPAA_SEC_WARN("WARN: DPAA_SEC_DP_DUMP_LEVEL is not "
- "supported, changing to FULL error prints\n");
+ "supported, changing to FULL error prints");
dpaa_sec_dp_dump = DPAA_SEC_DP_FULL_DUMP;
}
@@ -3637,7 +3636,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
ret = munmap(internals->sec_hw, MAP_SIZE);
if (ret)
- DPAA_SEC_WARN("munmap failed\n");
+ DPAA_SEC_WARN("munmap failed");
close(map_fd);
cryptodev->driver_id = dpaa_cryptodev_driver_id;
@@ -3705,7 +3704,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
return 0;
init_error:
- DPAA_SEC_ERR("driver %s: create failed\n", cryptodev->data->name);
+ DPAA_SEC_ERR("driver %s: create failed", cryptodev->data->name);
rte_free(cryptodev->security_ctx);
return -EFAULT;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
index f8c85b6528..60dbaee4ec 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
@@ -30,7 +30,7 @@ extern int dpaa_logtype_sec;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA_SEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_SEC, fmt, ## args)
+ RTE_LOG_DP_LINE(level, DPAA_SEC, fmt, ## args)
#define DPAA_SEC_DP_DEBUG(fmt, args...) \
DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
index ce49c4996f..f62c803894 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
@@ -761,7 +761,7 @@ build_dpaa_raw_proto_sg(uint8_t *drv_ctx,
fd->cmd = 0x80000000 |
*((uint32_t *)((uint8_t *)userdata +
ses->pdcp.hfn_ovd_offset));
- DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u\n",
+ DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u",
*((uint32_t *)((uint8_t *)userdata +
ses->pdcp.hfn_ovd_offset)),
ses->pdcp.hfn_ovd);
@@ -806,7 +806,7 @@ dpaa_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx,
} else if (unlikely(ses->qp[rte_lcore_id() %
MAX_DPAA_CORES] != dpaa_qp)) {
DPAA_SEC_DP_ERR("Old:sess->qp = %p"
- " New qp = %p\n",
+ " New qp = %p",
ses->qp[rte_lcore_id() %
MAX_DPAA_CORES], dpaa_qp);
frames_to_send = loop;
@@ -955,7 +955,7 @@ dpaa_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
*dequeue_status = 1;
*n_success = num_rx;
- DPAA_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
return num_rx;
}
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.c b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
index f485d130b6..0d2538832d 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
@@ -165,7 +165,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
rte_cryptodev_pmd_probing_finish(dev);
- IPSEC_MB_LOG(INFO, "IPSec Multi-buffer library version used: %s\n",
+ IPSEC_MB_LOG(INFO, "IPSec Multi-buffer library version used: %s",
imb_get_version_str());
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
@@ -176,7 +176,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
if (retval)
IPSEC_MB_LOG(ERR,
- "IPSec Multi-buffer register MP request failed.\n");
+ "IPSec Multi-buffer register MP request failed.");
}
return retval;
}
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index be6dbe9b1b..d42acd913c 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -198,7 +198,7 @@ alloc_init_mb_mgr(void)
IMB_MGR *mb_mgr = alloc_mb_mgr(0);
if (unlikely(mb_mgr == NULL)) {
- IPSEC_MB_LOG(ERR, "Failed to allocate IMB_MGR data\n");
+ IPSEC_MB_LOG(ERR, "Failed to allocate IMB_MGR data");
return NULL;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index ef4228bd38..f3633091a9 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -113,7 +113,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
uint16_t xcbc_mac_digest_len =
get_truncated_digest_byte_length(IMB_AUTH_AES_XCBC);
if (sess->auth.req_digest_len != xcbc_mac_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -136,7 +136,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
get_digest_byte_length(IMB_AUTH_AES_CMAC);
if (sess->auth.req_digest_len > cmac_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
/*
@@ -171,7 +171,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len >
get_digest_byte_length(IMB_AUTH_AES_GMAC)) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -198,7 +198,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
sess->template_job.key_len_in_bytes = IMB_KEY_256_BYTES;
break;
default:
- IPSEC_MB_LOG(ERR, "Invalid authentication key length\n");
+ IPSEC_MB_LOG(ERR, "Invalid authentication key length");
return -EINVAL;
}
sess->template_job.u.GMAC._key = &sess->cipher.gcm_key;
@@ -211,7 +211,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
sess->template_job.hash_alg = IMB_AUTH_ZUC_EIA3_BITLEN;
if (sess->auth.req_digest_len != 4) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
} else if (xform->auth.key.length == 32) {
@@ -223,11 +223,11 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
#else
if (sess->auth.req_digest_len != 4) {
#endif
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
} else {
- IPSEC_MB_LOG(ERR, "Invalid authentication key length\n");
+ IPSEC_MB_LOG(ERR, "Invalid authentication key length");
return -EINVAL;
}
@@ -243,7 +243,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
get_truncated_digest_byte_length(
IMB_AUTH_SNOW3G_UIA2_BITLEN);
if (sess->auth.req_digest_len != snow3g_uia2_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -258,7 +258,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
uint16_t kasumi_f9_digest_len =
get_truncated_digest_byte_length(IMB_AUTH_KASUMI_UIA1);
if (sess->auth.req_digest_len != kasumi_f9_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -389,7 +389,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len > full_digest_size ||
sess->auth.req_digest_len == 0) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
@@ -725,7 +725,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
(sess->auth.req_digest_len & 1) == 1) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -761,7 +761,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
/* GCM digest size must be between 1 and 16 */
if (sess->auth.req_digest_len == 0 ||
sess->auth.req_digest_len > 16) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -782,7 +782,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
sess->template_job.enc_keys = sess->cipher.expanded_aes_keys.encode;
sess->template_job.dec_keys = sess->cipher.expanded_aes_keys.decode;
if (sess->auth.req_digest_len != 16) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -1234,7 +1234,7 @@ handle_sgl_linear(IMB_JOB *job, struct rte_crypto_op *op, uint32_t dst_offset,
total_len = sgl_linear_cipher_auth_len(job, &auth_len);
linear_buf = rte_zmalloc(NULL, total_len + job->auth_tag_output_len_in_bytes, 0);
if (linear_buf == NULL) {
- IPSEC_MB_LOG(ERR, "Error allocating memory for SGL Linear Buffer\n");
+ IPSEC_MB_LOG(ERR, "Error allocating memory for SGL Linear Buffer");
return -1;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index a96779f059..65f0e5c568 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -186,7 +186,7 @@ process_snow3g_cipher_op_bit(struct ipsec_mb_qp *qp,
src = rte_pktmbuf_mtod(op->sym->m_src, uint8_t *);
if (op->sym->m_dst == NULL) {
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
- IPSEC_MB_LOG(ERR, "bit-level in-place not supported\n");
+ IPSEC_MB_LOG(ERR, "bit-level in-place not supported");
return 0;
}
length_in_bits = op->sym->cipher.data.length;
@@ -317,7 +317,7 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
IPSEC_MB_LOG(ERR,
"PMD supports only contiguous mbufs, "
"op (%p) provides noncontiguous mbuf as "
- "source/destination buffer.\n", ops[i]);
+ "source/destination buffer.", ops[i]);
ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return 0;
}
diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
index 6e2afde34f..3104e6d31e 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
+++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
@@ -211,7 +211,7 @@ otx_cpt_ring_dbell(struct cpt_instance *instance, uint16_t count)
static __rte_always_inline void *
get_cpt_inst(struct command_queue *cqueue)
{
- CPT_LOG_DP_DEBUG("CPT queue idx %u\n", cqueue->idx);
+ CPT_LOG_DP_DEBUG("CPT queue idx %u", cqueue->idx);
return &cqueue->qhead[cqueue->idx * CPT_INST_SIZE];
}
@@ -305,9 +305,9 @@ check_nb_command_id(struct cpt_request_info *user_req,
" error, MC completion code : 0x%x", user_req,
ret);
}
- CPT_LOG_DP_DEBUG("MC status %.8x\n",
+ CPT_LOG_DP_DEBUG("MC status %.8x",
*((volatile uint32_t *)user_req->alternate_caddr));
- CPT_LOG_DP_DEBUG("HW status %.8x\n",
+ CPT_LOG_DP_DEBUG("HW status %.8x",
*((volatile uint32_t *)user_req->completion_addr));
} else if ((cptres->s8x.compcode == CPT_8X_COMP_E_SWERR) ||
(cptres->s8x.compcode == CPT_8X_COMP_E_FAULT)) {
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 101111e85b..e10a172f46 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -57,13 +57,13 @@ static void ossl_legacy_provider_load(void)
/* Load Multiple providers into the default (NULL) library context */
legacy = OSSL_PROVIDER_load(NULL, "legacy");
if (legacy == NULL) {
- OPENSSL_LOG(ERR, "Failed to load Legacy provider\n");
+ OPENSSL_LOG(ERR, "Failed to load Legacy provider");
return;
}
deflt = OSSL_PROVIDER_load(NULL, "default");
if (deflt == NULL) {
- OPENSSL_LOG(ERR, "Failed to load Default provider\n");
+ OPENSSL_LOG(ERR, "Failed to load Default provider");
OSSL_PROVIDER_unload(legacy);
return;
}
@@ -2123,7 +2123,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
dsa_sign_data_p = (const unsigned char *)dsa_sign_data;
DSA_SIG *sign = d2i_DSA_SIG(NULL, &dsa_sign_data_p, outlen);
if (!sign) {
- OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, "%s:%d", __func__, __LINE__);
OPENSSL_free(dsa_sign_data);
goto err_dsa_sign;
} else {
@@ -2168,7 +2168,7 @@ process_openssl_dsa_verify_op_evp(struct rte_crypto_op *cop,
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
if (!param_bld) {
- OPENSSL_LOG(ERR, " %s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, " %s:%d", __func__, __LINE__);
return -1;
}
@@ -2246,7 +2246,7 @@ process_openssl_dsa_sign_op(struct rte_crypto_op *cop,
dsa);
if (sign == NULL) {
- OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, "%s:%d", __func__, __LINE__);
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
} else {
const BIGNUM *r = NULL, *s = NULL;
@@ -2275,7 +2275,7 @@ process_openssl_dsa_verify_op(struct rte_crypto_op *cop,
BIGNUM *pub_key = NULL;
if (sign == NULL) {
- OPENSSL_LOG(ERR, " %s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, " %s:%d", __func__, __LINE__);
cop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
return -1;
}
@@ -2352,7 +2352,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (!OSSL_PARAM_BLD_push_BN(param_bld_peer, OSSL_PKEY_PARAM_PUB_KEY,
pub_key)) {
- OPENSSL_LOG(ERR, "Failed to set public key\n");
+ OPENSSL_LOG(ERR, "Failed to set public key");
OSSL_PARAM_BLD_free(param_bld_peer);
BN_free(pub_key);
return ret;
@@ -2397,7 +2397,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (!OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
priv_key)) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
EVP_PKEY_CTX_free(peer_ctx);
OSSL_PARAM_free(params_peer);
BN_free(pub_key);
@@ -2423,7 +2423,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
goto err_dh;
if (op->ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) {
- OPENSSL_LOG(DEBUG, "%s:%d updated pub key\n", __func__, __LINE__);
+ OPENSSL_LOG(DEBUG, "%s:%d updated pub key", __func__, __LINE__);
if (!EVP_PKEY_get_bn_param(dhpkey, OSSL_PKEY_PARAM_PUB_KEY, &pub_key))
goto err_dh;
/* output public key */
@@ -2432,7 +2432,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (op->ke_type == RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE) {
- OPENSSL_LOG(DEBUG, "%s:%d updated priv key\n", __func__, __LINE__);
+ OPENSSL_LOG(DEBUG, "%s:%d updated priv key", __func__, __LINE__);
if (!EVP_PKEY_get_bn_param(dhpkey, OSSL_PKEY_PARAM_PRIV_KEY, &priv_key))
goto err_dh;
@@ -2527,7 +2527,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
}
ret = set_dh_priv_key(dh_key, priv_key);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
BN_free(peer_key);
BN_free(priv_key);
@@ -2574,7 +2574,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
}
ret = set_dh_priv_key(dh_key, priv_key);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
BN_free(priv_key);
return 0;
@@ -2596,7 +2596,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
if (asym_op->dh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) {
const BIGNUM *pub_key = NULL;
- OPENSSL_LOG(DEBUG, "%s:%d update public key\n",
+ OPENSSL_LOG(DEBUG, "%s:%d update public key",
__func__, __LINE__);
/* get the generated keys */
@@ -2610,7 +2610,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
if (asym_op->dh.ke_type == RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE) {
const BIGNUM *priv_key = NULL;
- OPENSSL_LOG(DEBUG, "%s:%d updated priv key\n",
+ OPENSSL_LOG(DEBUG, "%s:%d updated priv key",
__func__, __LINE__);
/* get the generated keys */
@@ -2719,7 +2719,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
default:
cop->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
OPENSSL_LOG(ERR,
- "rsa pad type not supported %d\n", pad);
+ "rsa pad type not supported %d", pad);
return ret;
}
@@ -2746,7 +2746,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
op->rsa.cipher.length = outlen;
OPENSSL_LOG(DEBUG,
- "length of encrypted text %zu\n", outlen);
+ "length of encrypted text %zu", outlen);
break;
case RTE_CRYPTO_ASYM_OP_DECRYPT:
@@ -2770,7 +2770,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
goto err_rsa;
op->rsa.message.length = outlen;
- OPENSSL_LOG(DEBUG, "length of decrypted text %zu\n", outlen);
+ OPENSSL_LOG(DEBUG, "length of decrypted text %zu", outlen);
break;
case RTE_CRYPTO_ASYM_OP_SIGN:
@@ -2825,7 +2825,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
OPENSSL_LOG(DEBUG,
"Length of public_decrypt %zu "
- "length of message %zd\n",
+ "length of message %zd",
outlen, op->rsa.message.length);
if (CRYPTO_memcmp(tmp, op->rsa.message.data,
op->rsa.message.length)) {
@@ -3097,7 +3097,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
default:
cop->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
OPENSSL_LOG(ERR,
- "rsa pad type not supported %d\n", pad);
+ "rsa pad type not supported %d", pad);
return 0;
}
@@ -3112,7 +3112,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
if (ret > 0)
op->rsa.cipher.length = ret;
OPENSSL_LOG(DEBUG,
- "length of encrypted text %d\n", ret);
+ "length of encrypted text %d", ret);
break;
case RTE_CRYPTO_ASYM_OP_DECRYPT:
@@ -3150,7 +3150,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
OPENSSL_LOG(DEBUG,
"Length of public_decrypt %d "
- "length of message %zd\n",
+ "length of message %zd",
ret, op->rsa.message.length);
if ((ret <= 0) || (CRYPTO_memcmp(tmp, op->rsa.message.data,
op->rsa.message.length))) {
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1bbb855a59..b7b612fc57 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -892,7 +892,7 @@ static int openssl_set_asym_session_parameters(
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
OSSL_PARAM_BLD * param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_rsa;
}
@@ -900,7 +900,7 @@ static int openssl_set_asym_session_parameters(
|| !OSSL_PARAM_BLD_push_BN(param_bld,
OSSL_PKEY_PARAM_RSA_E, e)) {
OSSL_PARAM_BLD_free(param_bld);
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_rsa;
}
@@ -1033,14 +1033,14 @@ static int openssl_set_asym_session_parameters(
ret = set_rsa_params(rsa, p, q);
if (ret) {
OPENSSL_LOG(ERR,
- "failed to set rsa params\n");
+ "failed to set rsa params");
RSA_free(rsa);
goto err_rsa;
}
ret = set_rsa_crt_params(rsa, dmp1, dmq1, iqmp);
if (ret) {
OPENSSL_LOG(ERR,
- "failed to set crt params\n");
+ "failed to set crt params");
RSA_free(rsa);
/*
* set already populated params to NULL
@@ -1053,7 +1053,7 @@ static int openssl_set_asym_session_parameters(
ret = set_rsa_keys(rsa, n, e, d);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to load rsa keys\n");
+ OPENSSL_LOG(ERR, "Failed to load rsa keys");
RSA_free(rsa);
return ret;
}
@@ -1080,7 +1080,7 @@ static int openssl_set_asym_session_parameters(
BN_CTX *ctx = BN_CTX_new();
if (ctx == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
return ret;
}
BN_CTX_start(ctx);
@@ -1111,7 +1111,7 @@ static int openssl_set_asym_session_parameters(
BN_CTX *ctx = BN_CTX_new();
if (ctx == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
return ret;
}
BN_CTX_start(ctx);
@@ -1152,7 +1152,7 @@ static int openssl_set_asym_session_parameters(
OSSL_PARAM_BLD *param_bld = NULL;
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dh;
}
if ((!OSSL_PARAM_BLD_push_utf8_string(param_bld,
@@ -1168,7 +1168,7 @@ static int openssl_set_asym_session_parameters(
OSSL_PARAM_BLD *param_bld_peer = NULL;
param_bld_peer = OSSL_PARAM_BLD_new();
if (!param_bld_peer) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
OSSL_PARAM_BLD_free(param_bld);
goto err_dh;
}
@@ -1203,7 +1203,7 @@ static int openssl_set_asym_session_parameters(
dh = DH_new();
if (dh == NULL) {
OPENSSL_LOG(ERR,
- "failed to allocate resources\n");
+ "failed to allocate resources");
goto err_dh;
}
ret = set_dh_params(dh, p, g);
@@ -1217,7 +1217,7 @@ static int openssl_set_asym_session_parameters(
break;
err_dh:
- OPENSSL_LOG(ERR, " failed to set dh params\n");
+ OPENSSL_LOG(ERR, " failed to set dh params");
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
BN_free(*p);
BN_free(*g);
@@ -1263,7 +1263,7 @@ static int openssl_set_asym_session_parameters(
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dsa;
}
@@ -1273,7 +1273,7 @@ static int openssl_set_asym_session_parameters(
|| !OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
*priv_key)) {
OSSL_PARAM_BLD_free(param_bld);
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dsa;
}
asym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_DSA;
@@ -1313,14 +1313,14 @@ static int openssl_set_asym_session_parameters(
DSA *dsa = DSA_new();
if (dsa == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
goto err_dsa;
}
ret = set_dsa_params(dsa, p, q, g);
if (ret) {
DSA_free(dsa);
- OPENSSL_LOG(ERR, "Failed to dsa params\n");
+ OPENSSL_LOG(ERR, "Failed to dsa params");
goto err_dsa;
}
@@ -1334,7 +1334,7 @@ static int openssl_set_asym_session_parameters(
ret = set_dsa_keys(dsa, pub_key, priv_key);
if (ret) {
DSA_free(dsa);
- OPENSSL_LOG(ERR, "Failed to set keys\n");
+ OPENSSL_LOG(ERR, "Failed to set keys");
goto err_dsa;
}
asym_session->u.s.dsa = dsa;
@@ -1369,21 +1369,21 @@ static int openssl_set_asym_session_parameters(
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate params\n");
+ OPENSSL_LOG(ERR, "failed to allocate params");
goto err_sm2;
}
ret = OSSL_PARAM_BLD_push_utf8_string(param_bld,
OSSL_ASYM_CIPHER_PARAM_DIGEST, "SM3", 0);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
ret = OSSL_PARAM_BLD_push_utf8_string(param_bld,
OSSL_PKEY_PARAM_GROUP_NAME, "SM2", 0);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
@@ -1393,7 +1393,7 @@ static int openssl_set_asym_session_parameters(
ret = OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
pkey_bn);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
@@ -1408,13 +1408,13 @@ static int openssl_set_asym_session_parameters(
ret = OSSL_PARAM_BLD_push_octet_string(param_bld,
OSSL_PKEY_PARAM_PUB_KEY, pubkey, len);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
params = OSSL_PARAM_BLD_to_param(param_bld);
if (!params) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 491f5ecd5b..e43884e69b 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -1531,7 +1531,7 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev)
snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
qat_pci_dev->name, "asym");
- QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
+ QAT_LOG(DEBUG, "Creating QAT ASYM device %s", name);
if (qat_pci_dev->qat_dev_gen == QAT_VQAT &&
sub_id != ADF_VQAT_ASYM_PCI_SUBSYSTEM_ID) {
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index eb267db424..50d687fd37 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -581,7 +581,7 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
ret = -ENOTSUP;
goto error_out;
default:
- QAT_LOG(ERR, "Crypto: Undefined Cipher specified %u\n",
+ QAT_LOG(ERR, "Crypto: Undefined Cipher specified %u",
cipher_xform->algo);
ret = -EINVAL;
goto error_out;
@@ -1180,7 +1180,7 @@ qat_sym_session_configure_aead(struct rte_cryptodev *dev,
aead_xform);
break;
default:
- QAT_LOG(ERR, "Crypto: Undefined AEAD specified %u\n",
+ QAT_LOG(ERR, "Crypto: Undefined AEAD specified %u",
aead_xform->algo);
return -EINVAL;
}
@@ -1805,7 +1805,7 @@ static int aes_ipsecmb_job(uint8_t *in, uint8_t *out, IMB_MGR *m,
err = imb_get_errno(m);
if (err)
- QAT_LOG(ERR, "Error: %s!\n", imb_get_strerror(err));
+ QAT_LOG(ERR, "Error: %s!", imb_get_strerror(err));
return -EFAULT;
}
@@ -2657,10 +2657,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
&state2_size, cdesc->aes_cmac);
#endif
if (ret) {
- cdesc->aes_cmac ? QAT_LOG(ERR,
- "(CMAC)precompute failed")
- : QAT_LOG(ERR,
- "(XCBC)precompute failed");
+ QAT_LOG(ERR, "(%s)precompute failed",
+ cdesc->aes_cmac ? "CMAC" : "XCBC");
return -EFAULT;
}
break;
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c
index 824383512e..e4b1a32398 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd.c
+++ b/drivers/crypto/uadk/uadk_crypto_pmd.c
@@ -634,7 +634,7 @@ uadk_set_session_cipher_parameters(struct rte_cryptodev *dev,
setup.sched_param = ¶ms;
sess->handle_cipher = wd_cipher_alloc_sess(&setup);
if (!sess->handle_cipher) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
ret = -EINVAL;
goto env_uninit;
}
@@ -642,7 +642,7 @@ uadk_set_session_cipher_parameters(struct rte_cryptodev *dev,
ret = wd_cipher_set_key(sess->handle_cipher, cipher->key.data, cipher->key.length);
if (ret) {
wd_cipher_free_sess(sess->handle_cipher);
- UADK_LOG(ERR, "uadk failed to set key!\n");
+ UADK_LOG(ERR, "uadk failed to set key!");
ret = -EINVAL;
goto env_uninit;
}
@@ -734,7 +734,7 @@ uadk_set_session_auth_parameters(struct rte_cryptodev *dev,
setup.sched_param = ¶ms;
sess->handle_digest = wd_digest_alloc_sess(&setup);
if (!sess->handle_digest) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
ret = -EINVAL;
goto env_uninit;
}
@@ -745,7 +745,7 @@ uadk_set_session_auth_parameters(struct rte_cryptodev *dev,
xform->auth.key.data,
xform->auth.key.length);
if (ret) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
wd_digest_free_sess(sess->handle_digest);
sess->handle_digest = 0;
ret = -EINVAL;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4854820ba6..c0d3178b71 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -591,7 +591,7 @@ virtio_crypto_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
qp_conf->nb_descriptors, socket_id, &vq);
if (ret < 0) {
VIRTIO_CRYPTO_INIT_LOG_ERR(
- "virtio crypto data queue initialization failed\n");
+ "virtio crypto data queue initialization failed");
return ret;
}
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index 10e65ef1d7..3d4fd818f8 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -295,7 +295,7 @@ static struct fsl_qdma_queue
for (i = 0; i < queue_num; i++) {
if (queue_size[i] > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX ||
queue_size[i] < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) {
- DPAA_QDMA_ERR("Get wrong queue-sizes.\n");
+ DPAA_QDMA_ERR("Get wrong queue-sizes.");
goto fail;
}
queue_temp = queue_head + i + (j * queue_num);
@@ -345,7 +345,7 @@ fsl_qdma_queue *fsl_qdma_prep_status_queue(void)
status_size = QDMA_STATUS_SIZE;
if (status_size > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX ||
status_size < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) {
- DPAA_QDMA_ERR("Get wrong status_size.\n");
+ DPAA_QDMA_ERR("Get wrong status_size.");
return NULL;
}
@@ -643,7 +643,7 @@ fsl_qdma_alloc_chan_resources(struct fsl_qdma_chan *fsl_chan)
FSL_QDMA_COMMAND_BUFFER_SIZE, 64);
if (ret) {
DPAA_QDMA_ERR(
- "failed to alloc dma buffer for comp descriptor\n");
+ "failed to alloc dma buffer for comp descriptor");
goto exit;
}
@@ -779,7 +779,7 @@ dpaa_qdma_enqueue(void *dev_private, uint16_t vchan,
(dma_addr_t)dst, (dma_addr_t)src,
length, NULL, NULL);
if (!fsl_comp) {
- DPAA_QDMA_DP_DEBUG("fsl_comp is NULL\n");
+ DPAA_QDMA_DP_DEBUG("fsl_comp is NULL");
return -1;
}
ret = fsl_qdma_enqueue_desc(fsl_chan, fsl_comp, flags);
@@ -803,19 +803,19 @@ dpaa_qdma_dequeue_status(void *dev_private, uint16_t vchan,
intr = qdma_readl_be(status + FSL_QDMA_DEDR);
if (intr) {
- DPAA_QDMA_ERR("DMA transaction error! %x\n", intr);
+ DPAA_QDMA_ERR("DMA transaction error! %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW0R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW1R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW2R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW3R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFQIDR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECBR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x", intr);
qdma_writel(0xffffffff,
status + FSL_QDMA_DEDR);
intr = qdma_readl(status + FSL_QDMA_DEDR);
@@ -849,19 +849,19 @@ dpaa_qdma_dequeue(void *dev_private,
intr = qdma_readl_be(status + FSL_QDMA_DEDR);
if (intr) {
- DPAA_QDMA_ERR("DMA transaction error! %x\n", intr);
+ DPAA_QDMA_ERR("DMA transaction error! %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW0R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW1R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW2R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW3R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFQIDR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECBR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x", intr);
qdma_writel(0xffffffff,
status + FSL_QDMA_DEDR);
intr = qdma_readl(status + FSL_QDMA_DEDR);
@@ -974,7 +974,7 @@ dpaa_qdma_init(struct rte_dma_dev *dmadev)
close(ccsr_qdma_fd);
if (fsl_qdma->ctrl_base == MAP_FAILED) {
DPAA_QDMA_ERR("Can not map CCSR base qdma: Phys: %08" PRIx64
- "size %d\n", phys_addr, regs_size);
+ "size %d", phys_addr, regs_size);
goto err;
}
@@ -998,7 +998,7 @@ dpaa_qdma_init(struct rte_dma_dev *dmadev)
ret = fsl_qdma_reg_init(fsl_qdma);
if (ret) {
- DPAA_QDMA_ERR("Can't Initialize the qDMA engine.\n");
+ DPAA_QDMA_ERR("Can't Initialize the qDMA engine.");
munmap(fsl_qdma->ctrl_base, regs_size);
goto err;
}
diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 2c91ceec13..5780e49297 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -578,7 +578,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -608,7 +608,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_QDMA_DP_WARN(
- "VDQ command not issued.QBMAN busy\n");
+ "VDQ command not issued.QBMAN busy");
/* Portal was busy, try again */
continue;
}
@@ -684,7 +684,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_QDMA_DP_WARN(
- "VDQ command is not issued. QBMAN is busy (2)\n");
+ "VDQ command is not issued. QBMAN is busy (2)");
continue;
}
break;
@@ -728,7 +728,7 @@ dpdmai_dev_dequeue_multijob_no_prefetch(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -825,7 +825,7 @@ dpdmai_dev_submit_multi(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 7cd6ebc1e0..bce4b4b277 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -357,7 +357,7 @@ hisi_dma_start(struct rte_dma_dev *dev)
struct hisi_dma_dev *hw = dev->data->dev_private;
if (hw->iomz == NULL) {
- HISI_DMA_ERR(hw, "Vchan was not setup, start fail!\n");
+ HISI_DMA_ERR(hw, "Vchan was not setup, start fail!");
return -EINVAL;
}
@@ -630,7 +630,7 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
* status array indexed by csq_head. Only error logs
* are used for prompting.
*/
- HISI_DMA_ERR(hw, "invalid csq_head:%u!\n", csq_head);
+ HISI_DMA_ERR(hw, "invalid csq_head:%u!", csq_head);
count = 0;
break;
}
@@ -912,7 +912,7 @@ hisi_dma_probe(struct rte_pci_driver *pci_drv __rte_unused,
rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
if (pci_dev->mem_resource[2].addr == NULL) {
- HISI_DMA_LOG(ERR, "%s BAR2 is NULL!\n", name);
+ HISI_DMA_LOG(ERR, "%s BAR2 is NULL!", name);
return -ENODEV;
}
diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index 83d53942eb..dc2e8cd432 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -616,7 +616,7 @@ idxd_dmadev_create(const char *name, struct rte_device *dev,
sizeof(idxd->batch_comp_ring[0])) * (idxd->max_batches + 1),
sizeof(idxd->batch_comp_ring[0]), dev->numa_node);
if (idxd->batch_comp_ring == NULL) {
- IDXD_PMD_ERR("Unable to reserve memory for batch data\n");
+ IDXD_PMD_ERR("Unable to reserve memory for batch data");
ret = -ENOMEM;
goto cleanup;
}
diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 81637d9420..60ac219559 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -324,7 +324,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
/* look up queue 0 to get the PCI structure */
snprintf(qname, sizeof(qname), "%s-q0", name);
- IDXD_PMD_INFO("Looking up %s\n", qname);
+ IDXD_PMD_INFO("Looking up %s", qname);
ret = idxd_dmadev_create(qname, &dev->device, NULL, &idxd_pci_ops);
if (ret != 0) {
IDXD_PMD_ERR("Failed to create dmadev %s", name);
@@ -339,7 +339,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
for (qid = 1; qid < max_qid; qid++) {
/* add the queue number to each device name */
snprintf(qname, sizeof(qname), "%s-q%d", name, qid);
- IDXD_PMD_INFO("Looking up %s\n", qname);
+ IDXD_PMD_INFO("Looking up %s", qname);
ret = idxd_dmadev_create(qname, &dev->device, NULL, &idxd_pci_ops);
if (ret != 0) {
IDXD_PMD_ERR("Failed to create dmadev %s", name);
@@ -365,7 +365,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
return ret;
}
if (idxd.u.pci->portals == NULL) {
- IDXD_PMD_ERR("Error, invalid portal assigned during initialization\n");
+ IDXD_PMD_ERR("Error, invalid portal assigned during initialization");
free(idxd.u.pci);
return -EINVAL;
}
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 5fc14bcf22..8b7ff5652f 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -156,12 +156,12 @@ ioat_dev_start(struct rte_dma_dev *dev)
ioat->offset = 0;
ioat->failure = 0;
- IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n",
+ IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]",
chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
ioat->status);
if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_HALTED) {
- IOAT_PMD_WARN("Device HALTED on start, attempting to recover\n");
+ IOAT_PMD_WARN("Device HALTED on start, attempting to recover");
if (__ioat_recover(ioat) != 0) {
IOAT_PMD_ERR("Device couldn't be recovered");
return -1;
@@ -469,7 +469,7 @@ ioat_completed(void *dev_private, uint16_t qid __rte_unused, const uint16_t max_
ioat->failure = ioat->regs->chanerr;
ioat->next_read = read + count + 1;
if (__ioat_recover(ioat) != 0) {
- IOAT_PMD_ERR("Device HALTED and could not be recovered\n");
+ IOAT_PMD_ERR("Device HALTED and could not be recovered");
__dev_dump(dev_private, stdout);
return 0;
}
@@ -515,7 +515,7 @@ ioat_completed_status(void *dev_private, uint16_t qid __rte_unused,
count++;
ioat->next_read = read + count;
if (__ioat_recover(ioat) != 0) {
- IOAT_PMD_ERR("Device HALTED and could not be recovered\n");
+ IOAT_PMD_ERR("Device HALTED and could not be recovered");
__dev_dump(dev_private, stdout);
return 0;
}
@@ -652,12 +652,12 @@ ioat_dmadev_create(const char *name, struct rte_pci_device *dev)
/* Do device initialization - reset and set error behaviour. */
if (ioat->regs->chancnt != 1)
- IOAT_PMD_WARN("%s: Channel count == %d\n", __func__,
+ IOAT_PMD_WARN("%s: Channel count == %d", __func__,
ioat->regs->chancnt);
/* Locked by someone else. */
if (ioat->regs->chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE) {
- IOAT_PMD_WARN("%s: Channel appears locked\n", __func__);
+ IOAT_PMD_WARN("%s: Channel appears locked", __func__);
ioat->regs->chanctrl = 0;
}
@@ -676,7 +676,7 @@ ioat_dmadev_create(const char *name, struct rte_pci_device *dev)
rte_delay_ms(1);
if (++retry >= 200) {
IOAT_PMD_ERR("%s: cannot reset device. CHANCMD=%#"PRIx8
- ", CHANSTS=%#"PRIx64", CHANERR=%#"PRIx32"\n",
+ ", CHANSTS=%#"PRIx64", CHANERR=%#"PRIx32,
__func__,
ioat->regs->chancmd,
ioat->regs->chansts,
diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c
index 6d59fdf909..bba70646fa 100644
--- a/drivers/event/cnxk/cnxk_tim_evdev.c
+++ b/drivers/event/cnxk/cnxk_tim_evdev.c
@@ -268,7 +268,7 @@ cnxk_tim_ring_create(struct rte_event_timer_adapter *adptr)
sso_set_priv_mem_fn(dev->event_dev, NULL);
plt_tim_dbg(
- "Total memory used %" PRIu64 "MB\n",
+ "Total memory used %" PRIu64 "MB",
(uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz) +
(tim_ring->nb_bkts * sizeof(struct cnxk_tim_bkt))) /
BIT_ULL(20)));
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 1273455673..f0b2c7de99 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -74,7 +74,7 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
ret = dpaa2_affine_qbman_swp();
if (ret < 0) {
DPAA2_EVENTDEV_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -276,7 +276,7 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[],
ret = dpaa2_affine_qbman_swp();
if (ret < 0) {
DPAA2_EVENTDEV_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -851,7 +851,7 @@ dpaa2_eventdev_crypto_queue_add_all(const struct rte_eventdev *dev,
for (i = 0; i < cryptodev->data->nb_queue_pairs; i++) {
ret = dpaa2_sec_eventq_attach(cryptodev, i, dpcon, ev);
if (ret) {
- DPAA2_EVENTDEV_ERR("dpaa2_sec_eventq_attach failed: ret %d\n",
+ DPAA2_EVENTDEV_ERR("dpaa2_sec_eventq_attach failed: ret %d",
ret);
goto fail;
}
@@ -885,7 +885,7 @@ dpaa2_eventdev_crypto_queue_add(const struct rte_eventdev *dev,
dpcon, &conf->ev);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_attach failed: ret: %d\n", ret);
+ "dpaa2_sec_eventq_attach failed: ret: %d", ret);
return ret;
}
return 0;
@@ -905,7 +905,7 @@ dpaa2_eventdev_crypto_queue_del_all(const struct rte_eventdev *dev,
ret = dpaa2_sec_eventq_detach(cdev, i);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_detach failed:ret %d\n", ret);
+ "dpaa2_sec_eventq_detach failed:ret %d", ret);
return ret;
}
}
@@ -928,7 +928,7 @@ dpaa2_eventdev_crypto_queue_del(const struct rte_eventdev *dev,
ret = dpaa2_sec_eventq_detach(cryptodev, rx_queue_id);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_detach failed: ret: %d\n", ret);
+ "dpaa2_sec_eventq_detach failed: ret: %d", ret);
return ret;
}
@@ -1161,7 +1161,7 @@ dpaa2_eventdev_destroy(const char *name)
eventdev = rte_event_pmd_get_named_dev(name);
if (eventdev == NULL) {
- RTE_EDEV_LOG_ERR("eventdev with name %s not allocated", name);
+ DPAA2_EVENTDEV_ERR("eventdev with name %s not allocated", name);
return -1;
}
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 090b3ed183..82f17144a6 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -196,7 +196,7 @@ timvf_ring_start(const struct rte_event_timer_adapter *adptr)
timr->tck_int = NSEC2CLK(timr->tck_nsec, rte_get_timer_hz());
timr->fast_div = rte_reciprocal_value_u64(timr->tck_int);
timvf_log_info("nb_bkts %d min_ns %"PRIu64" min_cyc %"PRIu64""
- " maxtmo %"PRIu64"\n",
+ " maxtmo %"PRIu64,
timr->nb_bkts, timr->tck_nsec, interval,
timr->max_tout);
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index b34a5fcacd..25853166bf 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -99,7 +99,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (unlikely(dev->data->dev_started)) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to link queue (%u) to port %d while device started\n",
+ "Attempt to link queue (%u) to port %d while device started",
dev->data->dev_id,
queues[0],
p->id);
@@ -110,7 +110,7 @@ opdl_port_link(struct rte_eventdev *dev,
/* Max of 1 queue per port */
if (num > 1) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to link more than one queue (%u) to port %d requested\n",
+ "Attempt to link more than one queue (%u) to port %d requested",
dev->data->dev_id,
num,
p->id);
@@ -120,7 +120,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (!p->configured) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "port %d not configured, cannot link to %u\n",
+ "port %d not configured, cannot link to %u",
dev->data->dev_id,
p->id,
queues[0]);
@@ -130,7 +130,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (p->external_qid != OPDL_INVALID_QID) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "port %d already linked to queue %u, cannot link to %u\n",
+ "port %d already linked to queue %u, cannot link to %u",
dev->data->dev_id,
p->id,
p->external_qid,
@@ -157,7 +157,7 @@ opdl_port_unlink(struct rte_eventdev *dev,
if (unlikely(dev->data->dev_started)) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to unlink queue (%u) to port %d while device started\n",
+ "Attempt to unlink queue (%u) to port %d while device started",
dev->data->dev_id,
queues[0],
p->id);
@@ -188,7 +188,7 @@ opdl_port_setup(struct rte_eventdev *dev,
/* Check if port already configured */
if (p->configured) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to setup port %d which is already setup\n",
+ "Attempt to setup port %d which is already setup",
dev->data->dev_id,
p->id);
return -EDQUOT;
@@ -244,7 +244,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
/* Extra sanity check, probably not needed */
if (queue_id == OPDL_INVALID_QID) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Invalid queue id %u requested\n",
+ "Invalid queue id %u requested",
dev->data->dev_id,
queue_id);
return -EINVAL;
@@ -252,7 +252,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
if (device->nb_q_md > device->max_queue_nb) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Max number of queues %u exceeded by request %u\n",
+ "Max number of queues %u exceeded by request %u",
dev->data->dev_id,
device->max_queue_nb,
device->nb_q_md);
@@ -262,7 +262,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
if (RTE_EVENT_QUEUE_CFG_ALL_TYPES
& conf->event_queue_cfg) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "QUEUE_CFG_ALL_TYPES not supported\n",
+ "QUEUE_CFG_ALL_TYPES not supported",
dev->data->dev_id);
return -ENOTSUP;
} else if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK
@@ -281,7 +281,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
break;
default:
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Unknown queue type %d requested\n",
+ "Unknown queue type %d requested",
dev->data->dev_id,
conf->event_queue_cfg);
return -EINVAL;
@@ -292,7 +292,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
for (i = 0; i < device->nb_q_md; i++) {
if (device->q_md[i].ext_id == queue_id) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "queue id %u already setup\n",
+ "queue id %u already setup",
dev->data->dev_id,
queue_id);
return -EINVAL;
@@ -352,7 +352,7 @@ opdl_dev_configure(const struct rte_eventdev *dev)
if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "DEQUEUE_TIMEOUT not supported\n",
+ "DEQUEUE_TIMEOUT not supported",
dev->data->dev_id);
return -ENOTSUP;
}
@@ -662,7 +662,7 @@ opdl_probe(struct rte_vdev_device *vdev)
if (!kvlist) {
PMD_DRV_LOG(INFO,
- "Ignoring unsupported parameters when creating device '%s'\n",
+ "Ignoring unsupported parameters when creating device '%s'",
name);
} else {
int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
@@ -709,7 +709,7 @@ opdl_probe(struct rte_vdev_device *vdev)
PMD_DRV_LOG(INFO, "DEV_ID:[%02d] : "
"Success - creating eventdev device %s, numa_node:[%d], do_validation:[%s]"
- " , self_test:[%s]\n",
+ " , self_test:[%s]",
dev->data->dev_id,
name,
socket_id,
@@ -753,7 +753,7 @@ opdl_remove(struct rte_vdev_device *vdev)
if (name == NULL)
return -EINVAL;
- PMD_DRV_LOG(INFO, "Closing eventdev opdl device %s\n", name);
+ PMD_DRV_LOG(INFO, "Closing eventdev opdl device %s", name);
return rte_event_pmd_vdev_uninit(name);
}
diff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c
index b69c4769dc..9b0c4db5ce 100644
--- a/drivers/event/opdl/opdl_test.c
+++ b/drivers/event/opdl/opdl_test.c
@@ -101,7 +101,7 @@ init(struct test *t, int nb_queues, int nb_ports)
ret = rte_event_dev_configure(evdev, &config);
if (ret < 0)
- PMD_DRV_LOG(ERR, "%d: Error configuring device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error configuring device", __LINE__);
return ret;
};
@@ -119,7 +119,7 @@ create_ports(struct test *t, int num_ports)
for (i = 0; i < num_ports; i++) {
if (rte_event_port_setup(evdev, i, &conf) < 0) {
- PMD_DRV_LOG(ERR, "Error setting up port %d\n", i);
+ PMD_DRV_LOG(ERR, "Error setting up port %d", i);
return -1;
}
t->port[i] = i;
@@ -158,7 +158,7 @@ create_queues_type(struct test *t, int num_qids, enum queue_type flags)
for (i = t->nb_qids ; i < t->nb_qids + num_qids; i++) {
if (rte_event_queue_setup(evdev, i, &conf) < 0) {
- PMD_DRV_LOG(ERR, "%d: error creating qid %d\n ",
+ PMD_DRV_LOG(ERR, "%d: error creating qid %d ",
__LINE__, i);
return -1;
}
@@ -180,7 +180,7 @@ cleanup(struct test *t __rte_unused)
{
rte_event_dev_stop(evdev);
rte_event_dev_close(evdev);
- PMD_DRV_LOG(ERR, "clean up for test done\n");
+ PMD_DRV_LOG(ERR, "clean up for test done");
return 0;
};
@@ -202,7 +202,7 @@ ordered_basic(struct test *t)
if (init(t, 2, tx_port+1) < 0 ||
create_ports(t, tx_port+1) < 0 ||
create_queues_type(t, 2, OPDL_Q_TYPE_ORDERED)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -226,7 +226,7 @@ ordered_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[i], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n",
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid",
__LINE__);
cleanup(t);
return -1;
@@ -236,13 +236,13 @@ ordered_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[tx_port], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping TX qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping TX qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error with start call\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error with start call", __LINE__);
return -1;
}
/* Enqueue 3 packets to the rx port */
@@ -250,7 +250,7 @@ ordered_basic(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -262,7 +262,7 @@ ordered_basic(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__, i, err);
return -1;
}
@@ -278,7 +278,7 @@ ordered_basic(struct test *t)
deq_pkts = rte_event_dequeue_burst(evdev, t->port[i],
&deq_ev[i], 1, 0);
if (deq_pkts != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to deq\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Failed to deq", __LINE__);
rte_event_dev_dump(evdev, stdout);
return -1;
}
@@ -286,7 +286,7 @@ ordered_basic(struct test *t)
if (seq != (i-1)) {
PMD_DRV_LOG(ERR, " seq test failed ! eq is %d , "
- "port number is %u\n", seq, i);
+ "port number is %u", seq, i);
return -1;
}
}
@@ -298,7 +298,7 @@ ordered_basic(struct test *t)
deq_ev[i].queue_id = t->qid[1];
err = rte_event_enqueue_burst(evdev, t->port[i], &deq_ev[i], 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue", __LINE__);
return -1;
}
}
@@ -309,7 +309,7 @@ ordered_basic(struct test *t)
/* Check to see if we've got all 3 packets */
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
rte_event_dev_dump(evdev, stdout);
return 1;
@@ -339,7 +339,7 @@ atomic_basic(struct test *t)
if (init(t, 2, tx_port+1) < 0 ||
create_ports(t, tx_port+1) < 0 ||
create_queues_type(t, 2, OPDL_Q_TYPE_ATOMIC)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -364,7 +364,7 @@ atomic_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[i], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n",
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid",
__LINE__);
cleanup(t);
return -1;
@@ -374,13 +374,13 @@ atomic_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[tx_port], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping TX qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping TX qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error with start call\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error with start call", __LINE__);
return -1;
}
@@ -389,7 +389,7 @@ atomic_basic(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -402,7 +402,7 @@ atomic_basic(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__, i, err);
return -1;
}
@@ -419,7 +419,7 @@ atomic_basic(struct test *t)
if (t->port[i] != 2) {
if (deq_pkts != 0) {
- PMD_DRV_LOG(ERR, "%d: deq none zero !\n",
+ PMD_DRV_LOG(ERR, "%d: deq none zero !",
__LINE__);
rte_event_dev_dump(evdev, stdout);
return -1;
@@ -427,7 +427,7 @@ atomic_basic(struct test *t)
} else {
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: deq not eqal to 3 %u !\n",
+ PMD_DRV_LOG(ERR, "%d: deq not eqal to 3 %u !",
__LINE__, deq_pkts);
rte_event_dev_dump(evdev, stdout);
return -1;
@@ -444,7 +444,7 @@ atomic_basic(struct test *t)
if (err != 3) {
PMD_DRV_LOG(ERR, "port %d: Failed to enqueue pkt %u, "
- "retval = %u\n",
+ "retval = %u",
t->port[i], 3, err);
return -1;
}
@@ -460,7 +460,7 @@ atomic_basic(struct test *t)
/* Check to see if we've got all 3 packets */
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
rte_event_dev_dump(evdev, stdout);
return 1;
@@ -568,7 +568,7 @@ single_link_w_stats(struct test *t)
create_ports(t, 3) < 0 || /* 0,1,2 */
create_queues_type(t, 1, OPDL_Q_TYPE_SINGLE_LINK) < 0 ||
create_queues_type(t, 1, OPDL_Q_TYPE_ORDERED) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -587,7 +587,7 @@ single_link_w_stats(struct test *t)
err = rte_event_port_link(evdev, t->port[1], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]\n",
+ PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]",
__LINE__,
t->port[1],
t->qid[0]);
@@ -598,7 +598,7 @@ single_link_w_stats(struct test *t)
err = rte_event_port_link(evdev, t->port[2], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]\n",
+ PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]",
__LINE__,
t->port[2],
t->qid[1]);
@@ -607,7 +607,7 @@ single_link_w_stats(struct test *t)
}
if (rte_event_dev_start(evdev) != 0) {
- PMD_DRV_LOG(ERR, "%d: failed to start device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: failed to start device", __LINE__);
cleanup(t);
return -1;
}
@@ -619,7 +619,7 @@ single_link_w_stats(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -631,7 +631,7 @@ single_link_w_stats(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__,
t->port[rx_port],
err);
@@ -647,7 +647,7 @@ single_link_w_stats(struct test *t)
deq_ev, 3, 0);
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: deq not 3 !\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: deq not 3 !", __LINE__);
cleanup(t);
return -1;
}
@@ -662,7 +662,7 @@ single_link_w_stats(struct test *t)
NEW_NUM_PACKETS);
if (deq_pkts != 2) {
- PMD_DRV_LOG(ERR, "%d: enq not 2 but %u!\n", __LINE__, deq_pkts);
+ PMD_DRV_LOG(ERR, "%d: enq not 2 but %u!", __LINE__, deq_pkts);
cleanup(t);
return -1;
}
@@ -676,7 +676,7 @@ single_link_w_stats(struct test *t)
/* Check to see if we've got all 2 packets */
if (deq_pkts != 2) {
- PMD_DRV_LOG(ERR, "%d: expected 2 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 2 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
cleanup(t);
return -1;
@@ -706,7 +706,7 @@ single_link(struct test *t)
create_ports(t, 3) < 0 || /* 0,1,2 */
create_queues_type(t, 1, OPDL_Q_TYPE_SINGLE_LINK) < 0 ||
create_queues_type(t, 1, OPDL_Q_TYPE_ORDERED) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -725,7 +725,7 @@ single_link(struct test *t)
err = rte_event_port_link(evdev, t->port[1], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid", __LINE__);
cleanup(t);
return -1;
}
@@ -733,14 +733,14 @@ single_link(struct test *t)
err = rte_event_port_link(evdev, t->port[2], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) == 0) {
PMD_DRV_LOG(ERR, "%d: start DIDN'T FAIL with more than 1 "
- "SINGLE_LINK PORT\n", __LINE__);
+ "SINGLE_LINK PORT", __LINE__);
cleanup(t);
return -1;
}
@@ -789,7 +789,7 @@ qid_basic(struct test *t)
if (init(t, NUM_QUEUES, NUM_QUEUES+1) < 0 ||
create_ports(t, NUM_QUEUES+1) < 0 ||
create_queues_type(t, NUM_QUEUES, OPDL_Q_TYPE_ORDERED)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -805,7 +805,7 @@ qid_basic(struct test *t)
if (nb_linked != 1) {
- PMD_DRV_LOG(ERR, "%s:%d: error mapping port:%u to queue:%u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: error mapping port:%u to queue:%u",
__FILE__,
__LINE__,
i + 1,
@@ -826,7 +826,7 @@ qid_basic(struct test *t)
&t_qid,
NULL,
1) > 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Second call to port link on same port DID NOT fail\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Second call to port link on same port DID NOT fail",
__FILE__,
__LINE__);
err = -1;
@@ -841,7 +841,7 @@ qid_basic(struct test *t)
BATCH_SIZE,
0);
if (test_num_events != 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing 0 packets from port %u on stopped device\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing 0 packets from port %u on stopped device",
__FILE__,
__LINE__,
p_id);
@@ -855,7 +855,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (test_num_events != 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing 0 packets to port %u on stopped device\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing 0 packets to port %u on stopped device",
__FILE__,
__LINE__,
p_id);
@@ -868,7 +868,7 @@ qid_basic(struct test *t)
/* Start the device */
if (!err) {
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error with start call\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error with start call",
__FILE__,
__LINE__);
err = -1;
@@ -884,7 +884,7 @@ qid_basic(struct test *t)
&t_qid,
NULL,
1) > 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Call to port link on started device DID NOT fail\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Call to port link on started device DID NOT fail",
__FILE__,
__LINE__);
err = -1;
@@ -904,7 +904,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing rx packets\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing rx packets",
__FILE__,
__LINE__);
err = -1;
@@ -921,7 +921,7 @@ qid_basic(struct test *t)
0);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from port %u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from port %u",
__FILE__,
__LINE__,
p_id);
@@ -930,7 +930,7 @@ qid_basic(struct test *t)
}
if (ev[0].queue_id != q_id) {
- PMD_DRV_LOG(ERR, "%s:%d: Error event portid[%u] q_id:[%u] does not match expected:[%u]\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error event portid[%u] q_id:[%u] does not match expected:[%u]",
__FILE__,
__LINE__,
p_id,
@@ -949,7 +949,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing packets from port:%u to queue:%u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing packets from port:%u to queue:%u",
__FILE__,
__LINE__,
p_id,
@@ -967,7 +967,7 @@ qid_basic(struct test *t)
BATCH_SIZE,
0);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from tx port %u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from tx port %u",
__FILE__,
__LINE__,
p_id);
@@ -993,17 +993,17 @@ opdl_selftest(void)
evdev = rte_event_dev_get_dev_id(eventdev_name);
if (evdev < 0) {
- PMD_DRV_LOG(ERR, "%d: Eventdev %s not found - creating.\n",
+ PMD_DRV_LOG(ERR, "%d: Eventdev %s not found - creating.",
__LINE__, eventdev_name);
/* turn on stats by default */
if (rte_vdev_init(eventdev_name, "do_validation=1") < 0) {
- PMD_DRV_LOG(ERR, "Error creating eventdev\n");
+ PMD_DRV_LOG(ERR, "Error creating eventdev");
free(t);
return -1;
}
evdev = rte_event_dev_get_dev_id(eventdev_name);
if (evdev < 0) {
- PMD_DRV_LOG(ERR, "Error finding newly created eventdev\n");
+ PMD_DRV_LOG(ERR, "Error finding newly created eventdev");
free(t);
return -1;
}
@@ -1019,27 +1019,27 @@ opdl_selftest(void)
512, /* use very small mbufs */
rte_socket_id());
if (!eventdev_func_mempool) {
- PMD_DRV_LOG(ERR, "ERROR creating mempool\n");
+ PMD_DRV_LOG(ERR, "ERROR creating mempool");
free(t);
return -1;
}
}
t->mbuf_pool = eventdev_func_mempool;
- PMD_DRV_LOG(ERR, "*** Running Ordered Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running Ordered Basic test...");
ret = ordered_basic(t);
- PMD_DRV_LOG(ERR, "*** Running Atomic Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running Atomic Basic test...");
ret = atomic_basic(t);
- PMD_DRV_LOG(ERR, "*** Running QID Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running QID Basic test...");
ret = qid_basic(t);
- PMD_DRV_LOG(ERR, "*** Running SINGLE LINK failure test...\n");
+ PMD_DRV_LOG(ERR, "*** Running SINGLE LINK failure test...");
ret = single_link(t);
- PMD_DRV_LOG(ERR, "*** Running SINGLE LINK w stats test...\n");
+ PMD_DRV_LOG(ERR, "*** Running SINGLE LINK w stats test...");
ret = single_link_w_stats(t);
/*
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 19a52afc7d..7913bc547e 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -173,7 +173,7 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_id,
dev->data->socket_id,
RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);
if (p->rx_worker_ring == NULL) {
- SW_LOG_ERR("Error creating RX worker ring for port %d\n",
+ SW_LOG_ERR("Error creating RX worker ring for port %d",
port_id);
return -1;
}
@@ -193,7 +193,7 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_id,
RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);
if (p->cq_worker_ring == NULL) {
rte_event_ring_free(p->rx_worker_ring);
- SW_LOG_ERR("Error creating CQ worker ring for port %d\n",
+ SW_LOG_ERR("Error creating CQ worker ring for port %d",
port_id);
return -1;
}
@@ -253,7 +253,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
if (!window_size) {
SW_LOG_DBG(
- "invalid reorder_window_size for ordered queue\n"
+ "invalid reorder_window_size for ordered queue"
);
goto cleanup;
}
@@ -262,7 +262,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
window_size * sizeof(qid->reorder_buffer[0]),
0, socket_id);
if (!qid->reorder_buffer) {
- SW_LOG_DBG("reorder_buffer malloc failed\n");
+ SW_LOG_DBG("reorder_buffer malloc failed");
goto cleanup;
}
@@ -334,7 +334,7 @@ sw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
type = SW_SCHED_TYPE_DIRECT;
} else if (RTE_EVENT_QUEUE_CFG_ALL_TYPES
& conf->event_queue_cfg) {
- SW_LOG_ERR("QUEUE_CFG_ALL_TYPES not supported\n");
+ SW_LOG_ERR("QUEUE_CFG_ALL_TYPES not supported");
return -ENOTSUP;
}
@@ -772,7 +772,7 @@ sw_start(struct rte_eventdev *dev)
/* check a service core is mapped to this service */
if (!rte_service_runstate_get(sw->service_id)) {
- SW_LOG_ERR("Warning: No Service core enabled on service %s\n",
+ SW_LOG_ERR("Warning: No Service core enabled on service %s",
sw->service_name);
return -ENOENT;
}
@@ -780,7 +780,7 @@ sw_start(struct rte_eventdev *dev)
/* check all ports are set up */
for (i = 0; i < sw->port_count; i++)
if (sw->ports[i].rx_worker_ring == NULL) {
- SW_LOG_ERR("Port %d not configured\n", i);
+ SW_LOG_ERR("Port %d not configured", i);
return -ESTALE;
}
@@ -788,7 +788,7 @@ sw_start(struct rte_eventdev *dev)
for (i = 0; i < sw->qid_count; i++)
if (!sw->qids[i].initialized ||
sw->qids[i].cq_num_mapped_cqs == 0) {
- SW_LOG_ERR("Queue %d not configured\n", i);
+ SW_LOG_ERR("Queue %d not configured", i);
return -ENOLINK;
}
@@ -1000,7 +1000,7 @@ sw_probe(struct rte_vdev_device *vdev)
if (!kvlist) {
SW_LOG_INFO(
- "Ignoring unsupported parameters when creating device '%s'\n",
+ "Ignoring unsupported parameters when creating device '%s'",
name);
} else {
int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
@@ -1070,7 +1070,7 @@ sw_probe(struct rte_vdev_device *vdev)
SW_LOG_INFO(
"Creating eventdev sw device %s, numa_node=%d, "
"sched_quanta=%d, credit_quanta=%d "
- "min_burst=%d, deq_burst=%d, refill_once=%d\n",
+ "min_burst=%d, deq_burst=%d, refill_once=%d",
name, socket_id, sched_quanta, credit_quanta,
min_burst_size, deq_burst_size, refill_once);
@@ -1134,7 +1134,7 @@ sw_remove(struct rte_vdev_device *vdev)
if (name == NULL)
return -EINVAL;
- SW_LOG_INFO("Closing eventdev sw device %s\n", name);
+ SW_LOG_INFO("Closing eventdev sw device %s", name);
return rte_event_pmd_vdev_uninit(name);
}
diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
index fbac8f3ab5..076b982ab8 100644
--- a/drivers/event/sw/sw_evdev_xstats.c
+++ b/drivers/event/sw/sw_evdev_xstats.c
@@ -419,7 +419,7 @@ sw_xstats_get_names(const struct rte_eventdev *dev,
start_offset = sw->xstats_offset_for_qid[queue_port_id];
break;
default:
- SW_LOG_ERR("Invalid mode received in sw_xstats_get_names()\n");
+ SW_LOG_ERR("Invalid mode received in sw_xstats_get_names()");
return -EINVAL;
};
@@ -470,7 +470,7 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
xstats_mode_count = sw->xstats_count_per_qid[queue_port_id];
break;
default:
- SW_LOG_ERR("Invalid mode received in sw_xstats_get()\n");
+ SW_LOG_ERR("Invalid mode received in sw_xstats_get()");
goto invalid_value;
};
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 42e17d984c..886fb7fbb0 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -69,7 +69,7 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
goto err1;
}
@@ -213,7 +213,7 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
ret = dpaa2_affine_qbman_swp();
if (ret != 0) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -357,7 +357,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
ret = dpaa2_affine_qbman_swp();
if (ret != 0) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return ret;
}
@@ -472,7 +472,7 @@ dpaa2_populate(struct rte_mempool *mp, unsigned int max_objs,
msl = rte_mem_virt2memseg_list(vaddr);
if (!msl) {
- DPAA2_MEMPOOL_DEBUG("Memsegment is External.\n");
+ DPAA2_MEMPOOL_DEBUG("Memsegment is External.");
rte_fslmc_vfio_mem_dmamap((size_t)vaddr,
(size_t)paddr, (size_t)len);
}
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 1513c632c6..966fee8bfe 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -134,7 +134,7 @@ octeontx_fpa_gpool_alloc(unsigned int object_size)
if (res->sz128 == 0) {
res->sz128 = sz128;
- fpavf_log_dbg("gpool %d blk_sz %d\n", res->vf_id,
+ fpavf_log_dbg("gpool %d blk_sz %d", res->vf_id,
sz128);
return res->vf_id;
@@ -273,7 +273,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
goto err;
}
- fpavf_log_dbg(" vfid %d gpool %d aid %d pool_cfg 0x%x pool_stack_base %" PRIx64 " pool_stack_end %" PRIx64" aura_cfg %" PRIx64 "\n",
+ fpavf_log_dbg(" vfid %d gpool %d aid %d pool_cfg 0x%x pool_stack_base %" PRIx64 " pool_stack_end %" PRIx64" aura_cfg %" PRIx64,
fpa->vf_id, gpool, cfg.aid, (unsigned int)cfg.pool_cfg,
cfg.pool_stack_base, cfg.pool_stack_end, cfg.aura_cfg);
@@ -351,8 +351,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
sizeof(struct octeontx_mbox_fpa_cfg),
&resp, sizeof(resp));
if (ret < 0) {
- fpavf_log_err("Could not attach fpa ");
- fpavf_log_err("aura %d to pool %d. Err=%d. FuncErr=%d\n",
+ fpavf_log_err("Could not attach fpa aura %d to pool %d. Err=%d. FuncErr=%d",
FPA_AURA_IDX(gpool_index), gpool_index, ret,
hdr.res_code);
ret = -EACCES;
@@ -380,7 +379,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
hdr.vfid = gpool_index;
ret = octeontx_mbox_send(&hdr, &cfg, sizeof(cfg), NULL, 0);
if (ret < 0) {
- fpavf_log_err("Couldn't detach FPA aura %d Err=%d FuncErr=%d\n",
+ fpavf_log_err("Couldn't detach FPA aura %d Err=%d FuncErr=%d",
FPA_AURA_IDX(gpool_index), ret,
hdr.res_code);
ret = -EINVAL;
@@ -428,8 +427,7 @@ octeontx_fpapf_start_count(uint16_t gpool_index)
hdr.vfid = gpool_index;
ret = octeontx_mbox_send(&hdr, NULL, 0, NULL, 0);
if (ret < 0) {
- fpavf_log_err("Could not start buffer counting for ");
- fpavf_log_err("FPA pool %d. Err=%d. FuncErr=%d\n",
+ fpavf_log_err("Could not start buffer counting for FPA pool %d. Err=%d. FuncErr=%d",
gpool_index, ret, hdr.res_code);
ret = -EINVAL;
goto err;
@@ -636,7 +634,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
cnt = fpavf_read64((void *)((uintptr_t)pool_bar +
FPA_VF_VHAURA_CNT(gaura)));
if (cnt) {
- fpavf_log_dbg("buffer exist in pool cnt %" PRId64 "\n", cnt);
+ fpavf_log_dbg("buffer exist in pool cnt %" PRId64, cnt);
return -EBUSY;
}
@@ -664,7 +662,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
(pool_bar + FPA_VF_VHAURA_OP_ALLOC(gaura)));
if (node == NULL) {
- fpavf_log_err("GAURA[%u] missing %" PRIx64 " buf\n",
+ fpavf_log_err("GAURA[%u] missing %" PRIx64 " buf",
gaura, avail);
break;
}
@@ -684,7 +682,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
curr = curr[0]) {
if (curr == curr[0] ||
((uintptr_t)curr != ((uintptr_t)curr[0] - sz))) {
- fpavf_log_err("POOL# %u buf sequence err (%p vs. %p)\n",
+ fpavf_log_err("POOL# %u buf sequence err (%p vs. %p)",
gpool, curr, curr[0]);
}
}
@@ -705,7 +703,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
ret = octeontx_fpapf_aura_detach(gpool);
if (ret) {
- fpavf_log_err("Failed to detach gaura %u. error code=%d\n",
+ fpavf_log_err("Failed to detach gaura %u. error code=%d",
gpool, ret);
}
@@ -757,7 +755,7 @@ octeontx_fpavf_identify(void *bar0)
stack_ln_ptr = fpavf_read64((void *)((uintptr_t)bar0 +
FPA_VF_VHPOOL_THRESHOLD(0)));
if (vf_idx >= FPA_VF_MAX) {
- fpavf_log_err("vf_id(%d) greater than max vf (32)\n", vf_id);
+ fpavf_log_err("vf_id(%d) greater than max vf (32)", vf_id);
return -E2BIG;
}
diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx.c b/drivers/mempool/octeontx/rte_mempool_octeontx.c
index f4de1c8412..631e521b58 100644
--- a/drivers/mempool/octeontx/rte_mempool_octeontx.c
+++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c
@@ -27,11 +27,11 @@ octeontx_fpavf_alloc(struct rte_mempool *mp)
goto _end;
if ((uint32_t)rc != object_size)
- fpavf_log_err("buffer size mismatch: %d instead of %u\n",
+ fpavf_log_err("buffer size mismatch: %d instead of %u",
rc, object_size);
- fpavf_log_info("Pool created %p with .. ", (void *)pool);
- fpavf_log_info("obj_sz %d, cnt %d\n", object_size, memseg_count);
+ fpavf_log_info("Pool created %p with .. obj_sz %d, cnt %d",
+ (void *)pool, object_size, memseg_count);
/* assign pool handle to mempool */
mp->pool_id = (uint64_t)pool;
diff --git a/drivers/ml/cnxk/cn10k_ml_dev.c b/drivers/ml/cnxk/cn10k_ml_dev.c
index 41f3b7a95d..3c328d9d0e 100644
--- a/drivers/ml/cnxk/cn10k_ml_dev.c
+++ b/drivers/ml/cnxk/cn10k_ml_dev.c
@@ -108,14 +108,14 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
kvlist = rte_kvargs_parse(devargs->args, valid_args);
if (kvlist == NULL) {
- plt_err("Error parsing devargs\n");
+ plt_err("Error parsing devargs");
return -EINVAL;
}
if (rte_kvargs_count(kvlist, CN10K_ML_FW_PATH) == 1) {
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_PATH, &parse_string_arg, &fw_path);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_FW_PATH);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_FW_PATH);
ret = -EINVAL;
goto exit;
}
@@ -126,7 +126,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_ENABLE_DPE_WARNINGS,
&parse_integer_arg, &cn10k_mldev->fw.enable_dpe_warnings);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_FW_ENABLE_DPE_WARNINGS);
ret = -EINVAL;
goto exit;
@@ -138,7 +138,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_REPORT_DPE_WARNINGS,
&parse_integer_arg, &cn10k_mldev->fw.report_dpe_warnings);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_FW_REPORT_DPE_WARNINGS);
ret = -EINVAL;
goto exit;
@@ -150,7 +150,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_DEV_CACHE_MODEL_DATA, &parse_integer_arg,
&cn10k_mldev->cache_model_data);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_DEV_CACHE_MODEL_DATA);
ret = -EINVAL;
goto exit;
@@ -162,7 +162,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_OCM_ALLOC_MODE, &parse_string_arg,
&ocm_alloc_mode);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_OCM_ALLOC_MODE);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_OCM_ALLOC_MODE);
ret = -EINVAL;
goto exit;
}
@@ -173,7 +173,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_DEV_HW_QUEUE_LOCK, &parse_integer_arg,
&cn10k_mldev->hw_queue_lock);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_DEV_HW_QUEUE_LOCK);
ret = -EINVAL;
goto exit;
@@ -185,7 +185,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_OCM_PAGE_SIZE, &parse_integer_arg,
&cn10k_mldev->ocm_page_size);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_OCM_PAGE_SIZE);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_OCM_PAGE_SIZE);
ret = -EINVAL;
goto exit;
}
@@ -204,7 +204,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if ((cn10k_mldev->fw.enable_dpe_warnings < 0) ||
(cn10k_mldev->fw.enable_dpe_warnings > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_FW_ENABLE_DPE_WARNINGS,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_FW_ENABLE_DPE_WARNINGS,
cn10k_mldev->fw.enable_dpe_warnings);
ret = -EINVAL;
goto exit;
@@ -218,7 +218,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if ((cn10k_mldev->fw.report_dpe_warnings < 0) ||
(cn10k_mldev->fw.report_dpe_warnings > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_FW_REPORT_DPE_WARNINGS,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_FW_REPORT_DPE_WARNINGS,
cn10k_mldev->fw.report_dpe_warnings);
ret = -EINVAL;
goto exit;
@@ -231,7 +231,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->cache_model_data = CN10K_ML_DEV_CACHE_MODEL_DATA_DEFAULT;
} else {
if ((cn10k_mldev->cache_model_data < 0) || (cn10k_mldev->cache_model_data > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_DEV_CACHE_MODEL_DATA,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_DEV_CACHE_MODEL_DATA,
cn10k_mldev->cache_model_data);
ret = -EINVAL;
goto exit;
@@ -244,7 +244,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if (!((strcmp(ocm_alloc_mode, "lowest") == 0) ||
(strcmp(ocm_alloc_mode, "largest") == 0))) {
- plt_err("Invalid argument, %s = %s\n", CN10K_ML_OCM_ALLOC_MODE,
+ plt_err("Invalid argument, %s = %s", CN10K_ML_OCM_ALLOC_MODE,
ocm_alloc_mode);
ret = -EINVAL;
goto exit;
@@ -257,7 +257,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->hw_queue_lock = CN10K_ML_DEV_HW_QUEUE_LOCK_DEFAULT;
} else {
if ((cn10k_mldev->hw_queue_lock < 0) || (cn10k_mldev->hw_queue_lock > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_DEV_HW_QUEUE_LOCK,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_DEV_HW_QUEUE_LOCK,
cn10k_mldev->hw_queue_lock);
ret = -EINVAL;
goto exit;
@@ -269,7 +269,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->ocm_page_size = CN10K_ML_OCM_PAGE_SIZE_DEFAULT;
} else {
if (cn10k_mldev->ocm_page_size < 0) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_OCM_PAGE_SIZE,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_OCM_PAGE_SIZE,
cn10k_mldev->ocm_page_size);
ret = -EINVAL;
goto exit;
@@ -284,7 +284,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
}
if (!found) {
- plt_err("Unsupported ocm_page_size = %d\n", cn10k_mldev->ocm_page_size);
+ plt_err("Unsupported ocm_page_size = %d", cn10k_mldev->ocm_page_size);
ret = -EINVAL;
goto exit;
}
@@ -773,7 +773,7 @@ cn10k_ml_fw_load(struct cnxk_ml_dev *cnxk_mldev)
/* Read firmware image to a buffer */
ret = rte_firmware_read(fw->path, &fw_buffer, &fw_size);
if ((ret < 0) || (fw_buffer == NULL)) {
- plt_err("Unable to read firmware data: %s\n", fw->path);
+ plt_err("Unable to read firmware data: %s", fw->path);
return ret;
}
diff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c
index 971362b242..7bd73727e1 100644
--- a/drivers/ml/cnxk/cnxk_ml_ops.c
+++ b/drivers/ml/cnxk/cnxk_ml_ops.c
@@ -437,7 +437,7 @@ cnxk_ml_model_xstats_reset(struct cnxk_ml_dev *cnxk_mldev, int32_t model_id,
model = cnxk_mldev->mldev->data->models[model_id];
if (model == NULL) {
- plt_err("Invalid model_id = %d\n", model_id);
+ plt_err("Invalid model_id = %d", model_id);
return -EINVAL;
}
}
@@ -454,7 +454,7 @@ cnxk_ml_model_xstats_reset(struct cnxk_ml_dev *cnxk_mldev, int32_t model_id,
} else {
for (j = 0; j < nb_ids; j++) {
if (stat_ids[j] < start_id || stat_ids[j] > end_id) {
- plt_err("Invalid stat_ids[%d] = %d for model_id = %d\n", j,
+ plt_err("Invalid stat_ids[%d] = %d for model_id = %d", j,
stat_ids[j], lcl_model_id);
return -EINVAL;
}
@@ -510,12 +510,12 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co
cnxk_ml_dev_info_get(dev, &dev_info);
if (conf->nb_models > dev_info.max_models) {
- plt_err("Invalid device config, nb_models > %u\n", dev_info.max_models);
+ plt_err("Invalid device config, nb_models > %u", dev_info.max_models);
return -EINVAL;
}
if (conf->nb_queue_pairs > dev_info.max_queue_pairs) {
- plt_err("Invalid device config, nb_queue_pairs > %u\n", dev_info.max_queue_pairs);
+ plt_err("Invalid device config, nb_queue_pairs > %u", dev_info.max_queue_pairs);
return -EINVAL;
}
@@ -533,10 +533,10 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co
plt_ml_dbg("Re-configuring ML device, nb_queue_pairs = %u, nb_models = %u",
conf->nb_queue_pairs, conf->nb_models);
} else if (cnxk_mldev->state == ML_CNXK_DEV_STATE_STARTED) {
- plt_err("Device can't be reconfigured in started state\n");
+ plt_err("Device can't be reconfigured in started state");
return -ENOTSUP;
} else if (cnxk_mldev->state == ML_CNXK_DEV_STATE_CLOSED) {
- plt_err("Device can't be reconfigured after close\n");
+ plt_err("Device can't be reconfigured after close");
return -ENOTSUP;
}
@@ -853,7 +853,7 @@ cnxk_ml_dev_queue_pair_setup(struct rte_ml_dev *dev, uint16_t queue_pair_id,
uint32_t nb_desc;
if (queue_pair_id >= dev->data->nb_queue_pairs) {
- plt_err("Queue-pair id = %u (>= max queue pairs supported, %u)\n", queue_pair_id,
+ plt_err("Queue-pair id = %u (>= max queue pairs supported, %u)", queue_pair_id,
dev->data->nb_queue_pairs);
return -EINVAL;
}
@@ -1249,11 +1249,11 @@ cnxk_ml_model_load(struct rte_ml_dev *dev, struct rte_ml_model_params *params, u
}
if ((total_wb_pages + max_scratch_pages) > ocm->num_pages) {
- plt_err("model_id = %u: total_wb_pages (%u) + scratch_pages (%u) > %u\n",
+ plt_err("model_id = %u: total_wb_pages (%u) + scratch_pages (%u) > %u",
lcl_model_id, total_wb_pages, max_scratch_pages, ocm->num_pages);
if (model->type == ML_CNXK_MODEL_TYPE_GLOW) {
- plt_ml_dbg("layer_id = %u: wb_pages = %u, scratch_pages = %u\n", layer_id,
+ plt_ml_dbg("layer_id = %u: wb_pages = %u, scratch_pages = %u", layer_id,
model->layer[layer_id].glow.ocm_map.wb_pages,
model->layer[layer_id].glow.ocm_map.scratch_pages);
#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM
@@ -1262,7 +1262,7 @@ cnxk_ml_model_load(struct rte_ml_dev *dev, struct rte_ml_model_params *params, u
layer_id++) {
if (model->layer[layer_id].type == ML_CNXK_LAYER_TYPE_MRVL) {
plt_ml_dbg(
- "layer_id = %u: wb_pages = %u, scratch_pages = %u\n",
+ "layer_id = %u: wb_pages = %u, scratch_pages = %u",
layer_id,
model->layer[layer_id].glow.ocm_map.wb_pages,
model->layer[layer_id].glow.ocm_map.scratch_pages);
diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index cb6f8141a8..0f367faad5 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -359,13 +359,13 @@ atl_rx_init(struct rte_eth_dev *eth_dev)
buff_size = RTE_ALIGN_FLOOR(buff_size, 1024);
if (buff_size > HW_ATL_B0_RXD_BUF_SIZE_MAX) {
PMD_INIT_LOG(WARNING,
- "Port %d queue %d: mem pool buff size is too big\n",
+ "Port %d queue %d: mem pool buff size is too big",
rxq->port_id, rxq->queue_id);
buff_size = HW_ATL_B0_RXD_BUF_SIZE_MAX;
}
if (buff_size < 1024) {
PMD_INIT_LOG(ERR,
- "Port %d queue %d: mem pool buff size is too small\n",
+ "Port %d queue %d: mem pool buff size is too small",
rxq->port_id, rxq->queue_id);
return -EINVAL;
}
diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
index 84d11ab3a5..06d79115b9 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
@@ -76,7 +76,7 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
self->fw_ver_actual) == 0) {
*fw_ops = &aq_fw_2x_ops;
} else {
- PMD_DRV_LOG(ERR, "Bad FW version detected: %x\n",
+ PMD_DRV_LOG(ERR, "Bad FW version detected: %x",
self->fw_ver_actual);
return -EOPNOTSUPP;
}
@@ -124,7 +124,7 @@ static int hw_atl_utils_soft_reset_flb(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "MAC kickstart failed\n");
+ PMD_DRV_LOG(ERR, "MAC kickstart failed");
return -EIO;
}
@@ -152,7 +152,7 @@ static int hw_atl_utils_soft_reset_flb(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "FW kickstart failed\n");
+ PMD_DRV_LOG(ERR, "FW kickstart failed");
return -EIO;
}
/* Old FW requires fixed delay after init */
@@ -209,7 +209,7 @@ static int hw_atl_utils_soft_reset_rbl(struct aq_hw_s *self)
aq_hw_write_reg(self, 0x534, 0xA0);
if (rbl_status == 0xF1A7) {
- PMD_DRV_LOG(ERR, "No FW detected. Dynamic FW load not implemented\n");
+ PMD_DRV_LOG(ERR, "No FW detected. Dynamic FW load not implemented");
return -EOPNOTSUPP;
}
@@ -221,7 +221,7 @@ static int hw_atl_utils_soft_reset_rbl(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "FW kickstart failed\n");
+ PMD_DRV_LOG(ERR, "FW kickstart failed");
return -EIO;
}
/* Old FW requires fixed delay after init */
@@ -246,7 +246,7 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "Neither RBL nor FLB firmware started\n");
+ PMD_DRV_LOG(ERR, "Neither RBL nor FLB firmware started");
return -EOPNOTSUPP;
}
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 17b7b5c543..5448a5f3d7 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1353,7 +1353,7 @@ axgbe_priority_flow_ctrl_set(struct rte_eth_dev *dev,
tc_num = pdata->pfc_map[pfc_conf->priority];
if (pfc_conf->priority >= pdata->hw_feat.tc_cnt) {
- PMD_INIT_LOG(ERR, "Max supported traffic class: %d\n",
+ PMD_INIT_LOG(ERR, "Max supported traffic class: %d",
pdata->hw_feat.tc_cnt);
return -EINVAL;
}
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 597ee43359..3153cc4d80 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -8124,7 +8124,7 @@ static int bnx2x_get_shmem_info(struct bnx2x_softc *sc)
val = sc->devinfo.bc_ver >> 8;
if (val < BNX2X_BC_VER) {
/* for now only warn later we might need to enforce this */
- PMD_DRV_LOG(NOTICE, sc, "This driver needs bc_ver %X but found %X, please upgrade BC\n",
+ PMD_DRV_LOG(NOTICE, sc, "This driver needs bc_ver %X but found %X, please upgrade BC",
BNX2X_BC_VER, val);
}
sc->link_params.feature_config_flags |=
@@ -9489,16 +9489,16 @@ static int bnx2x_prev_unload(struct bnx2x_softc *sc)
hw_lock_val = (REG_RD(sc, hw_lock_reg));
if (hw_lock_val) {
if (hw_lock_val & HW_LOCK_RESOURCE_NVRAM) {
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held NVRAM lock\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held NVRAM lock");
REG_WR(sc, MCP_REG_MCPR_NVM_SW_ARB,
(MCPR_NVM_SW_ARB_ARB_REQ_CLR1 << SC_PORT(sc)));
}
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held HW lock\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held HW lock");
REG_WR(sc, hw_lock_reg, 0xffffffff);
}
if (MCPR_ACCESS_LOCK_LOCK & REG_RD(sc, MCP_REG_MCPR_ACCESS_LOCK)) {
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held ALR\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held ALR");
REG_WR(sc, MCP_REG_MCPR_ACCESS_LOCK, 0);
}
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 55ed54bb0f..ad6bc1ec21 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -707,7 +707,7 @@ cn10k_rx_descriptor_dump(const struct rte_eth_dev *eth_dev, uint16_t qid,
available_pkts = cn10k_nix_rx_avail_get(rxq);
if ((offset + num - 1) >= available_pkts) {
- plt_err("Invalid BD num=%u\n", num);
+ plt_err("Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index ea92b1dcb6..84c88655f8 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -708,7 +708,7 @@ cn9k_rx_descriptor_dump(const struct rte_eth_dev *eth_dev, uint16_t qid,
available_pkts = cn9k_nix_rx_avail_get(rxq);
if ((offset + num - 1) >= available_pkts) {
- plt_err("Invalid BD num=%u\n", num);
+ plt_err("Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/cnxk/cnxk_eswitch_devargs.c b/drivers/net/cnxk/cnxk_eswitch_devargs.c
index 8167ce673a..655813c71a 100644
--- a/drivers/net/cnxk/cnxk_eswitch_devargs.c
+++ b/drivers/net/cnxk/cnxk_eswitch_devargs.c
@@ -26,7 +26,7 @@ populate_repr_hw_info(struct cnxk_eswitch_dev *eswitch_dev, struct rte_eth_devar
if (eth_da->type != RTE_ETH_REPRESENTOR_VF && eth_da->type != RTE_ETH_REPRESENTOR_PF &&
eth_da->type != RTE_ETH_REPRESENTOR_SF) {
- plt_err("unsupported representor type %d\n", eth_da->type);
+ plt_err("unsupported representor type %d", eth_da->type);
return -ENOTSUP;
}
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 38746c81c5..33bac55704 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -589,7 +589,7 @@ cnxk_nix_process_rx_conf(const struct rte_eth_rxconf *rx_conf,
}
if (mp == NULL || mp[0] == NULL || mp[1] == NULL) {
- plt_err("invalid memory pools\n");
+ plt_err("invalid memory pools");
return -EINVAL;
}
@@ -617,7 +617,7 @@ cnxk_nix_process_rx_conf(const struct rte_eth_rxconf *rx_conf,
return -EINVAL;
}
- plt_info("spb_pool:%s lpb_pool:%s lpb_len:%u spb_len:%u\n", (*spb_pool)->name,
+ plt_info("spb_pool:%s lpb_pool:%s lpb_len:%u spb_len:%u", (*spb_pool)->name,
(*lpb_pool)->name, (*lpb_pool)->elt_size, (*spb_pool)->elt_size);
return 0;
diff --git a/drivers/net/cnxk/cnxk_ethdev_mcs.c b/drivers/net/cnxk/cnxk_ethdev_mcs.c
index 06ef7c98f3..119060bcf3 100644
--- a/drivers/net/cnxk/cnxk_ethdev_mcs.c
+++ b/drivers/net/cnxk/cnxk_ethdev_mcs.c
@@ -568,17 +568,17 @@ cnxk_eth_macsec_session_stats_get(struct cnxk_eth_dev *dev, struct cnxk_macsec_s
req.id = sess->flow_id;
req.dir = sess->dir;
roc_mcs_flowid_stats_get(mcs_dev->mdev, &req, &flow_stats);
- plt_nix_dbg("\n******* FLOW_ID IDX[%u] STATS dir: %u********\n", sess->flow_id, sess->dir);
- plt_nix_dbg("TX: tcam_hit_cnt: 0x%" PRIx64 "\n", flow_stats.tcam_hit_cnt);
+ plt_nix_dbg("******* FLOW_ID IDX[%u] STATS dir: %u********", sess->flow_id, sess->dir);
+ plt_nix_dbg("TX: tcam_hit_cnt: 0x%" PRIx64, flow_stats.tcam_hit_cnt);
req.id = mcs_dev->port_id;
req.dir = sess->dir;
roc_mcs_port_stats_get(mcs_dev->mdev, &req, &port_stats);
- plt_nix_dbg("\n********** PORT[0] STATS ****************\n");
- plt_nix_dbg("RX tcam_miss_cnt: 0x%" PRIx64 "\n", port_stats.tcam_miss_cnt);
- plt_nix_dbg("RX parser_err_cnt: 0x%" PRIx64 "\n", port_stats.parser_err_cnt);
- plt_nix_dbg("RX preempt_err_cnt: 0x%" PRIx64 "\n", port_stats.preempt_err_cnt);
- plt_nix_dbg("RX sectag_insert_err_cnt: 0x%" PRIx64 "\n", port_stats.sectag_insert_err_cnt);
+ plt_nix_dbg("********** PORT[0] STATS ****************");
+ plt_nix_dbg("RX tcam_miss_cnt: 0x%" PRIx64, port_stats.tcam_miss_cnt);
+ plt_nix_dbg("RX parser_err_cnt: 0x%" PRIx64, port_stats.parser_err_cnt);
+ plt_nix_dbg("RX preempt_err_cnt: 0x%" PRIx64, port_stats.preempt_err_cnt);
+ plt_nix_dbg("RX sectag_insert_err_cnt: 0x%" PRIx64, port_stats.sectag_insert_err_cnt);
req.id = sess->secy_id;
req.dir = sess->dir;
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index b1093dd584..5b0948e07a 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -532,7 +532,7 @@ cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev)
/* Wait for sq entries to be flushed */
rc = roc_nix_tm_sq_flush_spin(sq);
if (rc) {
- plt_err("Failed to drain sq, rc=%d\n", rc);
+ plt_err("Failed to drain sq, rc=%d", rc);
goto exit;
}
if (data->tx_queue_state[i] == RTE_ETH_QUEUE_STATE_STARTED) {
diff --git a/drivers/net/cnxk/cnxk_rep.c b/drivers/net/cnxk/cnxk_rep.c
index ca0637bde5..652d419ad8 100644
--- a/drivers/net/cnxk/cnxk_rep.c
+++ b/drivers/net/cnxk/cnxk_rep.c
@@ -270,7 +270,7 @@ cnxk_representee_mtu_msg_process(struct cnxk_eswitch_dev *eswitch_dev, uint16_t
rep_dev = cnxk_rep_pmd_priv(rep_eth_dev);
if (rep_dev->rep_id == rep_id) {
- plt_rep_dbg("Setting MTU as %d for hw_func %x rep_id %d\n", mtu, hw_func,
+ plt_rep_dbg("Setting MTU as %d for hw_func %x rep_id %d", mtu, hw_func,
rep_id);
rep_dev->repte_mtu = mtu;
break;
@@ -423,7 +423,7 @@ cnxk_rep_parent_setup(struct cnxk_eswitch_dev *eswitch_dev)
plt_err("Failed to alloc switch domain: %d", rc);
goto fail;
}
- plt_rep_dbg("Allocated switch domain id %d for pf %d\n", switch_domain_id, pf);
+ plt_rep_dbg("Allocated switch domain id %d for pf %d", switch_domain_id, pf);
eswitch_dev->sw_dom[j].switch_domain_id = switch_domain_id;
eswitch_dev->sw_dom[j].pf = pf;
prev_pf = pf;
@@ -549,7 +549,7 @@ cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct cnxk_eswitch_dev *eswi
int i, j, rc;
if (eswitch_dev->repr_cnt.nb_repr_created > RTE_MAX_ETHPORTS) {
- plt_err("nb_representor_ports %d > %d MAX ETHPORTS\n",
+ plt_err("nb_representor_ports %d > %d MAX ETHPORTS",
eswitch_dev->repr_cnt.nb_repr_created, RTE_MAX_ETHPORTS);
rc = -EINVAL;
goto fail;
@@ -604,7 +604,7 @@ cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct cnxk_eswitch_dev *eswi
name, cnxk_representee_msg_thread_main,
eswitch_dev);
if (rc != 0) {
- plt_err("Failed to create thread for VF mbox handling\n");
+ plt_err("Failed to create thread for VF mbox handling");
goto thread_fail;
}
}
diff --git a/drivers/net/cnxk/cnxk_rep.h b/drivers/net/cnxk/cnxk_rep.h
index ad89649702..aaae2d4e8f 100644
--- a/drivers/net/cnxk/cnxk_rep.h
+++ b/drivers/net/cnxk/cnxk_rep.h
@@ -93,7 +93,7 @@ cnxk_rep_pmd_priv(const struct rte_eth_dev *eth_dev)
static __rte_always_inline void
cnxk_rep_pool_buffer_stats(struct rte_mempool *pool)
{
- plt_rep_dbg(" pool %s size %d buffer count in use %d available %d\n", pool->name,
+ plt_rep_dbg(" pool %s size %d buffer count in use %d available %d", pool->name,
pool->size, rte_mempool_in_use_count(pool), rte_mempool_avail_count(pool));
}
diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index 222e178949..6f6707a0bd 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -2284,7 +2284,7 @@ get_running_host_id(void)
uint8_t host_id = CPFL_INVALID_HOST_ID;
if (uname(&unamedata) != 0)
- PMD_INIT_LOG(ERR, "Cannot fetch node_name for host\n");
+ PMD_INIT_LOG(ERR, "Cannot fetch node_name for host");
else if (strstr(unamedata.nodename, "ipu-imc"))
PMD_INIT_LOG(ERR, "CPFL PMD cannot be running on IMC.");
else if (strstr(unamedata.nodename, "ipu-acc"))
diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c
index 40569ddc6f..011229a470 100644
--- a/drivers/net/cpfl/cpfl_flow_parser.c
+++ b/drivers/net/cpfl/cpfl_flow_parser.c
@@ -2020,7 +2020,7 @@ cpfl_metadata_write_port_id(struct cpfl_itf *itf)
dev_id = cpfl_get_port_id(itf);
if (dev_id == CPFL_INVALID_HW_ID) {
- PMD_DRV_LOG(ERR, "fail to get hw ID\n");
+ PMD_DRV_LOG(ERR, "fail to get hw ID");
return false;
}
cpfl_metadata_write16(&itf->adapter->meta, type, offset, dev_id << 3);
diff --git a/drivers/net/cpfl/cpfl_fxp_rule.c b/drivers/net/cpfl/cpfl_fxp_rule.c
index be34da9fa2..42553c9641 100644
--- a/drivers/net/cpfl/cpfl_fxp_rule.c
+++ b/drivers/net/cpfl/cpfl_fxp_rule.c
@@ -77,7 +77,7 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
if (ret && ret != CPFL_ERR_CTLQ_NO_WORK && ret != CPFL_ERR_CTLQ_ERROR &&
ret != CPFL_ERR_CTLQ_EMPTY) {
- PMD_INIT_LOG(ERR, "failed to recv ctrlq msg. err: 0x%4x\n", ret);
+ PMD_INIT_LOG(ERR, "failed to recv ctrlq msg. err: 0x%4x", ret);
retries++;
continue;
}
@@ -108,7 +108,7 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
buff_cnt = dma ? 1 : 0;
ret = cpfl_vport_ctlq_post_rx_buffs(hw, cq, &buff_cnt, &dma);
if (ret)
- PMD_INIT_LOG(WARNING, "could not posted recv bufs\n");
+ PMD_INIT_LOG(WARNING, "could not posted recv bufs");
}
break;
}
@@ -131,7 +131,7 @@ cpfl_mod_rule_pack(struct cpfl_rule_info *rinfo, struct idpf_dma_mem *dma,
/* prepare rule blob */
if (!dma->va) {
- PMD_INIT_LOG(ERR, "dma mem passed to %s is null\n", __func__);
+ PMD_INIT_LOG(ERR, "dma mem passed to %s is null", __func__);
return -1;
}
blob = (union cpfl_rule_cfg_pkt_record *)dma->va;
@@ -176,7 +176,7 @@ cpfl_default_rule_pack(struct cpfl_rule_info *rinfo, struct idpf_dma_mem *dma,
uint16_t cfg_ctrl;
if (!dma->va) {
- PMD_INIT_LOG(ERR, "dma mem passed to %s is null\n", __func__);
+ PMD_INIT_LOG(ERR, "dma mem passed to %s is null", __func__);
return -1;
}
blob = (union cpfl_rule_cfg_pkt_record *)dma->va;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 449bbda7ca..88374ea905 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -728,7 +728,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
total_nb_rx_desc += nb_rx_desc;
if (total_nb_rx_desc > MAX_NB_RX_DESC) {
- DPAA2_PMD_WARN("\nTotal nb_rx_desc exceeds %d limit. Please use Normal buffers",
+ DPAA2_PMD_WARN("Total nb_rx_desc exceeds %d limit. Please use Normal buffers",
MAX_NB_RX_DESC);
DPAA2_PMD_WARN("To use Normal buffers, run 'export DPNI_NORMAL_BUF=1' before running dynamic_dpl.sh script");
}
@@ -1063,7 +1063,7 @@ dpaa2_dev_rx_queue_count(void *rx_queue)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return -EINVAL;
}
@@ -1934,7 +1934,7 @@ dpaa2_dev_link_update(struct rte_eth_dev *dev,
if (ret == -1)
DPAA2_PMD_DEBUG("No change in status");
else
- DPAA2_PMD_INFO("Port %d Link is %s\n", dev->data->port_id,
+ DPAA2_PMD_INFO("Port %d Link is %s", dev->data->port_id,
link.link_status ? "Up" : "Down");
return ret;
@@ -2308,7 +2308,7 @@ int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
dpaa2_ethq->tc_index, flow_id,
OPR_OPT_CREATE, &ocfg, 0);
if (ret) {
- DPAA2_PMD_ERR("Error setting opr: ret: %d\n", ret);
+ DPAA2_PMD_ERR("Error setting opr: ret: %d", ret);
return ret;
}
@@ -2424,7 +2424,7 @@ rte_pmd_dpaa2_thread_init(void)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -2839,7 +2839,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
WRIOP_SS_INITIALIZER(priv);
ret = dpaa2_eth_load_wriop_soft_parser(priv, DPNI_SS_INGRESS);
if (ret < 0) {
- DPAA2_PMD_ERR(" Error(%d) in loading softparser\n",
+ DPAA2_PMD_ERR(" Error(%d) in loading softparser",
ret);
return ret;
}
@@ -2847,7 +2847,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
ret = dpaa2_eth_enable_wriop_soft_parser(priv,
DPNI_SS_INGRESS);
if (ret < 0) {
- DPAA2_PMD_ERR(" Error(%d) in enabling softparser\n",
+ DPAA2_PMD_ERR(" Error(%d) in enabling softparser",
ret);
return ret;
}
@@ -2930,7 +2930,7 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv,
DPAA2_MAX_SGS * sizeof(struct qbman_sge),
rte_socket_id());
if (dpaa2_tx_sg_pool == NULL) {
- DPAA2_PMD_ERR("SG pool creation failed\n");
+ DPAA2_PMD_ERR("SG pool creation failed");
return -ENOMEM;
}
}
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 6c7bac4d48..62e350d736 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -3360,7 +3360,7 @@ dpaa2_flow_verify_action(
rxq = priv->rx_vq[rss_conf->queue[i]];
if (rxq->tc_index != attr->group) {
DPAA2_PMD_ERR(
- "Queue/Group combination are not supported\n");
+ "Queue/Group combination are not supported");
return -ENOTSUP;
}
}
@@ -3602,7 +3602,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &qos_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS QoS table can not be configured(%d)\n",
+ "RSS QoS table can not be configured(%d)",
ret);
return -1;
}
@@ -3720,14 +3720,14 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
&priv->extract.tc_key_extract[flow->tc_id].dpkg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "unable to set flow distribution.please check queue config\n");
+ "unable to set flow distribution.please check queue config");
return ret;
}
/* Allocate DMA'ble memory to write the rules */
param = (size_t)rte_malloc(NULL, 256, 64);
if (!param) {
- DPAA2_PMD_ERR("Memory allocation failure\n");
+ DPAA2_PMD_ERR("Memory allocation failure");
return -1;
}
@@ -3749,7 +3749,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &tc_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS TC table cannot be configured: %d\n",
+ "RSS TC table cannot be configured: %d",
ret);
rte_free((void *)param);
return -1;
@@ -3774,7 +3774,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &qos_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS QoS dist can't be configured-%d\n",
+ "RSS QoS dist can't be configured-%d",
ret);
return -1;
}
@@ -3843,20 +3843,20 @@ dpaa2_dev_verify_attr(struct dpni_attr *dpni_attr,
int ret = 0;
if (unlikely(attr->group >= dpni_attr->num_rx_tcs)) {
- DPAA2_PMD_ERR("Priority group is out of range\n");
+ DPAA2_PMD_ERR("Priority group is out of range");
ret = -ENOTSUP;
}
if (unlikely(attr->priority >= dpni_attr->fs_entries)) {
- DPAA2_PMD_ERR("Priority within the group is out of range\n");
+ DPAA2_PMD_ERR("Priority within the group is out of range");
ret = -ENOTSUP;
}
if (unlikely(attr->egress)) {
DPAA2_PMD_ERR(
- "Flow configuration is not supported on egress side\n");
+ "Flow configuration is not supported on egress side");
ret = -ENOTSUP;
}
if (unlikely(!attr->ingress)) {
- DPAA2_PMD_ERR("Ingress flag must be configured\n");
+ DPAA2_PMD_ERR("Ingress flag must be configured");
ret = -EINVAL;
}
return ret;
@@ -3935,7 +3935,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpni_get_attributes(dpni, CMD_PRI_LOW, token, &dpni_attr);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Failure to get dpni@%p attribute, err code %d\n",
+ "Failure to get dpni@%p attribute, err code %d",
dpni, ret);
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ATTR,
@@ -3947,7 +3947,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_attr(&dpni_attr, flow_attr);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid attributes are given\n");
+ "Invalid attributes are given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ATTR,
flow_attr, "invalid");
@@ -3957,7 +3957,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_patterns(pattern);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid pattern list is given\n");
+ "Invalid pattern list is given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ITEM,
pattern, "invalid");
@@ -3967,7 +3967,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_actions(actions);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid action list is given\n");
+ "Invalid action list is given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ACTION,
actions, "invalid");
@@ -4014,13 +4014,13 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,
key_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!key_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
mask_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!mask_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
@@ -4031,13 +4031,13 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,
key_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!key_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
mask_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!mask_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index 2ff1a98fda..7dd5a60966 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -88,7 +88,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
(2 * DIST_PARAM_IOVA_SIZE), RTE_CACHE_LINE_SIZE);
if (!flow) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto creation_error;
}
key_iova = (void *)((size_t)flow + sizeof(struct rte_flow));
@@ -211,7 +211,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
vf_conf = (const struct rte_flow_action_vf *)(actions[0]->conf);
if (vf_conf->id == 0 || vf_conf->id > dpdmux_dev->num_ifs) {
- DPAA2_PMD_ERR("Invalid destination id\n");
+ DPAA2_PMD_ERR("Invalid destination id");
goto creation_error;
}
dpdmux_action.dest_if = vf_conf->id;
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index fbfdf360d1..4fde9b95a0 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -423,7 +423,7 @@ ls_mac_serdes_lpbk_support(uint16_t mac_id,
sd_idx = ls_serdes_cfg_to_idx(sd_cfg, sd_id);
if (sd_idx < 0) {
- DPAA2_PMD_ERR("Serdes protocol(0x%02x) does not exist\n",
+ DPAA2_PMD_ERR("Serdes protocol(0x%02x) does not exist",
sd_cfg);
return false;
}
@@ -552,7 +552,7 @@ ls_serdes_eth_lpbk(uint16_t mac_id, int en)
(serdes_id - LSX_SERDES_1) * 0x10000,
sizeof(struct ccsr_ls_serdes) / 64 * 64 + 64);
if (!serdes_base) {
- DPAA2_PMD_ERR("Serdes register map failed\n");
+ DPAA2_PMD_ERR("Serdes register map failed");
return -ENOMEM;
}
@@ -587,7 +587,7 @@ lx_serdes_eth_lpbk(uint16_t mac_id, int en)
(serdes_id - LSX_SERDES_1) * 0x10000,
sizeof(struct ccsr_lx_serdes) / 64 * 64 + 64);
if (!serdes_base) {
- DPAA2_PMD_ERR("Serdes register map failed\n");
+ DPAA2_PMD_ERR("Serdes register map failed");
return -ENOMEM;
}
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 23f7c4132d..b64232b88f 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -640,7 +640,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
ret = dpaa2_affine_qbman_swp();
if (ret) {
- DPAA2_PMD_ERR("Failed to allocate IO portal, tid: %d\n",
+ DPAA2_PMD_ERR("Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -691,7 +691,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
hw_annot_addr = (void *)((size_t)v_addr + DPAA2_FD_PTA_SIZE);
fas = hw_annot_addr;
- DPAA2_PMD_ERR("\n\n[%d] error packet on port[%d]:"
+ DPAA2_PMD_ERR("[%d] error packet on port[%d]:"
" fd_off: %d, fd_err: %x, fas_status: %x",
rte_lcore_id(), eth_data->port_id,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ERR(fd),
@@ -976,7 +976,7 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1107,7 +1107,7 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1256,7 +1256,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1573,7 +1573,7 @@ dpaa2_dev_tx_multi_txq_ordered(void **queue,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1747,7 +1747,7 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index 36a14526a5..59f7a172c6 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -165,7 +165,7 @@ int dpaa2_eth_load_wriop_soft_parser(struct dpaa2_dev_priv *priv,
addr = rte_malloc(NULL, sp_param.size, 64);
if (!addr) {
- DPAA2_PMD_ERR("Memory unavailable for soft parser param\n");
+ DPAA2_PMD_ERR("Memory unavailable for soft parser param");
return -1;
}
@@ -174,7 +174,7 @@ int dpaa2_eth_load_wriop_soft_parser(struct dpaa2_dev_priv *priv,
ret = dpni_load_sw_sequence(dpni, CMD_PRI_LOW, priv->token, &cfg);
if (ret) {
- DPAA2_PMD_ERR("dpni_load_sw_sequence failed\n");
+ DPAA2_PMD_ERR("dpni_load_sw_sequence failed");
rte_free(addr);
return ret;
}
@@ -214,7 +214,7 @@ int dpaa2_eth_enable_wriop_soft_parser(struct dpaa2_dev_priv *priv,
if (cfg.param_size) {
param_addr = rte_malloc(NULL, cfg.param_size, 64);
if (!param_addr) {
- DPAA2_PMD_ERR("Memory unavailable for soft parser param\n");
+ DPAA2_PMD_ERR("Memory unavailable for soft parser param");
return -1;
}
@@ -227,7 +227,7 @@ int dpaa2_eth_enable_wriop_soft_parser(struct dpaa2_dev_priv *priv,
ret = dpni_enable_sw_sequence(dpni, CMD_PRI_LOW, priv->token, &cfg);
if (ret) {
- DPAA2_PMD_ERR("dpni_enable_sw_sequence failed for dpni%d\n",
+ DPAA2_PMD_ERR("dpni_enable_sw_sequence failed for dpni%d",
priv->hw_id);
rte_free(param_addr);
return ret;
diff --git a/drivers/net/dpaa2/dpaa2_tm.c b/drivers/net/dpaa2/dpaa2_tm.c
index cb854964b4..97d65e7181 100644
--- a/drivers/net/dpaa2/dpaa2_tm.c
+++ b/drivers/net/dpaa2/dpaa2_tm.c
@@ -584,7 +584,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node)
return -1;
}
- DPAA2_PMD_DEBUG("tc_id = %d, channel = %d\n\n", tc_id,
+ DPAA2_PMD_DEBUG("tc_id = %d, channel = %d", tc_id,
node->parent->channel_id);
ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_TX,
((node->parent->channel_id << 8) | tc_id),
@@ -653,7 +653,7 @@ dpaa2_tm_sort_and_configure(struct rte_eth_dev *dev,
int i;
if (n == 1) {
- DPAA2_PMD_DEBUG("node id = %d\n, priority = %d, index = %d\n",
+ DPAA2_PMD_DEBUG("node id = %d, priority = %d, index = %d",
nodes[n - 1]->id, nodes[n - 1]->priority,
n - 1);
dpaa2_tm_configure_queue(dev, nodes[n - 1]);
@@ -669,7 +669,7 @@ dpaa2_tm_sort_and_configure(struct rte_eth_dev *dev,
}
dpaa2_tm_sort_and_configure(dev, nodes, n - 1);
- DPAA2_PMD_DEBUG("node id = %d\n, priority = %d, index = %d\n",
+ DPAA2_PMD_DEBUG("node id = %d, priority = %d, index = %d",
nodes[n - 1]->id, nodes[n - 1]->priority,
n - 1);
dpaa2_tm_configure_queue(dev, nodes[n - 1]);
@@ -709,7 +709,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
}
}
if (i > 0) {
- DPAA2_PMD_DEBUG("Configure queues\n");
+ DPAA2_PMD_DEBUG("Configure queues");
dpaa2_tm_sort_and_configure(dev, nodes, i);
}
}
@@ -733,13 +733,13 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
node->profile->params.peak.rate / (1024 * 1024);
/* root node */
if (node->parent == NULL) {
- DPAA2_PMD_DEBUG("LNI S.rate = %u, burst =%u\n",
+ DPAA2_PMD_DEBUG("LNI S.rate = %u, burst =%u",
tx_cr_shaper.rate_limit,
tx_cr_shaper.max_burst_size);
param = 0x2;
param |= node->profile->params.pkt_length_adjust << 16;
} else {
- DPAA2_PMD_DEBUG("Channel = %d S.rate = %u\n",
+ DPAA2_PMD_DEBUG("Channel = %d S.rate = %u",
node->channel_id,
tx_cr_shaper.rate_limit);
param = (node->channel_id << 8);
@@ -871,15 +871,15 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
"Scheduling Failed\n");
goto out;
}
- DPAA2_PMD_DEBUG("########################################\n");
- DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
+ DPAA2_PMD_DEBUG("########################################");
+ DPAA2_PMD_DEBUG("Channel idx = %d", prio_cfg.channel_idx);
for (t = 0; t < DPNI_MAX_TC; t++) {
DPAA2_PMD_DEBUG("tc = %d mode = %d ", t, prio_cfg.tc_sched[t].mode);
- DPAA2_PMD_DEBUG("delta = %d\n", prio_cfg.tc_sched[t].delta_bandwidth);
+ DPAA2_PMD_DEBUG("delta = %d", prio_cfg.tc_sched[t].delta_bandwidth);
}
- DPAA2_PMD_DEBUG("prioritya = %d\n", prio_cfg.prio_group_A);
- DPAA2_PMD_DEBUG("priorityb = %d\n", prio_cfg.prio_group_B);
- DPAA2_PMD_DEBUG("separate grps = %d\n\n", prio_cfg.separate_groups);
+ DPAA2_PMD_DEBUG("prioritya = %d", prio_cfg.prio_group_A);
+ DPAA2_PMD_DEBUG("priorityb = %d", prio_cfg.prio_group_B);
+ DPAA2_PMD_DEBUG("separate grps = %d", prio_cfg.separate_groups);
}
return 0;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 095be27b08..1e0a483d4a 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5116,7 +5116,7 @@ eth_igb_get_module_info(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR,
"Address change required to access page 0xA2, "
"but not supported. Please report the module "
- "type to the driver maintainers.\n");
+ "type to the driver maintainers.");
page_swap = true;
}
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index d02ee206f1..ffbecc407c 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -151,7 +151,7 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
char buf[RTE_ETHER_ADDR_FMT_SIZE];
rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
- ENETC_PMD_NOTICE("%s%s\n", name, buf);
+ ENETC_PMD_NOTICE("%s%s", name, buf);
}
static int
@@ -198,7 +198,7 @@ enetc_hardware_init(struct enetc_eth_hw *hw)
char *first_byte;
ENETC_PMD_NOTICE("MAC is not available for this SI, "
- "set random MAC\n");
+ "set random MAC");
mac = (uint32_t *)hw->mac.addr;
*mac = (uint32_t)rte_rand();
first_byte = (char *)mac;
diff --git a/drivers/net/enetfec/enet_ethdev.c b/drivers/net/enetfec/enet_ethdev.c
index 898aad1c37..8c7067fbb5 100644
--- a/drivers/net/enetfec/enet_ethdev.c
+++ b/drivers/net/enetfec/enet_ethdev.c
@@ -253,7 +253,7 @@ enetfec_eth_link_update(struct rte_eth_dev *dev,
link.link_status = lstatus;
link.link_speed = RTE_ETH_SPEED_NUM_1G;
- ENETFEC_PMD_INFO("Port (%d) link is %s\n", dev->data->port_id,
+ ENETFEC_PMD_INFO("Port (%d) link is %s", dev->data->port_id,
"Up");
return rte_eth_linkstatus_set(dev, &link);
@@ -462,7 +462,7 @@ enetfec_rx_queue_setup(struct rte_eth_dev *dev,
}
if (queue_idx >= ENETFEC_MAX_Q) {
- ENETFEC_PMD_ERR("Invalid queue id %" PRIu16 ", max %d\n",
+ ENETFEC_PMD_ERR("Invalid queue id %" PRIu16 ", max %d",
queue_idx, ENETFEC_MAX_Q);
return -EINVAL;
}
diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
index 6539cbb354..9f4e896985 100644
--- a/drivers/net/enetfec/enet_uio.c
+++ b/drivers/net/enetfec/enet_uio.c
@@ -177,7 +177,7 @@ config_enetfec_uio(struct enetfec_private *fep)
/* Mapping is done only one time */
if (enetfec_count > 0) {
- ENETFEC_PMD_INFO("Mapped!\n");
+ ENETFEC_PMD_INFO("Mapped!");
return 0;
}
@@ -191,7 +191,7 @@ config_enetfec_uio(struct enetfec_private *fep)
/* Open device file */
uio_job->uio_fd = open(uio_device_file_name, O_RDWR);
if (uio_job->uio_fd < 0) {
- ENETFEC_PMD_WARN("Unable to open ENETFEC_UIO file\n");
+ ENETFEC_PMD_WARN("Unable to open ENETFEC_UIO file");
return -1;
}
@@ -230,7 +230,7 @@ enetfec_configure(void)
d = opendir(FEC_UIO_DEVICE_SYS_ATTR_PATH);
if (d == NULL) {
- ENETFEC_PMD_ERR("\nError opening directory '%s': %s\n",
+ ENETFEC_PMD_ERR("Error opening directory '%s': %s",
FEC_UIO_DEVICE_SYS_ATTR_PATH, strerror(errno));
return -1;
}
@@ -249,7 +249,7 @@ enetfec_configure(void)
ret = sscanf(dir->d_name + strlen("uio"), "%d",
&uio_minor_number);
if (ret < 0)
- ENETFEC_PMD_ERR("Error: not find minor number\n");
+ ENETFEC_PMD_ERR("Error: not find minor number");
/*
* Open file uioX/name and read first line which
* contains the name for the device. Based on the
@@ -259,7 +259,7 @@ enetfec_configure(void)
ret = file_read_first_line(FEC_UIO_DEVICE_SYS_ATTR_PATH,
dir->d_name, "name", uio_name);
if (ret != 0) {
- ENETFEC_PMD_INFO("file_read_first_line failed\n");
+ ENETFEC_PMD_INFO("file_read_first_line failed");
closedir(d);
return -1;
}
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index cad8db2f6f..c1dba0c0fd 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -672,7 +672,7 @@ static void debug_log_add_del_addr(struct rte_ether_addr *addr, bool add)
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, addr);
- ENICPMD_LOG(DEBUG, " %s address %s\n",
+ ENICPMD_LOG(DEBUG, " %s address %s",
add ? "add" : "remove", mac_str);
}
@@ -695,7 +695,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
rte_is_broadcast_ether_addr(addr)) {
rte_ether_format_addr(mac_str,
RTE_ETHER_ADDR_FMT_SIZE, addr);
- ENICPMD_LOG(ERR, " invalid multicast address %s\n",
+ ENICPMD_LOG(ERR, " invalid multicast address %s",
mac_str);
return -EINVAL;
}
@@ -703,7 +703,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
/* Flush all if requested */
if (nb_mc_addr == 0 || mc_addr_set == NULL) {
- ENICPMD_LOG(DEBUG, " flush multicast addresses\n");
+ ENICPMD_LOG(DEBUG, " flush multicast addresses");
for (i = 0; i < enic->mc_count; i++) {
addr = &enic->mc_addrs[i];
debug_log_add_del_addr(addr, false);
@@ -716,7 +716,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
}
if (nb_mc_addr > ENIC_MULTICAST_PERFECT_FILTERS) {
- ENICPMD_LOG(ERR, " too many multicast addresses: max=%d\n",
+ ENICPMD_LOG(ERR, " too many multicast addresses: max=%d",
ENIC_MULTICAST_PERFECT_FILTERS);
return -ENOSPC;
}
@@ -982,7 +982,7 @@ static int udp_tunnel_common_check(struct enic *enic,
tnl->prot_type != RTE_ETH_TUNNEL_TYPE_GENEVE)
return -ENOTSUP;
if (!enic->overlay_offload) {
- ENICPMD_LOG(DEBUG, " overlay offload is not supported\n");
+ ENICPMD_LOG(DEBUG, " overlay offload is not supported");
return -ENOTSUP;
}
return 0;
@@ -995,10 +995,10 @@ static int update_tunnel_port(struct enic *enic, uint16_t port, bool vxlan)
cfg = vxlan ? OVERLAY_CFG_VXLAN_PORT_UPDATE :
OVERLAY_CFG_GENEVE_PORT_UPDATE;
if (vnic_dev_overlay_offload_cfg(enic->vdev, cfg, port)) {
- ENICPMD_LOG(DEBUG, " failed to update tunnel port\n");
+ ENICPMD_LOG(DEBUG, " failed to update tunnel port");
return -EINVAL;
}
- ENICPMD_LOG(DEBUG, " updated %s port to %u\n",
+ ENICPMD_LOG(DEBUG, " updated %s port to %u",
vxlan ? "vxlan" : "geneve", port);
if (vxlan)
enic->vxlan_port = port;
@@ -1029,7 +1029,7 @@ static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,
* "Adding" a new port number replaces it.
*/
if (tnl->udp_port == port || tnl->udp_port == 0) {
- ENICPMD_LOG(DEBUG, " %u is already configured or invalid\n",
+ ENICPMD_LOG(DEBUG, " %u is already configured or invalid",
tnl->udp_port);
return -EINVAL;
}
@@ -1061,7 +1061,7 @@ static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
* which is tied to inner RSS and TSO.
*/
if (tnl->udp_port != port) {
- ENICPMD_LOG(DEBUG, " %u is not a configured tunnel port\n",
+ ENICPMD_LOG(DEBUG, " %u is not a configured tunnel port",
tnl->udp_port);
return -EINVAL;
}
@@ -1325,7 +1325,7 @@ static int eth_enic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- ENICPMD_LOG(ERR, "unsupported representor type: %s\n",
+ ENICPMD_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index e6c9ad442a..758000ea21 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1351,14 +1351,14 @@ static void
enic_dump_actions(const struct filter_action_v2 *ea)
{
if (ea->type == FILTER_ACTION_RQ_STEERING) {
- ENICPMD_LOG(INFO, "Action(V1), queue: %u\n", ea->rq_idx);
+ ENICPMD_LOG(INFO, "Action(V1), queue: %u", ea->rq_idx);
} else if (ea->type == FILTER_ACTION_V2) {
- ENICPMD_LOG(INFO, "Actions(V2)\n");
+ ENICPMD_LOG(INFO, "Actions(V2)");
if (ea->flags & FILTER_ACTION_RQ_STEERING_FLAG)
- ENICPMD_LOG(INFO, "\tqueue: %u\n",
+ ENICPMD_LOG(INFO, "\tqueue: %u",
enic_sop_rq_idx_to_rte_idx(ea->rq_idx));
if (ea->flags & FILTER_ACTION_FILTER_ID_FLAG)
- ENICPMD_LOG(INFO, "\tfilter_id: %u\n", ea->filter_id);
+ ENICPMD_LOG(INFO, "\tfilter_id: %u", ea->filter_id);
}
}
@@ -1374,13 +1374,13 @@ enic_dump_filter(const struct filter_v2 *filt)
switch (filt->type) {
case FILTER_IPV4_5TUPLE:
- ENICPMD_LOG(INFO, "FILTER_IPV4_5TUPLE\n");
+ ENICPMD_LOG(INFO, "FILTER_IPV4_5TUPLE");
break;
case FILTER_USNIC_IP:
case FILTER_DPDK_1:
/* FIXME: this should be a loop */
gp = &filt->u.generic_1;
- ENICPMD_LOG(INFO, "Filter: vlan: 0x%04x, mask: 0x%04x\n",
+ ENICPMD_LOG(INFO, "Filter: vlan: 0x%04x, mask: 0x%04x",
gp->val_vlan, gp->mask_vlan);
if (gp->mask_flags & FILTER_GENERIC_1_IPV4)
@@ -1438,7 +1438,7 @@ enic_dump_filter(const struct filter_v2 *filt)
? "ipfrag(y)" : "ipfrag(n)");
else
sprintf(ipfrag, "%s ", "ipfrag(x)");
- ENICPMD_LOG(INFO, "\tFlags: %s%s%s%s%s%s%s%s\n", ip4, ip6, udp,
+ ENICPMD_LOG(INFO, "\tFlags: %s%s%s%s%s%s%s%s", ip4, ip6, udp,
tcp, tcpudp, ip4csum, l4csum, ipfrag);
for (i = 0; i < FILTER_GENERIC_1_NUM_LAYERS; i++) {
@@ -1455,7 +1455,7 @@ enic_dump_filter(const struct filter_v2 *filt)
bp += 2;
}
*bp = '\0';
- ENICPMD_LOG(INFO, "\tL%u mask: %s\n", i + 2, buf);
+ ENICPMD_LOG(INFO, "\tL%u mask: %s", i + 2, buf);
bp = buf;
for (j = 0; j <= mbyte; j++) {
sprintf(bp, "%02x",
@@ -1463,11 +1463,11 @@ enic_dump_filter(const struct filter_v2 *filt)
bp += 2;
}
*bp = '\0';
- ENICPMD_LOG(INFO, "\tL%u val: %s\n", i + 2, buf);
+ ENICPMD_LOG(INFO, "\tL%u val: %s", i + 2, buf);
}
break;
default:
- ENICPMD_LOG(INFO, "FILTER UNKNOWN\n");
+ ENICPMD_LOG(INFO, "FILTER UNKNOWN");
break;
}
}
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 5d8d29135c..8469e06de9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -64,7 +64,7 @@ static int enic_vf_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
/* Pass vf not pf because of cq index calculation. See enic_alloc_wq */
err = enic_alloc_wq(&vf->enic, queue_idx, socket_id, nb_desc);
if (err) {
- ENICPMD_LOG(ERR, "error in allocating wq\n");
+ ENICPMD_LOG(ERR, "error in allocating wq");
return err;
}
return 0;
@@ -104,7 +104,7 @@ static int enic_vf_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
ret = enic_alloc_rq(&vf->enic, queue_idx, socket_id, mp, nb_desc,
rx_conf->rx_free_thresh);
if (ret) {
- ENICPMD_LOG(ERR, "error in allocating rq\n");
+ ENICPMD_LOG(ERR, "error in allocating rq");
return ret;
}
return 0;
@@ -230,14 +230,14 @@ static int enic_vf_dev_start(struct rte_eth_dev *eth_dev)
/* enic_enable */
ret = enic_alloc_rx_queue_mbufs(pf, &pf->rq[index]);
if (ret) {
- ENICPMD_LOG(ERR, "Failed to alloc sop RX queue mbufs\n");
+ ENICPMD_LOG(ERR, "Failed to alloc sop RX queue mbufs");
return ret;
}
ret = enic_alloc_rx_queue_mbufs(pf, data_rq);
if (ret) {
/* Release the allocated mbufs for the sop rq*/
enic_rxmbuf_queue_release(pf, &pf->rq[index]);
- ENICPMD_LOG(ERR, "Failed to alloc data RX queue mbufs\n");
+ ENICPMD_LOG(ERR, "Failed to alloc data RX queue mbufs");
return ret;
}
enic_start_rq(pf, vf->pf_rq_sop_idx);
@@ -430,7 +430,7 @@ static int enic_vf_stats_get(struct rte_eth_dev *eth_dev,
/* Get VF stats via PF */
err = vnic_dev_stats_dump(vf->enic.vdev, &vs);
if (err) {
- ENICPMD_LOG(ERR, "error in getting stats\n");
+ ENICPMD_LOG(ERR, "error in getting stats");
return err;
}
stats->ipackets = vs->rx.rx_frames_ok;
@@ -453,7 +453,7 @@ static int enic_vf_stats_reset(struct rte_eth_dev *eth_dev)
/* Ask PF to clear VF stats */
err = vnic_dev_stats_clear(vf->enic.vdev);
if (err)
- ENICPMD_LOG(ERR, "error in clearing stats\n");
+ ENICPMD_LOG(ERR, "error in clearing stats");
return err;
}
@@ -581,7 +581,7 @@ static int get_vf_config(struct enic_vf_representor *vf)
/* VF MAC */
err = vnic_dev_get_mac_addr(vf->enic.vdev, vf->mac_addr.addr_bytes);
if (err) {
- ENICPMD_LOG(ERR, "error in getting MAC address\n");
+ ENICPMD_LOG(ERR, "error in getting MAC address");
return err;
}
rte_ether_addr_copy(&vf->mac_addr, vf->eth_dev->data->mac_addrs);
@@ -591,7 +591,7 @@ static int get_vf_config(struct enic_vf_representor *vf)
offsetof(struct vnic_enet_config, mtu),
sizeof(c->mtu), &c->mtu);
if (err) {
- ENICPMD_LOG(ERR, "error in getting MTU\n");
+ ENICPMD_LOG(ERR, "error in getting MTU");
return err;
}
/*
diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index 3b867437d7..1b8f1d3050 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -406,7 +406,7 @@ failsafe_args_parse(struct rte_eth_dev *dev, const char *params)
kvlist = rte_kvargs_parse(mut_params,
pmd_failsafe_init_parameters);
if (kvlist == NULL) {
- ERROR("Error parsing parameters, usage:\n"
+ ERROR("Error parsing parameters, usage:"
PMD_FAILSAFE_PARAM_STRING);
return -1;
}
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index d71b512f81..e79d3b4120 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -16,7 +16,7 @@ fs_ethdev_portid_get(const char *name, uint16_t *port_id)
size_t len;
if (name == NULL) {
- DEBUG("Null pointer is specified\n");
+ DEBUG("Null pointer is specified");
return -EINVAL;
}
len = strlen(name);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 031f3eb13f..dc4aba6e30 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -38,7 +38,7 @@ fs_flow_complain(struct rte_flow_error *error)
errstr = "unknown type";
else
errstr = errstrlist[error->type];
- ERROR("Caught error type %d (%s): %s%s\n",
+ ERROR("Caught error type %d (%s): %s%s",
error->type, errstr,
error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ",
error->cause), buf) : "",
@@ -640,7 +640,7 @@ failsafe_eth_new_event_callback(uint16_t port_id,
if (sdev->state >= DEV_PROBED)
continue;
if (dev->device == NULL) {
- WARN("Trying to probe malformed device %s.\n",
+ WARN("Trying to probe malformed device %s.",
sdev->devargs.name);
continue;
}
diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c
index 969ded6ced..68b7310b85 100644
--- a/drivers/net/failsafe/failsafe_intr.c
+++ b/drivers/net/failsafe/failsafe_intr.c
@@ -173,17 +173,17 @@ fs_rx_event_proxy_service_install(struct fs_priv *priv)
/* run the service */
ret = rte_service_component_runstate_set(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed Setting component runstate\n");
+ ERROR("Failed Setting component runstate");
return ret;
}
ret = rte_service_set_stats_enable(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed enabling stats\n");
+ ERROR("Failed enabling stats");
return ret;
}
ret = rte_service_runstate_set(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed to run service\n");
+ ERROR("Failed to run service");
return ret;
}
priv->rxp.sstate = SS_READY;
diff --git a/drivers/net/gve/base/gve_adminq.c b/drivers/net/gve/base/gve_adminq.c
index 09c6bff026..bcb983e4a0 100644
--- a/drivers/net/gve/base/gve_adminq.c
+++ b/drivers/net/gve/base/gve_adminq.c
@@ -11,7 +11,7 @@
#define GVE_ADMINQ_SLEEP_LEN 20
#define GVE_MAX_ADMINQ_EVENT_COUNTER_CHECK 100
-#define GVE_DEVICE_OPTION_ERROR_FMT "%s option error:\n Expected: length=%d, feature_mask=%x.\n Actual: length=%d, feature_mask=%x."
+#define GVE_DEVICE_OPTION_ERROR_FMT "%s option error: Expected: length=%d, feature_mask=%x. Actual: length=%d, feature_mask=%x."
#define GVE_DEVICE_OPTION_TOO_BIG_FMT "Length of %s option larger than expected. Possible older version of guest driver."
@@ -736,7 +736,7 @@ gve_set_max_desc_cnt(struct gve_priv *priv,
{
if (priv->queue_format == GVE_DQO_RDA_FORMAT) {
PMD_DRV_LOG(DEBUG, "Overriding max ring size from device for DQ "
- "queue format to 4096.\n");
+ "queue format to 4096.");
priv->max_rx_desc_cnt = GVE_MAX_QUEUE_SIZE_DQO;
priv->max_tx_desc_cnt = GVE_MAX_QUEUE_SIZE_DQO;
return;
diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
index 89b6ef384a..1f5fa3f1da 100644
--- a/drivers/net/gve/gve_rx.c
+++ b/drivers/net/gve/gve_rx.c
@@ -306,7 +306,7 @@ gve_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
/* Ring size is required to be a power of two. */
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.\n",
+ PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.",
nb_desc);
return -EINVAL;
}
diff --git a/drivers/net/gve/gve_tx.c b/drivers/net/gve/gve_tx.c
index 658bfb972b..015ea9646b 100644
--- a/drivers/net/gve/gve_tx.c
+++ b/drivers/net/gve/gve_tx.c
@@ -561,7 +561,7 @@ gve_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, uint16_t nb_desc,
/* Ring size is required to be a power of two. */
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.\n",
+ PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.",
nb_desc);
return -EINVAL;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_eqs.c b/drivers/net/hinic/base/hinic_pmd_eqs.c
index fecb653401..f0e1139a98 100644
--- a/drivers/net/hinic/base/hinic_pmd_eqs.c
+++ b/drivers/net/hinic/base/hinic_pmd_eqs.c
@@ -471,7 +471,7 @@ int hinic_comm_aeqs_init(struct hinic_hwdev *hwdev)
num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif);
if (num_aeqs < HINIC_MIN_AEQS) {
- PMD_DRV_LOG(ERR, "PMD need %d AEQs, Chip has %d\n",
+ PMD_DRV_LOG(ERR, "PMD need %d AEQs, Chip has %d",
HINIC_MIN_AEQS, num_aeqs);
return -EINVAL;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index 92a7cc1a11..a75a6953ad 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -310,7 +310,7 @@ static int mbox_msg_ack_aeqn(struct hinic_hwdev *hwdev)
/* This is used for ovs */
msg_ack_aeqn = HINIC_AEQN_1;
} else {
- PMD_DRV_LOG(ERR, "Warning: Invalid aeq num: %d\n", aeq_num);
+ PMD_DRV_LOG(ERR, "Warning: Invalid aeq num: %d", aeq_num);
msg_ack_aeqn = -1;
}
@@ -372,13 +372,13 @@ static int init_mbox_info(struct hinic_recv_mbox *mbox_info)
mbox_info->mbox = kzalloc(MBOX_MAX_BUF_SZ, GFP_KERNEL);
if (!mbox_info->mbox) {
- PMD_DRV_LOG(ERR, "Alloc mbox buf_in mem failed\n");
+ PMD_DRV_LOG(ERR, "Alloc mbox buf_in mem failed");
return -ENOMEM;
}
mbox_info->buf_out = kzalloc(MBOX_MAX_BUF_SZ, GFP_KERNEL);
if (!mbox_info->buf_out) {
- PMD_DRV_LOG(ERR, "Alloc mbox buf_out mem failed\n");
+ PMD_DRV_LOG(ERR, "Alloc mbox buf_out mem failed");
err = -ENOMEM;
goto alloc_buf_out_err;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index 8c08d63286..a08020313f 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -683,7 +683,7 @@ int hinic_get_pause_info(void *hwdev, struct nic_pause_config *nic_pause)
&pause_info, sizeof(pause_info),
&pause_info, &out_size);
if (err || !out_size || pause_info.mgmt_msg_head.status) {
- PMD_DRV_LOG(ERR, "Failed to get pause info, err: %d, status: 0x%x, out size: 0x%x\n",
+ PMD_DRV_LOG(ERR, "Failed to get pause info, err: %d, status: 0x%x, out size: 0x%x",
err, pause_info.mgmt_msg_head.status, out_size);
return -EIO;
}
@@ -1332,7 +1332,7 @@ int hinic_get_mgmt_version(void *hwdev, char *fw)
&fw_ver, sizeof(fw_ver), &fw_ver,
&out_size);
if (err || !out_size || fw_ver.mgmt_msg_head.status) {
- PMD_DRV_LOG(ERR, "Failed to get mgmt version, err: %d, status: 0x%x, out size: 0x%x\n",
+ PMD_DRV_LOG(ERR, "Failed to get mgmt version, err: %d, status: 0x%x, out size: 0x%x",
err, fw_ver.mgmt_msg_head.status, out_size);
return -EIO;
}
@@ -1767,7 +1767,7 @@ int hinic_set_fdir_filter(void *hwdev, u8 filter_type, u8 qid, u8 type_enable,
&port_filer_cmd, &out_size);
if (err || !out_size || port_filer_cmd.mgmt_msg_head.status) {
PMD_DRV_LOG(ERR, "Set port Q filter failed, err: %d, status: 0x%x, out size: 0x%x, type: 0x%x,"
- " enable: 0x%x, qid: 0x%x, filter_type_enable: 0x%x\n",
+ " enable: 0x%x, qid: 0x%x, filter_type_enable: 0x%x",
err, port_filer_cmd.mgmt_msg_head.status, out_size,
filter_type, enable, qid, type_enable);
return -EIO;
@@ -1819,7 +1819,7 @@ int hinic_set_normal_filter(void *hwdev, u8 qid, u8 normal_type_enable,
&port_filer_cmd, &out_size);
if (err || !out_size || port_filer_cmd.mgmt_msg_head.status) {
PMD_DRV_LOG(ERR, "Set normal filter failed, err: %d, status: 0x%x, out size: 0x%x, fdir_flag: 0x%x,"
- " enable: 0x%x, qid: 0x%x, normal_type_enable: 0x%x, key:0x%x\n",
+ " enable: 0x%x, qid: 0x%x, normal_type_enable: 0x%x, key:0x%x",
err, port_filer_cmd.mgmt_msg_head.status, out_size,
flag, enable, qid, normal_type_enable, key);
return -EIO;
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index d4978e0649..cb5c013b21 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1914,7 +1914,7 @@ static int hinic_flow_ctrl_set(struct rte_eth_dev *dev,
nic_dev->nic_pause.rx_pause = nic_pause.rx_pause;
nic_dev->nic_pause.tx_pause = nic_pause.tx_pause;
- PMD_DRV_LOG(INFO, "Set pause options, tx: %s, rx: %s, auto: %s\n",
+ PMD_DRV_LOG(INFO, "Set pause options, tx: %s, rx: %s, auto: %s",
nic_pause.tx_pause ? "on" : "off",
nic_pause.rx_pause ? "on" : "off",
nic_pause.auto_neg ? "on" : "off");
@@ -2559,7 +2559,7 @@ static int hinic_pf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
valid_cos_bitmap = hwdev->cfg_mgmt->svc_cap.valid_cos_bitmap;
if (!valid_cos_bitmap) {
- PMD_DRV_LOG(ERR, "PF has none cos to support\n");
+ PMD_DRV_LOG(ERR, "PF has none cos to support");
return -EFAULT;
}
diff --git a/drivers/net/hns3/hns3_dump.c b/drivers/net/hns3/hns3_dump.c
index cb369be5be..a3b58e0a8f 100644
--- a/drivers/net/hns3/hns3_dump.c
+++ b/drivers/net/hns3/hns3_dump.c
@@ -242,7 +242,7 @@ hns3_get_rx_queue(struct rte_eth_dev *dev)
for (queue_id = 0; queue_id < dev->data->nb_rx_queues; queue_id++) {
rx_queues = dev->data->rx_queues;
if (rx_queues == NULL || rx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect rx_queues is NULL!\n");
+ hns3_err(hw, "detect rx_queues is NULL!");
return NULL;
}
@@ -267,7 +267,7 @@ hns3_get_tx_queue(struct rte_eth_dev *dev)
for (queue_id = 0; queue_id < dev->data->nb_tx_queues; queue_id++) {
tx_queues = dev->data->tx_queues;
if (tx_queues == NULL || tx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect tx_queues is NULL!\n");
+ hns3_err(hw, "detect tx_queues is NULL!");
return NULL;
}
@@ -297,7 +297,7 @@ hns3_get_rxtx_fake_queue_info(FILE *file, struct rte_eth_dev *dev)
if (dev->data->nb_rx_queues < dev->data->nb_tx_queues) {
rx_queues = hw->fkq_data.rx_queues;
if (rx_queues == NULL || rx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect rx_queues is NULL!\n");
+ hns3_err(hw, "detect rx_queues is NULL!");
return;
}
rxq = (struct hns3_rx_queue *)rx_queues[queue_id];
@@ -311,7 +311,7 @@ hns3_get_rxtx_fake_queue_info(FILE *file, struct rte_eth_dev *dev)
queue_id = 0;
if (tx_queues == NULL || tx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect tx_queues is NULL!\n");
+ hns3_err(hw, "detect tx_queues is NULL!");
return;
}
txq = (struct hns3_tx_queue *)tx_queues[queue_id];
@@ -961,7 +961,7 @@ hns3_rx_descriptor_dump(const struct rte_eth_dev *dev, uint16_t queue_id,
return -EINVAL;
if (num > rxq->nb_rx_desc) {
- hns3_err(hw, "Invalid BD num=%u\n", num);
+ hns3_err(hw, "Invalid BD num=%u", num);
return -EINVAL;
}
@@ -1003,7 +1003,7 @@ hns3_tx_descriptor_dump(const struct rte_eth_dev *dev, uint16_t queue_id,
return -EINVAL;
if (num > txq->nb_tx_desc) {
- hns3_err(hw, "Invalid BD num=%u\n", num);
+ hns3_err(hw, "Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 26fa2eb951..f7162ee7bc 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1806,7 +1806,7 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret)
- hns3_err(hw, "fail to %s TM QCN mem errors, ret = %d\n",
+ hns3_err(hw, "fail to %s TM QCN mem errors, ret = %d",
en ? "enable" : "disable", ret);
return ret;
@@ -1847,7 +1847,7 @@ enable_common_err_intr(struct hns3_adapter *hns, bool en)
ret = hns3_cmd_send(hw, &desc[0], RTE_DIM(desc));
if (ret)
- hns3_err(hw, "fail to %s common err interrupts, ret = %d\n",
+ hns3_err(hw, "fail to %s common err interrupts, ret = %d",
en ? "enable" : "disable", ret);
return ret;
@@ -1984,7 +1984,7 @@ query_num_bds(struct hns3_hw *hw, bool is_ras, uint32_t *mpf_bd_num,
pf_bd_num_val = rte_le_to_cpu_32(desc.data[1]);
if (mpf_bd_num_val < mpf_min_bd_num || pf_bd_num_val < pf_min_bd_num) {
hns3_err(hw, "error bd num: mpf(%u), min_mpf(%u), "
- "pf(%u), min_pf(%u)\n", mpf_bd_num_val, mpf_min_bd_num,
+ "pf(%u), min_pf(%u)", mpf_bd_num_val, mpf_min_bd_num,
pf_bd_num_val, pf_min_bd_num);
return -EINVAL;
}
@@ -2061,7 +2061,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
opcode = HNS3_OPC_QUERY_CLEAR_PF_RAS_INT;
break;
default:
- hns3_err(hw, "error hardware err_type = %d\n", err_type);
+ hns3_err(hw, "error hardware err_type = %d", err_type);
return -EINVAL;
}
@@ -2069,7 +2069,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
hns3_cmd_setup_basic_desc(&desc[0], opcode, true);
ret = hns3_cmd_send(hw, &desc[0], num);
if (ret) {
- hns3_err(hw, "query hw err int 0x%x cmd failed, ret = %d\n",
+ hns3_err(hw, "query hw err int 0x%x cmd failed, ret = %d",
opcode, ret);
return ret;
}
@@ -2097,7 +2097,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
hns3_cmd_reuse_desc(&desc[0], false);
ret = hns3_cmd_send(hw, &desc[0], num);
if (ret)
- hns3_err(hw, "clear all hw err int cmd failed, ret = %d\n",
+ hns3_err(hw, "clear all hw err int cmd failed, ret = %d",
ret);
return ret;
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 894ac6dd71..c6e77d21cb 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -50,7 +50,7 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret)
hns3_err(hw,
- "failed to %s ptp interrupt, ret = %d\n",
+ "failed to %s ptp interrupt, ret = %d",
en ? "enable" : "disable", ret);
return ret;
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index be1be6a89c..955bc7e3af 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -355,7 +355,7 @@ hns3_get_dfx_reg_bd_num(struct hns3_hw *hw, uint32_t *bd_num_list,
ret = hns3_cmd_send(hw, desc, HNS3_GET_DFX_REG_BD_NUM_SIZE);
if (ret) {
- hns3_err(hw, "fail to get dfx bd num, ret = %d.\n", ret);
+ hns3_err(hw, "fail to get dfx bd num, ret = %d.", ret);
return ret;
}
@@ -387,7 +387,7 @@ hns3_dfx_reg_cmd_send(struct hns3_hw *hw, struct hns3_cmd_desc *desc,
ret = hns3_cmd_send(hw, desc, bd_num);
if (ret)
hns3_err(hw, "fail to query dfx registers, opcode = 0x%04X, "
- "ret = %d.\n", opcode, ret);
+ "ret = %d.", opcode, ret);
return ret;
}
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f847bf82bc..42f51c7621 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -668,7 +668,7 @@ eth_i40e_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type: %s\n",
+ PMD_DRV_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
@@ -1583,10 +1583,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
val = I40E_READ_REG(hw, I40E_GL_FWSTS);
if (val & I40E_GL_FWSTS_FWS1B_MASK) {
- PMD_INIT_LOG(ERR, "\nERROR: "
- "Firmware recovery mode detected. Limiting functionality.\n"
- "Refer to the Intel(R) Ethernet Adapters and Devices "
- "User Guide for details on firmware recovery mode.");
+ PMD_INIT_LOG(ERR, "ERROR: Firmware recovery mode detected. Limiting functionality.");
return -EIO;
}
@@ -2326,7 +2323,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
status = i40e_aq_get_phy_capabilities(hw, false, true, &phy_ab,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
status);
return ret;
}
@@ -2336,7 +2333,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_ab,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d",
status);
return ret;
}
@@ -2361,7 +2358,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
* Warn users and config the default available speeds.
*/
if (is_up && !(force_speed & avail_speed)) {
- PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+ PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!");
phy_conf.link_speed = avail_speed;
} else {
phy_conf.link_speed = is_up ? force_speed : avail_speed;
@@ -6959,7 +6956,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_GL_MDET_TX_QUEUE_SHIFT) -
hw->func_caps.base_queue;
PMD_DRV_LOG(WARNING, "Malicious Driver Detection event 0x%02x on TX "
- "queue %d PF number 0x%02x VF number 0x%02x device %s\n",
+ "queue %d PF number 0x%02x VF number 0x%02x device %s",
event, queue, pf_num, vf_num, dev->data->name);
I40E_WRITE_REG(hw, I40E_GL_MDET_TX, I40E_MDD_CLEAR32);
mdd_detected = true;
@@ -6975,7 +6972,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
hw->func_caps.base_queue;
PMD_DRV_LOG(WARNING, "Malicious Driver Detection event 0x%02x on RX "
- "queue %d of function 0x%02x device %s\n",
+ "queue %d of function 0x%02x device %s",
event, queue, func, dev->data->name);
I40E_WRITE_REG(hw, I40E_GL_MDET_RX, I40E_MDD_CLEAR32);
mdd_detected = true;
@@ -6985,13 +6982,13 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
reg = I40E_READ_REG(hw, I40E_PF_MDET_TX);
if (reg & I40E_PF_MDET_TX_VALID_MASK) {
I40E_WRITE_REG(hw, I40E_PF_MDET_TX, I40E_MDD_CLEAR16);
- PMD_DRV_LOG(WARNING, "TX driver issue detected on PF\n");
+ PMD_DRV_LOG(WARNING, "TX driver issue detected on PF");
}
reg = I40E_READ_REG(hw, I40E_PF_MDET_RX);
if (reg & I40E_PF_MDET_RX_VALID_MASK) {
I40E_WRITE_REG(hw, I40E_PF_MDET_RX,
I40E_MDD_CLEAR16);
- PMD_DRV_LOG(WARNING, "RX driver issue detected on PF\n");
+ PMD_DRV_LOG(WARNING, "RX driver issue detected on PF");
}
}
@@ -7004,7 +7001,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_MDD_CLEAR16);
vf->num_mdd_events++;
PMD_DRV_LOG(WARNING, "TX driver issue detected on VF %d %-"
- PRIu64 "times\n",
+ PRIu64 "times",
i, vf->num_mdd_events);
}
@@ -7014,7 +7011,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_MDD_CLEAR16);
vf->num_mdd_events++;
PMD_DRV_LOG(WARNING, "RX driver issue detected on VF %d %-"
- PRIu64 "times\n",
+ PRIu64 "times",
i, vf->num_mdd_events);
}
}
@@ -11449,7 +11446,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE)) {
PMD_DRV_LOG(ERR,
"Module EEPROM memory read not supported. "
- "Please update the NVM image.\n");
+ "Please update the NVM image.");
return -EINVAL;
}
@@ -11460,7 +11457,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (hw->phy.link_info.phy_type == I40E_PHY_TYPE_EMPTY) {
PMD_DRV_LOG(ERR,
"Cannot read module EEPROM memory. "
- "No module connected.\n");
+ "No module connected.");
return -EINVAL;
}
@@ -11490,7 +11487,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (sff8472_swap & I40E_MODULE_SFF_ADDR_MODE) {
PMD_DRV_LOG(WARNING,
"Module address swap to access "
- "page 0xA2 is not supported.\n");
+ "page 0xA2 is not supported.");
modinfo->type = RTE_ETH_MODULE_SFF_8079;
modinfo->eeprom_len = RTE_ETH_MODULE_SFF_8079_LEN;
} else if (sff8472_comp == 0x00) {
@@ -11526,7 +11523,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
break;
default:
- PMD_DRV_LOG(ERR, "Module type unrecognized\n");
+ PMD_DRV_LOG(ERR, "Module type unrecognized");
return -EINVAL;
}
return 0;
@@ -11828,7 +11825,7 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
}
}
name[strlen(name) - 1] = '\0';
- PMD_DRV_LOG(INFO, "name = %s\n", name);
+ PMD_DRV_LOG(INFO, "name = %s", name);
if (!strcmp(name, "GTPC"))
new_pctype =
i40e_find_customized_pctype(pf,
@@ -11972,7 +11969,7 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
continue;
memset(name, 0, sizeof(name));
strcpy(name, proto[n].name);
- PMD_DRV_LOG(INFO, "name = %s\n", name);
+ PMD_DRV_LOG(INFO, "name = %s", name);
if (!strncasecmp(name, "PPPOE", 5))
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_L2_ETHER_PPPOE;
@@ -12317,7 +12314,7 @@ i40e_fec_get_capability(struct rte_eth_dev *dev,
if (hw->mac.type == I40E_MAC_X722 &&
!(hw->flags & I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE)) {
PMD_DRV_LOG(ERR, "Setting FEC encoding not supported by"
- " firmware. Please update the NVM image.\n");
+ " firmware. Please update the NVM image.");
return -ENOTSUP;
}
@@ -12359,7 +12356,7 @@ i40e_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
/* Get link info */
ret = i40e_aq_get_link_info(hw, enable_lse, &link_status, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get link information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get link information: %d",
ret);
return -ENOTSUP;
}
@@ -12369,7 +12366,7 @@ i40e_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = i40e_aq_get_phy_capabilities(hw, false, false, &abilities,
NULL);
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
ret);
return -ENOTSUP;
}
@@ -12435,7 +12432,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
if (hw->mac.type == I40E_MAC_X722 &&
!(hw->flags & I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE)) {
PMD_DRV_LOG(ERR, "Setting FEC encoding not supported by"
- " firmware. Please update the NVM image.\n");
+ " firmware. Please update the NVM image.");
return -ENOTSUP;
}
@@ -12507,7 +12504,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
status = i40e_aq_get_phy_capabilities(hw, false, false, &abilities,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
status);
return -ENOTSUP;
}
@@ -12524,7 +12521,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
config.fec_config = req_fec & I40E_AQ_PHY_FEC_CONFIG_MASK;
status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d",
status);
return -ENOTSUP;
}
@@ -12532,7 +12529,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
status = i40e_update_link_info(hw);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d",
status);
return -ENOTSUP;
}
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 15d9ff868f..4a47a8f7ee 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -1280,17 +1280,17 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
req_pairs = i40e_align_floor(req_pairs) << 1;
if (req_pairs == 0) {
- PMD_DRV_LOG(ERR, "VF %d tried to request 0 queues. Ignoring.\n",
+ PMD_DRV_LOG(ERR, "VF %d tried to request 0 queues. Ignoring.",
vf->vf_idx);
} else if (req_pairs > I40E_MAX_QP_NUM_PER_VF) {
PMD_DRV_LOG(ERR,
- "VF %d tried to request more than %d queues.\n",
+ "VF %d tried to request more than %d queues.",
vf->vf_idx,
I40E_MAX_QP_NUM_PER_VF);
vfres->num_queue_pairs = I40E_MAX_QP_NUM_PER_VF;
} else if (req_pairs > cur_pairs + pf->qp_pool.num_free) {
PMD_DRV_LOG(ERR, "VF %d requested %d queues (rounded to %d) "
- "but only %d available\n",
+ "but only %d available",
vf->vf_idx,
vfres->num_queue_pairs,
req_pairs,
@@ -1550,7 +1550,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
if (first_cycle && cur_cycle < first_cycle +
(uint64_t)pf->vf_msg_cfg.period * rte_get_timer_hz()) {
PMD_DRV_LOG(WARNING, "VF %u too much messages(%u in %u"
- " seconds),\n\tany new message from which"
+ " seconds), any new message from which"
" will be ignored during next %u seconds!",
vf_id, pf->vf_msg_cfg.max_msg,
(uint32_t)((cur_cycle - first_cycle +
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index ff977a3681..839c8a5442 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1229,11 +1229,11 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
ctx_txd->type_cmd_tso_mss =
rte_cpu_to_le_64(cd_type_cmd_tso_mss);
- PMD_TX_LOG(DEBUG, "mbuf: %p, TCD[%u]:\n"
- "tunneling_params: %#x;\n"
- "l2tag2: %#hx;\n"
- "rsvd: %#hx;\n"
- "type_cmd_tso_mss: %#"PRIx64";\n",
+ PMD_TX_LOG(DEBUG, "mbuf: %p, TCD[%u]: "
+ "tunneling_params: %#x; "
+ "l2tag2: %#hx; "
+ "rsvd: %#hx; "
+ "type_cmd_tso_mss: %#"PRIx64";",
tx_pkt, tx_id,
ctx_txd->tunneling_params,
ctx_txd->l2tag2,
@@ -1276,12 +1276,12 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
txd = &txr[tx_id];
txn = &sw_ring[txe->next_id];
}
- PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]:\n"
- "buf_dma_addr: %#"PRIx64";\n"
- "td_cmd: %#x;\n"
- "td_offset: %#x;\n"
- "td_len: %u;\n"
- "td_tag: %#x;\n",
+ PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]: "
+ "buf_dma_addr: %#"PRIx64"; "
+ "td_cmd: %#x; "
+ "td_offset: %#x; "
+ "td_len: %u; "
+ "td_tag: %#x;",
tx_pkt, tx_id, buf_dma_addr,
td_cmd, td_offset, slen, td_tag);
@@ -1564,7 +1564,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
if ((adapter->mbuf_check & I40E_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -1573,7 +1573,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
(mb->data_len > mb->pkt_len ||
mb->data_len < I40E_TX_MIN_PKT_LEN ||
mb->data_len > adapter->max_pkt_len)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)",
mb->data_len, I40E_TX_MIN_PKT_LEN, adapter->max_pkt_len);
pkt_error = true;
break;
@@ -1586,13 +1586,13 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
* the limites.
*/
if (mb->nb_segs > I40E_TX_MAX_MTU_SEG) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_TX_MAX_MTU_SEG);
pkt_error = true;
break;
}
if (mb->pkt_len > I40E_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -1606,18 +1606,18 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
/**
* MSS outside the range are considered malicious
*/
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, I40E_MIN_TSO_MSS, I40E_MAX_TSO_MSS);
pkt_error = true;
break;
}
if (mb->nb_segs > ((struct i40e_tx_queue *)tx_queue)->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
if (mb->pkt_len > I40E_TSO_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_TSO_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -1627,13 +1627,13 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
if (adapter->mbuf_check & I40E_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & I40E_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
@@ -3573,7 +3573,7 @@ i40e_set_tx_function_flag(struct rte_eth_dev *dev, struct i40e_tx_queue *txq)
txq->queue_id);
else
PMD_INIT_LOG(DEBUG,
- "Neither simple nor vector Tx enabled on Tx queue %u\n",
+ "Neither simple nor vector Tx enabled on Tx queue %u",
txq->queue_id);
}
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 44276dcf38..c56fcfadf0 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2383,7 +2383,7 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
kvlist = rte_kvargs_parse(devargs->args, iavf_valid_args);
if (!kvlist) {
- PMD_INIT_LOG(ERR, "invalid kvargs key\n");
+ PMD_INIT_LOG(ERR, "invalid kvargs key");
return -EINVAL;
}
@@ -2418,7 +2418,7 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
if (ad->devargs.quanta_size != 0 &&
(ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
ad->devargs.quanta_size & 0x40)) {
- PMD_INIT_LOG(ERR, "invalid quanta size\n");
+ PMD_INIT_LOG(ERR, "invalid quanta size");
ret = -EINVAL;
goto bail;
}
@@ -3059,12 +3059,12 @@ iavf_dev_reset(struct rte_eth_dev *dev)
*/
ret = iavf_check_vf_reset_done(hw);
if (ret) {
- PMD_DRV_LOG(ERR, "Wait too long for reset done!\n");
+ PMD_DRV_LOG(ERR, "Wait too long for reset done!");
return ret;
}
iavf_set_no_poll(adapter, false);
- PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");
+ PMD_DRV_LOG(DEBUG, "Start dev_reset ...");
ret = iavf_dev_uninit(dev);
if (ret)
return ret;
@@ -3109,7 +3109,7 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
return;
if (!iavf_is_reset_detected(adapter)) {
- PMD_DRV_LOG(DEBUG, "reset not start\n");
+ PMD_DRV_LOG(DEBUG, "reset not start");
return;
}
@@ -3136,7 +3136,7 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
goto exit;
error:
- PMD_DRV_LOG(DEBUG, "RESET recover with error code=%d\n", ret);
+ PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
exit:
vf->in_reset_recovery = false;
iavf_set_no_poll(adapter, false);
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index ecc31430d1..4850b9e381 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3036,7 +3036,7 @@ iavf_check_vlan_up2tc(struct iavf_tx_queue *txq, struct rte_mbuf *m)
up = m->vlan_tci >> IAVF_VLAN_TAG_PCP_OFFSET;
if (!(vf->qos_cap->cap[txq->tc].tc_prio & BIT(up))) {
- PMD_TX_LOG(ERR, "packet with vlan pcp %u cannot transmit in queue %u\n",
+ PMD_TX_LOG(ERR, "packet with vlan pcp %u cannot transmit in queue %u",
up, txq->queue_id);
return -1;
} else {
@@ -3830,7 +3830,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if ((adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -3838,7 +3838,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if ((adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_SIZE) &&
(mb->data_len < IAVF_TX_MIN_PKT_LEN ||
mb->data_len > adapter->vf.max_pkt_len)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)",
mb->data_len, IAVF_TX_MIN_PKT_LEN, adapter->vf.max_pkt_len);
pkt_error = true;
break;
@@ -3848,7 +3848,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Check condition for nb_segs > IAVF_TX_MAX_MTU_SEG. */
if (!(ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG))) {
if (mb->nb_segs > IAVF_TX_MAX_MTU_SEG) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, IAVF_TX_MAX_MTU_SEG);
pkt_error = true;
break;
@@ -3856,12 +3856,12 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
} else if ((mb->tso_segsz < IAVF_MIN_TSO_MSS) ||
(mb->tso_segsz > IAVF_MAX_TSO_MSS)) {
/* MSS outside the range are considered malicious */
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, IAVF_MIN_TSO_MSS, IAVF_MAX_TSO_MSS);
pkt_error = true;
break;
} else if (mb->nb_segs > txq->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
@@ -3869,13 +3869,13 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if (adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & IAVF_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 8f3a385ca5..91f4943a11 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -1646,7 +1646,7 @@ ice_dcf_init_repr_info(struct ice_dcf_adapter *dcf_adapter)
dcf_adapter->real_hw.num_vfs,
sizeof(dcf_adapter->repr_infos[0]), 0);
if (!dcf_adapter->repr_infos) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for VF representors\n");
+ PMD_DRV_LOG(ERR, "Failed to alloc memory for VF representors");
return -ENOMEM;
}
@@ -2088,7 +2088,7 @@ eth_ice_dcf_pci_probe(__rte_unused struct rte_pci_driver *pci_drv,
}
if (dcf_adapter->real_hw.vf_vsi_map[vf_id] == dcf_vsi_id) {
- PMD_DRV_LOG(ERR, "VF ID %u is DCF's ID.\n", vf_id);
+ PMD_DRV_LOG(ERR, "VF ID %u is DCF's ID.", vf_id);
ret = -EINVAL;
break;
}
diff --git a/drivers/net/ice/ice_dcf_vf_representor.c b/drivers/net/ice/ice_dcf_vf_representor.c
index af281f069a..564ff02fd8 100644
--- a/drivers/net/ice/ice_dcf_vf_representor.c
+++ b/drivers/net/ice/ice_dcf_vf_representor.c
@@ -133,7 +133,7 @@ ice_dcf_vf_repr_hw(struct ice_dcf_vf_repr *repr)
struct ice_dcf_adapter *dcf_adapter;
if (!repr->dcf_valid) {
- PMD_DRV_LOG(ERR, "DCF for VF representor has been released\n");
+ PMD_DRV_LOG(ERR, "DCF for VF representor has been released");
return NULL;
}
@@ -272,7 +272,7 @@ ice_dcf_vf_repr_vlan_offload_set(struct rte_eth_dev *dev, int mask)
if (enable && repr->outer_vlan_info.port_vlan_ena) {
PMD_DRV_LOG(ERR,
- "Disable the port VLAN firstly\n");
+ "Disable the port VLAN firstly");
return -EINVAL;
}
@@ -318,7 +318,7 @@ ice_dcf_vf_repr_vlan_pvid_set(struct rte_eth_dev *dev,
if (repr->outer_vlan_info.stripping_ena) {
PMD_DRV_LOG(ERR,
- "Disable the VLAN stripping firstly\n");
+ "Disable the VLAN stripping firstly");
return -EINVAL;
}
@@ -367,7 +367,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
if (vlan_type != RTE_ETH_VLAN_TYPE_OUTER) {
PMD_DRV_LOG(ERR,
- "Can accelerate only outer VLAN in QinQ\n");
+ "Can accelerate only outer VLAN in QinQ");
return -EINVAL;
}
@@ -375,7 +375,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
tpid != RTE_ETHER_TYPE_VLAN &&
tpid != RTE_ETHER_TYPE_QINQ1) {
PMD_DRV_LOG(ERR,
- "Invalid TPID: 0x%04x\n", tpid);
+ "Invalid TPID: 0x%04x", tpid);
return -EINVAL;
}
@@ -387,7 +387,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
true);
if (err) {
PMD_DRV_LOG(ERR,
- "Failed to reset port VLAN : %d\n",
+ "Failed to reset port VLAN : %d",
err);
return err;
}
@@ -398,7 +398,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
RTE_ETH_VLAN_STRIP_MASK);
if (err) {
PMD_DRV_LOG(ERR,
- "Failed to reset VLAN stripping : %d\n",
+ "Failed to reset VLAN stripping : %d",
err);
return err;
}
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 304f959b7e..7b1bd163a2 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1907,7 +1907,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE);
if (rte_firmware_read(pkg_file, &buf, &bufsz) < 0) {
- PMD_INIT_LOG(ERR, "failed to search file path\n");
+ PMD_INIT_LOG(ERR, "failed to search file path");
return -1;
}
@@ -1916,7 +1916,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
err = ice_copy_and_init_pkg(hw, buf, bufsz);
if (!ice_is_init_pkg_successful(err)) {
- PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d\n", err);
+ PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d", err);
free(buf);
return -1;
}
@@ -2166,7 +2166,7 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
kvlist = rte_kvargs_parse(devargs->args, ice_valid_args);
if (kvlist == NULL) {
- PMD_INIT_LOG(ERR, "Invalid kvargs key\n");
+ PMD_INIT_LOG(ERR, "Invalid kvargs key");
return -EINVAL;
}
@@ -2405,20 +2405,20 @@ ice_dev_init(struct rte_eth_dev *dev)
if (pos) {
if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0 ||
rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) {
- PMD_INIT_LOG(ERR, "Failed to read pci config space\n");
+ PMD_INIT_LOG(ERR, "Failed to read pci config space");
} else {
use_dsn = true;
dsn = (uint64_t)dsn_high << 32 | dsn_low;
}
} else {
- PMD_INIT_LOG(ERR, "Failed to read device serial number\n");
+ PMD_INIT_LOG(ERR, "Failed to read device serial number");
}
ret = ice_load_pkg(pf->adapter, use_dsn, dsn);
if (ret == 0) {
ret = ice_init_hw_tbls(hw);
if (ret) {
- PMD_INIT_LOG(ERR, "ice_init_hw_tbls failed: %d\n", ret);
+ PMD_INIT_LOG(ERR, "ice_init_hw_tbls failed: %d", ret);
rte_free(hw->pkg_copy);
}
}
@@ -2470,14 +2470,14 @@ ice_dev_init(struct rte_eth_dev *dev)
ret = ice_aq_stop_lldp(hw, true, false, NULL);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "lldp has already stopped\n");
+ PMD_INIT_LOG(DEBUG, "lldp has already stopped");
ret = ice_init_dcb(hw, true);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "Failed to init DCB\n");
+ PMD_INIT_LOG(DEBUG, "Failed to init DCB");
/* Forward LLDP packets to default VSI */
ret = ice_lldp_fltr_add_remove(hw, vsi->vsi_id, true);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "Failed to cfg lldp\n");
+ PMD_INIT_LOG(DEBUG, "Failed to cfg lldp");
/* register callback func to eal lib */
rte_intr_callback_register(intr_handle,
ice_interrupt_handler, dev);
@@ -2502,7 +2502,7 @@ ice_dev_init(struct rte_eth_dev *dev)
if (hw->phy_model == ICE_PHY_E822) {
ret = ice_start_phy_timer_e822(hw, hw->pf_id);
if (ret)
- PMD_INIT_LOG(ERR, "Failed to start phy timer\n");
+ PMD_INIT_LOG(ERR, "Failed to start phy timer");
}
if (!ad->is_safe_mode) {
@@ -2748,7 +2748,7 @@ ice_hash_moveout(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)
status = ice_rem_rss_cfg(hw, vsi->idx, cfg);
if (status && status != ICE_ERR_DOES_NOT_EXIST) {
PMD_DRV_LOG(ERR,
- "ice_rem_rss_cfg failed for VSI:%d, error:%d\n",
+ "ice_rem_rss_cfg failed for VSI:%d, error:%d",
vsi->idx, status);
return -EBUSY;
}
@@ -2769,7 +2769,7 @@ ice_hash_moveback(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)
status = ice_add_rss_cfg(hw, vsi->idx, cfg);
if (status) {
PMD_DRV_LOG(ERR,
- "ice_add_rss_cfg failed for VSI:%d, error:%d\n",
+ "ice_add_rss_cfg failed for VSI:%d, error:%d",
vsi->idx, status);
return -EBUSY;
}
@@ -3164,7 +3164,7 @@ ice_rem_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,
ret = ice_rem_rss_cfg(hw, vsi_id, cfg);
if (ret && ret != ICE_ERR_DOES_NOT_EXIST)
- PMD_DRV_LOG(ERR, "remove rss cfg failed\n");
+ PMD_DRV_LOG(ERR, "remove rss cfg failed");
ice_rem_rss_cfg_post(pf, cfg->addl_hdrs);
@@ -3180,15 +3180,15 @@ ice_add_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,
ret = ice_add_rss_cfg_pre(pf, cfg->addl_hdrs);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg pre failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg pre failed");
ret = ice_add_rss_cfg(hw, vsi_id, cfg);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg failed");
ret = ice_add_rss_cfg_post(pf, cfg);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg post failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg post failed");
return 0;
}
@@ -3378,7 +3378,7 @@ ice_get_default_rss_key(uint8_t *rss_key, uint32_t rss_key_size)
if (rss_key_size > sizeof(default_key)) {
PMD_DRV_LOG(WARNING,
"requested size %u is larger than default %zu, "
- "only %zu bytes are gotten for key\n",
+ "only %zu bytes are gotten for key",
rss_key_size, sizeof(default_key),
sizeof(default_key));
}
@@ -3413,12 +3413,12 @@ static int ice_init_rss(struct ice_pf *pf)
if (nb_q == 0) {
PMD_DRV_LOG(WARNING,
- "RSS is not supported as rx queues number is zero\n");
+ "RSS is not supported as rx queues number is zero");
return 0;
}
if (is_safe_mode) {
- PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode\n");
+ PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode");
return 0;
}
@@ -4277,7 +4277,7 @@ ice_phy_conf_link(struct ice_hw *hw,
cfg.phy_type_low = phy_type_low & phy_caps->phy_type_low;
cfg.phy_type_high = phy_type_high & phy_caps->phy_type_high;
} else {
- PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+ PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!");
cfg.phy_type_low = phy_caps->phy_type_low;
cfg.phy_type_high = phy_caps->phy_type_high;
}
@@ -5734,7 +5734,7 @@ ice_get_module_info(struct rte_eth_dev *dev,
}
break;
default:
- PMD_DRV_LOG(WARNING, "SFF Module Type not recognized.\n");
+ PMD_DRV_LOG(WARNING, "SFF Module Type not recognized.");
return -EINVAL;
}
return 0;
@@ -5805,7 +5805,7 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
0, NULL);
PMD_DRV_LOG(DEBUG, "SFF %02X %02X %02X %X = "
"%02X%02X%02X%02X."
- "%02X%02X%02X%02X (%X)\n",
+ "%02X%02X%02X%02X (%X)",
addr, offset, page, is_sfp,
value[0], value[1],
value[2], value[3],
@@ -6773,7 +6773,7 @@ ice_fec_get_capability(struct rte_eth_dev *dev, struct rte_eth_fec_capa *speed_f
ret = ice_aq_get_phy_caps(hw->port_info, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA,
&pcaps, NULL);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get capability information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get capability information: %d",
ret);
return -ENOTSUP;
}
@@ -6805,7 +6805,7 @@ ice_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = ice_get_link_info_safe(pf, enable_lse, &link_status);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get link information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get link information: %d",
ret);
return -ENOTSUP;
}
@@ -6815,7 +6815,7 @@ ice_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA,
&pcaps, NULL);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get capability information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get capability information: %d",
ret);
return -ENOTSUP;
}
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index edd8cc8f1a..741107f939 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -334,7 +334,7 @@ ice_fdir_counter_alloc(struct ice_pf *pf, uint32_t shared, uint32_t id)
}
if (!counter_free) {
- PMD_DRV_LOG(ERR, "No free counter found\n");
+ PMD_DRV_LOG(ERR, "No free counter found");
return NULL;
}
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index b720e0f755..00d65bc637 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1245,13 +1245,13 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad,
ice_get_hw_vsi_num(hw, vsi_handle),
id);
if (ret) {
- PMD_DRV_LOG(ERR, "remove RSS flow failed\n");
+ PMD_DRV_LOG(ERR, "remove RSS flow failed");
return ret;
}
ret = ice_rem_prof(hw, ICE_BLK_RSS, id);
if (ret) {
- PMD_DRV_LOG(ERR, "remove RSS profile failed\n");
+ PMD_DRV_LOG(ERR, "remove RSS profile failed");
return ret;
}
}
@@ -1259,7 +1259,7 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad,
/* add new profile */
ret = ice_flow_set_hw_prof(hw, vsi_handle, 0, prof, ICE_BLK_RSS);
if (ret) {
- PMD_DRV_LOG(ERR, "HW profile add failed\n");
+ PMD_DRV_LOG(ERR, "HW profile add failed");
return ret;
}
@@ -1381,7 +1381,7 @@ ice_hash_rem_raw_cfg(struct ice_adapter *ad,
return 0;
err:
- PMD_DRV_LOG(ERR, "HW profile remove failed\n");
+ PMD_DRV_LOG(ERR, "HW profile remove failed");
return ret;
}
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f270498ed1..acd7539b5e 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2839,7 +2839,7 @@ ice_xmit_cleanup(struct ice_tx_queue *txq)
if (!(txd[desc_to_clean_to].cmd_type_offset_bsz &
rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DESC_DONE))) {
PMD_TX_LOG(DEBUG, "TX descriptor %4u is not done "
- "(port=%d queue=%d) value=0x%"PRIx64"\n",
+ "(port=%d queue=%d) value=0x%"PRIx64,
desc_to_clean_to,
txq->port_id, txq->queue_id,
txd[desc_to_clean_to].cmd_type_offset_bsz);
@@ -3714,7 +3714,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
if ((adapter->devargs.mbuf_check & ICE_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -3723,7 +3723,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
(mb->data_len > mb->pkt_len ||
mb->data_len < ICE_TX_MIN_PKT_LEN ||
mb->data_len > ICE_FRAME_SIZE_MAX)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %d)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %d)",
mb->data_len, ICE_TX_MIN_PKT_LEN, ICE_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -3736,13 +3736,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
* the limites.
*/
if (mb->nb_segs > ICE_TX_MTU_SEG_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, ICE_TX_MTU_SEG_MAX);
pkt_error = true;
break;
}
if (mb->pkt_len > ICE_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, ICE_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -3756,13 +3756,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/**
* MSS outside the range are considered malicious
*/
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, ICE_MIN_TSO_MSS, ICE_MAX_TSO_MSS);
pkt_error = true;
break;
}
if (mb->nb_segs > ((struct ice_tx_queue *)tx_queue)->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
@@ -3771,13 +3771,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
if (adapter->devargs.mbuf_check & ICE_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & ICE_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index 2c15611a23..baae80d661 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -203,7 +203,7 @@ ipn3ke_vbng_init_done(struct ipn3ke_hw *hw)
}
if (!timeout) {
- IPN3KE_AFU_PMD_ERR("IPN3KE vBNG INIT timeout.\n");
+ IPN3KE_AFU_PMD_ERR("IPN3KE vBNG INIT timeout.");
return -1;
}
@@ -348,7 +348,7 @@ ipn3ke_hw_init(struct rte_afu_device *afu_dev,
hw->acc_tm = 1;
hw->acc_flow = 1;
- IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x\n",
+ IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x",
IPN3KE_READ_REG(hw, 0));
}
diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c
index d20a29b9a2..a2f76268b5 100644
--- a/drivers/net/ipn3ke/ipn3ke_flow.c
+++ b/drivers/net/ipn3ke/ipn3ke_flow.c
@@ -993,7 +993,7 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
uint32_t time_out = MHL_COMMAND_TIME_COUNT;
uint32_t i;
- IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump start\n");
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump start");
pdata = (uint32_t *)flow->rule.key;
IPN3KE_AFU_PMD_DEBUG(" - key :");
@@ -1003,7 +1003,6 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
for (i = 0; i < 4; i++)
IPN3KE_AFU_PMD_DEBUG(" %02x", ipn3ke_swap32(pdata[3 - i]));
- IPN3KE_AFU_PMD_DEBUG("\n");
pdata = (uint32_t *)flow->rule.result;
IPN3KE_AFU_PMD_DEBUG(" - result:");
@@ -1013,7 +1012,7 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
for (i = 0; i < 1; i++)
IPN3KE_AFU_PMD_DEBUG(" %02x", pdata[i]);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump end\n");
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump end");
pdata = (uint32_t *)flow->rule.key;
@@ -1254,7 +1253,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_RX_TEST,
0,
0x1);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_TEST: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_TEST: %x", data);
/* configure base mac address */
IPN3KE_MASK_WRITE_REG(hw,
@@ -1268,7 +1267,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_BASE_DST_MAC_ADDR_HI,
0,
0xFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_HI: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_HI: %x", data);
IPN3KE_MASK_WRITE_REG(hw,
IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW,
@@ -1281,7 +1280,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW: %x", data);
/* configure hash lookup rules enable */
@@ -1296,7 +1295,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_LKUP_ENABLE,
0,
0xFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_LKUP_ENABLE: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_LKUP_ENABLE: %x", data);
/* configure rx parse config, settings associated with VxLAN */
@@ -1311,7 +1310,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_RX_PARSE_CFG,
0,
0x3FFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_PARSE_CFG: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_PARSE_CFG: %x", data);
/* configure QinQ S-Tag */
@@ -1326,7 +1325,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_QINQ_STAG,
0,
0xFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_QINQ_STAG: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_QINQ_STAG: %x", data);
/* configure gen ctrl */
@@ -1341,7 +1340,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_MHL_GEN_CTRL,
0,
0x1F);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_GEN_CTRL: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_GEN_CTRL: %x", data);
/* clear monitoring register */
@@ -1356,7 +1355,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_MHL_MON_0,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_MON_0: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_MON_0: %x", data);
ipn3ke_flow_hw_flush(hw);
@@ -1366,7 +1365,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_EM_NUM,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_EN_NUM: %x\n", hw->flow_max_entries);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_EN_NUM: %x", hw->flow_max_entries);
hw->flow_num_entries = 0;
return 0;
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 8145f1bb2a..feb57420c3 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2401,8 +2401,8 @@ ipn3ke_update_link(struct rte_rawdev *rawdev,
else
link->link_status = 0;
- IPN3KE_AFU_PMD_DEBUG("port is %d\n", port);
- IPN3KE_AFU_PMD_DEBUG("link->link_status is %d\n", link->link_status);
+ IPN3KE_AFU_PMD_DEBUG("port is %d", port);
+ IPN3KE_AFU_PMD_DEBUG("link->link_status is %d", link->link_status);
rawdev->dev_ops->attr_get(rawdev,
"LineSideLinkSpeed",
@@ -2479,14 +2479,14 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
if (!rpst->ori_linfo.link_status &&
link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Up\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Up", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Up\n",
+ IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Up",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_up(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2494,7 +2494,7 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
}
} else if (rpst->ori_linfo.link_status &&
!link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Down",
rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
@@ -2502,7 +2502,7 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
rte_eth_linkstatus_set(ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Down",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_down(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2537,14 +2537,14 @@ ipn3ke_rpst_link_check(struct ipn3ke_rpst *rpst)
if (!rpst->ori_linfo.link_status &&
link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Up\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Up", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(rpst->ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Up\n",
+ IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Up",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_up(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2552,14 +2552,14 @@ ipn3ke_rpst_link_check(struct ipn3ke_rpst *rpst)
}
} else if (rpst->ori_linfo.link_status &&
!link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Down\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Down", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(rpst->ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Down",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_down(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c
index 0260227900..44a8b88699 100644
--- a/drivers/net/ipn3ke/ipn3ke_tm.c
+++ b/drivers/net/ipn3ke/ipn3ke_tm.c
@@ -1934,10 +1934,10 @@ ipn3ke_tm_show(struct rte_eth_dev *dev)
tm_id = tm->tm_id;
- IPN3KE_AFU_PMD_DEBUG("***HQoS Tree(%d)***\n", tm_id);
+ IPN3KE_AFU_PMD_DEBUG("***HQoS Tree(%d)***", tm_id);
port_n = tm->h.port_node;
- IPN3KE_AFU_PMD_DEBUG("Port: (%d|%s)\n", port_n->node_index,
+ IPN3KE_AFU_PMD_DEBUG("Port: (%d|%s)", port_n->node_index,
str_state[port_n->node_state]);
vt_nl = &tm->h.port_node->children_node_list;
@@ -1951,7 +1951,6 @@ ipn3ke_tm_show(struct rte_eth_dev *dev)
cos_n->node_index,
str_state[cos_n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
}
}
@@ -1969,14 +1968,13 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
tm_id = tm->tm_id;
- IPN3KE_AFU_PMD_DEBUG("***Commit Tree(%d)***\n", tm_id);
+ IPN3KE_AFU_PMD_DEBUG("***Commit Tree(%d)***", tm_id);
n = tm->h.port_commit_node;
IPN3KE_AFU_PMD_DEBUG("Port: ");
if (n)
IPN3KE_AFU_PMD_DEBUG("(%d|%s)",
n->node_index,
str_state[n->node_state]);
- IPN3KE_AFU_PMD_DEBUG("\n");
nl = &tm->h.vt_commit_node_list;
IPN3KE_AFU_PMD_DEBUG("VT : ");
@@ -1985,7 +1983,6 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
n->node_index,
str_state[n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
nl = &tm->h.cos_commit_node_list;
IPN3KE_AFU_PMD_DEBUG("COS : ");
@@ -1994,7 +1991,6 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
n->node_index,
str_state[n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
}
/* Traffic manager hierarchy commit */
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d88d4065f1..357307b2e0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1155,10 +1155,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
}
if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) {
- PMD_INIT_LOG(ERR, "\nERROR: "
- "Firmware recovery mode detected. Limiting functionality.\n"
- "Refer to the Intel(R) Ethernet Adapters and Devices "
- "User Guide for details on firmware recovery mode.");
+ PMD_INIT_LOG(ERR, "ERROR: Firmware recovery mode detected. Limiting functionality.");
return -EIO;
}
@@ -1783,7 +1780,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type: %s\n",
+ PMD_DRV_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c
index d331308556..3a666ba15f 100644
--- a/drivers/net/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ixgbe/ixgbe_ipsec.c
@@ -120,7 +120,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no match and no free entries*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx IP table\n");
+ "No free entry left in the Rx IP table");
return -1;
}
@@ -134,7 +134,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx SA table\n");
+ "No free entry left in the Rx SA table");
return -1;
}
@@ -232,7 +232,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Tx SA table\n");
+ "No free entry left in the Tx SA table");
return -1;
}
@@ -291,7 +291,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx IP table\n");
+ "Entry not found in the Rx IP table");
return -1;
}
@@ -306,7 +306,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx SA table\n");
+ "Entry not found in the Rx SA table");
return -1;
}
@@ -349,7 +349,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Tx SA table\n");
+ "Entry not found in the Tx SA table");
return -1;
}
reg_val = IPSRXIDX_WRITE | (sa_index << 3);
@@ -379,7 +379,7 @@ ixgbe_crypto_create_session(void *device,
if (conf->crypto_xform->type != RTE_CRYPTO_SYM_XFORM_AEAD ||
conf->crypto_xform->aead.algo !=
RTE_CRYPTO_AEAD_AES_GCM) {
- PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode\n");
+ PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode");
return -ENOTSUP;
}
aead_xform = &conf->crypto_xform->aead;
@@ -388,14 +388,14 @@ ixgbe_crypto_create_session(void *device,
if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
ic_session->op = IXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec decryption not enabled");
return -ENOTSUP;
}
} else {
if (dev_conf->txmode.offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
ic_session->op = IXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec encryption not enabled");
return -ENOTSUP;
}
}
@@ -409,7 +409,7 @@ ixgbe_crypto_create_session(void *device,
if (ic_session->op == IXGBE_OP_AUTHENTICATED_ENCRYPTION) {
if (ixgbe_crypto_add_sa(ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to add SA\n");
+ PMD_DRV_LOG(ERR, "Failed to add SA");
return -EPERM;
}
}
@@ -431,12 +431,12 @@ ixgbe_crypto_remove_session(void *device,
struct ixgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session);
if (eth_dev != ic_session->dev) {
- PMD_DRV_LOG(ERR, "Session not bound to this device\n");
+ PMD_DRV_LOG(ERR, "Session not bound to this device");
return -ENODEV;
}
if (ixgbe_crypto_remove_sa(eth_dev, ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to remove session\n");
+ PMD_DRV_LOG(ERR, "Failed to remove session");
return -EFAULT;
}
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 91ba395ac3..e967fe5e48 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -173,14 +173,14 @@ ixgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
struct ixgbe_ethertype_filter ethertype_filter;
if (!hw->mac.ops.set_ethertype_anti_spoofing) {
- PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.\n");
+ PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.");
return;
}
i = ixgbe_ethertype_filter_lookup(filter_info,
IXGBE_ETHERTYPE_FLOW_CTRL);
if (i >= 0) {
- PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!\n");
+ PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!");
return;
}
@@ -193,7 +193,7 @@ ixgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
i = ixgbe_ethertype_filter_insert(filter_info,
ðertype_filter);
if (i < 0) {
- PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.\n");
+ PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.");
return;
}
@@ -424,7 +424,7 @@ ixgbe_disable_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf)
vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~IXGBE_VMOLR_MPE;
@@ -630,7 +630,7 @@ ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -679,7 +679,7 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
case RTE_ETH_MQ_TX_NONE:
case RTE_ETH_MQ_TX_DCB:
PMD_DRV_LOG(ERR, "PF must work with virtualization for VF %u"
- ", but its tx mode = %d\n", vf,
+ ", but its tx mode = %d", vf,
eth_conf->txmode.mq_mode);
return -1;
@@ -713,7 +713,7 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
break;
default:
- PMD_DRV_LOG(ERR, "PF work with invalid mode = %d\n",
+ PMD_DRV_LOG(ERR, "PF work with invalid mode = %d",
eth_conf->txmode.mq_mode);
return -1;
}
@@ -769,7 +769,7 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (!(fctrl & IXGBE_FCTRL_UPE)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -806,7 +806,7 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(
(struct rte_ether_addr *)new_mac)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index f76ef63921..15c28e7a3f 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -955,7 +955,7 @@ STATIC s32 rte_pmd_ixgbe_acquire_swfw(struct ixgbe_hw *hw, u32 mask)
while (--retries) {
status = ixgbe_acquire_swfw_semaphore(hw, mask);
if (status) {
- PMD_DRV_LOG(ERR, "Get SWFW sem failed, Status = %d\n",
+ PMD_DRV_LOG(ERR, "Get SWFW sem failed, Status = %d",
status);
return status;
}
@@ -964,18 +964,18 @@ STATIC s32 rte_pmd_ixgbe_acquire_swfw(struct ixgbe_hw *hw, u32 mask)
return IXGBE_SUCCESS;
if (status == IXGBE_ERR_TOKEN_RETRY)
- PMD_DRV_LOG(ERR, "Get PHY token failed, Status = %d\n",
+ PMD_DRV_LOG(ERR, "Get PHY token failed, Status = %d",
status);
ixgbe_release_swfw_semaphore(hw, mask);
if (status != IXGBE_ERR_TOKEN_RETRY) {
PMD_DRV_LOG(ERR,
- "Retry get PHY token failed, Status=%d\n",
+ "Retry get PHY token failed, Status=%d",
status);
return status;
}
}
- PMD_DRV_LOG(ERR, "swfw acquisition retries failed!: PHY ID = 0x%08X\n",
+ PMD_DRV_LOG(ERR, "swfw acquisition retries failed!: PHY ID = 0x%08X",
hw->phy.id);
return status;
}
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 16da22b5c6..e220ffaf92 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1292,7 +1292,7 @@ memif_connect(struct rte_eth_dev *dev)
PROT_READ | PROT_WRITE,
MAP_SHARED, mr->fd, 0);
if (mr->addr == MAP_FAILED) {
- MIF_LOG(ERR, "mmap failed: %s\n",
+ MIF_LOG(ERR, "mmap failed: %s",
strerror(errno));
return -1;
}
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index c19db5c0eb..9c2872429f 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -106,7 +106,7 @@ mlx4_init_shared_data(void)
sizeof(*mlx4_shared_data),
SOCKET_ID_ANY, 0);
if (mz == NULL) {
- ERROR("Cannot allocate mlx4 shared data\n");
+ ERROR("Cannot allocate mlx4 shared data");
ret = -rte_errno;
goto error;
}
@@ -117,7 +117,7 @@ mlx4_init_shared_data(void)
/* Lookup allocated shared memory. */
mz = rte_memzone_lookup(MZ_MLX4_PMD_SHARED_DATA);
if (mz == NULL) {
- ERROR("Cannot attach mlx4 shared data\n");
+ ERROR("Cannot attach mlx4 shared data");
ret = -rte_errno;
goto error;
}
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 9bf1ec5509..297ff3fb31 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -257,7 +257,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
if (tx_free_thresh + 3 >= nb_desc) {
PMD_INIT_LOG(ERR,
"tx_free_thresh must be less than the number of TX entries minus 3(%u)."
- " (tx_free_thresh=%u port=%u queue=%u)\n",
+ " (tx_free_thresh=%u port=%u queue=%u)",
nb_desc - 3,
tx_free_thresh, dev->data->port_id, queue_idx);
return -EINVAL;
@@ -902,7 +902,7 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
if (!rxq->rxbuf_info) {
PMD_DRV_LOG(ERR,
- "Could not allocate rxbuf info for queue %d\n",
+ "Could not allocate rxbuf info for queue %d",
queue_id);
rte_free(rxq->event_buf);
rte_free(rxq);
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index e8dda8d460..29944f5070 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1119,7 +1119,7 @@ s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
u32 i;
if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
- DEBUGOUT("Cannot configure PCI bus master\n");
+ DEBUGOUT("Cannot configure PCI bus master");
return -1;
}
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 23a452cacd..6c45ffaad3 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -382,7 +382,7 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
err = ngbe_flash_read_dword(hw, 0xFFFDC, &ssid);
if (err) {
PMD_INIT_LOG(ERR,
- "Read of internal subsystem device id failed\n");
+ "Read of internal subsystem device id failed");
return -ENODEV;
}
hw->sub_system_id = (u16)ssid >> 8 | (u16)ssid << 8;
diff --git a/drivers/net/ngbe/ngbe_pf.c b/drivers/net/ngbe/ngbe_pf.c
index 947ae7fe94..bb62e2fbb7 100644
--- a/drivers/net/ngbe/ngbe_pf.c
+++ b/drivers/net/ngbe/ngbe_pf.c
@@ -71,7 +71,7 @@ int ngbe_pf_host_init(struct rte_eth_dev *eth_dev)
sizeof(struct ngbe_vf_info) * vf_num, 0);
if (*vfinfo == NULL) {
PMD_INIT_LOG(ERR,
- "Cannot allocate memory for private VF data\n");
+ "Cannot allocate memory for private VF data");
return -ENOMEM;
}
@@ -320,7 +320,7 @@ ngbe_disable_vf_mc_promisc(struct rte_eth_dev *eth_dev, uint32_t vf)
vmolr = rd32(hw, NGBE_POOLETHCTL(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~NGBE_POOLETHCTL_MCP;
@@ -482,7 +482,7 @@ ngbe_negotiate_vf_api(struct rte_eth_dev *eth_dev,
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -564,7 +564,7 @@ ngbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev,
if (!(fctrl & NGBE_PSRCTL_UCP)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -601,7 +601,7 @@ ngbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(ea)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/octeon_ep/cnxk_ep_tx.c b/drivers/net/octeon_ep/cnxk_ep_tx.c
index 45ea0b9c34..e84de5c1c7 100644
--- a/drivers/net/octeon_ep/cnxk_ep_tx.c
+++ b/drivers/net/octeon_ep/cnxk_ep_tx.c
@@ -170,7 +170,7 @@ cnxk_ep_xmit_pkts_scalar_mseg(struct rte_mbuf **tx_pkts, struct otx_ep_instr_que
num_sg = (frags + mask) / OTX_EP_NUM_SG_PTRS;
if (unlikely(pkt_len > OTX_EP_MAX_PKT_SZ && num_sg > OTX_EP_MAX_SG_LISTS)) {
- otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments\n");
+ otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments");
goto exit;
}
diff --git a/drivers/net/octeon_ep/cnxk_ep_vf.c b/drivers/net/octeon_ep/cnxk_ep_vf.c
index 39b28de2d0..d44ac211f1 100644
--- a/drivers/net/octeon_ep/cnxk_ep_vf.c
+++ b/drivers/net/octeon_ep/cnxk_ep_vf.c
@@ -102,7 +102,7 @@ cnxk_ep_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
}
if (loop < 0) {
- otx_ep_err("IDLE bit is not set\n");
+ otx_ep_err("IDLE bit is not set");
return -EIO;
}
@@ -134,7 +134,7 @@ cnxk_ep_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
} while (reg_val != 0 && loop--);
if (loop < 0) {
- otx_ep_err("INST CNT REGISTER is not zero\n");
+ otx_ep_err("INST CNT REGISTER is not zero");
return -EIO;
}
@@ -181,7 +181,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("OUT CNT REGISTER value is zero\n");
+ otx_ep_err("OUT CNT REGISTER value is zero");
return -EIO;
}
@@ -217,7 +217,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets credit register value is not cleared\n");
+ otx_ep_err("Packets credit register value is not cleared");
return -EIO;
}
@@ -250,7 +250,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets sent register value is not cleared\n");
+ otx_ep_err("Packets sent register value is not cleared");
return -EIO;
}
@@ -280,7 +280,7 @@ cnxk_ep_vf_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("INSTR DBELL not coming back to 0\n");
+ otx_ep_err("INSTR DBELL not coming back to 0");
return -EIO;
}
diff --git a/drivers/net/octeon_ep/otx2_ep_vf.c b/drivers/net/octeon_ep/otx2_ep_vf.c
index 2aeebb4675..76f72c64c9 100644
--- a/drivers/net/octeon_ep/otx2_ep_vf.c
+++ b/drivers/net/octeon_ep/otx2_ep_vf.c
@@ -37,7 +37,7 @@ otx2_vf_reset_iq(struct otx_ep_device *otx_ep, int q_no)
SDP_VF_R_IN_INSTR_DBELL(q_no));
}
if (loop < 0) {
- otx_ep_err("%s: doorbell init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: doorbell init retry limit exceeded.", __func__);
return -EIO;
}
@@ -48,7 +48,7 @@ otx2_vf_reset_iq(struct otx_ep_device *otx_ep, int q_no)
rte_delay_ms(1);
} while ((d64 & ~SDP_VF_R_IN_CNTS_OUT_INT) != 0 && loop--);
if (loop < 0) {
- otx_ep_err("%s: in_cnts init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: in_cnts init retry limit exceeded.", __func__);
return -EIO;
}
@@ -81,7 +81,7 @@ otx2_vf_reset_oq(struct otx_ep_device *otx_ep, int q_no)
SDP_VF_R_OUT_SLIST_DBELL(q_no));
}
if (loop < 0) {
- otx_ep_err("%s: doorbell init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: doorbell init retry limit exceeded.", __func__);
return -EIO;
}
@@ -109,7 +109,7 @@ otx2_vf_reset_oq(struct otx_ep_device *otx_ep, int q_no)
rte_delay_ms(1);
} while ((d64 & ~SDP_VF_R_OUT_CNTS_IN_INT) != 0 && loop--);
if (loop < 0) {
- otx_ep_err("%s: out_cnts init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: out_cnts init retry limit exceeded.", __func__);
return -EIO;
}
@@ -252,7 +252,7 @@ otx2_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
}
if (loop < 0) {
- otx_ep_err("IDLE bit is not set\n");
+ otx_ep_err("IDLE bit is not set");
return -EIO;
}
@@ -283,7 +283,7 @@ otx2_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
} while (reg_val != 0 && loop--);
if (loop < 0) {
- otx_ep_err("INST CNT REGISTER is not zero\n");
+ otx_ep_err("INST CNT REGISTER is not zero");
return -EIO;
}
@@ -332,7 +332,7 @@ otx2_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("OUT CNT REGISTER value is zero\n");
+ otx_ep_err("OUT CNT REGISTER value is zero");
return -EIO;
}
@@ -368,7 +368,7 @@ otx2_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets credit register value is not cleared\n");
+ otx_ep_err("Packets credit register value is not cleared");
return -EIO;
}
otx_ep_dbg("SDP_R[%d]_credit:%x", oq_no, rte_read32(droq->pkts_credit_reg));
@@ -425,7 +425,7 @@ otx2_vf_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("INSTR DBELL not coming back to 0\n");
+ otx_ep_err("INSTR DBELL not coming back to 0");
return -EIO;
}
diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
index 73eb0c9d31..7d5dd91a77 100644
--- a/drivers/net/octeon_ep/otx_ep_common.h
+++ b/drivers/net/octeon_ep/otx_ep_common.h
@@ -120,7 +120,7 @@ union otx_ep_instr_irh {
{\
typeof(value) val = (value); \
typeof(reg_off) off = (reg_off); \
- otx_ep_dbg("octeon_write_csr64: reg: 0x%08lx val: 0x%016llx\n", \
+ otx_ep_dbg("octeon_write_csr64: reg: 0x%08lx val: 0x%016llx", \
(unsigned long)off, (unsigned long long)val); \
rte_write64(val, ((base_addr) + off)); \
}
diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c
index 46211361a0..c4a5a67c79 100644
--- a/drivers/net/octeon_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
@@ -175,7 +175,7 @@ otx_ep_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
ret = otx_ep_mbox_get_link_info(eth_dev, &link);
if (ret)
return -EINVAL;
- otx_ep_dbg("link status resp link %d duplex %d autoneg %d link_speed %d\n",
+ otx_ep_dbg("link status resp link %d duplex %d autoneg %d link_speed %d",
link.link_status, link.link_duplex, link.link_autoneg, link.link_speed);
return rte_eth_linkstatus_set(eth_dev, &link);
}
@@ -220,7 +220,7 @@ otx_ep_dev_set_default_mac_addr(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_set_mac_addr(eth_dev, mac_addr);
if (ret)
return -EINVAL;
- otx_ep_dbg("Default MAC address " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Default MAC address " RTE_ETHER_ADDR_PRT_FMT "",
RTE_ETHER_ADDR_BYTES(mac_addr));
rte_ether_addr_copy(mac_addr, eth_dev->data->mac_addrs);
return 0;
@@ -237,7 +237,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
/* Enable IQ/OQ for this device */
ret = otx_epvf->fn_list.enable_io_queues(otx_epvf);
if (ret) {
- otx_ep_err("IOQ enable failed\n");
+ otx_ep_err("IOQ enable failed");
return ret;
}
@@ -246,7 +246,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
otx_epvf->droq[q]->pkts_credit_reg);
rte_wmb();
- otx_ep_info("OQ[%d] dbells [%d]\n", q,
+ otx_ep_info("OQ[%d] dbells [%d]", q,
rte_read32(otx_epvf->droq[q]->pkts_credit_reg));
}
@@ -255,7 +255,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
otx_ep_set_tx_func(eth_dev);
otx_ep_set_rx_func(eth_dev);
- otx_ep_info("dev started\n");
+ otx_ep_info("dev started");
for (q = 0; q < eth_dev->data->nb_rx_queues; q++)
eth_dev->data->rx_queue_state[q] = RTE_ETH_QUEUE_STATE_STARTED;
@@ -298,7 +298,7 @@ otx_ep_ism_setup(struct otx_ep_device *otx_epvf)
/* Same DMA buffer is shared by OQ and IQ, clear it at start */
memset(otx_epvf->ism_buffer_mz->addr, 0, OTX_EP_ISM_BUFFER_SIZE);
if (otx_epvf->ism_buffer_mz == NULL) {
- otx_ep_err("Failed to allocate ISM buffer\n");
+ otx_ep_err("Failed to allocate ISM buffer");
return(-1);
}
otx_ep_dbg("ISM: virt: 0x%p, dma: 0x%" PRIX64,
@@ -342,12 +342,12 @@ otx_ep_chip_specific_setup(struct otx_ep_device *otx_epvf)
ret = -EINVAL;
break;
default:
- otx_ep_err("Unsupported device\n");
+ otx_ep_err("Unsupported device");
ret = -EINVAL;
}
if (!ret)
- otx_ep_info("OTX_EP dev_id[%d]\n", dev_id);
+ otx_ep_info("OTX_EP dev_id[%d]", dev_id);
return ret;
}
@@ -361,7 +361,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
ret = otx_ep_chip_specific_setup(otx_epvf);
if (ret) {
- otx_ep_err("Chip specific setup failed\n");
+ otx_ep_err("Chip specific setup failed");
goto setup_fail;
}
@@ -385,7 +385,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
otx_epvf->eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts;
otx_epvf->chip_gen = OTX_EP_CN10XX;
} else {
- otx_ep_err("Invalid chip_id\n");
+ otx_ep_err("Invalid chip_id");
ret = -EINVAL;
goto setup_fail;
}
@@ -393,7 +393,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
otx_epvf->max_rx_queues = ethdev_queues;
otx_epvf->max_tx_queues = ethdev_queues;
- otx_ep_info("OTX_EP Device is Ready\n");
+ otx_ep_info("OTX_EP Device is Ready");
setup_fail:
return ret;
@@ -413,10 +413,10 @@ otx_ep_dev_configure(struct rte_eth_dev *eth_dev)
txmode = &conf->txmode;
if (eth_dev->data->nb_rx_queues > otx_epvf->max_rx_queues ||
eth_dev->data->nb_tx_queues > otx_epvf->max_tx_queues) {
- otx_ep_err("invalid num queues\n");
+ otx_ep_err("invalid num queues");
return -EINVAL;
}
- otx_ep_info("OTX_EP Device is configured with num_txq %d num_rxq %d\n",
+ otx_ep_info("OTX_EP Device is configured with num_txq %d num_rxq %d",
eth_dev->data->nb_rx_queues, eth_dev->data->nb_tx_queues);
otx_epvf->rx_offloads = rxmode->offloads;
@@ -460,29 +460,29 @@ otx_ep_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
uint16_t buf_size;
if (q_no >= otx_epvf->max_rx_queues) {
- otx_ep_err("Invalid rx queue number %u\n", q_no);
+ otx_ep_err("Invalid rx queue number %u", q_no);
return -EINVAL;
}
if (num_rx_descs & (num_rx_descs - 1)) {
- otx_ep_err("Invalid rx desc number should be pow 2 %u\n",
+ otx_ep_err("Invalid rx desc number should be pow 2 %u",
num_rx_descs);
return -EINVAL;
}
if (num_rx_descs < (SDP_GBL_WMARK * 8)) {
- otx_ep_err("Invalid rx desc number(%u) should at least be greater than 8xwmark %u\n",
+ otx_ep_err("Invalid rx desc number(%u) should at least be greater than 8xwmark %u",
num_rx_descs, (SDP_GBL_WMARK * 8));
return -EINVAL;
}
- otx_ep_dbg("setting up rx queue %u\n", q_no);
+ otx_ep_dbg("setting up rx queue %u", q_no);
mbp_priv = rte_mempool_get_priv(mp);
buf_size = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM;
if (otx_ep_setup_oqs(otx_epvf, q_no, num_rx_descs, buf_size, mp,
socket_id)) {
- otx_ep_err("droq allocation failed\n");
+ otx_ep_err("droq allocation failed");
return -1;
}
@@ -511,7 +511,7 @@ otx_ep_rx_queue_release(struct rte_eth_dev *dev, uint16_t q_no)
int q_id = rq->q_no;
if (otx_ep_delete_oqs(otx_epvf, q_id))
- otx_ep_err("Failed to delete OQ:%d\n", q_id);
+ otx_ep_err("Failed to delete OQ:%d", q_id);
}
/**
@@ -545,16 +545,16 @@ otx_ep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
int retval;
if (q_no >= otx_epvf->max_tx_queues) {
- otx_ep_err("Invalid tx queue number %u\n", q_no);
+ otx_ep_err("Invalid tx queue number %u", q_no);
return -EINVAL;
}
if (num_tx_descs & (num_tx_descs - 1)) {
- otx_ep_err("Invalid tx desc number should be pow 2 %u\n",
+ otx_ep_err("Invalid tx desc number should be pow 2 %u",
num_tx_descs);
return -EINVAL;
}
if (num_tx_descs < (SDP_GBL_WMARK * 8)) {
- otx_ep_err("Invalid tx desc number(%u) should at least be greater than 8*wmark(%u)\n",
+ otx_ep_err("Invalid tx desc number(%u) should at least be greater than 8*wmark(%u)",
num_tx_descs, (SDP_GBL_WMARK * 8));
return -EINVAL;
}
@@ -562,12 +562,12 @@ otx_ep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
retval = otx_ep_setup_iqs(otx_epvf, q_no, num_tx_descs, socket_id);
if (retval) {
- otx_ep_err("IQ(TxQ) creation failed.\n");
+ otx_ep_err("IQ(TxQ) creation failed.");
return retval;
}
eth_dev->data->tx_queues[q_no] = otx_epvf->instr_queue[q_no];
- otx_ep_dbg("tx queue[%d] setup\n", q_no);
+ otx_ep_dbg("tx queue[%d] setup", q_no);
return 0;
}
@@ -660,23 +660,23 @@ otx_ep_dev_close(struct rte_eth_dev *eth_dev)
num_queues = otx_epvf->nb_rx_queues;
for (q_no = 0; q_no < num_queues; q_no++) {
if (otx_ep_delete_oqs(otx_epvf, q_no)) {
- otx_ep_err("Failed to delete OQ:%d\n", q_no);
+ otx_ep_err("Failed to delete OQ:%d", q_no);
return -EINVAL;
}
}
- otx_ep_dbg("Num OQs:%d freed\n", otx_epvf->nb_rx_queues);
+ otx_ep_dbg("Num OQs:%d freed", otx_epvf->nb_rx_queues);
num_queues = otx_epvf->nb_tx_queues;
for (q_no = 0; q_no < num_queues; q_no++) {
if (otx_ep_delete_iqs(otx_epvf, q_no)) {
- otx_ep_err("Failed to delete IQ:%d\n", q_no);
+ otx_ep_err("Failed to delete IQ:%d", q_no);
return -EINVAL;
}
}
- otx_ep_dbg("Num IQs:%d freed\n", otx_epvf->nb_tx_queues);
+ otx_ep_dbg("Num IQs:%d freed", otx_epvf->nb_tx_queues);
if (rte_eth_dma_zone_free(eth_dev, "ism", 0)) {
- otx_ep_err("Failed to delete ISM buffer\n");
+ otx_ep_err("Failed to delete ISM buffer");
return -EINVAL;
}
@@ -692,7 +692,7 @@ otx_ep_dev_get_mac_addr(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_get_mac_addr(eth_dev, mac_addr);
if (ret)
return -EINVAL;
- otx_ep_dbg("Get MAC address " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Get MAC address " RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
return 0;
}
@@ -741,22 +741,22 @@ static int otx_ep_eth_dev_query_set_vf_mac(struct rte_eth_dev *eth_dev,
ret_val = otx_ep_dev_get_mac_addr(eth_dev, mac_addr);
if (!ret_val) {
if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
- otx_ep_dbg("PF doesn't have valid VF MAC addr" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("PF doesn't have valid VF MAC addr" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
rte_eth_random_addr(mac_addr->addr_bytes);
- otx_ep_dbg("Setting Random MAC address" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Setting Random MAC address" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
ret_val = otx_ep_dev_set_default_mac_addr(eth_dev, mac_addr);
if (ret_val) {
- otx_ep_err("Setting MAC address " RTE_ETHER_ADDR_PRT_FMT "fails\n",
+ otx_ep_err("Setting MAC address " RTE_ETHER_ADDR_PRT_FMT "fails",
RTE_ETHER_ADDR_BYTES(mac_addr));
return ret_val;
}
}
- otx_ep_dbg("Received valid MAC addr from PF" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Received valid MAC addr from PF" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
} else {
- otx_ep_err("Getting MAC address from PF via Mbox fails with ret_val: %d\n",
+ otx_ep_err("Getting MAC address from PF via Mbox fails with ret_val: %d",
ret_val);
return ret_val;
}
@@ -780,7 +780,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
/* Parse devargs string */
if (otx_ethdev_parse_devargs(eth_dev->device->devargs, otx_epvf)) {
- otx_ep_err("Failed to parse devargs\n");
+ otx_ep_err("Failed to parse devargs");
return -EINVAL;
}
@@ -797,7 +797,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
otx_epvf->mbox_neg_ver = OTX_EP_MBOX_VERSION_V1;
eth_dev->data->mac_addrs = rte_zmalloc("otx_ep", RTE_ETHER_ADDR_LEN, 0);
if (eth_dev->data->mac_addrs == NULL) {
- otx_ep_err("MAC addresses memory allocation failed\n");
+ otx_ep_err("MAC addresses memory allocation failed");
eth_dev->dev_ops = NULL;
return -ENOMEM;
}
@@ -817,12 +817,12 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
otx_epvf->chip_id == PCI_DEVID_CNF10KA_EP_NET_VF ||
otx_epvf->chip_id == PCI_DEVID_CNF10KB_EP_NET_VF) {
otx_epvf->pkind = SDP_OTX2_PKIND_FS0;
- otx_ep_info("using pkind %d\n", otx_epvf->pkind);
+ otx_ep_info("using pkind %d", otx_epvf->pkind);
} else if (otx_epvf->chip_id == PCI_DEVID_OCTEONTX_EP_VF) {
otx_epvf->pkind = SDP_PKIND;
- otx_ep_info("Using pkind %d.\n", otx_epvf->pkind);
+ otx_ep_info("Using pkind %d.", otx_epvf->pkind);
} else {
- otx_ep_err("Invalid chip id\n");
+ otx_ep_err("Invalid chip id");
return -EINVAL;
}
@@ -831,7 +831,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
if (otx_ep_eth_dev_query_set_vf_mac(eth_dev,
(struct rte_ether_addr *)&vf_mac_addr)) {
- otx_ep_err("set mac addr failed\n");
+ otx_ep_err("set mac addr failed");
return -ENODEV;
}
rte_ether_addr_copy(&vf_mac_addr, eth_dev->data->mac_addrs);
diff --git a/drivers/net/octeon_ep/otx_ep_mbox.c b/drivers/net/octeon_ep/otx_ep_mbox.c
index 4118645dc7..c92adeaf9a 100644
--- a/drivers/net/octeon_ep/otx_ep_mbox.c
+++ b/drivers/net/octeon_ep/otx_ep_mbox.c
@@ -44,11 +44,11 @@ __otx_ep_send_mbox_cmd(struct otx_ep_device *otx_ep,
}
}
if (count == OTX_EP_MBOX_TIMEOUT_MS) {
- otx_ep_err("mbox send Timeout count:%d\n", count);
+ otx_ep_err("mbox send Timeout count:%d", count);
return OTX_EP_MBOX_TIMEOUT_MS;
}
if (rsp->s.type != OTX_EP_MBOX_TYPE_RSP_ACK) {
- otx_ep_err("mbox received NACK from PF\n");
+ otx_ep_err("mbox received NACK from PF");
return OTX_EP_MBOX_CMD_STATUS_NACK;
}
@@ -65,7 +65,7 @@ otx_ep_send_mbox_cmd(struct otx_ep_device *otx_ep,
rte_spinlock_lock(&otx_ep->mbox_lock);
if (otx_ep_cmd_versions[cmd.s.opcode] > otx_ep->mbox_neg_ver) {
- otx_ep_dbg("CMD:%d not supported in Version:%d\n", cmd.s.opcode,
+ otx_ep_dbg("CMD:%d not supported in Version:%d", cmd.s.opcode,
otx_ep->mbox_neg_ver);
rte_spinlock_unlock(&otx_ep->mbox_lock);
return -EOPNOTSUPP;
@@ -92,7 +92,7 @@ otx_ep_mbox_bulk_read(struct otx_ep_device *otx_ep,
/* Send cmd to read data from PF */
ret = __otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("mbox bulk read data request failed\n");
+ otx_ep_err("mbox bulk read data request failed");
rte_spinlock_unlock(&otx_ep->mbox_lock);
return ret;
}
@@ -108,7 +108,7 @@ otx_ep_mbox_bulk_read(struct otx_ep_device *otx_ep,
while (data_len) {
ret = __otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("mbox bulk read data request failed\n");
+ otx_ep_err("mbox bulk read data request failed");
otx_ep->mbox_data_index = 0;
memset(otx_ep->mbox_data_buf, 0, OTX_EP_MBOX_MAX_DATA_BUF_SIZE);
rte_spinlock_unlock(&otx_ep->mbox_lock);
@@ -154,10 +154,10 @@ otx_ep_mbox_set_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu)
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("set MTU failed\n");
+ otx_ep_err("set MTU failed");
return -EINVAL;
}
- otx_ep_dbg("mtu set success mtu %u\n", mtu);
+ otx_ep_dbg("mtu set success mtu %u", mtu);
return 0;
}
@@ -178,10 +178,10 @@ otx_ep_mbox_set_mac_addr(struct rte_eth_dev *eth_dev,
cmd.s_set_mac.mac_addr[i] = mac_addr->addr_bytes[i];
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("set MAC address failed\n");
+ otx_ep_err("set MAC address failed");
return -EINVAL;
}
- otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT,
__func__, RTE_ETHER_ADDR_BYTES(mac_addr));
rte_ether_addr_copy(mac_addr, eth_dev->data->mac_addrs);
return 0;
@@ -201,12 +201,12 @@ otx_ep_mbox_get_mac_addr(struct rte_eth_dev *eth_dev,
cmd.s_set_mac.opcode = OTX_EP_MBOX_CMD_GET_MAC_ADDR;
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("get MAC address failed\n");
+ otx_ep_err("get MAC address failed");
return -EINVAL;
}
for (i = 0; i < RTE_ETHER_ADDR_LEN; i++)
mac_addr->addr_bytes[i] = rsp.s_set_mac.mac_addr[i];
- otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT,
__func__, RTE_ETHER_ADDR_BYTES(mac_addr));
return 0;
}
@@ -224,7 +224,7 @@ int otx_ep_mbox_get_link_status(struct rte_eth_dev *eth_dev,
cmd.s_link_status.opcode = OTX_EP_MBOX_CMD_GET_LINK_STATUS;
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("Get link status failed\n");
+ otx_ep_err("Get link status failed");
return -EINVAL;
}
*oper_up = rsp.s_link_status.status;
@@ -242,7 +242,7 @@ int otx_ep_mbox_get_link_info(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_bulk_read(otx_ep, OTX_EP_MBOX_CMD_GET_LINK_INFO,
(uint8_t *)&link_info, (int32_t *)&size);
if (ret) {
- otx_ep_err("Get link info failed\n");
+ otx_ep_err("Get link info failed");
return ret;
}
link->link_status = RTE_ETH_LINK_UP;
@@ -310,12 +310,12 @@ int otx_ep_mbox_version_check(struct rte_eth_dev *eth_dev)
* during initialization of PMD driver.
*/
if (ret == OTX_EP_MBOX_CMD_STATUS_NACK || rsp.s_version.version == 0) {
- otx_ep_dbg("VF Mbox version fallback to base version from:%u\n",
+ otx_ep_dbg("VF Mbox version fallback to base version from:%u",
(uint32_t)cmd.s_version.version);
return 0;
}
otx_ep->mbox_neg_ver = (uint32_t)rsp.s_version.version;
- otx_ep_dbg("VF Mbox version:%u Negotiated VF version with PF:%u\n",
+ otx_ep_dbg("VF Mbox version:%u Negotiated VF version with PF:%u",
(uint32_t)cmd.s_version.version,
(uint32_t)rsp.s_version.version);
return 0;
diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c
index ec32ab087e..9680a59797 100644
--- a/drivers/net/octeon_ep/otx_ep_rxtx.c
+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c
@@ -23,19 +23,19 @@ otx_ep_dmazone_free(const struct rte_memzone *mz)
int ret = 0;
if (mz == NULL) {
- otx_ep_err("Memzone: NULL\n");
+ otx_ep_err("Memzone: NULL");
return;
}
mz_tmp = rte_memzone_lookup(mz->name);
if (mz_tmp == NULL) {
- otx_ep_err("Memzone %s Not Found\n", mz->name);
+ otx_ep_err("Memzone %s Not Found", mz->name);
return;
}
ret = rte_memzone_free(mz);
if (ret)
- otx_ep_err("Memzone free failed : ret = %d\n", ret);
+ otx_ep_err("Memzone free failed : ret = %d", ret);
}
/* Free IQ resources */
@@ -47,7 +47,7 @@ otx_ep_delete_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no)
iq = otx_ep->instr_queue[iq_no];
if (iq == NULL) {
- otx_ep_err("Invalid IQ[%d]\n", iq_no);
+ otx_ep_err("Invalid IQ[%d]", iq_no);
return -EINVAL;
}
@@ -69,7 +69,7 @@ otx_ep_delete_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no)
otx_ep->nb_tx_queues--;
- otx_ep_info("IQ[%d] is deleted\n", iq_no);
+ otx_ep_info("IQ[%d] is deleted", iq_no);
return 0;
}
@@ -95,7 +95,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
OTX_EP_PCI_RING_ALIGN,
socket_id);
if (iq->iq_mz == NULL) {
- otx_ep_err("IQ[%d] memzone alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] memzone alloc failed", iq_no);
goto iq_init_fail;
}
@@ -103,7 +103,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
iq->base_addr = (uint8_t *)iq->iq_mz->addr;
if (num_descs & (num_descs - 1)) {
- otx_ep_err("IQ[%d] descs not in power of 2\n", iq_no);
+ otx_ep_err("IQ[%d] descs not in power of 2", iq_no);
goto iq_init_fail;
}
@@ -118,7 +118,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
RTE_CACHE_LINE_SIZE,
rte_socket_id());
if (iq->req_list == NULL) {
- otx_ep_err("IQ[%d] req_list alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] req_list alloc failed", iq_no);
goto iq_init_fail;
}
@@ -126,7 +126,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
sg = rte_zmalloc_socket("sg_entry", (OTX_EP_MAX_SG_LISTS * OTX_EP_SG_ENTRY_SIZE),
OTX_EP_SG_ALIGN, rte_socket_id());
if (sg == NULL) {
- otx_ep_err("IQ[%d] sg_entries alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] sg_entries alloc failed", iq_no);
goto iq_init_fail;
}
@@ -134,14 +134,14 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
iq->req_list[i].finfo.g.sg = sg;
}
- otx_ep_info("IQ[%d]: base: %p basedma: %lx count: %d\n",
+ otx_ep_info("IQ[%d]: base: %p basedma: %lx count: %d",
iq_no, iq->base_addr, (unsigned long)iq->base_addr_dma,
iq->nb_desc);
iq->mbuf_list = rte_zmalloc_socket("mbuf_list", (iq->nb_desc * sizeof(struct rte_mbuf *)),
RTE_CACHE_LINE_SIZE, rte_socket_id());
if (!iq->mbuf_list) {
- otx_ep_err("IQ[%d] mbuf_list alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] mbuf_list alloc failed", iq_no);
goto iq_init_fail;
}
@@ -187,12 +187,12 @@ otx_ep_setup_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no, int num_descs,
otx_ep->instr_queue[iq_no] = iq;
if (otx_ep_init_instr_queue(otx_ep, iq_no, num_descs, socket_id)) {
- otx_ep_err("IQ init is failed\n");
+ otx_ep_err("IQ init is failed");
goto delete_IQ;
}
otx_ep->nb_tx_queues++;
- otx_ep_info("IQ[%d] is created.\n", iq_no);
+ otx_ep_info("IQ[%d] is created.", iq_no);
return 0;
@@ -235,7 +235,7 @@ otx_ep_delete_oqs(struct otx_ep_device *otx_ep, uint32_t oq_no)
droq = otx_ep->droq[oq_no];
if (droq == NULL) {
- otx_ep_err("Invalid droq[%d]\n", oq_no);
+ otx_ep_err("Invalid droq[%d]", oq_no);
return -EINVAL;
}
@@ -255,7 +255,7 @@ otx_ep_delete_oqs(struct otx_ep_device *otx_ep, uint32_t oq_no)
otx_ep->nb_rx_queues--;
- otx_ep_info("OQ[%d] is deleted\n", oq_no);
+ otx_ep_info("OQ[%d] is deleted", oq_no);
return 0;
}
@@ -270,7 +270,7 @@ otx_ep_droq_setup_ring_buffers(struct otx_ep_droq *droq)
for (idx = 0; idx < droq->nb_desc; idx++) {
buf = rte_pktmbuf_alloc(droq->mpool);
if (buf == NULL) {
- otx_ep_err("OQ buffer alloc failed\n");
+ otx_ep_err("OQ buffer alloc failed");
droq->stats.rx_alloc_failure++;
return -ENOMEM;
}
@@ -324,7 +324,7 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,
uint32_t desc_ring_size;
int ret;
- otx_ep_info("OQ[%d] Init start\n", q_no);
+ otx_ep_info("OQ[%d] Init start", q_no);
droq = otx_ep->droq[q_no];
droq->otx_ep_dev = otx_ep;
@@ -344,23 +344,23 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,
socket_id);
if (droq->desc_ring_mz == NULL) {
- otx_ep_err("OQ:%d desc_ring allocation failed\n", q_no);
+ otx_ep_err("OQ:%d desc_ring allocation failed", q_no);
goto init_droq_fail;
}
droq->desc_ring_dma = droq->desc_ring_mz->iova;
droq->desc_ring = (struct otx_ep_droq_desc *)droq->desc_ring_mz->addr;
- otx_ep_dbg("OQ[%d]: desc_ring: virt: 0x%p, dma: %lx\n",
+ otx_ep_dbg("OQ[%d]: desc_ring: virt: 0x%p, dma: %lx",
q_no, droq->desc_ring, (unsigned long)droq->desc_ring_dma);
- otx_ep_dbg("OQ[%d]: num_desc: %d\n", q_no, droq->nb_desc);
+ otx_ep_dbg("OQ[%d]: num_desc: %d", q_no, droq->nb_desc);
/* OQ buf_list set up */
droq->recv_buf_list = rte_zmalloc_socket("recv_buf_list",
(droq->nb_desc * sizeof(struct rte_mbuf *)),
RTE_CACHE_LINE_SIZE, socket_id);
if (droq->recv_buf_list == NULL) {
- otx_ep_err("OQ recv_buf_list alloc failed\n");
+ otx_ep_err("OQ recv_buf_list alloc failed");
goto init_droq_fail;
}
@@ -396,17 +396,17 @@ otx_ep_setup_oqs(struct otx_ep_device *otx_ep, int oq_no, int num_descs,
droq = (struct otx_ep_droq *)rte_zmalloc("otx_ep_OQ",
sizeof(*droq), RTE_CACHE_LINE_SIZE);
if (droq == NULL) {
- otx_ep_err("Droq[%d] Creation Failed\n", oq_no);
+ otx_ep_err("Droq[%d] Creation Failed", oq_no);
return -ENOMEM;
}
otx_ep->droq[oq_no] = droq;
if (otx_ep_init_droq(otx_ep, oq_no, num_descs, desc_size, mpool,
socket_id)) {
- otx_ep_err("Droq[%d] Initialization failed\n", oq_no);
+ otx_ep_err("Droq[%d] Initialization failed", oq_no);
goto delete_OQ;
}
- otx_ep_info("OQ[%d] is created.\n", oq_no);
+ otx_ep_info("OQ[%d] is created.", oq_no);
otx_ep->nb_rx_queues++;
@@ -431,12 +431,12 @@ otx_ep_iqreq_delete(struct otx_ep_instr_queue *iq, uint32_t idx)
case OTX_EP_REQTYPE_NORESP_GATHER:
/* This will take care of multiple segments also */
rte_pktmbuf_free(mbuf);
- otx_ep_dbg("IQ buffer freed at idx[%d]\n", idx);
+ otx_ep_dbg("IQ buffer freed at idx[%d]", idx);
break;
case OTX_EP_REQTYPE_NONE:
default:
- otx_ep_info("This iqreq mode is not supported:%d\n", reqtype);
+ otx_ep_info("This iqreq mode is not supported:%d", reqtype);
}
/* Reset the request list at this index */
@@ -599,7 +599,7 @@ prepare_xmit_gather_list(struct otx_ep_instr_queue *iq, struct rte_mbuf *m, uint
num_sg = (frags + mask) / OTX_EP_NUM_SG_PTRS;
if (unlikely(pkt_len > OTX_EP_MAX_PKT_SZ && num_sg > OTX_EP_MAX_SG_LISTS)) {
- otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments\n");
+ otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments");
goto exit;
}
@@ -675,16 +675,16 @@ otx_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts)
iqcmd.irh.u64 = rte_bswap64(iqcmd.irh.u64);
#ifdef OTX_EP_IO_DEBUG
- otx_ep_dbg("After swapping\n");
- otx_ep_dbg("Word0 [dptr]: 0x%016lx\n",
+ otx_ep_dbg("After swapping");
+ otx_ep_dbg("Word0 [dptr]: 0x%016lx",
(unsigned long)iqcmd.dptr);
- otx_ep_dbg("Word1 [ihtx]: 0x%016lx\n", (unsigned long)iqcmd.ih);
- otx_ep_dbg("Word2 [pki_ih3]: 0x%016lx\n",
+ otx_ep_dbg("Word1 [ihtx]: 0x%016lx", (unsigned long)iqcmd.ih);
+ otx_ep_dbg("Word2 [pki_ih3]: 0x%016lx",
(unsigned long)iqcmd.pki_ih3);
- otx_ep_dbg("Word3 [rptr]: 0x%016lx\n",
+ otx_ep_dbg("Word3 [rptr]: 0x%016lx",
(unsigned long)iqcmd.rptr);
- otx_ep_dbg("Word4 [irh]: 0x%016lx\n", (unsigned long)iqcmd.irh);
- otx_ep_dbg("Word5 [exhdr[0]]: 0x%016lx\n",
+ otx_ep_dbg("Word4 [irh]: 0x%016lx", (unsigned long)iqcmd.irh);
+ otx_ep_dbg("Word5 [exhdr[0]]: 0x%016lx",
(unsigned long)iqcmd.exhdr[0]);
rte_pktmbuf_dump(stdout, m, rte_pktmbuf_pkt_len(m));
#endif
@@ -757,7 +757,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
if (unlikely(!info->length)) {
int retry = OTX_EP_MAX_DELAYED_PKT_RETRIES;
/* otx_ep_dbg("OCTEON DROQ[%d]: read_idx: %d; Data not ready "
- * "yet, Retry; pending=%lu\n", droq->q_no, droq->read_idx,
+ * "yet, Retry; pending=%lu", droq->q_no, droq->read_idx,
* droq->pkts_pending);
*/
droq->stats.pkts_delayed_data++;
@@ -766,7 +766,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
rte_delay_us_block(50);
}
if (!retry && !info->length) {
- otx_ep_err("OCTEON DROQ[%d]: read_idx: %d; Retry failed !!\n",
+ otx_ep_err("OCTEON DROQ[%d]: read_idx: %d; Retry failed !!",
droq->q_no, droq->read_idx);
/* May be zero length packet; drop it */
assert(0);
@@ -834,7 +834,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
last_buf = mbuf;
} else {
- otx_ep_err("no buf\n");
+ otx_ep_err("no buf");
assert(0);
}
diff --git a/drivers/net/octeon_ep/otx_ep_vf.c b/drivers/net/octeon_ep/otx_ep_vf.c
index 236b7a874c..7defb0f13d 100644
--- a/drivers/net/octeon_ep/otx_ep_vf.c
+++ b/drivers/net/octeon_ep/otx_ep_vf.c
@@ -142,7 +142,7 @@ otx_ep_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
iq->inst_cnt_reg = (uint8_t *)otx_ep->hw_addr +
OTX_EP_R_IN_CNTS(iq_no);
- otx_ep_dbg("InstQ[%d]:dbell reg @ 0x%p inst_cnt_reg @ 0x%p\n",
+ otx_ep_dbg("InstQ[%d]:dbell reg @ 0x%p inst_cnt_reg @ 0x%p",
iq_no, iq->doorbell_reg, iq->inst_cnt_reg);
loop = OTX_EP_BUSY_LOOP_COUNT;
@@ -220,14 +220,14 @@ otx_ep_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0)
return -EIO;
- otx_ep_dbg("OTX_EP_R[%d]_credit:%x\n", oq_no,
+ otx_ep_dbg("OTX_EP_R[%d]_credit:%x", oq_no,
rte_read32(droq->pkts_credit_reg));
/* Clear the OQ_OUT_CNTS doorbell */
reg_val = rte_read32(droq->pkts_sent_reg);
rte_write32((uint32_t)reg_val, droq->pkts_sent_reg);
- otx_ep_dbg("OTX_EP_R[%d]_sent: %x\n", oq_no,
+ otx_ep_dbg("OTX_EP_R[%d]_sent: %x", oq_no,
rte_read32(droq->pkts_sent_reg));
loop = OTX_EP_BUSY_LOOP_COUNT;
@@ -259,7 +259,7 @@ otx_ep_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("dbell reset failed\n");
+ otx_ep_err("dbell reset failed");
return -EIO;
}
@@ -269,7 +269,7 @@ otx_ep_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
otx_ep_write64(reg_val, otx_ep->hw_addr, OTX_EP_R_IN_ENABLE(q_no));
- otx_ep_info("IQ[%d] enable done\n", q_no);
+ otx_ep_info("IQ[%d] enable done", q_no);
return 0;
}
@@ -290,7 +290,7 @@ otx_ep_enable_oq(struct otx_ep_device *otx_ep, uint32_t q_no)
rte_delay_ms(1);
}
if (loop < 0) {
- otx_ep_err("dbell reset failed\n");
+ otx_ep_err("dbell reset failed");
return -EIO;
}
@@ -299,7 +299,7 @@ otx_ep_enable_oq(struct otx_ep_device *otx_ep, uint32_t q_no)
reg_val |= 0x1ull;
otx_ep_write64(reg_val, otx_ep->hw_addr, OTX_EP_R_OUT_ENABLE(q_no));
- otx_ep_info("OQ[%d] enable done\n", q_no);
+ otx_ep_info("OQ[%d] enable done", q_no);
return 0;
}
@@ -402,10 +402,10 @@ otx_ep_vf_setup_device(struct otx_ep_device *otx_ep)
if (otx_ep->conf == NULL) {
otx_ep->conf = otx_ep_get_defconf(otx_ep);
if (otx_ep->conf == NULL) {
- otx_ep_err("OTX_EP VF default config not found\n");
+ otx_ep_err("OTX_EP VF default config not found");
return -ENOENT;
}
- otx_ep_info("Default config is used\n");
+ otx_ep_info("Default config is used");
}
/* Get IOQs (RPVF] count */
@@ -414,7 +414,7 @@ otx_ep_vf_setup_device(struct otx_ep_device *otx_ep)
otx_ep->sriov_info.rings_per_vf = ((reg_val >> OTX_EP_R_IN_CTL_RPVF_POS)
& OTX_EP_R_IN_CTL_RPVF_MASK);
- otx_ep_info("OTX_EP RPVF: %d\n", otx_ep->sriov_info.rings_per_vf);
+ otx_ep_info("OTX_EP RPVF: %d", otx_ep->sriov_info.rings_per_vf);
otx_ep->fn_list.setup_iq_regs = otx_ep_setup_iq_regs;
otx_ep->fn_list.setup_oq_regs = otx_ep_setup_oq_regs;
diff --git a/drivers/net/octeontx/base/octeontx_pkovf.c b/drivers/net/octeontx/base/octeontx_pkovf.c
index 5d445dfb49..7aec84a813 100644
--- a/drivers/net/octeontx/base/octeontx_pkovf.c
+++ b/drivers/net/octeontx/base/octeontx_pkovf.c
@@ -364,7 +364,7 @@ octeontx_pko_chan_stop(struct octeontx_pko_vf_ctl_s *ctl, uint64_t chanid)
res = octeontx_pko_dq_close(dq);
if (res < 0)
- octeontx_log_err("closing DQ%d failed\n", dq);
+ octeontx_log_err("closing DQ%d failed", dq);
dq_cnt++;
dq++;
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3c2154043c..c802b2c389 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1223,7 +1223,7 @@ octeontx_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
if (dev->data->tx_queues[qid]) {
res = octeontx_dev_tx_queue_stop(dev, qid);
if (res < 0)
- octeontx_log_err("failed stop tx_queue(%d)\n", qid);
+ octeontx_log_err("failed stop tx_queue(%d)", qid);
rte_free(dev->data->tx_queues[qid]);
}
@@ -1342,7 +1342,7 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
/* Verify queue index */
if (qidx >= dev->data->nb_rx_queues) {
- octeontx_log_err("QID %d not supported (0 - %d available)\n",
+ octeontx_log_err("QID %d not supported (0 - %d available)",
qidx, (dev->data->nb_rx_queues - 1));
return -ENOTSUP;
}
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index bfec085045..9626c343dc 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -1093,11 +1093,11 @@ set_iface_direction(const char *iface, pcap_t *pcap,
{
const char *direction_str = (direction == PCAP_D_IN) ? "IN" : "OUT";
if (pcap_setdirection(pcap, direction) < 0) {
- PMD_LOG(ERR, "Setting %s pcap direction %s failed - %s\n",
+ PMD_LOG(ERR, "Setting %s pcap direction %s failed - %s",
iface, direction_str, pcap_geterr(pcap));
return -1;
}
- PMD_LOG(INFO, "Setting %s pcap direction %s\n",
+ PMD_LOG(INFO, "Setting %s pcap direction %s",
iface, direction_str);
return 0;
}
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index eccaaa2448..725ffcb2bc 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -161,7 +161,7 @@ pfe_recv_pkts_on_intr(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
writel(readl(HIF_INT_ENABLE) | HIF_RXPKT_INT, HIF_INT_ENABLE);
ret = epoll_wait(priv->pfe->hif.epoll_fd, &epoll_ev, 1, ticks);
if (ret < 0 && errno != EINTR)
- PFE_PMD_ERR("epoll_wait fails with %d\n", errno);
+ PFE_PMD_ERR("epoll_wait fails with %d", errno);
}
return work_done;
@@ -338,9 +338,9 @@ pfe_eth_open_cdev(struct pfe_eth_priv_s *priv)
pfe_cdev_fd = open(PFE_CDEV_PATH, O_RDONLY);
if (pfe_cdev_fd < 0) {
- PFE_PMD_WARN("Unable to open PFE device file (%s).\n",
+ PFE_PMD_WARN("Unable to open PFE device file (%s).",
PFE_CDEV_PATH);
- PFE_PMD_WARN("Link status update will not be available.\n");
+ PFE_PMD_WARN("Link status update will not be available.");
priv->link_fd = PFE_CDEV_INVALID_FD;
return -1;
}
@@ -583,16 +583,16 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
ret = ioctl(priv->link_fd, ioctl_cmd, &lstatus);
if (ret != 0) {
- PFE_PMD_ERR("Unable to fetch link status (ioctl)\n");
+ PFE_PMD_ERR("Unable to fetch link status (ioctl)");
return -1;
}
- PFE_PMD_DEBUG("Fetched link state (%d) for dev %d.\n",
+ PFE_PMD_DEBUG("Fetched link state (%d) for dev %d.",
lstatus, priv->id);
}
if (old.link_status == lstatus) {
/* no change in status */
- PFE_PMD_DEBUG("No change in link status; Not updating.\n");
+ PFE_PMD_DEBUG("No change in link status; Not updating.");
return -1;
}
@@ -603,7 +603,7 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
pfe_eth_atomic_write_link_status(dev, &link);
- PFE_PMD_INFO("Port (%d) link is %s\n", dev->data->port_id,
+ PFE_PMD_INFO("Port (%d) link is %s", dev->data->port_id,
link.link_status ? "up" : "down");
return 0;
@@ -993,24 +993,24 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)
addr = of_get_address(np, 0, &cbus_size, NULL);
if (!addr) {
- PFE_PMD_ERR("of_get_address cannot return qman address\n");
+ PFE_PMD_ERR("of_get_address cannot return qman address");
goto err;
}
cbus_addr = of_translate_address(np, addr);
if (!cbus_addr) {
- PFE_PMD_ERR("of_translate_address failed\n");
+ PFE_PMD_ERR("of_translate_address failed");
goto err;
}
addr = of_get_address(np, 1, &ddr_size, NULL);
if (!addr) {
- PFE_PMD_ERR("of_get_address cannot return qman address\n");
+ PFE_PMD_ERR("of_get_address cannot return qman address");
goto err;
}
g_pfe->ddr_phys_baseaddr = of_translate_address(np, addr);
if (!g_pfe->ddr_phys_baseaddr) {
- PFE_PMD_ERR("of_translate_address failed\n");
+ PFE_PMD_ERR("of_translate_address failed");
goto err;
}
diff --git a/drivers/net/pfe/pfe_hif.c b/drivers/net/pfe/pfe_hif.c
index e2b23bbeb7..abb9cde996 100644
--- a/drivers/net/pfe/pfe_hif.c
+++ b/drivers/net/pfe/pfe_hif.c
@@ -309,7 +309,7 @@ client_put_rxpacket(struct hif_rx_queue *queue,
if (readl(&desc->ctrl) & CL_DESC_OWN) {
mbuf = rte_cpu_to_le_64(rte_pktmbuf_alloc(pool));
if (unlikely(!mbuf)) {
- PFE_PMD_WARN("Buffer allocation failure\n");
+ PFE_PMD_WARN("Buffer allocation failure");
return NULL;
}
@@ -770,9 +770,9 @@ pfe_hif_rx_idle(struct pfe_hif *hif)
} while (--hif_stop_loop);
if (readl(HIF_RX_STATUS) & BDP_CSR_RX_DMA_ACTV)
- PFE_PMD_ERR("Failed\n");
+ PFE_PMD_ERR("Failed");
else
- PFE_PMD_INFO("Done\n");
+ PFE_PMD_INFO("Done");
}
#endif
@@ -806,7 +806,7 @@ pfe_hif_init(struct pfe *pfe)
pfe_cdev_fd = open(PFE_CDEV_PATH, O_RDWR);
if (pfe_cdev_fd < 0) {
- PFE_PMD_WARN("Unable to open PFE device file (%s).\n",
+ PFE_PMD_WARN("Unable to open PFE device file (%s).",
PFE_CDEV_PATH);
pfe->cdev_fd = PFE_CDEV_INVALID_FD;
return -1;
@@ -817,7 +817,7 @@ pfe_hif_init(struct pfe *pfe)
/* hif interrupt enable */
err = ioctl(pfe->cdev_fd, PFE_CDEV_HIF_INTR_EN, &event_fd);
if (err) {
- PFE_PMD_ERR("\nioctl failed for intr enable err: %d\n",
+ PFE_PMD_ERR("ioctl failed for intr enable err: %d",
errno);
goto err0;
}
@@ -826,7 +826,7 @@ pfe_hif_init(struct pfe *pfe)
epoll_ev.data.fd = event_fd;
err = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, event_fd, &epoll_ev);
if (err < 0) {
- PFE_PMD_ERR("epoll_ctl failed with err = %d\n", errno);
+ PFE_PMD_ERR("epoll_ctl failed with err = %d", errno);
goto err0;
}
pfe->hif.epoll_fd = epoll_fd;
diff --git a/drivers/net/pfe/pfe_hif_lib.c b/drivers/net/pfe/pfe_hif_lib.c
index 6fe6d33d23..541ba365c6 100644
--- a/drivers/net/pfe/pfe_hif_lib.c
+++ b/drivers/net/pfe/pfe_hif_lib.c
@@ -157,7 +157,7 @@ hif_lib_client_init_rx_buffers(struct hif_client_s *client,
queue->queue_id = 0;
queue->port_id = client->port_id;
queue->priv = client->priv;
- PFE_PMD_DEBUG("rx queue: %d, base: %p, size: %d\n", qno,
+ PFE_PMD_DEBUG("rx queue: %d, base: %p, size: %d", qno,
queue->base, queue->size);
}
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index ede5fc83e3..25e28fd9f6 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -887,7 +887,7 @@ qede_free_tx_pkt(struct qede_tx_queue *txq)
mbuf = txq->sw_tx_ring[idx];
if (mbuf) {
nb_segs = mbuf->nb_segs;
- PMD_TX_LOG(DEBUG, txq, "nb_segs to free %u\n", nb_segs);
+ PMD_TX_LOG(DEBUG, txq, "nb_segs to free %u", nb_segs);
while (nb_segs) {
/* It's like consuming rxbuf in recv() */
ecore_chain_consume(&txq->tx_pbl);
@@ -897,7 +897,7 @@ qede_free_tx_pkt(struct qede_tx_queue *txq)
rte_pktmbuf_free(mbuf);
txq->sw_tx_ring[idx] = NULL;
txq->sw_tx_cons++;
- PMD_TX_LOG(DEBUG, txq, "Freed tx packet\n");
+ PMD_TX_LOG(DEBUG, txq, "Freed tx packet");
} else {
ecore_chain_consume(&txq->tx_pbl);
txq->nb_tx_avail++;
@@ -919,7 +919,7 @@ qede_process_tx_compl(__rte_unused struct ecore_dev *edev,
#ifdef RTE_LIBRTE_QEDE_DEBUG_TX
sw_tx_cons = ecore_chain_get_cons_idx(&txq->tx_pbl);
- PMD_TX_LOG(DEBUG, txq, "Tx Completions = %u\n",
+ PMD_TX_LOG(DEBUG, txq, "Tx Completions = %u",
abs(hw_bd_cons - sw_tx_cons));
#endif
while (hw_bd_cons != ecore_chain_get_cons_idx(&txq->tx_pbl))
@@ -1353,7 +1353,7 @@ qede_rx_process_tpa_cmn_cont_end_cqe(__rte_unused struct qede_dev *qdev,
tpa_info->tpa_tail = curr_frag;
qede_rx_bd_ring_consume(rxq);
if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
- PMD_RX_LOG(ERR, rxq, "mbuf allocation fails\n");
+ PMD_RX_LOG(ERR, rxq, "mbuf allocation fails");
rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;
rxq->rx_alloc_errors++;
}
@@ -1365,7 +1365,7 @@ qede_rx_process_tpa_cont_cqe(struct qede_dev *qdev,
struct qede_rx_queue *rxq,
struct eth_fast_path_rx_tpa_cont_cqe *cqe)
{
- PMD_RX_LOG(INFO, rxq, "TPA cont[%d] - len [%d]\n",
+ PMD_RX_LOG(INFO, rxq, "TPA cont[%d] - len [%d]",
cqe->tpa_agg_index, rte_le_to_cpu_16(cqe->len_list[0]));
/* only len_list[0] will have value */
qede_rx_process_tpa_cmn_cont_end_cqe(qdev, rxq, cqe->tpa_agg_index,
@@ -1388,7 +1388,7 @@ qede_rx_process_tpa_end_cqe(struct qede_dev *qdev,
rx_mb->pkt_len = cqe->total_packet_len;
PMD_RX_LOG(INFO, rxq, "TPA End[%d] reason %d cqe_len %d nb_segs %d"
- " pkt_len %d\n", cqe->tpa_agg_index, cqe->end_reason,
+ " pkt_len %d", cqe->tpa_agg_index, cqe->end_reason,
rte_le_to_cpu_16(cqe->len_list[0]), rx_mb->nb_segs,
rx_mb->pkt_len);
}
@@ -1471,7 +1471,7 @@ qede_process_sg_pkts(void *p_rxq, struct rte_mbuf *rx_mb,
pkt_len;
if (unlikely(!cur_size)) {
PMD_RX_LOG(ERR, rxq, "Length is 0 while %u BDs"
- " left for mapping jumbo\n", num_segs);
+ " left for mapping jumbo", num_segs);
qede_recycle_rx_bd_ring(rxq, qdev, num_segs);
return -EINVAL;
}
@@ -1497,7 +1497,7 @@ print_rx_bd_info(struct rte_mbuf *m, struct qede_rx_queue *rxq,
PMD_RX_LOG(INFO, rxq,
"len 0x%04x bf 0x%04x hash_val 0x%x"
" ol_flags 0x%04lx l2=%s l3=%s l4=%s tunn=%s"
- " inner_l2=%s inner_l3=%s inner_l4=%s\n",
+ " inner_l2=%s inner_l3=%s inner_l4=%s",
m->data_len, bitfield, m->hash.rss,
(unsigned long)m->ol_flags,
rte_get_ptype_l2_name(m->packet_type),
@@ -1548,7 +1548,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
PMD_RX_LOG(ERR, rxq,
"New buffers allocation failed,"
- "dropping incoming packets\n");
+ "dropping incoming packets");
dev = &rte_eth_devices[rxq->port_id];
dev->data->rx_mbuf_alloc_failed += count;
rxq->rx_alloc_errors += count;
@@ -1579,13 +1579,13 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
cqe =
(union eth_rx_cqe *)ecore_chain_consume(&rxq->rx_comp_ring);
cqe_type = cqe->fast_path_regular.type;
- PMD_RX_LOG(INFO, rxq, "Rx CQE type %d\n", cqe_type);
+ PMD_RX_LOG(INFO, rxq, "Rx CQE type %d", cqe_type);
if (likely(cqe_type == ETH_RX_CQE_TYPE_REGULAR)) {
fp_cqe = &cqe->fast_path_regular;
} else {
if (cqe_type == ETH_RX_CQE_TYPE_SLOW_PATH) {
- PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE\n");
+ PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE");
ecore_eth_cqe_completion
(&edev->hwfns[rxq->queue_id %
edev->num_hwfns],
@@ -1611,10 +1611,10 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
#endif
if (unlikely(qede_tunn_exist(parse_flag))) {
- PMD_RX_LOG(INFO, rxq, "Rx tunneled packet\n");
+ PMD_RX_LOG(INFO, rxq, "Rx tunneled packet");
if (unlikely(qede_check_tunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1624,7 +1624,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (unlikely(qede_check_tunn_csum_l3(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "Outer L3 csum failed, flags = 0x%x\n",
+ "Outer L3 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
@@ -1659,7 +1659,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
if (unlikely(qede_check_notunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1667,7 +1667,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
}
if (unlikely(qede_check_notunn_csum_l3(rx_mb, parse_flag))) {
- PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x\n",
+ PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
@@ -1776,7 +1776,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
PMD_RX_LOG(ERR, rxq,
"New buffers allocation failed,"
- "dropping incoming packets\n");
+ "dropping incoming packets");
dev = &rte_eth_devices[rxq->port_id];
dev->data->rx_mbuf_alloc_failed += count;
rxq->rx_alloc_errors += count;
@@ -1805,7 +1805,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
cqe =
(union eth_rx_cqe *)ecore_chain_consume(&rxq->rx_comp_ring);
cqe_type = cqe->fast_path_regular.type;
- PMD_RX_LOG(INFO, rxq, "Rx CQE type %d\n", cqe_type);
+ PMD_RX_LOG(INFO, rxq, "Rx CQE type %d", cqe_type);
switch (cqe_type) {
case ETH_RX_CQE_TYPE_REGULAR:
@@ -1823,7 +1823,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
PMD_RX_LOG(INFO, rxq,
"TPA start[%d] - len_on_first_bd %d header %d"
- " [bd_list[0] %d], [seg_len %d]\n",
+ " [bd_list[0] %d], [seg_len %d]",
cqe_start_tpa->tpa_agg_index,
rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
cqe_start_tpa->header_len,
@@ -1843,7 +1843,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rx_mb = rxq->tpa_info[tpa_agg_idx].tpa_head;
goto tpa_end;
case ETH_RX_CQE_TYPE_SLOW_PATH:
- PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE\n");
+ PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE");
ecore_eth_cqe_completion(
&edev->hwfns[rxq->queue_id % edev->num_hwfns],
(struct eth_slow_path_rx_cqe *)cqe);
@@ -1881,10 +1881,10 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rss_hash = rte_le_to_cpu_32(cqe_start_tpa->rss_hash);
}
if (qede_tunn_exist(parse_flag)) {
- PMD_RX_LOG(INFO, rxq, "Rx tunneled packet\n");
+ PMD_RX_LOG(INFO, rxq, "Rx tunneled packet");
if (unlikely(qede_check_tunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1894,7 +1894,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (unlikely(qede_check_tunn_csum_l3(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "Outer L3 csum failed, flags = 0x%x\n",
+ "Outer L3 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
@@ -1933,7 +1933,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
if (unlikely(qede_check_notunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1941,7 +1941,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
}
if (unlikely(qede_check_notunn_csum_l3(rx_mb, parse_flag))) {
- PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x\n",
+ PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
@@ -2117,13 +2117,13 @@ print_tx_bd_info(struct qede_tx_queue *txq,
rte_cpu_to_le_16(bd1->data.bitfields));
if (bd2)
PMD_TX_LOG(INFO, txq,
- "BD2: nbytes=0x%04x bf1=0x%04x bf2=0x%04x tunn_ip=0x%04x\n",
+ "BD2: nbytes=0x%04x bf1=0x%04x bf2=0x%04x tunn_ip=0x%04x",
rte_cpu_to_le_16(bd2->nbytes), bd2->data.bitfields1,
bd2->data.bitfields2, bd2->data.tunn_ip_size);
if (bd3)
PMD_TX_LOG(INFO, txq,
"BD3: nbytes=0x%04x bf=0x%04x MSS=0x%04x "
- "tunn_l4_hdr_start_offset_w=0x%04x tunn_hdr_size=0x%04x\n",
+ "tunn_l4_hdr_start_offset_w=0x%04x tunn_hdr_size=0x%04x",
rte_cpu_to_le_16(bd3->nbytes),
rte_cpu_to_le_16(bd3->data.bitfields),
rte_cpu_to_le_16(bd3->data.lso_mss),
@@ -2131,7 +2131,7 @@ print_tx_bd_info(struct qede_tx_queue *txq,
bd3->data.tunn_hdr_size_w);
rte_get_tx_ol_flag_list(tx_ol_flags, ol_buf, sizeof(ol_buf));
- PMD_TX_LOG(INFO, txq, "TX offloads = %s\n", ol_buf);
+ PMD_TX_LOG(INFO, txq, "TX offloads = %s", ol_buf);
}
#endif
@@ -2201,7 +2201,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts,
#ifdef RTE_LIBRTE_QEDE_DEBUG_TX
if (unlikely(i != nb_pkts))
- PMD_TX_LOG(ERR, txq, "TX prepare failed for %u\n",
+ PMD_TX_LOG(ERR, txq, "TX prepare failed for %u",
nb_pkts - i);
#endif
return i;
@@ -2215,16 +2215,16 @@ qede_mpls_tunn_tx_sanity_check(struct rte_mbuf *mbuf,
struct qede_tx_queue *txq)
{
if (((mbuf->outer_l2_len + mbuf->outer_l3_len) / 2) > 0xff)
- PMD_TX_LOG(ERR, txq, "tunn_l4_hdr_start_offset overflow\n");
+ PMD_TX_LOG(ERR, txq, "tunn_l4_hdr_start_offset overflow");
if (((mbuf->outer_l2_len + mbuf->outer_l3_len +
MPLSINUDP_HDR_SIZE) / 2) > 0xff)
- PMD_TX_LOG(ERR, txq, "tunn_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "tunn_hdr_size overflow");
if (((mbuf->l2_len - MPLSINUDP_HDR_SIZE) / 2) >
ETH_TX_DATA_2ND_BD_TUNN_INNER_L2_HDR_SIZE_W_MASK)
- PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow");
if (((mbuf->l2_len - MPLSINUDP_HDR_SIZE + mbuf->l3_len) / 2) >
ETH_TX_DATA_2ND_BD_L4_HDR_START_OFFSET_W_MASK)
- PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow");
}
#endif
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 609d95dcfa..4441a90bdf 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -1814,7 +1814,7 @@ nicvf_dev_start(struct rte_eth_dev *dev)
/* Apply new link configurations if changed */
ret = nicvf_apply_link_speed(dev);
if (ret) {
- PMD_INIT_LOG(ERR, "Failed to set link configuration\n");
+ PMD_INIT_LOG(ERR, "Failed to set link configuration");
return ret;
}
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 2fabb9fc4e..2834468764 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -613,7 +613,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
err = txgbe_flash_read_dword(hw, 0xFFFDC, &ssid);
if (err) {
PMD_INIT_LOG(ERR,
- "Read of internal subsystem device id failed\n");
+ "Read of internal subsystem device id failed");
return -ENODEV;
}
hw->subsystem_device_id = (u16)ssid >> 8 | (u16)ssid << 8;
@@ -2762,7 +2762,7 @@ txgbe_dev_detect_sfp(void *param)
PMD_DRV_LOG(INFO, "SFP not present.");
} else if (err == 0) {
hw->mac.setup_sfp(hw);
- PMD_DRV_LOG(INFO, "detected SFP+: %d\n", hw->phy.sfp_type);
+ PMD_DRV_LOG(INFO, "detected SFP+: %d", hw->phy.sfp_type);
txgbe_dev_setup_link_alarm_handler(dev);
txgbe_dev_link_update(dev, 0);
}
diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c
index f9f8108fb8..4af49dd802 100644
--- a/drivers/net/txgbe/txgbe_ipsec.c
+++ b/drivers/net/txgbe/txgbe_ipsec.c
@@ -100,7 +100,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no match and no free entries*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx IP table\n");
+ "No free entry left in the Rx IP table");
return -1;
}
@@ -114,7 +114,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx SA table\n");
+ "No free entry left in the Rx SA table");
return -1;
}
@@ -210,7 +210,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Tx SA table\n");
+ "No free entry left in the Tx SA table");
return -1;
}
@@ -269,7 +269,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx IP table\n");
+ "Entry not found in the Rx IP table");
return -1;
}
@@ -284,7 +284,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx SA table\n");
+ "Entry not found in the Rx SA table");
return -1;
}
@@ -329,7 +329,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Tx SA table\n");
+ "Entry not found in the Tx SA table");
return -1;
}
reg_val = TXGBE_IPSRXIDX_WRITE | (sa_index << 3);
@@ -359,7 +359,7 @@ txgbe_crypto_create_session(void *device,
if (conf->crypto_xform->type != RTE_CRYPTO_SYM_XFORM_AEAD ||
conf->crypto_xform->aead.algo !=
RTE_CRYPTO_AEAD_AES_GCM) {
- PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode\n");
+ PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode");
return -ENOTSUP;
}
aead_xform = &conf->crypto_xform->aead;
@@ -368,14 +368,14 @@ txgbe_crypto_create_session(void *device,
if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec decryption not enabled");
return -ENOTSUP;
}
} else {
if (dev_conf->txmode.offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec encryption not enabled");
return -ENOTSUP;
}
}
@@ -389,7 +389,7 @@ txgbe_crypto_create_session(void *device,
if (ic_session->op == TXGBE_OP_AUTHENTICATED_ENCRYPTION) {
if (txgbe_crypto_add_sa(ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to add SA\n");
+ PMD_DRV_LOG(ERR, "Failed to add SA");
return -EPERM;
}
}
@@ -411,12 +411,12 @@ txgbe_crypto_remove_session(void *device,
struct txgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session);
if (eth_dev != ic_session->dev) {
- PMD_DRV_LOG(ERR, "Session not bound to this device\n");
+ PMD_DRV_LOG(ERR, "Session not bound to this device");
return -ENODEV;
}
if (txgbe_crypto_remove_sa(eth_dev, ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to remove session\n");
+ PMD_DRV_LOG(ERR, "Failed to remove session");
return -EFAULT;
}
diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c
index 176f79005c..700632bd88 100644
--- a/drivers/net/txgbe/txgbe_pf.c
+++ b/drivers/net/txgbe/txgbe_pf.c
@@ -85,7 +85,7 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
sizeof(struct txgbe_vf_info) * vf_num, 0);
if (*vfinfo == NULL) {
PMD_INIT_LOG(ERR,
- "Cannot allocate memory for private VF data\n");
+ "Cannot allocate memory for private VF data");
return -ENOMEM;
}
@@ -167,14 +167,14 @@ txgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
struct txgbe_ethertype_filter ethertype_filter;
if (!hw->mac.set_ethertype_anti_spoofing) {
- PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.\n");
+ PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.");
return;
}
i = txgbe_ethertype_filter_lookup(filter_info,
TXGBE_ETHERTYPE_FLOW_CTRL);
if (i >= 0) {
- PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!\n");
+ PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!");
return;
}
@@ -187,7 +187,7 @@ txgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
i = txgbe_ethertype_filter_insert(filter_info,
ðertype_filter);
if (i < 0) {
- PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.\n");
+ PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.");
return;
}
@@ -408,7 +408,7 @@ txgbe_disable_vf_mc_promisc(struct rte_eth_dev *eth_dev, uint32_t vf)
vmolr = rd32(hw, TXGBE_POOLETHCTL(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~TXGBE_POOLETHCTL_MCP;
@@ -570,7 +570,7 @@ txgbe_negotiate_vf_api(struct rte_eth_dev *eth_dev,
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -614,7 +614,7 @@ txgbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
case RTE_ETH_MQ_TX_NONE:
case RTE_ETH_MQ_TX_DCB:
PMD_DRV_LOG(ERR, "PF must work with virtualization for VF %u"
- ", but its tx mode = %d\n", vf,
+ ", but its tx mode = %d", vf,
eth_conf->txmode.mq_mode);
return -1;
@@ -648,7 +648,7 @@ txgbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
break;
default:
- PMD_DRV_LOG(ERR, "PF work with invalid mode = %d\n",
+ PMD_DRV_LOG(ERR, "PF work with invalid mode = %d",
eth_conf->txmode.mq_mode);
return -1;
}
@@ -704,7 +704,7 @@ txgbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev,
if (!(fctrl & TXGBE_PSRCTL_UCP)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -741,7 +741,7 @@ txgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(ea)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c
index 3246b74e13..bc3e2a9af5 100644
--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
@@ -670,7 +670,7 @@ vhost_vdpa_map_notification_area(struct virtio_user_dev *dev)
notify_area[i] = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED | MAP_FILE,
data->vhostfd, i * page_size);
if (notify_area[i] == MAP_FAILED) {
- PMD_DRV_LOG(ERR, "(%s) Map failed for notify address of queue %d\n",
+ PMD_DRV_LOG(ERR, "(%s) Map failed for notify address of queue %d",
dev->path, i);
i--;
goto map_err;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 48b872524a..e8642be86b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -1149,7 +1149,7 @@ virtio_user_dev_create_shadow_cvq(struct virtio_user_dev *dev, struct virtqueue
scvq = virtqueue_alloc(&dev->hw, vq->vq_queue_index, vq->vq_nentries,
VTNET_CQ, SOCKET_ID_ANY, name);
if (!scvq) {
- PMD_INIT_LOG(ERR, "(%s) Failed to alloc shadow control vq\n", dev->path);
+ PMD_INIT_LOG(ERR, "(%s) Failed to alloc shadow control vq", dev->path);
return -ENOMEM;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 467fb61137..78fac63ab6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1095,10 +1095,10 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
ret = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (ret != 0)
PMD_INIT_LOG(DEBUG,
- "Failed in setup memory region cmd\n");
+ "Failed in setup memory region cmd");
ret = 0;
} else {
- PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n");
+ PMD_INIT_LOG(DEBUG, "Failed to setup memory region");
}
} else {
PMD_INIT_LOG(WARNING, "Memregs can't init (rx: %d, tx: %d)",
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 380f41f98b..e226641fdf 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1341,7 +1341,7 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
/* Zero number of descriptors in the configuration of the RX queue */
if (ret == 0) {
PMD_INIT_LOG(ERR,
- "Invalid configuration in Rx queue: %d, buffers ring: %d\n",
+ "Invalid configuration in Rx queue: %d, buffers ring: %d",
i, j);
return -EINVAL;
}
diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
index aeee4ac289..de8c024abb 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
@@ -68,7 +68,7 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_CMDIF_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -99,14 +99,14 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
do {
ret = qbman_swp_enqueue_multiple(swp, &eqdesc, &fd, NULL, 1);
if (ret < 0 && ret != -EBUSY)
- DPAA2_CMDIF_ERR("Transmit failure with err: %d\n", ret);
+ DPAA2_CMDIF_ERR("Transmit failure with err: %d", ret);
retry_count++;
} while ((ret == -EBUSY) && (retry_count < DPAA2_MAX_TX_RETRY_COUNT));
if (ret < 0)
return ret;
- DPAA2_CMDIF_DP_DEBUG("Successfully transmitted a packet\n");
+ DPAA2_CMDIF_DP_DEBUG("Successfully transmitted a packet");
return 1;
}
@@ -133,7 +133,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_CMDIF_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -152,7 +152,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
- DPAA2_CMDIF_DP_WARN("VDQ cmd not issued. QBMAN is busy\n");
+ DPAA2_CMDIF_DP_WARN("VDQ cmd not issued. QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -169,7 +169,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
/* Check for valid frame. */
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely((status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_CMDIF_DP_DEBUG("No frame is delivered\n");
+ DPAA2_CMDIF_DP_DEBUG("No frame is delivered");
return 0;
}
@@ -181,7 +181,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
cmdif_rcv_cnxt->flc = DPAA2_GET_FD_FLC(fd);
cmdif_rcv_cnxt->frc = DPAA2_GET_FD_FRC(fd);
- DPAA2_CMDIF_DP_DEBUG("packet received\n");
+ DPAA2_CMDIF_DP_DEBUG("packet received");
return 1;
}
diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c b/drivers/raw/ifpga/afu_pmd_n3000.c
index 67b3941265..6aae1b224e 100644
--- a/drivers/raw/ifpga/afu_pmd_n3000.c
+++ b/drivers/raw/ifpga/afu_pmd_n3000.c
@@ -1506,7 +1506,7 @@ static int dma_afu_set_irqs(struct afu_rawdev *dev, uint32_t vec_start,
rte_memcpy(&irq_set->data, efds, sizeof(*efds) * count);
ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
if (ret)
- IFPGA_RAWDEV_PMD_ERR("Error enabling MSI-X interrupts\n");
+ IFPGA_RAWDEV_PMD_ERR("Error enabling MSI-X interrupts");
rte_free(irq_set);
return ret;
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index a972b3b7a4..113a22b0a7 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -383,7 +383,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
goto fail;
if (value == 0xdeadbeef) {
- IFPGA_RAWDEV_PMD_DEBUG("dev_id %d sensor %s value %x\n",
+ IFPGA_RAWDEV_PMD_DEBUG("dev_id %d sensor %s value %x",
raw_dev->dev_id, sensor->name, value);
continue;
}
@@ -391,13 +391,13 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
/* monitor temperature sensors */
if (!strcmp(sensor->name, "Board Temperature") ||
!strcmp(sensor->name, "FPGA Die Temperature")) {
- IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d\n",
+ IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d",
sensor->name, value, sensor->high_warn,
sensor->high_fatal);
if (HIGH_WARN(sensor, value) ||
LOW_WARN(sensor, value)) {
- IFPGA_RAWDEV_PMD_INFO("%s reach threshold %d\n",
+ IFPGA_RAWDEV_PMD_INFO("%s reach threshold %d",
sensor->name, value);
*gsd_start = true;
break;
@@ -408,7 +408,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
if (!strcmp(sensor->name, "12V AUX Voltage")) {
if (value < AUX_VOLTAGE_WARN) {
IFPGA_RAWDEV_PMD_INFO(
- "%s reach threshold %d mV\n",
+ "%s reach threshold %d mV",
sensor->name, value);
*gsd_start = true;
break;
@@ -444,7 +444,7 @@ static int set_surprise_link_check_aer(
if (ifpga_monitor_sensor(rdev, &enable))
return -EFAULT;
if (enable || force_disable) {
- IFPGA_RAWDEV_PMD_ERR("Set AER, pls graceful shutdown\n");
+ IFPGA_RAWDEV_PMD_ERR("Set AER, pls graceful shutdown");
ifpga_rdev->aer_enable = 1;
/* get bridge fd */
strlcpy(path, "/sys/bus/pci/devices/", sizeof(path));
@@ -661,7 +661,7 @@ ifpga_rawdev_info_get(struct rte_rawdev *dev,
continue;
if (ifpga_fill_afu_dev(acc, afu_dev)) {
- IFPGA_RAWDEV_PMD_ERR("cannot get info\n");
+ IFPGA_RAWDEV_PMD_ERR("cannot get info");
return -ENOENT;
}
}
@@ -816,13 +816,13 @@ fpga_pr(struct rte_rawdev *raw_dev, u32 port_id, const char *buffer, u32 size,
ret = opae_manager_flash(mgr, port_id, buffer, size, status);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("%s pr error %d\n", __func__, ret);
+ IFPGA_RAWDEV_PMD_ERR("%s pr error %d", __func__, ret);
return ret;
}
ret = opae_bridge_reset(br);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("%s reset port:%d error %d\n",
+ IFPGA_RAWDEV_PMD_ERR("%s reset port:%d error %d",
__func__, port_id, ret);
return ret;
}
@@ -846,14 +846,14 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
file_fd = open(file_name, O_RDONLY);
if (file_fd < 0) {
- IFPGA_RAWDEV_PMD_ERR("%s: open file error: %s\n",
+ IFPGA_RAWDEV_PMD_ERR("%s: open file error: %s",
__func__, file_name);
- IFPGA_RAWDEV_PMD_ERR("Message : %s\n", strerror(errno));
+ IFPGA_RAWDEV_PMD_ERR("Message : %s", strerror(errno));
return -EINVAL;
}
ret = stat(file_name, &file_stat);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("stat on bitstream file failed: %s\n",
+ IFPGA_RAWDEV_PMD_ERR("stat on bitstream file failed: %s",
file_name);
ret = -EINVAL;
goto close_fd;
@@ -864,7 +864,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
goto close_fd;
}
- IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu\n", buffer_size);
+ IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu", buffer_size);
buffer = rte_malloc(NULL, buffer_size, 0);
if (!buffer) {
ret = -ENOMEM;
@@ -880,7 +880,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
/*do PR now*/
ret = fpga_pr(rawdev, port_id, buffer, buffer_size, &pr_error);
- IFPGA_RAWDEV_PMD_INFO("downloading to device port %d....%s.\n", port_id,
+ IFPGA_RAWDEV_PMD_INFO("downloading to device port %d....%s.", port_id,
ret ? "failed" : "success");
if (ret) {
ret = -EINVAL;
@@ -923,7 +923,7 @@ ifpga_rawdev_pr(struct rte_rawdev *dev,
afu_pr_conf->afu_id.port,
afu_pr_conf->bs_path);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("do pr error %d\n", ret);
+ IFPGA_RAWDEV_PMD_ERR("do pr error %d", ret);
return ret;
}
}
@@ -954,7 +954,7 @@ ifpga_rawdev_pr(struct rte_rawdev *dev,
rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8,
sizeof(u64));
- IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx\n",
+ IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx",
__func__,
(unsigned long)afu_pr_conf->afu_id.uuid.uuid_low,
(unsigned long)afu_pr_conf->afu_id.uuid.uuid_high);
@@ -1230,13 +1230,13 @@ fme_err_read_seu_emr(struct opae_manager *mgr)
if (ret)
return -EINVAL;
- IFPGA_RAWDEV_PMD_INFO("seu emr low: 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_INFO("seu emr low: 0x%" PRIx64, val);
ret = ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_SEU_EMR_HIGH, &val);
if (ret)
return -EINVAL;
- IFPGA_RAWDEV_PMD_INFO("seu emr high: 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_INFO("seu emr high: 0x%" PRIx64, val);
return 0;
}
@@ -1251,7 +1251,7 @@ static int fme_clear_warning_intr(struct opae_manager *mgr)
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_NONFATAL_ERRORS, &val))
return -EINVAL;
if ((val & 0x40) != 0)
- IFPGA_RAWDEV_PMD_INFO("clean not done\n");
+ IFPGA_RAWDEV_PMD_INFO("clean not done");
return 0;
}
@@ -1263,14 +1263,14 @@ static int fme_clean_fme_error(struct opae_manager *mgr)
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_ERRORS, &val))
return -EINVAL;
- IFPGA_RAWDEV_PMD_DEBUG("before clean 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_DEBUG("before clean 0x%" PRIx64, val);
ifpga_set_fme_error_prop(mgr, FME_ERR_PROP_CLEAR, val);
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_ERRORS, &val))
return -EINVAL;
- IFPGA_RAWDEV_PMD_DEBUG("after clean 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_DEBUG("after clean 0x%" PRIx64, val);
return 0;
}
@@ -1290,15 +1290,15 @@ fme_err_handle_error0(struct opae_manager *mgr)
fme_error0.csr = val;
if (fme_error0.fabric_err)
- IFPGA_RAWDEV_PMD_ERR("Fabric error\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric error");
else if (fme_error0.fabfifo_overflow)
- IFPGA_RAWDEV_PMD_ERR("Fabric fifo under/overflow error\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric fifo under/overflow error");
else if (fme_error0.afu_acc_mode_err)
- IFPGA_RAWDEV_PMD_ERR("AFU PF/VF access mismatch detected\n");
+ IFPGA_RAWDEV_PMD_ERR("AFU PF/VF access mismatch detected");
else if (fme_error0.pcie0cdc_parity_err)
- IFPGA_RAWDEV_PMD_ERR("PCIe0 CDC Parity Error\n");
+ IFPGA_RAWDEV_PMD_ERR("PCIe0 CDC Parity Error");
else if (fme_error0.cvlcdc_parity_err)
- IFPGA_RAWDEV_PMD_ERR("CVL CDC Parity Error\n");
+ IFPGA_RAWDEV_PMD_ERR("CVL CDC Parity Error");
else if (fme_error0.fpgaseuerr)
fme_err_read_seu_emr(mgr);
@@ -1321,17 +1321,17 @@ fme_err_handle_catfatal_error(struct opae_manager *mgr)
fme_catfatal.csr = val;
if (fme_catfatal.cci_fatal_err)
- IFPGA_RAWDEV_PMD_ERR("CCI error detected\n");
+ IFPGA_RAWDEV_PMD_ERR("CCI error detected");
else if (fme_catfatal.fabric_fatal_err)
- IFPGA_RAWDEV_PMD_ERR("Fabric fatal error detected\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric fatal error detected");
else if (fme_catfatal.pcie_poison_err)
- IFPGA_RAWDEV_PMD_ERR("Poison error from PCIe ports\n");
+ IFPGA_RAWDEV_PMD_ERR("Poison error from PCIe ports");
else if (fme_catfatal.inject_fata_err)
- IFPGA_RAWDEV_PMD_ERR("Injected Fatal Error\n");
+ IFPGA_RAWDEV_PMD_ERR("Injected Fatal Error");
else if (fme_catfatal.crc_catast_err)
- IFPGA_RAWDEV_PMD_ERR("a catastrophic EDCRC error\n");
+ IFPGA_RAWDEV_PMD_ERR("a catastrophic EDCRC error");
else if (fme_catfatal.injected_catast_err)
- IFPGA_RAWDEV_PMD_ERR("Injected Catastrophic Error\n");
+ IFPGA_RAWDEV_PMD_ERR("Injected Catastrophic Error");
else if (fme_catfatal.bmc_seu_catast_err)
fme_err_read_seu_emr(mgr);
@@ -1350,28 +1350,28 @@ fme_err_handle_nonfaterror(struct opae_manager *mgr)
nonfaterr.csr = val;
if (nonfaterr.temp_thresh_ap1)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP1\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP1");
else if (nonfaterr.temp_thresh_ap2)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP2\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP2");
else if (nonfaterr.pcie_error)
- IFPGA_RAWDEV_PMD_INFO("an error has occurred in pcie\n");
+ IFPGA_RAWDEV_PMD_INFO("an error has occurred in pcie");
else if (nonfaterr.portfatal_error)
- IFPGA_RAWDEV_PMD_INFO("fatal error occurred in AFU port.\n");
+ IFPGA_RAWDEV_PMD_INFO("fatal error occurred in AFU port.");
else if (nonfaterr.proc_hot)
- IFPGA_RAWDEV_PMD_INFO("a ProcHot event\n");
+ IFPGA_RAWDEV_PMD_INFO("a ProcHot event");
else if (nonfaterr.afu_acc_mode_err)
- IFPGA_RAWDEV_PMD_INFO("an AFU PF/VF access mismatch\n");
+ IFPGA_RAWDEV_PMD_INFO("an AFU PF/VF access mismatch");
else if (nonfaterr.injected_nonfata_err) {
- IFPGA_RAWDEV_PMD_INFO("Injected Warning Error\n");
+ IFPGA_RAWDEV_PMD_INFO("Injected Warning Error");
fme_clear_warning_intr(mgr);
} else if (nonfaterr.temp_thresh_AP6)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP6\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP6");
else if (nonfaterr.power_thresh_AP1)
- IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP1\n");
+ IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP1");
else if (nonfaterr.power_thresh_AP2)
- IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP2\n");
+ IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP2");
else if (nonfaterr.mbp_err)
- IFPGA_RAWDEV_PMD_INFO("an MBP event\n");
+ IFPGA_RAWDEV_PMD_INFO("an MBP event");
return 0;
}
@@ -1381,7 +1381,7 @@ fme_interrupt_handler(void *param)
{
struct opae_manager *mgr = (struct opae_manager *)param;
- IFPGA_RAWDEV_PMD_INFO("%s interrupt occurred\n", __func__);
+ IFPGA_RAWDEV_PMD_INFO("%s interrupt occurred", __func__);
fme_err_handle_error0(mgr);
fme_err_handle_nonfaterror(mgr);
@@ -1407,7 +1407,7 @@ ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
return -EINVAL;
if ((*intr_handle) == NULL) {
- IFPGA_RAWDEV_PMD_ERR("%s interrupt %d not registered\n",
+ IFPGA_RAWDEV_PMD_ERR("%s interrupt %d not registered",
type == IFPGA_FME_IRQ ? "FME" : "AFU",
type == IFPGA_FME_IRQ ? 0 : vec_start);
return -ENOENT;
@@ -1417,7 +1417,7 @@ ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
rc = rte_intr_callback_unregister(*intr_handle, handler, arg);
if (rc < 0) {
- IFPGA_RAWDEV_PMD_ERR("Failed to unregister %s interrupt %d\n",
+ IFPGA_RAWDEV_PMD_ERR("Failed to unregister %s interrupt %d",
type == IFPGA_FME_IRQ ? "FME" : "AFU",
type == IFPGA_FME_IRQ ? 0 : vec_start);
} else {
@@ -1480,7 +1480,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
rte_intr_efds_index_get(*intr_handle, 0)))
return -rte_errno;
- IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d\n",
+ IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d",
name, rte_intr_dev_fd_get(*intr_handle),
rte_intr_fd_get(*intr_handle));
@@ -1521,7 +1521,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
return -EINVAL;
}
- IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);
+ IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name);
free(intr_efds);
return 0;
diff --git a/drivers/regex/cn9k/cn9k_regexdev.c b/drivers/regex/cn9k/cn9k_regexdev.c
index e96cbf4141..aa809ab5bf 100644
--- a/drivers/regex/cn9k/cn9k_regexdev.c
+++ b/drivers/regex/cn9k/cn9k_regexdev.c
@@ -192,7 +192,7 @@ ree_dev_register(const char *name)
{
struct rte_regexdev *dev;
- cn9k_ree_dbg("Creating regexdev %s\n", name);
+ cn9k_ree_dbg("Creating regexdev %s", name);
/* allocate device structure */
dev = rte_regexdev_register(name);
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index f034bd59ba..2958368813 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -536,7 +536,7 @@ notify_relay(void *arg)
if (nfds < 0) {
if (errno == EINTR)
continue;
- DRV_LOG(ERR, "epoll_wait return fail\n");
+ DRV_LOG(ERR, "epoll_wait return fail");
return 1;
}
@@ -651,12 +651,12 @@ intr_relay(void *arg)
errno == EWOULDBLOCK ||
errno == EAGAIN)
continue;
- DRV_LOG(ERR, "Error reading from file descriptor %d: %s\n",
+ DRV_LOG(ERR, "Error reading from file descriptor %d: %s",
csc_event.data.fd,
strerror(errno));
goto out;
} else if (nbytes == 0) {
- DRV_LOG(ERR, "Read nothing from file descriptor %d\n",
+ DRV_LOG(ERR, "Read nothing from file descriptor %d",
csc_event.data.fd);
continue;
} else {
@@ -1500,7 +1500,7 @@ ifcvf_pci_get_device_type(struct rte_pci_device *pci_dev)
uint16_t device_id;
if (pci_device_id < 0x1000 || pci_device_id > 0x107f) {
- DRV_LOG(ERR, "Probe device is not a virtio device\n");
+ DRV_LOG(ERR, "Probe device is not a virtio device");
return -1;
}
@@ -1577,7 +1577,7 @@ ifcvf_blk_get_config(int vid, uint8_t *config, uint32_t size)
DRV_LOG(DEBUG, " sectors : %u", dev_cfg->geometry.sectors);
DRV_LOG(DEBUG, "num_queues: 0x%08x", dev_cfg->num_queues);
- DRV_LOG(DEBUG, "config: [%x] [%x] [%x] [%x] [%x] [%x] [%x] [%x]\n",
+ DRV_LOG(DEBUG, "config: [%x] [%x] [%x] [%x] [%x] [%x] [%x] [%x]",
config[0], config[1], config[2], config[3], config[4],
config[5], config[6], config[7]);
return 0;
diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c
index cef80b5476..3e4247dbcb 100644
--- a/drivers/vdpa/nfp/nfp_vdpa.c
+++ b/drivers/vdpa/nfp/nfp_vdpa.c
@@ -127,7 +127,7 @@ nfp_vdpa_vfio_setup(struct nfp_vdpa_dev *device)
if (device->vfio_group_fd < 0)
goto container_destroy;
- DRV_VDPA_LOG(DEBUG, "container_fd=%d, group_fd=%d,\n",
+ DRV_VDPA_LOG(DEBUG, "container_fd=%d, group_fd=%d,",
device->vfio_container_fd, device->vfio_group_fd);
ret = rte_pci_map_device(pci_dev);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 10/11] drivers: split multilines log messages
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (8 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
11 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev
Cc: Nicolas Chautru, Gagandeep Singh, Hemant Agrawal, Jay Zhou,
Ajit Khaparde, Somnath Kotur, Sachin Saxena, Matan Azrad,
Viacheslav Ovsiienko, Harman Kalra, Maxime Coquelin, Chenbo Xia,
Jakub Palider, Tomasz Duszynski
Prepare for RTE_LOG_LINE conversion.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 251 +++++++++---------
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 24 +-
drivers/crypto/caam_jr/caam_jr.c | 7 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 54 ++--
drivers/crypto/virtio/virtio_cryptodev.c | 10 +-
drivers/net/bnxt/bnxt_hwrm.c | 16 +-
drivers/net/dpaa/dpaa_ethdev.c | 9 +-
drivers/net/mlx4/mlx4_mr.c | 18 +-
drivers/net/octeontx/octeontx_ethdev.c | 22 +-
drivers/net/virtio/virtio_cvq.c | 19 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 30 +--
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
12 files changed, 228 insertions(+), 234 deletions(-)
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 3e04e44ba2..b4a97de967 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -100,49 +100,49 @@ print_static_reg_debug_info(void *mmio_base, uint8_t fpga_variant)
static void
vc_5gnr_print_dma_dec_desc_debug_info(union vc_5gnr_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | iter(%"PRIu32") | et_pass(%"PRIu32")"
- " | crcb_pass (%"PRIu32") | error(%"PRIu32")\n"
- "\t-- qm_idx(%"PRIu32") | max_iter(%"PRIu32") | "
- "bg_idx (%"PRIu32") | harqin_en(%"PRIu32") | zc(%"PRIu32")\n"
- "\t-- hbstroe_offset(%"PRIu32") | num_null (%"PRIu32") "
- "| irq_en(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | desc_idx (%"PRIu32") | "
- "drop_crc24b(%"PRIu32") | RV (%"PRIu32")\n"
- "\t-- crc24b_ind(%"PRIu32") | et_dis (%"PRIu32")\n"
- "\t-- harq_input_length(%"PRIu32") | rm_e(%"PRIu32")\n"
- "\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32")"
- "| out_add (0x%08"PRIx32"%08"PRIx32")",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | iter(%"PRIu32") | et_pass(%"PRIu32")"
+ " | crcb_pass (%"PRIu32") | error(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.iter,
(uint32_t)desc->dec_req.et_pass,
(uint32_t)desc->dec_req.crcb_pass,
- (uint32_t)desc->dec_req.error,
+ (uint32_t)desc->dec_req.error);
+ rte_bbdev_log_debug("\t-- qm_idx(%"PRIu32") | max_iter(%"PRIu32") | "
+ "bg_idx (%"PRIu32") | harqin_en(%"PRIu32") | zc(%"PRIu32")",
(uint32_t)desc->dec_req.qm_idx,
(uint32_t)desc->dec_req.max_iter,
(uint32_t)desc->dec_req.bg_idx,
(uint32_t)desc->dec_req.harqin_en,
- (uint32_t)desc->dec_req.zc,
+ (uint32_t)desc->dec_req.zc);
+ rte_bbdev_log_debug("\t-- hbstroe_offset(%"PRIu32") | num_null (%"PRIu32") "
+ "| irq_en(%"PRIu32")",
(uint32_t)desc->dec_req.hbstroe_offset,
(uint32_t)desc->dec_req.num_null,
- (uint32_t)desc->dec_req.irq_en,
+ (uint32_t)desc->dec_req.irq_en);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | desc_idx (%"PRIu32") | "
+ "drop_crc24b(%"PRIu32") | RV (%"PRIu32")",
(uint32_t)desc->dec_req.ncb,
(uint32_t)desc->dec_req.desc_idx,
(uint32_t)desc->dec_req.drop_crc24b,
- (uint32_t)desc->dec_req.rv,
+ (uint32_t)desc->dec_req.rv);
+ rte_bbdev_log_debug("\t-- crc24b_ind(%"PRIu32") | et_dis (%"PRIu32")",
(uint32_t)desc->dec_req.crc24b_ind,
- (uint32_t)desc->dec_req.et_dis,
+ (uint32_t)desc->dec_req.et_dis);
+ rte_bbdev_log_debug("\t-- harq_input_length(%"PRIu32") | rm_e(%"PRIu32")",
(uint32_t)desc->dec_req.harq_input_length,
- (uint32_t)desc->dec_req.rm_e,
+ (uint32_t)desc->dec_req.rm_e);
+ rte_bbdev_log_debug("\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32")"
+ "| out_add (0x%08"PRIx32"%08"PRIx32")",
(uint32_t)desc->dec_req.cbs_in_op,
(uint32_t)desc->dec_req.in_addr_hi,
(uint32_t)desc->dec_req.in_addr_lw,
(uint32_t)desc->dec_req.out_addr_hi,
(uint32_t)desc->dec_req.out_addr_lw);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7]);
}
@@ -151,37 +151,12 @@ vc_5gnr_print_dma_dec_desc_debug_info(union vc_5gnr_dma_desc *desc)
static void
agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | tb_crc_pass(%"PRIu32") | cb_crc_all_pass(%"PRIu32")"
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | tb_crc_pass(%"PRIu32") | cb_crc_all_pass(%"PRIu32")"
" | cb_all_et_pass(%"PRIu32") | max_iter_ret(%"PRIu32") |"
"cgb_crc_bitmap(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32") |"
- "et_dis (%"PRIu32") | harq_in_en(%"PRIu32") | max_iter(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
- "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")\n"
- "\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgfi(%"PRIu32") |"
- "cbgs(%"PRIu32") | desc_idx(%"PRIu32")\n"
- "\t-- ca(%"PRIu32") | c(%"PRIu32") | llr_pckg(%"PRIu32") |"
- "syndrome_check_mode(%"PRIu32") | num_null(%"PRIu32")\n"
- "\t-- ea(%"PRIu32") | eba(%"PRIu32")\n"
- "\t-- hbstore_offset_out(%"PRIu32")\n"
- "\t-- hbstore_offset_in(%"PRIu32") | en_slice_ts(%"PRIu32") |"
- "en_host_ts(%"PRIu32") | en_cb_wr_status(%"PRIu32")"
- " | en_output_sg(%"PRIu32") | en_input_sg(%"PRIu32") | tb_cb(%"PRIu32")"
- " | crc24b_ind(%"PRIu32")| drop_crc24b(%"PRIu32")\n"
- "\t-- harq_input_length_a(%"PRIu32") | harq_input_length_b(%"PRIu32")\n"
- "\t-- input_slice_table_addr_lo(%"PRIu32")"
- " | input_start_addr_lo(%"PRIu32")\n"
- "\t-- input_slice_table_addr_hi(%"PRIu32")"
- " | input_start_addr_hi(%"PRIu32")\n"
- "\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")\n"
- "\t-- output_slice_table_addr_lo(%"PRIu32")"
- " | output_start_addr_lo(%"PRIu32")\n"
- "\t-- output_slice_table_addr_hi(%"PRIu32")"
- " | output_start_addr_hi(%"PRIu32")\n"
- "\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")\n"
- "\t-- enqueue_timestamp(%"PRIu32")\n"
- "\t-- completion_timestamp(%"PRIu32")\n",
- desc,
+ "et_dis (%"PRIu32") | harq_in_en(%"PRIu32") | max_iter(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.tb_crc_pass,
(uint32_t)desc->dec_req.cb_crc_all_pass,
@@ -192,26 +167,38 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->dec_req.error_code,
(uint32_t)desc->dec_req.et_dis,
(uint32_t)desc->dec_req.harq_in_en,
- (uint32_t)desc->dec_req.max_iter,
+ (uint32_t)desc->dec_req.max_iter);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
+ "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")",
(uint32_t)desc->dec_req.ncb,
(uint32_t)desc->dec_req.bg_idx,
(uint32_t)desc->dec_req.qm_idx,
(uint32_t)desc->dec_req.zc,
(uint32_t)desc->dec_req.rv,
- (uint32_t)desc->dec_req.int_en,
+ (uint32_t)desc->dec_req.int_en);
+ rte_bbdev_log_debug("\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgfi(%"PRIu32") |"
+ "cbgs(%"PRIu32") | desc_idx(%"PRIu32")",
(uint32_t)desc->dec_req.max_cbg,
(uint32_t)desc->dec_req.cbgti,
(uint32_t)desc->dec_req.cbgfi,
(uint32_t)desc->dec_req.cbgs,
- (uint32_t)desc->dec_req.desc_idx,
+ (uint32_t)desc->dec_req.desc_idx);
+ rte_bbdev_log_debug("\t-- ca(%"PRIu32") | c(%"PRIu32") | llr_pckg(%"PRIu32") |"
+ "syndrome_check_mode(%"PRIu32") | num_null(%"PRIu32")",
(uint32_t)desc->dec_req.ca,
(uint32_t)desc->dec_req.c,
(uint32_t)desc->dec_req.llr_pckg,
(uint32_t)desc->dec_req.syndrome_check_mode,
- (uint32_t)desc->dec_req.num_null,
+ (uint32_t)desc->dec_req.num_null);
+ rte_bbdev_log_debug("\t-- ea(%"PRIu32") | eba(%"PRIu32")",
(uint32_t)desc->dec_req.ea,
- (uint32_t)desc->dec_req.eba,
- (uint32_t)desc->dec_req.hbstore_offset_out,
+ (uint32_t)desc->dec_req.eba);
+ rte_bbdev_log_debug("\t-- hbstore_offset_out(%"PRIu32")",
+ (uint32_t)desc->dec_req.hbstore_offset_out);
+ rte_bbdev_log_debug("\t-- hbstore_offset_in(%"PRIu32") | en_slice_ts(%"PRIu32") |"
+ "en_host_ts(%"PRIu32") | en_cb_wr_status(%"PRIu32")"
+ " | en_output_sg(%"PRIu32") | en_input_sg(%"PRIu32") | tb_cb(%"PRIu32")"
+ " | crc24b_ind(%"PRIu32")| drop_crc24b(%"PRIu32")",
(uint32_t)desc->dec_req.hbstore_offset_in,
(uint32_t)desc->dec_req.en_slice_ts,
(uint32_t)desc->dec_req.en_host_ts,
@@ -220,29 +207,42 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->dec_req.en_input_sg,
(uint32_t)desc->dec_req.tb_cb,
(uint32_t)desc->dec_req.crc24b_ind,
- (uint32_t)desc->dec_req.drop_crc24b,
+ (uint32_t)desc->dec_req.drop_crc24b);
+ rte_bbdev_log_debug("\t-- harq_input_length_a(%"PRIu32") | harq_input_length_b(%"PRIu32")",
(uint32_t)desc->dec_req.harq_input_length_a,
- (uint32_t)desc->dec_req.harq_input_length_b,
+ (uint32_t)desc->dec_req.harq_input_length_b);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_lo(%"PRIu32")"
+ " | input_start_addr_lo(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_table_addr_lo,
- (uint32_t)desc->dec_req.input_start_addr_lo,
+ (uint32_t)desc->dec_req.input_start_addr_lo);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_hi(%"PRIu32")"
+ " | input_start_addr_hi(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_table_addr_hi,
- (uint32_t)desc->dec_req.input_start_addr_hi,
+ (uint32_t)desc->dec_req.input_start_addr_hi);
+ rte_bbdev_log_debug("\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_num,
- (uint32_t)desc->dec_req.input_length,
+ (uint32_t)desc->dec_req.input_length);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_lo(%"PRIu32")"
+ " | output_start_addr_lo(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_table_addr_lo,
- (uint32_t)desc->dec_req.output_start_addr_lo,
+ (uint32_t)desc->dec_req.output_start_addr_lo);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_hi(%"PRIu32")"
+ " | output_start_addr_hi(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_table_addr_hi,
- (uint32_t)desc->dec_req.output_start_addr_hi,
+ (uint32_t)desc->dec_req.output_start_addr_hi);
+ rte_bbdev_log_debug("\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_num,
- (uint32_t)desc->dec_req.output_length,
- (uint32_t)desc->dec_req.enqueue_timestamp,
+ (uint32_t)desc->dec_req.output_length);
+ rte_bbdev_log_debug("\t-- enqueue_timestamp(%"PRIu32")",
+ (uint32_t)desc->dec_req.enqueue_timestamp);
+ rte_bbdev_log_debug("\t-- completion_timestamp(%"PRIu32")",
(uint32_t)desc->dec_req.completion_timestamp);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7],
word[8], word[9], word[10], word[11],
@@ -253,31 +253,28 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
static void
vc_5gnr_print_dma_enc_desc_debug_info(union vc_5gnr_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "%"PRIu32" %"PRIu32"\n"
- "K' %"PRIu32" E %"PRIu32" desc %"PRIu32" Z %"PRIu32"\n"
- "BG %"PRIu32" Qm %"PRIu32" CRC %"PRIu32" IRQ %"PRIu32"\n"
- "k0 %"PRIu32" Ncb %"PRIu32" F %"PRIu32"\n",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("%"PRIu32" %"PRIu32,
(uint32_t)desc->enc_req.done,
- (uint32_t)desc->enc_req.error,
-
+ (uint32_t)desc->enc_req.error);
+ rte_bbdev_log_debug("K' %"PRIu32" E %"PRIu32" desc %"PRIu32" Z %"PRIu32,
(uint32_t)desc->enc_req.k_,
(uint32_t)desc->enc_req.rm_e,
(uint32_t)desc->enc_req.desc_idx,
- (uint32_t)desc->enc_req.zc,
-
+ (uint32_t)desc->enc_req.zc);
+ rte_bbdev_log_debug("BG %"PRIu32" Qm %"PRIu32" CRC %"PRIu32" IRQ %"PRIu32,
(uint32_t)desc->enc_req.bg_idx,
(uint32_t)desc->enc_req.qm_idx,
(uint32_t)desc->enc_req.crc_en,
- (uint32_t)desc->enc_req.irq_en,
-
+ (uint32_t)desc->enc_req.irq_en);
+ rte_bbdev_log_debug("k0 %"PRIu32" Ncb %"PRIu32" F %"PRIu32,
(uint32_t)desc->enc_req.k0,
(uint32_t)desc->enc_req.ncb,
(uint32_t)desc->enc_req.num_null);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7]);
}
@@ -286,49 +283,37 @@ vc_5gnr_print_dma_enc_desc_debug_info(union vc_5gnr_dma_desc *desc)
static void
agx100_print_dma_enc_desc_debug_info(union agx100_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
- "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")\n"
- "\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgs(%"PRIu32") | "
- "desc_idx(%"PRIu32")\n"
- "\t-- ca(%"PRIu32") | c(%"PRIu32") | num_null(%"PRIu32")\n"
- "\t-- ea(%"PRIu32")\n"
- "\t-- eb(%"PRIu32")\n"
- "\t-- k_(%"PRIu32") | en_slice_ts(%"PRIu32") | en_host_ts(%"PRIu32") | "
- "en_cb_wr_status(%"PRIu32") | en_output_sg(%"PRIu32") | "
- "en_input_sg(%"PRIu32") | tb_cb(%"PRIu32") | crc_en(%"PRIu32")\n"
- "\t-- input_slice_table_addr_lo(%"PRIu32")"
- " | input_start_addr_lo(%"PRIu32")\n"
- "\t-- input_slice_table_addr_hi(%"PRIu32")"
- " | input_start_addr_hi(%"PRIu32")\n"
- "\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")\n"
- "\t-- output_slice_table_addr_lo(%"PRIu32")"
- " | output_start_addr_lo(%"PRIu32")\n"
- "\t-- output_slice_table_addr_hi(%"PRIu32")"
- " | output_start_addr_hi(%"PRIu32")\n"
- "\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")\n"
- "\t-- enqueue_timestamp(%"PRIu32")\n"
- "\t-- completion_timestamp(%"PRIu32")\n",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32")",
(uint32_t)desc->enc_req.done,
(uint32_t)desc->enc_req.error_msg,
- (uint32_t)desc->enc_req.error_code,
+ (uint32_t)desc->enc_req.error_code);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
+ "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")",
(uint32_t)desc->enc_req.ncb,
(uint32_t)desc->enc_req.bg_idx,
(uint32_t)desc->enc_req.qm_idx,
(uint32_t)desc->enc_req.zc,
(uint32_t)desc->enc_req.rv,
- (uint32_t)desc->enc_req.int_en,
+ (uint32_t)desc->enc_req.int_en);
+ rte_bbdev_log_debug("\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgs(%"PRIu32") | "
+ "desc_idx(%"PRIu32")",
(uint32_t)desc->enc_req.max_cbg,
(uint32_t)desc->enc_req.cbgti,
(uint32_t)desc->enc_req.cbgs,
- (uint32_t)desc->enc_req.desc_idx,
+ (uint32_t)desc->enc_req.desc_idx);
+ rte_bbdev_log_debug("\t-- ca(%"PRIu32") | c(%"PRIu32") | num_null(%"PRIu32")",
(uint32_t)desc->enc_req.ca,
(uint32_t)desc->enc_req.c,
- (uint32_t)desc->enc_req.num_null,
- (uint32_t)desc->enc_req.ea,
- (uint32_t)desc->enc_req.eb,
+ (uint32_t)desc->enc_req.num_null);
+ rte_bbdev_log_debug("\t-- ea(%"PRIu32")",
+ (uint32_t)desc->enc_req.ea);
+ rte_bbdev_log_debug("\t-- eb(%"PRIu32")",
+ (uint32_t)desc->enc_req.eb);
+ rte_bbdev_log_debug("\t-- k_(%"PRIu32") | en_slice_ts(%"PRIu32") | en_host_ts(%"PRIu32") | "
+ "en_cb_wr_status(%"PRIu32") | en_output_sg(%"PRIu32") | "
+ "en_input_sg(%"PRIu32") | tb_cb(%"PRIu32") | crc_en(%"PRIu32")",
(uint32_t)desc->enc_req.k_,
(uint32_t)desc->enc_req.en_slice_ts,
(uint32_t)desc->enc_req.en_host_ts,
@@ -336,27 +321,39 @@ agx100_print_dma_enc_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->enc_req.en_output_sg,
(uint32_t)desc->enc_req.en_input_sg,
(uint32_t)desc->enc_req.tb_cb,
- (uint32_t)desc->enc_req.crc_en,
+ (uint32_t)desc->enc_req.crc_en);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_lo(%"PRIu32")"
+ " | input_start_addr_lo(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_table_addr_lo,
- (uint32_t)desc->enc_req.input_start_addr_lo,
+ (uint32_t)desc->enc_req.input_start_addr_lo);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_hi(%"PRIu32")"
+ " | input_start_addr_hi(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_table_addr_hi,
- (uint32_t)desc->enc_req.input_start_addr_hi,
+ (uint32_t)desc->enc_req.input_start_addr_hi);
+ rte_bbdev_log_debug("\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_num,
- (uint32_t)desc->enc_req.input_length,
+ (uint32_t)desc->enc_req.input_length);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_lo(%"PRIu32")"
+ " | output_start_addr_lo(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_table_addr_lo,
- (uint32_t)desc->enc_req.output_start_addr_lo,
+ (uint32_t)desc->enc_req.output_start_addr_lo);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_hi(%"PRIu32")"
+ " | output_start_addr_hi(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_table_addr_hi,
- (uint32_t)desc->enc_req.output_start_addr_hi,
+ (uint32_t)desc->enc_req.output_start_addr_hi);
+ rte_bbdev_log_debug("\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_num,
- (uint32_t)desc->enc_req.output_length,
- (uint32_t)desc->enc_req.enqueue_timestamp,
+ (uint32_t)desc->enc_req.output_length);
+ rte_bbdev_log_debug("\t-- enqueue_timestamp(%"PRIu32")",
+ (uint32_t)desc->enc_req.enqueue_timestamp);
+ rte_bbdev_log_debug("\t-- completion_timestamp(%"PRIu32")",
(uint32_t)desc->enc_req.completion_timestamp);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7],
word[8], word[9], word[10], word[11],
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index a4a963f74d..d9373a072d 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -444,28 +444,28 @@ print_static_reg_debug_info(void *mmio_base)
static void
print_dma_dec_desc_debug_info(union fpga_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | iter(%"PRIu32") | crc_pass(%"PRIu32")"
- " | error (%"PRIu32") | crc_type(%"PRIu32")\n"
- "\t-- max_iter(%"PRIu32") | bypass_rm(%"PRIu32") | "
- "irq_en (%"PRIu32") | drop_crc(%"PRIu32") | offset(%"PRIu32")\n"
- "\t-- k(%"PRIu32") | in_len (%"PRIu16") | op_add(%p)\n"
- "\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32") | "
- "out_add (0x%08"PRIx32"%08"PRIx32")",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | iter(%"PRIu32") | crc_pass(%"PRIu32")"
+ " | error (%"PRIu32") | crc_type(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.iter,
(uint32_t)desc->dec_req.crc_pass,
(uint32_t)desc->dec_req.error,
- (uint32_t)desc->dec_req.crc_type,
+ (uint32_t)desc->dec_req.crc_type);
+ rte_bbdev_log_debug("\t-- max_iter(%"PRIu32") | bypass_rm(%"PRIu32") | "
+ "irq_en (%"PRIu32") | drop_crc(%"PRIu32") | offset(%"PRIu32")",
(uint32_t)desc->dec_req.max_iter,
(uint32_t)desc->dec_req.bypass_rm,
(uint32_t)desc->dec_req.irq_en,
(uint32_t)desc->dec_req.drop_crc,
- (uint32_t)desc->dec_req.offset,
+ (uint32_t)desc->dec_req.offset);
+ rte_bbdev_log_debug("\t-- k(%"PRIu32") | in_len (%"PRIu16") | op_add(%p)",
(uint32_t)desc->dec_req.k,
(uint16_t)desc->dec_req.in_len,
- desc->dec_req.op_addr,
+ desc->dec_req.op_addr);
+ rte_bbdev_log_debug("\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32") | "
+ "out_add (0x%08"PRIx32"%08"PRIx32")",
(uint32_t)desc->dec_req.cbs_in_op,
(uint32_t)desc->dec_req.in_addr_hi,
(uint32_t)desc->dec_req.in_addr_lw,
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 27cdbf5ed4..4082b3f422 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -123,9 +123,10 @@ void caam_jr_stats_get(struct rte_cryptodev *dev,
stats->dequeued_count += qp[i]->rx_pkts;
stats->enqueue_err_count += qp[i]->tx_errs;
stats->dequeue_err_count += qp[i]->rx_errs;
- CAAM_JR_INFO("extra stats:\n\tRX Poll ERR = %" PRIu64
- "\n\tTX Ring Full = %" PRIu64,
- qp[i]->rx_poll_err,
+ CAAM_JR_INFO("extra stats:");
+ CAAM_JR_INFO("\tRX Poll ERR = %" PRIu64,
+ qp[i]->rx_poll_err);
+ CAAM_JR_INFO("\tTX Ring Full = %" PRIu64,
qp[i]->tx_ring_full);
}
}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 99b6359e52..2cdf9308f8 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -348,11 +348,11 @@ build_authenc_gcm_sg_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_COMPOUND_FMT(fd);
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
- DPAA2_SEC_DP_DEBUG("GCM SG: auth_off: 0x%x/length %d, digest-len=%d\n"
- "iv-len=%d data_off: 0x%x\n",
+ DPAA2_SEC_DP_DEBUG("GCM SG: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->aead.data.offset,
sym_op->aead.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG("iv-len=%d data_off: 0x%x",
sess->iv.length,
sym_op->m_src->data_off);
@@ -506,11 +506,11 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_COMPOUND_FMT(fd);
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
- DPAA2_SEC_DP_DEBUG("GCM: auth_off: 0x%x/length %d, digest-len=%d\n"
- "iv-len=%d data_off: 0x%x\n",
+ DPAA2_SEC_DP_DEBUG("GCM: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->aead.data.offset,
sym_op->aead.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG("iv-len=%d data_off: 0x%x",
sess->iv.length,
sym_op->m_src->data_off);
@@ -631,11 +631,12 @@ build_authenc_sg_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "AUTHENC SG: auth_off: 0x%x/length %d, digest-len=%d\n"
- "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x\n",
+ "AUTHENC SG: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->auth.data.offset,
sym_op->auth.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG(
+ "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x",
sym_op->cipher.data.offset,
sym_op->cipher.data.length,
sess->iv.length,
@@ -791,11 +792,12 @@ build_authenc_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "AUTHENC: auth_off: 0x%x/length %d, digest-len=%d\n"
- "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x\n",
+ "AUTHENC: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->auth.data.offset,
sym_op->auth.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG(
+ "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x",
sym_op->cipher.data.offset,
sym_op->cipher.data.length,
sess->iv.length,
@@ -3931,20 +3933,20 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
if (ret) {
DPAA2_SEC_ERR("SEC counters failed");
} else {
- DPAA2_SEC_INFO("dpseci hardware stats:"
- "\n\tNum of Requests Dequeued = %" PRIu64
- "\n\tNum of Outbound Encrypt Requests = %" PRIu64
- "\n\tNum of Inbound Decrypt Requests = %" PRIu64
- "\n\tNum of Outbound Bytes Encrypted = %" PRIu64
- "\n\tNum of Outbound Bytes Protected = %" PRIu64
- "\n\tNum of Inbound Bytes Decrypted = %" PRIu64
- "\n\tNum of Inbound Bytes Validated = %" PRIu64,
- counters.dequeued_requests,
- counters.ob_enc_requests,
- counters.ib_dec_requests,
- counters.ob_enc_bytes,
- counters.ob_prot_bytes,
- counters.ib_dec_bytes,
+ DPAA2_SEC_INFO("dpseci hardware stats:");
+ DPAA2_SEC_INFO("\tNum of Requests Dequeued = %" PRIu64,
+ counters.dequeued_requests);
+ DPAA2_SEC_INFO("\tNum of Outbound Encrypt Requests = %" PRIu64,
+ counters.ob_enc_requests);
+ DPAA2_SEC_INFO("\tNum of Inbound Decrypt Requests = %" PRIu64,
+ counters.ib_dec_requests);
+ DPAA2_SEC_INFO("\tNum of Outbound Bytes Encrypted = %" PRIu64,
+ counters.ob_enc_bytes);
+ DPAA2_SEC_INFO("\tNum of Outbound Bytes Protected = %" PRIu64,
+ counters.ob_prot_bytes);
+ DPAA2_SEC_INFO("\tNum of Inbound Bytes Decrypted = %" PRIu64,
+ counters.ib_dec_bytes);
+ DPAA2_SEC_INFO("\tNum of Inbound Bytes Validated = %" PRIu64,
counters.ib_valid_bytes);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index c0d3178b71..643921dc02 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -239,9 +239,8 @@ virtio_crypto_send_command(struct virtqueue *vq,
vq->vq_free_cnt++;
}
- VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d\n"
- "vq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
/* get the result */
if (input->status != VIRTIO_CRYPTO_OK) {
@@ -1057,9 +1056,8 @@ virtio_crypto_sym_clear_session(
return;
}
- VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d\n"
- "vq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
VIRTIO_CRYPTO_SESSION_LOG_INFO("Close session %"PRIu64" successfully ",
session->session_id);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index bcbcb56546..d14536e242 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1828,16 +1828,16 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
/* Display the captured P7 phy details */
if (BNXT_LINK_SPEEDS_V2(bp)) {
- PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
- "Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x\n"
- "Auto_link_speedsv2:%x, Active_lanes:%d",
+ PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d",
link_info->phy_type,
link_info->media_type,
link_info->phy_link_status,
- link_info->link_signal_mode,
+ link_info->link_signal_mode);
+ PMD_DRV_LOG_LINE(DEBUG, "Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x",
(resp->active_fec_signal_mode &
HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_MASK) >> 4,
- link_info->support_speeds2, link_info->force_link_speeds2,
+ link_info->support_speeds2, link_info->force_link_speeds2);
+ PMD_DRV_LOG_LINE(DEBUG, "Auto_link_speedsv2:%x, Active_lanes:%d",
link_info->auto_link_speeds2,
link_info->active_lanes);
@@ -1850,12 +1850,12 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
desc = ((struct link_speeds2_tbl *)
bnxt_get_hwrm_to_rte_speeds2_entry(link_info->link_speed))->desc;
- PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
- "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
+ PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s",
desc,
!(link_info->auto_mode) ? "Forced" : "AutoNegotiated",
link_status_str[link_info->phy_link_status % MAX_LINK_STR],
- signal_mode[link_info->link_signal_mode % MAX_SIG_MODE],
+ signal_mode[link_info->link_signal_mode % MAX_SIG_MODE]);
+ PMD_DRV_LOG_LINE(INFO, "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
media_type[link_info->media_type % MAX_MEDIA_TYPE],
bnxt_get_xcvr_type(rte_le_to_cpu_32
(resp->xcvr_identifier_type_tx_lpi_timer)),
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 060b8c678f..51f5422e0c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1200,11 +1200,12 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];
struct qm_mcc_initfq opts = {0};
- if (dpaa_push_mode_max_queue)
- DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n"
- "PUSH mode already enabled for first %d queues.\n"
- "To disable set DPAA_PUSH_QUEUES_NUMBER to 0",
+ if (dpaa_push_mode_max_queue) {
+ DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible");
+ DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.",
dpaa_push_mode_max_queue);
+ DPAA_PMD_WARN("To disable set DPAA_PUSH_QUEUES_NUMBER to 0");
+ }
dpaa_poll_queue_default_config(&opts);
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index e95f45aa3e..2251c624ff 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -564,9 +564,9 @@ mlx4_mr_create_secondary(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
/* Lookup can't fail. */
MLX4_ASSERT(entry->lkey != UINT32_MAX);
rte_rwlock_read_unlock(&priv->mr.rwlock);
- DEBUG("port %u MR CREATED by primary process for %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "), lkey=0x%x",
- dev->data->port_id, (void *)addr,
+ DEBUG("port %u MR CREATED by primary process for %p:",
+ dev->data->port_id, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "), lkey=0x%x",
entry->start, entry->end, entry->lkey);
return entry->lkey;
}
@@ -787,10 +787,10 @@ mlx4_mr_create_primary(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
MLX4_ASSERT((uintptr_t)mr->ibv_mr->addr == data.start);
MLX4_ASSERT(mr->ibv_mr->length == len);
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
- DEBUG("port %u MR CREATED (%p) for %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ DEBUG("port %u MR CREATED (%p) for %p:",
+ dev->data->port_id, (void *)mr, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
" lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
- dev->data->port_id, (void *)mr, (void *)addr,
data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
/* Insert to the global cache table. */
@@ -1251,10 +1251,10 @@ mlx4_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,
mr->ms_bmp_n = 1;
rte_rwlock_write_lock(&priv->mr.rwlock);
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
- DEBUG("port %u MR CREATED (%p) for external memory %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ DEBUG("port %u MR CREATED (%p) for external memory %p:",
+ dev->data->port_id, (void *)mr, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
" lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
- dev->data->port_id, (void *)mr, (void *)addr,
addr, addr + len, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
/* Insert to the global cache table. */
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index c802b2c389..3b8d717797 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1389,17 +1389,17 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
rte_free(rxq);
return ret;
}
- PMD_RX_LOG(DEBUG, "Port %d Rx pktbuf configured:\n"
- "\tmbuf_size:\t0x%0x\n"
- "\twqe_skip:\t0x%0x\n"
- "\tfirst_skip:\t0x%0x\n"
- "\tlater_skip:\t0x%0x\n"
- "\tcache_mode:\t%s\n",
- port,
- pktbuf_conf.mbuff_size,
- pktbuf_conf.wqe_skip,
- pktbuf_conf.first_skip,
- pktbuf_conf.later_skip,
+ PMD_RX_LOG(DEBUG, "Port %d Rx pktbuf configured:",
+ port);
+ PMD_RX_LOG(DEBUG, "\tmbuf_size:\t0x%0x",
+ pktbuf_conf.mbuff_size);
+ PMD_RX_LOG(DEBUG, "\twqe_skip:\t0x%0x",
+ pktbuf_conf.wqe_skip);
+ PMD_RX_LOG(DEBUG, "\tfirst_skip:\t0x%0x",
+ pktbuf_conf.first_skip);
+ PMD_RX_LOG(DEBUG, "\tlater_skip:\t0x%0x",
+ pktbuf_conf.later_skip);
+ PMD_RX_LOG(DEBUG, "\tcache_mode:\t%s",
(pktbuf_conf.cache_mode ==
PKI_OPC_MODE_STT) ?
"STT" :
diff --git a/drivers/net/virtio/virtio_cvq.c b/drivers/net/virtio/virtio_cvq.c
index 5e457f5fd0..657b0692b2 100644
--- a/drivers/net/virtio/virtio_cvq.c
+++ b/drivers/net/virtio/virtio_cvq.c
@@ -92,16 +92,11 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
vq->vq_packed.used_wrap_counter ^= 1;
}
- PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d\n"
- "vq->vq_avail_idx=%d\n"
- "vq->vq_used_cons_idx=%d\n"
- "vq->vq_packed.cached_flags=0x%x\n"
- "vq->vq_packed.used_wrap_counter=%d",
- vq->vq_free_cnt,
- vq->vq_avail_idx,
- vq->vq_used_cons_idx,
- vq->vq_packed.cached_flags,
- vq->vq_packed.used_wrap_counter);
+ PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ PMD_INIT_LOG(DEBUG, "vq->vq_avail_idx=%d", vq->vq_avail_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_used_cons_idx=%d", vq->vq_used_cons_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_packed.cached_flags=0x%x", vq->vq_packed.cached_flags);
+ PMD_INIT_LOG(DEBUG, "vq->vq_packed.used_wrap_counter=%d", vq->vq_packed.used_wrap_counter);
result = cvq->hdr_mz->addr;
return result;
@@ -183,8 +178,8 @@ virtio_send_command_split(struct virtnet_ctl *cvq,
vq->vq_free_cnt++;
}
- PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d\nvq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ PMD_INIT_LOG(DEBUG, "vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
result = cvq->hdr_mz->addr;
return result;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e8642be86b..2997d2bd26 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -1197,21 +1197,21 @@ virtio_user_dev_update_status(struct virtio_user_dev *dev)
ret = dev->ops->get_status(dev, &status);
if (!ret) {
dev->status = status;
- PMD_INIT_LOG(DEBUG, "Updated Device Status(0x%08x):\n"
- "\t-RESET: %u\n"
- "\t-ACKNOWLEDGE: %u\n"
- "\t-DRIVER: %u\n"
- "\t-DRIVER_OK: %u\n"
- "\t-FEATURES_OK: %u\n"
- "\t-DEVICE_NEED_RESET: %u\n"
- "\t-FAILED: %u",
- dev->status,
- (dev->status == VIRTIO_CONFIG_STATUS_RESET),
- !!(dev->status & VIRTIO_CONFIG_STATUS_ACK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_FEATURES_OK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DEV_NEED_RESET),
+ PMD_INIT_LOG(DEBUG, "Updated Device Status(0x%08x):",
+ dev->status);
+ PMD_INIT_LOG(DEBUG, "\t-RESET: %u",
+ (dev->status == VIRTIO_CONFIG_STATUS_RESET));
+ PMD_INIT_LOG(DEBUG, "\t-ACKNOWLEDGE: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_ACK));
+ PMD_INIT_LOG(DEBUG, "\t-DRIVER: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER));
+ PMD_INIT_LOG(DEBUG, "\t-DRIVER_OK: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK));
+ PMD_INIT_LOG(DEBUG, "\t-FEATURES_OK: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_FEATURES_OK));
+ PMD_INIT_LOG(DEBUG, "\t-DEVICE_NEED_RESET: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DEV_NEED_RESET));
+ PMD_INIT_LOG(DEBUG, "\t-FAILED: %u",
!!(dev->status & VIRTIO_CONFIG_STATUS_FAILED));
} else if (ret != -ENOTSUP) {
PMD_INIT_LOG(ERR, "(%s) Failed to get backend status", dev->path);
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index 57f77297a8..0c26cfbbe6 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -332,7 +332,7 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv,
return 0;
if (!pci_dev->mem_resource[0].addr) {
- CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p\n BAR2 %p",
+ CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p BAR2 %p",
pci_dev->mem_resource[0].addr, pci_dev->mem_resource[2].addr);
return -ENODEV;
}
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH 11/11] drivers: use per line logging in helpers
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (9 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 10/11] drivers: split multilines log messages David Marchand
@ 2024-09-07 14:54 ` David Marchand
2024-09-08 8:55 ` Andrew Rybchenko
` (2 more replies)
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
11 siblings, 3 replies; 47+ messages in thread
From: David Marchand @ 2024-09-07 14:54 UTC (permalink / raw)
To: dev
Cc: Thomas Monjalon, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Parav Pandit, Xueming Li, Nipun Gupta,
Nikhil Agarwal, Sachin Saxena, Rosen Xu, Tomasz Duszynski,
Chengwen Feng, Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Chaoyong He, Nagadheeraj Rottela, Srikanth Jampala,
Kai Ji, Andrew Rybchenko, Lee Daly, Pablo de Lara, Fan Zhang,
Ashish Gupta, Zhangfei Gao, Sunila Sahu, Jack Bond-Preston,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Michael Shamis,
Liron Himi, Jay Zhou, Bruce Richardson, Kevin Laatz, Conor Walsh,
Gowrishankar Muthukrishnan, Vidya Sagar Velumuri,
Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma,
Peter Mccarthy, Harry van Haaren, Elena Agostini,
John W. Linville, Ciara Loftus, Maryam Tahhan, Igor Russkikh,
Steven Webster, Matt Peters, Selwin Sebastian, Julien Aube,
Somnath Kotur, Wathsala Vithanage, Konstantin Ananyev,
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
Use RTE_LOG_LINE in existing macros that append a \n.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/checkpatches.sh | 11 +++-
drivers/baseband/acc/acc100_pmd.h | 12 ++--
drivers/baseband/acc/acc_common.h | 6 +-
drivers/baseband/acc/rte_acc100_pmd.c | 1 +
drivers/baseband/acc/rte_vrb_pmd.c | 1 +
drivers/baseband/acc/vrb_pmd.h | 12 ++--
.../baseband/fpga_5gnr_fec/fpga_5gnr_fec.h | 15 ++---
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 13 ++--
.../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 16 +++--
drivers/baseband/null/bbdev_null.c | 5 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 6 +-
drivers/bus/auxiliary/private.h | 5 +-
drivers/bus/cdx/cdx_logs.h | 7 +--
drivers/bus/dpaa/include/fman.h | 3 +-
drivers/bus/dpaa/rte_dpaa_logs.h | 6 +-
drivers/bus/fslmc/fslmc_logs.h | 7 +--
drivers/bus/ifpga/ifpga_logs.h | 3 +-
drivers/bus/platform/private.h | 3 +-
drivers/bus/uacce/uacce.c | 4 +-
drivers/bus/vdev/vdev_logs.h | 3 +-
drivers/bus/vmbus/private.h | 3 +-
drivers/common/cnxk/roc_platform.h | 31 +++++++---
drivers/common/cpt/cpt_pmd_logs.h | 15 +++--
drivers/common/dpaax/dpaax_logs.h | 6 +-
drivers/common/idpf/idpf_common_logs.h | 26 +++-----
drivers/common/nfp/nfp_common_log.h | 5 +-
drivers/common/nitrox/nitrox_logs.h | 2 +-
drivers/common/octeontx/octeontx_mbox.h | 5 +-
drivers/common/qat/qat_logs.h | 8 +--
drivers/common/sfc_efx/sfc_efx_log.h | 5 +-
.../compress/isal/isal_compress_pmd_private.h | 3 +-
drivers/compress/octeontx/otx_zip.h | 5 +-
.../compress/uadk/uadk_compress_pmd_private.h | 5 +-
drivers/compress/zlib/zlib_pmd_private.h | 3 +-
drivers/crypto/armv8/armv8_pmd_private.h | 16 +++--
drivers/crypto/bcmfs/bcmfs_logs.h | 10 ++--
drivers/crypto/caam_jr/caam_jr_log.h | 8 +--
drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 8 +--
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 6 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 5 +-
drivers/crypto/mvsam/mrvl_pmd_private.h | 5 +-
drivers/crypto/null/null_crypto_pmd_private.h | 5 +-
drivers/crypto/openssl/openssl_pmd_private.h | 5 +-
.../crypto/scheduler/scheduler_pmd_private.h | 5 +-
drivers/crypto/uadk/uadk_crypto_pmd_private.h | 5 +-
drivers/crypto/virtio/virtio_logs.h | 30 ++++++----
drivers/dma/dpaa/dpaa_qdma_logs.h | 8 +--
drivers/dma/dpaa2/dpaa2_qdma_logs.h | 10 ++--
drivers/dma/hisilicon/hisi_dmadev.c | 17 +++---
drivers/dma/idxd/idxd_internal.h | 5 +-
drivers/dma/ioat/ioat_internal.h | 5 +-
drivers/dma/odm/odm.h | 11 ++--
drivers/dma/skeleton/skeleton_dmadev.c | 3 +-
drivers/event/dpaa/dpaa_eventdev.c | 1 +
drivers/event/dpaa/dpaa_eventdev.h | 2 +-
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 7 +--
drivers/event/dsw/dsw_evdev.h | 2 +-
drivers/event/octeontx/ssovf_evdev.h | 5 +-
drivers/event/octeontx/timvf_evdev.h | 5 +-
drivers/event/opdl/opdl_log.h | 9 +--
drivers/event/skeleton/skeleton_eventdev.h | 7 +--
drivers/event/sw/sw_evdev_log.h | 3 +-
drivers/gpu/cuda/common.h | 3 +-
drivers/mempool/dpaa/dpaa_mempool.h | 3 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 6 +-
drivers/mempool/octeontx/octeontx_pool_logs.h | 5 +-
drivers/net/af_packet/rte_eth_af_packet.c | 9 +--
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
drivers/net/atlantic/atl_logs.h | 16 +++--
drivers/net/avp/avp_logs.h | 6 +-
drivers/net/axgbe/axgbe_logs.h | 6 +-
drivers/net/bnx2x/bnx2x_logs.h | 25 ++++----
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 4 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 4 +-
drivers/net/bnxt/bnxt_txr.c | 4 +-
drivers/net/cpfl/cpfl_logs.h | 12 ++--
drivers/net/dpaa/dpaa_ethdev.h | 4 +-
drivers/net/dpaa2/dpaa2_pmd_logs.h | 10 ++--
drivers/net/dpaa2/dpaa2_rxtx.c | 30 +++++-----
drivers/net/e1000/e1000_logs.h | 14 ++---
drivers/net/ena/ena_logs.h | 8 +--
drivers/net/ena/ena_platform.h | 2 +-
drivers/net/enetc/enetc_logs.h | 10 ++--
drivers/net/enetfec/enet_pmd_logs.h | 7 +--
drivers/net/enic/enic_compat.h | 5 +-
drivers/net/failsafe/failsafe_private.h | 7 +--
drivers/net/fm10k/fm10k_logs.h | 18 +++---
drivers/net/gve/gve_logs.h | 4 +-
drivers/net/hinic/base/hinic_compat.h | 5 +-
drivers/net/hns3/hns3_logs.h | 25 ++++----
drivers/net/i40e/i40e_logs.h | 18 +++---
drivers/net/iavf/iavf_log.h | 21 +++----
drivers/net/ice/ice_logs.h | 18 +++---
drivers/net/idpf/idpf_logs.h | 17 +++---
drivers/net/igc/igc_logs.h | 12 ++--
drivers/net/ipn3ke/ipn3ke_logs.h | 4 +-
drivers/net/ixgbe/ixgbe_logs.h | 18 +++---
drivers/net/mana/mana.h | 7 ++-
drivers/net/memif/rte_eth_memif.h | 5 +-
drivers/net/mlx4/mlx4_utils.h | 9 +--
drivers/net/mvneta/mvneta_ethdev.h | 4 +-
drivers/net/mvpp2/mrvl_ethdev.h | 3 +-
drivers/net/netvsc/hn_logs.h | 14 ++---
drivers/net/netvsc/hn_rndis.c | 60 +++++++++----------
drivers/net/nfb/nfb.h | 4 +-
drivers/net/nfp/nfp_logs.h | 20 +++----
drivers/net/ngbe/ngbe_logs.h | 20 ++++---
drivers/net/null/rte_eth_null.c | 5 +-
drivers/net/octeon_ep/otx_ep_common.h | 12 ++--
drivers/net/octeon_ep/otx_ep_rxtx.c | 4 +-
drivers/net/octeontx/octeontx_logs.h | 16 ++---
drivers/net/pcap/pcap_osdep.h | 5 +-
drivers/net/pfe/pfe_logs.h | 7 +--
drivers/net/ring/rte_eth_ring.c | 5 +-
drivers/net/softnic/rte_eth_softnic.c | 5 +-
drivers/net/tap/tap_log.h | 3 +-
drivers/net/thunderx/nicvf_logs.h | 12 ++--
drivers/net/txgbe/txgbe_logs.h | 26 ++++----
drivers/net/vdev_netvsc/vdev_netvsc.c | 6 +-
drivers/net/vhost/rte_eth_vhost.c | 3 +-
drivers/net/virtio/virtio_logs.h | 13 ++--
drivers/net/vmxnet3/vmxnet3_logs.h | 14 ++---
drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 4 +-
drivers/raw/cnxk_gpio/cnxk_gpio.h | 3 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 10 ++--
drivers/raw/ifpga/ifpga_rawdev.h | 3 +-
drivers/raw/ntb/ntb.h | 3 +-
drivers/raw/skeleton/skeleton_rawdev.h | 3 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 2 +-
drivers/vdpa/ifc/base/ifcvf.c | 10 ++--
drivers/vdpa/ifc/ifcvf_vdpa.c | 5 +-
drivers/vdpa/nfp/nfp_vdpa_log.h | 10 ++--
133 files changed, 596 insertions(+), 572 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 8f245ebdab..0ab841bd5a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -53,7 +53,7 @@ print_usage () {
check_forbidden_additions() { # <patch>
res=0
- # refrain from new calls to RTE_LOG
+ # refrain from new calls to RTE_LOG in libraries
awk -v FOLDERS="lib" \
-v EXPRESSIONS="RTE_LOG\\\(" \
-v RET_ON_FAIL=1 \
@@ -61,6 +61,15 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # refrain from new calls to RTE_LOG in drivers (but leave some leeway for base drivers)
+ awk -v FOLDERS="drivers" \
+ -v SKIP_FILES='osdep.h$' \
+ -v EXPRESSIONS="RTE_LOG\\\( RTE_LOG_DP\\\( rte_log\\\(" \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Prefer RTE_LOG_LINE/RTE_LOG_DP_LINE' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# no output on stdout or stderr
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="\\\<printf\\\> \\\<fprintf\\\(stdout, \\\<fprintf\\\(stderr," \
diff --git a/drivers/baseband/acc/acc100_pmd.h b/drivers/baseband/acc/acc100_pmd.h
index aff1ef89f2..976593698e 100644
--- a/drivers/baseband/acc/acc100_pmd.h
+++ b/drivers/baseband/acc/acc100_pmd.h
@@ -11,16 +11,14 @@
#include "acc_common.h"
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, acc100_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, ACC100, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "acc100_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* ACC100 PF and VF driver names */
diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index e249f37e38..f8afa46e91 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -151,11 +151,11 @@
#define ACC_MAX_FFT_WIN 16
extern int acc_common_logtype;
+#define RTE_LOGTYPE_ACC_COMMON acc_common_logtype
/* Helper macro for logging */
-#define rte_acc_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, acc_common_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_acc_log(level, ...) \
+ RTE_LOG_LINE(level, ACC_COMMON, __VA_ARGS__)
/* ACC100 DMA Descriptor triplet */
struct acc_dma_triplet {
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 5c91acab7e..2d021710a7 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -30,6 +30,7 @@ RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, DEBUG);
#else
RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, NOTICE);
#endif
+#define RTE_LOGTYPE_ACC100 acc100_logtype
/* Calculate the offset of the enqueue register */
static inline uint32_t
diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index fad984ccc1..88075df8b4 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -26,6 +26,7 @@ RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, DEBUG);
#else
RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, NOTICE);
#endif
+#define RTE_LOGTYPE_VRB vrb_logtype
/* Calculate the offset of the enqueue register. */
static inline uint32_t
diff --git a/drivers/baseband/acc/vrb_pmd.h b/drivers/baseband/acc/vrb_pmd.h
index 0371db9972..a4b81640e8 100644
--- a/drivers/baseband/acc/vrb_pmd.h
+++ b/drivers/baseband/acc/vrb_pmd.h
@@ -13,16 +13,14 @@
#include "vrb_cfg.h"
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, vrb_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, VRB, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "vrb_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* VRB1 PF and VF driver names */
diff --git a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
index 2246849025..10a19e4dec 100644
--- a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
+++ b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
@@ -11,17 +11,18 @@
#include "agx100_pmd.h"
#include "vc_5gnr_pmd.h"
+extern int fpga_5gnr_fec_logtype;
+#define RTE_LOGTYPE_FPGA_5GNR_FEC fpga_5gnr_fec_logtype
+
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, fpga_5gnr_fec_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, FPGA_5GNR_FEC, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "fpga_5gnr_fec: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* FPGA 5GNR FEC driver names */
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index d9373a072d..eaffc35142 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -25,18 +25,17 @@ RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, DEBUG);
#else
RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, NOTICE);
#endif
+#define RTE_LOGTYPE_FPGA_LTE_FEC fpga_lte_fec_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, fpga_lte_fec_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, FPGA_LTE_FEC, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "fpga_lte_fec: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* FPGA LTE FEC driver names */
diff --git a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
index 49c8d35d10..db935fb7f3 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
+++ b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
@@ -8,22 +8,20 @@
extern int bbdev_la12xx_logtype;
#define RTE_LOGTYPE_BBDEV_LA12XX bbdev_la12xx_logtype
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_la12xx_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_LA12XX, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "la12xx_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
#define PMD_INIT_FUNC_TRACE() rte_bbdev_log_debug(">>")
/* DP Logs, toggled out at compile time if level lower than current level */
-#define rte_bbdev_dp_log(level, fmt, args...) \
- RTE_LOG_DP(level, BBDEV_LA12XX, fmt, ## args)
+#define rte_bbdev_dp_log(level, ...) \
+ RTE_LOG_DP_LINE(level, BBDEV_LA12XX, __VA_ARGS__)
#endif /* _BBDEV_LA12XX_PMD_LOGS_H_ */
diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
index 75f78993fa..dab416aa41 100644
--- a/drivers/baseband/null/bbdev_null.c
+++ b/drivers/baseband/null/bbdev_null.c
@@ -17,10 +17,11 @@
#define DRIVER_NAME baseband_null
RTE_LOG_REGISTER_DEFAULT(bbdev_null_logtype, NOTICE);
+#define RTE_LOGTYPE_BBDEV_NULL bbdev_null_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_null_logtype, fmt "\n", ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_NULL, __VA_ARGS__)
#define rte_bbdev_log_debug(fmt, ...) \
rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 1f661dd801..e527008524 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -37,11 +37,11 @@
#define DRIVER_NAME baseband_turbo_sw
RTE_LOG_REGISTER_DEFAULT(bbdev_turbo_sw_logtype, NOTICE);
+#define RTE_LOGTYPE_BBDEV_TURBO_SW bbdev_turbo_sw_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_turbo_sw_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_TURBO_SW, __VA_ARGS__)
#define rte_bbdev_log_debug(fmt, ...) \
rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 3dee13e1d1..5f5b3b1bbf 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -14,11 +14,10 @@
#include "bus_auxiliary_driver.h"
extern int auxiliary_bus_logtype;
+#define RTE_LOGTYPE_AUXILIARY_BUS auxiliary_bus_logtype
#define AUXILIARY_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, auxiliary_bus_logtype, \
- RTE_FMT("auxiliary bus: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, AUXILIARY_BUS, ## __VA_ARGS__)
/*
* Structure describing the auxiliary bus
diff --git a/drivers/bus/cdx/cdx_logs.h b/drivers/bus/cdx/cdx_logs.h
index 0ec39e9dd4..66d6967dc6 100644
--- a/drivers/bus/cdx/cdx_logs.h
+++ b/drivers/bus/cdx/cdx_logs.h
@@ -6,15 +6,14 @@
#define CDX_LOGS_H
extern int cdx_logtype_bus;
+#define RTE_LOGTYPE_CDX_BUS cdx_logtype_bus
#define CDX_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cdx_logtype_bus, "cdx: " fmt "\n", \
- ##args)
+ RTE_LOG_LINE(level, CDX_BUS, fmt, ## args)
/* Debug logs with Function names */
#define CDX_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, cdx_logtype_bus, "cdx: %s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(DEBUG, CDX_BUS, "%s(): " fmt, __func__, ## args)
#define CDX_BUS_INFO(fmt, args...) \
CDX_BUS_LOG(INFO, fmt, ## args)
diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h
index 19f6132bba..f918836ec2 100644
--- a/drivers/bus/dpaa/include/fman.h
+++ b/drivers/bus/dpaa/include/fman.h
@@ -403,8 +403,7 @@ extern int fman_ccsr_map_fd;
#define FMAN_ERR(rc, fmt, args...) \
do { \
_errno = (rc); \
- rte_log(RTE_LOG_ERR, dpaa_logtype_bus, "dpaa: " fmt "(%d)\n", \
- ##args, errno); \
+ RTE_LOG_LINE(ERR, DPAA_BUS, fmt "(%d)", ##args, errno); \
} while (0)
#define FMAN_IP_REV_1 0xC30C4
diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h
index 149b127434..81b4e54f0e 100644
--- a/drivers/bus/dpaa/rte_dpaa_logs.h
+++ b/drivers/bus/dpaa/rte_dpaa_logs.h
@@ -10,9 +10,10 @@
#include <rte_log.h>
extern int dpaa_logtype_bus;
+#define RTE_LOGTYPE_DPAA_BUS dpaa_logtype_bus
#define DPAA_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "dpaa: " fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA_BUS, fmt, ## args)
#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
#define DPAA_BUS_HWWARN(cond, fmt, args...) \
@@ -25,8 +26,7 @@ extern int dpaa_logtype_bus;
#endif
#define DPAA_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_logtype_bus, "dpaa: %s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA_BUS, "%s(): " fmt, __func__, ## args)
#define BUS_INIT_FUNC_TRACE() DPAA_BUS_DEBUG(" >>")
diff --git a/drivers/bus/fslmc/fslmc_logs.h b/drivers/bus/fslmc/fslmc_logs.h
index e15c603426..d34accf79f 100644
--- a/drivers/bus/fslmc/fslmc_logs.h
+++ b/drivers/bus/fslmc/fslmc_logs.h
@@ -8,15 +8,14 @@
#define _FSLMC_LOGS_H_
extern int dpaa2_logtype_bus;
+#define RTE_LOGTYPE_DPAA2_BUS dpaa2_logtype_bus
#define DPAA2_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_bus, "fslmc: " fmt "\n", \
- ##args)
+ RTE_LOG_LINE(level, DPAA2_BUS, fmt, ## args)
/* Debug logs are with Function names */
#define DPAA2_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA2_BUS, "%s(): " fmt, __func__, ## args)
#define DPAA2_BUS_INFO(fmt, args...) \
DPAA2_BUS_LOG(INFO, fmt, ## args)
diff --git a/drivers/bus/ifpga/ifpga_logs.h b/drivers/bus/ifpga/ifpga_logs.h
index 248bccba5d..f400bf85f1 100644
--- a/drivers/bus/ifpga/ifpga_logs.h
+++ b/drivers/bus/ifpga/ifpga_logs.h
@@ -8,9 +8,10 @@
#include <rte_log.h>
extern int ifpga_bus_logtype;
+#define RTE_LOGTYPE_IFPGA_BUS ifpga_bus_logtype
#define IFPGA_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, IFPGA_BUS, "%s(): " fmt, \
__func__, ##args)
#define IFPGA_BUS_FUNC_TRACE() IFPGA_BUS_LOG(DEBUG, ">>")
diff --git a/drivers/bus/platform/private.h b/drivers/bus/platform/private.h
index 72185aa457..d89ba0e4a5 100644
--- a/drivers/bus/platform/private.h
+++ b/drivers/bus/platform/private.h
@@ -35,8 +35,7 @@ struct rte_platform_bus {
extern int platform_bus_logtype;
#define RTE_LOGTYPE_PLATFORM_BUS platform_bus_logtype
#define PLATFORM_LOG_LINE(level, ...) \
- RTE_LOG(level, PLATFORM_BUS, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, PLATFORM_BUS, __VA_ARGS__)
/*
* Iterate registered platform devices and find one that matches provided string.
diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
index 8b666c4e30..8a6b0f84c3 100644
--- a/drivers/bus/uacce/uacce.c
+++ b/drivers/bus/uacce/uacce.c
@@ -59,9 +59,9 @@ static const char *const uacce_params_keys[] = {
RTE_TAILQ_FOREACH(p, &uacce_bus.driver_list, next)
extern int uacce_bus_logtype;
+#define RTE_LOGTYPE_UACCE_BUS uacce_bus_logtype
#define UACCE_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, uacce_bus_logtype, "uacce: " fmt "\n", \
- ##args)
+ RTE_LOG_LINE(level, UACCE_BUS, fmt, ##args)
#define UACCE_BUS_ERR(fmt, args...) UACCE_BUS_LOG(ERR, fmt, ##args)
#define UACCE_BUS_WARN(fmt, args...) UACCE_BUS_LOG(WARNING, fmt, ##args)
#define UACCE_BUS_INFO(fmt, args...) UACCE_BUS_LOG(INFO, fmt, ##args)
diff --git a/drivers/bus/vdev/vdev_logs.h b/drivers/bus/vdev/vdev_logs.h
index 8759374193..f7ea09dd2c 100644
--- a/drivers/bus/vdev/vdev_logs.h
+++ b/drivers/bus/vdev/vdev_logs.h
@@ -8,9 +8,10 @@
#include <rte_log.h>
extern int vdev_logtype_bus;
+#define RTE_LOGTYPE_VDEV_BUS vdev_logtype_bus
#define VDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vdev_logtype_bus, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, VDEV_BUS, "%s(): " fmt, \
__func__, ##args)
#endif /* _VDEV_LOGS_H_ */
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index e33424675c..4585198375 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -34,8 +34,9 @@ extern struct rte_vmbus_bus rte_vmbus_bus;
RTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.driver_list), next)
extern int vmbus_logtype_bus;
+#define RTE_LOGTYPE_VMBUS_BUS vmbus_logtype_bus
#define VMBUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmbus_logtype_bus, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, VMBUS_BUS, "%s(): " fmt, \
__func__, ##args)
struct vmbus_br {
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 658bafb935..882636ede6 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -260,27 +260,41 @@ plt_thread_is_valid(plt_thread_t thr)
/* Log */
extern int cnxk_logtype_base;
+#define RTE_LOGTYPE_base cnxk_logtype_base
extern int cnxk_logtype_mbox;
+#define RTE_LOGTYPE_mbox cnxk_logtype_mbox
extern int cnxk_logtype_cpt;
+#define RTE_LOGTYPE_cpt cnxk_logtype_cpt
extern int cnxk_logtype_ml;
+#define RTE_LOGTYPE_ml cnxk_logtype_ml
extern int cnxk_logtype_npa;
+#define RTE_LOGTYPE_npa cnxk_logtype_npa
extern int cnxk_logtype_nix;
+#define RTE_LOGTYPE_nix cnxk_logtype_nix
extern int cnxk_logtype_npc;
+#define RTE_LOGTYPE_npc cnxk_logtype_npc
extern int cnxk_logtype_sso;
+#define RTE_LOGTYPE_sso cnxk_logtype_sso
extern int cnxk_logtype_tim;
+#define RTE_LOGTYPE_tim cnxk_logtype_tim
extern int cnxk_logtype_tm;
+#define RTE_LOGTYPE_tm cnxk_logtype_tm
extern int cnxk_logtype_ree;
+#define RTE_LOGTYPE_ree cnxk_logtype_ree
extern int cnxk_logtype_dpi;
+#define RTE_LOGTYPE_dpi cnxk_logtype_dpi
extern int cnxk_logtype_rep;
+#define RTE_LOGTYPE_rep cnxk_logtype_rep
extern int cnxk_logtype_esw;
+#define RTE_LOGTYPE_esw cnxk_logtype_esw
#define RTE_LOGTYPE_CNXK cnxk_logtype_base
#define plt_err(fmt, args...) \
- RTE_LOG(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
-#define plt_info(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
-#define plt_warn(fmt, args...) RTE_LOG(WARNING, CNXK, fmt "\n", ##args)
-#define plt_print(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
+ RTE_LOG_LINE(ERR, CNXK, "%s():%u " fmt, __func__, __LINE__, ##args)
+#define plt_info(fmt, args...) RTE_LOG_LINE(INFO, CNXK, fmt, ##args)
+#define plt_warn(fmt, args...) RTE_LOG_LINE(WARNING, CNXK, fmt, ##args)
+#define plt_print(fmt, args...) RTE_LOG_LINE(INFO, CNXK, fmt, ##args)
#define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
@@ -288,8 +302,7 @@ extern int cnxk_logtype_esw;
* Log debug message if given subsystem logging is enabled.
*/
#define plt_dbg(subsystem, fmt, args...) \
- rte_log(RTE_LOG_DEBUG, cnxk_logtype_##subsystem, \
- "[%s] %s():%u " fmt "\n", #subsystem, __func__, __LINE__, \
+ RTE_LOG_LINE(DEBUG, subsystem, "%s():%u " fmt, __func__, __LINE__, \
##args)
#define plt_base_dbg(fmt, ...) plt_dbg(base, fmt, ##__VA_ARGS__)
@@ -309,11 +322,11 @@ extern int cnxk_logtype_esw;
/* Datapath logs */
#define plt_dp_err(fmt, args...) \
- RTE_LOG_DP(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
+ RTE_LOG_DP_LINE(ERR, CNXK, "%s():%u " fmt, __func__, __LINE__, ##args)
#define plt_dp_info(fmt, args...) \
- RTE_LOG_DP(INFO, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
+ RTE_LOG_DP_LINE(INFO, CNXK, "%s():%u " fmt, __func__, __LINE__, ##args)
#define plt_dp_dbg(fmt, args...) \
- RTE_LOG_DP(DEBUG, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
+ RTE_LOG_DP_LINE(DEBUG, CNXK, "%s():%u " fmt, __func__, __LINE__, ##args)
#ifdef __cplusplus
#define CNXK_PCI_ID(subsystem_dev, dev) \
diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h
index 3c109c1983..21ef409102 100644
--- a/drivers/common/cpt/cpt_pmd_logs.h
+++ b/drivers/common/cpt/cpt_pmd_logs.h
@@ -17,24 +17,23 @@
*/
#define RTE_LOGTYPE_CPT CPT_LOGTYPE
-#define CPT_PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, CPT_LOGTYPE, \
- "cpt: %s(): " fmt "\n", __func__, ##args)
+#define CPT_PMD_DRV_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, CPT, "%s(): " fmt, __func__, ## args)
-#define CPT_PMD_INIT_FUNC_TRACE() CPT_PMD_DRV_LOG_RAW(DEBUG, " >>")
+#define CPT_PMD_INIT_FUNC_TRACE() CPT_PMD_DRV_LOG(DEBUG, " >>")
#define CPT_LOG_INFO(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(INFO, fmt, ## args)
+ CPT_PMD_DRV_LOG(INFO, fmt, ## args)
#define CPT_LOG_WARN(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(WARNING, fmt, ## args)
+ CPT_PMD_DRV_LOG(WARNING, fmt, ## args)
#define CPT_LOG_ERR(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(ERR, fmt, ## args)
+ CPT_PMD_DRV_LOG(ERR, fmt, ## args)
/*
* DP logs, toggled out at compile time if level lower than current level.
*/
#define CPT_LOG_DP(level, fmt, args...) \
- RTE_LOG_DP(level, CPT, fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, CPT, fmt, ## args)
#define CPT_LOG_DP_DEBUG(fmt, args...) \
CPT_LOG_DP(DEBUG, fmt, ## args)
diff --git a/drivers/common/dpaax/dpaax_logs.h b/drivers/common/dpaax/dpaax_logs.h
index fe43bbc8f1..5ff1a10ce8 100644
--- a/drivers/common/dpaax/dpaax_logs.h
+++ b/drivers/common/dpaax/dpaax_logs.h
@@ -21,13 +21,11 @@ extern int dpaax_logger;
#endif
#define DPAAX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaax_logger, "dpaax: " fmt "\n", \
- ##args)
+ RTE_LOG_LINE(level, DPAAX_LOGGER, fmt, ## args)
/* Debug logs are with Function names */
#define DPAAX_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaax_logger, "dpaax: %s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAAX_LOGGER, "%s(): " fmt, __func__, ## args)
#define DPAAX_INFO(fmt, args...) \
DPAAX_LOG(INFO, fmt, ## args)
diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/common/idpf/idpf_common_logs.h
index 561836760c..eb28039725 100644
--- a/drivers/common/idpf/idpf_common_logs.h
+++ b/drivers/common/idpf/idpf_common_logs.h
@@ -11,35 +11,23 @@ extern int idpf_common_logtype;
#define RTE_LOGTYPE_IDPF_COMMON idpf_common_logtype
#define DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_common_logtype, \
+ RTE_LOG_LINE(level, \
+ IDPF_COMMON, \
RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
#ifdef RTE_LIBRTE_IDPF_DEBUG_RX
-#define RX_LOG(level, ...) \
- RTE_LOG(level, \
- IDPF_COMMON, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+#define RX_LOG(...) DRV_LOG(__VA_ARGS__)
#else
-#define RX_LOG(level, fmt, args...) do { } while (0)
+#define RX_LOG(...) do {} while (0)
#endif
#ifdef RTE_LIBRTE_IDPF_DEBUG_TX
-#define TX_LOG(level, ...) \
- RTE_LOG(level, \
- IDPF_COMMON, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+#define TX_LOG(...) DRV_LOG(__VA_ARGS__)
#else
-#define TX_LOG(level, fmt, args...) do { } while (0)
+#define TX_LOG(...) do {} while (0)
#endif
#endif /* _IDPF_COMMON_LOGS_H_ */
diff --git a/drivers/common/nfp/nfp_common_log.h b/drivers/common/nfp/nfp_common_log.h
index 066e38e688..4672e71a31 100644
--- a/drivers/common/nfp/nfp_common_log.h
+++ b/drivers/common/nfp/nfp_common_log.h
@@ -9,8 +9,9 @@
#include <rte_log.h>
extern int nfp_logtype_common;
+#define RTE_LOGTYPE_NFP_COMMON nfp_logtype_common
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_common, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_COMMON, \
+ "%s(): " fmt, __func__, ## args)
#endif/* __NFP_COMMON_LOG_H__ */
diff --git a/drivers/common/nitrox/nitrox_logs.h b/drivers/common/nitrox/nitrox_logs.h
index 67964447eb..596d77a96e 100644
--- a/drivers/common/nitrox/nitrox_logs.h
+++ b/drivers/common/nitrox/nitrox_logs.h
@@ -8,6 +8,6 @@
extern int nitrox_logtype;
#define RTE_LOGTYPE_NITROX nitrox_logtype
#define NITROX_LOG_LINE(level, fmt, args...) \
- RTE_LOG(level, NITROX, "%s:%d " fmt "\n", __func__, __LINE__, ## args)
+ RTE_LOG_LINE(level, NITROX, "%s:%d " fmt, __func__, __LINE__, ## args)
#endif /* _NITROX_LOGS_H_ */
diff --git a/drivers/common/octeontx/octeontx_mbox.h b/drivers/common/octeontx/octeontx_mbox.h
index ab4c010558..05255bc773 100644
--- a/drivers/common/octeontx/octeontx_mbox.h
+++ b/drivers/common/octeontx/octeontx_mbox.h
@@ -18,8 +18,8 @@
#define MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, octeontx_logtype_mbox,\
- "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+ RTE_LOG_LINE(level, OCTEONTX_MBOX,\
+ "%s() line %u: " fmt, __func__, __LINE__, ## args)
#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__)
#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__)
@@ -27,6 +27,7 @@
#define mbox_func_trace mbox_log_dbg
extern int octeontx_logtype_mbox;
+#define RTE_LOGTYPE_OCTEONTX_MBOX octeontx_logtype_mbox
struct octeontx_mbox_hdr {
uint16_t vfid; /* VF index or pf resource index local to the domain */
diff --git a/drivers/common/qat/qat_logs.h b/drivers/common/qat/qat_logs.h
index 2e4d3945cb..d7c796abe3 100644
--- a/drivers/common/qat/qat_logs.h
+++ b/drivers/common/qat/qat_logs.h
@@ -6,15 +6,15 @@
#define _QAT_LOGS_H_
extern int qat_gen_logtype;
+#define RTE_LOGTYPE_QAT_GEN qat_gen_logtype
extern int qat_dp_logtype;
+#define RTE_LOGTYPE_QAT_DP qat_dp_logtype
#define QAT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, qat_gen_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, QAT_GEN, "%s(): " fmt, __func__, ## args)
#define QAT_DP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, qat_dp_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, QAT_DP, "%s(): " fmt, __func__, ## args)
#define QAT_DP_HEXDUMP_LOG(level, title, buf, len) \
qat_hexdump_log(RTE_LOG_ ## level, qat_dp_logtype, title, buf, len)
diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
index 1519ebdc17..b41ef3490b 100644
--- a/drivers/common/sfc_efx/sfc_efx_log.h
+++ b/drivers/common/sfc_efx/sfc_efx_log.h
@@ -12,11 +12,10 @@
/** Generic driver log type */
extern int sfc_efx_logtype;
+#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
/** Log message, add a prefix and a line break */
#define SFC_EFX_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
- RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__ ,)))
+ RTE_LOG_LINE(level, SFC_EFX, ## __VA_ARGS__)
#endif /* _SFC_EFX_LOG_H_ */
diff --git a/drivers/compress/isal/isal_compress_pmd_private.h b/drivers/compress/isal/isal_compress_pmd_private.h
index c713a5bb6c..6d93c2a9c0 100644
--- a/drivers/compress/isal/isal_compress_pmd_private.h
+++ b/drivers/compress/isal/isal_compress_pmd_private.h
@@ -9,8 +9,9 @@
/**< ISA-L comp PMD device name */
extern int isal_logtype_driver;
+#define RTE_LOGTYPE_ISAL_DRIVER isal_logtype_driver
#define ISAL_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, isal_logtype_driver, "%s(): "fmt "\n", \
+ RTE_LOG_LINE(level, ISAL_DRIVER, "%s(): "fmt, \
__func__, ##args)
/* private data structure for each ISA-L compression device */
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index 7353fd4957..85547da8f8 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -18,6 +18,7 @@
#include <zip_regs.h>
extern int octtx_zip_logtype_driver;
+#define RTE_LOGTYPE_OCTTX_ZIP_DRIVER octtx_zip_logtype_driver
/* ZIP VF Control/Status registers (CSRs): */
/* VF_BAR0: */
@@ -77,9 +78,7 @@ extern int octtx_zip_logtype_driver;
#define COMPRESSDEV_NAME_ZIP_PMD compress_octeontx
#define ZIP_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, \
- octtx_zip_logtype_driver, "%s(): "fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, OCTTX_ZIP_DRIVER, "%s(): "fmt, __func__, ## args)
#define ZIP_PMD_INFO(fmt, args...) \
ZIP_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/compress/uadk/uadk_compress_pmd_private.h b/drivers/compress/uadk/uadk_compress_pmd_private.h
index b09569fb94..227831dede 100644
--- a/drivers/compress/uadk/uadk_compress_pmd_private.h
+++ b/drivers/compress/uadk/uadk_compress_pmd_private.h
@@ -27,10 +27,11 @@ struct uadk_compress_xform {
};
extern int uadk_compress_logtype;
+#define RTE_LOGTYPE_UADK_COMPRESS uadk_compress_logtype
#define UADK_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, uadk_compress_logtype, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
+ RTE_LOG_LINE(level, UADK_COMPRESS, \
+ "%s() line %u: " fmt, __func__, __LINE__, \
## __VA_ARGS__)
#endif /* _UADK_COMPRESS_PMD_PRIVATE_H_ */
diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h
index 46a33d4d1b..6bd3da4354 100644
--- a/drivers/compress/zlib/zlib_pmd_private.h
+++ b/drivers/compress/zlib/zlib_pmd_private.h
@@ -15,8 +15,9 @@
#define DEF_MEM_LEVEL 8
extern int zlib_logtype_driver;
+#define RTE_LOGTYPE_ZLIB_DRIVER zlib_logtype_driver
#define ZLIB_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
+ RTE_LOG_LINE(level, ZLIB_DRIVER, "%s(): "fmt, \
__func__, ##args)
#define ZLIB_PMD_INFO(fmt, args...) \
diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index c9bbcc2b74..e4955491b9 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -11,23 +11,21 @@
/**< ARMv8 Crypto PMD device name */
extern int crypto_armv8_log_type;
+#define RTE_LOGTYPE_CRYPTO_ARMV8 crypto_armv8_log_type
#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
- rte_log(RTE_LOG_ERR, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
+ RTE_LOG_LINE(ERR, CRYPTO_ARMV8, \
+ "%s() line %u: " fmt, \
__func__, __LINE__, ## args)
#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
- rte_log(RTE_LOG_INFO, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
+ RTE_LOG_LINE(INFO, CRYPTO_ARMV8, \
+ "%s() line %u: " fmt, \
__func__, __LINE__, ## args)
#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
+ RTE_LOG_LINE(DEBUG, CRYPTO_ARMV8, \
+ "%s() line %u: " fmt, \
__func__, __LINE__, ## args)
#define NBBY 8 /* Number of bits in a byte */
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.h b/drivers/crypto/bcmfs/bcmfs_logs.h
index c03a49b75c..36b5fccb77 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.h
+++ b/drivers/crypto/bcmfs/bcmfs_logs.h
@@ -9,15 +9,17 @@
#include <rte_log.h>
extern int bcmfs_conf_logtype;
+#define RTE_LOGTYPE_BCMFS_CONF bcmfs_conf_logtype
extern int bcmfs_dp_logtype;
+#define RTE_LOGTYPE_BCMFS_DP bcmfs_dp_logtype
#define BCMFS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bcmfs_conf_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, BCMFS_CONF, \
+ "%s(): " fmt, __func__, ## args)
#define BCMFS_DP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bcmfs_dp_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, BCMFS_DP, \
+ "%s(): " fmt, __func__, ## args)
#define BCMFS_DP_HEXDUMP_LOG(level, title, buf, len) \
bcmfs_hexdump_log(RTE_LOG_ ## level, bcmfs_dp_logtype, title, buf, len)
diff --git a/drivers/crypto/caam_jr/caam_jr_log.h b/drivers/crypto/caam_jr/caam_jr_log.h
index 8f6aa50e2a..0198da5d4d 100644
--- a/drivers/crypto/caam_jr/caam_jr_log.h
+++ b/drivers/crypto/caam_jr/caam_jr_log.h
@@ -11,12 +11,10 @@ extern int caam_jr_logtype;
#define RTE_LOGTYPE_CAAM_JR caam_jr_logtype
#define CAAM_JR_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, caam_jr_logtype, "caam_jr: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, CAAM_JR, fmt, ## args)
#define CAAM_JR_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, caam_jr_logtype, "caam_jr: %s(): " \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, CAAM_JR, "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() CAAM_JR_DEBUG(" >>")
@@ -29,7 +27,7 @@ extern int caam_jr_logtype;
/* DP Logs, toggled out at compile time if level lower than current level */
#define CAAM_JR_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, CAAM_JR, fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, CAAM_JR, fmt, ## args)
#define CAAM_JR_DP_DEBUG(fmt, args...) \
CAAM_JR_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
index ee69209504..2f17c07dc5 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
@@ -12,12 +12,10 @@ extern int dpaa2_logtype_sec;
#define RTE_LOGTYPE_DPAA2_SEC dpaa2_logtype_sec
#define DPAA2_SEC_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_sec, "dpaa2_sec: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA2_SEC, fmt, ## args)
#define DPAA2_SEC_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_sec, "dpaa2_sec: %s(): " \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA2_SEC, "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() DPAA2_SEC_DEBUG(">>")
@@ -30,7 +28,7 @@ extern int dpaa2_logtype_sec;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA2_SEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_SEC, fmt, ## args)
+ RTE_LOG_DP_LINE(level, DPAA2_SEC, fmt, ## args)
#define DPAA2_SEC_DP_DEBUG(fmt, args...) \
DPAA2_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
index 60dbaee4ec..07ba73a7e0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
@@ -12,12 +12,10 @@ extern int dpaa_logtype_sec;
#define RTE_LOGTYPE_DPAA_SEC dpaa_logtype_sec
#define DPAA_SEC_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA_SEC, fmt, ## args)
#define DPAA_SEC_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_logtype_sec, "dpaa_sec: %s(): " \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA_SEC, "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() DPAA_SEC_DEBUG(" >>")
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index d42acd913c..f0928ff14e 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -59,9 +59,10 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);
/** PMD LOGTYPE DRIVER, common to all PMDs */
extern int ipsec_mb_logtype_driver;
+#define RTE_LOGTYPE_IPSEC_MB ipsec_mb_logtype_driver
#define IPSEC_MB_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_##level, ipsec_mb_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
+ RTE_LOG_LINE(level, IPSEC_MB, \
+ "%s() line %u: " fmt, __func__, __LINE__, ##__VA_ARGS__)
/** All supported device types */
enum ipsec_mb_pmd_types {
diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h
index 80ff229c1b..1f369a3164 100644
--- a/drivers/crypto/mvsam/mrvl_pmd_private.h
+++ b/drivers/crypto/mvsam/mrvl_pmd_private.h
@@ -14,10 +14,11 @@
/** MRVL PMD LOGTYPE DRIVER */
extern int mrvl_logtype_driver;
+#define RTE_LOGTYPE_MRVL_DRIVER mrvl_logtype_driver
#define MRVL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
+ RTE_LOG_LINE(level, MRVL_DRIVER, \
+ "%s() line %u: " fmt, __func__, __LINE__, \
## __VA_ARGS__)
/**
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 645a68d1da..57c33369e2 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -9,10 +9,11 @@
/**< Null crypto PMD device name */
extern int null_logtype_driver;
+#define RTE_LOGTYPE_NULL_DRIVER null_logtype_driver
#define NULL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, null_logtype_driver, \
- "%s() line %u: "fmt "\n", __func__, __LINE__, \
+ RTE_LOG_LINE(level, NULL_DRIVER, \
+ "%s() line %u: "fmt, __func__, __LINE__, \
## __VA_ARGS__)
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index a50e4d4918..e2bda1f1bc 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -23,9 +23,10 @@
/** OPENSSL PMD LOGTYPE DRIVER */
extern int openssl_logtype_driver;
+#define RTE_LOGTYPE_OPENSSL_DRIVER openssl_logtype_driver
#define OPENSSL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, openssl_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
+ RTE_LOG_LINE(level, OPENSSL_DRIVER, \
+ "%s() line %u: " fmt, __func__, __LINE__, \
## __VA_ARGS__)
/* Maximum length for digest (SHA-512 needs 64 bytes) */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index 0f0a6b4a85..81c27f9492 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -15,10 +15,11 @@
#define PER_WORKER_BUFF_SIZE (256)
extern int scheduler_logtype_driver;
+#define RTE_LOGTYPE_SCHEDULER_DRIVER scheduler_logtype_driver
#define CR_SCHED_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, scheduler_logtype_driver, \
- "%s() line %u: "fmt "\n", __func__, __LINE__, ##args)
+ RTE_LOG_LINE(level, SCHEDULER_DRIVER, \
+ "%s() line %u: "fmt, __func__, __LINE__, ##args)
struct scheduler_worker {
uint8_t dev_id;
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
index 7a35c94a4f..53f7c8a352 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h
+++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
@@ -71,10 +71,11 @@ struct __rte_cache_aligned uadk_crypto_priv {
};
extern int uadk_crypto_logtype;
+#define RTE_LOGTYPE_UADK_CRYPTO uadk_crypto_logtype
#define UADK_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, uadk_crypto_logtype, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
+ RTE_LOG_LINE(level, UADK_CRYPTO, \
+ "%s() line %u: " fmt, __func__, __LINE__, \
## __VA_ARGS__)
#endif /* _UADK_CRYPTO_PMD_PRIVATE_H_ */
diff --git a/drivers/crypto/virtio/virtio_logs.h b/drivers/crypto/virtio/virtio_logs.h
index 1ee3819309..510be6624a 100644
--- a/drivers/crypto/virtio/virtio_logs.h
+++ b/drivers/crypto/virtio/virtio_logs.h
@@ -8,18 +8,20 @@
#include <rte_log.h>
extern int virtio_crypto_logtype_init;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_INIT virtio_crypto_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_init, \
- "PMD: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_INIT, \
+ "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int virtio_crypto_logtype_init;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_INIT virtio_crypto_logtype_init
#define VIRTIO_CRYPTO_INIT_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_init, \
- "INIT: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_INIT, \
+ "%s(): " fmt, __func__, ##args)
#define VIRTIO_CRYPTO_INIT_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_INIT_LOG_IMPL(INFO, fmt, ## args)
@@ -31,10 +33,11 @@ extern int virtio_crypto_logtype_init;
VIRTIO_CRYPTO_INIT_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_session;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_SESSION virtio_crypto_logtype_session
#define VIRTIO_CRYPTO_SESSION_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_session, \
- "SESSION: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_SESSION, \
+ "%s(): " fmt, __func__, ##args)
#define VIRTIO_CRYPTO_SESSION_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_SESSION_LOG_IMPL(INFO, fmt, ## args)
@@ -46,10 +49,11 @@ extern int virtio_crypto_logtype_session;
VIRTIO_CRYPTO_SESSION_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_rx;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_RX virtio_crypto_logtype_rx
#define VIRTIO_CRYPTO_RX_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_rx, \
- "RX: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_RX, \
+ "%s(): " fmt, __func__, ##args)
#define VIRTIO_CRYPTO_RX_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_RX_LOG_IMPL(INFO, fmt, ## args)
@@ -61,10 +65,11 @@ extern int virtio_crypto_logtype_rx;
VIRTIO_CRYPTO_RX_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_tx;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_TX virtio_crypto_logtype_tx
#define VIRTIO_CRYPTO_TX_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_tx, \
- "TX: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_TX, \
+ "%s(): " fmt, __func__, ##args)
#define VIRTIO_CRYPTO_TX_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_TX_LOG_IMPL(INFO, fmt, ## args)
@@ -76,10 +81,11 @@ extern int virtio_crypto_logtype_tx;
VIRTIO_CRYPTO_TX_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_driver;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_DRIVER virtio_crypto_logtype_driver
#define VIRTIO_CRYPTO_DRV_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_driver, \
- "DRIVER: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_CRYPTO_DRIVER, \
+ "%s(): " fmt, __func__, ##args)
#define VIRTIO_CRYPTO_DRV_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_DRV_LOG_IMPL(INFO, fmt, ## args)
diff --git a/drivers/dma/dpaa/dpaa_qdma_logs.h b/drivers/dma/dpaa/dpaa_qdma_logs.h
index 95753dcd89..aa1249284b 100644
--- a/drivers/dma/dpaa/dpaa_qdma_logs.h
+++ b/drivers/dma/dpaa/dpaa_qdma_logs.h
@@ -9,12 +9,10 @@ extern int dpaa_qdma_logtype;
#define RTE_LOGTYPE_DPAA_QDMA dpaa_qdma_logtype
#define DPAA_QDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_qdma_logtype, "dpaa_qdma: " \
- fmt "\n", ## args)
+ RTE_LOG_LINE(level, DPAA_QDMA, fmt, ## args)
#define DPAA_QDMA_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_qdma_logtype, "dpaa_qdma: %s(): " \
- fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(DEBUG, DPAA_QDMA, "%s(): " fmt, __func__, ## args)
#define DPAA_QDMA_FUNC_TRACE() DPAA_QDMA_DEBUG(">>")
@@ -27,7 +25,7 @@ extern int dpaa_qdma_logtype;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA_QDMA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_QDMA, "dpaa_qdma: " fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, DPAA_QDMA, fmt, ## args)
#define DPAA_QDMA_DP_DEBUG(fmt, args...) \
DPAA_QDMA_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/dma/dpaa2/dpaa2_qdma_logs.h b/drivers/dma/dpaa2/dpaa2_qdma_logs.h
index 37a5a5c6e9..af22786cda 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma_logs.h
+++ b/drivers/dma/dpaa2/dpaa2_qdma_logs.h
@@ -13,12 +13,12 @@ extern int dpaa2_qdma_logtype;
#define RTE_LOGTYPE_DPAA2_QDMA dpaa2_qdma_logtype
#define DPAA2_QDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_qdma_logtype, "dpaa2_qdma: " \
- fmt "\n", ## args)
+ RTE_LOG_LINE(level, DPAA2_QDMA, \
+ fmt, ## args)
#define DPAA2_QDMA_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_qdma_logtype, "dpaa2_qdma: %s(): " \
- fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(DEBUG, DPAA2_QDMA, "%s(): " \
+ fmt, __func__, ## args)
#define DPAA2_QDMA_FUNC_TRACE() DPAA2_QDMA_DEBUG(">>")
@@ -31,7 +31,7 @@ extern int dpaa2_qdma_logtype;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA2_QDMA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_QDMA, "dpaa2_qdma: " fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, DPAA2_QDMA, fmt, ## args)
#define DPAA2_QDMA_DP_DEBUG(fmt, args...) \
DPAA2_QDMA_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index bce4b4b277..8b548dd1d8 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -18,21 +18,20 @@
#include "hisi_dmadev.h"
RTE_LOG_REGISTER_DEFAULT(hisi_dma_logtype, INFO);
+#define RTE_LOGTYPE_HISI_DMA hisi_dma_logtype
#define HISI_DMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hisi_dma_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
-#define HISI_DMA_LOG_RAW(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hisi_dma_logtype, \
- "%s %s(): " fmt "\n", (hw)->data->dev_name, \
+ RTE_LOG_LINE(level, HISI_DMA, "%s(): " fmt, __func__, ##args)
+#define HISI_DMA_DEV_LOG(hw, level, fmt, args...) \
+ RTE_LOG_LINE(level, HISI_DMA, "%s %s(): " fmt, (hw)->data->dev_name, \
__func__, ##args)
#define HISI_DMA_DEBUG(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, DEBUG, fmt, ## args)
+ HISI_DMA_DEV_LOG(hw, DEBUG, fmt, ## args)
#define HISI_DMA_INFO(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, INFO, fmt, ## args)
+ HISI_DMA_DEV_LOG(hw, INFO, fmt, ## args)
#define HISI_DMA_WARN(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, WARNING, fmt, ## args)
+ HISI_DMA_DEV_LOG(hw, WARNING, fmt, ## args)
#define HISI_DMA_ERR(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, ERR, fmt, ## args)
+ HISI_DMA_DEV_LOG(hw, ERR, fmt, ## args)
static uint32_t
hisi_dma_queue_base(struct hisi_dma_dev *hw)
diff --git a/drivers/dma/idxd/idxd_internal.h b/drivers/dma/idxd/idxd_internal.h
index 537cf9b1cf..65ea7b6f67 100644
--- a/drivers/dma/idxd/idxd_internal.h
+++ b/drivers/dma/idxd/idxd_internal.h
@@ -20,9 +20,10 @@
*/
extern int idxd_pmd_logtype;
+#define RTE_LOGTYPE_IDXD_PMD idxd_pmd_logtype
-#define IDXD_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
- idxd_pmd_logtype, "IDXD: %s(): " fmt "\n", __func__, ##args)
+#define IDXD_PMD_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, IDXD_PMD, "%s(): " fmt, __func__, ##args)
#define IDXD_PMD_DEBUG(fmt, args...) IDXD_PMD_LOG(DEBUG, fmt, ## args)
#define IDXD_PMD_INFO(fmt, args...) IDXD_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/dma/ioat/ioat_internal.h b/drivers/dma/ioat/ioat_internal.h
index f4285c50f0..8cdada9018 100644
--- a/drivers/dma/ioat/ioat_internal.h
+++ b/drivers/dma/ioat/ioat_internal.h
@@ -35,9 +35,10 @@ struct ioat_dmadev {
};
extern int ioat_pmd_logtype;
+#define RTE_LOGTYPE_IOAT_PMD ioat_pmd_logtype
-#define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
- ioat_pmd_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
+#define IOAT_PMD_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, IOAT_PMD, "%s(): " fmt, __func__, ##args)
#define IOAT_PMD_DEBUG(fmt, args...) IOAT_PMD_LOG(DEBUG, fmt, ## args)
#define IOAT_PMD_INFO(fmt, args...) IOAT_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/dma/odm/odm.h b/drivers/dma/odm/odm.h
index 274c21ef8d..c63ceb9902 100644
--- a/drivers/dma/odm/odm.h
+++ b/drivers/dma/odm/odm.h
@@ -13,8 +13,6 @@
#include <rte_log.h>
#include <rte_memzone.h>
-extern int odm_logtype;
-
/* ODM VF register offsets from VF_BAR0 */
#define ODM_VDMA_EN(x) (0x00 | (x << 3))
#define ODM_VDMA_REQQ_CTL(x) (0x80 | (x << 3))
@@ -66,10 +64,13 @@ extern int odm_logtype;
#define odm_read64(addr) rte_read64_relaxed((volatile void *)(addr))
#define odm_write64(val, addr) rte_write64_relaxed((val), (volatile void *)(addr))
+extern int odm_logtype;
+#define RTE_LOGTYPE_ODM odm_logtype
+
#define ODM_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__,) "\n", __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
+ RTE_LOG_LINE(level, ODM, \
+ RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__ ,), __func__, __LINE__, \
+ RTE_FMT_TAIL(__VA_ARGS__ ,)))
/*
* Structure odm_instr_hdr_s for ODM
diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c
index 4b18fb3767..23dd305d09 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.c
+++ b/drivers/dma/skeleton/skeleton_dmadev.c
@@ -21,8 +21,9 @@
#include "skeleton_dmadev.h"
RTE_LOG_REGISTER_DEFAULT(skeldma_logtype, INFO);
+#define RTE_LOGTYPE_SKELDMA skeldma_logtype
#define SKELDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeldma_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, SKELDMA, "%s(): " fmt, \
__func__, ##args)
static int
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index f8cf48bd2e..85ccb586ef 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -48,6 +48,7 @@
* 1 Eventdev can have N Eventqueue
*/
RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
+#define RTE_LOGTYPE_DPAA_EVENTDEV dpaa_logtype_eventdev
#define DISABLE_INTR_MODE "disable_intr"
diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h
index b4535c7b86..1d3f9036e9 100644
--- a/drivers/event/dpaa/dpaa_eventdev.h
+++ b/drivers/event/dpaa/dpaa_eventdev.h
@@ -78,7 +78,7 @@ struct dpaa_eventdev {
};
#define DPAA_EVENTDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_eventdev, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, DPAA_EVENTDEV, "%s(): " fmt, \
__func__, ##args)
#define EVENTDEV_INIT_FUNC_TRACE() DPAA_EVENTDEV_LOG(DEBUG, " >>")
diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
index b894fb3299..21a12f5cc2 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
@@ -6,14 +6,13 @@
#define _DPAA2_EVENTDEV_LOGS_H_
extern int dpaa2_logtype_event;
+#define RTE_LOGTYPE_DPAA2_EVENT dpaa2_logtype_event
#define DPAA2_EVENTDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "dpaa2_event: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA2_EVENT, fmt, ##args)
#define DPAA2_EVENTDEV_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_event, "dpaa2_event: %s(): " \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA2_EVENT, "%s():" fmt, __func__, ##args)
#define EVENTDEV_INIT_FUNC_TRACE() DPAA2_EVENTDEV_DEBUG(" >>")
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index ca7aec575c..3372728f8b 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -303,7 +303,7 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev)
}
#define DSW_LOG_DP_LINE(level, fmt, args...) \
- RTE_LOG_DP(level, EVENTDEV, "[%s] %s() line %u: " fmt "\n", \
+ RTE_LOG_DP_LINE(level, EVENTDEV, "[%s] %s() line %u: " fmt, \
DSW_PMD_NAME, \
__func__, __LINE__, ## args)
diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h
index 293eb85a40..59fdc21b59 100644
--- a/drivers/event/octeontx/ssovf_evdev.h
+++ b/drivers/event/octeontx/ssovf_evdev.h
@@ -20,8 +20,8 @@
#define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx
#define SSOVF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_logtype_ssovf, \
- "[%s] %s() " fmt "\n", \
+ RTE_LOG_LINE(level, OTX_SSOVF, \
+ "[%s] %s() " fmt, \
RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
#define ssovf_log_info(fmt, ...) SSOVF_LOG(INFO, fmt, ##__VA_ARGS__)
@@ -171,6 +171,7 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev)
}
extern int otx_logtype_ssovf;
+#define RTE_LOGTYPE_OTX_SSOVF otx_logtype_ssovf
uint16_t ssows_enq(void *port, const struct rte_event *ev);
uint16_t ssows_enq_burst(void *port,
diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h
index 3a2dc475e3..00ea9a8420 100644
--- a/drivers/event/octeontx/timvf_evdev.h
+++ b/drivers/event/octeontx/timvf_evdev.h
@@ -27,8 +27,8 @@
#include <octeontx_fpavf.h>
#define timvf_log(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_logtype_timvf, \
- "[%s] %s() " fmt "\n", \
+ RTE_LOG_LINE(level, OTX_TIMVF, \
+ "[%s] %s() " fmt, \
RTE_STR(event_timer_octeontx), __func__, ## args)
#define timvf_log_info(fmt, ...) timvf_log(INFO, fmt, ##__VA_ARGS__)
@@ -113,6 +113,7 @@
#define TIMVF_ENABLE_STATS_ARG ("timvf_stats")
extern int otx_logtype_timvf;
+#define RTE_LOGTYPE_OTX_TIMVF otx_logtype_timvf
static const uint16_t nb_chunk_slots = (TIM_CHUNK_SIZE / 16) - 1;
enum timvf_clk_src {
diff --git a/drivers/event/opdl/opdl_log.h b/drivers/event/opdl/opdl_log.h
index ae5221c1e4..eefbace1ee 100644
--- a/drivers/event/opdl/opdl_log.h
+++ b/drivers/event/opdl/opdl_log.h
@@ -8,14 +8,9 @@
#include <rte_log.h>
extern int opdl_logtype_driver;
-
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, opdl_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
+#define RTE_LOGTYPE_OPDL opdl_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
-
+ RTE_LOG_LINE(level, OPDL, "%s(): " fmt, __func__, ## args)
#endif /* _OPDL_LOGS_H_ */
diff --git a/drivers/event/skeleton/skeleton_eventdev.h b/drivers/event/skeleton/skeleton_eventdev.h
index 283342ac19..96060b4048 100644
--- a/drivers/event/skeleton/skeleton_eventdev.h
+++ b/drivers/event/skeleton/skeleton_eventdev.h
@@ -9,11 +9,11 @@
#include <eventdev_pmd_vdev.h>
extern int skeleton_eventdev_logtype;
+#define RTE_LOGTYPE_SKELETON_EVENTDEV skeleton_eventdev_logtype
#ifdef RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_eventdev_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, SKELETON_EVENTDEV, "%s(): " fmt, __func__, ## args)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#else
#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
@@ -21,8 +21,7 @@ extern int skeleton_eventdev_logtype;
#endif
#define PMD_DRV_ERR(fmt, args...) \
- rte_log(RTE_LOG_ERR, skeleton_eventdev_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(ERR, SKELETON_EVENTDEV, "%s(): " fmt, __func__, ## args)
struct __rte_cache_aligned skeleton_eventdev {
uintptr_t reg_base;
diff --git a/drivers/event/sw/sw_evdev_log.h b/drivers/event/sw/sw_evdev_log.h
index f76825abc5..a0fa9586b6 100644
--- a/drivers/event/sw/sw_evdev_log.h
+++ b/drivers/event/sw/sw_evdev_log.h
@@ -6,9 +6,10 @@
#define _SW_EVDEV_LOG_H_
extern int eventdev_sw_log_level;
+#define RTE_LOGTYPE_EVENTDEV_SW_LOG_LEVEL eventdev_sw_log_level
#define SW_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eventdev_sw_log_level, "%s" fmt "\n", \
+ RTE_LOG_LINE(level, EVENTDEV_SW_LOG_LEVEL, "%s" fmt, \
__func__, ##args)
#define SW_LOG_INFO(fmt, args...) \
diff --git a/drivers/gpu/cuda/common.h b/drivers/gpu/cuda/common.h
index e809988503..e098418401 100644
--- a/drivers/gpu/cuda/common.h
+++ b/drivers/gpu/cuda/common.h
@@ -13,10 +13,11 @@
#include <rte_errno.h>
extern int cuda_logtype;
+#define RTE_LOGTYPE_CUDA cuda_logtype
/* Helper macro for logging */
#define rte_cuda_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, cuda_logtype, fmt "\n", ##__VA_ARGS__)
+ RTE_LOG_LINE(level, CUDA, fmt, ##__VA_ARGS__)
#define rte_cuda_debug(fmt, ...) \
rte_cuda_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/mempool/dpaa/dpaa_mempool.h b/drivers/mempool/dpaa/dpaa_mempool.h
index 153fefd507..c49f085424 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.h
+++ b/drivers/mempool/dpaa/dpaa_mempool.h
@@ -61,8 +61,7 @@ extern struct dpaa_bp_info *rte_dpaa_bpid_info;
/* Mempool related logs */
#define DPAA_MEMPOOL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, DPAA_MEMPOOL, "%s(): " fmt, __func__, ## args)
#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>")
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
index fbc8cb30a2..577f889abf 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
@@ -9,13 +9,11 @@ extern int dpaa2_logtype_mempool;
#define RTE_LOGTYPE_DPAA2_MEMPOOL dpaa2_logtype_mempool
#define DPAA2_MEMPOOL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_mempool, \
- "mempool/dpaa2: " fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA2_MEMPOOL, fmt, ##args)
/* Debug logs are with Function names */
#define DPAA2_MEMPOOL_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_mempool, \
- "mempool/dpaa2: %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA2_MEMPOOL, "%s(): " fmt, __func__, ##args)
#define DPAA2_MEMPOOL_INFO(fmt, args...) \
DPAA2_MEMPOOL_LOG(INFO, fmt, ## args)
diff --git a/drivers/mempool/octeontx/octeontx_pool_logs.h b/drivers/mempool/octeontx/octeontx_pool_logs.h
index 7b4e1b3877..8703891a8a 100644
--- a/drivers/mempool/octeontx/octeontx_pool_logs.h
+++ b/drivers/mempool/octeontx/octeontx_pool_logs.h
@@ -8,8 +8,8 @@
#include <rte_debug.h>
#define FPAVF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf,\
- "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+ RTE_LOG_LINE(level, OCTEONTX_FPAVF,\
+ "%s() line %u: " fmt, __func__, __LINE__, ## args)
#define fpavf_log_info(fmt, ...) FPAVF_LOG(INFO, fmt, ##__VA_ARGS__)
#define fpavf_log_dbg(fmt, ...) FPAVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
@@ -18,5 +18,6 @@
extern int octeontx_logtype_fpavf;
+#define RTE_LOGTYPE_OCTEONTX_FPAVF octeontx_logtype_fpavf
#endif /* __OCTEONTX_POOL_LOGS_H__*/
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 6b7b16f348..9be27973f0 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -102,14 +102,15 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE);
+#define RTE_LOGTYPE_AFPACKET af_packet_logtype
#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_packet_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, AFPACKET, \
+ "%s(): " fmt, __func__, ##args)
#define PMD_LOG_ERRNO(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_packet_logtype, \
- "%s(): " fmt ":%s\n", __func__, ##args, strerror(errno))
+ RTE_LOG_LINE(level, AFPACKET, \
+ "%s(): " fmt ":%s", __func__, ##args, strerror(errno))
static uint16_t
eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 676006ce0d..8ac8ebe4d2 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -66,7 +66,7 @@ RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
#define RTE_LOGTYPE_NET_AF_XDP af_xdp_logtype
#define AF_XDP_LOG_LINE(level, fmt, args...) \
- RTE_LOG(level, NET_AF_XDP, "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, NET_AF_XDP, "%s(): " fmt, __func__, ##args)
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
diff --git a/drivers/net/atlantic/atl_logs.h b/drivers/net/atlantic/atl_logs.h
index 14a7a1de1d..2b962f61ea 100644
--- a/drivers/net/atlantic/atl_logs.h
+++ b/drivers/net/atlantic/atl_logs.h
@@ -7,26 +7,24 @@
#include <rte_log.h>
extern int atl_logtype_init;
+#define RTE_LOGTYPE_ATL_INIT atl_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, atl_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ATL_INIT, \
+ "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_DP_LINE(level, ATL_DRIVER, "%s(): " fmt, __func__, ## args)
#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_DP_LINE(level, ATL_DRIVER, "%s(): " fmt, __func__, ## args)
extern int atl_logtype_driver;
#define RTE_LOGTYPE_ATL_DRIVER atl_logtype_driver
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, atl_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG_LINE(level, ATL_DRIVER, "%s(): " fmt, \
+ __func__, ## args)
#endif
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 3f2721df1a..2839f52865 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -9,14 +9,14 @@
#ifdef RTE_LIBRTE_AVP_DEBUG_RX
#define PMD_RX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, AVP_DRIVER, "%s() rx: " fmt, __func__, ## __VA_ARGS__)
#else
#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_AVP_DEBUG_TX
#define PMD_TX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, AVP_DRIVER, "%s() tx: " fmt, __func__, ## __VA_ARGS__)
#else
#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
@@ -25,6 +25,6 @@ extern int avp_logtype_driver;
#define RTE_LOGTYPE_AVP_DRIVER avp_logtype_driver
#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, AVP_DRIVER, "%s(): " fmt, __func__, ## __VA_ARGS__)
#endif /* _AVP_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_logs.h b/drivers/net/axgbe/axgbe_logs.h
index 3962895c5a..1088f29b4f 100644
--- a/drivers/net/axgbe/axgbe_logs.h
+++ b/drivers/net/axgbe/axgbe_logs.h
@@ -8,9 +8,9 @@
#include <stdio.h>
extern int axgbe_logtype_init;
+#define RTE_LOGTYPE_AXGBE_INIT axgbe_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, axgbe_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, AXGBE_INIT, "%s(): " fmt, __func__, ##args)
#ifdef RTE_LIBRTE_AXGBE_PMD_DEBUG
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
@@ -21,6 +21,6 @@ extern int axgbe_logtype_init;
extern int axgbe_logtype_driver;
#define RTE_LOGTYPE_AXGBE_DRIVER axgbe_logtype_driver
#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, AXGBE_DRIVER, "%s(): " fmt, __func__, ## __VA_ARGS__)
#endif /* _AXGBE_LOGS_H_ */
diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h
index f0cf69c163..76e8eb9afd 100644
--- a/drivers/net/bnx2x/bnx2x_logs.h
+++ b/drivers/net/bnx2x/bnx2x_logs.h
@@ -9,41 +9,40 @@
#define _PMD_LOGS_H_
extern int bnx2x_logtype_init;
+#define RTE_LOGTYPE_BNX2X_INIT bnx2x_logtype_init
#define PMD_INIT_LOG(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
- "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args)
+ RTE_LOG_LINE(level, BNX2X_INIT, \
+ "[%s] %s() " fmt, (sc)->devinfo.name, __func__, ##args)
#define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>")
extern int bnx2x_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
+#define RTE_LOGTYPE_BNX2X_DRIVER bnx2x_logtype_driver
+#define PMD_DRV_LOG(level, sc, fmt, args...) \
+ RTE_LOG_LINE(level, BNX2X_DRIVER, \
"[%s:%d(%s)] " fmt, __func__, __LINE__, \
(sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
-#define PMD_DRV_LOG(level, sc, fmt, args...) \
- PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
-
#ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, BNX2X_DRIVER, \
+ "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, BNX2X_DRIVER, \
+ "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
#define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(%s): " fmt "\n", __func__, \
+ RTE_LOG_LINE(level, BNX2X_DRIVER, \
+ "%s(%s): " fmt, __func__, \
(sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
#else
#define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) do { } while (0)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 8ac20961d9..65b6a37352 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1208,7 +1208,7 @@ extern const struct rte_flow_ops bnxt_flow_meter_ops;
extern int bnxt_logtype_driver;
#define RTE_LOGTYPE_BNXT bnxt_logtype_driver
#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, BNXT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, BNXT, "%s(): " fmt, __func__, ## __VA_ARGS__)
#define BNXT_LINK_SPEEDS_V2_OPTIONS(f) \
((f) & HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED)
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 0ff1641c19..355d41bbd3 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -357,8 +357,8 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
nb_tx_pkts += txcmp->opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 9f1a02f0ab..c1c3e1ecaf 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -578,8 +578,8 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
nb_tx_pkts += txcmp->opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 6a38c7c6e4..9087fd4e6c 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -548,8 +548,8 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
nb_tx_pkts += opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/cpfl/cpfl_logs.h b/drivers/net/cpfl/cpfl_logs.h
index bdfa5c41a5..a45cc0cbc3 100644
--- a/drivers/net/cpfl/cpfl_logs.h
+++ b/drivers/net/cpfl/cpfl_logs.h
@@ -8,21 +8,21 @@
#include <rte_log.h>
extern int cpfl_logtype_init;
+#define RTE_LOGTYPE_CPFL_INIT cpfl_logtype_init
extern int cpfl_logtype_driver;
+#define RTE_LOGTYPE_CPFL_DRIVER cpfl_logtype_driver
#define PMD_INIT_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- cpfl_logtype_init, \
+ RTE_LOG_LINE(level, CPFL_INIT, \
RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- cpfl_logtype_driver, \
+ RTE_LOG_LINE(level, CPFL_DRIVER, \
RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index b6c61b8b6b..e8dcd29a45 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -217,7 +217,7 @@ extern int dpaa_logtype_pmd;
#define RTE_LOGTYPE_DPAA_PMD dpaa_logtype_pmd
#define DPAA_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, DPAA_PMD, "%s(): " fmt, \
__func__, ##args)
#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>")
@@ -233,6 +233,6 @@ extern int dpaa_logtype_pmd;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_PMD, fmt, ## args)
+ RTE_LOG_DP_LINE(level, DPAA_PMD, fmt, ## args)
#endif
diff --git a/drivers/net/dpaa2/dpaa2_pmd_logs.h b/drivers/net/dpaa2/dpaa2_pmd_logs.h
index af895a6b6e..634b80bb1b 100644
--- a/drivers/net/dpaa2/dpaa2_pmd_logs.h
+++ b/drivers/net/dpaa2/dpaa2_pmd_logs.h
@@ -6,15 +6,13 @@
#define _DPAA2_PMD_LOGS_H_
extern int dpaa2_logtype_pmd;
-#define RTE_LOGTYPE_DPAA2_PMD dpaa2_logtype_pmd
+#define RTE_LOGTYPE_DPAA2_NET dpaa2_logtype_pmd
#define DPAA2_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_pmd, "dpaa2_net: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, DPAA2_NET, fmt, ##args)
#define DPAA2_PMD_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_pmd, "dpaa2_net: %s(): "\
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, DPAA2_NET, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() DPAA2_PMD_DEBUG(">>")
@@ -29,7 +27,7 @@ extern int dpaa2_logtype_pmd;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA2_PMD_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_PMD, fmt, ## args)
+ RTE_LOG_DP_LINE(level, DPAA2_NET, fmt, ## args)
#define DPAA2_PMD_DP_DEBUG(fmt, args...) \
DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index b64232b88f..92e9dd40dc 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -399,7 +399,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd,
mbuf->packet_type = dpaa2_dev_rx_parse(mbuf, hw_annot_addr);
DPAA2_PMD_DP_DEBUG("to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d,"
- "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d\n",
+ "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d",
mbuf, mbuf->buf_addr, mbuf->data_off,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ADDR(fd),
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size,
@@ -446,7 +446,7 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
} else {
temp = rte_pktmbuf_alloc(dpaa2_tx_sg_pool);
if (temp == NULL) {
- DPAA2_PMD_DP_DEBUG("No memory to allocate S/G table\n");
+ DPAA2_PMD_DP_DEBUG("No memory to allocate S/G table");
return -ENOMEM;
}
DPAA2_SET_ONLY_FD_BPID(fd, mempool_to_bpid(dpaa2_tx_sg_pool));
@@ -543,7 +543,7 @@ eth_mbuf_to_fd(struct rte_mbuf *mbuf,
DPAA2_MBUF_TO_CONTIG_FD(mbuf, fd, bpid);
DPAA2_PMD_DP_DEBUG("mbuf =%p, mbuf->buf_addr =%p, off = %d,"
- "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d\n",
+ "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d",
mbuf, mbuf->buf_addr, mbuf->data_off,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ADDR(fd),
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size,
@@ -587,7 +587,7 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
if (rte_dpaa2_mbuf_alloc_bulk(
rte_dpaa2_bpid_info[bpid].bp_list->mp, &mb, 1)) {
- DPAA2_PMD_DP_DEBUG("Unable to allocated DPAA2 buffer\n");
+ DPAA2_PMD_DP_DEBUG("Unable to allocated DPAA2 buffer");
return -1;
}
m = (struct rte_mbuf *)mb;
@@ -609,7 +609,7 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
#endif
DPAA2_PMD_DP_DEBUG(
"mbuf: %p, BMAN buf addr: %p, fdaddr: %" PRIx64 ", bpid: %d,"
- " meta: %d, off: %d, len: %d\n",
+ " meta: %d, off: %d, len: %d",
(void *)mbuf,
mbuf->buf_addr,
DPAA2_GET_FD_ADDR(fd),
@@ -656,7 +656,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
- DPAA2_PMD_DP_DEBUG("VDQ command is not issued.QBMAN is busy\n");
+ DPAA2_PMD_DP_DEBUG("VDQ command is not issued.QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -765,7 +765,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- " QBMAN is busy (1)\n");
+ " QBMAN is busy (1)");
/* Portal was busy, try again */
continue;
}
@@ -861,7 +861,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy (2)\n");
+ "QBMAN is busy (2)");
continue;
}
break;
@@ -1002,7 +1002,7 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG(
- "VDQ command is not issued.QBMAN is busy\n");
+ "VDQ command is not issued.QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -1126,7 +1126,7 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy\n");
+ "QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -1263,7 +1263,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
swp = DPAA2_PER_LCORE_PORTAL;
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q->fqid);
#ifdef RTE_LIBRTE_IEEE1588
@@ -1598,7 +1598,7 @@ dpaa2_dev_tx_multi_txq_ordered(void **queue,
}
}
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q[loop]->fqid);
/* Check if the queue is congested */
@@ -1754,7 +1754,7 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
swp = DPAA2_PER_LCORE_PORTAL;
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q->fqid);
/* This would also handle normal and atomic queues as any type
@@ -1989,7 +1989,7 @@ dpaa2_dev_loopback_rx(void *queue,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG(
- "VDQ command not issued.QBMAN busy\n");
+ "VDQ command not issued.QBMAN busy");
/* Portal was busy, try again */
continue;
}
@@ -2071,7 +2071,7 @@ dpaa2_dev_loopback_rx(void *queue,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy (2)\n");
+ "QBMAN is busy (2)");
continue;
}
break;
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 30b5531069..afb840b601 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -8,27 +8,27 @@
#include <rte_log.h>
extern int e1000_logtype_init;
+#define RTE_LOGTYPE_E1000_INIT e1000_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, E1000_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int e1000_logtype_rx;
+#define RTE_LOGTYPE_E1000_RX e1000_logtype_rx
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, E1000_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int e1000_logtype_tx;
+#define RTE_LOGTYPE_E1000_TX e1000_logtype_tx
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, E1000_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
@@ -36,7 +36,7 @@ extern int e1000_logtype_tx;
extern int e1000_logtype_driver;
#define RTE_LOGTYPE_E1000_DRIVER e1000_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, E1000_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, E1000_DRIVER, "%s(): " fmt, __func__, ## args)
/* log init function shared by e1000 and igb drivers */
void e1000_igb_init_log(void);
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index 5c9ec1772b..6ebc08e09f 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -9,13 +9,13 @@
extern int ena_logtype_init;
#define RTE_LOGTYPE_ENA_INIT ena_logtype_init
#define PMD_INIT_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_INIT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, ENA_INIT, "%s(): " fmt, __func__, ## __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ena_logtype_rx;
#define RTE_LOGTYPE_ENA_RX ena_logtype_rx
#define PMD_RX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_RX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, ENA_RX, "%s(): " fmt, __func__, ## __VA_ARGS__)
#else
#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
@@ -24,7 +24,7 @@ extern int ena_logtype_rx;
extern int ena_logtype_tx;
#define RTE_LOGTYPE_ENA_TX ena_logtype_tx
#define PMD_TX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_TX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, ENA_TX, "%s(): " fmt, __func__, ## __VA_ARGS__)
#else
#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
@@ -32,6 +32,6 @@ extern int ena_logtype_tx;
extern int ena_logtype_driver;
#define RTE_LOGTYPE_ENA_DRIVER ena_logtype_driver
#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+ RTE_LOG_LINE(level, ENA_DRIVER, "%s(): " fmt, __func__, ## __VA_ARGS__)
#endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_platform.h b/drivers/net/ena/ena_platform.h
index 748928b2d9..71190b2932 100644
--- a/drivers/net/ena/ena_platform.h
+++ b/drivers/net/ena/ena_platform.h
@@ -9,7 +9,7 @@
#define ena_assert_msg(cond, msg) \
do { \
if (unlikely(!(cond))) { \
- rte_log(RTE_LOG_ERR, ena_logtype_driver, \
+ RTE_LOG_LINE(ERR, ENA_DRIVER, \
"Assert failed on %s:%s:%d: ", \
__FILE__, __func__, __LINE__); \
rte_panic(msg); \
diff --git a/drivers/net/enetc/enetc_logs.h b/drivers/net/enetc/enetc_logs.h
index 63f6ca4cf4..fd5bdeb16e 100644
--- a/drivers/net/enetc/enetc_logs.h
+++ b/drivers/net/enetc/enetc_logs.h
@@ -6,15 +6,13 @@
#define _ENETC_LOGS_H_
extern int enetc_logtype_pmd;
-#define RTE_LOGTYPE_ENETC_PMD enetc_logtype_pmd
+#define RTE_LOGTYPE_ENETC_NET enetc_logtype_pmd
#define ENETC_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enetc_logtype_pmd, "enetc_net: " \
- fmt "\n", ##args)
+ RTE_LOG_LINE(level, ENETC_NET, fmt, ##args)
#define ENETC_PMD_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, enetc_logtype_pmd, "enetc_net: %s(): "\
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(DEBUG, ENETC_NET, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() ENETC_PMD_DEBUG(">>")
@@ -31,7 +29,7 @@ extern int enetc_logtype_pmd;
/* DP Logs, toggled out at compile time if level lower than current level */
#define ENETC_PMD_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ENETC_PMD, fmt, ## args)
+ RTE_LOG_DP_LINE(level, ENETC_NET, fmt, ## args)
#define ENETC_PMD_DP_DEBUG(fmt, args...) \
ENETC_PMD_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/net/enetfec/enet_pmd_logs.h b/drivers/net/enetfec/enet_pmd_logs.h
index 270981373f..9ff633cad8 100644
--- a/drivers/net/enetfec/enet_pmd_logs.h
+++ b/drivers/net/enetfec/enet_pmd_logs.h
@@ -8,12 +8,11 @@
#include <rte_log.h>
extern int enetfec_logtype_pmd;
-#define RTE_LOGTYPE_ENETFEC_PMD enetfec_logtype_pmd
+#define RTE_LOGTYPE_ENETFEC_NET enetfec_logtype_pmd
/* PMD related logs */
#define ENETFEC_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enetfec_logtype_pmd, "\nfec_net: %s()" \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ENETFEC_NET, "%s()" fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() ENET_PMD_LOG(DEBUG, " >>")
@@ -29,6 +28,6 @@ extern int enetfec_logtype_pmd;
/* DP Logs, toggled out at compile time if level lower than current level */
#define ENETFEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ENETFEC_PMD, fmt, ## args)
+ RTE_LOG_DP_LINE(level, ENETFEC_NET, fmt, ## args)
#endif /* _ENETFEC_LOGS_H_ */
diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index 7741273037..6ac245f7ab 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -26,6 +26,7 @@
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
extern int enic_pmd_logtype;
+#define RTE_LOGTYPE_ENIC_PMD enic_pmd_logtype
#define dev_printk(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, enic_pmd_logtype, \
@@ -37,8 +38,8 @@ extern int enic_pmd_logtype;
#define dev_debug(x, args...) dev_printk(DEBUG, args)
#define ENICPMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enic_pmd_logtype, \
- "%s " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ENIC_PMD, \
+ "%s " fmt, __func__, ##args)
#define ENICPMD_FUNC_TRACE() ENICPMD_LOG(DEBUG, ">>")
typedef unsigned long long dma_addr_t;
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 53a451c1b1..babea6016e 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -357,12 +357,9 @@ extern int failsafe_mac_from_arg;
#endif
extern int failsafe_logtype;
+#define RTE_LOGTYPE_NET_FAILSAFE failsafe_logtype
-#define LOG__(l, m, ...) \
- rte_log(RTE_LOG_ ## l, failsafe_logtype, \
- "net_failsafe: " m "%c", __VA_ARGS__)
-
-#define LOG_(level, ...) LOG__(level, __VA_ARGS__, '\n')
+#define LOG_(l, ...) RTE_LOG_LINE(l, NET_FAILSAFE, __VA_ARGS__)
#define DEBUG(...) LOG_(DEBUG, __VA_ARGS__)
#define INFO(...) LOG_(INFO, __VA_ARGS__)
#define WARN(...) LOG_(WARNING, __VA_ARGS__)
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index c4c7c977d9..d1a849ca79 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -8,26 +8,26 @@
#include <rte_log.h>
extern int fm10k_logtype_init;
+#define RTE_LOGTYPE_FM10K_INIT fm10k_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, FM10K_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int fm10k_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_FM10K_RX fm10k_logtype_rx
+#define PMD_RX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, FM10K_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int fm10k_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_FM10K_TX fm10k_logtype_tx
+#define PMD_TX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, FM10K_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
@@ -35,6 +35,6 @@ extern int fm10k_logtype_tx;
extern int fm10k_logtype_driver;
#define RTE_LOGTYPE_FM10K_DRIVER fm10k_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, FM10K_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, FM10K_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _FM10K_LOGS_H_ */
diff --git a/drivers/net/gve/gve_logs.h b/drivers/net/gve/gve_logs.h
index 0d02da46e1..4a5baca6ff 100644
--- a/drivers/net/gve/gve_logs.h
+++ b/drivers/net/gve/gve_logs.h
@@ -6,9 +6,9 @@
#define _GVE_LOGS_H_
extern int gve_logtype_driver;
+#define RTE_LOGTYPE_GVE_DRIVER gve_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, gve_logtype_driver, "%s(): " fmt "\n", \
- __func__, ## args)
+ RTE_LOG_LINE(level, GVE_DRIVER, "%s(): " fmt, __func__, ## args)
#endif
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index aea332046e..6cf5a6e43a 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -84,10 +84,11 @@ typedef uint64_t dma_addr_t;
#define HINIC_DRIVER_NAME "net_hinic"
extern int hinic_logtype;
+#define RTE_LOGTYPE_HINIC hinic_logtype
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hinic_logtype, \
- HINIC_DRIVER_NAME": " fmt "\n", ##args)
+ RTE_LOG_LINE(level, HINIC, \
+ HINIC_DRIVER_NAME": " fmt, ##args)
/* common definition */
#ifndef ETH_ALEN
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
index 47d3a13220..ef7a1ae3fd 100644
--- a/drivers/net/hns3/hns3_logs.h
+++ b/drivers/net/hns3/hns3_logs.h
@@ -6,35 +6,37 @@
#define HNS3_LOGS_H
extern int hns3_logtype_init;
+#define RTE_LOGTYPE_HNS3_INIT hns3_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, HNS3_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int hns3_logtype_driver;
-#define PMD_DRV_LOG_RAW(hw, level, fmt, args...) \
- rte_log(level, hns3_logtype_driver, "%s %s(): " fmt, \
+#define RTE_LOGTYPE_HNS3_DRIVER hns3_logtype_driver
+#define PMD_DRV_LOG(hw, level, fmt, args...) \
+ RTE_LOG_LINE(level, HNS3_DRIVER, "%s %s(): " fmt, \
(hw)->data->name, __func__, ## args)
#define hns3_err(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_ERR, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, ERR, fmt, ## args)
#define hns3_warn(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_WARNING, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, WARNING, fmt, ## args)
#define hns3_notice(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_NOTICE, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, NOTICE, fmt, ## args)
#define hns3_info(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_INFO, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, INFO, fmt, ## args)
#define hns3_dbg(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_DEBUG, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, DEBUG, fmt, ## args)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int hns3_logtype_rx;
+#define RTE_LOGTYPE_HNS3_RX hns3_logtype_rx
#define PMD_RX_LOG(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_rx, "%s %s(): " fmt "\n", \
+ RTE_LOG_LINE(level, HNS3_RX, "%s %s(): " fmt, \
(hw)->data->name, __func__, ## args)
#else
#define PMD_RX_LOG(hw, level, fmt, args...) do { } while (0)
@@ -42,8 +44,9 @@ extern int hns3_logtype_rx;
#ifdef RTE_ETHDEV_DEBUG_TX
extern int hns3_logtype_tx;
+#define RTE_LOGTYPE_HNS3_TX hns3_logtype_tx
#define PMD_TX_LOG(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_tx, "%s %s(): " fmt "\n", \
+ RTE_LOG_LINE(level, HNS3_TX, "%s %s(): " fmt, \
(hw)->data->name, __func__, ## args)
#else
#define PMD_TX_LOG(hw, level, fmt, args...) do { } while (0)
diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h
index fb1f3a4096..a756871dff 100644
--- a/drivers/net/i40e/i40e_logs.h
+++ b/drivers/net/i40e/i40e_logs.h
@@ -6,25 +6,25 @@
#define _I40E_LOGS_H_
extern int i40e_logtype_init;
+#define RTE_LOGTYPE_I40E_INIT i40e_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, I40E_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int i40e_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_I40E_RX i40e_logtype_rx
+#define PMD_RX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, I40E_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int i40e_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_I40E_TX i40e_logtype_tx
+#define PMD_TX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, I40E_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
@@ -32,6 +32,6 @@ extern int i40e_logtype_tx;
extern int i40e_logtype_driver;
#define RTE_LOGTYPE_I40E_DRIVER i40e_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, I40E_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, I40E_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _I40E_LOGS_H_ */
diff --git a/drivers/net/iavf/iavf_log.h b/drivers/net/iavf/iavf_log.h
index ff66ab0ccf..c0013b8861 100644
--- a/drivers/net/iavf/iavf_log.h
+++ b/drivers/net/iavf/iavf_log.h
@@ -6,35 +6,36 @@
#define _IAVF_LOG_H_
extern int iavf_logtype_init;
+#define RTE_LOGTYPE_IAVF_INIT iavf_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_init, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, IAVF_INIT, "%s(): " fmt, \
__func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int iavf_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_IAVF_DRIVER iavf_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG_LINE(level, IAVF_DRIVER, "%s(): " fmt, \
+ __func__, ## args)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int iavf_logtype_rx;
+#define RTE_LOGTYPE_IAVF_RX iavf_logtype_rx
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, IAVF_RX, \
+ "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int iavf_logtype_tx;
+#define RTE_LOGTYPE_IAVF_TX iavf_logtype_tx
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, IAVF_TX, \
+ "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
diff --git a/drivers/net/ice/ice_logs.h b/drivers/net/ice/ice_logs.h
index a54e9d8b59..a84a5d453b 100644
--- a/drivers/net/ice/ice_logs.h
+++ b/drivers/net/ice/ice_logs.h
@@ -6,34 +6,34 @@
#define _ICE_LOGS_H_
extern int ice_logtype_init;
+#define RTE_LOGTYPE_ICE_INIT ice_logtype_init
extern int ice_logtype_driver;
#define RTE_LOGTYPE_ICE_DRIVER ice_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, ICE_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ice_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_ICE_RX ice_logtype_rx
+#define PMD_RX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, ICE_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ice_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_ICE_TX ice_logtype_tx
+#define PMD_TX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, ICE_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, ICE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, ICE_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _ICE_LOGS_H_ */
diff --git a/drivers/net/idpf/idpf_logs.h b/drivers/net/idpf/idpf_logs.h
index bf0774b8e4..c1629a0c48 100644
--- a/drivers/net/idpf/idpf_logs.h
+++ b/drivers/net/idpf/idpf_logs.h
@@ -8,25 +8,22 @@
#include <rte_log.h>
extern int idpf_logtype_init;
+#define RTE_LOGTYPE_IDPF_INIT idpf_logtype_init
extern int idpf_logtype_driver;
+#define RTE_LOGTYPE_IDPF_DRIVER idpf_logtype_driver
#define PMD_INIT_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_logtype_init, \
+ RTE_LOG_LINE(level, IDPF_INIT, \
RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
-#define PMD_DRV_LOG_RAW(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_logtype_driver, \
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE(level, IDPF_DRIVER, \
RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
#endif /* _IDPF_LOGS_H_ */
diff --git a/drivers/net/igc/igc_logs.h b/drivers/net/igc/igc_logs.h
index 4a574f10cb..1046b45297 100644
--- a/drivers/net/igc/igc_logs.h
+++ b/drivers/net/igc/igc_logs.h
@@ -12,31 +12,29 @@ extern "C" {
#endif
extern int igc_logtype_init;
+#define RTE_LOGTYPE_IGC_INIT igc_logtype_init
extern int igc_logtype_driver;
#define RTE_LOGTYPE_IGC_DRIVER igc_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, igc_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, IGC_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(...) PMD_DRV_LOG(__VA_ARGS__)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(...) PMD_DRV_LOG(__VA_ARGS__)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, IGC_DRIVER, "%s(): " fmt, __func__, ## args)
#ifdef __cplusplus
}
diff --git a/drivers/net/ipn3ke/ipn3ke_logs.h b/drivers/net/ipn3ke/ipn3ke_logs.h
index 147fd8039e..c47a70ba9f 100644
--- a/drivers/net/ipn3ke/ipn3ke_logs.h
+++ b/drivers/net/ipn3ke/ipn3ke_logs.h
@@ -8,10 +8,10 @@
#include <rte_log.h>
extern int ipn3ke_afu_logtype;
+#define RTE_LOGTYPE_IPN3KE_AFU ipn3ke_afu_logtype
#define IPN3KE_AFU_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ipn3ke_afu_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, IPN3KE_AFU, "%s(): " fmt, __func__, ##args)
#define IPN3KE_AFU_PMD_FUNC_TRACE() IPN3KE_AFU_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 5a2c5ccde0..44a8f40810 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -6,26 +6,26 @@
#define _IXGBE_LOGS_H_
extern int ixgbe_logtype_init;
+#define RTE_LOGTYPE_IXGBE_INIT ixgbe_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, IXGBE_INIT, "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ixgbe_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IXGBE_RX ixgbe_logtype_rx
+#define PMD_RX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, IXGBE_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ixgbe_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IXGBE_TX ixgbe_logtype_tx
+#define PMD_TX_LOG(level, fmt, args...) \
+ RTE_LOG_LINE(level, IXGBE_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
@@ -33,6 +33,6 @@ extern int ixgbe_logtype_tx;
extern int ixgbe_logtype_driver;
#define RTE_LOGTYPE_IXGBE_DRIVER ixgbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, IXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, IXGBE_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _IXGBE_LOGS_H_ */
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 37f654f0e6..757d7a173f 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -466,16 +466,17 @@ struct mana_rxq {
extern int mana_logtype_driver;
#define RTE_LOGTYPE_MANA_DRIVER mana_logtype_driver
extern int mana_logtype_init;
+#define RTE_LOGTYPE_MANA_INIT mana_logtype_init
#define DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mana_logtype_driver, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, MANA_DRIVER, "%s(): " fmt, \
__func__, ## args)
#define DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, MANA_DRIVER, fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, MANA_DRIVER, fmt, ## args)
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mana_logtype_init, "%s(): " fmt "\n",\
+ RTE_LOG_LINE(level, MANA_INIT, "%s(): " fmt,\
__func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h
index f21806c811..e0f19d1aca 100644
--- a/drivers/net/memif/rte_eth_memif.h
+++ b/drivers/net/memif/rte_eth_memif.h
@@ -28,10 +28,11 @@
#define MAX_PKT_BURST 32
extern int memif_logtype;
+#define RTE_LOGTYPE_MEMIF memif_logtype
#define MIF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, memif_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, MEMIF, \
+ "%s(): " fmt, __func__, ##args)
enum memif_role_t {
MEMIF_ROLE_SERVER,
diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index fca21fd79c..0cf972e607 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -25,6 +25,7 @@
#endif
extern int mlx4_logtype;
+#define RTE_LOGTYPE_MLX4 mlx4_logtype
#ifdef RTE_LIBRTE_MLX4_DEBUG
@@ -46,8 +47,8 @@ pmd_drv_log_basename(const char *s)
}
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, mlx4_logtype, \
- RTE_FMT("%s:%u: %s(): " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_LOG_LINE(level, MLX4, \
+ RTE_FMT("%s:%u: %s(): " RTE_FMT_HEAD(__VA_ARGS__,), \
pmd_drv_log_basename(__FILE__), \
__LINE__, \
__func__, \
@@ -63,9 +64,9 @@ pmd_drv_log_basename(const char *s)
*/
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, mlx4_logtype, \
+ RTE_LOG_LINE(level, MLX4, \
RTE_FMT(MLX4_DRIVER_NAME ": " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
RTE_FMT_TAIL(__VA_ARGS__,)))
#define MLX4_ASSERT(exp) RTE_ASSERT(exp)
#define claim_zero(...) (__VA_ARGS__)
diff --git a/drivers/net/mvneta/mvneta_ethdev.h b/drivers/net/mvneta/mvneta_ethdev.h
index 9e711d8e5a..4bf6e8d54c 100644
--- a/drivers/net/mvneta/mvneta_ethdev.h
+++ b/drivers/net/mvneta/mvneta_ethdev.h
@@ -83,9 +83,9 @@ struct mvneta_priv {
/** Current log type. */
extern int mvneta_logtype;
+#define RTE_LOGTYPE_MVNETA mvneta_logtype
#define MVNETA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mvneta_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+ RTE_LOG_LINE(level, MVNETA, "%s(): " fmt, __func__, ##args)
#endif /* _MVNETA_ETHDEV_H_ */
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index 178b5103ba..35a5231824 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -200,9 +200,10 @@ extern const struct rte_tm_ops mrvl_tm_ops;
/** Current log type. */
extern int mrvl_logtype;
+#define RTE_LOGTYPE_MRVL mrvl_logtype
#define MRVL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mrvl_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, MRVL, "%s(): " fmt, \
__func__, ##args)
extern struct pp2_bpool *dummy_pool[PP2_NUM_PKT_PROC];
diff --git a/drivers/net/netvsc/hn_logs.h b/drivers/net/netvsc/hn_logs.h
index cddadef09c..6ce3209955 100644
--- a/drivers/net/netvsc/hn_logs.h
+++ b/drivers/net/netvsc/hn_logs.h
@@ -6,31 +6,29 @@
#include <rte_log.h>
extern int hn_logtype_init;
+#define RTE_LOGTYPE_HN_INIT hn_logtype_init
extern int hn_logtype_driver;
+#define RTE_LOGTYPE_HN_DRIVER hn_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_init, "%s(): " fmt "\n",\
- __func__, ## args)
+ RTE_LOG_LINE(level, HN_INIT, "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_NETVSC_DEBUG_RX
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
- "%s() rx: " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, HN_DRIVER, "%s() rx: " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_NETVSC_DEBUG_TX
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
- "%s() tx: " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, HN_DRIVER, "%s() tx: " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, "%s(): " fmt "\n", \
- __func__, ## args)
+ RTE_LOG_LINE(level, HN_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _HN_LOGS_H_ */
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 1ba75ee804..b2dae6474a 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -95,8 +95,8 @@ void hn_rndis_dump(const void *buf)
const struct rndis_pktinfo *ppi;
unsigned int ppi_len;
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_PACKET (len %u, data %u:%u, # oob %u %u:%u, pkt %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_PACKET (len %u, data %u:%u, # oob %u %u:%u, pkt %u:%u)",
rndis_msg->pkt.len,
rndis_msg->pkt.dataoffset,
rndis_msg->pkt.datalen,
@@ -116,8 +116,8 @@ void hn_rndis_dump(const void *buf)
ppi_data = ppi->data;
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- " PPI (size %u, type %u, offs %u data %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ " PPI (size %u, type %u, offs %u data %#x)",
ppi->size, ppi->type, ppi->offset,
*(const uint32_t *)ppi_data);
if (ppi->size == 0)
@@ -129,8 +129,8 @@ void hn_rndis_dump(const void *buf)
break;
}
case RNDIS_INITIALIZE_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_INIT (len %u id %#x, ver %u.%u max xfer %u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_INIT (len %u id %#x, ver %u.%u max xfer %u)",
rndis_msg->init_request.len,
rndis_msg->init_request.rid,
rndis_msg->init_request.ver_major,
@@ -139,9 +139,9 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_INITIALIZE_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
"RNDIS_MSG_INIT_C (len %u, id %#x, status 0x%x, vers %u.%u, "
- "flags %d, max xfer %u, max pkts %u, aligned %u)\n",
+ "flags %d, max xfer %u, max pkts %u, aligned %u)",
rndis_msg->init_complete.len,
rndis_msg->init_complete.rid,
rndis_msg->init_complete.status,
@@ -154,14 +154,14 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_HALT_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_HALT (len %u id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_HALT (len %u id %#x)",
rndis_msg->halt.len, rndis_msg->halt.rid);
break;
case RNDIS_QUERY_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_QUERY (len %u, id %#x, oid %#x, info %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_QUERY (len %u, id %#x, oid %#x, info %u:%u)",
rndis_msg->query_request.len,
rndis_msg->query_request.rid,
rndis_msg->query_request.oid,
@@ -170,8 +170,8 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_QUERY_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_QUERY_C (len %u, id %#x, status 0x%x, buf %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_QUERY_C (len %u, id %#x, status 0x%x, buf %u:%u)",
rndis_msg->query_complete.len,
rndis_msg->query_complete.rid,
rndis_msg->query_complete.status,
@@ -180,8 +180,8 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_SET_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_SET (len %u, id %#x, oid %#x, info %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_SET (len %u, id %#x, oid %#x, info %u:%u)",
rndis_msg->set_request.len,
rndis_msg->set_request.rid,
rndis_msg->set_request.oid,
@@ -190,16 +190,16 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_SET_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_SET_C (len %u, id 0x%x, status 0x%x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_SET_C (len %u, id 0x%x, status 0x%x)",
rndis_msg->set_complete.len,
rndis_msg->set_complete.rid,
rndis_msg->set_complete.status);
break;
case RNDIS_INDICATE_STATUS_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_INDICATE (len %u, status %#x, buf len %u, buf offset %u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_INDICATE (len %u, status %#x, buf len %u, buf offset %u)",
rndis_msg->indicate_status.len,
rndis_msg->indicate_status.status,
rndis_msg->indicate_status.stbuflen,
@@ -207,38 +207,38 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_RESET_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_RESET (len %u, id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_RESET (len %u, id %#x)",
rndis_msg->reset_request.len,
rndis_msg->reset_request.rid);
break;
case RNDIS_RESET_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_RESET_C (len %u, status %#x address %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_RESET_C (len %u, status %#x address %#x)",
rndis_msg->reset_complete.len,
rndis_msg->reset_complete.status,
rndis_msg->reset_complete.adrreset);
break;
case RNDIS_KEEPALIVE_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_KEEPALIVE (len %u, id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_KEEPALIVE (len %u, id %#x)",
rndis_msg->keepalive_request.len,
rndis_msg->keepalive_request.rid);
break;
case RNDIS_KEEPALIVE_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_KEEPALIVE_C (len %u, id %#x address %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_KEEPALIVE_C (len %u, id %#x address %#x)",
rndis_msg->keepalive_complete.len,
rndis_msg->keepalive_complete.rid,
rndis_msg->keepalive_complete.status);
break;
default:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS type %#x len %u\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS type %#x len %u",
rndis_msg->hdr.type,
rndis_msg->hdr.len);
break;
diff --git a/drivers/net/nfb/nfb.h b/drivers/net/nfb/nfb.h
index ca0b647571..f318bc8b7b 100644
--- a/drivers/net/nfb/nfb.h
+++ b/drivers/net/nfb/nfb.h
@@ -13,9 +13,9 @@
#include <netcope/txmac.h>
extern int nfb_logtype;
+#define RTE_LOGTYPE_NFB nfb_logtype
#define NFB_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfb_logtype, "%s(): " fmt "\n", \
- __func__, ## args)
+ RTE_LOG_LINE(level, NFB, "%s(): " fmt, __func__, ## args)
#include "nfb_rx.h"
#include "nfb_tx.h"
diff --git a/drivers/net/nfp/nfp_logs.h b/drivers/net/nfp/nfp_logs.h
index 690adabffd..e502ff863e 100644
--- a/drivers/net/nfp/nfp_logs.h
+++ b/drivers/net/nfp/nfp_logs.h
@@ -9,36 +9,36 @@
#include <rte_log.h>
extern int nfp_logtype_init;
+#define RTE_LOGTYPE_NFP_INIT nfp_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_INIT, "%s(): " fmt, __func__, ## args)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int nfp_logtype_rx;
+#define RTE_LOGTYPE_NFP_RX nfp_logtype_rx
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_RX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int nfp_logtype_tx;
+#define RTE_LOGTYPE_NFP_TX nfp_logtype_tx
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_TX, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
extern int nfp_logtype_cpp;
+#define RTE_LOGTYPE_NFP_CPP nfp_logtype_cpp
#define PMD_CPP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_cpp, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_CPP, "%s(): " fmt, __func__, ## args)
extern int nfp_logtype_driver;
+#define RTE_LOGTYPE_NFP_DRIVER nfp_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* __NFP_LOGS_H__ */
diff --git a/drivers/net/ngbe/ngbe_logs.h b/drivers/net/ngbe/ngbe_logs.h
index e5165ffd60..4f5e4c5757 100644
--- a/drivers/net/ngbe/ngbe_logs.h
+++ b/drivers/net/ngbe/ngbe_logs.h
@@ -10,29 +10,33 @@
* PMD_USER_LOG: for user
*/
extern int ngbe_logtype_init;
+#define RTE_LOGTYPE_NGBE_INIT ngbe_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, NGBE_INIT, \
+ "%s(): " fmt, __func__, ##args)
extern int ngbe_logtype_driver;
+#define RTE_LOGTYPE_NGBE_DRIVER ngbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_driver, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, NGBE_DRIVER, \
+ "%s(): " fmt, __func__, ##args)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ngbe_logtype_rx;
+#define RTE_LOGTYPE_NGBE_RX ngbe_logtype_rx
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, NGBE_RX, \
+ "%s(): " fmt, __func__, ##args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ngbe_logtype_tx;
+#define RTE_LOGTYPE_NGBE_TX ngbe_logtype_tx
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, NGBE_TX, \
+ "%s(): " fmt, __func__, ##args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index f4ed3b8a7f..f5fec3d692 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -76,10 +76,11 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE);
+#define RTE_LOGTYPE_ETH_NULL eth_null_logtype
#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_null_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ETH_NULL, \
+ "%s(): " fmt, __func__, ##args)
static uint16_t
eth_null_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
index 7d5dd91a77..ea9788757e 100644
--- a/drivers/net/octeon_ep/otx_ep_common.h
+++ b/drivers/net/octeon_ep/otx_ep_common.h
@@ -68,18 +68,18 @@
#define OTX_CUST_DATA_LEN 0
#define otx_ep_info(fmt, args...) \
- rte_log(RTE_LOG_INFO, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
+ RTE_LOG_LINE(INFO, OTX_NET_EP, \
+ "%s():%u " fmt, \
__func__, __LINE__, ##args)
#define otx_ep_err(fmt, args...) \
- rte_log(RTE_LOG_ERR, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
+ RTE_LOG_LINE(ERR, OTX_NET_EP, \
+ "%s():%u " fmt, \
__func__, __LINE__, ##args)
#define otx_ep_dbg(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
+ RTE_LOG_LINE(DEBUG, OTX_NET_EP, \
+ "%s():%u " fmt, \
__func__, __LINE__, ##args)
/* IO Access */
diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c
index 9680a59797..09ed3c8da0 100644
--- a/drivers/net/octeon_ep/otx_ep_rxtx.c
+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c
@@ -916,9 +916,9 @@ otx_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
next_fetch = (pkts == new_pkts - 1) ? 0 : 1;
oq_pkt = otx_ep_droq_read_packet(otx_ep, droq, next_fetch);
if (!oq_pkt) {
- RTE_LOG_DP(ERR, OTX_NET_EP,
+ RTE_LOG_DP_LINE(ERR, OTX_NET_EP,
"DROQ read pkt failed pending %" PRIu64
- "last_pkt_count %" PRIu64 "new_pkts %d.\n",
+ "last_pkt_count %" PRIu64 "new_pkts %d.",
droq->pkts_pending, droq->last_pkt_count,
new_pkts);
droq->stats.rx_err++;
diff --git a/drivers/net/octeontx/octeontx_logs.h b/drivers/net/octeontx/octeontx_logs.h
index b58f296478..49ff18d8c4 100644
--- a/drivers/net/octeontx/octeontx_logs.h
+++ b/drivers/net/octeontx/octeontx_logs.h
@@ -6,21 +6,21 @@
#define __OCTEONTX_LOGS_H__
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, OTX_NET_INIT, \
+ "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, OTX_NET_DRIVER, \
+ "%s(): " fmt, __func__, ## args)
#define PMD_MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_mbox, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, OTX_NET_MBOX, \
+ "%s(): " fmt, __func__, ## args)
#define octeontx_log_info(fmt, args...) \
- RTE_LOG(INFO, OTX_NET_DRIVER, fmt "\n", ## args)
+ RTE_LOG_LINE(INFO, OTX_NET_DRIVER, fmt, ## args)
#define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__)
#define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__)
@@ -30,8 +30,10 @@
#define PMD_TX_LOG PMD_DRV_LOG
extern int otx_net_logtype_init;
+#define RTE_LOGTYPE_OTX_NET_INIT otx_net_logtype_init
extern int otx_net_logtype_driver;
#define RTE_LOGTYPE_OTX_NET_DRIVER otx_net_logtype_driver
extern int otx_net_logtype_mbox;
+#define RTE_LOGTYPE_OTX_NET_MBOX otx_net_logtype_mbox
#endif /* __OCTEONTX_LOGS_H__*/
diff --git a/drivers/net/pcap/pcap_osdep.h b/drivers/net/pcap/pcap_osdep.h
index bf41cba982..309a15bc80 100644
--- a/drivers/net/pcap/pcap_osdep.h
+++ b/drivers/net/pcap/pcap_osdep.h
@@ -8,9 +8,10 @@
#include <rte_ether.h>
#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_pcap_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ETH_PCAP, \
+ "%s(): " fmt, __func__, ##args)
extern int eth_pcap_logtype;
+#define RTE_LOGTYPE_ETH_PCAP eth_pcap_logtype
int osdep_iface_index_get(const char *name);
int osdep_iface_mac_get(const char *name, struct rte_ether_addr *mac);
diff --git a/drivers/net/pfe/pfe_logs.h b/drivers/net/pfe/pfe_logs.h
index 369a50bec5..d0270caa60 100644
--- a/drivers/net/pfe/pfe_logs.h
+++ b/drivers/net/pfe/pfe_logs.h
@@ -6,12 +6,11 @@
#define _PFE_LOGS_H_
extern int pfe_logtype_pmd;
-#define RTE_LOGTYPE_PFE_PMD pfe_logtype_pmd
+#define RTE_LOGTYPE_PFE_NET pfe_logtype_pmd
/* PMD related logs */
#define PFE_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, pfe_logtype_pmd, "pfe_net: %s()" \
- fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, PFE_NET, "%s()" fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PFE_PMD_LOG(DEBUG, " >>")
@@ -27,6 +26,6 @@ extern int pfe_logtype_pmd;
/* DP Logs, toggled out at compile time if level lower than current level */
#define PFE_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, PFE_PMD, fmt, ## args)
+ RTE_LOG_DP_LINE(level, PFE_NET, fmt, ## args)
#endif /* _PFE_LOGS_H_ */
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 1346a0dba3..a206c40f4b 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -68,10 +68,11 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(eth_ring_logtype, NOTICE);
+#define RTE_LOGTYPE_ETH_RING eth_ring_logtype
#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, ETH_RING, \
+ "%s(): " fmt, __func__, ##args)
static uint16_t
eth_ring_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 1b90cf7a21..5d569454b5 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -51,10 +51,11 @@ static const struct softnic_conn_params conn_params_default = {
};
RTE_LOG_REGISTER_DEFAULT(pmd_softnic_logtype, NOTICE);
+#define RTE_LOGTYPE_PMD_SOFTNIC pmd_softnic_logtype
#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, PMD_SOFTNIC, \
+ "%s(): " fmt, __func__, ##args)
static int
pmd_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
diff --git a/drivers/net/tap/tap_log.h b/drivers/net/tap/tap_log.h
index fa06843a4c..23e992bf34 100644
--- a/drivers/net/tap/tap_log.h
+++ b/drivers/net/tap/tap_log.h
@@ -4,7 +4,8 @@
*/
extern int tap_logtype;
+#define RTE_LOGTYPE_TAP tap_logtype
#define TAP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, tap_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, TAP, "%s(): " fmt, \
__func__, ## args)
diff --git a/drivers/net/thunderx/nicvf_logs.h b/drivers/net/thunderx/nicvf_logs.h
index 3c455b4288..4a1ad7af63 100644
--- a/drivers/net/thunderx/nicvf_logs.h
+++ b/drivers/net/thunderx/nicvf_logs.h
@@ -20,25 +20,25 @@
#endif
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NICVF_INIT, "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NICVF_DRIVER, "%s(): " fmt, __func__, ## args)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#define PMD_MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_mbox, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NICVF_MBOX, "%s(): " fmt, __func__, ## args)
#define PMD_MBOX_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#define PMD_RX_LOG PMD_DRV_LOG
#define PMD_TX_LOG PMD_DRV_LOG
extern int nicvf_logtype_init;
+#define RTE_LOGTYPE_NICVF_INIT nicvf_logtype_init
extern int nicvf_logtype_driver;
+#define RTE_LOGTYPE_NICVF_DRIVER nicvf_logtype_driver
extern int nicvf_logtype_mbox;
+#define RTE_LOGTYPE_NICVF_MBOX nicvf_logtype_mbox
#endif /* __THUNDERX_NICVF_LOGS__ */
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index b5a5a9233f..f0fc23f65c 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -12,38 +12,44 @@
* PMD_USER_LOG: for user
*/
extern int txgbe_logtype_init;
+#define RTE_LOGTYPE_TXGBE_INIT txgbe_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, TXGBE_INIT, \
+ "%s(): " fmt, __func__, ##args)
extern int txgbe_logtype_driver;
+#define RTE_LOGTYPE_TXGBE_DRIVER txgbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_driver, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, TXGBE_DRIVER, \
+ "%s(): " fmt, __func__, ##args)
#ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
extern int txgbe_logtype_rx;
+#define RTE_LOGTYPE_TXGBE_RX txgbe_logtype_rx
#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, TXGBE_RX, \
+ "%s(): " fmt, __func__, ##args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
extern int txgbe_logtype_tx;
+#define RTE_LOGTYPE_TXGBE_TX txgbe_logtype_tx
#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, TXGBE_TX, \
+ "%s(): " fmt, __func__, ##args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
extern int txgbe_logtype_tx_free;
+#define RTE_LOGTYPE_TXGBE_TX_FREE txgbe_logtype_tx_free
+#define RTE_LOGTYPE_TXGBE_TX txgbe_logtype_tx
#define PMD_TX_FREE_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_tx_free, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, TXGBE_TX_FREE, \
+ "%s(): " fmt, __func__, ##args)
#else
#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
#endif
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c3e045d892..9e7ab792ec 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -49,12 +49,12 @@
#define NETVSC_MAX_ROUTE_LINE_SIZE 300
RTE_LOG_REGISTER_DEFAULT(vdev_netvsc_logtype, NOTICE);
+#define RTE_LOGTYPE_VDEV_NETVSC vdev_netvsc_logtype
#define DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- vdev_netvsc_logtype, \
+ RTE_LOG_LINE(level, VDEV_NETVSC, \
RTE_FMT(VDEV_NETVSC_DRIVER_NAME ": " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_HEAD(__VA_ARGS__,), \
RTE_FMT_TAIL(__VA_ARGS__,)))
/** Context structure for a vdev_netvsc instance. */
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 6ccb228872..87c05caccd 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -25,8 +25,7 @@ RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
#define RTE_LOGTYPE_VHOST vhost_logtype
#define VHOST_LOG_LINE(level, ...) \
- RTE_LOG(level, VHOST, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__ ,)))
+ RTE_LOG_LINE(level, VHOST, __VA_ARGS__)
enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
index 01911514bd..a31a975df4 100644
--- a/drivers/net/virtio/virtio_logs.h
+++ b/drivers/net/virtio/virtio_logs.h
@@ -8,22 +8,23 @@
#include <rte_log.h>
extern int virtio_logtype_init;
+#define RTE_LOGTYPE_VIRTIO_INIT virtio_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, VIRTIO_INIT, \
+ "%s(): " fmt, __func__, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, VIRTIO_DRIVER, "%s() rx: " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VIRTIO_DRIVER, "%s() rx: " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX
#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, VIRTIO_DRIVER, "%s() tx: " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VIRTIO_DRIVER, "%s() tx: " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
#endif
@@ -31,7 +32,7 @@ extern int virtio_logtype_init;
extern int virtio_logtype_driver;
#define RTE_LOGTYPE_VIRTIO_DRIVER virtio_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VIRTIO_DRIVER, \
+ "%s(): " fmt, __func__, ## args)
#endif /* _VIRTIO_LOGS_H_ */
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 5962325d62..e39ce30207 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -6,28 +6,29 @@
#define _VMXNET3_LOGS_H_
extern int vmxnet3_logtype_init;
+#define RTE_LOGTYPE_VMXNET3_INIT vmxnet3_logtype_init
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VMXNET3_INIT, \
+ "%s(): " fmt, __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_RX
#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VMXNET3_DRIVER, "%s(): " fmt, __func__, ## args)
#else
#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VMXNET3_DRIVER, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE
#define PMD_TX_FREE_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VMXNET3_DRIVER, "%s(): " fmt, __func__, ## args)
#else
#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
#endif
@@ -35,7 +36,6 @@ extern int vmxnet3_logtype_init;
extern int vmxnet3_logtype_driver;
#define RTE_LOGTYPE_VMXNET3_DRIVER vmxnet3_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, VMXNET3_DRIVER, "%s(): " fmt, __func__, ## args)
#endif /* _VMXNET3_LOGS_H_ */
diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
index 790b4d2a5a..0ab952bb84 100644
--- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
+++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
@@ -27,10 +27,10 @@ extern "C" {
#endif
extern int cnxk_logtype_bphy;
+#define RTE_LOGTYPE_CNXK_BPHY cnxk_logtype_bphy
#define CNXK_BPHY_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cnxk_logtype_bphy, \
- "%s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, CNXK_BPHY, "%s(): " fmt, __func__, ## args)
/** Available message types */
enum cnxk_bphy_cgx_msg_type {
diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.h b/drivers/raw/cnxk_gpio/cnxk_gpio.h
index 336d7ac373..1ee9d66912 100644
--- a/drivers/raw/cnxk_gpio/cnxk_gpio.h
+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.h
@@ -6,9 +6,10 @@
#define _CNXK_GPIO_H_
extern int cnxk_logtype_gpio;
+#define RTE_LOGTYPE_CNXK_GPIO cnxk_logtype_gpio
#define CNXK_GPIO_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cnxk_logtype_gpio, fmt "\n", ## args)
+ RTE_LOG_LINE(level, CNXK_GPIO, fmt, ## args)
struct cnxk_gpiochip;
diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
index f5f2455413..746f02bb10 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
@@ -13,12 +13,12 @@ extern int dpaa2_cmdif_logtype;
#define RTE_LOGTYPE_DPAA2_CMDIF dpaa2_cmdif_logtype
#define DPAA2_CMDIF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_cmdif_logtype, "dpaa2_cmdif: " \
- fmt "\n", ## args)
+ RTE_LOG_LINE(level, DPAA2_CMDIF, \
+ fmt, ## args)
#define DPAA2_CMDIF_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_cmdif_logtype, "dpaa2_cmdif: %s(): " \
- fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(DEBUG, DPAA2_CMDIF, "%s(): " \
+ fmt, __func__, ## args)
#define DPAA2_CMDIF_FUNC_TRACE() DPAA2_CMDIF_DEBUG(">>")
@@ -31,7 +31,7 @@ extern int dpaa2_cmdif_logtype;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA2_CMDIF_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_CMDIF, "dpaa2_cmdif: " fmt "\n", ## args)
+ RTE_LOG_DP_LINE(level, DPAA2_CMDIF, fmt, ## args)
#define DPAA2_CMDIF_DP_DEBUG(fmt, args...) \
DPAA2_CMDIF_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 0fb66cbaae..973d83f6e9 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -6,11 +6,12 @@
#define _IFPGA_RAWDEV_H_
extern int ifpga_rawdev_logtype;
+#define RTE_LOGTYPE_IFPGA_RAWDEV ifpga_rawdev_logtype
#define IFPGA_RAWDEV_NAME_FMT "IFPGA:%02x:%02x.%x"
#define IFPGA_RAWDEV_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, IFPGA_RAWDEV, "%s(): " fmt, \
__func__, ##args)
#define IFPGA_RAWDEV_PMD_FUNC_TRACE() IFPGA_RAWDEV_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/raw/ntb/ntb.h b/drivers/raw/ntb/ntb.h
index 563ceddf18..784e6baa9b 100644
--- a/drivers/raw/ntb/ntb.h
+++ b/drivers/raw/ntb/ntb.h
@@ -8,9 +8,10 @@
#include <stdbool.h>
extern int ntb_logtype;
+#define RTE_LOGTYPE_NTB ntb_logtype
#define NTB_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ntb_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, NTB, "%s(): " fmt, \
__func__, ##args)
/* Vendor ID */
diff --git a/drivers/raw/skeleton/skeleton_rawdev.h b/drivers/raw/skeleton/skeleton_rawdev.h
index c3f92e72ab..9e853633f0 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.h
+++ b/drivers/raw/skeleton/skeleton_rawdev.h
@@ -8,9 +8,10 @@
#include <rte_rawdev.h>
extern int skeleton_pmd_logtype;
+#define RTE_LOGTYPE_SKELETON_PMD skeleton_pmd_logtype
#define SKELETON_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_pmd_logtype, "%s(): " fmt "\n", \
+ RTE_LOG_LINE(level, SKELETON_PMD, "%s(): " fmt, \
__func__, ##args)
#define SKELETON_PMD_FUNC_TRACE() SKELETON_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index b7a7f623aa..00b77284d8 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -19,7 +19,7 @@
#define TEST_DEV_NAME "rawdev_skeleton"
#define SKELDEV_LOGS(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_pmd_logtype, fmt "\n", \
+ RTE_LOG_LINE(level, SKELETON_PMD, fmt, \
##args)
#define SKELDEV_TEST_INFO(fmt, args...) \
diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c
index 8479172bfa..54067f94aa 100644
--- a/drivers/vdpa/ifc/base/ifcvf.c
+++ b/drivers/vdpa/ifc/base/ifcvf.c
@@ -224,10 +224,10 @@ ifcvf_enable_mq(struct ifcvf_hw *hw)
if (mq_cfg) {
if (hw->device_type == IFCVF_BLK) {
*(u32 *)mq_cfg = nr_queue;
- RTE_LOG(INFO, IFCVF_VDPA, "%d queues are enabled\n", nr_queue);
+ RTE_LOG_LINE(INFO, IFCVF_VDPA, "%d queues are enabled", nr_queue);
} else {
*(u32 *)mq_cfg = nr_queue / 2;
- RTE_LOG(INFO, IFCVF_VDPA, "%d queue pairs are enabled\n",
+ RTE_LOG_LINE(INFO, IFCVF_VDPA, "%d queue pairs are enabled",
nr_queue / 2);
}
}
@@ -246,7 +246,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i)
cfg = hw->common_cfg;
if (!cfg) {
- RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n");
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.");
return -1;
}
@@ -258,7 +258,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i)
IFCVF_WRITE_REG16(i + 1, &cfg->queue_msix_vector);
msix_vector = IFCVF_READ_REG16(&cfg->queue_msix_vector);
if (msix_vector == IFCVF_MSI_NO_VECTOR) {
- RTE_LOG(ERR, IFCVF_VDPA, "queue %d, msix vec alloc failed\n",
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "queue %d, msix vec alloc failed",
i);
return -1;
}
@@ -307,7 +307,7 @@ ifcvf_disable_vring_hw(struct ifcvf_hw *hw, int i)
cfg = hw->common_cfg;
if (!cfg) {
- RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n");
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.");
return;
}
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 2958368813..8b61da5968 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -33,9 +33,10 @@
#define MIN(v1, v2) ((v1) < (v2) ? (v1) : (v2))
RTE_LOG_REGISTER(ifcvf_vdpa_logtype, pmd.vdpa.ifcvf, NOTICE);
+#define RTE_LOGTYPE_IFCVF_VDPA ifcvf_vdpa_logtype
#define DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifcvf_vdpa_logtype, \
- "IFCVF %s(): " fmt "\n", __func__, ##args)
+ RTE_LOG_LINE(level, IFCVF_VDPA, \
+ "%s(): " fmt, __func__, ##args)
#define IFCVF_USED_RING_LEN(size) \
((size) * sizeof(struct vring_used_elem) + sizeof(uint16_t) * 3)
diff --git a/drivers/vdpa/nfp/nfp_vdpa_log.h b/drivers/vdpa/nfp/nfp_vdpa_log.h
index cf342329b1..e2b163ca7e 100644
--- a/drivers/vdpa/nfp/nfp_vdpa_log.h
+++ b/drivers/vdpa/nfp/nfp_vdpa_log.h
@@ -9,13 +9,15 @@
#include <rte_log.h>
extern int nfp_logtype_vdpa;
+#define RTE_LOGTYPE_NFP_VDPA nfp_logtype_vdpa
#define DRV_VDPA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_vdpa, \
- "NFP_VDPA: %s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_VDPA, \
+ "%s(): " fmt, __func__, ## args)
extern int nfp_logtype_core;
+#define RTE_LOGTYPE_NFP_CORE nfp_logtype_core
#define DRV_CORE_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_core, \
- "NFP_CORE: %s(): " fmt "\n", __func__, ## args)
+ RTE_LOG_LINE(level, NFP_CORE, \
+ "%s(): " fmt, __func__, ## args)
#endif /* __NFP_VDPA_LOG_H__ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 04/11] net/sfc: fix driver logtype token
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
@ 2024-09-08 8:35 ` Andrew Rybchenko
0 siblings, 0 replies; 47+ messages in thread
From: Andrew Rybchenko @ 2024-09-08 8:35 UTC (permalink / raw)
To: David Marchand, dev
On 9/7/24 17:54, David Marchand wrote:
> The net/sfc driver logtype was registered under pmd.net.sfc."driver".
>
> Fixes: 0f39f32482a1 ("net/sfc: remove use of EAL logtype")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/sfc/sfc_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 24686a1eaf..3480a51642 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
> @@ -3616,4 +3616,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx,
> SFC_KVARG_FW_VARIANT "=" SFC_KVARG_VALUES_FW_VARIANT " "
> SFC_KVARG_RXD_WAIT_TIMEOUT_NS "=<long> "
> SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long>");
> -RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, "driver", NOTICE);
> +RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, driver, NOTICE);
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 05/11] drivers: reuse default logtype for SFC drivers
2024-09-07 14:54 ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers David Marchand
@ 2024-09-08 8:44 ` Andrew Rybchenko
0 siblings, 0 replies; 47+ messages in thread
From: Andrew Rybchenko @ 2024-09-08 8:44 UTC (permalink / raw)
To: David Marchand, dev; +Cc: Vijay Kumar Srivastava
On 9/7/24 17:54, David Marchand wrote:
> Nothing is fixed here, just reuse the value coming from the build
> framework rather than use a fixed string that may get wrong in the
> future.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 11/11] drivers: use per line logging in helpers
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
@ 2024-09-08 8:55 ` Andrew Rybchenko
2024-09-09 6:55 ` David Marchand
2024-09-09 1:19 ` fengchengwen
2024-09-10 10:56 ` David Marchand
2 siblings, 1 reply; 47+ messages in thread
From: Andrew Rybchenko @ 2024-09-08 8:55 UTC (permalink / raw)
To: David Marchand, dev
Cc: Thomas Monjalon, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Parav Pandit, Xueming Li, Nipun Gupta,
Nikhil Agarwal, Sachin Saxena, Rosen Xu, Tomasz Duszynski,
Chengwen Feng, Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Chaoyong He, Nagadheeraj Rottela, Srikanth Jampala,
Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang, Ashish Gupta,
Zhangfei Gao, Sunila Sahu, Jack Bond-Preston, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Michael Shamis, Liron Himi,
Jay Zhou, Bruce Richardson, Kevin Laatz, Conor Walsh,
Gowrishankar Muthukrishnan, Vidya Sagar Velumuri,
Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma,
Peter Mccarthy, Harry van Haaren, Elena Agostini,
John W. Linville, Ciara Loftus, Maryam Tahhan, Igor Russkikh,
Steven Webster, Matt Peters, Selwin Sebastian, Julien Aube,
Somnath Kotur, Wathsala Vithanage, Konstantin Ananyev,
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
On 9/7/24 17:54, David Marchand wrote:
> Use RTE_LOG_LINE in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
[snip]
> diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
> index 1519ebdc17..b41ef3490b 100644
> --- a/drivers/common/sfc_efx/sfc_efx_log.h
> +++ b/drivers/common/sfc_efx/sfc_efx_log.h
> @@ -12,11 +12,10 @@
>
> /** Generic driver log type */
> extern int sfc_efx_logtype;
> +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
>
> /** Log message, add a prefix and a line break */
> #define SFC_EFX_LOG(level, ...) \
> - rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
> - RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
Is "sfc_efx: " prefix dropped intentionally? Or should
RTE_LOG_LINE_PREFIX be used?
> - RTE_FMT_TAIL(__VA_ARGS__ ,)))
> + RTE_LOG_LINE(level, SFC_EFX, ## __VA_ARGS__)
>
> #endif /* _SFC_EFX_LOG_H_ */
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 09/11] drivers: remove redundant newline from logs
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
@ 2024-09-09 1:09 ` fengchengwen
0 siblings, 0 replies; 47+ messages in thread
From: fengchengwen @ 2024-09-09 1:09 UTC (permalink / raw)
To: David Marchand, dev
Cc: stable, Nicolas Chautru, Gagandeep Singh, Hemant Agrawal,
Nipun Gupta, Nikhil Agarwal, Sachin Saxena, Rosen Xu, Long Li,
Wei Hu, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
Satha Rao, Harman Kalra, Anoob Joseph, Jingjing Wu, Kai Ji,
Lee Daly, Pablo de Lara, Fan Zhang, Ashish Gupta, Sunila Sahu,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Sunil Uttarwar,
Ankur Dwivedi, Tejasree Kondoj, Zhangfei Gao, Jay Zhou,
Bruce Richardson, Kevin Laatz, Conor Walsh, Pavan Nikhilesh,
Shijith Thotton, Jerin Jacob, Liang Ma, Peter Mccarthy,
Harry van Haaren, Srikanth Yalavarthi, Igor Russkikh,
Selwin Sebastian, Julien Aube, Apeksha Gupta, John Daley,
Hyong Youb Kim, Gaetan Rivet, Jeroen de Borst, Rushil Gupta,
Joshua Washington, Ziyang Xuan, Xiaoyun Wang, Jie Hai,
Yisen Zhuang, Jakub Grajciar, Matan Azrad, Viacheslav Ovsiienko,
Jiawen Wu, Vamsi Attunuru, Devendra Singh Rawat, Alok Prasad,
Maciej Czekaj, Jian Wang, Maxime Coquelin, Chenbo Xia,
Jochen Behrens, Liron Himi, Chaoyong He
for drivers/dma/hisilicon/ and drivers/net/hns3/
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 2024/9/7 22:54, David Marchand wrote:
> Fix places where two newline characters may be logged.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 11/11] drivers: use per line logging in helpers
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-08 8:55 ` Andrew Rybchenko
@ 2024-09-09 1:19 ` fengchengwen
2024-09-10 10:56 ` David Marchand
2 siblings, 0 replies; 47+ messages in thread
From: fengchengwen @ 2024-09-09 1:19 UTC (permalink / raw)
To: David Marchand, dev
Cc: Thomas Monjalon, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Parav Pandit, Xueming Li, Nipun Gupta,
Nikhil Agarwal, Sachin Saxena, Rosen Xu, Tomasz Duszynski,
Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Chaoyong He, Nagadheeraj Rottela, Srikanth Jampala,
Kai Ji, Andrew Rybchenko, Lee Daly, Pablo de Lara, Fan Zhang,
Ashish Gupta, Zhangfei Gao, Sunila Sahu, Jack Bond-Preston,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Michael Shamis,
Liron Himi, Jay Zhou, Bruce Richardson, Kevin Laatz, Conor Walsh,
Gowrishankar Muthukrishnan, Vidya Sagar Velumuri,
Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma,
Peter Mccarthy, Harry van Haaren, Elena Agostini,
John W. Linville, Ciara Loftus, Maryam Tahhan, Igor Russkikh,
Steven Webster, Matt Peters, Selwin Sebastian, Julien Aube,
Somnath Kotur, Wathsala Vithanage, Konstantin Ananyev,
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
for drivers/dma/hisilicon/ and drivers/net/hns3/
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 2024/9/7 22:54, David Marchand wrote:
> Use RTE_LOG_LINE in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
^ permalink raw reply [flat|nested] 47+ messages in thread
* RE: [PATCH 07/11] net/txgbe: move wrapper to base driver
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
@ 2024-09-09 6:18 ` Jiawen Wu
2024-09-09 6:50 ` David Marchand
0 siblings, 1 reply; 47+ messages in thread
From: Jiawen Wu @ 2024-09-09 6:18 UTC (permalink / raw)
To: 'David Marchand', dev; +Cc: 'Jian Wang'
On Sat, Sep 7, 2024 10:54 PM, David Marchand wrote:
> BP_LOG() is only used in the base driver.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
> drivers/net/txgbe/txgbe_logs.h | 7 -------
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
> index 62d16a6abb..91c8abf12e 100644
> --- a/drivers/net/txgbe/base/txgbe_osdep.h
> +++ b/drivers/net/txgbe/base/txgbe_osdep.h
> @@ -28,6 +28,14 @@
> #define TMZ_VADDR(mz) ((mz)->addr)
> #define TDEV_NAME(eth_dev) ((eth_dev)->device->name)
>
> +extern int txgbe_logtype_bp;
> +#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
> +#define BP_LOG(fmt, ...) \
> + RTE_LOG(DEBUG, TXGBE_BP, \
> + "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> + usec_stamp() / 1000000, usec_stamp() % 1000000, \
> + __func__, __LINE__, ## __VA_ARGS__)
> +
> #define ASSERT(x) do { \
> if (!(x)) \
> PMD_DRV_LOG(ERR, "TXGBE: %d", x); \
> diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
> index 74f49ab9ef..b5a5a9233f 100644
> --- a/drivers/net/txgbe/txgbe_logs.h
> +++ b/drivers/net/txgbe/txgbe_logs.h
> @@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
> #define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
> #define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
>
> -extern int txgbe_logtype_bp;
> -#define BP_LOG(fmt, args...) \
> - rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
> - "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> - usec_stamp() / 1000000, usec_stamp() % 1000000, \
> - __func__, __LINE__, ##args)
> -
> #endif /* _TXGBE_LOGS_H_ */
> --
> 2.46.0
>
Hi,
Does this have to change? It looks a little weird.
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 07/11] net/txgbe: move wrapper to base driver
2024-09-09 6:18 ` Jiawen Wu
@ 2024-09-09 6:50 ` David Marchand
2024-09-09 7:23 ` Jiawen Wu
0 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-09 6:50 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dev, Jian Wang
On Mon, Sep 9, 2024 at 8:18 AM Jiawen Wu <jiawenwu@trustnetic.com> wrote:
>
> On Sat, Sep 7, 2024 10:54 PM, David Marchand wrote:
> > BP_LOG() is only used in the base driver.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
> > drivers/net/txgbe/txgbe_logs.h | 7 -------
> > 2 files changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
> > index 62d16a6abb..91c8abf12e 100644
> > --- a/drivers/net/txgbe/base/txgbe_osdep.h
> > +++ b/drivers/net/txgbe/base/txgbe_osdep.h
> > @@ -28,6 +28,14 @@
> > #define TMZ_VADDR(mz) ((mz)->addr)
> > #define TDEV_NAME(eth_dev) ((eth_dev)->device->name)
> >
> > +extern int txgbe_logtype_bp;
> > +#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
> > +#define BP_LOG(fmt, ...) \
> > + RTE_LOG(DEBUG, TXGBE_BP, \
> > + "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> > + usec_stamp() / 1000000, usec_stamp() % 1000000, \
> > + __func__, __LINE__, ## __VA_ARGS__)
> > +
> > #define ASSERT(x) do { \
> > if (!(x)) \
> > PMD_DRV_LOG(ERR, "TXGBE: %d", x); \
> > diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
> > index 74f49ab9ef..b5a5a9233f 100644
> > --- a/drivers/net/txgbe/txgbe_logs.h
> > +++ b/drivers/net/txgbe/txgbe_logs.h
> > @@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
> > #define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
> > #define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
> >
> > -extern int txgbe_logtype_bp;
> > -#define BP_LOG(fmt, args...) \
> > - rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
> > - "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> > - usec_stamp() / 1000000, usec_stamp() % 1000000, \
> > - __func__, __LINE__, ##args)
> > -
> > #endif /* _TXGBE_LOGS_H_ */
> > --
> > 2.46.0
> >
>
> Hi,
>
> Does this have to change? It looks a little weird.
Can you be more specific about the part that you don't like?
There is a change in behavior, I agree: messages would now be prefixed
with the logtype, here TXGBE_BP.
I can revert this part if you prefer.
As for moving the macro, in all other drivers in DPDK, the osdep.h
header provides helpers for the base driver code, so it is the right
location.
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 11/11] drivers: use per line logging in helpers
2024-09-08 8:55 ` Andrew Rybchenko
@ 2024-09-09 6:55 ` David Marchand
2024-09-09 7:23 ` Andrew Rybchenko
0 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-09 6:55 UTC (permalink / raw)
To: Andrew Rybchenko
Cc: dev, Thomas Monjalon, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Parav Pandit, Xueming Li, Nipun Gupta,
Nikhil Agarwal, Sachin Saxena, Rosen Xu, Tomasz Duszynski,
Chengwen Feng, Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Chaoyong He, Nagadheeraj Rottela, Srikanth Jampala,
Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang, Ashish Gupta,
Zhangfei Gao, Sunila Sahu, Jack Bond-Preston, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Michael Shamis, Liron Himi,
Jay Zhou, Bruce Richardson, Kevin Laatz, Conor Walsh,
Gowrishankar Muthukrishnan, Vidya Sagar Velumuri,
Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma,
Peter Mccarthy, Harry van Haaren, Elena Agostini,
John W. Linville, Ciara Loftus, Maryam Tahhan, Igor Russkikh,
Steven Webster, Matt Peters, Selwin Sebastian, Julien Aube,
Somnath Kotur, Wathsala Vithanage, Konstantin Ananyev,
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
On Sun, Sep 8, 2024 at 10:55 AM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> On 9/7/24 17:54, David Marchand wrote:
> > Use RTE_LOG_LINE in existing macros that append a \n.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> [snip]
>
> > diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
> > index 1519ebdc17..b41ef3490b 100644
> > --- a/drivers/common/sfc_efx/sfc_efx_log.h
> > +++ b/drivers/common/sfc_efx/sfc_efx_log.h
> > @@ -12,11 +12,10 @@
> >
> > /** Generic driver log type */
> > extern int sfc_efx_logtype;
> > +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
> >
> > /** Log message, add a prefix and a line break */
> > #define SFC_EFX_LOG(level, ...) \
> > - rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
> > - RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
>
> Is "sfc_efx: " prefix dropped intentionally? Or should
> RTE_LOG_LINE_PREFIX be used?
By moving to the RTE_LOG macro (and friends), a prefix is
automatically appended via the log type.
#define RTE_LOG(l, t, ...) \
rte_log(RTE_LOG_ ## l, \
RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
So here, the logs prefix is not dropped, but changed from sfc_efx: to SFC_EFX:
It is possible to keep it unchanged by defining RTE_LOGTYPE_sfc_efx is
you want to stick to it.
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
* RE: [PATCH 07/11] net/txgbe: move wrapper to base driver
2024-09-09 6:50 ` David Marchand
@ 2024-09-09 7:23 ` Jiawen Wu
0 siblings, 0 replies; 47+ messages in thread
From: Jiawen Wu @ 2024-09-09 7:23 UTC (permalink / raw)
To: 'David Marchand'; +Cc: dev, 'Jian Wang'
On Mon, Sep 9, 2024 2:51 PM, David Marchand wrote:
> On Mon, Sep 9, 2024 at 8:18 AM Jiawen Wu <jiawenwu@trustnetic.com> wrote:
> >
> > On Sat, Sep 7, 2024 10:54 PM, David Marchand wrote:
> > > BP_LOG() is only used in the base driver.
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > ---
> > > drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
> > > drivers/net/txgbe/txgbe_logs.h | 7 -------
> > > 2 files changed, 8 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
> > > index 62d16a6abb..91c8abf12e 100644
> > > --- a/drivers/net/txgbe/base/txgbe_osdep.h
> > > +++ b/drivers/net/txgbe/base/txgbe_osdep.h
> > > @@ -28,6 +28,14 @@
> > > #define TMZ_VADDR(mz) ((mz)->addr)
> > > #define TDEV_NAME(eth_dev) ((eth_dev)->device->name)
> > >
> > > +extern int txgbe_logtype_bp;
> > > +#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
> > > +#define BP_LOG(fmt, ...) \
> > > + RTE_LOG(DEBUG, TXGBE_BP, \
> > > + "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> > > + usec_stamp() / 1000000, usec_stamp() % 1000000, \
> > > + __func__, __LINE__, ## __VA_ARGS__)
> > > +
> > > #define ASSERT(x) do { \
> > > if (!(x)) \
> > > PMD_DRV_LOG(ERR, "TXGBE: %d", x); \
> > > diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
> > > index 74f49ab9ef..b5a5a9233f 100644
> > > --- a/drivers/net/txgbe/txgbe_logs.h
> > > +++ b/drivers/net/txgbe/txgbe_logs.h
> > > @@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
> > > #define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
> > > #define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
> > >
> > > -extern int txgbe_logtype_bp;
> > > -#define BP_LOG(fmt, args...) \
> > > - rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
> > > - "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
> > > - usec_stamp() / 1000000, usec_stamp() % 1000000, \
> > > - __func__, __LINE__, ##args)
> > > -
> > > #endif /* _TXGBE_LOGS_H_ */
> > > --
> > > 2.46.0
> > >
> >
> > Hi,
> >
> > Does this have to change? It looks a little weird.
>
> Can you be more specific about the part that you don't like?
Just for defining log macro in other .h file.
> There is a change in behavior, I agree: messages would now be prefixed
> with the logtype, here TXGBE_BP.
> I can revert this part if you prefer.
>
> As for moving the macro, in all other drivers in DPDK, the osdep.h
> header provides helpers for the base driver code, so it is the right
> location.
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 11/11] drivers: use per line logging in helpers
2024-09-09 6:55 ` David Marchand
@ 2024-09-09 7:23 ` Andrew Rybchenko
0 siblings, 0 replies; 47+ messages in thread
From: Andrew Rybchenko @ 2024-09-09 7:23 UTC (permalink / raw)
To: David Marchand
Cc: dev, Thomas Monjalon, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Parav Pandit, Xueming Li, Nipun Gupta,
Nikhil Agarwal, Sachin Saxena, Rosen Xu, Tomasz Duszynski,
Chengwen Feng, Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Chaoyong He, Nagadheeraj Rottela, Srikanth Jampala,
Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang, Ashish Gupta,
Zhangfei Gao, Sunila Sahu, Jack Bond-Preston, Ajit Khaparde,
Raveendra Padasalagi, Vikas Gupta, Michael Shamis, Liron Himi,
Jay Zhou, Bruce Richardson, Kevin Laatz, Conor Walsh,
Gowrishankar Muthukrishnan, Vidya Sagar Velumuri,
Mattias Rönnblom, Jerin Jacob, Pavan Nikhilesh, Liang Ma,
Peter Mccarthy, Harry van Haaren, Elena Agostini,
John W. Linville, Ciara Loftus, Maryam Tahhan, Igor Russkikh,
Steven Webster, Matt Peters, Selwin Sebastian, Julien Aube,
Somnath Kotur, Wathsala Vithanage, Konstantin Ananyev,
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
On 9/9/24 09:55, David Marchand wrote:
> On Sun, Sep 8, 2024 at 10:55 AM Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru> wrote:
>>
>> On 9/7/24 17:54, David Marchand wrote:
>>> Use RTE_LOG_LINE in existing macros that append a \n.
>>>
>>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>>
>> [snip]
>>
>>> diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
>>> index 1519ebdc17..b41ef3490b 100644
>>> --- a/drivers/common/sfc_efx/sfc_efx_log.h
>>> +++ b/drivers/common/sfc_efx/sfc_efx_log.h
>>> @@ -12,11 +12,10 @@
>>>
>>> /** Generic driver log type */
>>> extern int sfc_efx_logtype;
>>> +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
>>>
>>> /** Log message, add a prefix and a line break */
>>> #define SFC_EFX_LOG(level, ...) \
>>> - rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
>>> - RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
>>
>> Is "sfc_efx: " prefix dropped intentionally? Or should
>> RTE_LOG_LINE_PREFIX be used?
>
> By moving to the RTE_LOG macro (and friends), a prefix is
> automatically appended via the log type.
> #define RTE_LOG(l, t, ...) \
> rte_log(RTE_LOG_ ## l, \
> RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
>
> So here, the logs prefix is not dropped, but changed from sfc_efx: to SFC_EFX:
>
> It is possible to keep it unchanged by defining RTE_LOGTYPE_sfc_efx is
> you want to stick to it.
Many thanks for explanation. I've lost it from my view on reviewing.
for common/sfc_efx:
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH 11/11] drivers: use per line logging in helpers
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-08 8:55 ` Andrew Rybchenko
2024-09-09 1:19 ` fengchengwen
@ 2024-09-10 10:56 ` David Marchand
2 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-10 10:56 UTC (permalink / raw)
To: Harman Kalra, Jerin Jacob Kollanukkaran
Cc: dev, Thomas Monjalon, Ferruh Yigit, Bruce Richardson, Stephen Hemminger
On Sat, Sep 7, 2024 at 4:56 PM David Marchand <david.marchand@redhat.com> wrote:
>
> Use RTE_LOG_LINE in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
[snip]
> diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
> index 7d5dd91a77..ea9788757e 100644
> --- a/drivers/net/octeon_ep/otx_ep_common.h
> +++ b/drivers/net/octeon_ep/otx_ep_common.h
> @@ -68,18 +68,18 @@
> #define OTX_CUST_DATA_LEN 0
>
> #define otx_ep_info(fmt, args...) \
> - rte_log(RTE_LOG_INFO, otx_net_ep_logtype, \
> - "%s():%u " fmt "\n", \
> + RTE_LOG_LINE(INFO, OTX_NET_EP, \
> + "%s():%u " fmt, \
> __func__, __LINE__, ##args)
>
> #define otx_ep_err(fmt, args...) \
> - rte_log(RTE_LOG_ERR, otx_net_ep_logtype, \
> - "%s():%u " fmt "\n", \
> + RTE_LOG_LINE(ERR, OTX_NET_EP, \
> + "%s():%u " fmt, \
> __func__, __LINE__, ##args)
>
> #define otx_ep_dbg(fmt, args...) \
> - rte_log(RTE_LOG_DEBUG, otx_net_ep_logtype, \
> - "%s():%u " fmt "\n", \
> + RTE_LOG_LINE(DEBUG, OTX_NET_EP, \
> + "%s():%u " fmt, \
> __func__, __LINE__, ##args)
>
> /* IO Access */
I am facing a strange warning with gcc 13 on Fedora 39 when compiler
optimisations (O3) are on.
Looking at the CI reports, some other versions of gcc seem affected.
On the other hand, O0, O1, O2 are fine, at least with my gcc.
Here is the warning:
ccache cc -Idrivers/libtmp_rte_net_octeon_ep.a.p -Idrivers
-I../drivers -Idrivers/net/octeon_ep -I../drivers/net/octeon_ep
-Ilib/ethdev -I../lib/ethdev -I. -I.. -Iconfig -I../config
-Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include
-I../lib/eal/linux/include -Ilib/eal/x86/include
-I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common
-Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log
-I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry
-I../lib/telemetry -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf
-Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter
-I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci
-I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev
-I../drivers/bus/vdev -fdiagnostics-color=always
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11
-O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat
-Wformat-nonliteral -Wformat-security -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition
-Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned
-Wno-missing-field-initializers -Wno-zero-length-bounds -D_GNU_SOURCE
-fPIC -march=native -mrtm -DALLOW_EXPERIMENTAL_API
-DALLOW_INTERNAL_API -Wno-format-truncation -DCC_AVX2_SUPPORT
-Wno-strict-aliasing -flax-vector-conversions
-DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.octeon_ep -MD -MQ
drivers/libtmp_rte_net_octeon_ep.a.p/net_octeon_ep_otx_ep_ethdev.c.o
-MF drivers/libtmp_rte_net_octeon_ep.a.p/net_octeon_ep_otx_ep_ethdev.c.o.d
-o drivers/libtmp_rte_net_octeon_ep.a.p/net_octeon_ep_otx_ep_ethdev.c.o
-c ../drivers/net/octeon_ep/otx_ep_ethdev.c
../drivers/net/octeon_ep/otx_ep_ethdev.c: In function ‘otx_ep_dev_mtu_set’:
../drivers/net/octeon_ep/otx_ep_ethdev.c:200:12: error:
‘devinfo.max_mtu’ may be used uninitialized
[-Werror=maybe-uninitialized]
200 | if (mtu > devinfo.max_mtu) {
| ^
../drivers/net/octeon_ep/otx_ep_ethdev.c:186:33: note:
‘devinfo.max_mtu’ was declared here
186 | struct rte_eth_dev_info devinfo;
| ^~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
This warning only appears with the last patch of the series.
Looking at the code, it seems incorrect, as devinfo.max_mtu is
supposed to be initialised in otx_ep_dev_info_get() if this function
returns 0.
A minimum reproducer is (it can be tested on origin/main):
$ git diff
diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c
b/drivers/net/octeon_ep/otx_ep_ethdev.c
index c4a5a67c79..0a6dbcea0d 100644
--- a/drivers/net/octeon_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
@@ -135,7 +135,7 @@ otx_ep_dev_info_get(struct rte_eth_dev *eth_dev,
max_rx_pktlen = otx_ep_mbox_get_max_pkt_len(eth_dev);
if (!max_rx_pktlen) {
- otx_ep_err("Failed to get Max Rx packet length");
+ rte_log(RTE_LOG_ERR, otx_net_ep_logtype, "%u
%u\n%.0s", 1, 1, "");
return -EINVAL;
}
(FYI, the %.0s trick comes from expanding RTE_FMT())
After various tries, it seems hitting this error requires passing (at
least) 2 arguments in addition to %.0s in the format string.
Another observation is that removing __rte_cold from rte_log()
declaration makes the warning go away.
I am a bit puzzled, it smells like a compiler (optimisation) bug to me.
A workaround is to memset(&devinfo, 0) or call rte_eth_dev_info_get()
in otx_ep_dev_mtu_set.
But on the other hand we may have a deeper issue with RTE_FMT()...
Opinions?
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 00/14] Use RTE_LOG_LINE in drivers
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
` (10 preceding siblings ...)
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
` (16 more replies)
11 siblings, 17 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev
This is a continuation of the cleanup effort in logging macros.
As a reminder of what this series is about, RTE_LOG_LINE() has been
introduced to check that the format string does not contain a trailing \n.
The goal was to prevent from:
- introducing multilines log messages (ugly and unhelpful for lambda
users),
- introducing double \n in logs,
- introducing missing \n in logs,
I have built/maintained this series for fixing drivers/ since the
beginning of the year and I hope we can merge this series early in
24.11.
Some drivers are not converted because of multiple inconsistencies.
Those may be fixed later.
As for the changes on lib/, new macros have been introduced so that
backports trigger a build error and force the backport to adjust the
patches containing logs accordingly.
Most of the changes have been done with some scripting, but it is likely
there are some errors and I hope driver maintainers will review in
depth.
A check is added for drivers/ in the hope that new drivers don't
introduce more mess.
Yet, sometimes it is not possible to fix macros (a good example
is base/ drivers code...), so the check skips *osdep.h headers where
calls to RTE_LOG() may be accepted.
--
David Marchand
Changes since v1:
- added a fix on event/dlb2 base/ driver logs,
- converted event/dsw to dynamic logtype,
- converted event/dlb2, net/bonding, event/dsw to RTE_LOG_LINE,
- added workaround in net/octeon_ep for issue report at
https://inbox.dpdk.org/dev/CAJFAV8wKcNnu2X4K4x39339jMX1N5Vr5Nh5iC_MOCNr--Hayog@mail.gmail.com/T/#u
- when possible used RTE_LOG_LINE_PREFIX in last patch,
David Marchand (14):
devtools: fix forbidden token check with multiple files
devtools: report all warnings in forbidden token check
net/dpaa: remove broken debug macros
net/sfc: fix driver logtype token
drivers: reuse default logtype for SFC drivers
drivers: move log wrappers to Intel base drivers
net/txgbe: move wrapper to base driver
event/dlb2: fix base driver logs
event/dsw: use a dynamic logtype
drivers: replace logging helpers
drivers: remove redundant newline from logs
drivers: split multilines log messages
net/octeon_ep: avoid warning on uninitialized variable
drivers: use per line logging in helpers
devtools/check-forbidden-tokens.awk | 15 +-
devtools/checkpatches.sh | 11 +-
drivers/baseband/acc/acc100_pmd.h | 12 +-
drivers/baseband/acc/acc_common.h | 6 +-
drivers/baseband/acc/rte_acc100_pmd.c | 21 +-
drivers/baseband/acc/rte_vrb_pmd.c | 27 +-
drivers/baseband/acc/vrb_pmd.h | 12 +-
.../baseband/fpga_5gnr_fec/fpga_5gnr_fec.h | 15 +-
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 267 ++++----
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 37 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 4 +-
.../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 16 +-
drivers/baseband/null/bbdev_null.c | 5 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 10 +-
drivers/bus/auxiliary/private.h | 5 +-
drivers/bus/cdx/cdx_logs.h | 11 +-
drivers/bus/cdx/cdx_vfio.c | 8 +-
drivers/bus/dpaa/include/fman.h | 2 +-
drivers/bus/dpaa/rte_dpaa_logs.h | 10 +-
drivers/bus/fslmc/fslmc_bus.c | 8 +-
drivers/bus/fslmc/fslmc_logs.h | 11 +-
drivers/bus/fslmc/fslmc_vfio.c | 10 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/ifpga/ifpga_bus.c | 8 +-
drivers/bus/ifpga/ifpga_logs.h | 6 +-
drivers/bus/platform/platform.c | 28 +-
drivers/bus/platform/platform_params.c | 2 +-
drivers/bus/platform/private.h | 9 +-
drivers/bus/uacce/uacce.c | 6 +-
drivers/bus/vdev/vdev_logs.h | 6 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/private.h | 6 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/roc_dev.c | 2 +-
drivers/common/cnxk/roc_model.c | 2 +-
drivers/common/cnxk/roc_nix_ops.c | 20 +-
drivers/common/cnxk/roc_nix_tm.c | 2 +-
drivers/common/cnxk/roc_nix_tm_mark.c | 2 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_nix_tm_utils.c | 2 +-
drivers/common/cnxk/roc_platform.h | 46 +-
drivers/common/cnxk/roc_sso.c | 2 +-
drivers/common/cnxk/roc_tim.c | 2 +-
drivers/common/cpt/cpt_pmd_logs.h | 41 +-
drivers/common/cpt/cpt_ucode.h | 4 +-
drivers/common/dpaax/dpaax_logs.h | 10 +-
drivers/common/iavf/iavf_osdep.h | 8 +-
drivers/common/idpf/base/idpf_osdep.h | 10 +-
drivers/common/idpf/idpf_common_logs.h | 32 +-
drivers/common/nfp/nfp_common_log.h | 6 +-
drivers/common/nitrox/nitrox_hal.c | 4 +-
drivers/common/nitrox/nitrox_logs.h | 8 +-
drivers/common/nitrox/nitrox_qp.c | 10 +-
drivers/common/octeontx/octeontx_mbox.c | 4 +-
drivers/common/octeontx/octeontx_mbox.h | 7 +-
drivers/common/qat/qat_logs.h | 12 +-
drivers/common/qat/qat_pf2vf.c | 4 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/common/sfc_efx/sfc_efx_log.h | 5 +-
drivers/compress/isal/isal_compress_pmd.c | 78 +--
.../compress/isal/isal_compress_pmd_private.h | 6 +-
drivers/compress/nitrox/nitrox_comp.c | 44 +-
drivers/compress/nitrox/nitrox_comp_reqmgr.c | 170 +++---
drivers/compress/octeontx/otx_zip.h | 19 +-
drivers/compress/octeontx/otx_zip_pmd.c | 14 +-
.../compress/uadk/uadk_compress_pmd_private.h | 8 +-
drivers/compress/zlib/zlib_pmd.c | 26 +-
drivers/compress/zlib/zlib_pmd_ops.c | 4 +-
drivers/compress/zlib/zlib_pmd_private.h | 6 +-
drivers/crypto/armv8/armv8_pmd_private.h | 29 +-
drivers/crypto/bcmfs/bcmfs_logs.h | 12 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_session.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 39 +-
drivers/crypto/caam_jr/caam_jr_log.h | 14 +-
drivers/crypto/caam_jr/caam_jr_uio.c | 6 +-
drivers/crypto/ccp/ccp_dev.c | 2 +-
drivers/crypto/ccp/ccp_pmd_private.h | 19 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cnxk_se.h | 6 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 98 +--
drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 14 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 16 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 27 +-
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 14 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 6 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 4 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 9 +-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 28 +-
drivers/crypto/ipsec_mb/pmd_snow3g.c | 4 +-
drivers/crypto/mvsam/mrvl_pmd_private.h | 8 +-
drivers/crypto/nitrox/nitrox_sym.c | 54 +-
drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 12 +-
drivers/crypto/null/null_crypto_pmd_private.h | 8 +-
.../crypto/octeontx/otx_cryptodev_hw_access.h | 6 +-
drivers/crypto/openssl/openssl_pmd_private.h | 8 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 42 +-
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 44 +-
drivers/crypto/qat/qat_asym.c | 2 +-
drivers/crypto/qat/qat_sym_session.c | 12 +-
.../crypto/scheduler/scheduler_pmd_private.h | 7 +-
drivers/crypto/uadk/uadk_crypto_pmd.c | 8 +-
drivers/crypto/uadk/uadk_crypto_pmd_private.h | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 12 +-
drivers/crypto/virtio/virtio_logs.h | 36 +-
drivers/dma/dpaa/dpaa_qdma.c | 40 +-
drivers/dma/dpaa/dpaa_qdma_logs.h | 14 +-
drivers/dma/dpaa2/dpaa2_qdma.c | 10 +-
drivers/dma/dpaa2/dpaa2_qdma_logs.h | 14 +-
drivers/dma/hisilicon/hisi_dmadev.c | 35 +-
drivers/dma/idxd/idxd_common.c | 2 +-
drivers/dma/idxd/idxd_internal.h | 5 +-
drivers/dma/idxd/idxd_pci.c | 6 +-
drivers/dma/ioat/ioat_dmadev.c | 14 +-
drivers/dma/ioat/ioat_internal.h | 5 +-
drivers/dma/odm/odm.h | 19 +-
drivers/dma/odm/odm_dmadev.c | 12 +-
drivers/dma/skeleton/skeleton_dmadev.c | 6 +-
drivers/event/cnxk/cnxk_tim_evdev.c | 2 +-
drivers/event/dlb2/dlb2.c | 270 ++++-----
drivers/event/dlb2/dlb2_log.h | 11 +-
drivers/event/dlb2/dlb2_xstats.c | 6 +-
drivers/event/dlb2/pf/base/dlb2_osdep.h | 16 +-
drivers/event/dlb2/pf/base/dlb2_resource.c | 18 +-
drivers/event/dlb2/pf/dlb2_main.c | 52 +-
drivers/event/dlb2/pf/dlb2_pf.c | 24 +-
drivers/event/dpaa/dpaa_eventdev.c | 1 +
drivers/event/dpaa/dpaa_eventdev.h | 5 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 14 +-
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 11 +-
drivers/event/dsw/dsw_evdev.c | 1 +
drivers/event/dsw/dsw_evdev.h | 11 +-
drivers/event/dsw/dsw_event.c | 78 +--
drivers/event/octeontx/ssovf_evdev.h | 8 +-
drivers/event/octeontx/timvf_evdev.c | 2 +-
drivers/event/octeontx/timvf_evdev.h | 8 +-
drivers/event/opdl/opdl_evdev.c | 30 +-
drivers/event/opdl/opdl_log.h | 11 +-
drivers/event/opdl/opdl_test.c | 116 ++--
drivers/event/skeleton/skeleton_eventdev.h | 13 +-
drivers/event/sw/sw_evdev.c | 22 +-
drivers/event/sw/sw_evdev_log.h | 6 +-
drivers/event/sw/sw_evdev_xstats.c | 4 +-
drivers/gpu/cuda/common.h | 3 +-
drivers/mempool/dpaa/dpaa_mempool.h | 5 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 8 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 10 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 22 +-
drivers/mempool/octeontx/octeontx_pool_logs.h | 7 +-
.../mempool/octeontx/rte_mempool_octeontx.c | 6 +-
drivers/ml/cnxk/cn10k_ml_dev.c | 32 +-
drivers/ml/cnxk/cnxk_ml_ops.c | 20 +-
drivers/net/af_packet/rte_eth_af_packet.c | 12 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 212 +++----
drivers/net/atlantic/atl_logs.h | 22 +-
drivers/net/atlantic/atl_rxtx.c | 4 +-
drivers/net/atlantic/hw_atl/hw_atl_utils.c | 12 +-
drivers/net/avp/avp_ethdev.c | 155 +++--
drivers/net/avp/avp_logs.h | 17 +-
drivers/net/axgbe/axgbe_dev.c | 34 +-
drivers/net/axgbe/axgbe_ethdev.c | 130 ++--
drivers/net/axgbe/axgbe_i2c.c | 18 +-
drivers/net/axgbe/axgbe_logs.h | 12 +-
drivers/net/axgbe/axgbe_mdio.c | 36 +-
drivers/net/axgbe/axgbe_phy_impl.c | 50 +-
drivers/net/axgbe/axgbe_rxtx.c | 24 +-
drivers/net/bnx2x/bnx2x.c | 8 +-
drivers/net/bnx2x/bnx2x_logs.h | 42 +-
drivers/net/bnxt/bnxt.h | 8 +-
drivers/net/bnxt/bnxt_cpr.c | 66 +-
drivers/net/bnxt/bnxt_ethdev.c | 570 +++++++++---------
drivers/net/bnxt/bnxt_filter.c | 18 +-
drivers/net/bnxt/bnxt_flow.c | 126 ++--
drivers/net/bnxt/bnxt_hwrm.c | 328 +++++-----
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_reps.c | 86 +--
drivers/net/bnxt/bnxt_ring.c | 18 +-
drivers/net/bnxt/bnxt_rxq.c | 66 +-
drivers/net/bnxt/bnxt_rxr.c | 32 +-
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 6 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 6 +-
drivers/net/bnxt/bnxt_stats.c | 6 +-
drivers/net/bnxt/bnxt_txq.c | 16 +-
drivers/net/bnxt/bnxt_txr.c | 20 +-
drivers/net/bnxt/bnxt_vnic.c | 124 ++--
drivers/net/bnxt/rte_pmd_bnxt.c | 132 ++--
.../net/bnxt/tf_core/tf_em_hash_internal.c | 4 +-
drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 6 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 2 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 22 +-
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 2 +-
drivers/net/bonding/eth_bond_private.h | 6 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 112 ++--
drivers/net/bonding/rte_eth_bond_alb.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 4 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 10 +-
drivers/net/cnxk/cn10k_ethdev.c | 2 +-
drivers/net/cnxk/cn9k_ethdev.c | 2 +-
drivers/net/cnxk/cnxk_eswitch_devargs.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.c | 4 +-
drivers/net/cnxk/cnxk_ethdev_mcs.c | 14 +-
drivers/net/cnxk/cnxk_ethdev_ops.c | 2 +-
drivers/net/cnxk/cnxk_rep.c | 8 +-
drivers/net/cnxk/cnxk_rep.h | 2 +-
drivers/net/cpfl/cpfl_ethdev.c | 2 +-
drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
drivers/net/cpfl/cpfl_fxp_rule.c | 8 +-
drivers/net/cpfl/cpfl_logs.h | 16 +-
drivers/net/dpaa/dpaa_ethdev.c | 9 +-
drivers/net/dpaa/dpaa_ethdev.h | 9 +-
drivers/net/dpaa/fmlib/fm_ext.h | 21 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 16 +-
drivers/net/dpaa2/dpaa2_flow.c | 36 +-
drivers/net/dpaa2/dpaa2_mux.c | 4 +-
drivers/net/dpaa2/dpaa2_pmd_logs.h | 16 +-
drivers/net/dpaa2/dpaa2_recycle.c | 6 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 44 +-
drivers/net/dpaa2/dpaa2_sparser.c | 8 +-
drivers/net/dpaa2/dpaa2_tm.c | 24 +-
drivers/net/e1000/base/e1000_osdep.h | 2 +-
drivers/net/e1000/e1000_logs.h | 32 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/ena/ena_ethdev.c | 348 +++++------
drivers/net/ena/ena_logs.h | 28 +-
drivers/net/ena/ena_platform.h | 2 +-
drivers/net/ena/ena_rss.c | 76 +--
drivers/net/enetc/enetc_ethdev.c | 4 +-
drivers/net/enetc/enetc_logs.h | 16 +-
drivers/net/enetfec/enet_ethdev.c | 4 +-
drivers/net/enetfec/enet_pmd_logs.h | 11 +-
drivers/net/enetfec/enet_uio.c | 10 +-
drivers/net/enic/enic_compat.h | 6 +-
drivers/net/enic/enic_ethdev.c | 20 +-
drivers/net/enic/enic_flow.c | 20 +-
drivers/net/enic/enic_vf_representor.c | 16 +-
drivers/net/failsafe/failsafe_args.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/failsafe/failsafe_ether.c | 4 +-
drivers/net/failsafe/failsafe_intr.c | 6 +-
drivers/net/failsafe/failsafe_private.h | 7 +-
drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
drivers/net/fm10k/fm10k_logs.h | 31 +-
drivers/net/gve/base/gve_adminq.c | 4 +-
drivers/net/gve/gve_logs.h | 6 +-
drivers/net/gve/gve_rx.c | 2 +-
drivers/net/gve/gve_tx.c | 2 +-
drivers/net/hinic/base/hinic_compat.h | 9 +-
drivers/net/hinic/base/hinic_pmd_eqs.c | 2 +-
drivers/net/hinic/base/hinic_pmd_mbox.c | 6 +-
drivers/net/hinic/base/hinic_pmd_niccfg.c | 8 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 4 +-
drivers/net/hns3/hns3_dump.c | 12 +-
drivers/net/hns3/hns3_intr.c | 12 +-
drivers/net/hns3/hns3_logs.h | 41 +-
drivers/net/hns3/hns3_ptp.c | 2 +-
drivers/net/hns3/hns3_regs.c | 4 +-
drivers/net/i40e/base/i40e_osdep.h | 6 +-
drivers/net/i40e/i40e_ethdev.c | 51 +-
drivers/net/i40e/i40e_logs.h | 31 +-
drivers/net/i40e/i40e_pf.c | 8 +-
drivers/net/i40e/i40e_rxtx.c | 42 +-
drivers/net/iavf/iavf_ethdev.c | 12 +-
drivers/net/iavf/iavf_log.h | 31 +-
drivers/net/iavf/iavf_rxtx.c | 16 +-
drivers/net/ice/base/ice_osdep.h | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 4 +-
drivers/net/ice/ice_dcf_vf_representor.c | 14 +-
drivers/net/ice/ice_ethdev.c | 50 +-
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 8 +-
drivers/net/ice/ice_logs.h | 31 +-
drivers/net/ice/ice_rxtx.c | 18 +-
drivers/net/idpf/idpf_logs.h | 21 +-
drivers/net/igc/base/igc_osdep.h | 2 +-
drivers/net/igc/igc_logs.h | 24 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 23 +-
drivers/net/ipn3ke/ipn3ke_logs.h | 6 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 20 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 10 +-
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +-
drivers/net/ixgbe/ixgbe_ipsec.c | 24 +-
drivers/net/ixgbe/ixgbe_logs.h | 31 +-
drivers/net/ixgbe/ixgbe_pf.c | 18 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 8 +-
drivers/net/mana/mana.h | 15 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/memif/rte_eth_memif.h | 6 +-
drivers/net/mlx4/mlx4.c | 4 +-
drivers/net/mlx4/mlx4_mr.c | 18 +-
drivers/net/mlx4/mlx4_utils.h | 15 +-
drivers/net/mvneta/mvneta_ethdev.h | 6 +-
drivers/net/mvpp2/mrvl_ethdev.h | 6 +-
drivers/net/netvsc/hn_logs.h | 26 +-
drivers/net/netvsc/hn_rndis.c | 60 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/nfb/nfb.h | 6 +-
drivers/net/nfp/nfp_logs.h | 34 +-
drivers/net/ngbe/base/ngbe_hw.c | 2 +-
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
drivers/net/ngbe/ngbe_logs.h | 28 +-
drivers/net/ngbe/ngbe_pf.c | 10 +-
drivers/net/null/rte_eth_null.c | 6 +-
drivers/net/octeon_ep/cnxk_ep_tx.c | 2 +-
drivers/net/octeon_ep/cnxk_ep_vf.c | 12 +-
drivers/net/octeon_ep/otx2_ep_vf.c | 18 +-
drivers/net/octeon_ep/otx_ep_common.h | 23 +-
drivers/net/octeon_ep/otx_ep_ethdev.c | 83 +--
drivers/net/octeon_ep/otx_ep_mbox.c | 30 +-
drivers/net/octeon_ep/otx_ep_rxtx.c | 78 +--
drivers/net/octeon_ep/otx_ep_vf.c | 20 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 26 +-
drivers/net/octeontx/octeontx_logs.h | 21 +-
drivers/net/pcap/pcap_ethdev.c | 4 +-
drivers/net/pcap/pcap_osdep.h | 6 +-
drivers/net/pfe/pfe_ethdev.c | 22 +-
drivers/net/pfe/pfe_hif.c | 12 +-
drivers/net/pfe/pfe_hif_lib.c | 2 +-
drivers/net/pfe/pfe_logs.h | 11 +-
drivers/net/qede/qede_rxtx.c | 66 +-
drivers/net/ring/rte_eth_ring.c | 6 +-
drivers/net/sfc/sfc_ethdev.c | 2 +-
drivers/net/sfc/sfc_log.h | 7 +-
drivers/net/softnic/rte_eth_softnic.c | 6 +-
drivers/net/tap/tap_log.h | 6 +-
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/thunderx/nicvf_logs.h | 18 +-
drivers/net/txgbe/base/txgbe_osdep.h | 8 +
drivers/net/txgbe/txgbe_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ipsec.c | 24 +-
drivers/net/txgbe/txgbe_logs.h | 44 +-
drivers/net/txgbe/txgbe_pf.c | 20 +-
drivers/net/vdev_netvsc/vdev_netvsc.c | 7 +-
drivers/net/vhost/rte_eth_vhost.c | 75 +--
drivers/net/virtio/virtio_cvq.c | 19 +-
drivers/net/virtio/virtio_logs.h | 23 +-
drivers/net/virtio/virtio_user/vhost_vdpa.c | 2 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 32 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/net/vmxnet3/vmxnet3_logs.h | 29 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 6 +-
drivers/raw/cnxk_gpio/cnxk_gpio.h | 5 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 14 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 14 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 2 +-
drivers/raw/ifpga/ifpga_rawdev.c | 94 +--
drivers/raw/ifpga/ifpga_rawdev.h | 6 +-
drivers/raw/ntb/ntb.h | 6 +-
drivers/raw/skeleton/skeleton_rawdev.h | 6 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 5 +-
drivers/regex/cn9k/cn9k_regexdev.c | 2 +-
drivers/vdpa/ifc/base/ifcvf.c | 10 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 16 +-
drivers/vdpa/nfp/nfp_vdpa.c | 2 +-
drivers/vdpa/nfp/nfp_vdpa_log.h | 12 +-
drivers/vdpa/sfc/sfc_vdpa_log.h | 7 +-
364 files changed, 4061 insertions(+), 4206 deletions(-)
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 01/14] devtools: fix forbidden token check with multiple files
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 13:54 ` Thomas Monjalon
2024-09-12 8:26 ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
` (15 subsequent siblings)
16 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, Andrzej Ostruszka, Arnon Warshavsky
If a patch contains multiple files, it is possible to pass through the
check because the count of token mentions is not reset between file
evaluation.
Example with a fake patch:
$ cat toto.patch
--- a/drivers/plop1
+++ b/drivers/plop1
- RTE_LOG(
- RTE_LOG(
+ RTE_LOG(
--- a/drivers/plop2
+++ b/drivers/plop2
+ RTE_LOG(
$ awk -v FOLDERS='drivers' -v EXPRESSIONS='RTE_LOG\\('
-v MESSAGE='Prefer RTE_LOG_LINE'
-f devtools/check-forbidden-tokens.awk toto.patch
Besides, the expressions[] array is not used since commit
b467d38284b1 ("devtools: add explicit warnings for forbidden tokens").
Fixes: 42f4d724ec27 ("devtools: move awk script ckecking forbidden tokens")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 90d3a64f8e..807dad7f48 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -32,14 +32,11 @@ BEGIN {
for (i in deny_expr) {
forbidden_added = "^\\+.*" deny_expr[i];
forbidden_removed="^-.*" deny_expr[i];
- current = expressions[deny_expr[i]]
if ($0 ~ forbidden_added) {
- count = count + 1;
- expressions[deny_expr[i]] = current + 1
+ count = count + 1
}
if ($0 ~ forbidden_removed) {
- count = count - 1;
- expressions[deny_expr[i]] = current - 1
+ count = count - 1
}
}
}
@@ -55,6 +52,7 @@ BEGIN {
if (count > 0) {
exit;
}
+ count = 0
for (i in deny_folders) {
re = "^\\+\\+\\+ b/" deny_folders[i];
if ($0 ~ re) {
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 02/14] devtools: report all warnings in forbidden token check
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-12 8:26 ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 14:10 ` Thomas Monjalon
2024-09-12 8:26 ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
` (14 subsequent siblings)
16 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon
Do not stop at the first file that got warnings.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 807dad7f48..d72d244d3a 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -13,6 +13,7 @@ BEGIN {
in_file=0;
in_comment=0;
count=0;
+ warned=0;
comment_start="/*"
comment_end="*/"
}
@@ -50,7 +51,8 @@ BEGIN {
($0 ~ "^\\+\\+\\+ b/") {
in_file = 0;
if (count > 0) {
- exit;
+ warned = warned + 1
+ print "Warning in " substr(last_file,7) ":"
}
count = 0
for (i in deny_folders) {
@@ -66,7 +68,10 @@ BEGIN {
}
END {
if (count > 0) {
+ warned = warned + 1
print "Warning in " substr(last_file,7) ":"
+ }
+ if (warned > 0) {
print MESSAGE
exit RET_ON_FAIL
}
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 03/14] net/dpaa: remove broken debug macros
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-12 8:26 ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
2024-09-12 8:26 ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-10-01 10:18 ` Thomas Monjalon
2024-09-12 8:26 ` [PATCH v2 04/14] net/sfc: fix driver logtype token David Marchand
` (13 subsequent siblings)
16 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Hemant Agrawal, Sachin Saxena
Those debug macros never worked as existing callers never passed a
'level' argument.
Remove them.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/dpaa/fmlib/fm_ext.h | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h
index 8e7153bdaf..4666fa3b0b 100644
--- a/drivers/net/dpaa/fmlib/fm_ext.h
+++ b/drivers/net/dpaa/fmlib/fm_ext.h
@@ -15,25 +15,8 @@
#define MODULE_FM 0x00010000
#define __ERR_MODULE__ MODULE_FM
-/* #define FM_LIB_DBG */
-
-#if defined(FM_LIB_DBG)
- #define _fml_dbg(fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
- __func__, ##args)
-#else
- #define _fml_dbg(arg...)
-#endif
-
-/*#define FM_IOCTL_DBG*/
-
-#if defined(FM_IOCTL_DBG)
- #define _fm_ioctl_dbg(fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
- __func__, ##args)
-#else
- #define _fm_ioctl_dbg(arg...)
-#endif
+#define _fml_dbg(...)
+#define _fm_ioctl_dbg(...)
/*
* @Group lnx_ioctl_ncsw_grp NetCommSw Linux User-Space (IOCTL) API
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 04/14] net/sfc: fix driver logtype token
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (2 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers David Marchand
` (12 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Andrew Rybchenko
The net/sfc driver logtype was registered under pmd.net.sfc."driver".
Fixes: 0f39f32482a1 ("net/sfc: remove use of EAL logtype")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 24686a1eaf..3480a51642 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -3616,4 +3616,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx,
SFC_KVARG_FW_VARIANT "=" SFC_KVARG_VALUES_FW_VARIANT " "
SFC_KVARG_RXD_WAIT_TIMEOUT_NS "=<long> "
SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long>");
-RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, "driver", NOTICE);
+RTE_LOG_REGISTER_SUFFIX(sfc_logtype_driver, driver, NOTICE);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (3 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 04/14] net/sfc: fix driver logtype token David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers David Marchand
` (11 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Andrew Rybchenko, Vijay Kumar Srivastava
Nothing is fixed here, just reuse the value coming from the build
framework rather than use a fixed string that may get wrong in the
future.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_log.h | 7 ++-----
drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index 10a9ce6ced..b92b358927 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -13,9 +13,6 @@
/** Generic driver log type */
extern int sfc_logtype_driver;
-/** Common log type name prefix */
-#define SFC_LOGTYPE_PREFIX "pmd.net.sfc."
-
/** Log PMD generic message, add a prefix and a line break */
#define SFC_GENERIC_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, sfc_logtype_driver, \
@@ -23,10 +20,10 @@ extern int sfc_logtype_driver;
RTE_FMT_TAIL(__VA_ARGS__ ,)))
/** Name prefix for the per-device log type used to report basic information */
-#define SFC_LOGTYPE_MAIN_STR SFC_LOGTYPE_PREFIX "main"
+#define SFC_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
/** Device MCDI log type name prefix */
-#define SFC_LOGTYPE_MCDI_STR SFC_LOGTYPE_PREFIX "mcdi"
+#define SFC_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
#define SFC_LOG_PREFIX_MAX 32
diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h
index 6c0101dbb4..1104e7de43 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_log.h
+++ b/drivers/vdpa/sfc/sfc_vdpa_log.h
@@ -8,9 +8,6 @@
/** Generic driver log type */
extern int sfc_vdpa_logtype_driver;
-/** Common log type name prefix */
-#define SFC_VDPA_LOGTYPE_PREFIX "pmd.vdpa.sfc."
-
/** Log PMD generic message, add a prefix and a line break */
#define SFC_VDPA_GENERIC_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver, \
@@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver;
RTE_FMT_TAIL(__VA_ARGS__ ,)))
/** Name prefix for the per-device log type used to report basic information */
-#define SFC_VDPA_LOGTYPE_MAIN_STR SFC_VDPA_LOGTYPE_PREFIX "main"
+#define SFC_VDPA_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
/** Device MCDI log type name prefix */
-#define SFC_VDPA_LOGTYPE_MCDI_STR SFC_VDPA_LOGTYPE_PREFIX "mcdi"
+#define SFC_VDPA_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
#define SFC_VDPA_LOG_PREFIX_MAX 32
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (4 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 07/14] net/txgbe: move wrapper to base driver David Marchand
` (10 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Jingjing Wu
Remove _RAW macros and directly call RTE_LOG() where needed in headers
providing wrappers for base drivers code.
This will help later when adding a check on RTE_LOG() use in drivers/.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/common/iavf/iavf_osdep.h | 8 ++++----
drivers/common/idpf/base/idpf_osdep.h | 10 +++++-----
drivers/net/e1000/base/e1000_osdep.h | 2 +-
drivers/net/e1000/e1000_logs.h | 8 ++------
drivers/net/fm10k/base/fm10k_osdep.h | 2 +-
drivers/net/fm10k/fm10k_logs.h | 7 ++-----
drivers/net/i40e/base/i40e_osdep.h | 6 +++---
drivers/net/i40e/i40e_logs.h | 7 ++-----
drivers/net/ice/base/ice_osdep.h | 2 +-
drivers/net/ice/ice_logs.h | 7 ++-----
drivers/net/igc/base/igc_osdep.h | 2 +-
drivers/net/igc/igc_logs.h | 6 +-----
drivers/net/ixgbe/base/ixgbe_osdep.h | 2 +-
drivers/net/ixgbe/ixgbe_logs.h | 7 ++-----
14 files changed, 28 insertions(+), 48 deletions(-)
diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/common/iavf/iavf_osdep.h
index 263d92400c..1f2b7889cb 100644
--- a/drivers/common/iavf/iavf_osdep.h
+++ b/drivers/common/iavf/iavf_osdep.h
@@ -143,16 +143,16 @@ writeq(uint64_t value, volatile void *addr)
#define IAVF_WRITE_FLUSH(a) IAVF_READ_REG(a, IAVF_VFGEN_RSTAT)
extern int iavf_common_logger;
+#define RTE_LOGTYPE_IAVF_COMMON iavf_common_logger
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, iavf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IAVF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define iavf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- rte_log(RTE_LOG_DEBUG, iavf_common_logger, \
- "iavf %02x.%x " s, \
+ DEBUGOUT("iavf %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/common/idpf/base/idpf_osdep.h b/drivers/common/idpf/base/idpf_osdep.h
index b2af8f443d..e042ef871c 100644
--- a/drivers/common/idpf/base/idpf_osdep.h
+++ b/drivers/common/idpf/base/idpf_osdep.h
@@ -25,6 +25,8 @@
#include <rte_io.h>
#include <rte_compat.h>
+#include "../idpf_common_logs.h"
+
#define INLINE inline
#define STATIC static
@@ -108,16 +110,14 @@ typedef struct idpf_lock idpf_lock;
#define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->(f)))
#define MAKEMASK(m, s) ((m) << (s))
-extern int idpf_common_logger;
-
-#define DEBUGOUT(S) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S)
-#define DEBUGOUT2(S, A...) rte_log(RTE_LOG_DEBUG, idpf_common_logger, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IDPF_COMMON, S, ## __VA_ARGS__)
+#define DEBUGOUT2(S, ...) DEBUGOUT(S, ## __VA_ARGS__)
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define idpf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "idpf %02x.%x " s, \
+ DEBUGOUT("idpf %02x.%x " s "\n", \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index cd90228cef..6b5d58950f 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, E1000_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 86f546b0f9..30b5531069 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -34,13 +34,9 @@ extern int e1000_logtype_tx;
#endif
extern int e1000_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_E1000_DRIVER e1000_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
+ RTE_LOG(level, E1000_DRIVER, "%s(): " fmt "\n", __func__, ## args)
/* log init function shared by e1000 and igb drivers */
void e1000_igb_init_log(void);
diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h
index 25f46c3908..d3e5528575 100644
--- a/drivers/net/fm10k/base/fm10k_osdep.h
+++ b/drivers/net/fm10k/base/fm10k_osdep.h
@@ -24,7 +24,7 @@
#define STATIC static
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, FM10K_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index 4f039f8beb..c4c7c977d9 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -33,11 +33,8 @@ extern int fm10k_logtype_tx;
#endif
extern int fm10k_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_FM10K_DRIVER fm10k_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, FM10K_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _FM10K_LOGS_H_ */
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index aa5dc61841..8960206d8b 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -82,8 +82,8 @@ typedef enum i40e_status_code i40e_status;
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-#define DEBUGOUT(S) PMD_DRV_LOG_RAW(DEBUG, S)
-#define DEBUGOUT1(S, A...) PMD_DRV_LOG_RAW(DEBUG, S, ##A)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, I40E_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
+#define DEBUGOUT1 DEBUGOUT
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
#define DEBUGOUT2 DEBUGOUT1
@@ -94,7 +94,7 @@ typedef enum i40e_status_code i40e_status;
#define i40e_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "i40e %02x.%x " s, \
+ DEBUGOUT("i40e %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h
index eebe6c5559..fb1f3a4096 100644
--- a/drivers/net/i40e/i40e_logs.h
+++ b/drivers/net/i40e/i40e_logs.h
@@ -30,11 +30,8 @@ extern int i40e_logtype_tx;
#endif
extern int i40e_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_I40E_DRIVER i40e_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, I40E_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _I40E_LOGS_H_ */
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index c17f1bf09f..5f7347023f 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -149,7 +149,7 @@ writeq(uint64_t value, volatile void *addr)
#define ice_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
- PMD_DRV_LOG_RAW(DEBUG, "ice %02x.%x " s, \
+ RTE_LOG(DEBUG, ICE_DRIVER, "ice %02x.%x " s, \
(h)->bus.device, (h)->bus.func, \
##__VA_ARGS__); \
} while (0)
diff --git a/drivers/net/ice/ice_logs.h b/drivers/net/ice/ice_logs.h
index e79980fb63..a54e9d8b59 100644
--- a/drivers/net/ice/ice_logs.h
+++ b/drivers/net/ice/ice_logs.h
@@ -7,6 +7,7 @@
extern int ice_logtype_init;
extern int ice_logtype_driver;
+#define RTE_LOGTYPE_ICE_DRIVER ice_logtype_driver
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
@@ -32,11 +33,7 @@ extern int ice_logtype_tx;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, ICE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _ICE_LOGS_H_ */
diff --git a/drivers/net/igc/base/igc_osdep.h b/drivers/net/igc/base/igc_osdep.h
index 25090d65ea..4e479eb500 100644
--- a/drivers/net/igc/base/igc_osdep.h
+++ b/drivers/net/igc/base/igc_osdep.h
@@ -27,7 +27,7 @@
#define msec_delay_irq(x) DELAY(1000 * (x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n")
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IGC_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/igc/igc_logs.h b/drivers/net/igc/igc_logs.h
index cca5389eff..4a574f10cb 100644
--- a/drivers/net/igc/igc_logs.h
+++ b/drivers/net/igc/igc_logs.h
@@ -35,12 +35,8 @@ extern int igc_logtype_driver;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, igc_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#ifdef __cplusplus
}
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index e832a7bec8..502f386b56 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -33,7 +33,7 @@
#define msec_delay(x) DELAY(1000*(x))
#define DEBUGFUNC(F) DEBUGOUT(F "\n");
-#define DEBUGOUT(S, args...) PMD_DRV_LOG_RAW(DEBUG, S, ##args)
+#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IXGBE_DRIVER, "%s(): " S, __func__, ## __VA_ARGS__)
#define DEBUGOUT1(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT2(S, args...) DEBUGOUT(S, ##args)
#define DEBUGOUT3(S, args...) DEBUGOUT(S, ##args)
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 00ef797ca1..5a2c5ccde0 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -31,11 +31,8 @@ extern int ixgbe_logtype_tx;
#endif
extern int ixgbe_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
+#define RTE_LOGTYPE_IXGBE_DRIVER ixgbe_logtype_driver
#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+ RTE_LOG(level, IXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
#endif /* _IXGBE_LOGS_H_ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 07/14] net/txgbe: move wrapper to base driver
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (5 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 08/14] event/dlb2: fix base driver logs David Marchand
` (9 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Jiawen Wu, Jian Wang
BP_LOG() is only used in the base driver.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
drivers/net/txgbe/txgbe_logs.h | 7 -------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index 62d16a6abb..91c8abf12e 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -28,6 +28,14 @@
#define TMZ_VADDR(mz) ((mz)->addr)
#define TDEV_NAME(eth_dev) ((eth_dev)->device->name)
+extern int txgbe_logtype_bp;
+#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
+#define BP_LOG(fmt, ...) \
+ RTE_LOG(DEBUG, TXGBE_BP, \
+ "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
+ usec_stamp() / 1000000, usec_stamp() % 1000000, \
+ __func__, __LINE__, ## __VA_ARGS__)
+
#define ASSERT(x) do { \
if (!(x)) \
PMD_DRV_LOG(ERR, "TXGBE: %d", x); \
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index 74f49ab9ef..b5a5a9233f 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
#define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
#define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
-extern int txgbe_logtype_bp;
-#define BP_LOG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
- "[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
- usec_stamp() / 1000000, usec_stamp() % 1000000, \
- __func__, __LINE__, ##args)
-
#endif /* _TXGBE_LOGS_H_ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 08/14] event/dlb2: fix base driver logs
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (6 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 07/14] net/txgbe: move wrapper to base driver David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 09/14] event/dsw: use a dynamic logtype David Marchand
` (8 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Abdullah Sevincer
DLB2_(HW_)?(INFO|ERR|DEBUG) are defined in osdep.h for base/ driver code
to log messages.
The base/ driver should not bypass those macros, directly calling
DLB2_LOG_(INFO|ERR|DEBUG).
Besides, DLB2_LOG_* macros always append a \n, meaning that most of the
logs coming from the base/ driver code have double \n.
This patch fixes osdep.h macro definition, then remove a few direct calls
to DLB2_LOG_* (and adjust \n accordingly).
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/event/dlb2/dlb2_log.h | 7 +++----
drivers/event/dlb2/pf/base/dlb2_osdep.h | 16 +++++++++++++---
drivers/event/dlb2/pf/base/dlb2_resource.c | 18 +++++++++---------
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/drivers/event/dlb2/dlb2_log.h b/drivers/event/dlb2/dlb2_log.h
index 54d6a3011f..81908af71f 100644
--- a/drivers/event/dlb2/dlb2_log.h
+++ b/drivers/event/dlb2/dlb2_log.h
@@ -6,12 +6,11 @@
#define _DLB2_EVDEV_LOG_H_
extern int eventdev_dlb2_log_level;
-#define RTE_LOGTYPE_EVENTDEV_DLB2_LOG_LEVEL eventdev_dlb2_log_level
+#define RTE_LOGTYPE_EVENTDEV_DLB2 eventdev_dlb2_log_level
/* Dynamic logging */
#define DLB2_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eventdev_dlb2_log_level, "%s" fmt "\n", \
- __func__, ##args)
+ RTE_LOG(level, EVENTDEV_DLB2, "%s" fmt "\n", __func__, ##args)
#define DLB2_LOG_INFO(fmt, args...) \
DLB2_LOG_IMPL(INFO, fmt, ## args)
@@ -21,6 +20,6 @@ extern int eventdev_dlb2_log_level;
/* remove debug logs at compile time unless actually debugging */
#define DLB2_LOG_DBG(fmt, args...) \
- RTE_LOG_DP(DEBUG, EVENTDEV_DLB2_LOG_LEVEL, fmt, ## args)
+ RTE_LOG_DP(DEBUG, EVENTDEV_DLB2, fmt, ## args)
#endif /* _DLB2_EVDEV_LOG_H_ */
diff --git a/drivers/event/dlb2/pf/base/dlb2_osdep.h b/drivers/event/dlb2/pf/base/dlb2_osdep.h
index 06d69f39b1..16c5e3b797 100644
--- a/drivers/event/dlb2/pf/base/dlb2_osdep.h
+++ b/drivers/event/dlb2/pf/base/dlb2_osdep.h
@@ -41,13 +41,13 @@
/* Map to PMDs logging interface */
#define DLB2_ERR(dev, fmt, args...) \
- DLB2_LOG_ERR(fmt, ## args)
+ RTE_LOG(ERR, EVENTDEV_DLB2, "%s" fmt, __func__, ## args)
#define DLB2_INFO(dev, fmt, args...) \
- DLB2_LOG_INFO(fmt, ## args)
+ RTE_LOG(INFO, EVENTDEV_DLB2, "%s" fmt, __func__, ## args)
#define DLB2_DEBUG(dev, fmt, args...) \
- DLB2_LOG_DBG(fmt, ## args)
+ RTE_LOG_DP(DEBUG, EVENTDEV_DLB2, fmt, ## args)
/**
* os_udelay() - busy-wait for a number of microseconds
@@ -139,6 +139,16 @@ static inline void os_fence_hcw(struct dlb2_hw *hw, u64 *pp_addr)
DLB2_ERR(dlb2, __VA_ARGS__); \
} while (0)
+/**
+ * DLB2_HW_INFO() - log an error message
+ * @dlb2: dlb2_hw handle for a particular device.
+ * @...: variable string args.
+ */
+#define DLB2_HW_INFO(dlb2, ...) do { \
+ RTE_SET_USED(dlb2); \
+ DLB2_INFO(dlb2, __VA_ARGS__); \
+} while (0)
+
/**
* DLB2_HW_DBG() - log an info message
* @dlb2: dlb2_hw handle for a particular device.
diff --git a/drivers/event/dlb2/pf/base/dlb2_resource.c b/drivers/event/dlb2/pf/base/dlb2_resource.c
index 7ce3e3531c..3004902118 100644
--- a/drivers/event/dlb2/pf/base/dlb2_resource.c
+++ b/drivers/event/dlb2/pf/base/dlb2_resource.c
@@ -841,7 +841,7 @@ dlb2_get_pp_allocation(struct dlb2_hw *hw, int cpu, int port_type)
dlb2_dev->enqueue_four = dlb2_movdir64b;
- DLB2_LOG_INFO(" for %s: cpu core used in pp profiling: %d\n",
+ DLB2_HW_INFO(hw, " for %s: cpu core used in pp profiling: %d\n",
is_ldb ? "LDB" : "DIR", cpu);
memset(cos_cycles, 0, num_sort * sizeof(struct dlb2_pp_thread_data));
@@ -854,7 +854,7 @@ dlb2_get_pp_allocation(struct dlb2_hw *hw, int cpu, int port_type)
err = rte_thread_attr_init(&th_attr);
if (err != 0) {
- DLB2_LOG_ERR(": thread attribute failed! err=%d", err);
+ DLB2_HW_ERR(hw, ": thread attribute failed! err=%d\n", err);
return;
}
CPU_SET(cpu, &th_attr.cpuset);
@@ -862,7 +862,7 @@ dlb2_get_pp_allocation(struct dlb2_hw *hw, int cpu, int port_type)
err = rte_thread_create(&thread, &th_attr,
&dlb2_pp_profile_func, &dlb2_thread_data[i]);
if (err) {
- DLB2_LOG_ERR(": thread creation failed! err=%d", err);
+ DLB2_HW_ERR(hw, ": thread creation failed! err=%d\n", err);
return;
}
@@ -871,7 +871,7 @@ dlb2_get_pp_allocation(struct dlb2_hw *hw, int cpu, int port_type)
err = rte_thread_join(thread, NULL);
if (err) {
- DLB2_LOG_ERR(": thread join failed! err=%d", err);
+ DLB2_HW_ERR(hw, ": thread join failed! err=%d\n", err);
return;
}
@@ -911,7 +911,7 @@ dlb2_get_pp_allocation(struct dlb2_hw *hw, int cpu, int port_type)
for (i = 0; i < num_ports; i++) {
port_allocations[i] = dlb2_thread_data[i].pp;
- DLB2_LOG_INFO(": pp %d cycles %d", port_allocations[i],
+ DLB2_HW_INFO(hw, ": pp %d cycles %d\n", port_allocations[i],
dlb2_thread_data[i].cycles);
}
@@ -929,7 +929,7 @@ dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args)
}
if (mask && rte_eal_parse_coremask(mask, cores)) {
- DLB2_LOG_ERR(": Invalid producer coremask=%s", mask);
+ DLB2_HW_ERR(hw, ": Invalid producer coremask=%s\n", mask);
return -1;
}
@@ -956,7 +956,7 @@ dlb2_resource_probe(struct dlb2_hw *hw, const void *probe_args)
break;
}
} else if (is_pcore) {
- DLB2_LOG_ERR("Producer coremask(%s) must be a subset of EAL coremask",
+ DLB2_HW_ERR(hw, "Producer coremask(%s) must be a subset of EAL coremask\n",
mask);
return -1;
}
@@ -4599,7 +4599,7 @@ dlb2_verify_create_ldb_port_args(struct dlb2_hw *hw,
return -EINVAL;
}
- DLB2_LOG_INFO(": LDB: cos=%d port:%d\n", id, port->id.phys_id);
+ DLB2_HW_INFO(hw, ": LDB: cos=%d port:%d\n", id, port->id.phys_id);
/* Check cache-line alignment */
if ((cq_dma_base & 0x3F) != 0) {
@@ -4826,7 +4826,7 @@ dlb2_verify_create_dir_port_args(struct dlb2_hw *hw,
resp->status = DLB2_ST_DIR_PORTS_UNAVAILABLE;
return -EINVAL;
}
- DLB2_LOG_INFO(": DIR: port:%d is_producer=%d\n",
+ DLB2_HW_INFO(hw, ": DIR: port:%d is_producer=%d\n",
pq->id.phys_id, args->is_producer);
}
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 09/14] event/dsw: use a dynamic logtype
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (7 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 08/14] event/dlb2: fix base driver logs David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 10/14] drivers: replace logging helpers David Marchand
` (7 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Mattias Rönnblom
Register a logtype for this driver and stop logging as EVENTDEV.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/event/dsw/dsw_evdev.c | 1 +
drivers/event/dsw/dsw_evdev.h | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 0dea1091e3..8a1a2db8ac 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -493,3 +493,4 @@ static struct rte_vdev_driver evdev_dsw_pmd_drv = {
};
RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DSW_PMD, evdev_dsw_pmd_drv);
+RTE_LOG_REGISTER_DEFAULT(event_dsw_logtype, NOTICE);
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index c9bf4f8b6b..fe4ddb3e30 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -302,9 +302,10 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev)
return eventdev->data->dev_private;
}
+extern int event_dsw_logtype;
+#define RTE_LOGTYPE_EVENT_DSW event_dsw_logtype
#define DSW_LOG_DP(level, fmt, args...) \
- RTE_LOG_DP(level, EVENTDEV, "[%s] %s() line %u: " fmt, \
- DSW_PMD_NAME, \
+ RTE_LOG_DP(level, EVENT_DSW, "%s() line %u: " fmt, \
__func__, __LINE__, ## args)
#define DSW_LOG_DP_PORT(level, port_id, fmt, args...) \
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 10/14] drivers: replace logging helpers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (8 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 09/14] event/dsw: use a dynamic logtype David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 11/14] drivers: remove redundant newline from logs David Marchand
` (6 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev
Cc: Tomasz Duszynski, Nagadheeraj Rottela, Srikanth Jampala,
Fan Zhang, Ashish Gupta, Gowrishankar Muthukrishnan,
Vidya Sagar Velumuri, Abdullah Sevincer, Mattias Rönnblom,
Ciara Loftus, Maryam Tahhan, Steven Webster, Matt Peters,
Selwin Sebastian, Ajit Khaparde, Somnath Kotur, Bruce Richardson,
Konstantin Ananyev, Wathsala Vithanage, Chas Williams,
Min Hu (Connor),
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Maxime Coquelin, Chenbo Xia
Prepare for the conversion to RTE_LOG_LINE.
Some drivers currently add no \n in the logging macro and
have the callers do it.
Let's invert this logic but again, thinking about backports, introduce
the change in new macros.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- added changes to event/dlb2 and net/bonding,
---
drivers/bus/platform/platform.c | 28 +-
drivers/bus/platform/platform_params.c | 2 +-
drivers/bus/platform/private.h | 10 +-
drivers/common/nitrox/nitrox_hal.c | 4 +-
drivers/common/nitrox/nitrox_logs.h | 8 +-
drivers/common/nitrox/nitrox_qp.c | 10 +-
drivers/compress/nitrox/nitrox_comp.c | 44 +-
drivers/compress/nitrox/nitrox_comp_reqmgr.c | 170 +++---
drivers/crypto/nitrox/nitrox_sym.c | 54 +-
drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 12 +-
drivers/dma/odm/odm.h | 14 +-
drivers/dma/odm/odm_dmadev.c | 12 +-
drivers/event/dlb2/dlb2.c | 50 +-
drivers/event/dlb2/dlb2_log.h | 4 +-
drivers/event/dlb2/pf/dlb2_pf.c | 4 +-
drivers/event/dsw/dsw_evdev.h | 8 +-
drivers/event/dsw/dsw_event.c | 78 +--
drivers/net/af_xdp/rte_eth_af_xdp.c | 212 +++----
drivers/net/avp/avp_ethdev.c | 155 +++--
drivers/net/avp/avp_logs.h | 17 +-
drivers/net/axgbe/axgbe_dev.c | 34 +-
drivers/net/axgbe/axgbe_ethdev.c | 128 ++--
drivers/net/axgbe/axgbe_i2c.c | 18 +-
drivers/net/axgbe/axgbe_logs.h | 6 +-
drivers/net/axgbe/axgbe_mdio.c | 36 +-
drivers/net/axgbe/axgbe_phy_impl.c | 50 +-
drivers/net/axgbe/axgbe_rxtx.c | 24 +-
drivers/net/bnxt/bnxt.h | 8 +-
drivers/net/bnxt/bnxt_cpr.c | 66 +-
drivers/net/bnxt/bnxt_ethdev.c | 570 +++++++++---------
drivers/net/bnxt/bnxt_filter.c | 18 +-
drivers/net/bnxt/bnxt_flow.c | 126 ++--
drivers/net/bnxt/bnxt_hwrm.c | 320 +++++-----
drivers/net/bnxt/bnxt_irq.c | 4 +-
drivers/net/bnxt/bnxt_reps.c | 86 +--
drivers/net/bnxt/bnxt_ring.c | 18 +-
drivers/net/bnxt/bnxt_rxq.c | 66 +-
drivers/net/bnxt/bnxt_rxr.c | 32 +-
drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
drivers/net/bnxt/bnxt_stats.c | 6 +-
drivers/net/bnxt/bnxt_txq.c | 16 +-
drivers/net/bnxt/bnxt_txr.c | 16 +-
drivers/net/bnxt/bnxt_vnic.c | 124 ++--
drivers/net/bnxt/rte_pmd_bnxt.c | 132 ++--
.../net/bnxt/tf_core/tf_em_hash_internal.c | 4 +-
drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 3 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 6 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 2 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 22 +-
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 2 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 44 +-
drivers/net/ena/ena_ethdev.c | 348 +++++------
drivers/net/ena/ena_logs.h | 28 +-
drivers/net/ena/ena_rss.c | 76 +--
drivers/net/vhost/rte_eth_vhost.c | 76 +--
58 files changed, 1705 insertions(+), 1716 deletions(-)
diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c
index 7e24bb96a1..11892caa24 100644
--- a/drivers/bus/platform/platform.c
+++ b/drivers/bus/platform/platform.c
@@ -97,7 +97,7 @@ dev_add(const char *dev_name)
FOREACH_DEVICE_ON_PLATFORM_BUS(tmp) {
if (!strcmp(tmp->name, pdev->name)) {
- PLATFORM_LOG(INFO, "device %s already added\n", pdev->name);
+ PLATFORM_LOG_LINE(INFO, "device %s already added", pdev->name);
if (tmp->device.devargs != pdev->device.devargs)
rte_devargs_remove(pdev->device.devargs);
@@ -109,7 +109,7 @@ dev_add(const char *dev_name)
TAILQ_INSERT_HEAD(&platform_bus.device_list, pdev, next);
- PLATFORM_LOG(INFO, "adding device %s to the list\n", dev_name);
+ PLATFORM_LOG_LINE(INFO, "adding device %s to the list", dev_name);
return 0;
}
@@ -161,7 +161,7 @@ platform_bus_scan(void)
dp = opendir(PLATFORM_BUS_DEVICES_PATH);
if (dp == NULL) {
- PLATFORM_LOG(INFO, "failed to open %s\n", PLATFORM_BUS_DEVICES_PATH);
+ PLATFORM_LOG_LINE(INFO, "failed to open %s", PLATFORM_BUS_DEVICES_PATH);
return -errno;
}
@@ -195,7 +195,7 @@ device_map_resource_offset(struct rte_platform_device *pdev, struct rte_platform
if (res->mem.addr == MAP_FAILED)
return -errno;
- PLATFORM_LOG(DEBUG, "adding resource va = %p len = %"PRIu64" name = %s\n", res->mem.addr,
+ PLATFORM_LOG_LINE(DEBUG, "adding resource va = %p len = %"PRIu64" name = %s", res->mem.addr,
res->mem.len, res->name);
return 0;
@@ -271,7 +271,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
int ret;
if (num == 0) {
- PLATFORM_LOG(WARNING, "device %s has no resources\n", pdev->name);
+ PLATFORM_LOG_LINE(WARNING, "device %s has no resources", pdev->name);
return 0;
}
@@ -287,7 +287,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
ret = ioctl(pdev->dev_fd, VFIO_DEVICE_GET_REGION_INFO, ®_info);
if (ret) {
- PLATFORM_LOG(ERR, "failed to get region info at %d\n", i);
+ PLATFORM_LOG_LINE(ERR, "failed to get region info at %d", i);
ret = -errno;
goto out;
}
@@ -297,7 +297,7 @@ device_map_resources(struct rte_platform_device *pdev, unsigned int num)
res->mem.len = reg_info.size;
ret = device_map_resource_offset(pdev, res, reg_info.offset);
if (ret) {
- PLATFORM_LOG(ERR, "failed to ioremap resource at %d\n", i);
+ PLATFORM_LOG_LINE(ERR, "failed to ioremap resource at %d", i);
goto out;
}
@@ -327,7 +327,7 @@ device_setup(struct rte_platform_device *pdev)
ret = rte_vfio_setup_device(PLATFORM_BUS_DEVICES_PATH, name, &pdev->dev_fd, &dev_info);
if (ret) {
- PLATFORM_LOG(ERR, "failed to setup %s\n", name);
+ PLATFORM_LOG_LINE(ERR, "failed to setup %s", name);
return -ENODEV;
}
@@ -342,7 +342,7 @@ device_setup(struct rte_platform_device *pdev)
*/
#ifdef VFIO_DEVICE_FLAGS_PLATFORM
if (!(dev_info.flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
- PLATFORM_LOG(ERR, "device not backed by vfio-platform\n");
+ PLATFORM_LOG_LINE(ERR, "device not backed by vfio-platform");
ret = -ENOTSUP;
goto out;
}
@@ -350,7 +350,7 @@ device_setup(struct rte_platform_device *pdev)
ret = device_map_resources(pdev, dev_info.num_regions);
if (ret) {
- PLATFORM_LOG(ERR, "failed to setup platform resources\n");
+ PLATFORM_LOG_LINE(ERR, "failed to setup platform resources");
goto out;
}
@@ -389,7 +389,7 @@ driver_probe_device(struct rte_platform_driver *pdrv, struct rte_platform_device
iova_mode = rte_eal_iova_mode();
if (pdrv->drv_flags & RTE_PLATFORM_DRV_NEED_IOVA_AS_VA && iova_mode != RTE_IOVA_VA) {
- PLATFORM_LOG(ERR, "driver %s expects VA IOVA mode but current mode is PA\n",
+ PLATFORM_LOG_LINE(ERR, "driver %s expects VA IOVA mode but current mode is PA",
pdrv->driver.name);
return -EINVAL;
}
@@ -462,11 +462,11 @@ platform_bus_probe(void)
FOREACH_DEVICE_ON_PLATFORM_BUS(pdev) {
ret = device_attach(pdev);
if (ret == -EBUSY) {
- PLATFORM_LOG(DEBUG, "device %s already probed\n", pdev->name);
+ PLATFORM_LOG_LINE(DEBUG, "device %s already probed", pdev->name);
continue;
}
if (ret)
- PLATFORM_LOG(ERR, "failed to probe %s\n", pdev->name);
+ PLATFORM_LOG_LINE(ERR, "failed to probe %s", pdev->name);
}
return 0;
@@ -517,7 +517,7 @@ device_release_driver(struct rte_platform_device *pdev)
if (pdrv != NULL && pdrv->remove != NULL) {
ret = pdrv->remove(pdev);
if (ret)
- PLATFORM_LOG(WARNING, "failed to remove %s\n", pdev->name);
+ PLATFORM_LOG_LINE(WARNING, "failed to remove %s", pdev->name);
}
pdev->device.driver = NULL;
diff --git a/drivers/bus/platform/platform_params.c b/drivers/bus/platform/platform_params.c
index 0eb8eb56e7..8a6214b97c 100644
--- a/drivers/bus/platform/platform_params.c
+++ b/drivers/bus/platform/platform_params.c
@@ -56,7 +56,7 @@ platform_bus_dev_iterate(const void *start, const char *str,
if (str != NULL) {
kvargs = rte_kvargs_parse(str, platform_params_keys);
if (!kvargs) {
- PLATFORM_LOG(ERR, "cannot parse argument list %s", str);
+ PLATFORM_LOG_LINE(ERR, "cannot parse argument list %s", str);
rte_errno = EINVAL;
return NULL;
}
diff --git a/drivers/bus/platform/private.h b/drivers/bus/platform/private.h
index a7a4b0da56..72185aa457 100644
--- a/drivers/bus/platform/private.h
+++ b/drivers/bus/platform/private.h
@@ -15,7 +15,6 @@
#include "bus_platform_driver.h"
extern struct rte_platform_bus platform_bus;
-extern int platform_bus_logtype;
/* Platform bus iterators. */
#define FOREACH_DEVICE_ON_PLATFORM_BUS(p) \
@@ -33,10 +32,11 @@ struct rte_platform_bus {
RTE_TAILQ_HEAD(, rte_platform_driver) driver_list; /* List of bus drivers */
};
-#define PLATFORM_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, platform_bus_logtype, \
- RTE_FMT("platform bus: " RTE_FMT_HEAD(__VA_ARGS__,), \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+extern int platform_bus_logtype;
+#define RTE_LOGTYPE_PLATFORM_BUS platform_bus_logtype
+#define PLATFORM_LOG_LINE(level, ...) \
+ RTE_LOG(level, PLATFORM_BUS, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ RTE_FMT_TAIL(__VA_ARGS__,)))
/*
* Iterate registered platform devices and find one that matches provided string.
diff --git a/drivers/common/nitrox/nitrox_hal.c b/drivers/common/nitrox/nitrox_hal.c
index 451549a664..9ef974409c 100644
--- a/drivers/common/nitrox/nitrox_hal.c
+++ b/drivers/common/nitrox/nitrox_hal.c
@@ -190,7 +190,7 @@ zqmq_input_ring_disable(uint8_t *bar_addr, uint16_t ring)
}
if (zqmq_activity_stat.s.queue_active) {
- NITROX_LOG(ERR, "Failed to disable zqmq ring %d\n", ring);
+ NITROX_LOG_LINE(ERR, "Failed to disable zqmq ring %d", ring);
return -EBUSY;
}
@@ -271,7 +271,7 @@ setup_zqmq_input_ring(uint8_t *bar_addr, uint16_t ring, uint32_t rsize,
}
if (!zqmq_en.s.queue_enable) {
- NITROX_LOG(ERR, "Failed to enable zqmq ring %d\n", ring);
+ NITROX_LOG_LINE(ERR, "Failed to enable zqmq ring %d", ring);
err = -EFAULT;
} else {
err = 0;
diff --git a/drivers/common/nitrox/nitrox_logs.h b/drivers/common/nitrox/nitrox_logs.h
index 50e52f396b..67964447eb 100644
--- a/drivers/common/nitrox/nitrox_logs.h
+++ b/drivers/common/nitrox/nitrox_logs.h
@@ -5,11 +5,9 @@
#ifndef _NITROX_LOGS_H_
#define _NITROX_LOGS_H_
-#define LOG_PREFIX "NITROX: "
-#define NITROX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nitrox_logtype, \
- LOG_PREFIX "%s:%d " fmt, __func__, __LINE__, ## args)
-
extern int nitrox_logtype;
+#define RTE_LOGTYPE_NITROX nitrox_logtype
+#define NITROX_LOG_LINE(level, fmt, args...) \
+ RTE_LOG(level, NITROX, "%s:%d " fmt "\n", __func__, __LINE__, ## args)
#endif /* _NITROX_LOGS_H_ */
diff --git a/drivers/common/nitrox/nitrox_qp.c b/drivers/common/nitrox/nitrox_qp.c
index 1665c3c40d..d6a5ddd641 100644
--- a/drivers/common/nitrox/nitrox_qp.c
+++ b/drivers/common/nitrox/nitrox_qp.c
@@ -28,7 +28,7 @@ nitrox_setup_cmdq(struct nitrox_qp *qp, uint8_t *bar_addr,
RTE_MEMZONE_256MB,
CMDQ_PKT_IN_ALIGN);
if (!mz) {
- NITROX_LOG(ERR, "cmdq memzone reserve failed for %s queue\n",
+ NITROX_LOG_LINE(ERR, "cmdq memzone reserve failed for %s queue",
mz_name);
return -ENOMEM;
}
@@ -48,7 +48,7 @@ nitrox_setup_cmdq(struct nitrox_qp *qp, uint8_t *bar_addr,
mz->iova);
break;
default:
- NITROX_LOG(ERR, "Invalid queue type %d\n", qp->type);
+ NITROX_LOG_LINE(ERR, "Invalid queue type %d", qp->type);
err = -EINVAL;
break;
}
@@ -73,7 +73,7 @@ nitrox_setup_ridq(struct nitrox_qp *qp, int socket_id)
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp->ridq) {
- NITROX_LOG(ERR, "Failed to create rid queue\n");
+ NITROX_LOG_LINE(ERR, "Failed to create rid queue");
return -ENOMEM;
}
@@ -112,8 +112,8 @@ nitrox_qp_setup(struct nitrox_qp *qp, uint8_t *bar_addr, const char *dev_name,
count = rte_align32pow2(nb_descriptors);
if (count > MAX_CMD_QLEN) {
- NITROX_LOG(ERR, "%s: Number of descriptors too big %d,"
- " greater than max queue length %d\n",
+ NITROX_LOG_LINE(ERR, "%s: Number of descriptors too big %d,"
+ " greater than max queue length %d",
dev_name, count,
MAX_CMD_QLEN);
return -EINVAL;
diff --git a/drivers/compress/nitrox/nitrox_comp.c b/drivers/compress/nitrox/nitrox_comp.c
index 97d2c4a0e8..1b2054c61a 100644
--- a/drivers/compress/nitrox/nitrox_comp.c
+++ b/drivers/compress/nitrox/nitrox_comp.c
@@ -53,14 +53,14 @@ static int nitrox_comp_dev_configure(struct rte_compressdev *dev,
char name[RTE_MEMPOOL_NAMESIZE];
if (config->nb_queue_pairs > ndev->nr_queues) {
- NITROX_LOG(ERR, "Invalid queue pairs, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid queue pairs, max supported %d",
ndev->nr_queues);
return -EINVAL;
}
xform_cnt = config->max_nb_priv_xforms + config->max_nb_streams;
if (unlikely(xform_cnt == 0)) {
- NITROX_LOG(ERR, "Invalid configuration with 0 xforms\n");
+ NITROX_LOG_LINE(ERR, "Invalid configuration with 0 xforms");
return -EINVAL;
}
@@ -70,7 +70,7 @@ static int nitrox_comp_dev_configure(struct rte_compressdev *dev,
0, 0, NULL, NULL, NULL, NULL,
config->socket_id, 0);
if (comp_dev->xform_pool == NULL) {
- NITROX_LOG(ERR, "Failed to create xform pool, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create xform pool, err %d",
rte_errno);
return -rte_errno;
}
@@ -160,9 +160,9 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
struct nitrox_qp *qp = NULL;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
@@ -177,7 +177,7 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp) {
- NITROX_LOG(ERR, "Failed to allocate nitrox qp\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate nitrox qp");
return -ENOMEM;
}
@@ -195,7 +195,7 @@ static int nitrox_comp_queue_pair_setup(struct rte_compressdev *dev,
goto req_pool_err;
dev->data->queue_pairs[qp_id] = qp;
- NITROX_LOG(DEBUG, "queue %d setup done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d setup done", qp_id);
return 0;
req_pool_err:
@@ -213,21 +213,21 @@ static int nitrox_comp_queue_pair_release(struct rte_compressdev *dev,
struct nitrox_qp *qp;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
qp = dev->data->queue_pairs[qp_id];
if (!qp) {
- NITROX_LOG(DEBUG, "queue %u already freed\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %u already freed", qp_id);
return 0;
}
if (!nitrox_qp_is_empty(qp)) {
- NITROX_LOG(ERR, "queue %d not empty\n", qp_id);
+ NITROX_LOG_LINE(ERR, "queue %d not empty", qp_id);
return -EAGAIN;
}
@@ -235,7 +235,7 @@ static int nitrox_comp_queue_pair_release(struct rte_compressdev *dev,
err = nitrox_qp_release(qp, ndev->bar_addr);
nitrox_comp_req_pool_free(qp->sr_mp);
rte_free(qp);
- NITROX_LOG(DEBUG, "queue %d release done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d release done", qp_id);
return err;
}
@@ -249,12 +249,12 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
int ret;
if (unlikely(comp_dev->xform_pool == NULL)) {
- NITROX_LOG(ERR, "private xform pool not yet created\n");
+ NITROX_LOG_LINE(ERR, "private xform pool not yet created");
return -EINVAL;
}
if (rte_mempool_get(comp_dev->xform_pool, private_xform)) {
- NITROX_LOG(ERR, "Failed to get from private xform pool\n");
+ NITROX_LOG_LINE(ERR, "Failed to get from private xform pool");
return -ENOMEM;
}
@@ -266,7 +266,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
nxform->op = NITROX_COMP_OP_COMPRESS;
if (xform->compress.algo != RTE_COMP_ALGO_DEFLATE) {
- NITROX_LOG(ERR, "Only deflate is supported\n");
+ NITROX_LOG_LINE(ERR, "Only deflate is supported");
ret = -ENOTSUP;
goto err_exit;
}
@@ -279,7 +279,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
else if (algo == RTE_COMP_HUFFMAN_DYNAMIC)
nxform->algo = NITROX_COMP_ALGO_DEFLATE_DYNHUFF;
else {
- NITROX_LOG(ERR, "Invalid deflate algorithm %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Invalid deflate algorithm %d", algo);
ret = -EINVAL;
goto err_exit;
}
@@ -300,7 +300,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
level <= NITROX_COMP_LEVEL_BEST_END) {
nxform->level = NITROX_COMP_LEVEL_BEST;
} else {
- NITROX_LOG(ERR, "Unsupported compression level %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported compression level %d",
xform->compress.level);
ret = -ENOTSUP;
goto err_exit;
@@ -310,7 +310,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
} else if (xform->type == RTE_COMP_DECOMPRESS) {
nxform->op = NITROX_COMP_OP_DECOMPRESS;
if (xform->decompress.algo != RTE_COMP_ALGO_DEFLATE) {
- NITROX_LOG(ERR, "Only deflate is supported\n");
+ NITROX_LOG_LINE(ERR, "Only deflate is supported");
ret = -ENOTSUP;
goto err_exit;
}
@@ -330,7 +330,7 @@ static int nitrox_comp_private_xform_create(struct rte_compressdev *dev,
else if (chksum_type == RTE_COMP_CHECKSUM_ADLER32)
nxform->chksum_type = NITROX_CHKSUM_TYPE_ADLER32;
else {
- NITROX_LOG(ERR, "Unsupported checksum type %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported checksum type %d",
chksum_type);
ret = -ENOTSUP;
goto err_exit;
@@ -397,7 +397,7 @@ static int nitrox_comp_stream_create(struct rte_compressdev *dev,
if (unlikely(window_size < NITROX_COMP_WINDOW_SIZE_MIN ||
window_size > NITROX_COMP_WINDOW_SIZE_MAX)) {
- NITROX_LOG(ERR, "Invalid window size %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid window size %d",
window_size);
return -EINVAL;
}
@@ -569,7 +569,7 @@ nitrox_comp_pmd_create(struct nitrox_device *ndev)
sizeof(struct nitrox_comp_device),
&init_params);
if (!cdev) {
- NITROX_LOG(ERR, "Cryptodev '%s' creation failed\n", name);
+ NITROX_LOG_LINE(ERR, "Cryptodev '%s' creation failed", name);
return -ENODEV;
}
@@ -582,7 +582,7 @@ nitrox_comp_pmd_create(struct nitrox_device *ndev)
ndev->comp_dev->cdev = cdev;
ndev->comp_dev->ndev = ndev;
ndev->comp_dev->xform_pool = NULL;
- NITROX_LOG(DEBUG, "Created compressdev '%s', dev_id %d\n",
+ NITROX_LOG_LINE(DEBUG, "Created compressdev '%s', dev_id %d",
cdev->data->name, cdev->data->dev_id);
return 0;
}
diff --git a/drivers/compress/nitrox/nitrox_comp_reqmgr.c b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
index 89af855561..e46faaf7e9 100644
--- a/drivers/compress/nitrox/nitrox_comp_reqmgr.c
+++ b/drivers/compress/nitrox/nitrox_comp_reqmgr.c
@@ -337,7 +337,7 @@ static void nitrox_dump_databuf(const char *name, struct rte_mbuf *m,
rte_pktmbuf_mtod(m, char *), mlen);
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
}
static void nitrox_dump_zip_instr(struct nitrox_zip_instr *instr,
@@ -348,108 +348,108 @@ static void nitrox_dump_zip_instr(struct nitrox_zip_instr *instr,
uint64_t value;
int i = 0;
- NITROX_LOG(DEBUG, "\nZIP instruction..(%p)\n", instr);
- NITROX_LOG(DEBUG, "\tWORD0 = 0x%016"PRIx64"\n", instr->w0.u64);
- NITROX_LOG(DEBUG, "\t\tTOL = %d\n", instr->w0.tol);
- NITROX_LOG(DEBUG, "\t\tEXNUM = %d\n", instr->w0.exn);
- NITROX_LOG(DEBUG, "\t\tEXBITS = %x\n", instr->w0.exbits);
- NITROX_LOG(DEBUG, "\t\tCA = %d\n", instr->w0.ca);
- NITROX_LOG(DEBUG, "\t\tSF = %d\n", instr->w0.sf);
- NITROX_LOG(DEBUG, "\t\tSS = %d\n", instr->w0.ss);
- NITROX_LOG(DEBUG, "\t\tCC = %d\n", instr->w0.cc);
- NITROX_LOG(DEBUG, "\t\tEF = %d\n", instr->w0.ef);
- NITROX_LOG(DEBUG, "\t\tBF = %d\n", instr->w0.bf);
- NITROX_LOG(DEBUG, "\t\tCO = %d\n", instr->w0.co);
- NITROX_LOG(DEBUG, "\t\tDS = %d\n", instr->w0.ds);
- NITROX_LOG(DEBUG, "\t\tDG = %d\n", instr->w0.dg);
- NITROX_LOG(DEBUG, "\t\tHG = %d\n", instr->w0.hg);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD1 = 0x%016"PRIx64"\n", instr->w1.u64);
- NITROX_LOG(DEBUG, "\t\tHL = %d\n", instr->w1.hl);
- NITROX_LOG(DEBUG, "\t\tADLERCRC32 = 0x%08x\n", instr->w1.adlercrc32);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\nZIP instruction..(%p)", instr);
+ NITROX_LOG_LINE(DEBUG, "\tWORD0 = 0x%016"PRIx64, instr->w0.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTOL = %d", instr->w0.tol);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXNUM = %d", instr->w0.exn);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXBITS = %x", instr->w0.exbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tCA = %d", instr->w0.ca);
+ NITROX_LOG_LINE(DEBUG, "\t\tSF = %d", instr->w0.sf);
+ NITROX_LOG_LINE(DEBUG, "\t\tSS = %d", instr->w0.ss);
+ NITROX_LOG_LINE(DEBUG, "\t\tCC = %d", instr->w0.cc);
+ NITROX_LOG_LINE(DEBUG, "\t\tEF = %d", instr->w0.ef);
+ NITROX_LOG_LINE(DEBUG, "\t\tBF = %d", instr->w0.bf);
+ NITROX_LOG_LINE(DEBUG, "\t\tCO = %d", instr->w0.co);
+ NITROX_LOG_LINE(DEBUG, "\t\tDS = %d", instr->w0.ds);
+ NITROX_LOG_LINE(DEBUG, "\t\tDG = %d", instr->w0.dg);
+ NITROX_LOG_LINE(DEBUG, "\t\tHG = %d", instr->w0.hg);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD1 = 0x%016"PRIx64, instr->w1.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tHL = %d", instr->w1.hl);
+ NITROX_LOG_LINE(DEBUG, "\t\tADLERCRC32 = 0x%08x", instr->w1.adlercrc32);
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w2.cptr;
- NITROX_LOG(DEBUG, "\tWORD2 = 0x%016"PRIx64"\n", instr->w2.u64);
- NITROX_LOG(DEBUG, "\t\tCPTR = 0x%11"PRIx64"\n", value);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\tWORD2 = 0x%016"PRIx64, instr->w2.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tCPTR = 0x%11"PRIx64, value);
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w3.hptr;
- NITROX_LOG(DEBUG, "\tWORD3 = 0x%016"PRIx64"\n", instr->w3.u64);
- NITROX_LOG(DEBUG, "\t\tHLEN = %d\n", instr->w3.hlen);
- NITROX_LOG(DEBUG, "\t\tHPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD3 = 0x%016"PRIx64, instr->w3.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tHLEN = %d", instr->w3.hlen);
+ NITROX_LOG_LINE(DEBUG, "\t\tHPTR = 0x%11"PRIx64, value);
if (instr->w0.hg && hptr_arr) {
for (i = 0; i < instr->w3.hlen; i++) {
value = hptr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, hptr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w4.iptr;
- NITROX_LOG(DEBUG, "\tWORD4 = 0x%016"PRIx64"\n", instr->w4.u64);
- NITROX_LOG(DEBUG, "\t\tILEN = %d\n", instr->w4.ilen);
- NITROX_LOG(DEBUG, "\t\tIPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD4 = 0x%016"PRIx64, instr->w4.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tILEN = %d", instr->w4.ilen);
+ NITROX_LOG_LINE(DEBUG, "\t\tIPTR = 0x%11"PRIx64, value);
if (instr->w0.dg && iptr_arr) {
for (i = 0; i < instr->w4.ilen; i++) {
value = iptr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, iptr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w5.optr;
- NITROX_LOG(DEBUG, "\tWORD5 = 0x%016"PRIx64"\n", instr->w5.u64);
- NITROX_LOG(DEBUG, "\t\t OLEN = %d\n", instr->w5.olen);
- NITROX_LOG(DEBUG, "\t\t OPTR = 0x%11"PRIx64"\n", value);
+ NITROX_LOG_LINE(DEBUG, "\tWORD5 = 0x%016"PRIx64, instr->w5.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\t OLEN = %d", instr->w5.olen);
+ NITROX_LOG_LINE(DEBUG, "\t\t OPTR = 0x%11"PRIx64, value);
if (instr->w0.ds && optr_arr) {
for (i = 0; i < instr->w5.olen; i++) {
value = optr_arr[i].s.addr;
- NITROX_LOG(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64"\n",
+ NITROX_LOG_LINE(DEBUG, "\t\t\tZPTR[%d] : Length = %d Addr = 0x%11"PRIx64,
i, optr_arr[i].s.length, value);
}
}
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG,);
value = instr->w6.rptr;
- NITROX_LOG(DEBUG, "\tWORD6 = 0x%016"PRIx64"\n", instr->w6.u64);
- NITROX_LOG(DEBUG, "\t\tRPTR = 0x%11"PRIx64"\n", value);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD7 = 0x%016"PRIx64"\n", instr->w7.u64);
- NITROX_LOG(DEBUG, "\t\tGRP = %x\n", instr->w7.grp);
- NITROX_LOG(DEBUG, "\t\tADDR_MSB = 0x%5x\n", instr->w7.addr_msb);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "\tWORD6 = 0x%016"PRIx64, instr->w6.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tRPTR = 0x%11"PRIx64, value);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD7 = 0x%016"PRIx64, instr->w7.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tGRP = %x", instr->w7.grp);
+ NITROX_LOG_LINE(DEBUG, "\t\tADDR_MSB = 0x%5x", instr->w7.addr_msb);
+ NITROX_LOG_LINE(DEBUG,);
}
static void nitrox_dump_zip_result(struct nitrox_zip_instr *instr,
struct nitrox_zip_result *result)
{
- NITROX_LOG(DEBUG, "ZIP result..(instr %p)\n", instr);
- NITROX_LOG(DEBUG, "\tWORD0 = 0x%016"PRIx64"\n", result->w0.u64);
- NITROX_LOG(DEBUG, "\t\tCRC32 = 0x%8x\n", result->w0.crc32);
- NITROX_LOG(DEBUG, "\t\tADLER32 = 0x%8x\n", result->w0.adler32);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD1 = 0x%016"PRIx64"\n", result->w1.u64);
- NITROX_LOG(DEBUG, "\t\tTBYTESWRITTEN = %u\n", result->w1.tbyteswritten);
- NITROX_LOG(DEBUG, "\t\tTBYTESREAD = %u\n", result->w1.tbytesread);
- NITROX_LOG(DEBUG, "\n");
-
- NITROX_LOG(DEBUG, "\tWORD2 = 0x%016"PRIx64"\n", result->w2.u64);
- NITROX_LOG(DEBUG, "\t\tTBITS = %u\n", result->w2.tbits);
- NITROX_LOG(DEBUG, "\t\tEXN = %d\n", result->w2.exn);
- NITROX_LOG(DEBUG, "\t\tEBITS = %x\n", result->w2.exbits);
- NITROX_LOG(DEBUG, "\t\tEF = %d\n", result->w2.ef);
- NITROX_LOG(DEBUG, "\t\tCOMPCODE = 0x%2x\n", result->w2.compcode);
- NITROX_LOG(DEBUG, "\n");
+ NITROX_LOG_LINE(DEBUG, "ZIP result..(instr %p)", instr);
+ NITROX_LOG_LINE(DEBUG, "\tWORD0 = 0x%016"PRIx64, result->w0.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tCRC32 = 0x%8x", result->w0.crc32);
+ NITROX_LOG_LINE(DEBUG, "\t\tADLER32 = 0x%8x", result->w0.adler32);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD1 = 0x%016"PRIx64, result->w1.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBYTESWRITTEN = %u", result->w1.tbyteswritten);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBYTESREAD = %u", result->w1.tbytesread);
+ NITROX_LOG_LINE(DEBUG,);
+
+ NITROX_LOG_LINE(DEBUG, "\tWORD2 = 0x%016"PRIx64, result->w2.u64);
+ NITROX_LOG_LINE(DEBUG, "\t\tTBITS = %u", result->w2.tbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tEXN = %d", result->w2.exn);
+ NITROX_LOG_LINE(DEBUG, "\t\tEBITS = %x", result->w2.exbits);
+ NITROX_LOG_LINE(DEBUG, "\t\tEF = %d", result->w2.ef);
+ NITROX_LOG_LINE(DEBUG, "\t\tCOMPCODE = 0x%2x", result->w2.compcode);
+ NITROX_LOG_LINE(DEBUG,);
}
#else
#define nitrox_dump_databuf(name, m, off, datalen)
@@ -533,7 +533,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
uint32_t mlen;
if (unlikely(datalen > NITROX_ZIP_MAX_DATASIZE)) {
- NITROX_LOG(ERR, "Unsupported datalen %d, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Unsupported datalen %d, max supported %d",
datalen, NITROX_ZIP_MAX_DATASIZE);
return -ENOTSUP;
}
@@ -545,7 +545,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
}
if (unlikely(nb_segs > NITROX_ZIP_MAX_ZPTRS)) {
- NITROX_LOG(ERR, "Mbuf has more segments %d than supported\n",
+ NITROX_LOG_LINE(ERR, "Mbuf has more segments %d than supported",
nb_segs);
return -ENOTSUP;
}
@@ -553,13 +553,13 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
if (unlikely(nb_segs > sgtbl->nb_sgls)) {
union nitrox_zip_zptr *sgl;
- NITROX_LOG(INFO, "Mbuf has more segs %d than allocated %d\n",
+ NITROX_LOG_LINE(INFO, "Mbuf has more segs %d than allocated %d",
nb_segs, sgtbl->nb_sgls);
sgl = rte_realloc_socket(sgtbl->sgl,
sizeof(*sgtbl->sgl) * nb_segs,
8, socket_id);
if (unlikely(!sgl)) {
- NITROX_LOG(ERR, "Failed to expand sglist memory\n");
+ NITROX_LOG_LINE(ERR, "Failed to expand sglist memory");
return -ENOMEM;
}
@@ -591,7 +591,7 @@ static int create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl,
rte_pktmbuf_data_len(m) : datalen;
zip_addr.u64 = rte_pktmbuf_iova(m);
if (unlikely(zip_addr.zda.addr_msb != sgtbl->addr_msb)) {
- NITROX_LOG(ERR, "zip_ptrs have different msb addr\n");
+ NITROX_LOG_LINE(ERR, "zip_ptrs have different msb addr");
return -ENOTSUP;
}
@@ -682,7 +682,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
xform = sr->op->private_xform;
if (unlikely(xform == NULL)) {
- NITROX_LOG(ERR, "Invalid stateless comp op\n");
+ NITROX_LOG_LINE(ERR, "Invalid stateless comp op");
return -EINVAL;
}
@@ -696,7 +696,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
xform->op == NITROX_COMP_OP_COMPRESS &&
sr->op->flush_flag != RTE_COMP_FLUSH_FULL &&
sr->op->flush_flag != RTE_COMP_FLUSH_FINAL)) {
- NITROX_LOG(ERR, "Invalid flush flag %d in stateless op\n",
+ NITROX_LOG_LINE(ERR, "Invalid flush flag %d in stateless op",
sr->op->flush_flag);
return -EINVAL;
}
@@ -805,7 +805,7 @@ static int process_zip_request(struct nitrox_softreq *sr)
if (unlikely(iptr_msb != optr_msb || iptr_msb != rptr_msb ||
(xform->history_window && (iptr_msb != hptr_msb)) ||
(xform->context && (iptr_msb != cptr_msb)))) {
- NITROX_LOG(ERR, "addr_msb is not same for all addresses\n");
+ NITROX_LOG_LINE(ERR, "addr_msb is not same for all addresses");
return -ENOTSUP;
}
@@ -861,7 +861,7 @@ static int post_process_zip_stateless(struct nitrox_softreq *sr,
if (unlikely(zip_res->w2.compcode != NITROX_CC_SUCCESS)) {
struct rte_comp_op *op = sr->op;
- NITROX_LOG(ERR, "Dequeue error 0x%x\n",
+ NITROX_LOG_LINE(ERR, "Dequeue error 0x%x",
zip_res->w2.compcode);
if (zip_res->w2.compcode == NITROX_CC_STOP ||
zip_res->w2.compcode == NITROX_CC_DTRUNC)
@@ -877,7 +877,7 @@ static int post_process_zip_stateless(struct nitrox_softreq *sr,
output_unused_bytes = sr->dst.total_bytes - zip_res->w1.tbyteswritten;
if (unlikely(xform->op == NITROX_COMP_OP_DECOMPRESS &&
output_unused_bytes < NITROX_ZIP_MAX_ONFSIZE)) {
- NITROX_LOG(ERR, "TOL %d, Total bytes written %d\n",
+ NITROX_LOG_LINE(ERR, "TOL %d, Total bytes written %d",
sr->dst.total_bytes, zip_res->w1.tbyteswritten);
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
sr->op->consumed = 0;
@@ -908,7 +908,7 @@ static int update_history(struct rte_mbuf *mbuf, uint32_t off, uint16_t datalen,
off -= rte_pktmbuf_data_len(m);
if (unlikely(!m)) {
- NITROX_LOG(ERR, "Failed to update history. Invalid mbuf\n");
+ NITROX_LOG_LINE(ERR, "Failed to update history. Invalid mbuf");
return -EINVAL;
}
@@ -928,7 +928,7 @@ static int update_history(struct rte_mbuf *mbuf, uint32_t off, uint16_t datalen,
}
if (unlikely(datalen != 0)) {
- NITROX_LOG(ERR, "Failed to update history. Invalid datalen\n");
+ NITROX_LOG_LINE(ERR, "Failed to update history. Invalid datalen");
return -EINVAL;
}
@@ -955,11 +955,11 @@ static int post_process_zip_stateful(struct nitrox_softreq *sr,
sr->op->produced = 0;
xform->hlen = 0;
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
- NITROX_LOG(ERR, "Dequeue compress DTRUNC error\n");
+ NITROX_LOG_LINE(ERR, "Dequeue compress DTRUNC error");
return 0;
} else if (unlikely(zip_res->w2.compcode == NITROX_CC_STOP)) {
sr->op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
- NITROX_LOG(NOTICE, "Dequeue decompress dynamic STOP\n");
+ NITROX_LOG_LINE(NOTICE, "Dequeue decompress dynamic STOP");
} else if (zip_res->w2.compcode == NITROX_CC_SUCCESS) {
sr->op->status = RTE_COMP_OP_STATUS_SUCCESS;
} else {
@@ -968,14 +968,14 @@ static int post_process_zip_stateful(struct nitrox_softreq *sr,
xform->exbits = 0;
xform->bf = true;
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
- NITROX_LOG(ERR, "Dequeue error 0x%x\n",
+ NITROX_LOG_LINE(ERR, "Dequeue error 0x%x",
zip_res->w2.compcode);
return -EFAULT;
}
if (xform->op == NITROX_COMP_OP_COMPRESS) {
if (zip_res->w1.tbytesread < xform->hlen) {
- NITROX_LOG(ERR, "Invalid bytesread\n");
+ NITROX_LOG_LINE(ERR, "Invalid bytesread");
reset_nitrox_xform(xform);
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
return -EFAULT;
@@ -1068,7 +1068,7 @@ nitrox_check_comp_req(struct nitrox_softreq *sr, struct rte_comp_op **op)
zip_res = zip_result_to_cpu64(&sr->zip_res);
if (zip_res.w2.compcode == NITROX_CC_NOTDONE) {
if (rte_get_timer_cycles() >= sr->timeout) {
- NITROX_LOG(ERR, "Op timedout\n");
+ NITROX_LOG_LINE(ERR, "Op timedout");
sr->op->status = RTE_COMP_OP_STATUS_ERROR;
err = -ETIMEDOUT;
goto exit;
@@ -1166,7 +1166,7 @@ static void req_pool_obj_init(struct rte_mempool *mp, void *arg, void *obj,
sizeof(*sr->dst.sgl) * NITROX_ZIP_SGL_COUNT,
8, mp->socket_id);
if (sr->src.sgl == NULL || sr->dst.sgl == NULL) {
- NITROX_LOG(ERR, "Failed to allocate zip_sgl memory\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate zip_sgl memory");
*err = -ENOMEM;
}
@@ -1192,7 +1192,7 @@ nitrox_comp_req_pool_create(struct rte_compressdev *dev, uint32_t nobjs,
64, 0, NULL, NULL, req_pool_obj_init, &err,
socket_id, 0);
if (unlikely(!mp))
- NITROX_LOG(ERR, "Failed to create req pool, qid %d, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create req pool, qid %d, err %d",
qp_id, rte_errno);
if (unlikely(err)) {
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 03652d3ade..da70121d91 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -79,7 +79,7 @@ nitrox_sym_dev_config(struct rte_cryptodev *cdev,
struct nitrox_device *ndev = sym_dev->ndev;
if (config->nb_queue_pairs > ndev->nr_queues) {
- NITROX_LOG(ERR, "Invalid queue pairs, max supported %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid queue pairs, max supported %d",
ndev->nr_queues);
return -EINVAL;
}
@@ -177,9 +177,9 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
struct nitrox_qp *qp = NULL;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
@@ -194,7 +194,7 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!qp) {
- NITROX_LOG(ERR, "Failed to allocate nitrox qp\n");
+ NITROX_LOG_LINE(ERR, "Failed to allocate nitrox qp");
return -ENOMEM;
}
@@ -212,7 +212,7 @@ nitrox_sym_dev_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
goto req_pool_err;
cdev->data->queue_pairs[qp_id] = qp;
- NITROX_LOG(DEBUG, "queue %d setup done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d setup done", qp_id);
return 0;
req_pool_err:
@@ -230,21 +230,21 @@ nitrox_sym_dev_qp_release(struct rte_cryptodev *cdev, uint16_t qp_id)
struct nitrox_qp *qp;
int err;
- NITROX_LOG(DEBUG, "queue %d\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d", qp_id);
if (qp_id >= ndev->nr_queues) {
- NITROX_LOG(ERR, "queue %u invalid, max queues supported %d\n",
+ NITROX_LOG_LINE(ERR, "queue %u invalid, max queues supported %d",
qp_id, ndev->nr_queues);
return -EINVAL;
}
qp = cdev->data->queue_pairs[qp_id];
if (!qp) {
- NITROX_LOG(DEBUG, "queue %u already freed\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %u already freed", qp_id);
return 0;
}
if (!nitrox_qp_is_empty(qp)) {
- NITROX_LOG(ERR, "queue %d not empty\n", qp_id);
+ NITROX_LOG_LINE(ERR, "queue %d not empty", qp_id);
return -EAGAIN;
}
@@ -252,7 +252,7 @@ nitrox_sym_dev_qp_release(struct rte_cryptodev *cdev, uint16_t qp_id)
err = nitrox_qp_release(qp, ndev->bar_addr);
nitrox_sym_req_pool_free(qp->sr_mp);
rte_free(qp);
- NITROX_LOG(DEBUG, "queue %d release done\n", qp_id);
+ NITROX_LOG_LINE(DEBUG, "queue %d release done", qp_id);
return err;
}
@@ -280,7 +280,7 @@ get_crypto_chain_order(const struct rte_crypto_sym_xform *xform)
RTE_CRYPTO_CIPHER_OP_DECRYPT) {
res = NITROX_CHAIN_AUTH_CIPHER;
} else {
- NITROX_LOG(ERR, "auth op %d, cipher op %d\n",
+ NITROX_LOG_LINE(ERR, "auth op %d, cipher op %d",
xform->auth.op, xform->next->cipher.op);
}
}
@@ -294,7 +294,7 @@ get_crypto_chain_order(const struct rte_crypto_sym_xform *xform)
RTE_CRYPTO_AUTH_OP_GENERATE) {
res = NITROX_CHAIN_CIPHER_AUTH;
} else {
- NITROX_LOG(ERR, "cipher op %d, auth op %d\n",
+ NITROX_LOG_LINE(ERR, "cipher op %d, auth op %d",
xform->cipher.op, xform->next->auth.op);
}
}
@@ -325,7 +325,7 @@ get_flexi_cipher_type(enum rte_crypto_cipher_algorithm algo, bool *is_aes)
break;
default:
type = CIPHER_INVALID;
- NITROX_LOG(ERR, "Algorithm not supported %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Algorithm not supported %d", algo);
break;
}
@@ -351,7 +351,7 @@ flexi_aes_keylen(size_t keylen, bool is_aes)
aes_keylen = 3;
break;
default:
- NITROX_LOG(ERR, "Invalid keylen %zu\n", keylen);
+ NITROX_LOG_LINE(ERR, "Invalid keylen %zu", keylen);
aes_keylen = -EINVAL;
break;
}
@@ -364,7 +364,7 @@ crypto_key_is_valid(struct rte_crypto_cipher_xform *xform,
struct flexi_crypto_context *fctx)
{
if (unlikely(xform->key.length > sizeof(fctx->crypto.key))) {
- NITROX_LOG(ERR, "Invalid crypto key length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid crypto key length %d",
xform->key.length);
return false;
}
@@ -427,7 +427,7 @@ get_flexi_auth_type(enum rte_crypto_auth_algorithm algo)
type = AUTH_SHA2_SHA256;
break;
default:
- NITROX_LOG(ERR, "Algorithm not supported %d\n", algo);
+ NITROX_LOG_LINE(ERR, "Algorithm not supported %d", algo);
type = AUTH_INVALID;
break;
}
@@ -440,12 +440,12 @@ auth_key_is_valid(const uint8_t *data, uint16_t length,
struct flexi_crypto_context *fctx)
{
if (unlikely(!data && length)) {
- NITROX_LOG(ERR, "Invalid auth key\n");
+ NITROX_LOG_LINE(ERR, "Invalid auth key");
return false;
}
if (unlikely(length > sizeof(fctx->auth.opad))) {
- NITROX_LOG(ERR, "Invalid auth key length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid auth key length %d",
length);
return false;
}
@@ -488,7 +488,7 @@ configure_aead_ctx(struct rte_crypto_aead_xform *xform,
struct flexi_crypto_context *fctx = &ctx->fctx;
if (unlikely(xform->aad_length > FLEXI_CRYPTO_MAX_AAD_LEN)) {
- NITROX_LOG(ERR, "AAD length %d not supported\n",
+ NITROX_LOG_LINE(ERR, "AAD length %d not supported",
xform->aad_length);
return -ENOTSUP;
}
@@ -515,14 +515,14 @@ configure_aead_ctx(struct rte_crypto_aead_xform *xform,
if (unlikely(xform->digest_length < 4 ||
xform->digest_length > 16 ||
(xform->digest_length & 1) == 1)) {
- NITROX_LOG(ERR, "Invalid digest length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid digest length %d",
xform->digest_length);
return -EINVAL;
}
L = 15 - xform->iv.length;
if (unlikely(L < 2 || L > 8)) {
- NITROX_LOG(ERR, "Invalid iv length %d\n",
+ NITROX_LOG_LINE(ERR, "Invalid iv length %d",
xform->iv.length);
return -EINVAL;
}
@@ -581,23 +581,23 @@ nitrox_sym_dev_sess_configure(struct rte_cryptodev *cdev __rte_unused,
aead_xform = &xform->aead;
break;
default:
- NITROX_LOG(ERR, "Crypto chain not supported\n");
+ NITROX_LOG_LINE(ERR, "Crypto chain not supported");
ret = -ENOTSUP;
goto err;
}
if (cipher_xform && unlikely(configure_cipher_ctx(cipher_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure cipher ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure cipher ctx");
goto err;
}
if (auth_xform && unlikely(configure_auth_ctx(auth_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure auth ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure auth ctx");
goto err;
}
if (aead_xform && unlikely(configure_aead_ctx(aead_xform, ctx))) {
- NITROX_LOG(ERR, "Failed to configure aead ctx\n");
+ NITROX_LOG_LINE(ERR, "Failed to configure aead ctx");
goto err;
}
@@ -763,7 +763,7 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
cdev = rte_cryptodev_pmd_create(name, &ndev->rte_sym_dev,
&init_params);
if (!cdev) {
- NITROX_LOG(ERR, "Cryptodev '%s' creation failed\n", name);
+ NITROX_LOG_LINE(ERR, "Cryptodev '%s' creation failed", name);
return -ENODEV;
}
@@ -787,7 +787,7 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
rte_cryptodev_pmd_probing_finish(cdev);
- NITROX_LOG(DEBUG, "Created cryptodev '%s', dev_id %d, drv_id %d\n",
+ NITROX_LOG_LINE(DEBUG, "Created cryptodev '%s', dev_id %d, drv_id %d",
cdev->data->name, cdev->data->dev_id, nitrox_sym_drv_id);
return 0;
}
diff --git a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
index 973bb5f424..7751c1a9fc 100644
--- a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
+++ b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
@@ -466,7 +466,7 @@ create_cipher_auth_sglist(struct nitrox_softreq *sr,
if (unlikely(
op->sym->cipher.data.offset + op->sym->cipher.data.length !=
op->sym->auth.data.offset + op->sym->auth.data.length)) {
- NITROX_LOG(ERR, "Auth only data after cipher data not supported\n");
+ NITROX_LOG_LINE(ERR, "Auth only data after cipher data not supported");
return -ENOTSUP;
}
@@ -679,7 +679,7 @@ softreq_copy_salt(struct nitrox_softreq *sr)
uint8_t *addr;
if (unlikely(ctx->iv.length < AES_GCM_SALT_SIZE)) {
- NITROX_LOG(ERR, "Invalid IV length %d\n", ctx->iv.length);
+ NITROX_LOG_LINE(ERR, "Invalid IV length %d", ctx->iv.length);
return -EINVAL;
}
@@ -829,8 +829,8 @@ nitrox_process_se_req(uint16_t qno, struct rte_crypto_op *op,
if (unlikely(op->sym->m_src->nb_segs > MAX_SUPPORTED_MBUF_SEGS ||
(op->sym->m_dst &&
op->sym->m_dst->nb_segs > MAX_SUPPORTED_MBUF_SEGS))) {
- NITROX_LOG(ERR, "Mbuf segments not supported. "
- "Max supported %d\n", MAX_SUPPORTED_MBUF_SEGS);
+ NITROX_LOG_LINE(ERR, "Mbuf segments not supported. "
+ "Max supported %d", MAX_SUPPORTED_MBUF_SEGS);
return -ENOTSUP;
}
@@ -865,7 +865,7 @@ nitrox_check_se_req(struct nitrox_softreq *sr, struct rte_crypto_op **op)
return -EAGAIN;
if (unlikely(err))
- NITROX_LOG(ERR, "Request err 0x%x, orh 0x%"PRIx64"\n", err,
+ NITROX_LOG_LINE(ERR, "Request err 0x%x, orh 0x%"PRIx64, err,
sr->resp.orh);
*op = sr->op;
@@ -901,7 +901,7 @@ nitrox_sym_req_pool_create(struct rte_cryptodev *cdev, uint32_t nobjs,
64, 0, NULL, NULL, req_pool_obj_init, NULL,
socket_id, 0);
if (unlikely(!mp))
- NITROX_LOG(ERR, "Failed to create req pool, qid %d, err %d\n",
+ NITROX_LOG_LINE(ERR, "Failed to create req pool, qid %d, err %d",
qp_id, rte_errno);
return mp;
diff --git a/drivers/dma/odm/odm.h b/drivers/dma/odm/odm.h
index 7303aa2955..274c21ef8d 100644
--- a/drivers/dma/odm/odm.h
+++ b/drivers/dma/odm/odm.h
@@ -66,17 +66,9 @@ extern int odm_logtype;
#define odm_read64(addr) rte_read64_relaxed((volatile void *)(addr))
#define odm_write64(val, addr) rte_write64_relaxed((val), (volatile void *)(addr))
-#define odm_err(...) \
- rte_log(RTE_LOG_ERR, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
-#define odm_info(...) \
- rte_log(RTE_LOG_INFO, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
-#define odm_debug(...) \
- rte_log(RTE_LOG_DEBUG, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__, ), __func__, __LINE__, \
+#define ODM_LOG(level, ...) \
+ rte_log(RTE_LOG_ ## level, odm_logtype, \
+ RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__,) "\n", __func__, __LINE__, \
RTE_FMT_TAIL(__VA_ARGS__, )))
/*
diff --git a/drivers/dma/odm/odm_dmadev.c b/drivers/dma/odm/odm_dmadev.c
index 57bd6923f1..a2f4ed9a8e 100644
--- a/drivers/dma/odm/odm_dmadev.c
+++ b/drivers/dma/odm/odm_dmadev.c
@@ -494,10 +494,10 @@ odm_dmadev_completed_status(void *dev_private, uint16_t vchan, const uint16_t nb
}
#ifdef ODM_DEBUG
- odm_debug("cring_head: 0x%" PRIx16, cring_head);
- odm_debug("Submitted: 0x%" PRIx64, vq->stats.submitted);
- odm_debug("Completed: 0x%" PRIx64, vq->stats.completed);
- odm_debug("Hardware count: 0x%" PRIx64, odm_read64(odm->rbase + ODM_VDMA_CNT(vchan)));
+ ODM_LOG(DEBUG, "cring_head: 0x%" PRIx16, cring_head);
+ ODM_LOG(DEBUG, "Submitted: 0x%" PRIx64, vq->stats.submitted);
+ ODM_LOG(DEBUG, "Completed: 0x%" PRIx64, vq->stats.completed);
+ ODM_LOG(DEBUG, "Hardware count: 0x%" PRIx64, odm_read64(odm->rbase + ODM_VDMA_CNT(vchan)));
#endif
for (cnt = 0; cnt < nb_cpls; cnt++) {
@@ -651,11 +651,11 @@ odm_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_dev
dmadev = rte_dma_pmd_allocate(name, pci_dev->device.numa_node, sizeof(*odm));
if (dmadev == NULL) {
- odm_err("DMA device allocation failed for %s", name);
+ ODM_LOG(ERR, "DMA device allocation failed for %s", name);
return -ENOMEM;
}
- odm_info("DMA device %s probed", name);
+ ODM_LOG(INFO, "DMA device %s probed", name);
odm = dmadev->data->dev_private;
dmadev->device = &pci_dev->device;
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 0b91f03956..f0a4998bdd 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -832,7 +832,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
evdev_dlb2_default_info.max_event_port_dequeue_depth;
if (device_version == DLB2_HW_V2_5) {
- DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d\n",
+ DLB2_LOG_LINE_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, credits=%d",
cfg->num_ldb_queues,
resources_asked->num_ldb_ports,
cfg->num_dir_ports,
@@ -840,7 +840,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
cfg->num_hist_list_entries,
cfg->num_credits);
} else {
- DLB2_LOG_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d\n",
+ DLB2_LOG_LINE_DBG("sched domain create - ldb_qs=%d, ldb_ports=%d, dir_ports=%d, atomic_inflights=%d, hist_list_entries=%d, ldb_credits=%d, dir_credits=%d",
cfg->num_ldb_queues,
resources_asked->num_ldb_ports,
cfg->num_dir_ports,
@@ -1250,7 +1250,7 @@ dlb2_hw_create_ldb_queue(struct dlb2_eventdev *dlb2,
queue->sched_type = sched_type;
queue->config_state = DLB2_CONFIGURED;
- DLB2_LOG_DBG("Created LB event queue %d, nb_inflights=%d, nb_seq=%d, qid inflights=%d\n",
+ DLB2_LOG_LINE_DBG("Created LB event queue %d, nb_inflights=%d, nb_seq=%d, qid inflights=%d",
qm_qid,
cfg.num_atomic_inflights,
cfg.num_sequence_numbers,
@@ -1586,7 +1586,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
qm_port_id = cfg.response.id;
- DLB2_LOG_DBG("dlb2: ev_port %d uses qm LB port %d <<<<<\n",
+ DLB2_LOG_LINE_DBG("dlb2: ev_port %d uses qm LB port %d <<<<<",
ev_port->id, qm_port_id);
qm_port = &ev_port->qm_port;
@@ -1680,7 +1680,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
qm_port->credit_pool[DLB2_DIR_QUEUE] = &dlb2->dir_credit_pool;
qm_port->credit_pool[DLB2_LDB_QUEUE] = &dlb2->ldb_credit_pool;
- DLB2_LOG_DBG("dlb2: created ldb port %d, depth = %d, ldb credits=%d, dir credits=%d\n",
+ DLB2_LOG_LINE_DBG("dlb2: created ldb port %d, depth = %d, ldb credits=%d, dir credits=%d",
qm_port_id,
dequeue_depth,
qm_port->ldb_credits,
@@ -1689,7 +1689,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
qm_port->credits = credit_high_watermark;
qm_port->credit_pool[DLB2_COMBINED_POOL] = &dlb2->credit_pool;
- DLB2_LOG_DBG("dlb2: created ldb port %d, depth = %d, credits=%d\n",
+ DLB2_LOG_LINE_DBG("dlb2: created ldb port %d, depth = %d, credits=%d",
qm_port_id,
dequeue_depth,
qm_port->credits);
@@ -1809,7 +1809,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
qm_port_id = cfg.response.id;
- DLB2_LOG_DBG("dlb2: ev_port %d uses qm DIR port %d <<<<<\n",
+ DLB2_LOG_LINE_DBG("dlb2: ev_port %d uses qm DIR port %d <<<<<",
ev_port->id, qm_port_id);
qm_port = &ev_port->qm_port;
@@ -1881,7 +1881,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
qm_port->credit_pool[DLB2_DIR_QUEUE] = &dlb2->dir_credit_pool;
qm_port->credit_pool[DLB2_LDB_QUEUE] = &dlb2->ldb_credit_pool;
- DLB2_LOG_DBG("dlb2: created dir port %d, depth = %d cr=%d,%d\n",
+ DLB2_LOG_LINE_DBG("dlb2: created dir port %d, depth = %d cr=%d,%d",
qm_port_id,
dequeue_depth,
dir_credit_high_watermark,
@@ -1890,7 +1890,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
qm_port->credits = credit_high_watermark;
qm_port->credit_pool[DLB2_COMBINED_POOL] = &dlb2->credit_pool;
- DLB2_LOG_DBG("dlb2: created dir port %d, depth = %d cr=%d\n",
+ DLB2_LOG_LINE_DBG("dlb2: created dir port %d, depth = %d cr=%d",
qm_port_id,
dequeue_depth,
credit_high_watermark);
@@ -2089,7 +2089,7 @@ dlb2_hw_map_ldb_qid_to_port(struct dlb2_hw_dev *handle,
cfg.qid,
cfg.priority);
} else {
- DLB2_LOG_DBG("dlb2: mapped queue %d to qm_port %d\n",
+ DLB2_LOG_LINE_DBG("dlb2: mapped queue %d to qm_port %d",
qm_qid, qm_port_id);
}
@@ -2305,13 +2305,13 @@ dlb2_eventdev_port_link(struct rte_eventdev *dev, void *event_port,
* queues pointer.
*/
if (nb_links == 0) {
- DLB2_LOG_DBG("dlb2: nb_links is 0\n");
+ DLB2_LOG_LINE_DBG("dlb2: nb_links is 0");
return 0; /* Ignore and return success */
}
dlb2 = ev_port->dlb2;
- DLB2_LOG_DBG("Linking %u queues to %s port %d\n",
+ DLB2_LOG_LINE_DBG("Linking %u queues to %s port %d",
nb_links,
ev_port->qm_port.is_directed ? "DIR" : "LDB",
ev_port->id);
@@ -2408,7 +2408,7 @@ dlb2_event_queue_detach_ldb(struct dlb2_eventdev *dlb2,
* It blindly attempts to unmap all queues.
*/
if (i == DLB2_MAX_NUM_QIDS_PER_LDB_CQ) {
- DLB2_LOG_DBG("dlb2: ignoring LB QID %d not mapped for qm_port %d.\n",
+ DLB2_LOG_LINE_DBG("dlb2: ignoring LB QID %d not mapped for qm_port %d.",
ev_queue->qm_queue.id,
ev_port->qm_port.id);
return 0;
@@ -2441,12 +2441,12 @@ dlb2_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,
}
if (queues == NULL || nb_unlinks == 0) {
- DLB2_LOG_DBG("dlb2: queues is NULL or nb_unlinks is 0\n");
+ DLB2_LOG_LINE_DBG("dlb2: queues is NULL or nb_unlinks is 0");
return 0; /* Ignore and return success */
}
if (ev_port->qm_port.is_directed) {
- DLB2_LOG_DBG("dlb2: ignore unlink from dir port %d\n",
+ DLB2_LOG_LINE_DBG("dlb2: ignore unlink from dir port %d",
ev_port->id);
rte_errno = 0;
return nb_unlinks; /* as if success */
@@ -2651,7 +2651,7 @@ dlb2_eventdev_start(struct rte_eventdev *dev)
}
dlb2->run_state = DLB2_RUN_STATE_STARTED;
- DLB2_LOG_DBG("dlb2: sched_domain_start completed OK\n");
+ DLB2_LOG_LINE_DBG("dlb2: sched_domain_start completed OK");
return 0;
}
@@ -2746,7 +2746,7 @@ dlb2_check_enqueue_hw_ldb_credits(struct dlb2_port *qm_port)
DLB2_INC_STAT(
qm_port->ev_port->stats.traffic.tx_nospc_ldb_hw_credits,
1);
- DLB2_LOG_DBG("ldb credits exhausted\n");
+ DLB2_LOG_LINE_DBG("ldb credits exhausted");
return 1; /* credits exhausted */
}
}
@@ -2765,7 +2765,7 @@ dlb2_check_enqueue_hw_dir_credits(struct dlb2_port *qm_port)
DLB2_INC_STAT(
qm_port->ev_port->stats.traffic.tx_nospc_dir_hw_credits,
1);
- DLB2_LOG_DBG("dir credits exhausted\n");
+ DLB2_LOG_LINE_DBG("dir credits exhausted");
return 1; /* credits exhausted */
}
}
@@ -2783,7 +2783,7 @@ dlb2_check_enqueue_hw_credits(struct dlb2_port *qm_port)
if (unlikely(qm_port->cached_credits == 0)) {
DLB2_INC_STAT(
qm_port->ev_port->stats.traffic.tx_nospc_hw_credits, 1);
- DLB2_LOG_DBG("credits exhausted\n");
+ DLB2_LOG_LINE_DBG("credits exhausted");
return 1; /* credits exhausted */
}
}
@@ -2817,7 +2817,7 @@ dlb2_consume_qe_immediate(struct dlb2_port *qm_port, int num)
dlb2_movntdq_single(port_data->pp_addr, qe);
- DLB2_LOG_DBG("dlb2: consume immediate - %d QEs\n", num);
+ DLB2_LOG_LINE_DBG("dlb2: consume immediate - %d QEs", num);
qm_port->owed_tokens = 0;
@@ -2888,7 +2888,7 @@ dlb2_event_enqueue_prep(struct dlb2_eventdev_port *ev_port,
}
switch (ev->sched_type) {
case RTE_SCHED_TYPE_ORDERED:
- DLB2_LOG_DBG("dlb2: put_qe: RTE_SCHED_TYPE_ORDERED\n");
+ DLB2_LOG_LINE_DBG("dlb2: put_qe: RTE_SCHED_TYPE_ORDERED");
if (qm_queue->sched_type != RTE_SCHED_TYPE_ORDERED) {
DLB2_LOG_ERR("dlb2: tried to send ordered event to unordered queue %d\n",
*queue_id);
@@ -2898,11 +2898,11 @@ dlb2_event_enqueue_prep(struct dlb2_eventdev_port *ev_port,
*sched_type = DLB2_SCHED_ORDERED;
break;
case RTE_SCHED_TYPE_ATOMIC:
- DLB2_LOG_DBG("dlb2: put_qe: RTE_SCHED_TYPE_ATOMIC\n");
+ DLB2_LOG_LINE_DBG("dlb2: put_qe: RTE_SCHED_TYPE_ATOMIC");
*sched_type = DLB2_SCHED_ATOMIC;
break;
case RTE_SCHED_TYPE_PARALLEL:
- DLB2_LOG_DBG("dlb2: put_qe: RTE_SCHED_TYPE_PARALLEL\n");
+ DLB2_LOG_LINE_DBG("dlb2: put_qe: RTE_SCHED_TYPE_PARALLEL");
if (qm_queue->sched_type == RTE_SCHED_TYPE_ORDERED)
*sched_type = DLB2_SCHED_ORDERED;
else
@@ -2930,7 +2930,7 @@ dlb2_event_enqueue_prep(struct dlb2_eventdev_port *ev_port,
}
cached_credits = &qm_port->cached_credits;
}
- DLB2_LOG_DBG("dlb2: put_qe: RTE_SCHED_TYPE_DIRECTED\n");
+ DLB2_LOG_LINE_DBG("dlb2: put_qe: RTE_SCHED_TYPE_DIRECTED");
*sched_type = DLB2_SCHED_DIRECTED;
}
@@ -4450,7 +4450,7 @@ dlb2_eventdev_stop(struct rte_eventdev *dev)
rte_spinlock_lock(&dlb2->qm_instance.resource_lock);
if (dlb2->run_state == DLB2_RUN_STATE_STOPPED) {
- DLB2_LOG_DBG("Internal error: already stopped\n");
+ DLB2_LOG_LINE_DBG("Internal error: already stopped");
rte_spinlock_unlock(&dlb2->qm_instance.resource_lock);
return;
} else if (dlb2->run_state != DLB2_RUN_STATE_STARTED) {
diff --git a/drivers/event/dlb2/dlb2_log.h b/drivers/event/dlb2/dlb2_log.h
index 81908af71f..201c88a98b 100644
--- a/drivers/event/dlb2/dlb2_log.h
+++ b/drivers/event/dlb2/dlb2_log.h
@@ -19,7 +19,7 @@ extern int eventdev_dlb2_log_level;
DLB2_LOG_IMPL(ERR, fmt, ## args)
/* remove debug logs at compile time unless actually debugging */
-#define DLB2_LOG_DBG(fmt, args...) \
- RTE_LOG_DP(DEBUG, EVENTDEV_DLB2, fmt, ## args)
+#define DLB2_LOG_LINE_DBG(fmt, args...) \
+ RTE_LOG_DP(DEBUG, EVENTDEV_DLB2, fmt "\n", ## args)
#endif /* _DLB2_EVDEV_LOG_H_ */
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 3d15250e11..b3576e5f42 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -289,7 +289,7 @@ dlb2_alloc_coherent_aligned(const struct rte_memzone **mz, uintptr_t *phys,
*mz = rte_memzone_reserve_aligned(mz_name, size, socket_id,
RTE_MEMZONE_IOVA_CONTIG, align);
if (*mz == NULL) {
- DLB2_LOG_DBG("Unable to allocate DMA memory of size %zu bytes - %s\n",
+ DLB2_LOG_LINE_DBG("Unable to allocate DMA memory of size %zu bytes - %s",
size, rte_strerror(rte_errno));
*phys = 0;
return NULL;
@@ -716,7 +716,7 @@ dlb2_eventdev_pci_init(struct rte_eventdev *eventdev)
int q;
const void *probe_args = NULL;
- DLB2_LOG_DBG("Enter with dev_id=%d socket_id=%d",
+ DLB2_LOG_LINE_DBG("Enter with dev_id=%d socket_id=%d",
eventdev->data->dev_id, eventdev->data->socket_id);
for (q = 0; q < DLB2_MAX_NUM_PORTS_ALL; q++)
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index fe4ddb3e30..01b7a99ba1 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -304,11 +304,11 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev)
extern int event_dsw_logtype;
#define RTE_LOGTYPE_EVENT_DSW event_dsw_logtype
-#define DSW_LOG_DP(level, fmt, args...) \
- RTE_LOG_DP(level, EVENT_DSW, "%s() line %u: " fmt, \
+#define DSW_LOG_DP_LINE(level, fmt, args...) \
+ RTE_LOG_DP(level, EVENT_DSW, "%s() line %u: " fmt "\n", \
__func__, __LINE__, ## args)
-#define DSW_LOG_DP_PORT(level, port_id, fmt, args...) \
- DSW_LOG_DP(level, "<Port %d> " fmt, port_id, ## args)
+#define DSW_LOG_DP_PORT_LINE(level, port_id, fmt, args...) \
+ DSW_LOG_DP_LINE(level, "<Port %d> " fmt, port_id, ## args)
#endif
diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 33f741990f..67e630ffcb 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -59,7 +59,7 @@ dsw_port_acquire_credits(struct dsw_evdev *dsw, struct dsw_port *port,
return false;
}
- DSW_LOG_DP_PORT(DEBUG, port->id, "Acquired %d tokens from pool.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id, "Acquired %d tokens from pool.",
acquired_credits);
port->inflight_credits += acquired_credits;
@@ -85,8 +85,8 @@ dsw_port_return_credits(struct dsw_evdev *dsw, struct dsw_port *port,
return_credits,
rte_memory_order_relaxed);
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Returned %d tokens to pool.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Returned %d tokens to pool.",
return_credits);
}
}
@@ -264,8 +264,8 @@ dsw_port_add_paused_flows(struct dsw_port *port, struct dsw_queue_flow *qfs,
for (i = 0; i < qfs_len; i++) {
struct dsw_queue_flow *qf = &qfs[i];
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Pausing queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Pausing queue_id %d flow_hash %d.",
qf->queue_id, qf->flow_hash);
port->paused_flows[port->paused_flows_len] = *qf;
@@ -290,8 +290,8 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
port->paused_flows[last_idx];
port->paused_flows_len--;
- DSW_LOG_DP_PORT(DEBUG, port->id,
- "Unpausing queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id,
+ "Unpausing queue_id %d flow_hash %d.",
target_qf->queue_id,
target_qf->flow_hash);
@@ -299,8 +299,8 @@ dsw_port_remove_paused_flow(struct dsw_port *port,
}
}
- DSW_LOG_DP_PORT(ERR, port->id,
- "Failed to unpause queue_id %d flow_hash %d.\n",
+ DSW_LOG_DP_PORT_LINE(ERR, port->id,
+ "Failed to unpause queue_id %d flow_hash %d.",
target_qf->queue_id, target_qf->flow_hash);
RTE_VERIFY(0);
}
@@ -519,9 +519,9 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
if (candidate_weight < 0)
return false;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Selected queue_id %d "
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Selected queue_id %d "
"flow_hash %d (with flow load %d) for migration "
- "to port %d.\n", candidate_qf->queue_id,
+ "to port %d.", candidate_qf->queue_id,
candidate_qf->flow_hash,
DSW_LOAD_TO_PERCENT(candidate_flow_load),
candidate_port_id);
@@ -566,9 +566,9 @@ dsw_select_emigration_targets(struct dsw_evdev *dsw,
}
if (*targets_len == 0)
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
"For the %d flows considered, no target port "
- "was found.\n", num_bursts);
+ "was found.", num_bursts);
}
static uint8_t
@@ -585,8 +585,8 @@ dsw_schedule(struct dsw_evdev *dsw, uint8_t queue_id, uint16_t flow_hash)
*/
port_id = rte_bsf64(queue->serving_ports);
- DSW_LOG_DP(DEBUG, "Event with queue_id %d flow_hash %d is scheduled "
- "to port %d.\n", queue_id, flow_hash, port_id);
+ DSW_LOG_DP_LINE(DEBUG, "Event with queue_id %d flow_hash %d is scheduled "
+ "to port %d.", queue_id, flow_hash, port_id);
return port_id;
}
@@ -774,8 +774,8 @@ dsw_port_end_emigration(struct dsw_evdev *dsw, struct dsw_port *port,
continue;
}
- DSW_LOG_DP_PORT(DEBUG, port->id, "Migration completed for "
- "queue_id %d flow_hash %d.\n", queue_id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, port->id, "Migration completed for "
+ "queue_id %d flow_hash %d.", queue_id,
flow_hash);
}
@@ -844,27 +844,27 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
if (dsw->num_ports == 1)
return;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Considering emigration.");
/* For simplicity, postpone migration if there are still
* events to consume in the in_buffer (from the last
* emigration).
*/
if (source_port->in_buffer_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are still "
- "events in the input buffer.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "There are still "
+ "events in the input buffer.");
return;
}
if (source_port->migration_state != DSW_MIGRATION_STATE_IDLE) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
- "Emigration already in progress.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
+ "Emigration already in progress.");
return;
}
if (seen_events_len < DSW_MAX_EVENTS_RECORDED) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Not enough events "
- "are recorded to allow for a migration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Not enough events "
+ "are recorded to allow for a migration.");
return;
}
@@ -873,8 +873,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
* leading to wasted CPU cycles (e.g., sorting queue flows).
*/
if (source_port->paused_events_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Paused events on "
- "port. Postponing any migrations.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Paused events on "
+ "port. Postponing any migrations.");
return;
}
@@ -890,8 +890,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
rte_atomic_load_explicit(&source_port->load,
rte_memory_order_relaxed);
if (source_port_load < DSW_MIN_SOURCE_LOAD_FOR_MIGRATION) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
- "Load %d is below threshold level %d.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
+ "Load %d is below threshold level %d.",
DSW_LOAD_TO_PERCENT(source_port_load),
DSW_LOAD_TO_PERCENT(DSW_MIN_SOURCE_LOAD_FOR_MIGRATION));
return;
@@ -904,9 +904,9 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
dsw_retrieve_port_loads(dsw, port_loads,
DSW_MAX_TARGET_LOAD_FOR_MIGRATION);
if (!any_port_below_limit) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id,
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id,
"Candidate target ports are all too highly "
- "loaded.\n");
+ "loaded.");
return;
}
@@ -917,8 +917,8 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
* only (known) flow.
*/
if (num_bursts < 2) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Only a single flow "
- "queue_id %d flow_hash %d has been seen.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Only a single flow "
+ "queue_id %d flow_hash %d has been seen.",
bursts[0].queue_flow.queue_id,
bursts[0].queue_flow.flow_hash);
return;
@@ -980,8 +980,8 @@ dsw_port_continue_emigration(struct dsw_evdev *dsw,
* unpause.
*/
if (source_port->paused_events_len > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "There are events in "
- "the pause buffer. Aborting migration.\n");
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "There are events in "
+ "the pause buffer. Aborting migration.");
dsw_port_abort_migration(source_port);
return;
}
@@ -1339,8 +1339,8 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
bool enough_credits;
uint16_t i;
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Attempting to enqueue %d "
- "events.\n", events_len);
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Attempting to enqueue %d "
+ "events.", events_len);
dsw_port_bg_process(dsw, source_port);
@@ -1414,8 +1414,8 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
dsw_port_queue_enqueue_stats(source_port, event->queue_id);
}
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "%d non-release events "
- "accepted.\n", num_new + num_forward);
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "%d non-release events "
+ "accepted.", num_new + num_forward);
return (num_new + num_forward + num_release);
}
@@ -1581,7 +1581,7 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
dsw_port_note_op(source_port, dequeued);
if (dequeued > 0) {
- DSW_LOG_DP_PORT(DEBUG, source_port->id, "Dequeued %d events.\n",
+ DSW_LOG_DP_PORT_LINE(DEBUG, source_port->id, "Dequeued %d events.",
dequeued);
/* One potential optimization one might think of is to
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 0bc0d9a55a..676006ce0d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -63,10 +63,10 @@
#endif
RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
+#define RTE_LOGTYPE_NET_AF_XDP af_xdp_logtype
-#define AF_XDP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_xdp_logtype, \
- "%s(): " fmt, __func__, ##args)
+#define AF_XDP_LOG_LINE(level, fmt, args...) \
+ RTE_LOG(level, NET_AF_XDP, "%s(): " fmt "\n", __func__, ##args)
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
@@ -243,7 +243,7 @@ reserve_fill_queue_zc(struct xsk_umem_info *umem, uint16_t reserve_size,
if (unlikely(!xsk_ring_prod__reserve(fq, reserve_size, &idx))) {
for (i = 0; i < reserve_size; i++)
rte_pktmbuf_free(bufs[i]);
- AF_XDP_LOG(DEBUG, "Failed to reserve enough fq descs.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to reserve enough fq descs.");
return -1;
}
@@ -273,12 +273,12 @@ reserve_fill_queue_cp(struct xsk_umem_info *umem, uint16_t reserve_size,
if (rte_ring_dequeue_bulk(umem->buf_ring, addrs, reserve_size, NULL)
!= reserve_size) {
- AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to get enough buffers for fq.");
return -1;
}
if (unlikely(!xsk_ring_prod__reserve(fq, reserve_size, &idx))) {
- AF_XDP_LOG(DEBUG, "Failed to reserve enough fq descs.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to reserve enough fq descs.");
rte_ring_enqueue_bulk(umem->buf_ring, addrs,
reserve_size, NULL);
return -1;
@@ -342,8 +342,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
/* allocate bufs for fill queue replenishment after rx */
if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) {
- AF_XDP_LOG(DEBUG,
- "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG,
+ "Failed to get enough buffers for fq.");
/* rollback cached_cons which is added by
* xsk_ring_cons__peek
*/
@@ -888,7 +888,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
&xdp_stats, &optlen) : -1;
if (ret != 0) {
- AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+ AF_XDP_LOG_LINE(ERR, "getsockopt() failed for XDP_STATISTICS.");
return -1;
}
stats->imissed += xdp_stats.rx_dropped - rxq->stats.imissed_offset;
@@ -919,7 +919,7 @@ eth_stats_reset(struct rte_eth_dev *dev)
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
&xdp_stats, &optlen) : -1;
if (ret != 0) {
- AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+ AF_XDP_LOG_LINE(ERR, "getsockopt() failed for XDP_STATISTICS.");
return -1;
}
internals->rx_queues[i].stats.imissed_offset = xdp_stats.rx_dropped;
@@ -944,14 +944,14 @@ remove_xdp_program(struct pmd_internals *internals)
ret = bpf_xdp_query_id(internals->if_index, XDP_FLAGS_UPDATE_IF_NOEXIST,
&curr_prog_id);
if (ret != 0) {
- AF_XDP_LOG(ERR, "bpf_xdp_query_id failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_xdp_query_id failed");
return ret;
}
ret = bpf_xdp_detach(internals->if_index, XDP_FLAGS_UPDATE_IF_NOEXIST,
NULL);
if (ret != 0)
- AF_XDP_LOG(ERR, "bpf_xdp_detach failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_xdp_detach failed");
return ret;
}
@@ -971,14 +971,14 @@ remove_xdp_program(struct pmd_internals *internals)
ret = bpf_get_link_xdp_id(internals->if_index, &curr_prog_id,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret != 0) {
- AF_XDP_LOG(ERR, "bpf_get_link_xdp_id failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_get_link_xdp_id failed");
return ret;
}
ret = bpf_set_link_xdp_fd(internals->if_index, -1,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret != 0)
- AF_XDP_LOG(ERR, "bpf_set_link_xdp_fd failed\n");
+ AF_XDP_LOG_LINE(ERR, "bpf_set_link_xdp_fd failed");
return ret;
}
@@ -1013,7 +1013,7 @@ eth_dev_close(struct rte_eth_dev *dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
goto out;
- AF_XDP_LOG(INFO, "Closing AF_XDP ethdev on numa socket %u\n",
+ AF_XDP_LOG_LINE(INFO, "Closing AF_XDP ethdev on numa socket %u",
rte_socket_id());
for (i = 0; i < internals->queue_cnt; i++) {
@@ -1038,7 +1038,7 @@ eth_dev_close(struct rte_eth_dev *dev)
dev->data->mac_addrs = NULL;
if (remove_xdp_program(internals) != 0)
- AF_XDP_LOG(ERR, "Error while removing XDP program.\n");
+ AF_XDP_LOG_LINE(ERR, "Error while removing XDP program.");
if (internals->shared_umem) {
struct internal_list *list;
@@ -1076,7 +1076,7 @@ ctx_exists(struct pkt_rx_queue *rxq, const char *ifname,
if (rxq->xsk_queue_idx == list_rxq->xsk_queue_idx &&
!strncmp(ifname, list_ifname, IFNAMSIZ)) {
- AF_XDP_LOG(ERR, "ctx %s,%i already exists, cannot share umem\n",
+ AF_XDP_LOG_LINE(ERR, "ctx %s,%i already exists, cannot share umem",
ifname, rxq->xsk_queue_idx);
exists = true;
}
@@ -1149,7 +1149,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
if (umem != NULL &&
rte_atomic_load_explicit(&umem->refcnt, rte_memory_order_acquire) <
umem->max_xsks) {
- AF_XDP_LOG(INFO, "%s,qid%i sharing UMEM\n",
+ AF_XDP_LOG_LINE(INFO, "%s,qid%i sharing UMEM",
internals->if_name, rxq->xsk_queue_idx);
rte_atomic_fetch_add_explicit(&umem->refcnt, 1, rte_memory_order_acquire);
}
@@ -1167,18 +1167,18 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0,
rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate umem info");
return NULL;
}
umem->mb_pool = mb_pool;
ret = rte_mempool_get_mem_range(mb_pool, &range);
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed(%d) to get range from mempool\n", ret);
+ AF_XDP_LOG_LINE(ERR, "Failed(%d) to get range from mempool", ret);
goto err;
}
if (!range.is_contiguous) {
- AF_XDP_LOG(ERR, "Can't mapped to umem as mempool is not contiguous\n");
+ AF_XDP_LOG_LINE(ERR, "Can't mapped to umem as mempool is not contiguous");
goto err;
}
/*
@@ -1190,7 +1190,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
ret = xsk_umem__create(&umem->umem, aligned_addr, umem_size,
&rxq->fq, &rxq->cq, &usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem [%d]: [%s]\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to create umem [%d]: [%s]",
errno, strerror(errno));
goto err;
}
@@ -1199,7 +1199,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
if (internals->shared_umem) {
umem->max_xsks = mb_pool->populated_size /
ETH_AF_XDP_NUM_BUFFERS;
- AF_XDP_LOG(INFO, "Max xsks for UMEM %s: %u\n",
+ AF_XDP_LOG_LINE(INFO, "Max xsks for UMEM %s: %u",
mb_pool->name, umem->max_xsks);
}
@@ -1231,7 +1231,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate umem info");
return NULL;
}
@@ -1242,7 +1242,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
rte_socket_id(),
0x0);
if (umem->buf_ring == NULL) {
- AF_XDP_LOG(ERR, "Failed to create rte_ring\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create rte_ring");
goto err;
}
@@ -1257,7 +1257,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
rte_socket_id(), RTE_MEMZONE_IOVA_CONTIG,
getpagesize());
if (mz == NULL) {
- AF_XDP_LOG(ERR, "Failed to reserve memzone for af_xdp umem.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve memzone for af_xdp umem.");
goto err;
}
umem->mz = mz;
@@ -1268,7 +1268,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
&usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create umem");
goto err;
}
@@ -1285,11 +1285,11 @@ get_pinned_map(const char *dp_path, int *map_fd)
{
*map_fd = bpf_obj_get(dp_path);
if (!*map_fd) {
- AF_XDP_LOG(ERR, "Failed to find xsks_map in %s\n", dp_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to find xsks_map in %s", dp_path);
return -1;
}
- AF_XDP_LOG(INFO, "Successfully retrieved map %s with fd %d\n",
+ AF_XDP_LOG_LINE(INFO, "Successfully retrieved map %s with fd %d",
dp_path, *map_fd);
return 0;
@@ -1303,7 +1303,7 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
prog_fd = load_program(prog_path, &obj);
if (prog_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to load program %s\n", prog_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to load program %s", prog_path);
return -1;
}
@@ -1313,7 +1313,7 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
*/
*map = bpf_object__find_map_by_name(obj, "xsks_map");
if (!*map) {
- AF_XDP_LOG(ERR, "Failed to find xsks_map in %s\n", prog_path);
+ AF_XDP_LOG_LINE(ERR, "Failed to find xsks_map in %s", prog_path);
return -1;
}
@@ -1321,12 +1321,12 @@ load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map **map)
ret = link_xdp_prog_with_dev(if_index, prog_fd,
XDP_FLAGS_UPDATE_IF_NOEXIST);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to set prog fd %d on interface\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to set prog fd %d on interface",
prog_fd);
return -1;
}
- AF_XDP_LOG(INFO, "Successfully loaded XDP program %s with fd %d\n",
+ AF_XDP_LOG_LINE(INFO, "Successfully loaded XDP program %s with fd %d",
prog_path, prog_fd);
return 0;
@@ -1343,7 +1343,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_PREFER_BUSY_POLL,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_PREFER_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_PREFER_BUSY_POLL");
goto err_prefer;
}
@@ -1351,7 +1351,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL, (void *)&sock_opt,
sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_BUSY_POLL");
goto err_timeout;
}
@@ -1359,9 +1359,9 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL_BUDGET,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(DEBUG, "Failed to set SO_BUSY_POLL_BUDGET\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to set SO_BUSY_POLL_BUDGET");
} else {
- AF_XDP_LOG(INFO, "Busy polling budget set to: %u\n",
+ AF_XDP_LOG_LINE(INFO, "Busy polling budget set to: %u",
rxq->busy_budget);
return 0;
}
@@ -1373,7 +1373,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_BUSY_POLL, (void *)&sock_opt,
sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed to unset SO_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to unset SO_BUSY_POLL");
return -1;
}
@@ -1382,7 +1382,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)
ret = setsockopt(fd, SOL_SOCKET, SO_PREFER_BUSY_POLL,
(void *)&sock_opt, sizeof(sock_opt));
if (ret < 0) {
- AF_XDP_LOG(ERR, "Failed to unset SO_PREFER_BUSY_POLL\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to unset SO_PREFER_BUSY_POLL");
return -1;
}
@@ -1398,7 +1398,7 @@ init_uds_sock(struct sockaddr_un *server, const char *dp_path)
sock = socket(AF_UNIX, SOCK_SEQPACKET, 0);
if (sock < 0) {
- AF_XDP_LOG(ERR, "Failed to opening stream socket\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to opening stream socket");
return -1;
}
@@ -1407,7 +1407,7 @@ init_uds_sock(struct sockaddr_un *server, const char *dp_path)
if (connect(sock, (struct sockaddr *)server, sizeof(struct sockaddr_un)) < 0) {
close(sock);
- AF_XDP_LOG(ERR, "Error connecting stream socket errno = [%d]: [%s]\n",
+ AF_XDP_LOG_LINE(ERR, "Error connecting stream socket errno = [%d]: [%s]",
errno, strerror(errno));
return -1;
}
@@ -1492,7 +1492,7 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)
return 0;
if (msglen < 0) {
- AF_XDP_LOG(ERR, "recvmsg failed, %s\n", strerror(errno));
+ AF_XDP_LOG_LINE(ERR, "recvmsg failed, %s", strerror(errno));
return -1;
}
@@ -1516,7 +1516,7 @@ make_request_dp(int sock, struct sockaddr_un *server, char *request,
{
int rval;
- AF_XDP_LOG(DEBUG, "Request: [%s]\n", request);
+ AF_XDP_LOG_LINE(DEBUG, "Request: [%s]", request);
/* if no file descriptor to send then directly write to socket.
* else use sendmsg() to send the file descriptor.
@@ -1527,16 +1527,16 @@ make_request_dp(int sock, struct sockaddr_un *server, char *request,
rval = send_msg(sock, request, req_fd, dp_path);
if (rval < 0) {
- AF_XDP_LOG(ERR, "Write error %s\n", strerror(errno));
+ AF_XDP_LOG_LINE(ERR, "Write error %s", strerror(errno));
return -1;
}
rval = read_msg(sock, response, server, out_fd);
if (rval <= 0) {
- AF_XDP_LOG(ERR, "Read error %d\n", rval);
+ AF_XDP_LOG_LINE(ERR, "Read error %d", rval);
return -1;
}
- AF_XDP_LOG(DEBUG, "Response: [%s]\n", request);
+ AF_XDP_LOG_LINE(DEBUG, "Response: [%s]", request);
return 0;
}
@@ -1569,21 +1569,21 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
snprintf(request, sizeof(request), "%s,%s", UDS_CONNECT_MSG, hostname);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
/* Expect /host_ok */
strlcpy(exp_resp, UDS_HOST_OK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
/* Request for "/version" */
strlcpy(request, UDS_VERSION_MSG, UDS_MAX_CMD_LEN);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
@@ -1591,12 +1591,12 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
snprintf(request, sizeof(request), "%s,%s", UDS_XSK_MAP_FD_MSG, if_name);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
if (out_fd < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
@@ -1605,7 +1605,7 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
/* Expect fd_ack with file descriptor */
strlcpy(exp_resp, UDS_FD_ACK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
@@ -1613,14 +1613,14 @@ uds_get_xskmap_fd(char *if_name, const char *dp_path)
strlcpy(request, UDS_FIN_MSG, UDS_MAX_CMD_LEN);
memset(response, 0, sizeof(response));
if (make_request_dp(sock, &server, request, NULL, response, &out_fd, dp_path) < 0) {
- AF_XDP_LOG(ERR, "Error in processing cmd [%s]\n", request);
+ AF_XDP_LOG_LINE(ERR, "Error in processing cmd [%s]", request);
goto err_close;
}
/* Connection close */
strlcpy(exp_resp, UDS_FIN_ACK_MSG, UDS_MAX_CMD_LEN);
if (check_response(response, exp_resp, strlen(exp_resp)) < 0) {
- AF_XDP_LOG(ERR, "Unexpected response [%s]\n", response);
+ AF_XDP_LOG_LINE(ERR, "Unexpected response [%s]", response);
goto err_close;
}
close(sock);
@@ -1653,7 +1653,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
ret = rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size);
if (ret) {
- AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
+ AF_XDP_LOG_LINE(DEBUG, "Failed to get enough buffers for fq.");
goto out_umem;
}
#endif
@@ -1662,7 +1662,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
if (reserve_before) {
ret = reserve_fill_queue(rxq->umem, reserve_size, fq_bufs, &rxq->fq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve fill queue.");
goto out_umem;
}
}
@@ -1691,7 +1691,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
internals->if_index,
&internals->map);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to load custom XDP program %s\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to load custom XDP program %s",
internals->prog_path);
goto out_umem;
}
@@ -1710,7 +1710,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
&txq->tx, &cfg);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create xsk socket.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to create xsk socket.");
goto out_umem;
}
@@ -1718,7 +1718,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
/* reserve fill queue of queues sharing UMEM */
ret = reserve_fill_queue(rxq->umem, reserve_size, fq_bufs, &rxq->fq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reserve fill queue.");
goto out_xsk;
}
}
@@ -1731,7 +1731,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
err = bpf_map_update_elem(bpf_map__fd(internals->map),
&rxq->xsk_queue_idx, &fd, 0);
if (err) {
- AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to insert xsk in map.");
goto out_xsk;
}
}
@@ -1743,28 +1743,28 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
/* get socket fd from AF_XDP Device Plugin */
map_fd = uds_get_xskmap_fd(internals->if_name, internals->dp_path);
if (map_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to receive xskmap fd from AF_XDP Device Plugin\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to receive xskmap fd from AF_XDP Device Plugin");
goto out_xsk;
}
} else {
/* get socket fd from AF_XDP plugin */
err = get_pinned_map(internals->dp_path, &map_fd);
if (err < 0 || map_fd < 0) {
- AF_XDP_LOG(ERR, "Failed to retrieve pinned map fd\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to retrieve pinned map fd");
goto out_xsk;
}
}
err = update_xskmap(rxq->xsk, map_fd, rxq->xsk_queue_idx);
if (err) {
- AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to insert xsk in map.");
goto out_xsk;
}
} else if (rxq->busy_budget) {
ret = configure_preferred_busy_poll(rxq);
if (ret) {
- AF_XDP_LOG(ERR, "Failed configure busy polling.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed configure busy polling.");
goto out_xsk;
}
}
@@ -1795,7 +1795,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
rxq = &internals->rx_queues[rx_queue_id];
- AF_XDP_LOG(INFO, "Set up rx queue, rx queue id: %d, xsk queue id: %d\n",
+ AF_XDP_LOG_LINE(INFO, "Set up rx queue, rx queue id: %d, xsk queue id: %d",
rx_queue_id, rxq->xsk_queue_idx);
#ifndef XDP_UMEM_UNALIGNED_CHUNK_FLAG
@@ -1807,7 +1807,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
data_size = ETH_AF_XDP_FRAME_SIZE;
if (data_size > buf_size) {
- AF_XDP_LOG(ERR, "%s: %d bytes will not fit in mbuf (%d bytes)\n",
+ AF_XDP_LOG_LINE(ERR, "%s: %d bytes will not fit in mbuf (%d bytes)",
dev->device->name, data_size, buf_size);
ret = -ENOMEM;
goto err;
@@ -1817,13 +1817,13 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
rxq->mb_pool = mb_pool;
if (xsk_configure(internals, rxq, nb_rx_desc)) {
- AF_XDP_LOG(ERR, "Failed to configure xdp socket\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to configure xdp socket");
ret = -EINVAL;
goto err;
}
if (!rxq->busy_budget)
- AF_XDP_LOG(DEBUG, "Preferred busy polling not enabled\n");
+ AF_XDP_LOG_LINE(DEBUG, "Preferred busy polling not enabled");
rxq->fds[0].fd = xsk_socket__fd(rxq->xsk);
rxq->fds[0].events = POLLIN;
@@ -1965,7 +1965,7 @@ parse_budget_arg(const char *key __rte_unused,
*i = strtol(value, &end, 10);
if (*i < 0 || *i > UINT16_MAX) {
- AF_XDP_LOG(ERR, "Invalid busy_budget %i, must be >= 0 and <= %u\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid busy_budget %i, must be >= 0 and <= %u",
*i, UINT16_MAX);
return -EINVAL;
}
@@ -1983,7 +1983,7 @@ parse_integer_arg(const char *key __rte_unused,
*i = strtol(value, &end, 10);
if (*i < 0) {
- AF_XDP_LOG(ERR, "Argument has to be positive.\n");
+ AF_XDP_LOG_LINE(ERR, "Argument has to be positive.");
return -EINVAL;
}
@@ -1998,7 +1998,7 @@ parse_name_arg(const char *key __rte_unused,
char *name = extra_args;
if (strnlen(value, IFNAMSIZ) > IFNAMSIZ - 1) {
- AF_XDP_LOG(ERR, "Invalid name %s, should be less than %u bytes.\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid name %s, should be less than %u bytes.",
value, IFNAMSIZ);
return -EINVAL;
}
@@ -2016,13 +2016,13 @@ parse_prog_arg(const char *key __rte_unused,
char *path = extra_args;
if (strnlen(value, PATH_MAX) == PATH_MAX) {
- AF_XDP_LOG(ERR, "Invalid path %s, should be less than %u bytes.\n",
+ AF_XDP_LOG_LINE(ERR, "Invalid path %s, should be less than %u bytes.",
value, PATH_MAX);
return -EINVAL;
}
if (access(value, F_OK) != 0) {
- AF_XDP_LOG(ERR, "Error accessing %s: %s\n",
+ AF_XDP_LOG_LINE(ERR, "Error accessing %s: %s",
value, strerror(errno));
return -EINVAL;
}
@@ -2194,8 +2194,8 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
#ifndef ETH_AF_XDP_SHARED_UMEM
if (shared_umem) {
- AF_XDP_LOG(ERR, "Shared UMEM feature not available. "
- "Check kernel and libbpf version\n");
+ AF_XDP_LOG_LINE(ERR, "Shared UMEM feature not available. "
+ "Check kernel and libbpf version");
goto err_free_internals;
}
#endif
@@ -2207,13 +2207,13 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
if (xdp_get_channels_info(if_name, &internals->max_queue_cnt,
&internals->combined_queue_cnt)) {
- AF_XDP_LOG(ERR, "Failed to get channel info of interface: %s\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to get channel info of interface: %s",
if_name);
goto err_free_internals;
}
if (queue_cnt > internals->combined_queue_cnt) {
- AF_XDP_LOG(ERR, "Specified queue count %d is larger than combined queue count %d.\n",
+ AF_XDP_LOG_LINE(ERR, "Specified queue count %d is larger than combined queue count %d.",
queue_cnt, internals->combined_queue_cnt);
goto err_free_internals;
}
@@ -2222,7 +2222,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
sizeof(struct pkt_rx_queue) * queue_cnt,
0, numa_node);
if (internals->rx_queues == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate memory for rx queues.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate memory for rx queues.");
goto err_free_internals;
}
@@ -2230,7 +2230,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
sizeof(struct pkt_tx_queue) * queue_cnt,
0, numa_node);
if (internals->tx_queues == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate memory for tx queues.\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to allocate memory for tx queues.");
goto err_free_rx;
}
for (i = 0; i < queue_cnt; i++) {
@@ -2250,7 +2250,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
rte_zmalloc_socket(name, sizeof(struct pmd_process_private),
RTE_CACHE_LINE_SIZE, numa_node);
if (process_private == NULL) {
- AF_XDP_LOG(ERR, "Failed to alloc memory for process private\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to alloc memory for process private");
goto err_free_tx;
}
@@ -2275,7 +2275,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,
process_private->rxq_xsk_fds[i] = -1;
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
- AF_XDP_LOG(INFO, "Zero copy between umem and mbuf enabled.\n");
+ AF_XDP_LOG_LINE(INFO, "Zero copy between umem and mbuf enabled.");
#endif
return eth_dev;
@@ -2310,17 +2310,17 @@ afxdp_mp_request_fds(const char *name, struct rte_eth_dev *dev)
request.len_param = sizeof(*request_param);
/* Send the request and receive the reply */
- AF_XDP_LOG(DEBUG, "Sending multi-process IPC request for %s\n", name);
+ AF_XDP_LOG_LINE(DEBUG, "Sending multi-process IPC request for %s", name);
ret = rte_mp_request_sync(&request, &replies, &timeout);
if (ret < 0 || replies.nb_received != 1) {
- AF_XDP_LOG(ERR, "Failed to request fds from primary: %d\n",
+ AF_XDP_LOG_LINE(ERR, "Failed to request fds from primary: %d",
rte_errno);
return -1;
}
reply = replies.msgs;
- AF_XDP_LOG(DEBUG, "Received multi-process IPC reply for %s\n", name);
+ AF_XDP_LOG_LINE(DEBUG, "Received multi-process IPC reply for %s", name);
if (dev->data->nb_rx_queues != reply->num_fds) {
- AF_XDP_LOG(ERR, "Incorrect number of fds received: %d != %d\n",
+ AF_XDP_LOG_LINE(ERR, "Incorrect number of fds received: %d != %d",
reply->num_fds, dev->data->nb_rx_queues);
return -EINVAL;
}
@@ -2346,13 +2346,13 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
const char *request_name = request_param->port_name;
int i;
- AF_XDP_LOG(DEBUG, "Received multi-process IPC request for %s\n",
+ AF_XDP_LOG_LINE(DEBUG, "Received multi-process IPC request for %s",
request_name);
/* Find the requested port */
dev = rte_eth_dev_get_by_name(request_name);
if (!dev) {
- AF_XDP_LOG(ERR, "Failed to get port id for %s\n", request_name);
+ AF_XDP_LOG_LINE(ERR, "Failed to get port id for %s", request_name);
return -1;
}
process_private = dev->process_private;
@@ -2360,7 +2360,7 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
/* Populate the reply with the xsk fd for each queue */
reply.num_fds = 0;
if (dev->data->nb_rx_queues > RTE_MP_MAX_FD_NUM) {
- AF_XDP_LOG(ERR, "Number of rx queues (%d) exceeds max number of fds (%d)\n",
+ AF_XDP_LOG_LINE(ERR, "Number of rx queues (%d) exceeds max number of fds (%d)",
dev->data->nb_rx_queues, RTE_MP_MAX_FD_NUM);
return -EINVAL;
}
@@ -2373,10 +2373,10 @@ afxdp_mp_send_fds(const struct rte_mp_msg *request, const void *peer)
strlcpy(reply_param->port_name, request_name,
sizeof(reply_param->port_name));
reply.len_param = sizeof(*reply_param);
- AF_XDP_LOG(DEBUG, "Sending multi-process IPC reply for %s\n",
+ AF_XDP_LOG_LINE(DEBUG, "Sending multi-process IPC reply for %s",
reply_param->port_name);
if (rte_mp_reply(&reply, peer) < 0) {
- AF_XDP_LOG(ERR, "Failed to reply to multi-process IPC request\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to reply to multi-process IPC request");
return -1;
}
return 0;
@@ -2399,12 +2399,12 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev = NULL;
const char *name = rte_vdev_device_name(dev);
- AF_XDP_LOG(INFO, "Initializing pmd_af_xdp for %s\n", name);
+ AF_XDP_LOG_LINE(INFO, "Initializing pmd_af_xdp for %s", name);
if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
eth_dev = rte_eth_dev_attach_secondary(name);
if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to probe %s\n", name);
+ AF_XDP_LOG_LINE(ERR, "Failed to probe %s", name);
return -EINVAL;
}
eth_dev->dev_ops = &ops;
@@ -2417,8 +2417,8 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
RTE_CACHE_LINE_SIZE,
eth_dev->device->numa_node);
if (eth_dev->process_private == NULL) {
- AF_XDP_LOG(ERR,
- "Failed to alloc memory for process private\n");
+ AF_XDP_LOG_LINE(ERR,
+ "Failed to alloc memory for process private");
return -ENOMEM;
}
@@ -2432,7 +2432,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
kvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_arguments);
if (kvlist == NULL) {
- AF_XDP_LOG(ERR, "Invalid kvargs key\n");
+ AF_XDP_LOG_LINE(ERR, "Invalid kvargs key");
return -EINVAL;
}
@@ -2440,25 +2440,25 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
&xsk_queue_cnt, &shared_umem, prog_path,
&busy_budget, &force_copy, &use_cni, &use_pinned_map,
dp_path) < 0) {
- AF_XDP_LOG(ERR, "Invalid kvargs value\n");
+ AF_XDP_LOG_LINE(ERR, "Invalid kvargs value");
return -EINVAL;
}
if (use_cni && use_pinned_map) {
- AF_XDP_LOG(ERR, "When '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG);
return -EINVAL;
}
if ((use_cni || use_pinned_map) && busy_budget > 0) {
- AF_XDP_LOG(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG,
ETH_AF_XDP_BUDGET_ARG);
return -EINVAL;
}
if ((use_cni || use_pinned_map) && strnlen(prog_path, PATH_MAX)) {
- AF_XDP_LOG(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid\n",
+ AF_XDP_LOG_LINE(ERR, "When '%s' or '%s' parameter is used, '%s' parameter is not valid",
ETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_PINNED_MAP_ARG,
ETH_AF_XDP_PROG_ARG);
return -EINVAL;
@@ -2466,25 +2466,25 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
if (use_cni && !strnlen(dp_path, PATH_MAX)) {
snprintf(dp_path, sizeof(dp_path), "%s/%s/%s", DP_BASE_PATH, if_name, DP_UDS_SOCK);
- AF_XDP_LOG(INFO, "'%s' parameter not provided, setting value to '%s'\n",
+ AF_XDP_LOG_LINE(INFO, "'%s' parameter not provided, setting value to '%s'",
ETH_AF_XDP_DP_PATH_ARG, dp_path);
}
if (use_pinned_map && !strnlen(dp_path, PATH_MAX)) {
snprintf(dp_path, sizeof(dp_path), "%s/%s/%s", DP_BASE_PATH, if_name, DP_XSK_MAP);
- AF_XDP_LOG(INFO, "'%s' parameter not provided, setting value to '%s'\n",
+ AF_XDP_LOG_LINE(INFO, "'%s' parameter not provided, setting value to '%s'",
ETH_AF_XDP_DP_PATH_ARG, dp_path);
}
if ((!use_cni && !use_pinned_map) && strnlen(dp_path, PATH_MAX)) {
- AF_XDP_LOG(ERR, "'%s' parameter is set, but '%s' or '%s' were not enabled\n",
+ AF_XDP_LOG_LINE(ERR, "'%s' parameter is set, but '%s' or '%s' were not enabled",
ETH_AF_XDP_DP_PATH_ARG, ETH_AF_XDP_USE_CNI_ARG,
ETH_AF_XDP_USE_PINNED_MAP_ARG);
return -EINVAL;
}
if (strlen(if_name) == 0) {
- AF_XDP_LOG(ERR, "Network interface must be specified\n");
+ AF_XDP_LOG_LINE(ERR, "Network interface must be specified");
return -EINVAL;
}
@@ -2509,7 +2509,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
busy_budget, force_copy, use_cni, use_pinned_map,
dp_path);
if (eth_dev == NULL) {
- AF_XDP_LOG(ERR, "Failed to init internals\n");
+ AF_XDP_LOG_LINE(ERR, "Failed to init internals");
return -1;
}
@@ -2517,7 +2517,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
if (!afxdp_dev_count) {
ret = rte_mp_action_register(ETH_AF_XDP_MP_KEY, afxdp_mp_send_fds);
if (ret < 0 && rte_errno != ENOTSUP) {
- AF_XDP_LOG(ERR, "%s: Failed to register multi-process IPC callback: %s\n",
+ AF_XDP_LOG_LINE(ERR, "%s: Failed to register multi-process IPC callback: %s",
name, strerror(rte_errno));
return -1;
}
@@ -2534,7 +2534,7 @@ rte_pmd_af_xdp_remove(struct rte_vdev_device *dev)
{
struct rte_eth_dev *eth_dev = NULL;
- AF_XDP_LOG(INFO, "Removing AF_XDP ethdev on numa socket %u\n",
+ AF_XDP_LOG_LINE(INFO, "Removing AF_XDP ethdev on numa socket %u",
rte_socket_id());
if (dev == NULL)
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 6733462c86..ed44c1645d 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -240,18 +240,18 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
unsigned int count;
int ret;
- PMD_DRV_LOG(DEBUG, "Sending request %u to host\n", request->req_id);
+ PMD_DRV_LOG_LINE(DEBUG, "Sending request %u to host", request->req_id);
request->result = -ENOTSUP;
/* Discard any stale responses before starting a new request */
while (avp_fifo_get(avp->resp_q, (void **)&resp_addr, 1))
- PMD_DRV_LOG(DEBUG, "Discarding stale response\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Discarding stale response");
rte_memcpy(avp->sync_addr, request, sizeof(*request));
count = avp_fifo_put(avp->req_q, &avp->host_sync_addr, 1);
if (count < 1) {
- PMD_DRV_LOG(ERR, "Cannot send request %u to host\n",
+ PMD_DRV_LOG_LINE(ERR, "Cannot send request %u to host",
request->req_id);
ret = -EBUSY;
goto done;
@@ -268,7 +268,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
}
if (retry == 0) {
- PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
+ PMD_DRV_LOG_LINE(ERR, "Timeout while waiting for a response for %u",
request->req_id);
ret = -ETIME;
goto done;
@@ -278,7 +278,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
/* retrieve the response */
count = avp_fifo_get(avp->resp_q, (void **)&resp_addr, 1);
if ((count != 1) || (resp_addr != avp->host_sync_addr)) {
- PMD_DRV_LOG(ERR, "Invalid response from host, count=%u resp=%p host_sync_addr=%p\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid response from host, count=%u resp=%p host_sync_addr=%p",
count, resp_addr, avp->host_sync_addr);
ret = -ENODATA;
goto done;
@@ -288,7 +288,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
rte_memcpy(request, avp->sync_addr, sizeof(*request));
ret = 0;
- PMD_DRV_LOG(DEBUG, "Result %d received for request %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Result %d received for request %u",
request->result, request->req_id);
done:
@@ -383,7 +383,7 @@ avp_dev_translate_address(struct rte_eth_dev *eth_dev,
offset += (host_phys_addr - map->phys_addr);
addr = RTE_PTR_ADD(addr, (uintptr_t)offset);
- PMD_DRV_LOG(DEBUG, "Translating host physical 0x%" PRIx64 " to guest virtual 0x%p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Translating host physical 0x%" PRIx64 " to guest virtual 0x%p",
host_phys_addr, addr);
return addr;
@@ -425,7 +425,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
if ((resource->phys_addr == 0) || (resource->len == 0))
continue;
- PMD_DRV_LOG(DEBUG, "resource[%u]: phys=0x%" PRIx64 " len=%" PRIu64 " addr=%p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "resource[%u]: phys=0x%" PRIx64 " len=%" PRIu64 " addr=%p",
i, resource->phys_addr,
resource->len, resource->addr);
@@ -434,7 +434,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
memmap = (struct rte_avp_memmap_info *)resource->addr;
if ((memmap->magic != RTE_AVP_MEMMAP_MAGIC) ||
(memmap->version != RTE_AVP_MEMMAP_VERSION)) {
- PMD_DRV_LOG(ERR, "Invalid memmap magic 0x%08x and version %u\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid memmap magic 0x%08x and version %u",
memmap->magic, memmap->version);
return -EINVAL;
}
@@ -444,7 +444,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
info = (struct rte_avp_device_info *)resource->addr;
if ((info->magic != RTE_AVP_DEVICE_MAGIC) ||
avp_dev_version_check(info->version)) {
- PMD_DRV_LOG(ERR, "Invalid device info magic 0x%08x or version 0x%08x > 0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid device info magic 0x%08x or version 0x%08x > 0x%08x",
info->magic, info->version,
AVP_DPDK_DRIVER_VERSION);
return -EINVAL;
@@ -454,7 +454,7 @@ avp_dev_check_regions(struct rte_eth_dev *eth_dev)
case RTE_AVP_PCI_MEMORY_BAR:
case RTE_AVP_PCI_MMIO_BAR:
if (resource->addr == NULL) {
- PMD_DRV_LOG(ERR, "Missing address space for BAR%u\n",
+ PMD_DRV_LOG_LINE(ERR, "Missing address space for BAR%u",
i);
return -EINVAL;
}
@@ -476,13 +476,13 @@ avp_dev_detach(struct rte_eth_dev *eth_dev)
struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
int ret;
- PMD_DRV_LOG(NOTICE, "Detaching port %u from AVP device 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Detaching port %u from AVP device 0x%" PRIx64 "",
eth_dev->data->port_id, avp->device_id);
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(NOTICE, "port %u already detached\n",
+ PMD_DRV_LOG_LINE(NOTICE, "port %u already detached",
eth_dev->data->port_id);
ret = 0;
goto unlock;
@@ -491,7 +491,7 @@ avp_dev_detach(struct rte_eth_dev *eth_dev)
/* shutdown the device first so the host stops sending us packets. */
ret = avp_dev_ctrl_shutdown(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to send/recv shutdown to host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to send/recv shutdown to host, ret=%d",
ret);
avp->flags &= ~AVP_F_DETACHED;
goto unlock;
@@ -540,7 +540,7 @@ _avp_set_rx_queue_mappings(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
rxq->queue_limit = rxq->queue_base + queue_count - 1;
}
- PMD_DRV_LOG(DEBUG, "rxq %u at %p base %u limit %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "rxq %u at %p base %u limit %u",
rx_queue_id, rxq, rxq->queue_base, rxq->queue_limit);
rxq->queue_id = rxq->queue_base;
@@ -574,7 +574,7 @@ _avp_set_queue_counts(struct rte_eth_dev *eth_dev)
avp->num_rx_queues = RTE_MAX(host_info->min_rx_queues,
eth_dev->data->nb_rx_queues);
- PMD_DRV_LOG(DEBUG, "Requesting %u Tx and %u Rx queues from host\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Requesting %u Tx and %u Rx queues from host",
avp->num_tx_queues, avp->num_rx_queues);
}
@@ -586,13 +586,13 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
unsigned int i;
int ret;
- PMD_DRV_LOG(NOTICE, "Attaching port %u to AVP device 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Attaching port %u to AVP device 0x%" PRIx64 "",
eth_dev->data->port_id, avp->device_id);
rte_spinlock_lock(&avp->lock);
if (!(avp->flags & AVP_F_DETACHED)) {
- PMD_DRV_LOG(NOTICE, "port %u already attached\n",
+ PMD_DRV_LOG_LINE(NOTICE, "port %u already attached",
eth_dev->data->port_id);
ret = 0;
goto unlock;
@@ -611,7 +611,7 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
*/
ret = avp_dev_create(RTE_ETH_DEV_TO_PCI(eth_dev), eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to re-create AVP device, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-create AVP device, ret=%d",
ret);
goto unlock;
}
@@ -643,7 +643,7 @@ avp_dev_attach(struct rte_eth_dev *eth_dev)
ret = avp_dev_ctrl_set_config(eth_dev, &config);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Config request failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Config request failed by host, ret=%d",
ret);
goto unlock;
}
@@ -692,7 +692,7 @@ avp_dev_interrupt_handler(void *data)
ret = avp_dev_attach(eth_dev);
break;
default:
- PMD_DRV_LOG(ERR, "unexpected migration status, status=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "unexpected migration status, status=%u",
value);
ret = -EINVAL;
}
@@ -703,17 +703,17 @@ avp_dev_interrupt_handler(void *data)
RTE_PTR_ADD(registers,
RTE_AVP_MIGRATION_ACK_OFFSET));
- PMD_DRV_LOG(NOTICE, "AVP migration interrupt handled\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP migration interrupt handled");
}
if (status & ~RTE_AVP_MIGRATION_INTERRUPT_MASK)
- PMD_DRV_LOG(WARNING, "AVP unexpected interrupt, status=0x%08x\n",
+ PMD_DRV_LOG_LINE(WARNING, "AVP unexpected interrupt, status=0x%08x",
status);
/* re-enable UIO interrupt handling */
ret = rte_intr_ack(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to re-enable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-enable UIO interrupts, ret=%d",
ret);
/* continue */
}
@@ -732,7 +732,7 @@ avp_dev_enable_interrupts(struct rte_eth_dev *eth_dev)
/* enable UIO interrupt handling */
ret = rte_intr_enable(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to enable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to enable UIO interrupts, ret=%d",
ret);
return ret;
}
@@ -761,7 +761,7 @@ avp_dev_disable_interrupts(struct rte_eth_dev *eth_dev)
/* enable UIO interrupt handling */
ret = rte_intr_disable(pci_dev->intr_handle);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to disable UIO interrupts, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to disable UIO interrupts, ret=%d",
ret);
return ret;
}
@@ -780,7 +780,7 @@ avp_dev_setup_interrupts(struct rte_eth_dev *eth_dev)
avp_dev_interrupt_handler,
(void *)eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to register UIO interrupt callback, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to register UIO interrupt callback, ret=%d",
ret);
return ret;
}
@@ -826,7 +826,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
resource = &pci_dev->mem_resource[RTE_AVP_PCI_DEVICE_BAR];
if (resource->addr == NULL) {
- PMD_DRV_LOG(ERR, "BAR%u is not mapped\n",
+ PMD_DRV_LOG_LINE(ERR, "BAR%u is not mapped",
RTE_AVP_PCI_DEVICE_BAR);
return -EFAULT;
}
@@ -834,22 +834,22 @@ avp_dev_create(struct rte_pci_device *pci_dev,
if ((host_info->magic != RTE_AVP_DEVICE_MAGIC) ||
avp_dev_version_check(host_info->version)) {
- PMD_DRV_LOG(ERR, "Invalid AVP PCI device, magic 0x%08x version 0x%08x > 0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid AVP PCI device, magic 0x%08x version 0x%08x > 0x%08x",
host_info->magic, host_info->version,
AVP_DPDK_DRIVER_VERSION);
return -EINVAL;
}
- PMD_DRV_LOG(DEBUG, "AVP host device is v%u.%u.%u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host device is v%u.%u.%u",
RTE_AVP_GET_RELEASE_VERSION(host_info->version),
RTE_AVP_GET_MAJOR_VERSION(host_info->version),
RTE_AVP_GET_MINOR_VERSION(host_info->version));
- PMD_DRV_LOG(DEBUG, "AVP host supports %u to %u TX queue(s)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports %u to %u TX queue(s)",
host_info->min_tx_queues, host_info->max_tx_queues);
- PMD_DRV_LOG(DEBUG, "AVP host supports %u to %u RX queue(s)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports %u to %u RX queue(s)",
host_info->min_rx_queues, host_info->max_rx_queues);
- PMD_DRV_LOG(DEBUG, "AVP host supports features 0x%08x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host supports features 0x%08x",
host_info->features);
if (avp->magic != AVP_ETHDEV_MAGIC) {
@@ -876,7 +876,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
/* TODO... requires validation of host values */
if ((host_info->features & avp->features) != avp->features) {
- PMD_DRV_LOG(ERR, "AVP host features mismatched; 0x%08x, host=0x%08x\n",
+ PMD_DRV_LOG_LINE(ERR, "AVP host features mismatched; 0x%08x, host=0x%08x",
avp->features, host_info->features);
/* this should not be possible; continue for now */
}
@@ -886,9 +886,9 @@ avp_dev_create(struct rte_pci_device *pci_dev,
avp->device_id = host_info->device_id;
/* translate incoming host addresses to guest address space */
- PMD_DRV_LOG(DEBUG, "AVP first host tx queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host tx queue at 0x%" PRIx64 "",
host_info->tx_phys);
- PMD_DRV_LOG(DEBUG, "AVP first host alloc queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host alloc queue at 0x%" PRIx64 "",
host_info->alloc_phys);
for (i = 0; i < avp->max_tx_queues; i++) {
avp->tx_q[i] = avp_dev_translate_address(eth_dev,
@@ -898,9 +898,9 @@ avp_dev_create(struct rte_pci_device *pci_dev,
host_info->alloc_phys + (i * host_info->alloc_size));
}
- PMD_DRV_LOG(DEBUG, "AVP first host rx queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host rx queue at 0x%" PRIx64 "",
host_info->rx_phys);
- PMD_DRV_LOG(DEBUG, "AVP first host free queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP first host free queue at 0x%" PRIx64 "",
host_info->free_phys);
for (i = 0; i < avp->max_rx_queues; i++) {
avp->rx_q[i] = avp_dev_translate_address(eth_dev,
@@ -909,13 +909,13 @@ avp_dev_create(struct rte_pci_device *pci_dev,
host_info->free_phys + (i * host_info->free_size));
}
- PMD_DRV_LOG(DEBUG, "AVP host request queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host request queue at 0x%" PRIx64 "",
host_info->req_phys);
- PMD_DRV_LOG(DEBUG, "AVP host response queue at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host response queue at 0x%" PRIx64 "",
host_info->resp_phys);
- PMD_DRV_LOG(DEBUG, "AVP host sync address at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host sync address at 0x%" PRIx64 "",
host_info->sync_phys);
- PMD_DRV_LOG(DEBUG, "AVP host mbuf address at 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host mbuf address at 0x%" PRIx64 "",
host_info->mbuf_phys);
avp->req_q = avp_dev_translate_address(eth_dev, host_info->req_phys);
avp->resp_q = avp_dev_translate_address(eth_dev, host_info->resp_phys);
@@ -935,7 +935,7 @@ avp_dev_create(struct rte_pci_device *pci_dev,
* store the maximum packet length that is supported by the host.
*/
avp->max_rx_pkt_len = host_info->max_rx_pkt_len;
- PMD_DRV_LOG(DEBUG, "AVP host max receive packet length is %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP host max receive packet length is %u",
host_info->max_rx_pkt_len);
return 0;
@@ -966,7 +966,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
* be valid.
*/
if (eth_dev->data->scattered_rx) {
- PMD_DRV_LOG(NOTICE, "AVP device configured for chained mbufs\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP device configured for chained mbufs");
eth_dev->rx_pkt_burst = avp_recv_scattered_pkts;
eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts;
}
@@ -978,14 +978,14 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
/* Check current migration status */
if (avp_dev_migration_pending(eth_dev)) {
- PMD_DRV_LOG(ERR, "VM live migration operation in progress\n");
+ PMD_DRV_LOG_LINE(ERR, "VM live migration operation in progress");
return -EBUSY;
}
/* Check BAR resources */
ret = avp_dev_check_regions(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to validate BAR resources, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to validate BAR resources, ret=%d",
ret);
return ret;
}
@@ -993,14 +993,14 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
/* Enable interrupts */
ret = avp_dev_setup_interrupts(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to enable interrupts, ret=%d\n", ret);
+ PMD_DRV_LOG_LINE(ERR, "Failed to enable interrupts, ret=%d", ret);
return ret;
}
/* Handle each subtype */
ret = avp_dev_create(pci_dev, eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to create device, ret=%d\n", ret);
+ PMD_DRV_LOG_LINE(ERR, "Failed to create device, ret=%d", ret);
return ret;
}
@@ -1008,7 +1008,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
eth_dev->data->mac_addrs = rte_zmalloc("avp_ethdev",
RTE_ETHER_ADDR_LEN, 0);
if (eth_dev->data->mac_addrs == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate %d bytes needed to store MAC addresses\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate %d bytes needed to store MAC addresses",
RTE_ETHER_ADDR_LEN);
return -ENOMEM;
}
@@ -1101,7 +1101,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
struct avp_queue *rxq;
if (rx_queue_id >= eth_dev->data->nb_rx_queues) {
- PMD_DRV_LOG(ERR, "RX queue id is out of range: rx_queue_id=%u, nb_rx_queues=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX queue id is out of range: rx_queue_id=%u, nb_rx_queues=%u",
rx_queue_id, eth_dev->data->nb_rx_queues);
return -EINVAL;
}
@@ -1116,14 +1116,14 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
if (avp_dev_enable_scattered(eth_dev, avp)) {
if (!eth_dev->data->scattered_rx) {
- PMD_DRV_LOG(NOTICE, "AVP device configured for chained mbufs\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AVP device configured for chained mbufs");
eth_dev->data->scattered_rx = 1;
eth_dev->rx_pkt_burst = avp_recv_scattered_pkts;
eth_dev->tx_pkt_burst = avp_xmit_scattered_pkts;
}
}
- PMD_DRV_LOG(DEBUG, "AVP max_rx_pkt_len=(%u,%u) mbuf_size=(%u,%u)\n",
+ PMD_DRV_LOG_LINE(DEBUG, "AVP max_rx_pkt_len=(%u,%u) mbuf_size=(%u,%u)",
avp->max_rx_pkt_len,
eth_dev->data->mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN,
avp->host_mbuf_size,
@@ -1133,7 +1133,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
rxq = rte_zmalloc_socket("ethdev RX queue", sizeof(struct avp_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (rxq == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate new Rx queue object\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate new Rx queue object");
return -ENOMEM;
}
@@ -1145,7 +1145,7 @@ avp_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
/* setup the queue receive mapping for the current queue. */
_avp_set_rx_queue_mappings(eth_dev, rx_queue_id);
- PMD_DRV_LOG(DEBUG, "Rx queue %u setup at %p\n", rx_queue_id, rxq);
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue %u setup at %p", rx_queue_id, rxq);
(void)nb_rx_desc;
(void)rx_conf;
@@ -1163,7 +1163,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
struct avp_queue *txq;
if (tx_queue_id >= eth_dev->data->nb_tx_queues) {
- PMD_DRV_LOG(ERR, "TX queue id is out of range: tx_queue_id=%u, nb_tx_queues=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "TX queue id is out of range: tx_queue_id=%u, nb_tx_queues=%u",
tx_queue_id, eth_dev->data->nb_tx_queues);
return -EINVAL;
}
@@ -1172,7 +1172,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct avp_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (txq == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate new Tx queue object\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate new Tx queue object");
return -ENOMEM;
}
@@ -1186,7 +1186,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
txq->dev_data = eth_dev->data;
eth_dev->data->tx_queues[tx_queue_id] = (void *)txq;
- PMD_DRV_LOG(DEBUG, "Tx queue %u setup at %p\n", tx_queue_id, txq);
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue %u setup at %p", tx_queue_id, txq);
(void)nb_tx_desc;
(void)tx_conf;
@@ -1428,7 +1428,7 @@ avp_recv_scattered_pkts(void *rx_queue,
/* retrieve pending packets */
n = avp_fifo_get(rx_q, (void **)&avp_bufs, count);
- PMD_RX_LOG(DEBUG, "Receiving %u packets from Rx queue at %p\n",
+ PMD_RX_LOG_LINE(DEBUG, "Receiving %u packets from Rx queue at %p",
count, rx_q);
count = 0;
@@ -1525,7 +1525,7 @@ avp_recv_pkts(void *rx_queue,
/* retrieve pending packets */
n = avp_fifo_get(rx_q, (void **)&avp_bufs, count);
- PMD_RX_LOG(DEBUG, "Receiving %u packets from Rx queue at %p\n",
+ PMD_RX_LOG_LINE(DEBUG, "Receiving %u packets from Rx queue at %p",
count, rx_q);
count = 0;
@@ -1761,14 +1761,13 @@ avp_xmit_scattered_pkts(void *tx_queue,
return 0;
}
- PMD_TX_LOG(DEBUG, "Sending %u packets on Tx queue at %p\n",
+ PMD_TX_LOG_LINE(DEBUG, "Sending %u packets on Tx queue at %p",
nb_pkts, tx_q);
/* retrieve sufficient send buffers */
n = avp_fifo_get(alloc_q, (void **)&avp_bufs, segments);
if (unlikely(n != segments)) {
- PMD_TX_LOG(DEBUG, "Failed to allocate buffers "
- "n=%u, segments=%u, orig=%u\n",
+ PMD_TX_LOG_LINE(DEBUG, "Failed to allocate buffers n=%u, segments=%u, orig=%u",
n, segments, orig_nb_pkts);
txq->errors += orig_nb_pkts;
return 0;
@@ -1856,7 +1855,7 @@ avp_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
return 0;
}
- PMD_TX_LOG(DEBUG, "Sending %u packets on Tx queue at %p\n",
+ PMD_TX_LOG_LINE(DEBUG, "Sending %u packets on Tx queue at %p",
count, tx_q);
/* retrieve sufficient send buffers */
@@ -1987,7 +1986,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2003,7 +2002,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
RTE_ETH_VLAN_EXTEND_MASK);
ret = avp_vlan_offload_set(eth_dev, mask);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "VLAN offload set failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "VLAN offload set failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2019,7 +2018,7 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
ret = avp_dev_ctrl_set_config(eth_dev, &config);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Config request failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Config request failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2041,7 +2040,7 @@ avp_dev_start(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2049,7 +2048,7 @@ avp_dev_start(struct rte_eth_dev *eth_dev)
/* update link state */
ret = avp_dev_ctrl_set_link_state(eth_dev, 1);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Link state change failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Link state change failed by host, ret=%d",
ret);
goto unlock;
}
@@ -2078,7 +2077,7 @@ avp_dev_stop(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
ret = -ENOTSUP;
goto unlock;
}
@@ -2089,7 +2088,7 @@ avp_dev_stop(struct rte_eth_dev *eth_dev)
/* update link state */
ret = avp_dev_ctrl_set_link_state(eth_dev, 0);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Link state change failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Link state change failed by host, ret=%d",
ret);
}
@@ -2114,7 +2113,7 @@ avp_dev_close(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if (avp->flags & AVP_F_DETACHED) {
- PMD_DRV_LOG(ERR, "Operation not supported during VM live migration\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported during VM live migration");
goto unlock;
}
@@ -2124,14 +2123,14 @@ avp_dev_close(struct rte_eth_dev *eth_dev)
ret = avp_dev_disable_interrupts(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to disable interrupts\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to disable interrupts");
/* continue */
}
/* update device state */
ret = avp_dev_ctrl_shutdown(eth_dev);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Device shutdown failed by host, ret=%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Device shutdown failed by host, ret=%d",
ret);
/* continue */
}
@@ -2167,7 +2166,7 @@ avp_dev_promiscuous_enable(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if ((avp->flags & AVP_F_PROMISC) == 0) {
avp->flags |= AVP_F_PROMISC;
- PMD_DRV_LOG(DEBUG, "Promiscuous mode enabled on %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Promiscuous mode enabled on %u",
eth_dev->data->port_id);
}
rte_spinlock_unlock(&avp->lock);
@@ -2183,7 +2182,7 @@ avp_dev_promiscuous_disable(struct rte_eth_dev *eth_dev)
rte_spinlock_lock(&avp->lock);
if ((avp->flags & AVP_F_PROMISC) != 0) {
avp->flags &= ~AVP_F_PROMISC;
- PMD_DRV_LOG(DEBUG, "Promiscuous mode disabled on %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Promiscuous mode disabled on %u",
eth_dev->data->port_id);
}
rte_spinlock_unlock(&avp->lock);
@@ -2224,18 +2223,18 @@ avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
else
avp->features &= ~RTE_AVP_FEATURE_VLAN_OFFLOAD;
} else {
- PMD_DRV_LOG(ERR, "VLAN strip offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN strip offload not supported");
}
}
if (mask & RTE_ETH_VLAN_FILTER_MASK) {
if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
- PMD_DRV_LOG(ERR, "VLAN filter offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN filter offload not supported");
}
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
- PMD_DRV_LOG(ERR, "VLAN extend offload not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "VLAN extend offload not supported");
}
return 0;
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 574b720b30..3f2721df1a 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -8,24 +8,23 @@
#include <rte_log.h>
#ifdef RTE_LIBRTE_AVP_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt, __func__, ## args)
+#define PMD_RX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_AVP_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt, __func__, ## args)
+#define PMD_TX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
extern int avp_logtype_driver;
#define RTE_LOGTYPE_AVP_DRIVER avp_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
- "%s(): " fmt, __func__, ## args)
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AVP_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _AVP_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index ebe64295aa..9173a6fea6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -107,7 +107,7 @@ static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata,
return 0;
}
- PMD_DRV_LOG(ERR, "Mdio write operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "Mdio write operation timed out");
return -ETIMEDOUT;
}
@@ -154,7 +154,7 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata,
goto success;
}
- PMD_DRV_LOG(ERR, "Mdio read operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "Mdio read operation timed out");
return -ETIMEDOUT;
success:
@@ -272,7 +272,7 @@ static int axgbe_read_mmd_regs(struct axgbe_port *pdata, int prtad,
{
switch (pdata->vdata->xpcs_access) {
case AXGBE_XPCS_ACCESS_V1:
- PMD_DRV_LOG(ERR, "PHY_Version 1 is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "PHY_Version 1 is not supported");
return -1;
case AXGBE_XPCS_ACCESS_V2:
default:
@@ -285,7 +285,7 @@ static void axgbe_write_mmd_regs(struct axgbe_port *pdata, int prtad,
{
switch (pdata->vdata->xpcs_access) {
case AXGBE_XPCS_ACCESS_V1:
- PMD_DRV_LOG(ERR, "PHY_Version 1 is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "PHY_Version 1 is not supported");
return;
case AXGBE_XPCS_ACCESS_V2:
default:
@@ -369,7 +369,7 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, ehfc);
- PMD_DRV_LOG(DEBUG, "flow control %s for RXq%u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "flow control %s for RXq%u",
ehfc ? "enabled" : "disabled", i);
}
@@ -608,8 +608,8 @@ static int axgbe_update_vlan_hash_table(struct axgbe_port *pdata)
vid_valid = pdata->active_vlans[vid_idx];
vid_valid = (unsigned long)vid_valid >> (vid - (64 * vid_idx));
if (vid_valid & 1)
- PMD_DRV_LOG(DEBUG,
- "vid:%d pdata->active_vlans[%ld]=0x%lx\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vid:%d pdata->active_vlans[%ld]=0x%lx",
vid, vid_idx, pdata->active_vlans[vid_idx]);
else
continue;
@@ -617,13 +617,13 @@ static int axgbe_update_vlan_hash_table(struct axgbe_port *pdata)
vid_le = rte_cpu_to_le_16(vid);
crc = bitrev32(~axgbe_vid_crc32_le(vid_le)) >> 28;
vlan_hash_table |= (1 << crc);
- PMD_DRV_LOG(DEBUG, "crc = %d vlan_hash_table = 0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "crc = %d vlan_hash_table = 0x%x",
crc, vlan_hash_table);
}
/* Set the VLAN Hash Table filtering register */
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANHTR, VLHT, vlan_hash_table);
reg = AXGMAC_IOREAD(pdata, MAC_VLANHTR);
- PMD_DRV_LOG(DEBUG, "vlan_hash_table reg val = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan_hash_table reg val = 0x%x", reg);
return 0;
}
@@ -927,7 +927,7 @@ static int axgbe_config_rss(struct axgbe_port *pdata)
i % pdata->eth_dev->data->nb_rx_queues);
axgbe_rss_options(pdata);
if (axgbe_enable_rss(pdata)) {
- PMD_DRV_LOG(ERR, "Error in enabling RSS support\n");
+ PMD_DRV_LOG_LINE(ERR, "Error in enabling RSS support");
return -1;
}
} else {
@@ -1012,7 +1012,7 @@ static int wrapper_rx_desc_init(struct axgbe_port *pdata)
for (j = 0; j < rxq->nb_desc; j++) {
mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (mbuf == NULL) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed queue_id = %u, idx = %d\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed queue_id = %u, idx = %d",
(unsigned int)rxq->queue_id, j);
axgbe_dev_rx_queue_release(pdata->eth_dev, i);
return -ENOMEM;
@@ -1138,7 +1138,7 @@ static void axgbe_config_rx_fifo_size(struct axgbe_port *pdata)
axgbe_calculate_flow_control_threshold(pdata);
axgbe_config_flow_control_threshold(pdata);
- PMD_DRV_LOG(DEBUG, "%d Rx hardware queues, %d byte fifo per queue\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%d Rx hardware queues, %d byte fifo per queue",
pdata->rx_q_count, q_fifo_size);
}
@@ -1164,7 +1164,7 @@ static void axgbe_config_tx_fifo_size(struct axgbe_port *pdata)
for (i = 0; i < pdata->tx_q_count; i++)
AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_TQOMR, TQS, p_fifo);
- PMD_DRV_LOG(DEBUG, "%d Tx hardware queues, %d byte fifo per queue\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%d Tx hardware queues, %d byte fifo per queue",
pdata->tx_q_count, q_fifo_size);
}
@@ -1181,12 +1181,12 @@ static void axgbe_config_queue_mapping(struct axgbe_port *pdata)
for (i = 0, queue = 0; i < pdata->hw_feat.tc_cnt; i++) {
for (j = 0; j < qptc; j++) {
- PMD_DRV_LOG(DEBUG, "TXq%u mapped to TC%u\n", queue, i);
+ PMD_DRV_LOG_LINE(DEBUG, "TXq%u mapped to TC%u", queue, i);
AXGMAC_MTL_IOWRITE_BITS(pdata, queue, MTL_Q_TQOMR,
Q2TCMAP, i);
}
if (i < qptc_extra) {
- PMD_DRV_LOG(DEBUG, "TXq%u mapped to TC%u\n", queue, i);
+ PMD_DRV_LOG_LINE(DEBUG, "TXq%u mapped to TC%u", queue, i);
AXGMAC_MTL_IOWRITE_BITS(pdata, queue, MTL_Q_TQOMR,
Q2TCMAP, i);
}
@@ -1254,7 +1254,7 @@ void axgbe_set_mac_hash_table(struct axgbe_port *pdata, u8 *addr, bool add)
pdata->uc_hash_table[htable_index] &= ~htable_bitmask;
pdata->uc_hash_mac_addr--;
}
- PMD_DRV_LOG(DEBUG, "%s MAC hash table Bit %d at Index %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s MAC hash table Bit %d at Index %#x",
add ? "set" : "clear", (crc & 0x1f), htable_index);
AXGMAC_IOWRITE(pdata, MAC_HTR(htable_index),
@@ -1283,7 +1283,7 @@ void axgbe_set_mac_addn_addr(struct axgbe_port *pdata, u8 *addr, uint32_t index)
AXGMAC_SET_BITS(mac_addr_hi, MAC_MACA1HR, AE, 1);
}
- PMD_DRV_LOG(DEBUG, "%s mac address at %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s mac address at %#x",
addr ? "set" : "clear", index);
AXGMAC_IOWRITE(pdata, MAC_MACAHR(index), mac_addr_hi);
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 8b1f3b2742..17b7b5c543 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -319,14 +319,14 @@ axgbe_dev_interrupt_handler(void *param)
pdata->phy_if.an_isr(pdata);
/*DMA related interrupts*/
dma_isr = AXGMAC_IOREAD(pdata, DMA_ISR);
- PMD_DRV_LOG(DEBUG, "DMA_ISR=%#010x\n", dma_isr);
+ PMD_DRV_LOG_LINE(DEBUG, "DMA_ISR=%#010x", dma_isr);
if (dma_isr) {
if (dma_isr & 1) {
dma_ch_isr =
AXGMAC_DMA_IOREAD((struct axgbe_rx_queue *)
pdata->rx_queues[0],
DMA_CH_SR);
- PMD_DRV_LOG(DEBUG, "DMA_CH0_ISR=%#010x\n", dma_ch_isr);
+ PMD_DRV_LOG_LINE(DEBUG, "DMA_CH0_ISR=%#010x", dma_ch_isr);
AXGMAC_DMA_IOWRITE((struct axgbe_rx_queue *)
pdata->rx_queues[0],
DMA_CH_SR, dma_ch_isr);
@@ -378,17 +378,17 @@ axgbe_dev_start(struct rte_eth_dev *dev)
/* Multiqueue RSS */
ret = axgbe_dev_rx_mq_config(dev);
if (ret) {
- PMD_DRV_LOG(ERR, "Unable to config RX MQ\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to config RX MQ");
return ret;
}
ret = axgbe_phy_reset(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "phy reset failed\n");
+ PMD_DRV_LOG_LINE(ERR, "phy reset failed");
return ret;
}
ret = pdata->hw_if.init(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "dev_init failed\n");
+ PMD_DRV_LOG_LINE(ERR, "dev_init failed");
return ret;
}
@@ -510,7 +510,7 @@ axgbe_dev_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (index > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", index);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", index);
return -EINVAL;
}
axgbe_set_mac_addn_addr(pdata, (u8 *)mac_addr, index);
@@ -527,12 +527,12 @@ axgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
int ret;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (reta_size == 0 || reta_size > AXGBE_RSS_MAX_TABLE_SIZE) {
- PMD_DRV_LOG(ERR, "reta_size %d is not supported\n", reta_size);
+ PMD_DRV_LOG_LINE(ERR, "reta_size %d is not supported", reta_size);
return -EINVAL;
}
@@ -558,12 +558,12 @@ axgbe_dev_rss_reta_query(struct rte_eth_dev *dev,
unsigned int i, idx, shift;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (reta_size == 0 || reta_size > AXGBE_RSS_MAX_TABLE_SIZE) {
- PMD_DRV_LOG(ERR, "reta_size %d is not supported\n", reta_size);
+ PMD_DRV_LOG_LINE(ERR, "reta_size %d is not supported", reta_size);
return -EINVAL;
}
@@ -585,12 +585,12 @@ axgbe_dev_rss_hash_update(struct rte_eth_dev *dev,
int ret;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (rss_conf == NULL) {
- PMD_DRV_LOG(ERR, "rss_conf value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "rss_conf value isn't valid");
return -EINVAL;
}
@@ -628,12 +628,12 @@ axgbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct axgbe_port *pdata = dev->data->dev_private;
if (!pdata->rss_enable) {
- PMD_DRV_LOG(ERR, "RSS not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS not enabled");
return -ENOTSUP;
}
if (rss_conf == NULL) {
- PMD_DRV_LOG(ERR, "rss_conf value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "rss_conf value isn't valid");
return -EINVAL;
}
@@ -668,7 +668,7 @@ axgbe_dev_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (index > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", index);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", index);
return;
}
axgbe_set_mac_addn_addr(pdata, NULL, index);
@@ -685,7 +685,7 @@ axgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
uint32_t i;
if (nb_mc_addr > hw_feat->addn_mac) {
- PMD_DRV_LOG(ERR, "Invalid Index %d\n", nb_mc_addr);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Index %d", nb_mc_addr);
return -EINVAL;
}
@@ -711,7 +711,7 @@ axgbe_dev_uc_hash_table_set(struct rte_eth_dev *dev,
struct axgbe_hw_features *hw_feat = &pdata->hw_feat;
if (!hw_feat->hash_table_size) {
- PMD_DRV_LOG(ERR, "MAC Hash Table not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "MAC Hash Table not supported");
return -ENOTSUP;
}
@@ -735,7 +735,7 @@ axgbe_dev_uc_all_hash_table_set(struct rte_eth_dev *dev, uint8_t add)
uint32_t index;
if (!hw_feat->hash_table_size) {
- PMD_DRV_LOG(ERR, "MAC Hash Table not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "MAC Hash Table not supported");
return -ENOTSUP;
}
@@ -745,7 +745,7 @@ axgbe_dev_uc_all_hash_table_set(struct rte_eth_dev *dev, uint8_t add)
else
pdata->uc_hash_table[index] = 0;
- PMD_DRV_LOG(DEBUG, "%s MAC hash table at Index %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s MAC hash table at Index %#x",
add ? "set" : "clear", index);
AXGMAC_IOWRITE(pdata, MAC_HTR(index),
@@ -784,7 +784,7 @@ axgbe_dev_link_update(struct rte_eth_dev *dev,
RTE_ETH_LINK_SPEED_FIXED);
ret = rte_eth_linkstatus_set(dev, &link);
if (ret == 0)
- PMD_DRV_LOG(ERR, "Link status changed\n");
+ PMD_DRV_LOG_LINE(ERR, "Link status changed");
return ret;
}
@@ -1084,7 +1084,7 @@ axgbe_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
for (i = 0; i < n; i++) {
if (ids[i] >= AXGBE_XSTATS_COUNT) {
- PMD_DRV_LOG(ERR, "id value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "id value isn't valid");
return -1;
}
values[i] = values_copy[ids[i]];
@@ -1108,7 +1108,7 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
for (i = 0; i < size; i++) {
if (ids[i] >= AXGBE_XSTATS_COUNT) {
- PMD_DRV_LOG(ERR, "id value isn't valid\n");
+ PMD_DRV_LOG_LINE(ERR, "id value isn't valid");
return -1;
}
strcpy(xstats_names[i].name, xstats_names_copy[ids[i]].name);
@@ -1157,7 +1157,7 @@ axgbe_dev_stats_get(struct rte_eth_dev *dev,
+ rxq->rx_mbuf_alloc_failed;
stats->ierrors += rxq->errors;
} else {
- PMD_DRV_LOG(DEBUG, "Rx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1171,7 +1171,7 @@ axgbe_dev_stats_get(struct rte_eth_dev *dev,
stats->obytes += txq->bytes;
stats->oerrors += txq->errors;
} else {
- PMD_DRV_LOG(DEBUG, "Tx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1194,7 +1194,7 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
rxq->errors = 0;
rxq->rx_mbuf_alloc_failed = 0;
} else {
- PMD_DRV_LOG(DEBUG, "Rx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1205,7 +1205,7 @@ axgbe_dev_stats_reset(struct rte_eth_dev *dev)
txq->bytes = 0;
txq->errors = 0;
} else {
- PMD_DRV_LOG(DEBUG, "Tx queue not setup for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue not setup for port %d",
dev->data->port_id);
}
}
@@ -1500,7 +1500,7 @@ static int axgb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
/* mtu setting is forbidden if port is start */
if (dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "port %d must be stopped before configuration",
+ PMD_DRV_LOG_LINE(ERR, "port %d must be stopped before configuration",
dev->data->port_id);
return -EBUSY;
}
@@ -1624,7 +1624,7 @@ axgbe_timesync_write_time(struct rte_eth_dev *dev,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSUPDT))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out update timestamp\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out update timestamp");
return 0;
}
@@ -1641,7 +1641,7 @@ axgbe_update_tstamp_addend(struct axgbe_port *pdata,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSADDREG))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out updating timestamp addend register\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out updating timestamp addend register");
}
static void
@@ -1661,7 +1661,7 @@ axgbe_set_tstamp_time(struct axgbe_port *pdata, unsigned int sec,
while (--count && AXGMAC_IOREAD_BITS(pdata, MAC_TSCR, TSINIT))
rte_delay_ms(1);
if (!count)
- PMD_DRV_LOG(ERR, "Timed out initializing timestamp\n");
+ PMD_DRV_LOG_LINE(ERR, "Timed out initializing timestamp");
}
static int
@@ -1696,7 +1696,7 @@ axgbe_timesync_enable(struct rte_eth_dev *dev)
/* Exit if timestamping is not enabled */
if (!AXGMAC_GET_BITS(mac_tscr, MAC_TSCR, TSENA)) {
- PMD_DRV_LOG(ERR, "Exiting as timestamp is not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "Exiting as timestamp is not enabled");
return 0;
}
@@ -1720,7 +1720,7 @@ axgbe_timesync_enable(struct rte_eth_dev *dev)
pdata->systime_tc.cc_shift = 0;
pdata->systime_tc.nsec_mask = 0;
- PMD_DRV_LOG(DEBUG, "Initializing system time counter with realtime\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Initializing system time counter with realtime");
/* Updating the counter once with clock real time */
clock_gettime(CLOCK_REALTIME, ×tamp);
@@ -1773,8 +1773,8 @@ axgbe_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
if (nsec != 0xffffffffffffffffULL) {
if (pmt == 0x01)
*timestamp = rte_ns_to_timespec(nsec);
- PMD_DRV_LOG(DEBUG,
- "flags = 0x%x nsec = %"PRIu64"\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "flags = 0x%x nsec = %"PRIu64,
flags, nsec);
}
}
@@ -1801,13 +1801,13 @@ axgbe_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
tx_snr = AXGMAC_IOREAD(pdata, MAC_TXSNR);
}
if (AXGMAC_GET_BITS(tx_snr, MAC_TXSNR, TXTSSTSMIS)) {
- PMD_DRV_LOG(DEBUG, "Waiting for TXTSSTSMIS\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Waiting for TXTSSTSMIS");
return 0;
}
nsec = tx_ssr;
nsec *= NSEC_PER_SEC;
nsec += tx_snr;
- PMD_DRV_LOG(DEBUG, "nsec = %"PRIu64" tx_ssr = %d tx_snr = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "nsec = %"PRIu64" tx_ssr = %d tx_snr = %d",
nsec, tx_ssr, tx_snr);
*timestamp = rte_ns_to_timespec(nsec);
return 0;
@@ -1823,11 +1823,11 @@ axgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vid, int on)
vid_idx = VLAN_TABLE_IDX(vid);
if (on) {
- PMD_DRV_LOG(DEBUG, "Set VLAN vid=%d for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Set VLAN vid=%d for device = %s",
vid, pdata->eth_dev->device->name);
pdata->active_vlans[vid_idx] |= vid_bit;
} else {
- PMD_DRV_LOG(DEBUG, "Reset VLAN vid=%d for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Reset VLAN vid=%d for device = %s",
vid, pdata->eth_dev->device->name);
pdata->active_vlans[vid_idx] &= ~vid_bit;
}
@@ -1845,50 +1845,50 @@ axgbe_vlan_tpid_set(struct rte_eth_dev *dev,
uint32_t qinq = 0;
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "EDVLP: qinq = 0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "EDVLP: qinq = 0x%x", qinq);
switch (vlan_type) {
case RTE_ETH_VLAN_TYPE_INNER:
- PMD_DRV_LOG(DEBUG, "RTE_ETH_VLAN_TYPE_INNER\n");
+ PMD_DRV_LOG_LINE(DEBUG, "RTE_ETH_VLAN_TYPE_INNER");
if (qinq) {
if (tpid != 0x8100 && tpid != 0x88a8)
- PMD_DRV_LOG(ERR,
- "tag supported 0x8100/0x88A8\n");
- PMD_DRV_LOG(DEBUG, "qinq with inner tag\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "tag supported 0x8100/0x88A8");
+ PMD_DRV_LOG_LINE(DEBUG, "qinq with inner tag");
/*Enable Inner VLAN Tag */
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, ERIVLT, 1);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, ERIVLT);
- PMD_DRV_LOG(DEBUG, "bit ERIVLT = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit ERIVLT = 0x%x", reg);
} else {
- PMD_DRV_LOG(ERR,
- "Inner type not supported in single tag\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Inner type not supported in single tag");
}
break;
case RTE_ETH_VLAN_TYPE_OUTER:
- PMD_DRV_LOG(DEBUG, "RTE_ETH_VLAN_TYPE_OUTER\n");
+ PMD_DRV_LOG_LINE(DEBUG, "RTE_ETH_VLAN_TYPE_OUTER");
if (qinq) {
- PMD_DRV_LOG(DEBUG, "double tagging is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "double tagging is enabled");
/*Enable outer VLAN tag*/
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, ERIVLT, 0);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, ERIVLT);
- PMD_DRV_LOG(DEBUG, "bit ERIVLT = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit ERIVLT = 0x%x", reg);
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANIR, CSVL, 1);
reg = AXGMAC_IOREAD_BITS(pdata, MAC_VLANIR, CSVL);
- PMD_DRV_LOG(DEBUG, "bit CSVL = 0x%x\n", reg);
+ PMD_DRV_LOG_LINE(DEBUG, "bit CSVL = 0x%x", reg);
} else {
if (tpid != 0x8100 && tpid != 0x88a8)
- PMD_DRV_LOG(ERR,
- "tag supported 0x8100/0x88A8\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "tag supported 0x8100/0x88A8");
}
break;
case RTE_ETH_VLAN_TYPE_MAX:
- PMD_DRV_LOG(ERR, "RTE_ETH_VLAN_TYPE_MAX\n");
+ PMD_DRV_LOG_LINE(ERR, "RTE_ETH_VLAN_TYPE_MAX");
break;
case RTE_ETH_VLAN_TYPE_UNKNOWN:
- PMD_DRV_LOG(ERR, "RTE_ETH_VLAN_TYPE_UNKNOWN\n");
+ PMD_DRV_LOG_LINE(ERR, "RTE_ETH_VLAN_TYPE_UNKNOWN");
break;
}
return 0;
@@ -1900,7 +1900,7 @@ static void axgbe_vlan_extend_enable(struct axgbe_port *pdata)
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, EDVLP, 1);
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "vlan double tag enabled EDVLP:qinq=0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan double tag enabled EDVLP:qinq=0x%x", qinq);
}
static void axgbe_vlan_extend_disable(struct axgbe_port *pdata)
@@ -1909,7 +1909,7 @@ static void axgbe_vlan_extend_disable(struct axgbe_port *pdata)
AXGMAC_IOWRITE_BITS(pdata, MAC_VLANTR, EDVLP, 0);
qinq = AXGMAC_IOREAD_BITS(pdata, MAC_VLANTR, EDVLP);
- PMD_DRV_LOG(DEBUG, "vlan double tag disable EDVLP:qinq=0x%x\n", qinq);
+ PMD_DRV_LOG_LINE(DEBUG, "vlan double tag disable EDVLP:qinq=0x%x", qinq);
}
static int
@@ -1924,29 +1924,29 @@ axgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
if (mask & RTE_ETH_VLAN_STRIP_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
- PMD_DRV_LOG(DEBUG, "Strip ON for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Strip ON for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.enable_rx_vlan_stripping(pdata);
} else {
- PMD_DRV_LOG(DEBUG, "Strip OFF for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Strip OFF for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.disable_rx_vlan_stripping(pdata);
}
}
if (mask & RTE_ETH_VLAN_FILTER_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER) {
- PMD_DRV_LOG(DEBUG, "Filter ON for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Filter ON for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.enable_rx_vlan_filtering(pdata);
} else {
- PMD_DRV_LOG(DEBUG, "Filter OFF for device = %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Filter OFF for device = %s",
pdata->eth_dev->device->name);
pdata->hw_if.disable_rx_vlan_filtering(pdata);
}
}
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND) {
- PMD_DRV_LOG(DEBUG, "enabling vlan extended mode\n");
+ PMD_DRV_LOG_LINE(DEBUG, "enabling vlan extended mode");
axgbe_vlan_extend_enable(pdata);
/* Set global registers with default ethertype*/
axgbe_vlan_tpid_set(dev, RTE_ETH_VLAN_TYPE_OUTER,
@@ -1954,7 +1954,7 @@ axgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
axgbe_vlan_tpid_set(dev, RTE_ETH_VLAN_TYPE_INNER,
RTE_ETHER_TYPE_VLAN);
} else {
- PMD_DRV_LOG(DEBUG, "disabling vlan extended mode\n");
+ PMD_DRV_LOG_LINE(DEBUG, "disabling vlan extended mode");
axgbe_vlan_extend_disable(pdata);
}
}
@@ -2283,7 +2283,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
break;
}
if (unknown_cpu) {
- PMD_DRV_LOG(ERR, "Unknown CPU family, no supported axgbe device found\n");
+ PMD_DRV_LOG_LINE(ERR, "Unknown CPU family, no supported axgbe device found");
return -ENODEV;
}
}
@@ -2377,7 +2377,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
/* Issue software reset to DMA */
ret = pdata->hw_if.exit(pdata);
if (ret)
- PMD_DRV_LOG(ERR, "hw_if->exit EBUSY error\n");
+ PMD_DRV_LOG_LINE(ERR, "hw_if->exit EBUSY error");
/* Set default configuration data */
axgbe_default_config(pdata);
diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c
index a2798f484e..484ee1b4e4 100644
--- a/drivers/net/axgbe/axgbe_i2c.c
+++ b/drivers/net/axgbe/axgbe_i2c.c
@@ -162,13 +162,13 @@ static int axgbe_i2c_isr(struct axgbe_port *pdata)
isr = XI2C_IOREAD(pdata, IC_RAW_INTR_STAT);
- PMD_DRV_LOG(DEBUG, "I2C interrupt received: status=%#010x\n", isr);
+ PMD_DRV_LOG_LINE(DEBUG, "I2C interrupt received: status=%#010x", isr);
axgbe_i2c_clear_isr_interrupts(pdata, isr);
if (isr & AXGBE_INTR_TX_ABRT) {
- PMD_DRV_LOG(DEBUG,
- "I2C TX_ABRT received (%#010x) for target %#04x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "I2C TX_ABRT received (%#010x) for target %#04x",
state->tx_abort_source, state->op->target);
axgbe_i2c_disable_interrupts(pdata);
@@ -232,7 +232,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
pthread_mutex_lock(&pdata->i2c_mutex);
ret = axgbe_i2c_disable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to disable i2c master");
pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
@@ -249,7 +249,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
axgbe_i2c_clear_all_interrupts(pdata);
ret = axgbe_i2c_enable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to enable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to enable i2c master");
pthread_mutex_unlock(&pdata->i2c_mutex);
return ret;
}
@@ -268,7 +268,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)
}
}
- PMD_DRV_LOG(ERR, "i2c operation timed out\n");
+ PMD_DRV_LOG_LINE(ERR, "i2c operation timed out");
axgbe_i2c_disable_interrupts(pdata);
axgbe_i2c_disable(pdata);
ret = -ETIMEDOUT;
@@ -293,7 +293,7 @@ static void axgbe_i2c_stop(struct axgbe_port *pdata)
if (!pdata->i2c.started)
return;
- PMD_DRV_LOG(DEBUG, "stopping I2C\n");
+ PMD_DRV_LOG_LINE(DEBUG, "stopping I2C");
pdata->i2c.started = 0;
axgbe_i2c_disable_interrupts(pdata);
@@ -306,7 +306,7 @@ static int axgbe_i2c_start(struct axgbe_port *pdata)
if (pdata->i2c.started)
return 0;
- PMD_DRV_LOG(DEBUG, "starting I2C\n");
+ PMD_DRV_LOG_LINE(DEBUG, "starting I2C");
pdata->i2c.started = 1;
@@ -321,7 +321,7 @@ static int axgbe_i2c_init(struct axgbe_port *pdata)
ret = axgbe_i2c_disable(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to disable i2c master\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to disable i2c master");
return ret;
}
diff --git a/drivers/net/axgbe/axgbe_logs.h b/drivers/net/axgbe/axgbe_logs.h
index d148701716..3962895c5a 100644
--- a/drivers/net/axgbe/axgbe_logs.h
+++ b/drivers/net/axgbe/axgbe_logs.h
@@ -19,8 +19,8 @@ extern int axgbe_logtype_init;
#endif
extern int axgbe_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, axgbe_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
+#define RTE_LOGTYPE_AXGBE_DRIVER axgbe_logtype_driver
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, AXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _AXGBE_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 130a67479e..952a0add62 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -203,7 +203,7 @@ static void axgbe_change_mode(struct axgbe_port *pdata,
case AXGBE_MODE_UNKNOWN:
break;
default:
- PMD_DRV_LOG(ERR, "invalid operation mode requested (%u)\n", mode);
+ PMD_DRV_LOG_LINE(ERR, "invalid operation mode requested (%u)", mode);
}
}
@@ -285,7 +285,7 @@ static void axgbe_an73_restart(struct axgbe_port *pdata)
axgbe_an73_enable_interrupts(pdata);
axgbe_an73_set(pdata, true, true);
- PMD_DRV_LOG(DEBUG, "CL73 AN enabled/restarted\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN enabled/restarted");
}
static void axgbe_an73_disable(struct axgbe_port *pdata)
@@ -294,7 +294,7 @@ static void axgbe_an73_disable(struct axgbe_port *pdata)
axgbe_an73_disable_interrupts(pdata);
pdata->an_start = 0;
- PMD_DRV_LOG(DEBUG, "CL73 AN disabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN disabled");
}
static void axgbe_an_restart(struct axgbe_port *pdata)
@@ -372,7 +372,7 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
pdata->kr_start_time = rte_get_timer_cycles();
- PMD_DRV_LOG(DEBUG, "KR training initiated\n");
+ PMD_DRV_LOG_LINE(DEBUG, "KR training initiated");
if (pdata->phy_if.phy_impl.kr_training_post)
pdata->phy_if.phy_impl.kr_training_post(pdata);
@@ -455,8 +455,8 @@ static enum axgbe_an axgbe_an73_page_received(struct axgbe_port *pdata)
pdata->an_start = rte_get_timer_cycles();
- PMD_DRV_LOG(NOTICE,
- "CL73 AN timed out, resetting state\n");
+ PMD_DRV_LOG_LINE(NOTICE,
+ "CL73 AN timed out, resetting state");
}
}
@@ -548,7 +548,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
pdata->an_state = AXGBE_AN_ERROR;
}
- PMD_DRV_LOG(DEBUG, "CL73 AN : %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN : %s",
axgbe_state_as_string(pdata->an_state));
again:
@@ -582,7 +582,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
pdata->eth_dev->data->dev_link.link_status =
RTE_ETH_LINK_DOWN;
} else if (pdata->an_state == AXGBE_AN_ERROR) {
- PMD_DRV_LOG(ERR, "error during auto-negotiation, state=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "error during auto-negotiation, state=%u",
cur_state);
pdata->an_int = 0;
axgbe_an73_clear_interrupts(pdata);
@@ -597,7 +597,7 @@ static void axgbe_an73_state_machine(struct axgbe_port *pdata)
if (pdata->phy_if.phy_impl.an_post)
pdata->phy_if.phy_impl.an_post(pdata);
- PMD_DRV_LOG(DEBUG, "CL73 AN result: %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN result: %s",
axgbe_state_as_string(pdata->an_result));
}
@@ -641,7 +641,7 @@ static void axgbe_an37_state_machine(struct axgbe_port *pdata)
}
if (pdata->an_state == AXGBE_AN_ERROR) {
- PMD_DRV_LOG(ERR, "error during auto-negotiation, state=%u\n",
+ PMD_DRV_LOG_LINE(ERR, "error during auto-negotiation, state=%u",
cur_state);
pdata->an_int = 0;
axgbe_an37_clear_interrupts(pdata);
@@ -703,7 +703,7 @@ static void axgbe_an37_isr(struct axgbe_port *pdata)
static void axgbe_an_isr(struct axgbe_port *pdata)
{
- PMD_DRV_LOG(DEBUG, "AN interrupt received\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN interrupt received");
switch (pdata->an_mode) {
case AXGBE_AN_MODE_CL73:
@@ -813,7 +813,7 @@ static void axgbe_an73_init(struct axgbe_port *pdata)
XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_AN_ADVERTISE, reg);
- PMD_DRV_LOG(DEBUG, "CL73 AN initialized\n");
+ PMD_DRV_LOG_LINE(DEBUG, "CL73 AN initialized");
}
static void axgbe_an_init(struct axgbe_port *pdata)
@@ -865,7 +865,7 @@ static int axgbe_phy_config_fixed(struct axgbe_port *pdata)
{
enum axgbe_mode mode;
- PMD_DRV_LOG(DEBUG, "fixed PHY configuration\n");
+ PMD_DRV_LOG_LINE(DEBUG, "fixed PHY configuration");
/* Disable auto-negotiation */
axgbe_an_disable(pdata);
@@ -912,9 +912,9 @@ static int __axgbe_phy_config_aneg(struct axgbe_port *pdata, bool set_mode)
ret = axgbe_phy_config_fixed(pdata);
if (ret || !pdata->kr_redrv)
goto out;
- PMD_DRV_LOG(DEBUG, "AN redriver support\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN redriver support");
} else {
- PMD_DRV_LOG(DEBUG, "AN PHY configuration\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AN PHY configuration");
}
/* Disable auto-negotiation interrupt */
@@ -1018,7 +1018,7 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
}
}
- PMD_DRV_LOG(NOTICE, "AN link timeout\n");
+ PMD_DRV_LOG_LINE(NOTICE, "AN link timeout");
axgbe_phy_config_aneg(pdata);
}
}
@@ -1161,7 +1161,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
static void axgbe_phy_stop(struct axgbe_port *pdata)
{
- PMD_DRV_LOG(DEBUG, "stopping PHY\n");
+ PMD_DRV_LOG_LINE(DEBUG, "stopping PHY");
if (!pdata->phy_started)
return;
/* Indicate the PHY is down */
@@ -1177,7 +1177,7 @@ static int axgbe_phy_start(struct axgbe_port *pdata)
{
int ret;
- PMD_DRV_LOG(DEBUG, "starting PHY\n");
+ PMD_DRV_LOG_LINE(DEBUG, "starting PHY");
ret = pdata->phy_if.phy_impl.start(pdata);
if (ret)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index b1a453ccc8..9249e11335 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -312,7 +312,7 @@ static int axgbe_phy_redrv_write(struct axgbe_port *pdata, unsigned int reg,
}
if (redrv_data[0] != 0xff) {
- PMD_DRV_LOG(ERR, "Redriver write checksum error\n");
+ PMD_DRV_LOG_LINE(ERR, "Redriver write checksum error");
ret = -EIO;
}
@@ -437,7 +437,7 @@ static int axgbe_phy_get_comm_ownership(struct axgbe_port *pdata)
pthread_mutex_unlock(&pdata->phy_mutex);
- PMD_DRV_LOG(ERR, "unable to obtain hardware mutexes\n");
+ PMD_DRV_LOG_LINE(ERR, "unable to obtain hardware mutexes");
return -ETIMEDOUT;
}
@@ -679,7 +679,7 @@ static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)
ret = axgbe_phy_sfp_get_mux(pdata);
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error setting SFP MUX\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error setting SFP MUX");
return ret;
}
@@ -689,7 +689,7 @@ static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)
&eeprom_addr, sizeof(eeprom_addr),
&sfp_eeprom, sizeof(sfp_eeprom));
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error reading SFP EEPROM\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error reading SFP EEPROM");
goto put;
}
@@ -735,7 +735,7 @@ static void axgbe_phy_sfp_signals(struct axgbe_port *pdata)
&gpio_reg, sizeof(gpio_reg),
gpio_ports, sizeof(gpio_ports));
if (ret) {
- PMD_DRV_LOG(ERR, "I2C error reading SFP GPIOs\n");
+ PMD_DRV_LOG_LINE(ERR, "I2C error reading SFP GPIOs");
return;
}
@@ -836,7 +836,7 @@ static void axgbe_phy_sfp_detect(struct axgbe_port *pdata)
axgbe_phy_sfp_parse_eeprom(pdata);
axgbe_phy_sfp_external_phy(pdata);
- PMD_DRV_LOG(DEBUG, "SFP Base: %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "SFP Base: %s",
axgbe_base_as_string(phy_data->sfp_base));
put:
@@ -1064,7 +1064,7 @@ static unsigned int axgbe_phy_an_advertising(struct axgbe_port *pdata)
advertising |= ADVERTISED_1000baseKX_Full;
break;
case AXGBE_PORT_MODE_10GBASE_T:
- PMD_DRV_LOG(ERR, "10GBASE_T mode is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBASE_T mode is not supported");
break;
case AXGBE_PORT_MODE_10GBASE_R:
advertising |= ADVERTISED_10000baseKR_Full;
@@ -1251,7 +1251,7 @@ static void axgbe_rx_adaptation(struct axgbe_port *pdata)
/* If the block lock is found, update the helpers
* and declare the link up
*/
- PMD_DRV_LOG(NOTICE, "Rx adaptation - Block_lock done\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Rx adaptation - Block_lock done");
pdata->rx_adapt_done = true;
pdata->mode_set = false;
return;
@@ -1271,7 +1271,7 @@ static void axgbe_phy_rx_adaptation(struct axgbe_port *pdata)
/* step 1: Check for RX_VALID && LF_SIGDET */
if ((reg & XGBE_PMA_RX_VAL_SIG_MASK) != XGBE_PMA_RX_VAL_SIG_MASK) {
- PMD_DRV_LOG(NOTICE, "RX_VALID or LF_SIGDET is unset, issue rrc\n");
+ PMD_DRV_LOG_LINE(NOTICE, "RX_VALID or LF_SIGDET is unset, issue rrc");
axgbe_phy_rrc(pdata);
if (pdata->rx_adapt_retries++ >= MAX_RX_ADAPT_RETRIES) {
pdata->rx_adapt_retries = 0;
@@ -1301,7 +1301,7 @@ static void axgbe_phy_rx_reset(struct axgbe_port *pdata)
XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL1,
XGBE_PMA_RX_RST_0_MASK, XGBE_PMA_RX_RST_0_RESET_OFF);
rte_delay_us(45);
- PMD_DRV_LOG(ERR, "firmware mailbox reset performed\n");
+ PMD_DRV_LOG_LINE(ERR, "firmware mailbox reset performed");
}
}
@@ -1331,7 +1331,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
/* Log if a previous command did not complete */
if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS)) {
- PMD_DRV_LOG(NOTICE, "firmware mailbox not ready for command\n");
+ PMD_DRV_LOG_LINE(NOTICE, "firmware mailbox not ready for command");
axgbe_phy_rx_reset(pdata);
}
@@ -1351,7 +1351,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
goto do_rx_adaptation;
rte_delay_us(1500);
}
- PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n");
+ PMD_DRV_LOG_LINE(NOTICE, "firmware mailbox command did not complete");
/* Reset on error */
axgbe_phy_rx_reset(pdata);
goto reenable_pll;
@@ -1360,7 +1360,7 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
do_rx_adaptation:
if (pdata->en_rx_adap && sub_cmd == AXGBE_MB_SUBCMD_RX_ADAP &&
(cmd == AXGBE_MB_CMD_SET_10G_KR || cmd == AXGBE_MB_CMD_SET_10G_SFI)) {
- PMD_DRV_LOG(NOTICE, "Enabling RX adaptation\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Enabling RX adaptation");
pdata->mode_set = true;
axgbe_phy_rx_adaptation(pdata);
/* return from here to avoid enabling PLL ctrl
@@ -1384,7 +1384,7 @@ static void axgbe_phy_rrc(struct axgbe_port *pdata)
/* Receiver Reset Cycle */
axgbe_phy_perform_ratechange(pdata, AXGBE_MB_CMD_RRC, AXGBE_MB_SUBCMD_NONE);
- PMD_DRV_LOG(DEBUG, "receiver reset complete\n");
+ PMD_DRV_LOG_LINE(DEBUG, "receiver reset complete");
}
static void axgbe_phy_power_off(struct axgbe_port *pdata)
@@ -1396,7 +1396,7 @@ static void axgbe_phy_power_off(struct axgbe_port *pdata)
phy_data->cur_mode = AXGBE_MODE_UNKNOWN;
- PMD_DRV_LOG(DEBUG, "phy powered off\n");
+ PMD_DRV_LOG_LINE(DEBUG, "phy powered off");
}
static bool enable_rx_adap(struct axgbe_port *pdata, enum axgbe_mode mode)
@@ -1453,7 +1453,7 @@ static void axgbe_phy_sfi_mode(struct axgbe_port *pdata)
phy_data->cur_mode = AXGBE_MODE_SFI;
- PMD_DRV_LOG(DEBUG, "10GbE SFI mode set\n");
+ PMD_DRV_LOG_LINE(DEBUG, "10GbE SFI mode set");
}
static void axgbe_phy_kr_mode(struct axgbe_port *pdata)
@@ -1471,7 +1471,7 @@ static void axgbe_phy_kr_mode(struct axgbe_port *pdata)
AXGBE_MB_SUBCMD_NONE);
phy_data->cur_mode = AXGBE_MODE_KR;
- PMD_DRV_LOG(DEBUG, "10GbE KR mode set\n");
+ PMD_DRV_LOG_LINE(DEBUG, "10GbE KR mode set");
}
static void axgbe_phy_kx_2500_mode(struct axgbe_port *pdata)
@@ -1987,7 +1987,7 @@ static int axgbe_phy_mdio_reset_setup(struct axgbe_port *pdata)
case AXGBE_MDIO_RESET_INT_GPIO:
break;
default:
- PMD_DRV_LOG(ERR, "unsupported MDIO reset (%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "unsupported MDIO reset (%#x)",
phy_data->mdio_reset);
return -EINVAL;
}
@@ -2270,7 +2270,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Check if enabled */
if (!axgbe_phy_port_enabled(pdata)) {
- PMD_DRV_LOG(ERR, "device is not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "device is not enabled");
return -ENODEV;
}
@@ -2281,7 +2281,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
phy_data = rte_zmalloc("phy_data memory", sizeof(*phy_data), 0);
if (!phy_data) {
- PMD_DRV_LOG(ERR, "phy_data allocation failed\n");
+ PMD_DRV_LOG_LINE(ERR, "phy_data allocation failed");
return -ENOMEM;
}
pdata->phy_data = phy_data;
@@ -2300,14 +2300,14 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Validate the connection requested */
if (axgbe_phy_conn_type_mismatch(pdata)) {
- PMD_DRV_LOG(ERR, "phy mode/connection mismatch (%#x/%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "phy mode/connection mismatch (%#x/%#x)",
phy_data->port_mode, phy_data->conn_type);
return -EINVAL;
}
/* Validate the mode requested */
if (axgbe_phy_port_mode_mismatch(pdata)) {
- PMD_DRV_LOG(ERR, "phy mode/speed mismatch (%#x/%#x)\n",
+ PMD_DRV_LOG_LINE(ERR, "phy mode/speed mismatch (%#x/%#x)",
phy_data->port_mode, phy_data->port_speeds);
return -EINVAL;
}
@@ -2319,7 +2319,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
/* Validate the re-driver information */
if (axgbe_phy_redrv_error(phy_data)) {
- PMD_DRV_LOG(ERR, "phy re-driver settings error\n");
+ PMD_DRV_LOG_LINE(ERR, "phy re-driver settings error");
return -EINVAL;
}
pdata->kr_redrv = phy_data->redrv;
@@ -2499,7 +2499,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
ret = pdata->hw_if.set_ext_mii_mode(pdata, phy_data->mdio_addr,
phy_data->phydev_mode);
if (ret) {
- PMD_DRV_LOG(ERR, "mdio port/clause not compatible (%d/%u)\n",
+ PMD_DRV_LOG_LINE(ERR, "mdio port/clause not compatible (%d/%u)",
phy_data->mdio_addr, phy_data->phydev_mode);
return -EINVAL;
}
@@ -2509,7 +2509,7 @@ static int axgbe_phy_init(struct axgbe_port *pdata)
ret = pdata->hw_if.set_ext_mii_mode(pdata, phy_data->redrv_addr,
AXGBE_MDIO_MODE_CL22);
if (ret) {
- PMD_DRV_LOG(ERR, "redriver mdio port not compatible (%u)\n",
+ PMD_DRV_LOG_LINE(ERR, "redriver mdio port not compatible (%u)",
phy_data->redrv_addr);
return -EINVAL;
}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index a9ff291cef..974ade9ab7 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -92,7 +92,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
dma = rte_eth_dma_zone_reserve(dev, "rx_ring", queue_idx, size, 128,
socket_id);
if (!dma) {
- PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for rx_ring failed\n");
+ PMD_DRV_LOG_LINE(ERR, "ring_dma_zone_reserve for rx_ring failed");
axgbe_rx_queue_release(rxq);
return -ENOMEM;
}
@@ -105,7 +105,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->sw_ring) {
- PMD_DRV_LOG(ERR, "rte_zmalloc for sw_ring failed\n");
+ PMD_DRV_LOG_LINE(ERR, "rte_zmalloc for sw_ring failed");
axgbe_rx_queue_release(rxq);
return -ENOMEM;
}
@@ -139,8 +139,8 @@ static void axgbe_prepare_rx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), rx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Rx queue %u to empty\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Rx queue %u to empty",
queue);
}
@@ -224,8 +224,8 @@ axgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
break;
tmbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (unlikely(!tmbuf)) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed port_id = %u"
- " queue_id = %u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed port_id = %u"
+ " queue_id = %u",
(unsigned int)rxq->port_id,
(unsigned int)rxq->queue_id);
rte_eth_devices[
@@ -359,8 +359,8 @@ uint16_t eth_axgbe_recv_scattered_pkts(void *rx_queue,
tmbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
if (unlikely(!tmbuf)) {
- PMD_DRV_LOG(ERR, "RX mbuf alloc failed port_id = %u"
- " queue_id = %u\n",
+ PMD_DRV_LOG_LINE(ERR, "RX mbuf alloc failed port_id = %u"
+ " queue_id = %u",
(unsigned int)rxq->port_id,
(unsigned int)rxq->queue_id);
rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;
@@ -677,8 +677,8 @@ static void axgbe_txq_prepare_tx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), tx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Tx queue %u to empty\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Tx queue %u to empty",
queue);
}
@@ -721,8 +721,8 @@ static void axgbe_prepare_tx_stop(struct axgbe_port *pdata,
}
if (!time_before(rte_get_timer_cycles(), tx_timeout))
- PMD_DRV_LOG(ERR,
- "timed out waiting for Tx DMA channel %u to stop\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "timed out waiting for Tx DMA channel %u to stop",
queue);
}
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index aaa7ea00cc..8ac20961d9 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1207,12 +1207,8 @@ extern const struct rte_flow_ops bnxt_flow_meter_ops;
extern int bnxt_logtype_driver;
#define RTE_LOGTYPE_BNXT bnxt_logtype_driver
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnxt_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt, ## args)
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, BNXT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#define BNXT_LINK_SPEEDS_V2_OPTIONS(f) \
((f) & HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index a4509abd60..64e57c79da 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -59,7 +59,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
if (!BNXT_TRUFLOW_EN(bp))
return;
- PMD_DRV_LOG(INFO, "Default vnic change async event received\n");
+ PMD_DRV_LOG_LINE(INFO, "Default vnic change async event received");
event_data = rte_le_to_cpu_32(async_cmp->event_data1);
vnic_state = (event_data & BNXT_DEFAULT_VNIC_STATE_MASK) >>
@@ -72,7 +72,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
vf_fid = (event_data & BNXT_DEFAULT_VNIC_CHANGE_VF_ID_MASK) >>
BNXT_DEFAULT_VNIC_CHANGE_VF_ID_SFT;
- PMD_DRV_LOG(INFO, "async event received vf_id 0x%x\n", vf_fid);
+ PMD_DRV_LOG_LINE(INFO, "async event received vf_id 0x%x", vf_fid);
for (vf_id = 0; vf_id < BNXT_MAX_VF_REPS(bp); vf_id++) {
eth_dev = bp->rep_info[vf_id].vfr_eth_dev;
@@ -97,16 +97,16 @@ static void bnxt_handle_event_error_report(struct bnxt *bp,
{
switch (BNXT_EVENT_ERROR_REPORT_TYPE(data1)) {
case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM:
- PMD_DRV_LOG(WARNING, "Port:%d Pause Storm detected!\n",
+ PMD_DRV_LOG_LINE(WARNING, "Port:%d Pause Storm detected!",
bp->eth_dev->data->port_id);
break;
case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED:
- PMD_DRV_LOG(WARNING, "Port:%d Speed change not supported with dual rate transceivers on this board",
+ PMD_DRV_LOG_LINE(WARNING, "Port:%d Speed change not supported with dual rate transceivers on this board",
bp->eth_dev->data->port_id);
break;
default:
- PMD_DRV_LOG(INFO, "FW reported unknown error type data1 %d"
- " data2: %d\n", data1, data2);
+ PMD_DRV_LOG_LINE(INFO, "FW reported unknown error type data1 %d"
+ " data2: %d", data1, data2);
break;
}
}
@@ -121,13 +121,13 @@ void bnxt_handle_vf_cfg_change(void *arg)
if (eth_dev->data->dev_started) {
rc = bnxt_dev_stop_op(eth_dev);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to stop Port:%u\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(ERR, "Failed to stop Port:%u", eth_dev->data->port_id);
return;
}
rc = bnxt_dev_start_op(eth_dev);
if (rc != 0)
- PMD_DRV_LOG(ERR, "Failed to start Port:%u\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(ERR, "Failed to start Port:%u", eth_dev->data->port_id);
}
}
@@ -144,7 +144,7 @@ bnxt_process_vf_flr(struct bnxt *bp, uint32_t data1)
vfid = (data1 & HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK) >>
HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT;
- PMD_DRV_LOG(INFO, "VF FLR async event received pfid: %u, vfid: %u\n",
+ PMD_DRV_LOG_LINE(INFO, "VF FLR async event received pfid: %u, vfid: %u",
pfid, vfid);
}
@@ -176,17 +176,17 @@ void bnxt_handle_async_event(struct bnxt *bp,
RTE_ETH_EVENT_INTR_LSC, NULL);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
- PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
+ PMD_DRV_LOG_LINE(INFO, "Async event: PF driver unloaded");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
- PMD_DRV_LOG(INFO, "Port %u: VF config change async event\n", port_id);
- PMD_DRV_LOG(INFO, "event: data1 %#x data2 %#x\n", data1, data2);
+ PMD_DRV_LOG_LINE(INFO, "Port %u: VF config change async event", port_id);
+ PMD_DRV_LOG_LINE(INFO, "event: data1 %#x data2 %#x", data1, data2);
bnxt_hwrm_func_qcfg(bp, NULL);
if (BNXT_VF(bp))
rte_eal_alarm_set(1, bnxt_handle_vf_cfg_change, (void *)bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED:
- PMD_DRV_LOG(INFO, "Port conn async event\n");
+ PMD_DRV_LOG_LINE(INFO, "Port conn async event");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
/*
@@ -216,13 +216,13 @@ void bnxt_handle_async_event(struct bnxt *bp,
BNXT_MIN_FW_READY_TIMEOUT;
if ((event_data & EVENT_DATA1_REASON_CODE_MASK) ==
EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL) {
- PMD_DRV_LOG(INFO,
- "Port %u: Firmware fatal reset event received\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Firmware fatal reset event received",
port_id);
bp->flags |= BNXT_FLAG_FATAL_ERROR;
} else {
- PMD_DRV_LOG(INFO,
- "Port %u: Firmware non-fatal reset event received\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Firmware non-fatal reset event received",
port_id);
}
@@ -243,7 +243,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
info->flags |= BNXT_FLAG_RECOVERY_ENABLED;
} else {
info->flags &= ~BNXT_FLAG_RECOVERY_ENABLED;
- PMD_DRV_LOG(INFO, "Driver recovery watchdog is disabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Driver recovery watchdog is disabled");
return;
}
@@ -253,8 +253,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
info->flags &= ~BNXT_FLAG_PRIMARY_FUNC;
status = bnxt_read_fw_status_reg(bp, BNXT_FW_STATUS_REG);
- PMD_DRV_LOG(INFO,
- "Port: %u Driver recovery watchdog, role: %s, FW status: 0x%x (%s)\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port: %u Driver recovery watchdog, role: %s, FW status: 0x%x (%s)",
port_id, bnxt_is_primary_func(bp) ? "primary" : "backup", status,
(status == BNXT_FW_STATUS_HEALTHY) ? "healthy" : "unhealthy");
@@ -269,15 +269,15 @@ void bnxt_handle_async_event(struct bnxt *bp,
bnxt_schedule_fw_health_check(bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION:
- PMD_DRV_LOG(INFO, "Port: %u DNC event: data1 %#x data2 %#x\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u DNC event: data1 %#x data2 %#x",
port_id, data1, data2);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE:
bnxt_process_default_vnic_change(bp, async_cmp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ECHO_REQUEST:
- PMD_DRV_LOG(INFO,
- "Port %u: Received fw echo request: data1 %#x data2 %#x\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %u: Received fw echo request: data1 %#x data2 %#x",
port_id, data1, data2);
if (bp->recovery_info)
bnxt_hwrm_fw_echo_reply(bp, data1, data2);
@@ -289,7 +289,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
bnxt_process_vf_flr(bp, data1);
break;
default:
- PMD_DRV_LOG(DEBUG, "handle_async_event id = 0x%x\n", event_id);
+ PMD_DRV_LOG_LINE(DEBUG, "handle_async_event id = 0x%x", event_id);
break;
}
}
@@ -305,7 +305,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
int rc;
if (bp->pf->active_vfs <= 0) {
- PMD_DRV_LOG(ERR, "Forwarded VF with no active VFs\n");
+ PMD_DRV_LOG_LINE(ERR, "Forwarded VF with no active VFs");
return;
}
@@ -324,8 +324,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
if (fw_vf_id < bp->pf->first_vf_id ||
fw_vf_id >= bp->pf->first_vf_id + bp->pf->active_vfs) {
- PMD_DRV_LOG(ERR,
- "FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)",
fw_vf_id, bp->pf->first_vf_id,
(bp->pf->first_vf_id) + bp->pf->active_vfs - 1,
bp->pf->first_vf_id, bp->pf->active_vfs);
@@ -363,8 +363,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
/* Forward */
rc = bnxt_hwrm_exec_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to send FWD req VF 0x%x, type 0x%x.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to send FWD req VF 0x%x, type 0x%x.",
fw_vf_id - bp->pf->first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
@@ -374,8 +374,8 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
reject:
rc = bnxt_hwrm_reject_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to send REJECT req VF 0x%x, type 0x%x.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to send REJECT req VF 0x%x, type 0x%x.",
fw_vf_id - bp->pf->first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
@@ -388,7 +388,7 @@ int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
bool evt = 0;
if (bp == NULL || cmp == NULL) {
- PMD_DRV_LOG(ERR, "invalid NULL argument\n");
+ PMD_DRV_LOG_LINE(ERR, "invalid NULL argument");
return evt;
}
@@ -408,7 +408,7 @@ int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
break;
default:
/* Ignore any other events */
- PMD_DRV_LOG(DEBUG, "Ignoring %02x completion\n", CMP_TYPE(cmp));
+ PMD_DRV_LOG_LINE(DEBUG, "Ignoring %02x completion", CMP_TYPE(cmp));
break;
}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e63febe782..ac717730c1 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -432,7 +432,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
if (rc)
goto err_out;
- PMD_DRV_LOG(DEBUG, "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG, "vnic[%d] = %p vnic->fw_grp_ids = %p",
vnic_id, vnic, vnic->fw_grp_ids);
/* populate the fw group table */
@@ -451,7 +451,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
* Cap max Rx rings to same value
*/
if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_P5) {
- PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
+ PMD_DRV_LOG_LINE(ERR, "RxQ cnt %d > reta_size %d",
bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_P5);
goto err_out;
}
@@ -463,8 +463,8 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
break;
}
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM vnic %d ctx %d alloc failure rc: %x\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM vnic %d ctx %d alloc failure rc: %x",
vnic_id, j, rc);
goto err_out;
}
@@ -492,15 +492,15 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
for (j = 0; j < bp->rx_num_qs_per_vnic; j++) {
rxq = bp->eth_dev->data->rx_queues[j];
- PMD_DRV_LOG(DEBUG,
- "rxq[%d]->vnic=%p vnic->fw_grp_ids=%p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "rxq[%d]->vnic=%p vnic->fw_grp_ids=%p",
j, rxq->vnic, rxq->vnic->fw_grp_ids);
if (BNXT_HAS_RING_GRPS(bp) && rxq->rx_deferred_start)
vnic->fw_grp_ids[j] = INVALID_HW_RING_ID;
}
- PMD_DRV_LOG(DEBUG, "vnic->rx_queue_cnt = %d\n", vnic->rx_queue_cnt);
+ PMD_DRV_LOG_LINE(DEBUG, "vnic->rx_queue_cnt = %d", vnic->rx_queue_cnt);
rc = bnxt_vnic_rss_configure(bp, vnic);
if (rc)
@@ -516,7 +516,7 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
return 0;
err_out:
- PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM vnic %d cfg failure rc: %x",
vnic_id, rc);
return rc;
}
@@ -530,9 +530,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"rx_fc_in_tbl.va = %p rx_fc_in_tbl.dma = %p"
- " rx_fc_in_tbl.ctx_id = %d\n",
+ " rx_fc_in_tbl.ctx_id = %d",
bp->flow_stat->rx_fc_in_tbl.va,
(void *)((uintptr_t)bp->flow_stat->rx_fc_in_tbl.dma),
bp->flow_stat->rx_fc_in_tbl.ctx_id);
@@ -542,9 +542,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"rx_fc_out_tbl.va = %p rx_fc_out_tbl.dma = %p"
- " rx_fc_out_tbl.ctx_id = %d\n",
+ " rx_fc_out_tbl.ctx_id = %d",
bp->flow_stat->rx_fc_out_tbl.va,
(void *)((uintptr_t)bp->flow_stat->rx_fc_out_tbl.dma),
bp->flow_stat->rx_fc_out_tbl.ctx_id);
@@ -554,9 +554,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"tx_fc_in_tbl.va = %p tx_fc_in_tbl.dma = %p"
- " tx_fc_in_tbl.ctx_id = %d\n",
+ " tx_fc_in_tbl.ctx_id = %d",
bp->flow_stat->tx_fc_in_tbl.va,
(void *)((uintptr_t)bp->flow_stat->tx_fc_in_tbl.dma),
bp->flow_stat->tx_fc_in_tbl.ctx_id);
@@ -566,9 +566,9 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG,
+ PMD_DRV_LOG_LINE(DEBUG,
"tx_fc_out_tbl.va = %p tx_fc_out_tbl.dma = %p"
- " tx_fc_out_tbl.ctx_id = %d\n",
+ " tx_fc_out_tbl.ctx_id = %d",
bp->flow_stat->tx_fc_out_tbl.va,
(void *)((uintptr_t)bp->flow_stat->tx_fc_out_tbl.dma),
bp->flow_stat->tx_fc_out_tbl.ctx_id);
@@ -706,7 +706,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
rc = bnxt_get_hwrm_link_config(bp, &new);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to get link settings\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to get link settings");
return rc;
}
@@ -723,7 +723,7 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
(BNXT_LINK_SPEEDS_V2(bp) && dev_conf->link_speeds != curr_speed_bit)) {
rc = bnxt_set_hwrm_link_config(bp, true);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update PHY settings\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to update PHY settings");
return rc;
}
}
@@ -820,19 +820,19 @@ static int bnxt_start_nic(struct bnxt *bp)
rc = bnxt_vnic_queue_db_init(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "could not allocate vnic db\n");
+ PMD_DRV_LOG_LINE(ERR, "could not allocate vnic db");
goto err_out;
}
rc = bnxt_alloc_hwrm_rings(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM ring alloc failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM ring alloc failure rc: %x", rc);
goto err_out;
}
rc = bnxt_alloc_all_hwrm_ring_grps(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM ring grp alloc failure: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM ring grp alloc failure: %x", rc);
goto err_out;
}
@@ -844,8 +844,8 @@ static int bnxt_start_nic(struct bnxt *bp)
struct bnxt_vnic_info *vnic = &bp->vnic_info[j++];
if (!vnic) {
- PMD_DRV_LOG(ERR,
- "Num pools more than FW profile\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Num pools more than FW profile");
rc = -EINVAL;
goto err_out;
}
@@ -857,7 +857,7 @@ static int bnxt_start_nic(struct bnxt *bp)
skip_cosq_cfg:
rc = bnxt_mq_rx_configure(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "MQ mode configure failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "MQ mode configure failure rc: %x", rc);
goto err_out;
}
@@ -893,8 +893,8 @@ static int bnxt_start_nic(struct bnxt *bp)
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, &bp->vnic_info[0], 0, NULL);
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM cfa l2 rx mask failure rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM cfa l2 rx mask failure rc: %x", rc);
goto err_out;
}
@@ -903,9 +903,9 @@ static int bnxt_start_nic(struct bnxt *bp)
!RTE_ETH_DEV_SRIOV(bp->eth_dev).active) &&
bp->eth_dev->data->dev_conf.intr_conf.rxq != 0) {
intr_vector = bp->eth_dev->data->nb_rx_queues;
- PMD_DRV_LOG(DEBUG, "intr_vector = %d\n", intr_vector);
+ PMD_DRV_LOG_LINE(DEBUG, "intr_vector = %d", intr_vector);
if (intr_vector > bp->rx_cp_nr_rings) {
- PMD_DRV_LOG(ERR, "At most %d intr queues supported",
+ PMD_DRV_LOG_LINE(ERR, "At most %d intr queues supported",
bp->rx_cp_nr_rings);
return -ENOTSUP;
}
@@ -917,13 +917,13 @@ static int bnxt_start_nic(struct bnxt *bp)
if (rte_intr_dp_is_en(intr_handle)) {
if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
bp->eth_dev->data->nb_rx_queues)) {
- PMD_DRV_LOG(ERR, "Failed to allocate %d rx_queues"
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate %d rx_queues"
" intr_vec", bp->eth_dev->data->nb_rx_queues);
rc = -ENOMEM;
goto err_out;
}
- PMD_DRV_LOG(DEBUG, "intr_handle->nb_efd = %d "
- "intr_handle->max_intr = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "intr_handle->nb_efd = %d "
+ "intr_handle->max_intr = %d",
rte_intr_nb_efd_get(intr_handle),
rte_intr_max_intr_get(intr_handle));
for (queue_id = 0; queue_id < bp->eth_dev->data->nb_rx_queues;
@@ -950,7 +950,7 @@ static int bnxt_start_nic(struct bnxt *bp)
bp->mark_table = rte_zmalloc("bnxt_mark_table", BNXT_MARK_TABLE_SZ, 0);
if (!bp->mark_table)
- PMD_DRV_LOG(ERR, "Allocation of mark table failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Allocation of mark table failed");
return 0;
@@ -1239,7 +1239,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
if (BNXT_VF(bp) && (bp->flags & BNXT_FLAG_NEW_RM)) {
rc = bnxt_hwrm_check_vf_rings(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM insufficient resources\n");
+ PMD_DRV_LOG_LINE(ERR, "HWRM insufficient resources");
return -ENOSPC;
}
@@ -1258,7 +1258,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
rc = bnxt_hwrm_func_reserve_vf_resc(bp, false);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM resource alloc fail:%x\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "HWRM resource alloc fail:%x", rc);
pthread_mutex_unlock(&bp->def_cp_lock);
return -ENOSPC;
}
@@ -1302,7 +1302,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
/* application provides the hash key to program */
if (rss_conf->rss_key != NULL) {
if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE)
- PMD_DRV_LOG(WARNING, "port %u RSS key len must be %d bytes long",
+ PMD_DRV_LOG_LINE(WARNING, "port %u RSS key len must be %d bytes long",
eth_dev->data->port_id, HW_HASH_KEY_SIZE);
else
memcpy(bp->rss_conf.rss_key, rss_conf->rss_key, HW_HASH_KEY_SIZE);
@@ -1315,14 +1315,14 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
return 0;
resource_error:
- PMD_DRV_LOG(ERR,
- "Insufficient resources to support requested config\n");
- PMD_DRV_LOG(ERR,
- "Num Queues Requested: Tx %d, Rx %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Insufficient resources to support requested config");
+ PMD_DRV_LOG_LINE(ERR,
+ "Num Queues Requested: Tx %d, Rx %d",
eth_dev->data->nb_tx_queues,
eth_dev->data->nb_rx_queues);
- PMD_DRV_LOG(ERR,
- "MAX: TxQ %d, RxQ %d, CQ %d Stat %d, Grp %d, Vnic %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "MAX: TxQ %d, RxQ %d, CQ %d Stat %d, Grp %d, Vnic %d",
bp->max_tx_rings, bp->max_rx_rings, bp->max_cp_rings,
bp->max_stat_ctx, bp->max_ring_grps, bp->max_vnics);
return -ENOSPC;
@@ -1333,13 +1333,13 @@ void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
struct rte_eth_link *link = ð_dev->data->dev_link;
if (link->link_status)
- PMD_DRV_LOG(DEBUG, "Port %d Link Up - speed %u Mbps - %s\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Port %d Link Up - speed %u Mbps - %s",
eth_dev->data->port_id,
(uint32_t)link->link_speed,
(link->link_duplex == RTE_ETH_LINK_FULL_DUPLEX) ?
- ("full-duplex") : ("half-duplex\n"));
+ ("full-duplex") : ("half-duplex"));
else
- PMD_DRV_LOG(INFO, "Port %d Link Down\n",
+ PMD_DRV_LOG_LINE(INFO, "Port %d Link Down",
eth_dev->data->port_id);
}
@@ -1411,8 +1411,8 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
#if defined(RTE_ARCH_X86)
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1) {
- PMD_DRV_LOG(INFO,
- "Using AVX2 vector mode receive for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using AVX2 vector mode receive for port %d",
eth_dev->data->port_id);
bp->flags |= BNXT_FLAG_RX_VECTOR_PKT_MODE;
if (bnxt_compressed_rx_cqe_mode_enabled(bp))
@@ -1421,8 +1421,8 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
}
#endif
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
- PMD_DRV_LOG(INFO,
- "Using SSE vector mode receive for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using SSE vector mode receive for port %d",
eth_dev->data->port_id);
bp->flags |= BNXT_FLAG_RX_VECTOR_PKT_MODE;
if (bnxt_compressed_rx_cqe_mode_enabled(bp)) {
@@ -1436,10 +1436,10 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
}
use_scalar_rx:
- PMD_DRV_LOG(INFO, "Vector mode receive disabled for port %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Vector mode receive disabled for port %d",
eth_dev->data->port_id);
- PMD_DRV_LOG(INFO,
- "Port %d scatter: %d rx offload: %" PRIX64 "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %d scatter: %d rx offload: %" PRIX64,
eth_dev->data->port_id,
eth_dev->data->scattered_rx,
eth_dev->data->dev_conf.rxmode.offloads);
@@ -1468,24 +1468,24 @@ bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
#if defined(RTE_ARCH_X86)
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1) {
- PMD_DRV_LOG(INFO,
- "Using AVX2 vector mode transmit for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using AVX2 vector mode transmit for port %d",
eth_dev->data->port_id);
return bnxt_xmit_pkts_vec_avx2;
}
#endif
if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
- PMD_DRV_LOG(INFO,
- "Using SSE vector mode transmit for port %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Using SSE vector mode transmit for port %d",
eth_dev->data->port_id);
return bnxt_xmit_pkts_vec;
}
use_scalar_tx:
- PMD_DRV_LOG(INFO, "Vector mode transmit disabled for port %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Vector mode transmit disabled for port %d",
eth_dev->data->port_id);
- PMD_DRV_LOG(INFO,
- "Port %d scatter: %d tx offload: %" PRIX64 "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Port %d scatter: %d tx offload: %" PRIX64,
eth_dev->data->port_id,
eth_dev->data->scattered_rx,
offloads);
@@ -1557,7 +1557,7 @@ static void bnxt_free_switch_domain(struct bnxt *bp)
rc = rte_eth_switch_domain_free(bp->switch_domain_id);
if (rc)
- PMD_DRV_LOG(ERR, "free switch domain:%d fail: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "free switch domain:%d fail: %d",
bp->switch_domain_id, rc);
}
@@ -1581,7 +1581,7 @@ static void bnxt_ptp_get_current_time(void *arg)
rte_spinlock_unlock(&ptp->ptp_lock);
rc = rte_eal_alarm_set(US_PER_S, bnxt_ptp_get_current_time, (void *)bp);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to re-schedule PTP alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to re-schedule PTP alarm");
bp->flags2 &= ~BNXT_FLAGS2_PTP_ALARM_SCHEDULED;
}
}
@@ -1625,7 +1625,7 @@ static int bnxt_ptp_start(struct bnxt *bp)
rc = bnxt_schedule_ptp_alarm(bp);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to schedule PTP alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to schedule PTP alarm");
} else {
bp->flags2 |= BNXT_FLAGS2_PTP_TIMESYNC_ENABLED;
bp->flags2 |= BNXT_FLAGS2_PTP_ALARM_SCHEDULED;
@@ -1717,8 +1717,8 @@ int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
pthread_mutex_lock(&bp->err_recovery_lock);
if (bp->flags & BNXT_FLAG_FW_RESET) {
- PMD_DRV_LOG(ERR,
- "Adapter recovering from error..Please retry\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Adapter recovering from error..Please retry");
pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
@@ -1735,8 +1735,8 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS)
- PMD_DRV_LOG(ERR,
- "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "RxQ cnt %d > RTE_ETHDEV_QUEUE_STAT_CNTRS %d",
bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
do {
@@ -1844,8 +1844,8 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
pthread_mutex_lock(&bp->err_recovery_lock);
if (bp->flags & BNXT_FLAG_FW_RESET) {
- PMD_DRV_LOG(ERR,
- "Adapter recovering from error...Please retry\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Adapter recovering from error...Please retry");
pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
@@ -1912,8 +1912,8 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic,
/* Attach requested MAC address to the new l2_filter */
STAILQ_FOREACH(filter, &vnic->filter, next) {
if (filter->mac_index == index) {
- PMD_DRV_LOG(DEBUG,
- "MAC addr already existed for pool %d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "MAC addr already existed for pool %d",
pool);
return 0;
}
@@ -1921,7 +1921,7 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic,
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "L2 filter alloc failed");
return -ENODEV;
}
@@ -1960,12 +1960,12 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
return rc;
if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
- PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot add MAC address to a VF interface");
return -ENOTSUP;
}
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC not found for pool %d!\n", pool);
+ PMD_DRV_LOG_LINE(ERR, "VNIC not found for pool %d!", pool);
return -EINVAL;
}
@@ -2009,8 +2009,8 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
if (rc) {
new.link_speed = RTE_ETH_LINK_SPEED_100M;
new.link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
- PMD_DRV_LOG(ERR,
- "Failed to retrieve link rc = 0x%x!\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to retrieve link rc = 0x%x!", rc);
goto out;
}
@@ -2200,14 +2200,14 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev,
return -EINVAL;
if (reta_size != tbl_size) {
- PMD_DRV_LOG(ERR, "The configured hash table lookup size "
+ PMD_DRV_LOG_LINE(ERR, "The configured hash table lookup size "
"(%d) must equal the size supported by the hardware "
- "(%d)\n", reta_size, tbl_size);
+ "(%d)", reta_size, tbl_size);
return -EINVAL;
}
if (bnxt_vnic_reta_config_update(bp, vnic, reta_conf, reta_size)) {
- PMD_DRV_LOG(ERR, "Error in setting the reta config\n");
+ PMD_DRV_LOG_LINE(ERR, "Error in setting the reta config");
return -EINVAL;
}
for (i = 0; i < reta_size; i++) {
@@ -2254,9 +2254,9 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
return -EINVAL;
if (reta_size != tbl_size) {
- PMD_DRV_LOG(ERR, "The configured hash table lookup size "
+ PMD_DRV_LOG_LINE(ERR, "The configured hash table lookup size "
"(%d) must equal the size supported by the hardware "
- "(%d)\n", reta_size, tbl_size);
+ "(%d)", reta_size, tbl_size);
return -EINVAL;
}
@@ -2274,7 +2274,7 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
qid = bnxt_rss_to_qid(bp, vnic->rss_table[i]);
if (qid == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR, "Inv. entry in rss table.\n");
+ PMD_DRV_LOG_LINE(ERR, "Inv. entry in rss table.");
return -EINVAL;
}
reta_conf[idx].reta[sft] = qid;
@@ -2302,7 +2302,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
*/
if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
if (!rss_conf->rss_hf)
- PMD_DRV_LOG(ERR, "Hash type NONE\n");
+ PMD_DRV_LOG_LINE(ERR, "Hash type NONE");
} else {
if (rss_conf->rss_hf & bnxt_eth_rss_support(bp))
return -EINVAL;
@@ -2332,8 +2332,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
goto rss_config;
if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE) {
- PMD_DRV_LOG(ERR,
- "Invalid hashkey length, should be %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid hashkey length, should be %d bytes",
HW_HASH_KEY_SIZE);
return -EINVAL;
}
@@ -2421,8 +2421,8 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
return rc;
if (!BNXT_SINGLE_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Flow Control Settings cannot be modified on VF or on shared PF\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Flow Control Settings cannot be modified on VF or on shared PF");
return -ENOTSUP;
}
@@ -2486,10 +2486,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
switch (udp_tunnel->prot_type) {
case RTE_ETH_TUNNEL_TYPE_VXLAN:
if (bp->vxlan_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->vxlan_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->vxlan_port_cnt++;
@@ -2500,10 +2500,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_GENEVE:
if (bp->geneve_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->geneve_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->geneve_port_cnt++;
@@ -2514,10 +2514,10 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_ECPRI:
if (bp->ecpri_port_cnt) {
- PMD_DRV_LOG(ERR, "Tunnel Port %d already programmed\n",
+ PMD_DRV_LOG_LINE(ERR, "Tunnel Port %d already programmed",
udp_tunnel->udp_port);
if (bp->ecpri_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Only one port allowed\n");
+ PMD_DRV_LOG_LINE(ERR, "Only one port allowed");
return -ENOSPC;
}
bp->ecpri_port_cnt++;
@@ -2527,7 +2527,7 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,
HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI;
break;
default:
- PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Tunnel type is not supported");
return -ENOTSUP;
}
rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port,
@@ -2567,11 +2567,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
switch (udp_tunnel->prot_type) {
case RTE_ETH_TUNNEL_TYPE_VXLAN:
if (!bp->vxlan_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->vxlan_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->vxlan_port);
return -EINVAL;
}
@@ -2584,11 +2584,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_GENEVE:
if (!bp->geneve_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->geneve_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->geneve_port);
return -EINVAL;
}
@@ -2601,11 +2601,11 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
break;
case RTE_ETH_TUNNEL_TYPE_ECPRI:
if (!bp->ecpri_port_cnt) {
- PMD_DRV_LOG(ERR, "No Tunnel port configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "No Tunnel port configured yet");
return -EINVAL;
}
if (bp->ecpri_port != udp_tunnel->udp_port) {
- PMD_DRV_LOG(ERR, "Req Port: %d. Configured port: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Req Port: %d. Configured port: %d",
udp_tunnel->udp_port, bp->ecpri_port);
return -EINVAL;
}
@@ -2617,7 +2617,7 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev,
port = bp->ecpri_fw_dst_port_id;
break;
default:
- PMD_DRV_LOG(ERR, "Tunnel type is not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Tunnel type is not supported");
return -ENOTSUP;
}
@@ -2644,8 +2644,8 @@ static int bnxt_del_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
STAILQ_REMOVE(&vnic->filter, filter,
bnxt_filter_info, next);
bnxt_free_filter(bp, filter);
- PMD_DRV_LOG(INFO,
- "Deleted vlan filter for %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Deleted vlan filter for %d",
vlan_id);
return 0;
}
@@ -2686,8 +2686,8 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
*/
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR,
- "MAC/VLAN filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "MAC/VLAN filter alloc failed");
return -ENOMEM;
}
/* MAC + VLAN ID filter */
@@ -2718,8 +2718,8 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
else
STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
- PMD_DRV_LOG(INFO,
- "Added Vlan filter for %d\n", vlan_id);
+ PMD_DRV_LOG_LINE(INFO,
+ "Added Vlan filter for %d", vlan_id);
return rc;
}
@@ -2734,7 +2734,7 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
return rc;
if (!eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "port must be started before setting vlan\n");
+ PMD_DRV_LOG_LINE(ERR, "port must be started before setting vlan");
return -EINVAL;
}
@@ -2796,7 +2796,7 @@ bnxt_config_vlan_hw_filter(struct bnxt *bp, uint64_t rx_offloads)
/* This filter will allow only untagged packets */
bnxt_add_vlan_filter(bp, 0);
}
- PMD_DRV_LOG(DEBUG, "VLAN Filtering: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN Filtering: %d",
!!(rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_FILTER));
return 0;
@@ -2868,7 +2868,7 @@ bnxt_config_vlan_hw_stripping(struct bnxt *bp, uint64_t rx_offloads)
if (rc)
return rc;
- PMD_DRV_LOG(DEBUG, "VLAN Strip Offload: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN Strip Offload: %d",
!!(rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP));
return rc;
@@ -2905,9 +2905,9 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
if (rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
- PMD_DRV_LOG(DEBUG, "Extend VLAN supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Extend VLAN supported");
else
- PMD_DRV_LOG(INFO, "Extend VLAN unsupported\n");
+ PMD_DRV_LOG_LINE(INFO, "Extend VLAN unsupported");
}
return 0;
@@ -2923,14 +2923,14 @@ bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type,
if (vlan_type != RTE_ETH_VLAN_TYPE_INNER &&
vlan_type != RTE_ETH_VLAN_TYPE_OUTER) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Unsupported vlan type.");
return -EINVAL;
}
if (!qinq) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"QinQ not enabled. Needs to be ON as we can "
- "accelerate only outer vlan\n");
+ "accelerate only outer vlan");
return -EINVAL;
}
@@ -2957,14 +2957,14 @@ bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type,
TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300;
break;
default:
- PMD_DRV_LOG(ERR, "Invalid TPID: %x\n", tpid);
+ PMD_DRV_LOG_LINE(ERR, "Invalid TPID: %x", tpid);
return -EINVAL;
}
bp->outer_tpid_bd |= tpid;
- PMD_DRV_LOG(INFO, "outer_tpid_bd = %x\n", bp->outer_tpid_bd);
+ PMD_DRV_LOG_LINE(INFO, "outer_tpid_bd = %x", bp->outer_tpid_bd);
} else if (vlan_type == RTE_ETH_VLAN_TYPE_INNER) {
- PMD_DRV_LOG(ERR,
- "Can accelerate only outer vlan in QinQ\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Can accelerate only outer vlan in QinQ");
return -EINVAL;
}
@@ -3009,7 +3009,7 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
rc = bnxt_add_mac_filter(bp, vnic, addr, 0, 0);
}
- PMD_DRV_LOG(DEBUG, "Set MAC addr\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Set MAC addr");
return rc;
}
@@ -3032,16 +3032,16 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
bp->nb_mc_addr = nb_mc_addr;
if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
- PMD_DRV_LOG(INFO, "Number of Mcast MACs added (%u) exceeded Max supported (%u)\n",
+ PMD_DRV_LOG_LINE(INFO, "Number of Mcast MACs added (%u) exceeded Max supported (%u)",
nb_mc_addr, BNXT_MAX_MC_ADDRS);
- PMD_DRV_LOG(INFO, "Turning on Mcast promiscuous mode\n");
+ PMD_DRV_LOG_LINE(INFO, "Turning on Mcast promiscuous mode");
vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
goto allmulti;
}
/* TODO Check for Duplicate mcast addresses */
if (vnic->flags & BNXT_VNIC_INFO_ALLMULTI) {
- PMD_DRV_LOG(INFO, "Turning off Mcast promiscuous mode\n");
+ PMD_DRV_LOG_LINE(INFO, "Turning off Mcast promiscuous mode");
vnic->flags &= ~BNXT_VNIC_INFO_ALLMULTI;
}
for (i = 0; i < nb_mc_addr; i++)
@@ -3213,7 +3213,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
/* Return if port is active */
if (eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "Stop port before changing MTU\n");
+ PMD_DRV_LOG_LINE(ERR, "Stop port before changing MTU");
return -EBUSY;
}
@@ -3232,14 +3232,14 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
rc = bnxt_vnic_mru_config(bp, new_mtu);
if (rc) {
- PMD_DRV_LOG(ERR, "failed to update mtu in vnic context\n");
+ PMD_DRV_LOG_LINE(ERR, "failed to update mtu in vnic context");
return rc;
}
if (bnxt_hwrm_config_host_mtu(bp))
- PMD_DRV_LOG(WARNING, "Failed to configure host MTU\n");
+ PMD_DRV_LOG_LINE(WARNING, "Failed to configure host MTU");
- PMD_DRV_LOG(INFO, "New MTU is %d\n", new_mtu);
+ PMD_DRV_LOG_LINE(INFO, "New MTU is %d", new_mtu);
return rc;
}
@@ -3256,7 +3256,7 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
return rc;
if (!BNXT_SINGLE_PF(bp)) {
- PMD_DRV_LOG(ERR, "PVID cannot be modified on VF or on shared PF\n");
+ PMD_DRV_LOG_LINE(ERR, "PVID cannot be modified on VF or on shared PF");
return -ENOTSUP;
}
bp->vlan = on ? pvid : 0;
@@ -3532,7 +3532,7 @@ bnxt_flow_ops_get_op(struct rte_eth_dev *dev,
bp = vfr->parent_dev->data->dev_private;
/* parent is deleted while children are still valid */
if (!bp) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR Error\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR Error",
dev->data->port_id);
return -EIO;
}
@@ -3910,7 +3910,7 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT "\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT,
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function);
@@ -3934,7 +3934,7 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d",
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function,
in_eeprom->offset, in_eeprom->length);
@@ -4010,13 +4010,13 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
if (rc)
return rc;
- PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d",
bp->pdev->addr.domain, bp->pdev->addr.bus,
bp->pdev->addr.devid, bp->pdev->addr.function,
in_eeprom->offset, in_eeprom->length);
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "NVM write not supported from a VF\n");
+ PMD_DRV_LOG_LINE(ERR, "NVM write not supported from a VF");
return -EINVAL;
}
@@ -4061,14 +4061,14 @@ static int bnxt_get_module_info(struct rte_eth_dev *dev,
*/
if (bp->link_info->module_status >
HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_WARNINGMSG) {
- PMD_DRV_LOG(NOTICE, "Port %u : Module is not inserted or is powered down\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Module is not inserted or is powered down",
dev->data->port_id);
return -ENOTSUP;
}
/* This feature is not supported in older firmware versions */
if (bp->hwrm_spec_code < 0x10202) {
- PMD_DRV_LOG(NOTICE, "Port %u : Feature is not supported in older firmware\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Feature is not supported in older firmware",
dev->data->port_id);
return -ENOTSUP;
}
@@ -4099,11 +4099,11 @@ static int bnxt_get_module_info(struct rte_eth_dev *dev,
modinfo->eeprom_len = RTE_ETH_MODULE_SFF_8636_LEN;
break;
default:
- PMD_DRV_LOG(NOTICE, "Port %u : Unsupported module\n", dev->data->port_id);
+ PMD_DRV_LOG_LINE(NOTICE, "Port %u : Unsupported module", dev->data->port_id);
return -ENOTSUP;
}
- PMD_DRV_LOG(INFO, "Port %u : modinfo->type = %d modinfo->eeprom_len = %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Port %u : modinfo->type = %d modinfo->eeprom_len = %d",
dev->data->port_id, modinfo->type, modinfo->eeprom_len);
return 0;
@@ -4327,7 +4327,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
case BNXT_FW_STATUS_REG_TYPE_CFG:
ret = rte_pci_write_config(bp->pdev, &val, sizeof(val), offset);
if (ret < 0) {
- PMD_DRV_LOG(ERR, "Failed to write %#x at PCI offset %#x",
+ PMD_DRV_LOG_LINE(ERR, "Failed to write %#x at PCI offset %#x",
val, offset);
return;
}
@@ -4365,7 +4365,8 @@ bnxt_check_fw_reset_done(struct bnxt *bp)
do {
rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset 0x%x",
+ PCI_SUBSYSTEM_ID_OFFSET);
return rc;
}
if (val != 0xffff)
@@ -4374,7 +4375,7 @@ bnxt_check_fw_reset_done(struct bnxt *bp)
} while (timeout--);
if (val == 0xffff) {
- PMD_DRV_LOG(ERR, "Firmware reset aborted, PCI config space invalid\n");
+ PMD_DRV_LOG_LINE(ERR, "Firmware reset aborted, PCI config space invalid");
return -1;
}
@@ -4453,7 +4454,7 @@ static int bnxt_restore_mcast_mac_filters(struct bnxt *bp)
ret = bnxt_dev_set_mc_addr_list_op(bp->eth_dev, bp->mcast_addr_list,
bp->nb_mc_addr);
if (ret)
- PMD_DRV_LOG(ERR, "Failed to restore multicast MAC addreeses\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to restore multicast MAC addreeses");
return ret;
}
@@ -4504,7 +4505,7 @@ static int bnxt_check_fw_ready(struct bnxt *bp)
} while (rc && timeout > 0);
if (rc)
- PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
+ PMD_DRV_LOG_LINE(ERR, "FW is not Ready after reset");
return rc;
}
@@ -4524,7 +4525,7 @@ static void bnxt_dev_recover(void *arg)
/* Clear Error flag so that device re-init should happen */
bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
- PMD_DRV_LOG(INFO, "Port: %u Starting recovery...\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Starting recovery...",
bp->eth_dev->data->port_id);
rc = bnxt_check_fw_ready(bp);
@@ -4533,8 +4534,8 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_init_resources(bp, true);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize resources after reset\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize resources after reset");
goto err;
}
/* clear reset flag as the device is initialized now */
@@ -4542,7 +4543,7 @@ static void bnxt_dev_recover(void *arg)
rc = bnxt_dev_start_op(bp->eth_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to start port after reset\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to start port after reset");
goto err_start;
}
@@ -4556,7 +4557,7 @@ static void bnxt_dev_recover(void *arg)
bp->eth_dev->tx_pkt_burst;
rte_mb();
- PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Recovered from FW reset",
bp->eth_dev->data->port_id);
pthread_mutex_unlock(&bp->err_recovery_lock);
rte_eth_dev_callback_process(bp->eth_dev,
@@ -4576,7 +4577,7 @@ static void bnxt_dev_recover(void *arg)
RTE_ETH_EVENT_INTR_RMV,
NULL);
pthread_mutex_unlock(&bp->err_recovery_lock);
- PMD_DRV_LOG(ERR, "Port %u: Failed to recover from FW reset\n",
+ PMD_DRV_LOG_LINE(ERR, "Port %u: Failed to recover from FW reset",
bp->eth_dev->data->port_id);
}
@@ -4588,7 +4589,7 @@ void bnxt_dev_reset_and_resume(void *arg)
int rc;
bnxt_dev_cleanup(bp);
- PMD_DRV_LOG(INFO, "Port: %u Finished bnxt_dev_cleanup\n",
+ PMD_DRV_LOG_LINE(INFO, "Port: %u Finished bnxt_dev_cleanup",
bp->eth_dev->data->port_id);
bnxt_wait_for_device_shutdown(bp);
@@ -4602,7 +4603,8 @@ void bnxt_dev_reset_and_resume(void *arg)
if (bp->flags & BNXT_FLAG_FATAL_ERROR) {
rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset 0x%x",
+ PCI_SUBSYSTEM_ID_OFFSET);
return;
}
if (val == 0xffff) {
@@ -4613,7 +4615,7 @@ void bnxt_dev_reset_and_resume(void *arg)
rc = rte_eal_alarm_set(us, bnxt_dev_recover, (void *)bp);
if (rc)
- PMD_DRV_LOG(ERR, "Port %u: Error setting recovery alarm",
+ PMD_DRV_LOG_LINE(ERR, "Port %u: Error setting recovery alarm",
bp->eth_dev->data->port_id);
}
@@ -4631,7 +4633,7 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)
case BNXT_FW_STATUS_REG_TYPE_CFG:
ret = rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
if (ret < 0)
- PMD_DRV_LOG(ERR, "Failed to read PCI offset %#x",
+ PMD_DRV_LOG_LINE(ERR, "Failed to read PCI offset %#x",
offset);
break;
case BNXT_FW_STATUS_REG_TYPE_GRC:
@@ -4662,7 +4664,7 @@ static int bnxt_fw_reset_all(struct bnxt *bp)
/* Reset with the help of Kong processor */
rc = bnxt_hwrm_fw_reset(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to reset FW\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to reset FW");
}
return rc;
@@ -4679,7 +4681,7 @@ static void bnxt_fw_reset_cb(void *arg)
bnxt_is_recovery_enabled(bp)) {
rc = bnxt_fw_reset_all(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Adapter recovery failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Adapter recovery failed");
return;
}
}
@@ -4740,7 +4742,7 @@ static void bnxt_check_fw_health(void *arg)
bnxt_stop_rxtx(bp->eth_dev);
- PMD_DRV_LOG(ERR, "Detected FW dead condition\n");
+ PMD_DRV_LOG_LINE(ERR, "Detected FW dead condition");
rte_eth_dev_callback_process(bp->eth_dev,
RTE_ETH_EVENT_ERR_RECOVERING,
@@ -4871,7 +4873,7 @@ static int bnxt_map_pci_bars(struct rte_eth_dev *eth_dev)
bp->bar0 = (void *)pci_dev->mem_resource[0].addr;
bp->doorbell_base = (void *)pci_dev->mem_resource[2].addr;
if (!bp->bar0 || !bp->doorbell_base) {
- PMD_DRV_LOG(ERR, "Unable to access Hardware\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to access Hardware");
return -ENODEV;
}
@@ -5134,8 +5136,8 @@ int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp)
ctxm->max_entries);
ctx_pg[i].entries = entries;
mem_size = ctxm->entry_size * entries;
- PMD_DRV_LOG(DEBUG,
- "Type:0x%x instance:%d entries:%d size:%d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Type:0x%x instance:%d entries:%d size:%d",
ctxm->type, i, ctx_pg[i].entries, mem_size);
rc = bnxt_alloc_ctx_mem_blk(bp, &ctx_pg[i],
ctxm->init_value ? ctxm : NULL,
@@ -5186,7 +5188,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
rc = bnxt_hwrm_func_backing_store_qcaps(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Query context mem capability failed\n");
+ PMD_DRV_LOG_LINE(ERR, "Query context mem capability failed");
return rc;
}
@@ -5270,8 +5272,8 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
rc = bnxt_hwrm_func_backing_store_cfg(bp, ena);
done:
if (rc)
- PMD_DRV_LOG(ERR,
- "Failed to configure context mem: rc = %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to configure context mem: rc = %d", rc);
else
ctx->flags |= BNXT_CTX_FLAG_INITED;
@@ -5375,14 +5377,14 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
int rc = 0;
if (bp->max_l2_ctx > RTE_ETH_NUM_RECEIVE_MAC_ADDR)
- PMD_DRV_LOG(INFO, "Max number of MAC addrs supported is %d, but will be limited to %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Max number of MAC addrs supported is %d, but will be limited to %d",
bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
RTE_ETHER_ADDR_LEN * max_mac_addr,
0);
if (eth_dev->data->mac_addrs == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc MAC addr tbl\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc MAC addr tbl");
return -ENOMEM;
}
@@ -5391,10 +5393,10 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
return -EINVAL;
/* Generate a random MAC address, if none was assigned by PF */
- PMD_DRV_LOG(INFO, "VF MAC address not assigned by Host PF\n");
+ PMD_DRV_LOG_LINE(INFO, "VF MAC address not assigned by Host PF");
bnxt_eth_hw_addr_random(bp->mac_addr);
- PMD_DRV_LOG(INFO,
- "Assign random MAC:" RTE_ETHER_ADDR_PRT_FMT "\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Assign random MAC:" RTE_ETHER_ADDR_PRT_FMT,
bp->mac_addr[0], bp->mac_addr[1], bp->mac_addr[2],
bp->mac_addr[3], bp->mac_addr[4], bp->mac_addr[5]);
@@ -5414,12 +5416,12 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
sizeof(struct rte_ether_addr) *
BNXT_MAX_MC_ADDRS, 0);
if (bp->mcast_addr_list == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate multicast addr table\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate multicast addr table");
return -ENOMEM;
}
bp->mc_list_dma_addr = rte_malloc_virt2iova(bp->mcast_addr_list);
if (bp->mc_list_dma_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR, "Fail to map mcast_addr_list to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR, "Fail to map mcast_addr_list to physical memory");
return -ENOMEM;
}
@@ -5437,7 +5439,7 @@ static int bnxt_restore_dflt_mac(struct bnxt *bp)
/* Restore the old MAC configured */
rc = bnxt_hwrm_set_mac(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to restore MAC address\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to restore MAC address");
return rc;
}
@@ -5488,7 +5490,7 @@ static void bnxt_check_fw_status(struct bnxt *bp)
fw_status = bnxt_read_fw_status_reg(bp, BNXT_FW_STATUS_REG);
if (fw_status != BNXT_FW_STATUS_HEALTHY)
- PMD_DRV_LOG(ERR, "Firmware not responding, status: %#x\n",
+ PMD_DRV_LOG_LINE(ERR, "Firmware not responding, status: %#x",
fw_status);
}
@@ -5619,25 +5621,25 @@ bnxt_init_locks(struct bnxt *bp)
err = pthread_mutex_init(&bp->flow_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize flow_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize flow_lock");
return err;
}
err = pthread_mutex_init(&bp->def_cp_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize def_cp_lock");
return err;
}
err = pthread_mutex_init(&bp->health_check_lock, NULL);
if (err) {
- PMD_DRV_LOG(ERR, "Unable to initialize health_check_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize health_check_lock");
return err;
}
err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
if (err)
- PMD_DRV_LOG(ERR, "Unable to initialize err_recovery_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize err_recovery_lock");
return err;
}
@@ -5650,11 +5652,11 @@ static int bnxt_alloc_switch_domain(struct bnxt *bp)
if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) {
rc = rte_eth_switch_domain_alloc(&bp->switch_domain_id);
if (rc)
- PMD_DRV_LOG(ERR,
- "Failed to alloc switch domain: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc switch domain: %d", rc);
else
- PMD_DRV_LOG(INFO,
- "Switch domain allocated %d\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Switch domain allocated %d",
bp->switch_domain_id);
}
@@ -5689,7 +5691,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
rc = bnxt_hwrm_func_driver_register(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to register driver");
+ PMD_DRV_LOG_LINE(ERR, "Failed to register driver");
return -EBUSY;
}
@@ -5697,13 +5699,13 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
if (bp->pdev->max_vfs) {
rc = bnxt_hwrm_allocate_vfs(bp, bp->pdev->max_vfs);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate VFs\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate VFs");
return rc;
}
} else {
rc = bnxt_hwrm_allocate_pf_only(bp);
if (rc) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Failed to allocate PF resources");
return rc;
}
@@ -5714,7 +5716,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
bp->rss_conf.rss_key = rte_zmalloc("bnxt_rss_key",
HW_HASH_KEY_SIZE, 0);
if (bp->rss_conf.rss_key == NULL) {
- PMD_DRV_LOG(ERR, "port %u cannot allocate RSS hash key memory",
+ PMD_DRV_LOG_LINE(ERR, "port %u cannot allocate RSS hash key memory",
bp->eth_dev->data->port_id);
return -ENOMEM;
}
@@ -5734,7 +5736,7 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
rc = bnxt_init_ctx_mem(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to init adv_flow_counters\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to init adv_flow_counters");
return rc;
}
@@ -5750,28 +5752,28 @@ bnxt_parse_devarg_flow_xstat(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to flow_xstat devarg.");
return -EINVAL;
}
flow_xstat = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(flow_xstat == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to flow_xstat devarg.");
return -EINVAL;
}
if (BNXT_DEVARG_FLOW_XSTAT_INVALID(flow_xstat)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to flow_xstat devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to flow_xstat devarg.");
return -EINVAL;
}
bp->flags |= BNXT_FLAG_FLOW_XSTATS_EN;
if (BNXT_FLOW_XSTATS_EN(bp))
- PMD_DRV_LOG(INFO, "flow_xstat feature enabled.\n");
+ PMD_DRV_LOG_LINE(INFO, "flow_xstat feature enabled.");
return 0;
}
@@ -5785,28 +5787,28 @@ bnxt_parse_devarg_max_num_kflows(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to max_num_kflows devarg.");
return -EINVAL;
}
max_num_kflows = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(max_num_kflows == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to max_num_kflows devarg.");
return -EINVAL;
}
if (bnxt_devarg_max_num_kflow_invalid(max_num_kflows)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to max_num_kflows devarg.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to max_num_kflows devarg.");
return -EINVAL;
}
bp->max_num_kflows = max_num_kflows;
if (bp->max_num_kflows)
- PMD_DRV_LOG(INFO, "max_num_kflows set as %ldK.\n",
+ PMD_DRV_LOG_LINE(INFO, "max_num_kflows set as %ldK.",
max_num_kflows);
return 0;
@@ -5821,30 +5823,30 @@ bnxt_parse_devarg_cqe_mode(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to cqe-mode "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
cqe_mode = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(cqe_mode == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to cqe-mode "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_CQE_MODE_INVALID(cqe_mode)) {
- PMD_DRV_LOG(ERR, "Invalid cqe-mode(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid cqe-mode(%d) devargs.",
(uint16_t)cqe_mode);
return -EINVAL;
}
if (cqe_mode == 1)
bp->flags2 |= BNXT_FLAGS2_COMPRESSED_RX_CQE;
- PMD_DRV_LOG(INFO, "cqe-mode=%d feature enabled.\n", (uint8_t)cqe_mode);
+ PMD_DRV_LOG_LINE(INFO, "cqe-mode=%d feature enabled.", (uint8_t)cqe_mode);
return 0;
}
@@ -5858,29 +5860,29 @@ bnxt_parse_devarg_app_id(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to app-id "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
app_id = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(app_id == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to app_id "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_APP_ID_INVALID(app_id)) {
- PMD_DRV_LOG(ERR, "Invalid app-id(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid app-id(%d) devargs.",
(uint16_t)app_id);
return -EINVAL;
}
bp->app_id = app_id;
- PMD_DRV_LOG(INFO, "app-id=%d feature enabled.\n", (uint16_t)app_id);
+ PMD_DRV_LOG_LINE(INFO, "app-id=%d feature enabled.", (uint16_t)app_id);
return 0;
}
@@ -5894,29 +5896,29 @@ bnxt_parse_devarg_ieee_1588(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to ieee-1588 "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
ieee_1588 = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(ieee_1588 == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to ieee_1588 "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_IEEE_1588_INVALID(ieee_1588)) {
- PMD_DRV_LOG(ERR, "Invalid ieee-1588(%d) devargs.\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid ieee-1588(%d) devargs.",
(uint16_t)ieee_1588);
return -EINVAL;
}
bp->ieee_1588 = ieee_1588;
- PMD_DRV_LOG(INFO, "ieee-1588=%d feature enabled.\n", (uint16_t)ieee_1588);
+ PMD_DRV_LOG_LINE(INFO, "ieee-1588=%d feature enabled.", (uint16_t)ieee_1588);
return 0;
}
@@ -5930,30 +5932,30 @@ bnxt_parse_devarg_rep_is_pf(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to rep_is_pf devargs.");
return -EINVAL;
}
rep_is_pf = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_is_pf == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
- "Invalid parameter passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid parameter passed to rep_is_pf devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_IS_PF_INVALID(rep_is_pf)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_is_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_is_pf devargs.");
return -EINVAL;
}
vfr_bp->flags |= rep_is_pf;
if (BNXT_REP_PF(vfr_bp))
- PMD_DRV_LOG(INFO, "PF representor\n");
+ PMD_DRV_LOG_LINE(INFO, "PF representor");
else
- PMD_DRV_LOG(INFO, "VF representor\n");
+ PMD_DRV_LOG_LINE(INFO, "VF representor");
return 0;
}
@@ -5967,31 +5969,31 @@ bnxt_parse_devarg_rep_based_pf(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_based_pf "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_based_pf = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_based_pf == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_based_pf "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_BASED_PF_INVALID(rep_based_pf)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_based_pf devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_based_pf devargs.");
return -EINVAL;
}
vfr_bp->rep_based_pf = rep_based_pf;
vfr_bp->flags |= BNXT_REP_BASED_PF_VALID;
- PMD_DRV_LOG(INFO, "rep-based-pf = %d\n", vfr_bp->rep_based_pf);
+ PMD_DRV_LOG_LINE(INFO, "rep-based-pf = %d", vfr_bp->rep_based_pf);
return 0;
}
@@ -6005,30 +6007,30 @@ bnxt_parse_devarg_rep_q_r2f(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_q_r2f = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_q_r2f == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_Q_R2F_INVALID(rep_q_r2f)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_q_r2f devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_q_r2f devargs.");
return -EINVAL;
}
vfr_bp->rep_q_r2f = rep_q_r2f;
vfr_bp->flags |= BNXT_REP_Q_R2F_VALID;
- PMD_DRV_LOG(INFO, "rep-q-r2f = %d\n", vfr_bp->rep_q_r2f);
+ PMD_DRV_LOG_LINE(INFO, "rep-q-r2f = %d", vfr_bp->rep_q_r2f);
return 0;
}
@@ -6042,30 +6044,30 @@ bnxt_parse_devarg_rep_q_f2r(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_q_f2r = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_q_f2r == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_q_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_Q_F2R_INVALID(rep_q_f2r)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_q_f2r devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_q_f2r devargs.");
return -EINVAL;
}
vfr_bp->rep_q_f2r = rep_q_f2r;
vfr_bp->flags |= BNXT_REP_Q_F2R_VALID;
- PMD_DRV_LOG(INFO, "rep-q-f2r = %d\n", vfr_bp->rep_q_f2r);
+ PMD_DRV_LOG_LINE(INFO, "rep-q-f2r = %d", vfr_bp->rep_q_f2r);
return 0;
}
@@ -6079,30 +6081,30 @@ bnxt_parse_devarg_rep_fc_r2f(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_fc_r2f = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_fc_r2f == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_r2f "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_FC_R2F_INVALID(rep_fc_r2f)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_fc_r2f devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_fc_r2f devargs.");
return -EINVAL;
}
vfr_bp->flags |= BNXT_REP_FC_R2F_VALID;
vfr_bp->rep_fc_r2f = rep_fc_r2f;
- PMD_DRV_LOG(INFO, "rep-fc-r2f = %lu\n", rep_fc_r2f);
+ PMD_DRV_LOG_LINE(INFO, "rep-fc-r2f = %lu", rep_fc_r2f);
return 0;
}
@@ -6116,30 +6118,30 @@ bnxt_parse_devarg_rep_fc_f2r(__rte_unused const char *key,
char *end = NULL;
if (!value || !opaque_arg) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
rep_fc_f2r = strtoul(value, &end, 10);
if (end == NULL || *end != '\0' ||
(rep_fc_f2r == ULONG_MAX && errno == ERANGE)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"Invalid parameter passed to rep_fc_f2r "
- "devargs.\n");
+ "devargs.");
return -EINVAL;
}
if (BNXT_DEVARG_REP_FC_F2R_INVALID(rep_fc_f2r)) {
- PMD_DRV_LOG(ERR,
- "Invalid value passed to rep_fc_f2r devargs.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid value passed to rep_fc_f2r devargs.");
return -EINVAL;
}
vfr_bp->flags |= BNXT_REP_FC_F2R_VALID;
vfr_bp->rep_fc_f2r = rep_fc_f2r;
- PMD_DRV_LOG(INFO, "rep-fc-f2r = %lu\n", rep_fc_f2r);
+ PMD_DRV_LOG_LINE(INFO, "rep-fc-f2r = %lu", rep_fc_f2r);
return 0;
}
@@ -6229,8 +6231,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
rc = bnxt_map_pci_bars(eth_dev);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize board rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize board rc: %x", rc);
return rc;
}
@@ -6248,8 +6250,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
rc = bnxt_alloc_hwrm_resources(bp);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate response buffer rc: %x\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate response buffer rc: %x", rc);
return rc;
}
rc = bnxt_alloc_leds_info(bp);
@@ -6278,8 +6280,8 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
bnxt_cfa_code_dynfield_offset =
rte_mbuf_dynfield_register(&bnxt_cfa_code_dynfield_desc);
if (bnxt_cfa_code_dynfield_offset < 0) {
- PMD_DRV_LOG(ERR,
- "Failed to register mbuf field for TruFlow mark\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to register mbuf field for TruFlow mark");
return -rte_errno;
}
}
@@ -6296,7 +6298,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
int rc;
if (version_printed++ == 0)
- PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
+ PMD_DRV_LOG_LINE(INFO, "%s", bnxt_version);
eth_dev->dev_ops = &bnxt_dev_ops;
eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
@@ -6338,8 +6340,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
if (rc)
goto error_free;
- PMD_DRV_LOG(INFO,
- "Found %s device at mem %" PRIX64 ", node addr %pM\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Found %s device at mem %" PRIX64 ", node addr %pM",
DRV_MODULE_NAME,
pci_dev->mem_resource[0].phys_addr,
pci_dev->mem_resource[0].addr);
@@ -6460,7 +6462,7 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return -EPERM;
- PMD_DRV_LOG(DEBUG, "Calling Device uninit\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Calling Device uninit");
if (eth_dev->state != RTE_ETH_DEV_UNUSED)
bnxt_dev_close_op(eth_dev);
@@ -6481,11 +6483,11 @@ static int bnxt_pci_remove_dev_with_reps(struct rte_eth_dev *eth_dev)
vf_rep_eth_dev = bp->rep_info[i].vfr_eth_dev;
if (!vf_rep_eth_dev)
continue;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR pci remove\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR pci remove",
vf_rep_eth_dev->data->port_id);
rte_eth_dev_destroy(vf_rep_eth_dev, bnxt_representor_uninit);
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci remove\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci remove",
eth_dev->data->port_id);
ret = rte_eth_dev_destroy(eth_dev, bnxt_dev_uninit);
@@ -6511,14 +6513,14 @@ static int bnxt_init_rep_info(struct bnxt *bp)
sizeof(bp->rep_info[0]) * BNXT_MAX_VF_REPS(bp),
0);
if (!bp->rep_info) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for rep info\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for rep info");
return -ENOMEM;
}
bp->cfa_code_map = rte_zmalloc("bnxt_cfa_code_map",
sizeof(*bp->cfa_code_map) *
BNXT_MAX_CFA_CODE, 0);
if (!bp->cfa_code_map) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for cfa_code_map\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for cfa_code_map");
bnxt_free_rep_info(bp);
return -ENOMEM;
}
@@ -6528,7 +6530,7 @@ static int bnxt_init_rep_info(struct bnxt *bp)
rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Unable to initialize vfr_start_lock\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to initialize vfr_start_lock");
bnxt_free_rep_info(bp);
return rc;
}
@@ -6553,27 +6555,27 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
if (eth_da->type == RTE_ETH_REPRESENTOR_NONE)
return 0;
if (eth_da->type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type %d\n",
+ PMD_DRV_LOG_LINE(ERR, "unsupported representor type %d",
eth_da->type);
return -ENOTSUP;
}
num_rep = eth_da->nb_representor_ports;
if (num_rep > max_vf_reps) {
- PMD_DRV_LOG(ERR, "nb_representor_ports = %d > %d MAX VF REPS\n",
+ PMD_DRV_LOG_LINE(ERR, "nb_representor_ports = %d > %d MAX VF REPS",
num_rep, max_vf_reps);
return -EINVAL;
}
if (num_rep >= RTE_MAX_ETHPORTS) {
- PMD_DRV_LOG(ERR,
- "nb_representor_ports = %d > %d MAX ETHPORTS\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "nb_representor_ports = %d > %d MAX ETHPORTS",
num_rep, RTE_MAX_ETHPORTS);
return -EINVAL;
}
if (!(BNXT_PF(backing_bp) || BNXT_VF_IS_TRUSTED(backing_bp))) {
- PMD_DRV_LOG(ERR,
- "Not a PF or trusted VF. No Representor support\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Not a PF or trusted VF. No Representor support");
/* Returning an error is not an option.
* Applications are not handling this correctly
*/
@@ -6591,7 +6593,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
};
if (representor.vf_id >= max_vf_reps) {
- PMD_DRV_LOG(ERR, "VF-Rep id %d >= %d MAX VF ID\n",
+ PMD_DRV_LOG_LINE(ERR, "VF-Rep id %d >= %d MAX VF ID",
representor.vf_id, max_vf_reps);
continue;
}
@@ -6683,20 +6685,20 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
bnxt_representor_init,
&representor);
if (ret) {
- PMD_DRV_LOG(ERR, "failed to create bnxt vf "
+ PMD_DRV_LOG_LINE(ERR, "failed to create bnxt vf "
"representor %s.", name);
goto err;
}
vf_rep_eth_dev = rte_eth_dev_allocated(name);
if (!vf_rep_eth_dev) {
- PMD_DRV_LOG(ERR, "Failed to find the eth_dev"
+ PMD_DRV_LOG_LINE(ERR, "Failed to find the eth_dev"
" for VF-Rep: %s.", name);
ret = -ENODEV;
goto err;
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR pci probe\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR pci probe",
backing_eth_dev->data->port_id);
backing_bp->rep_info[representor.vf_id].vfr_eth_dev =
vf_rep_eth_dev;
@@ -6735,7 +6737,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
num_rep = eth_da.nb_representor_ports;
- PMD_DRV_LOG(DEBUG, "nb_representor_ports = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "nb_representor_ports = %d",
num_rep);
/* We could come here after first level of probe is already invoked
@@ -6754,7 +6756,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
backing_eth_dev = rte_eth_dev_allocated(pci_dev->device.name);
}
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci probe\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci probe",
backing_eth_dev->data->port_id);
if (!num_rep)
@@ -6779,7 +6781,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
* +ve value will at least help in proper cleanup
*/
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d pci remove\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d pci remove", eth_dev->data->port_id);
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
if (rte_eth_dev_is_repr(eth_dev))
return rte_eth_dev_destroy(eth_dev,
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index ff563f08bb..7b90ba651f 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -28,7 +28,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
filter = bnxt_get_unused_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "No more free filter resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free filter resources");
return NULL;
}
@@ -49,7 +49,7 @@ struct bnxt_filter_info *bnxt_alloc_vf_filter(struct bnxt *bp, uint16_t vf)
filter = rte_zmalloc("bnxt_vf_filter_info", sizeof(*filter), 0);
if (!filter) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for VF %hu filters\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for VF %hu filters",
vf);
return NULL;
}
@@ -126,20 +126,20 @@ void bnxt_free_filter_mem(struct bnxt *bp)
/* Call HWRM to try to free filter again */
rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
if (rc)
- PMD_DRV_LOG(ERR,
- "Cannot free ntuple filter: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot free ntuple filter: %d",
rc);
}
filter->fw_ntuple_filter_id = UINT64_MAX;
if (filter->fw_l2_filter_id != ((uint64_t)-1) &&
filter->filter_type == HWRM_CFA_L2_FILTER) {
- PMD_DRV_LOG(DEBUG, "L2 filter is not free\n");
+ PMD_DRV_LOG_LINE(DEBUG, "L2 filter is not free");
/* Call HWRM to try to free filter again */
rc = bnxt_hwrm_clear_l2_filter(bp, filter);
if (rc)
- PMD_DRV_LOG(ERR,
- "Cannot free L2 filter: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot free L2 filter: %d",
rc);
}
filter->fw_l2_filter_id = UINT64_MAX;
@@ -170,7 +170,7 @@ int bnxt_alloc_filter_mem(struct bnxt *bp)
max_filters * sizeof(struct bnxt_filter_info),
0);
if (filter_mem == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for %d filters",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for %d filters",
max_filters);
return -ENOMEM;
}
@@ -186,7 +186,7 @@ struct bnxt_filter_info *bnxt_get_unused_filter(struct bnxt *bp)
/* Find the 1st unused filter from the free_filter_list pool*/
filter = STAILQ_FIRST(&bp->free_filter_list);
if (!filter) {
- PMD_DRV_LOG(ERR, "No more free filter resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free filter resources");
return NULL;
}
STAILQ_REMOVE_HEAD(&bp->free_filter_list, next);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index f25bc6ff78..03413e9121 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -106,15 +106,15 @@ bnxt_filter_type_check(const struct rte_flow_item pattern[],
use_ntuple |= 1;
break;
default:
- PMD_DRV_LOG(DEBUG, "Unknown Flow type\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unknown Flow type");
use_ntuple |= 0;
}
item++;
}
if (has_vlan && use_ntuple) {
- PMD_DRV_LOG(ERR,
- "VLAN flow cannot use NTUPLE filter\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VLAN flow cannot use NTUPLE filter");
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
@@ -158,7 +158,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
use_ntuple = bnxt_filter_type_check(pattern, error);
if (use_ntuple < 0)
return use_ntuple;
- PMD_DRV_LOG(DEBUG, "Use NTUPLE %d\n", use_ntuple);
+ PMD_DRV_LOG_LINE(DEBUG, "Use NTUPLE %d", use_ntuple);
filter->filter_type = use_ntuple ?
HWRM_CFA_NTUPLE_FILTER : HWRM_CFA_L2_FILTER;
@@ -181,7 +181,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
inner =
((const struct rte_flow_item_any *)item->spec)->num > 3;
if (inner)
- PMD_DRV_LOG(DEBUG, "Parse inner header\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Parse inner header");
break;
case RTE_FLOW_ITEM_TYPE_ETH:
if (!item->spec)
@@ -229,8 +229,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
"DMAC is invalid");
- PMD_DRV_LOG(ERR,
- "DMAC is invalid!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "DMAC is invalid!");
return -rte_errno;
}
rte_memcpy(filter->dst_macaddr,
@@ -242,8 +242,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
BNXT_FLOW_L2_INNER_DST_VALID_FLAG :
BNXT_FLOW_L2_DST_VALID_FLAG;
filter->priority = attr->priority;
- PMD_DRV_LOG(DEBUG,
- "Creating a priority flow\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Creating a priority flow");
}
if (rte_is_broadcast_ether_addr(ð_mask->hdr.src_addr)) {
src = ð_spec->hdr.src_addr;
@@ -253,8 +253,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
RTE_FLOW_ERROR_TYPE_ITEM,
item,
"SMAC is invalid");
- PMD_DRV_LOG(ERR,
- "SMAC is invalid!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "SMAC is invalid!");
return -rte_errno;
}
rte_memcpy(filter->src_macaddr,
@@ -267,7 +267,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
BNXT_FLOW_L2_SRC_VALID_FLAG;
} /*
* else {
- * PMD_DRV_LOG(ERR, "Handle this condition\n");
+ * PMD_DRV_LOG_LINE(ERR, "Handle this condition");
* }
*/
if (eth_mask->hdr.ether_type) {
@@ -783,18 +783,18 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
nf->valid_flags & BNXT_FLOW_L2_DST_VALID_FLAG) {
filter1->flags |=
HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST;
- PMD_DRV_LOG(DEBUG, "Create Outer filter\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create Outer filter");
}
if (nf->filter_type == HWRM_CFA_L2_FILTER &&
(nf->valid_flags & BNXT_FLOW_L2_SRC_VALID_FLAG ||
nf->valid_flags & BNXT_FLOW_L2_INNER_SRC_VALID_FLAG)) {
- PMD_DRV_LOG(DEBUG, "Create L2 filter for SRC MAC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create L2 filter for SRC MAC");
filter1->flags |=
HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_SOURCE_VALID;
memcpy(filter1->l2_addr, nf->src_macaddr, RTE_ETHER_ADDR_LEN);
} else {
- PMD_DRV_LOG(DEBUG, "Create L2 filter for DST MAC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Create L2 filter for DST MAC");
memcpy(filter1->l2_addr, nf->dst_macaddr, RTE_ETHER_ADDR_LEN);
}
@@ -988,8 +988,8 @@ static int match_vnic_rss_cfg(struct bnxt *bp,
}
if (match != vnic->rx_queue_cnt) {
- PMD_DRV_LOG(ERR,
- "VNIC queue count %d vs queues matched %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC queue count %d vs queues matched %d",
match, vnic->rx_queue_cnt);
return -EINVAL;
}
@@ -1021,8 +1021,8 @@ bnxt_update_filter_flags_en(struct bnxt_filter_info *filter,
filter->fw_l2_filter_id = filter1->fw_l2_filter_id;
filter->l2_ref_cnt = filter1->l2_ref_cnt;
filter->flow_id = filter1->flow_id;
- PMD_DRV_LOG(DEBUG,
- "l2_filter: %p fw_l2_filter_id %" PRIx64 " l2_ref_cnt %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "l2_filter: %p fw_l2_filter_id %" PRIx64 " l2_ref_cnt %u",
filter1, filter->fw_l2_filter_id, filter->l2_ref_cnt);
}
@@ -1087,7 +1087,7 @@ bnxt_vnic_rss_cfg_update(struct bnxt *bp,
/* Validate Rx queues */
for (i = 0; i < rss->queue_num; i++) {
- PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n", rss->queue[i]);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS action Queue %d", rss->queue[i]);
if (rss->queue[i] >= bp->rx_nr_rings ||
!bp->rx_queues[rss->queue[i]]) {
@@ -1306,11 +1306,11 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
rc = -rte_errno;
goto ret;
}
- PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index);
+ PMD_DRV_LOG_LINE(DEBUG, "Queue index %d", act_q->index);
vnic_id = attr->group;
if (!vnic_id) {
- PMD_DRV_LOG(DEBUG, "Group id is 0\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Group id is 0");
vnic_id = act_q->index;
}
@@ -1319,8 +1319,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic = &bp->vnic_info[vnic_id];
if (vnic->rx_queue_cnt) {
if (vnic->start_grp_id != act_q->index) {
- PMD_DRV_LOG(ERR,
- "VNIC already in use\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC already in use");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1339,8 +1339,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto use_vnic;
if (!rxq) {
- PMD_DRV_LOG(ERR,
- "Queue invalid or used with other VNIC\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Queue invalid or used with other VNIC");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1357,20 +1357,20 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic->end_grp_id = act_q->index;
vnic->func_default = 0; //This is not a default VNIC.
- PMD_DRV_LOG(DEBUG, "VNIC found\n");
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC found");
rc = bnxt_vnic_prep(bp, vnic, act, error);
if (rc)
goto ret;
- PMD_DRV_LOG(DEBUG,
- "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vnic[%d] = %p vnic->fw_grp_ids = %p",
act_q->index, vnic, vnic->fw_grp_ids);
use_vnic:
vnic->ff_pool_idx = vnic_id;
- PMD_DRV_LOG(DEBUG,
- "Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Setting vnic ff_idx %d", vnic->ff_pool_idx);
filter->dst_id = vnic->fw_vnic_id;
/* For ntuple filter, create the L2 filter with default VNIC.
@@ -1392,7 +1392,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto ret;
}
- PMD_DRV_LOG(DEBUG, "new fltr: %p l2fltr: %p l2_ref_cnt: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "new fltr: %p l2fltr: %p l2_ref_cnt: %d",
filter, filter1, filter1->l2_ref_cnt);
bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
break;
@@ -1528,8 +1528,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (vnic->rx_queue_cnt) {
rc = match_vnic_rss_cfg(bp, vnic, rss);
if (rc) {
- PMD_DRV_LOG(ERR,
- "VNIC and RSS config mismatch\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "VNIC and RSS config mismatch");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1542,7 +1542,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
for (i = 0; i < rss->queue_num; i++) {
- PMD_DRV_LOG(DEBUG, "RSS action Queue %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS action Queue %d",
rss->queue[i]);
if (!rss->queue[i] ||
@@ -1560,8 +1560,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR,
- "queue active with other VNIC\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "queue active with other VNIC");
rte_flow_error_set(error,
EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1584,13 +1584,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
if (rc)
goto ret;
- PMD_DRV_LOG(DEBUG,
- "vnic[%d] = %p vnic->fw_grp_ids = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "vnic[%d] = %p vnic->fw_grp_ids = %p",
vnic_id, vnic, vnic->fw_grp_ids);
vnic->ff_pool_idx = vnic_id;
- PMD_DRV_LOG(DEBUG,
- "Setting vnic ff_pool_idx %d\n", vnic->ff_pool_idx);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Setting vnic ff_pool_idx %d", vnic->ff_pool_idx);
/* This can be done only after vnic_grp_alloc is done. */
for (i = 0; i < vnic->rx_queue_cnt; i++) {
@@ -1632,7 +1632,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
bnxt_hwrm_vnic_rss_cfg(bp, vnic);
} else {
- PMD_DRV_LOG(DEBUG, "No RSS config required\n");
+ PMD_DRV_LOG_LINE(DEBUG, "No RSS config required");
}
vnic_found:
@@ -1648,7 +1648,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
goto ret;
}
- PMD_DRV_LOG(DEBUG, "L2 filter created\n");
+ PMD_DRV_LOG_LINE(DEBUG, "L2 filter created");
bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
break;
case RTE_FLOW_ACTION_TYPE_MARK:
@@ -1663,8 +1663,8 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
}
if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
- PMD_DRV_LOG(DEBUG,
- "Disabling vector processing for mark\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Disabling vector processing for mark");
bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
}
@@ -1672,7 +1672,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
filter->mark = ((const struct rte_flow_action_mark *)
act->conf)->id;
- PMD_DRV_LOG(DEBUG, "Mark the flow %d\n", filter->mark);
+ PMD_DRV_LOG_LINE(DEBUG, "Mark the flow %d", filter->mark);
break;
default:
rte_flow_error_set(error,
@@ -1718,7 +1718,7 @@ struct bnxt_vnic_info *find_matching_vnic(struct bnxt *bp,
vnic = &bp->vnic_info[i];
if (vnic->fw_vnic_id != INVALID_VNIC_ID &&
filter->dst_id == vnic->fw_vnic_id) {
- PMD_DRV_LOG(DEBUG, "Found matching VNIC Id %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Found matching VNIC Id %d",
vnic->ff_pool_idx);
return vnic;
}
@@ -1764,7 +1764,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
if (STAILQ_EMPTY(&vnic->filter)) {
bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
- PMD_DRV_LOG(DEBUG, "Free VNIC\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Free VNIC");
}
}
@@ -1891,7 +1891,7 @@ void bnxt_flow_cnt_alarm_cb(void *arg)
struct bnxt *bp = arg;
if (!bp->flow_stat->rx_fc_out_tbl.va) {
- PMD_DRV_LOG(ERR, "bp->flow_stat->rx_fc_out_tbl.va is NULL?\n");
+ PMD_DRV_LOG_LINE(ERR, "bp->flow_stat->rx_fc_out_tbl.va is NULL?");
bnxt_cancel_fc_thread(bp);
return;
}
@@ -1908,7 +1908,7 @@ void bnxt_flow_cnt_alarm_cb(void *arg)
rc = bnxt_flow_stats_req(bp);
if (rc) {
- PMD_DRV_LOG(ERR, "Flow stat alarm not rescheduled.\n");
+ PMD_DRV_LOG_LINE(ERR, "Flow stat alarm not rescheduled.");
return;
}
@@ -2020,7 +2020,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bnxt_acquire_flow_lock(bp);
ret = bnxt_flow_args_validate(attr, pattern, actions, error);
if (ret != 0) {
- PMD_DRV_LOG(ERR, "Not a validate flow.\n");
+ PMD_DRV_LOG_LINE(ERR, "Not a validate flow.");
goto free_flow;
}
@@ -2039,15 +2039,15 @@ bnxt_flow_create(struct rte_eth_dev *dev,
ret = bnxt_match_filter(bp, filter);
if (ret == -EEXIST) {
- PMD_DRV_LOG(DEBUG, "Flow already exists.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Flow already exists.");
/* Clear the filter that was created as part of
* validate_and_parse_flow() above
*/
bnxt_hwrm_clear_l2_filter(bp, filter);
goto free_filter;
} else if (ret == -EXDEV) {
- PMD_DRV_LOG(DEBUG, "Flow with same pattern exists\n");
- PMD_DRV_LOG(DEBUG, "Updating with different destination\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Flow with same pattern exists");
+ PMD_DRV_LOG_LINE(DEBUG, "Updating with different destination");
update_flow = true;
}
@@ -2099,8 +2099,8 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
if (ret) {
- PMD_DRV_LOG(ERR,
- "Unable to free existing tunnel\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unable to free existing tunnel");
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL,
@@ -2155,8 +2155,8 @@ bnxt_flow_create(struct rte_eth_dev *dev,
}
if (filter->valid_flags & BNXT_FLOW_MARK_FLAG) {
- PMD_DRV_LOG(DEBUG,
- "Mark action: mark id 0x%x, flow id 0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Mark action: mark id 0x%x, flow id 0x%x",
filter->mark, filter->flow_id);
/* TCAM and EM should be 16-bit only.
@@ -2182,7 +2182,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
bp->flow_stat->flow_count++;
bnxt_release_flow_lock(bp);
bnxt_setup_flow_counter(bp);
- PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Successfully created flow.");
return flow;
}
@@ -2232,15 +2232,15 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
"tunnel_redirect info cmd fail");
return ret;
}
- PMD_DRV_LOG(INFO, "Pre-existing tunnel fid = %x vf->fid = %x\n",
+ PMD_DRV_LOG_LINE(INFO, "Pre-existing tunnel fid = %x vf->fid = %x",
tun_dst_fid + bp->first_vf_id, bp->fw_fid);
/* Tunnel doesn't belong to this VF, so don't send HWRM
* cmd, just delete the flow from driver
*/
if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) {
- PMD_DRV_LOG(ERR,
- "Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free");
} else {
ret = bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
@@ -2314,7 +2314,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
ret = bnxt_match_filter(bp, filter);
if (ret == 0)
- PMD_DRV_LOG(ERR, "Could not find matching flow\n");
+ PMD_DRV_LOG_LINE(ERR, "Could not find matching flow");
if (filter->valid_flags & BNXT_FLOW_MARK_FLAG) {
flow_id = filter->flow_id & BNXT_FLOW_ID_MASK;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fc142672f6..bcbcb56546 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -323,7 +323,7 @@ static int page_getenum(size_t size)
return 22;
if (size <= 1 << 30)
return 30;
- PMD_DRV_LOG(ERR, "Page size %zu out of range\n", size);
+ PMD_DRV_LOG_LINE(ERR, "Page size %zu out of range", size);
return sizeof(int) * 8 - 1;
}
@@ -402,7 +402,7 @@ bnxt_check_cq_hwrm_done(struct bnxt_cp_ring_info *cpr,
done = bnxt_flush_rx_cmp(cpr);
if (done)
- PMD_DRV_LOG(DEBUG, "HWRM DONE for %s ring\n",
+ PMD_DRV_LOG_LINE(DEBUG, "HWRM DONE for %s ring",
rx ? "Rx" : "Tx");
/* We are about to timeout and still haven't seen the
@@ -410,7 +410,7 @@ bnxt_check_cq_hwrm_done(struct bnxt_cp_ring_info *cpr,
*/
if (!done && timeout) {
done = 1;
- PMD_DRV_LOG(DEBUG, "Timing out for %s ring\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Timing out for %s ring",
rx ? "Rx" : "Tx");
}
} else {
@@ -555,8 +555,8 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
rte_cpu_to_le_16(req->req_type) == HWRM_VER_GET)
return -ETIMEDOUT;
- PMD_DRV_LOG(ERR,
- "Error(timeout) sending msg 0x%04x, seq_id %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error(timeout) sending msg 0x%04x, seq_id %d",
req->req_type, req->seq_id);
bp->flags |= BNXT_FLAG_FW_TIMEDOUT;
return -ETIMEDOUT;
@@ -604,7 +604,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
#define HWRM_CHECK_RESULT() do {\
if (rc) { \
- PMD_DRV_LOG(ERR, "failed rc:%d\n", rc); \
+ PMD_DRV_LOG_LINE(ERR, "failed rc:%d", rc); \
rte_spinlock_unlock(&bp->hwrm_lock); \
if (rc == HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED) \
rc = -EACCES; \
@@ -625,15 +625,15 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
if (resp->resp_len >= 16) { \
struct hwrm_err_output *tmp_hwrm_err_op = \
(void *)resp; \
- PMD_DRV_LOG(ERR, \
- "error %d:%d:%08x:%04x\n", \
+ PMD_DRV_LOG_LINE(ERR, \
+ "error %d:%d:%08x:%04x", \
rc, tmp_hwrm_err_op->cmd_err, \
rte_le_to_cpu_32(\
tmp_hwrm_err_op->opaque_0), \
rte_le_to_cpu_16(\
tmp_hwrm_err_op->opaque_1)); \
} else { \
- PMD_DRV_LOG(ERR, "error %d\n", rc); \
+ PMD_DRV_LOG_LINE(ERR, "error %d", rc); \
} \
rte_spinlock_unlock(&bp->hwrm_lock); \
if (rc == HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED) \
@@ -804,7 +804,7 @@ int bnxt_hwrm_clear_l2_filter(struct bnxt *bp,
if (filter->matching_l2_fltr_ptr)
l2_filter = filter->matching_l2_fltr_ptr;
- PMD_DRV_LOG(DEBUG, "filter: %p l2_filter: %p ref_cnt: %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "filter: %p l2_filter: %p ref_cnt: %d",
filter, l2_filter, l2_filter->l2_ref_cnt);
if (l2_filter->l2_ref_cnt == 0)
@@ -854,8 +854,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
//TODO: Is there a better way to add VLANs to each VNIC in case of VMDQ
if ((dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_VMDQ_FLAG) &&
conf->pool_map[j].pools & (1UL << j)) {
- PMD_DRV_LOG(DEBUG,
- "Add vlan %u to vmdq pool %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Add vlan %u to vmdq pool %u",
conf->pool_map[j].vlan_id, j);
filter->l2_ivlan = conf->pool_map[j].vlan_id;
@@ -1052,7 +1052,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info = rte_zmalloc("bnxt_vf_info", sizeof(*vf_info) * max_vfs, 0);
if (vf_info == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc vf info\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc vf info");
return -ENOMEM;
}
@@ -1062,7 +1062,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info[i].vlan_table = rte_zmalloc("VF VLAN table",
getpagesize(), getpagesize());
if (vf_info[i].vlan_table == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc VLAN table for VF %d\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc VLAN table for VF %d", i);
goto err;
}
rte_mem_lock_page(vf_info[i].vlan_table);
@@ -1070,7 +1070,7 @@ static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
vf_info[i].vlan_as_table = rte_zmalloc("VF VLAN AS table",
getpagesize(), getpagesize());
if (vf_info[i].vlan_as_table == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc VLAN AS table for VF %d\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc VLAN AS table for VF %d", i);
goto err;
}
rte_mem_lock_page(vf_info[i].vlan_as_table);
@@ -1138,7 +1138,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->max_vnics = rte_le_to_cpu_16(BNXT_MAX_VNICS_COS_CLASSIFY);
else
bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
- PMD_DRV_LOG(DEBUG, "Max l2_cntxts is %d vnics is %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Max l2_cntxts is %d vnics is %d",
bp->max_l2_ctx, bp->max_vnics);
bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
@@ -1152,7 +1152,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
if (BNXT_CHIP_P5(bp) || BNXT_PF(bp)) {
bp->flags |= BNXT_FLAG_PTP_SUPPORTED;
- PMD_DRV_LOG(DEBUG, "PTP SUPPORTED\n");
+ PMD_DRV_LOG_LINE(DEBUG, "PTP SUPPORTED");
HWRM_UNLOCK();
bnxt_hwrm_ptp_qcfg(bp);
}
@@ -1163,7 +1163,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERROR_RECOVERY_CAPABLE) {
bp->fw_cap |= BNXT_FW_CAP_ERROR_RECOVERY;
- PMD_DRV_LOG(DEBUG, "Adapter Error recovery SUPPORTED\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Adapter Error recovery SUPPORTED");
}
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERR_RECOVER_RELOAD)
@@ -1176,18 +1176,18 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN;
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "Backing store v2 supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Backing store v2 supported");
if (BNXT_CHIP_P7(bp))
bp->fw_cap |= BNXT_FW_CAP_BACKING_STORE_V2;
}
if (!(flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED)) {
bp->fw_cap |= BNXT_FW_CAP_VLAN_TX_INSERT;
- PMD_DRV_LOG(DEBUG, "VLAN acceleration for TX is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "VLAN acceleration for TX is enabled");
}
bp->tunnel_disable_flag = rte_le_to_cpu_16(resp->tunnel_disable_flag);
if (bp->tunnel_disable_flag)
- PMD_DRV_LOG(DEBUG, "Tunnel parsing capability is disabled, flags : %#x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Tunnel parsing capability is disabled, flags : %#x",
bp->tunnel_disable_flag);
if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED)
@@ -1246,7 +1246,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_COS_CLASSIFY;
- PMD_DRV_LOG(INFO, "CoS assignment capability enabled\n");
+ PMD_DRV_LOG_LINE(INFO, "CoS assignment capability enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP)
@@ -1254,7 +1254,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_TRUSTED_VF_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_OUTER_RSS_TRUSTED_VF;
- PMD_DRV_LOG(DEBUG, "Trusted VF's outer RSS capability is enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Trusted VF's outer RSS capability is enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP)
@@ -1262,7 +1262,7 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP) {
bp->vnic_cap_flags |= BNXT_VNIC_CAP_VLAN_RX_STRIP;
- PMD_DRV_LOG(DEBUG, "Rx VLAN strip capability enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Rx VLAN strip capability enabled");
}
if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_XOR_CAP)
@@ -1549,7 +1549,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
else
HWRM_CHECK_RESULT();
- PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
+ PMD_DRV_LOG_LINE(INFO, "%d.%d.%d:%d.%d.%d.%d",
resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b,
@@ -1558,7 +1558,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
((uint32_t)resp->hwrm_fw_min_8b << 16) |
((uint32_t)resp->hwrm_fw_bld_8b << 8) |
resp->hwrm_fw_rsvd_8b;
- PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n",
+ PMD_DRV_LOG_LINE(INFO, "Driver HWRM version: %d.%d.%d",
HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE);
fw_version = resp->hwrm_intf_maj_8b << 16;
@@ -1574,13 +1574,13 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT;
if (resp->hwrm_intf_maj_8b != HWRM_VERSION_MAJOR) {
- PMD_DRV_LOG(ERR, "Unsupported firmware API version\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported firmware API version");
rc = -EINVAL;
goto error;
}
if (bp->max_req_len > resp->max_req_win_len) {
- PMD_DRV_LOG(ERR, "Unsupported request length\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported request length");
rc = -EINVAL;
goto error;
}
@@ -1602,7 +1602,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED) &&
(dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED)) {
- PMD_DRV_LOG(DEBUG, "Short command supported\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Short command supported");
bp->flags |= BNXT_FLAG_SHORT_CMD;
}
@@ -1627,8 +1627,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
rte_malloc_virt2iova(bp->hwrm_short_cmd_req_addr);
if (bp->hwrm_short_cmd_req_dma_addr == RTE_BAD_IOVA) {
rte_free(bp->hwrm_short_cmd_req_addr);
- PMD_DRV_LOG(ERR,
- "Unable to map buffer to physical memory.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unable to map buffer to physical memory.");
rc = -ENOMEM;
goto error;
}
@@ -1636,26 +1636,26 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_KONG_MB_CHNL_SUPPORTED) {
bp->flags |= BNXT_FLAG_KONG_MB_EN;
- PMD_DRV_LOG(DEBUG, "Kong mailbox channel enabled\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Kong mailbox channel enabled");
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_TRUSTED_VF_SUPPORTED)
- PMD_DRV_LOG(DEBUG, "FW supports Trusted VFs\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports Trusted VFs");
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_ADV_FLOW_MGNT_SUPPORTED) {
bp->fw_cap |= BNXT_FW_CAP_ADV_FLOW_MGMT;
- PMD_DRV_LOG(DEBUG, "FW supports advanced flow management\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports advanced flow management");
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_ADV_FLOW_COUNTERS_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "FW supports advanced flow counters\n");
+ PMD_DRV_LOG_LINE(DEBUG, "FW supports advanced flow counters");
bp->fw_cap |= BNXT_FW_CAP_ADV_FLOW_COUNTERS;
}
if (dev_caps_cfg &
HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TRUFLOW_SUPPORTED) {
- PMD_DRV_LOG(DEBUG, "Host-based truflow feature enabled.\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Host-based truflow feature enabled.");
bp->fw_cap |= BNXT_FW_CAP_TRUFLOW_EN;
}
@@ -1680,7 +1680,7 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "Port %u: Unregistered with fw\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Port %u: Unregistered with fw",
bp->eth_dev->data->port_id);
return rc;
@@ -1699,7 +1699,7 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
/* Setting Fixed Speed. But AutoNeg is ON, So disable it */
if (bp->link_info->auto_mode && conf->link_speed) {
req.auto_mode = HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE;
- PMD_DRV_LOG(DEBUG, "Disabling AutoNeg\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling AutoNeg");
}
req.flags = rte_cpu_to_le_32(conf->phy_flags);
@@ -1760,7 +1760,7 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
} else {
req.flags =
rte_cpu_to_le_32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN);
- PMD_DRV_LOG(INFO, "Force Link Down\n");
+ PMD_DRV_LOG_LINE(INFO, "Force Link Down");
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -1828,9 +1828,9 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
/* Display the captured P7 phy details */
if (BNXT_LINK_SPEEDS_V2(bp)) {
- PMD_DRV_LOG(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
+ PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
"Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x\n"
- "Auto_link_speedsv2:%x, Active_lanes:%d\n",
+ "Auto_link_speedsv2:%x, Active_lanes:%d",
link_info->phy_type,
link_info->media_type,
link_info->phy_link_status,
@@ -1850,8 +1850,8 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
desc = ((struct link_speeds2_tbl *)
bnxt_get_hwrm_to_rte_speeds2_entry(link_info->link_speed))->desc;
- PMD_DRV_LOG(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
- "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d\n",
+ PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
+ "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
desc,
!(link_info->auto_mode) ? "Forced" : "AutoNegotiated",
link_status_str[link_info->phy_link_status % MAX_LINK_STR],
@@ -1865,11 +1865,11 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
return rc;
}
- PMD_DRV_LOG(DEBUG, "Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Link Speed:%d,Auto:%d:%x:%x,Support:%x,Force:%x",
link_info->link_speed, link_info->auto_mode,
link_info->auto_link_speed, link_info->auto_link_speed_mask,
link_info->support_speeds, link_info->force_link_speed);
- PMD_DRV_LOG(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x",
link_info->link_signal_mode,
link_info->auto_pam4_link_speed_mask,
link_info->support_pam4_speeds,
@@ -1958,7 +1958,7 @@ static bool bnxt_find_lossy_profile(struct bnxt *bp, bool use_prof_type)
int i;
for (i = 0; i < BNXT_COS_QUEUE_COUNT; i++) {
- PMD_DRV_LOG(DEBUG, "profile %d, profile_id %d, type %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "profile %d, profile_id %d, type %d",
bp->tx_cos_queue[i].profile,
bp->tx_cos_queue[i].id,
bp->tx_cos_queue[i].profile_type);
@@ -2069,7 +2069,7 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
}
}
- PMD_DRV_LOG(DEBUG, "Tx COS Queue ID %d\n", bp->tx_cosq_id[0]);
+ PMD_DRV_LOG_LINE(DEBUG, "Tx COS Queue ID %d", bp->tx_cosq_id[0]);
bp->max_tc = resp->max_configurable_queues;
bp->max_lltc = resp->max_configurable_lossless_queues;
@@ -2165,7 +2165,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID;
break;
default:
- PMD_DRV_LOG(ERR, "hwrm alloc invalid ring type %d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm alloc invalid ring type %d",
ring_type);
HWRM_UNLOCK();
return -EINVAL;
@@ -2179,33 +2179,33 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
rc = rte_le_to_cpu_16(resp->error_code);
switch (ring_type) {
case HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc cp failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc cp failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc rx failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc rx failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_RX_AGG:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc rx agg failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc rx agg failed. rc:%d",
rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_TX:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc tx failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc tx failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
case HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_alloc nq failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_alloc nq failed. rc:%d", rc);
HWRM_UNLOCK();
return rc;
default:
- PMD_DRV_LOG(ERR, "Invalid ring. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Invalid ring. rc:%d", rc);
HWRM_UNLOCK();
return rc;
}
@@ -2243,27 +2243,27 @@ int bnxt_hwrm_ring_free(struct bnxt *bp,
switch (ring_type) {
case HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL:
- PMD_DRV_LOG(ERR, "hwrm_ring_free cp failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free cp failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_RX:
- PMD_DRV_LOG(ERR, "hwrm_ring_free rx failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free rx failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_TX:
- PMD_DRV_LOG(ERR, "hwrm_ring_free tx failed. rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "hwrm_ring_free tx failed. rc:%d",
rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_NQ:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_free nq failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_free nq failed. rc:%d", rc);
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG:
- PMD_DRV_LOG(ERR,
- "hwrm_ring_free agg failed. rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "hwrm_ring_free agg failed. rc:%d", rc);
return rc;
default:
- PMD_DRV_LOG(ERR, "Invalid ring, rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Invalid ring, rc:%d", rc);
return rc;
}
}
@@ -2411,7 +2411,7 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->fw_vnic_id = rte_le_to_cpu_16(resp->vnic_id);
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2452,7 +2452,7 @@ static int bnxt_hwrm_vnic_plcmodes_cfg(struct bnxt *bp,
struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2487,7 +2487,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
uint32_t enables = 0;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2562,7 +2562,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
if (bnxt_compressed_rx_cqe_mode_enabled(bp)) {
req.l2_cqe_mode = HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_COMPRESSED;
enables |= HWRM_VNIC_CFG_INPUT_ENABLES_L2_CQE_MODE;
- PMD_DRV_LOG(DEBUG, "Enabling compressed Rx CQE\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Enabling compressed Rx CQE");
}
req.enables = rte_cpu_to_le_32(enables);
@@ -2602,7 +2602,7 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
struct hwrm_vnic_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC QCFG ID %d\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC QCFG ID %d", vnic->fw_vnic_id);
return rc;
}
HWRM_PREP(&req, HWRM_VNIC_QCFG, BNXT_USE_CHIMP_MB);
@@ -2670,7 +2670,7 @@ int _bnxt_hwrm_vnic_ctx_free(struct bnxt *bp,
bp->hwrm_cmd_resp_addr;
if (ctx_idx == (uint16_t)HWRM_NA_SIGNATURE) {
- PMD_DRV_LOG(DEBUG, "VNIC RSS Rule %x\n", vnic->rss_rule);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC RSS Rule %x", vnic->rss_rule);
return rc;
}
HWRM_PREP(&req, HWRM_VNIC_RSS_COS_LB_CTX_FREE, BNXT_USE_CHIMP_MB);
@@ -2714,7 +2714,7 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_free_output *resp = bp->hwrm_cmd_resp_addr;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC FREE ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC FREE ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -2779,7 +2779,7 @@ bnxt_hwrm_vnic_rss_qcfg_p5(struct bnxt *bp)
BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "RSS QCFG: Hash level %d\n", resp->hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS QCFG: Hash level %d", resp->hash_mode_flags);
return rc;
}
@@ -2826,7 +2826,7 @@ bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "RSS CFG: Hash level %d\n", req.hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS CFG: Hash level %d", req.hash_mode_flags);
}
return rc;
@@ -2874,7 +2874,7 @@ bnxt_hwrm_vnic_rss_cfg_hash_mode_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic
req.vnic_id = rte_cpu_to_le_16(BNXT_DFLT_VNIC_ID_INVALID);
req.rss_ctx_idx = rte_cpu_to_le_16(BNXT_RSS_CTX_IDX_INVALID);
- PMD_DRV_LOG(DEBUG, "RSS CFG: Hash level %d\n", req.hash_mode_flags);
+ PMD_DRV_LOG_LINE(DEBUG, "RSS CFG: Hash level %d", req.hash_mode_flags);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req),
BNXT_USE_CHIMP_MB);
@@ -2949,7 +2949,7 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp,
uint16_t size;
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "VNIC ID %x", vnic->fw_vnic_id);
return rc;
}
@@ -3013,18 +3013,18 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
return 0;
/* Return an error if enabling TPA w/ compressed Rx CQE. */
- PMD_DRV_LOG(ERR, "No HW support for LRO with compressed Rx\n");
+ PMD_DRV_LOG_LINE(ERR, "No HW support for LRO with compressed Rx");
return -ENOTSUP;
}
if ((BNXT_CHIP_P5(bp) || BNXT_CHIP_P7(bp)) && !bp->max_tpa_v2) {
if (enable)
- PMD_DRV_LOG(ERR, "No HW support for LRO\n");
+ PMD_DRV_LOG_LINE(ERR, "No HW support for LRO");
return -ENOTSUP;
}
if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "Invalid vNIC ID\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Invalid vNIC ID");
return 0;
}
@@ -3419,8 +3419,8 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
bp->hwrm_cmd_resp_dma_addr =
rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr);
if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
rte_spinlock_init(&bp->hwrm_lock);
@@ -3471,7 +3471,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
while (!STAILQ_EMPTY(&vnic->flow_list)) {
flow = STAILQ_FIRST(&vnic->flow_list);
filter = flow->filter;
- PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
+ PMD_DRV_LOG_LINE(DEBUG, "filter type %d", filter->filter_type);
rc = bnxt_clear_one_vnic_filter(bp, filter);
STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
@@ -3658,8 +3658,8 @@ static uint16_t bnxt_parse_eth_link_speed(struct bnxt *bp, uint32_t conf_link_sp
link_info->link_signal_mode = BNXT_SIG_MODE_PAM4;
break;
default:
- PMD_DRV_LOG(ERR,
- "Unsupported link speed %d; default to AUTO\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported link speed %d; default to AUTO",
conf_link_speed);
break;
}
@@ -3691,21 +3691,21 @@ static int bnxt_validate_link_speed(struct bnxt *bp)
one_speed = link_speed & ~RTE_ETH_LINK_SPEED_FIXED;
if (one_speed & (one_speed - 1)) {
- PMD_DRV_LOG(ERR,
- "Invalid advertised speeds (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid advertised speeds (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
if ((one_speed & link_speed_capa) != one_speed) {
- PMD_DRV_LOG(ERR,
- "Unsupported advertised speed (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported advertised speed (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
} else {
if (!(link_speed & link_speed_capa)) {
- PMD_DRV_LOG(ERR,
- "Unsupported advertised speeds (%u) for port %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported advertised speeds (%u) for port %u",
link_speed, port_id);
return -EINVAL;
}
@@ -3814,7 +3814,7 @@ static uint32_t bnxt_parse_hw_link_speed(struct bnxt *bp, uint16_t hw_link_speed
break;
case HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB:
default:
- PMD_DRV_LOG(ERR, "HWRM link speed %d not defined\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM link speed %d not defined",
hw_link_speed);
break;
}
@@ -3835,7 +3835,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex)
eth_link_duplex = RTE_ETH_LINK_HALF_DUPLEX;
break;
default:
- PMD_DRV_LOG(ERR, "HWRM link duplex %d not defined\n",
+ PMD_DRV_LOG_LINE(ERR, "HWRM link duplex %d not defined",
hw_link_duplex);
break;
}
@@ -3849,11 +3849,11 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
rc = bnxt_hwrm_port_phy_qcaps(bp);
if (rc)
- PMD_DRV_LOG(ERR, "Get link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Get link config failed with rc %d", rc);
rc = bnxt_hwrm_port_phy_qcfg(bp, link_info);
if (rc) {
- PMD_DRV_LOG(ERR, "Get link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Get link config failed with rc %d", rc);
goto exit;
}
@@ -3882,14 +3882,14 @@ static int bnxt_hwrm_port_phy_cfg_v2(struct bnxt *bp, struct bnxt_link_info *con
if (!conf->link_up) {
req.flags =
rte_cpu_to_le_32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN);
- PMD_DRV_LOG(ERR, "Force Link Down\n");
+ PMD_DRV_LOG_LINE(ERR, "Force Link Down");
goto link_down;
}
/* Setting Fixed Speed. But AutoNeg is ON, So disable it */
if (bp->link_info->auto_mode && conf->link_speed) {
req.auto_mode = HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE;
- PMD_DRV_LOG(DEBUG, "Disabling AutoNeg\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling AutoNeg");
}
req.flags = rte_cpu_to_le_32(conf->phy_flags);
if (!conf->link_speed) {
@@ -3955,7 +3955,7 @@ static int bnxt_set_hwrm_link_config_v2(struct bnxt *bp, bool link_up)
HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE ||
bp->link_info->media_type ==
HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP) {
- PMD_DRV_LOG(ERR, "10GBase-T devices must autoneg\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBase-T devices must autoneg");
return -EINVAL;
}
@@ -3970,7 +3970,7 @@ static int bnxt_set_hwrm_link_config_v2(struct bnxt *bp, bool link_up)
port_phy_cfg:
rc = bnxt_hwrm_port_phy_cfg_v2(bp, &link_req);
if (rc)
- PMD_DRV_LOG(ERR, "Set link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Set link config failed with rc %d", rc);
return rc;
}
@@ -4005,7 +4005,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
* The speed should be forced and autoneg disabled
* to configure 40G speed.
*/
- PMD_DRV_LOG(INFO, "Disabling autoneg for 40G\n");
+ PMD_DRV_LOG_LINE(INFO, "Disabling autoneg for 40G");
autoneg = 0;
}
@@ -4014,7 +4014,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
bp->link_info->force_pam4_link_speed ==
HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB) {
autoneg = 0;
- PMD_DRV_LOG(DEBUG, "Disabling autoneg for 200G\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Disabling autoneg for 200G");
}
speed = bnxt_parse_eth_link_speed(bp, dev_conf->link_speeds,
@@ -4037,7 +4037,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE ||
bp->link_info->media_type ==
HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP) {
- PMD_DRV_LOG(ERR, "10GBase-T devices must autoneg\n");
+ PMD_DRV_LOG_LINE(ERR, "10GBase-T devices must autoneg");
return -EINVAL;
}
@@ -4072,8 +4072,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
port_phy_cfg:
rc = bnxt_hwrm_port_phy_cfg(bp, &link_req);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Set link config failed with rc %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Set link config failed with rc %d", rc);
}
error:
@@ -4111,12 +4111,12 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
!BNXT_VF_IS_TRUSTED(bp) &&
(flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) {
bp->flags |= BNXT_FLAG_TRUSTED_VF_EN;
- PMD_DRV_LOG(INFO, "Trusted VF cap enabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Trusted VF cap enabled");
} else if (BNXT_VF(bp) &&
BNXT_VF_IS_TRUSTED(bp) &&
!(flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) {
bp->flags &= ~BNXT_FLAG_TRUSTED_VF_EN;
- PMD_DRV_LOG(INFO, "Trusted VF cap disabled\n");
+ PMD_DRV_LOG_LINE(INFO, "Trusted VF cap disabled");
}
if (mtu)
@@ -4176,13 +4176,13 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
if (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST) {
bp->flags |= BNXT_FLAG_MULTI_HOST;
bp->multi_host_pf_pci_id = resp->pci_id;
- PMD_DRV_LOG(INFO, "Mult-Host system Parent PCI-ID: 0x%x\n", resp->pci_id);
+ PMD_DRV_LOG_LINE(INFO, "Mult-Host system Parent PCI-ID: 0x%x", resp->pci_id);
}
/* check for the multi-root support */
if (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_ROOT) {
bp->flags2 |= BNXT_FLAGS2_MULTIROOT_EN;
- PMD_DRV_LOG(DEBUG, "PF enabled with multi root capability\n");
+ PMD_DRV_LOG_LINE(DEBUG, "PF enabled with multi root capability");
}
HWRM_UNLOCK();
@@ -4515,7 +4515,7 @@ int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)
int rc;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "Attempt to allocate VFs on a VF!\n");
+ PMD_DRV_LOG_LINE(ERR, "Attempt to allocate VFs on a VF!");
return -EINVAL;
}
@@ -4584,10 +4584,10 @@ bnxt_process_vf_resc_config_new(struct bnxt *bp, int num_vfs)
sizeof(req),
BNXT_USE_CHIMP_MB);
if (rc || resp->error_code) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize VF %d\n", i);
- PMD_DRV_LOG(ERR,
- "Not all VFs available. (%d, %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize VF %d", i);
+ PMD_DRV_LOG_LINE(ERR,
+ "Not all VFs available. (%d, %d)",
rc, resp->error_code);
HWRM_UNLOCK();
@@ -4635,10 +4635,10 @@ bnxt_process_vf_resc_config_old(struct bnxt *bp, int num_vfs)
HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR);
if (rc || resp->error_code) {
- PMD_DRV_LOG(ERR,
- "Failed to initialize VF %d\n", i);
- PMD_DRV_LOG(ERR,
- "Not all VFs available. (%d, %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to initialize VF %d", i);
+ PMD_DRV_LOG_LINE(ERR,
+ "Not all VFs available. (%d, %d)",
rc, resp->error_code);
HWRM_UNLOCK();
@@ -4709,7 +4709,7 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)
int rc;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR, "Attempt to allocate VFs on a VF!\n");
+ PMD_DRV_LOG_LINE(ERR, "Attempt to allocate VFs on a VF!");
return -EINVAL;
}
@@ -4937,8 +4937,8 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp, int num_vfs)
req.req_buf_page_addr0 =
rte_cpu_to_le_64(rte_malloc_virt2iova(bp->pf->vf_req_buf));
if (req.req_buf_page_addr0 == RTE_BAD_IOVA) {
- PMD_DRV_LOG(ERR,
- "unable to map buffer address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map buffer address to physical memory");
HWRM_UNLOCK();
return -ENOMEM;
}
@@ -5562,8 +5562,8 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
HWRM_PREP(&req, HWRM_NVM_GET_DIR_ENTRIES, BNXT_USE_CHIMP_MB);
@@ -5597,8 +5597,8 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
HWRM_PREP(&req, HWRM_NVM_READ, BNXT_USE_CHIMP_MB);
@@ -5650,8 +5650,8 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
dma_handle = rte_malloc_virt2iova(buf);
if (dma_handle == RTE_BAD_IOVA) {
rte_free(buf);
- PMD_DRV_LOG(ERR,
- "unable to map response address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map response address to physical memory");
return -ENOMEM;
}
memcpy(buf, data, data_len);
@@ -5715,8 +5715,8 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
if (req.vnic_id_tbl_addr == RTE_BAD_IOVA) {
HWRM_UNLOCK();
- PMD_DRV_LOG(ERR,
- "unable to map VNIC ID table address to physical memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "unable to map VNIC ID table address to physical memory");
return -ENOMEM;
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
@@ -5846,7 +5846,7 @@ int bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(struct bnxt *bp, int vf)
}
}
/* Could not find a default VNIC. */
- PMD_DRV_LOG(ERR, "No default VNIC\n");
+ PMD_DRV_LOG_LINE(ERR, "No default VNIC");
exit:
rte_free(vnic_ids);
return rc;
@@ -6364,8 +6364,8 @@ int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
i++, p++)
ctxm->split[i] = rte_le_to_cpu_32(*p);
- PMD_DRV_LOG(DEBUG,
- "type:0x%x size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "type:0x%x size:%d multiple:%d max:%d min:%d split:%d init_val:%d init_off:%d init:%d bmap:0x%x",
ctxm->type, ctxm->entry_size,
ctxm->entry_multiple, ctxm->max_entries, ctxm->min_entries,
ctxm->split_entry_cnt, init_val, init_off,
@@ -6378,7 +6378,7 @@ int bnxt_hwrm_func_backing_store_qcaps_v2(struct bnxt *bp)
HWRM_UNLOCK();
} while (types < bp->ctx->types && type != BNXT_CTX_INV);
ctx->ctx_arr[last_valid_idx].last = true;
- PMD_DRV_LOG(DEBUG, "Last valid type 0x%x\n", last_valid_type);
+ PMD_DRV_LOG_LINE(DEBUG, "Last valid type 0x%x", last_valid_type);
rc = bnxt_alloc_all_ctx_pg_info(bp);
if (rc == 0)
@@ -6409,11 +6409,11 @@ int bnxt_hwrm_func_backing_store_types_count(struct bnxt *bp)
HWRM_UNLOCK();
if (flags & HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_TYPE_VALID) {
- PMD_DRV_LOG(DEBUG, "Valid types 0x%x\n", req.type);
+ PMD_DRV_LOG_LINE(DEBUG, "Valid types 0x%x", req.type);
types++;
}
} while (type != HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID);
- PMD_DRV_LOG(DEBUG, "Number of valid types %d\n", types);
+ PMD_DRV_LOG_LINE(DEBUG, "Number of valid types %d", types);
return types;
}
@@ -6553,8 +6553,8 @@ int bnxt_hwrm_func_backing_store_cfg_v2(struct bnxt *bp,
int b = 1;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(INFO,
- "Backing store config V2 can be issued on PF only\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "Backing store config V2 can be issued on PF only");
return 0;
}
@@ -6586,8 +6586,8 @@ int bnxt_hwrm_func_backing_store_cfg_v2(struct bnxt *bp,
bnxt_hwrm_set_pg_attr(&ctx_pg->ring_mem,
&req.page_size_pbl_level,
&req.page_dir);
- PMD_DRV_LOG(DEBUG,
- "Backing store config V2 type:0x%x last %d, instance %d, hw %d\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Backing store config V2 type:0x%x last %d, instance %d, hw %d",
req.type, ctxm->last, j, w);
if (ctxm->last && i == (w - 1))
req.flags =
@@ -6830,7 +6830,7 @@ int bnxt_hwrm_tunnel_redirect_info(struct bnxt *bp, uint8_t tun_type,
if (dst_fid)
*dst_fid = rte_le_to_cpu_16(resp->dest_fid);
- PMD_DRV_LOG(DEBUG, "dst_fid: %x\n", resp->dest_fid);
+ PMD_DRV_LOG_LINE(DEBUG, "dst_fid: %x", resp->dest_fid);
HWRM_UNLOCK();
@@ -6894,7 +6894,7 @@ int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
return 0;
if (flags & HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_HOT_FW_RESET_DONE) {
- PMD_DRV_LOG(INFO, "FW reset happened while port was down\n");
+ PMD_DRV_LOG_LINE(INFO, "FW reset happened while port was down");
bp->flags |= BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE;
}
@@ -7057,8 +7057,8 @@ int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc)
struct hwrm_cfa_counter_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7081,8 +7081,8 @@ int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id)
struct hwrm_cfa_ctx_mem_rgtr_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7097,7 +7097,7 @@ int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id)
HWRM_CHECK_RESULT();
if (ctx_id) {
*ctx_id = rte_le_to_cpu_16(resp->ctx_id);
- PMD_DRV_LOG(DEBUG, "ctx_id = %d\n", *ctx_id);
+ PMD_DRV_LOG_LINE(DEBUG, "ctx_id = %d", *ctx_id);
}
HWRM_UNLOCK();
@@ -7111,8 +7111,8 @@ int bnxt_hwrm_ctx_unrgtr(struct bnxt *bp, uint16_t ctx_id)
struct hwrm_cfa_ctx_mem_unrgtr_output *resp = bp->hwrm_cmd_resp_addr;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7138,8 +7138,8 @@ int bnxt_hwrm_cfa_counter_cfg(struct bnxt *bp, enum bnxt_flow_dir dir,
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7177,8 +7177,8 @@ int bnxt_hwrm_cfa_counter_qstats(struct bnxt *bp,
int rc = 0;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7234,8 +7234,8 @@ int bnxt_hwrm_cfa_pair_exists(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc = 0;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7262,8 +7262,8 @@ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7296,7 +7296,7 @@ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep_bp)
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "%s %d allocated\n",
+ PMD_DRV_LOG_LINE(DEBUG, "%s %d allocated",
BNXT_REP_PF(rep_bp) ? "PFR" : "VFR", rep_bp->vf_id);
return rc;
}
@@ -7308,8 +7308,8 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
int rc;
if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Not a PF or trusted VF. Command not supported");
return 0;
}
@@ -7323,7 +7323,7 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
HWRM_CHECK_RESULT();
HWRM_UNLOCK();
- PMD_DRV_LOG(DEBUG, "%s %d freed\n", BNXT_REP_PF(rep_bp) ? "PFR" : "VFR",
+ PMD_DRV_LOG_LINE(DEBUG, "%s %d freed", BNXT_REP_PF(rep_bp) ? "PFR" : "VFR",
rep_bp->vf_id);
return rc;
}
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index edf16bd33e..ac00ee1cbb 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -110,7 +110,7 @@ int bnxt_free_int(struct bnxt *bp)
} while (count++ < 10);
if (rc < 0) {
- PMD_DRV_LOG(ERR, "irq cb unregister failed rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "irq cb unregister failed rc: %d",
rc);
return rc;
}
@@ -177,7 +177,7 @@ int bnxt_setup_int(struct bnxt *bp)
bp->irq_tbl[i].handler = bnxt_int_handler;
}
} else {
- PMD_DRV_LOG(ERR, "bnxt_irq_tbl setup failed\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_irq_tbl setup failed");
return -ENOMEM;
}
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 79b3583636..1f0267078b 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -159,11 +159,11 @@ bnxt_get_dflt_vnic_svif(struct bnxt *bp, struct bnxt_representor *vf_rep_bp)
&vf_rep_bp->dflt_vnic_id,
&vf_rep_bp->svif);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to get default vnic id of VF\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to get default vnic id of VF");
vf_rep_bp->dflt_vnic_id = BNXT_DFLT_VNIC_ID_INVALID;
vf_rep_bp->svif = BNXT_SVIF_INVALID;
} else {
- PMD_DRV_LOG(INFO, "vf_rep->dflt_vnic_id = %d\n",
+ PMD_DRV_LOG_LINE(INFO, "vf_rep->dflt_vnic_id = %d",
vf_rep_bp->dflt_vnic_id);
}
if (vf_rep_bp->dflt_vnic_id != BNXT_DFLT_VNIC_ID_INVALID &&
@@ -185,7 +185,7 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
uint16_t first_vf_id;
int rc = 0;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR init\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR init", eth_dev->data->port_id);
vf_rep_bp->vf_id = rep_params->vf_id;
vf_rep_bp->switch_domain_id = rep_params->switch_domain_id;
vf_rep_bp->parent_dev = rep_params->parent_dev;
@@ -224,8 +224,8 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
bnxt_print_link_info(eth_dev);
- PMD_DRV_LOG(INFO,
- "Switch domain id %d: Representor Device %d init done\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "Switch domain id %d: Representor Device %d init done",
vf_rep_bp->switch_domain_id, vf_rep_bp->vf_id);
if (BNXT_REP_BASED_PF(vf_rep_bp)) {
@@ -239,12 +239,12 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
if (rc)
return rc;
if (first_vf_id == 0xffff) {
- PMD_DRV_LOG(ERR,
- "Invalid first_vf_id fid:%x\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid first_vf_id fid:%x",
vf_rep_bp->fw_fid);
return -EINVAL;
}
- PMD_DRV_LOG(INFO, "first_vf_id = %x parent_fid:%x\n",
+ PMD_DRV_LOG_LINE(INFO, "first_vf_id = %x parent_fid:%x",
first_vf_id, vf_rep_bp->fw_fid);
vf_rep_bp->fw_fid = rep_params->vf_id + first_vf_id;
}
@@ -256,7 +256,7 @@ int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params)
vf_rep_bp->parent_pf_idx = parent_bp->fw_fid - 1;
}
- PMD_DRV_LOG(INFO, "vf_rep->fw_fid = %d\n", vf_rep_bp->fw_fid);
+ PMD_DRV_LOG_LINE(INFO, "vf_rep->fw_fid = %d", vf_rep_bp->fw_fid);
return 0;
}
@@ -271,11 +271,11 @@ int bnxt_representor_uninit(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR uninit\n", eth_dev->data->port_id);
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR uninit", eth_dev->data->port_id);
eth_dev->data->mac_addrs = NULL;
if (!bnxt_rep_check_parent(rep)) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d already freed\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d already freed",
eth_dev->data->port_id);
return 0;
}
@@ -370,15 +370,15 @@ static int bnxt_vfr_alloc(struct rte_eth_dev *vfr_ethdev)
struct bnxt *parent_bp;
if (!vfr || !vfr->parent_dev) {
- PMD_DRV_LOG(ERR,
- "No memory allocated for representor\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "No memory allocated for representor");
return -ENOMEM;
}
parent_bp = vfr->parent_dev->data->dev_private;
if (parent_bp && !parent_bp->ulp_ctx) {
- PMD_DRV_LOG(ERR,
- "ulp context not allocated for parent\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "ulp context not allocated for parent");
return -EIO;
}
@@ -393,11 +393,11 @@ static int bnxt_vfr_alloc(struct rte_eth_dev *vfr_ethdev)
*/
rc = bnxt_tf_vfr_alloc(vfr_ethdev);
if (!rc)
- PMD_DRV_LOG(DEBUG, "allocated representor %d in FW\n",
+ PMD_DRV_LOG_LINE(DEBUG, "allocated representor %d in FW",
vfr->vf_id);
else
- PMD_DRV_LOG(ERR,
- "Failed to alloc representor %d in FW\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc representor %d in FW",
vfr->vf_id);
return rc;
@@ -480,14 +480,14 @@ static int bnxt_vfr_free(struct bnxt_representor *vfr)
struct bnxt *parent_bp;
if (!vfr || !vfr->parent_dev) {
- PMD_DRV_LOG(ERR,
- "No memory allocated for representor\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "No memory allocated for representor");
return -ENOMEM;
}
parent_bp = vfr->parent_dev->data->dev_private;
if (!parent_bp) {
- PMD_DRV_LOG(DEBUG, "BNXT Port:%d VFR already freed\n",
+ PMD_DRV_LOG_LINE(DEBUG, "BNXT Port:%d VFR already freed",
vfr->dpdk_port_id);
return 0;
}
@@ -498,12 +498,12 @@ static int bnxt_vfr_free(struct bnxt_representor *vfr)
rc = bnxt_tf_vfr_free(vfr);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to free representor %d in FW\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to free representor %d in FW",
vfr->vf_id);
}
- PMD_DRV_LOG(DEBUG, "freed representor %d in FW\n",
+ PMD_DRV_LOG_LINE(DEBUG, "freed representor %d in FW",
vfr->vf_id);
vfr->vfr_tx_cfa_action = 0;
@@ -549,11 +549,11 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* MAC Specifics */
if (!bnxt_rep_check_parent(rep_bp)) {
/* Need not be an error scenario, if parent is closed first */
- PMD_DRV_LOG(INFO, "Rep parent port does not exist.\n");
+ PMD_DRV_LOG_LINE(INFO, "Rep parent port does not exist.");
return rc;
}
parent_bp = rep_bp->parent_dev->data->dev_private;
- PMD_DRV_LOG(DEBUG, "Representor dev_info_get_op\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Representor dev_info_get_op");
dev_info->max_mac_addrs = parent_bp->max_l2_ctx;
dev_info->max_hash_mac_addrs = 0;
@@ -592,7 +592,7 @@ int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev)
{
struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
- PMD_DRV_LOG(DEBUG, "Representor dev_configure_op\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Representor dev_configure_op");
rep_bp->rx_queues = (void *)eth_dev->data->rx_queues;
rep_bp->tx_nr_rings = eth_dev->data->nb_tx_queues;
rep_bp->rx_nr_rings = eth_dev->data->nb_rx_queues;
@@ -640,30 +640,30 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
int rc = 0;
if (queue_idx >= rep_bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Cannot create Rx ring %d. %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Rx ring %d. %d rings available",
queue_idx, rep_bp->rx_nr_rings);
return -EINVAL;
}
if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
if (!parent_bp->rx_queues) {
- PMD_DRV_LOG(ERR, "Parent Rx qs not configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent Rx qs not configured yet");
return -EINVAL;
}
parent_rxq = parent_bp->rx_queues[queue_idx];
if (!parent_rxq) {
- PMD_DRV_LOG(ERR, "Parent RxQ has not been configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent RxQ has not been configured yet");
return -EINVAL;
}
if (nb_desc != parent_rxq->nb_rx_desc) {
- PMD_DRV_LOG(ERR, "nb_desc %d do not match parent rxq", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d do not match parent rxq", nb_desc);
return -EINVAL;
}
@@ -677,7 +677,7 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct bnxt_rx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!rxq) {
- PMD_DRV_LOG(ERR, "bnxt_vfr_rx_queue allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_vfr_rx_queue allocation failed!");
return -ENOMEM;
}
@@ -694,7 +694,7 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq->rx_ring->rx_ring_struct->ring_size,
RTE_CACHE_LINE_SIZE, socket_id);
if (!buf_ring) {
- PMD_DRV_LOG(ERR, "bnxt_rx_vfr_buf_ring allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_rx_vfr_buf_ring allocation failed!");
rc = -ENOMEM;
goto out;
}
@@ -740,30 +740,30 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
struct bnxt_vf_rep_tx_queue *vfr_txq;
if (queue_idx >= rep_bp->tx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Cannot create Tx rings %d. %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Tx rings %d. %d rings available",
queue_idx, rep_bp->tx_nr_rings);
return -EINVAL;
}
if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
if (!parent_bp->tx_queues) {
- PMD_DRV_LOG(ERR, "Parent Tx qs not configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent Tx qs not configured yet");
return -EINVAL;
}
parent_txq = parent_bp->tx_queues[queue_idx];
if (!parent_txq) {
- PMD_DRV_LOG(ERR, "Parent TxQ has not been configured yet\n");
+ PMD_DRV_LOG_LINE(ERR, "Parent TxQ has not been configured yet");
return -EINVAL;
}
if (nb_desc != parent_txq->nb_tx_desc) {
- PMD_DRV_LOG(ERR, "nb_desc %d do not match parent txq", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d do not match parent txq", nb_desc);
return -EINVAL;
}
@@ -777,14 +777,14 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct bnxt_vf_rep_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!vfr_txq) {
- PMD_DRV_LOG(ERR, "bnxt_vfr_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_vfr_tx_queue allocation failed!");
return -ENOMEM;
}
txq = rte_zmalloc_socket("bnxt_tx_queue",
sizeof(struct bnxt_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq) {
- PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_tx_queue allocation failed!");
rte_free(vfr_txq);
return -ENOMEM;
}
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 9e512321d9..3d63956bd8 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -50,7 +50,7 @@ static void bnxt_init_ring_grps(struct bnxt *bp)
int bnxt_alloc_ring_grps(struct bnxt *bp)
{
if (bp->max_tx_rings == 0) {
- PMD_DRV_LOG(ERR, "No TX rings available!\n");
+ PMD_DRV_LOG_LINE(ERR, "No TX rings available!");
return -EBUSY;
}
@@ -61,7 +61,7 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)
bp->max_ring_grps = BNXT_MAX_RSS_CTXTS_P5;
} else if (bp->max_ring_grps < bp->rx_cp_nr_rings) {
/* 1 ring is for default completion ring */
- PMD_DRV_LOG(ERR, "Insufficient resource: Ring Group\n");
+ PMD_DRV_LOG_LINE(ERR, "Insufficient resource: Ring Group");
return -ENOSPC;
}
@@ -70,8 +70,8 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)
sizeof(*bp->grp_info) *
bp->max_ring_grps, 0);
if (!bp->grp_info) {
- PMD_DRV_LOG(ERR,
- "Failed to alloc grp info tbl.\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc grp info tbl.");
return -ENOMEM;
}
bnxt_init_ring_grps(bp);
@@ -416,7 +416,7 @@ static int bnxt_alloc_cmpl_ring(struct bnxt *bp, int queue_index,
if (nqr) {
nq_ring_id = nqr->cp_ring_struct->fw_ring_id;
} else {
- PMD_DRV_LOG(ERR, "NQ ring is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "NQ ring is NULL");
return -EINVAL;
}
}
@@ -657,8 +657,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
if (rxq->rx_started) {
if (bnxt_init_one_rx_ring(rxq)) {
- PMD_DRV_LOG(ERR,
- "ring%d bnxt_init_one_rx_ring failed!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "ring%d bnxt_init_one_rx_ring failed!",
queue_index);
rc = -ENOMEM;
goto err_out;
@@ -675,8 +675,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
return 0;
err_out:
- PMD_DRV_LOG(ERR,
- "Failed to allocate receive queue %d, rc %d.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate receive queue %d, rc %d.",
queue_index, rc);
return rc;
}
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 913856e6eb..1c25c57ca6 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -94,8 +94,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
RTE_MIN(bp->max_l2_ctx,
RTE_MIN(bp->max_rsscos_ctx,
RTE_ETH_64_POOLS)));
- PMD_DRV_LOG(DEBUG,
- "pools = %u max_pools = %u\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "pools = %u max_pools = %u",
pools, max_pools);
if (pools > max_pools)
pools = max_pools;
@@ -104,7 +104,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : 1;
break;
default:
- PMD_DRV_LOG(ERR, "Unsupported mq_mod %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unsupported mq_mod %d",
dev_conf->rxmode.mq_mode);
rc = -EINVAL;
goto err_out;
@@ -115,7 +115,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
nb_q_per_grp = bp->rx_cp_nr_rings / pools;
- PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
+ PMD_DRV_LOG_LINE(DEBUG, "pools = %u nb_q_per_grp = %u",
pools, nb_q_per_grp);
start_grp_id = 0;
end_grp_id = nb_q_per_grp;
@@ -123,7 +123,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
for (i = 0; i < pools; i++) {
vnic = &bp->vnic_info[i];
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "VNIC alloc failed");
rc = -ENOMEM;
goto err_out;
}
@@ -133,8 +133,8 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
for (j = 0; j < nb_q_per_grp; j++, ring_idx++) {
rxq = bp->eth_dev->data->rx_queues[ring_idx];
rxq->vnic = vnic;
- PMD_DRV_LOG(DEBUG,
- "rxq[%d] = %p vnic[%d] = %p\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "rxq[%d] = %p vnic[%d] = %p",
ring_idx, rxq, i, vnic);
}
if (i == 0) {
@@ -155,7 +155,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
}
filter = bnxt_alloc_filter(bp);
if (!filter) {
- PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
+ PMD_DRV_LOG_LINE(ERR, "L2 filter alloc failed");
rc = -ENOMEM;
goto err_out;
}
@@ -332,14 +332,14 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
return rc;
if (queue_idx >= bnxt_max_rings(bp)) {
- PMD_DRV_LOG(ERR,
- "Cannot create Rx ring %d. Only %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Rx ring %d. Only %d rings available",
queue_idx, bp->max_rx_rings);
return -EINVAL;
}
if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_RX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
@@ -351,7 +351,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq = rte_zmalloc_socket("bnxt_rx_queue", sizeof(struct bnxt_rx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!rxq) {
- PMD_DRV_LOG(ERR, "bnxt_rx_queue allocation failed!\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_rx_queue allocation failed!");
return -ENOMEM;
}
rxq->bp = bp;
@@ -360,22 +360,22 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rxq->rx_free_thresh =
RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_RX_BURST);
- PMD_DRV_LOG(DEBUG,
- "App supplied RXQ drop_en status : %d\n", rx_conf->rx_drop_en);
+ PMD_DRV_LOG_LINE(DEBUG,
+ "App supplied RXQ drop_en status : %d", rx_conf->rx_drop_en);
rxq->drop_en = BNXT_DEFAULT_RX_DROP_EN;
- PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
+ PMD_DRV_LOG_LINE(DEBUG, "RX Buf MTU %d", eth_dev->data->mtu);
eth_dev->data->rx_queues[queue_idx] = rxq;
rc = bnxt_init_rx_ring_struct(rxq, socket_id);
if (rc) {
- PMD_DRV_LOG(ERR,
- "init_rx_ring_struct failed!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "init_rx_ring_struct failed!");
goto err;
}
- PMD_DRV_LOG(DEBUG, "RX Buf size is %d\n", rxq->rx_buf_size);
+ PMD_DRV_LOG_LINE(DEBUG, "RX Buf size is %d", rxq->rx_buf_size);
rxq->queue_id = queue_idx;
rxq->port_id = eth_dev->data->port_id;
if (rx_offloads & RTE_ETH_RX_OFFLOAD_KEEP_CRC)
@@ -387,8 +387,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
rc = bnxt_alloc_rings(bp, socket_id, queue_idx, NULL, rxq, rxq->cp_ring,
NULL, "rxr");
if (rc) {
- PMD_DRV_LOG(ERR,
- "ring_dma_zone_reserve for rx_ring failed!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "ring_dma_zone_reserve for rx_ring failed!");
goto err;
}
rxq->rx_mbuf_alloc_fail = 0;
@@ -469,13 +469,13 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
return rc;
if (rxq == NULL) {
- PMD_DRV_LOG(ERR, "Invalid Rx queue %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Rx queue %d", rx_queue_id);
return -EINVAL;
}
vnic = bnxt_vnic_queue_id_get_next(bp, rx_queue_id, &vnic_idx);
if (vnic == NULL) {
- PMD_DRV_LOG(ERR, "VNIC not initialized for RxQ %d\n",
+ PMD_DRV_LOG_LINE(ERR, "VNIC not initialized for RxQ %d",
rx_queue_id);
return -EINVAL;
}
@@ -511,23 +511,23 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
/* Reconfigure default receive ring and MRU. */
bnxt_hwrm_vnic_cfg(bp, vnic);
- PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(INFO, "Rx queue started %d", rx_queue_id);
if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
if (BNXT_HAS_RING_GRPS(bp)) {
if (vnic->fw_grp_ids[rx_queue_id] !=
INVALID_HW_RING_ID) {
- PMD_DRV_LOG(ERR, "invalid ring id %d\n",
+ PMD_DRV_LOG_LINE(ERR, "invalid ring id %d",
rx_queue_id);
return 0;
}
vnic->fw_grp_ids[rx_queue_id] = fw_grp_id;
- PMD_DRV_LOG(DEBUG, "vnic = %p fw_grp_id = %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "vnic = %p fw_grp_id = %d",
vnic, fw_grp_id);
}
- PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx Queue Count %d",
vnic->rx_queue_cnt);
rc += bnxt_vnic_rss_queue_status_update(bp, vnic);
}
@@ -541,8 +541,8 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
rxq->rx_started = false;
}
- PMD_DRV_LOG(INFO,
- "queue %d, rx_deferred_start %d, state %d!\n",
+ PMD_DRV_LOG_LINE(INFO,
+ "queue %d, rx_deferred_start %d, state %d!",
rx_queue_id, rxq->rx_deferred_start,
bp->eth_dev->data->rx_queue_state[rx_queue_id]);
@@ -568,25 +568,25 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
* Default CQ for async notifications
*/
if (!BNXT_NUM_ASYNC_CPR(bp) && !rx_queue_id) {
- PMD_DRV_LOG(ERR, "Cannot stop Rx queue id %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Cannot stop Rx queue id %d", rx_queue_id);
return -EINVAL;
}
rxq = bp->rx_queues[rx_queue_id];
if (!rxq) {
- PMD_DRV_LOG(ERR, "Invalid Rx queue %d\n", rx_queue_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid Rx queue %d", rx_queue_id);
return -EINVAL;
}
vnic = bnxt_vnic_queue_id_get_next(bp, q_id, &vnic_idx);
if (!vnic) {
- PMD_DRV_LOG(ERR, "VNIC not initialized for RxQ %d\n", q_id);
+ PMD_DRV_LOG_LINE(ERR, "VNIC not initialized for RxQ %d", q_id);
return -EINVAL;
}
dev->data->rx_queue_state[q_id] = RTE_ETH_QUEUE_STATE_STOPPED;
rxq->rx_started = false;
- PMD_DRV_LOG(DEBUG, "Rx queue stopped\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Rx queue stopped");
do {
active_queue_cnt = 0;
@@ -594,7 +594,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
if (BNXT_HAS_RING_GRPS(bp))
vnic->fw_grp_ids[q_id] = INVALID_HW_RING_ID;
- PMD_DRV_LOG(DEBUG, "Rx Queue Count %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Rx Queue Count %d",
vnic->rx_queue_cnt);
rc = bnxt_vnic_rss_queue_status_update(bp, vnic);
}
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b59989b5a1..d51a66ae77 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -76,12 +76,12 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
rxbd = &rxr->ag_desc_ring[prod];
rx_buf = &rxr->ag_buf_ring[prod];
if (rxbd == NULL) {
- PMD_DRV_LOG(ERR, "Jumbo Frame. rxbd is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "Jumbo Frame. rxbd is NULL");
return -EINVAL;
}
if (rx_buf == NULL) {
- PMD_DRV_LOG(ERR, "Jumbo Frame. rx_buf is NULL\n");
+ PMD_DRV_LOG_LINE(ERR, "Jumbo Frame. rx_buf is NULL");
return -EINVAL;
}
@@ -159,7 +159,7 @@ static void bnxt_rx_ring_reset(void *arg)
rc = bnxt_hwrm_rx_ring_reset(bp, i);
if (rc) {
- PMD_DRV_LOG(ERR, "Rx ring%d reset failed\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Rx ring%d reset failed", i);
continue;
}
@@ -247,7 +247,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
data_cons = tpa_start->opaque;
tpa_info = &rxr->tpa_info[agg_id];
if (unlikely(data_cons != rxr->rx_next_cons)) {
- PMD_DRV_LOG(ERR, "TPA cons %x, expected cons %x\n",
+ PMD_DRV_LOG_LINE(ERR, "TPA cons %x, expected cons %x",
data_cons, rxr->rx_next_cons);
bnxt_sched_ring_reset(rxq);
return;
@@ -318,7 +318,7 @@ static int bnxt_prod_ag_mbuf(struct bnxt_rx_queue *rxq)
/* TODO batch allocation for better performance */
while (rte_bitmap_get(rxr->ag_bitmap, bmap_next)) {
if (unlikely(bnxt_alloc_ag_data(rxq, rxr, raw_next))) {
- PMD_DRV_LOG(ERR, "agg mbuf alloc failed: prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "agg mbuf alloc failed: prod=0x%x",
raw_next);
break;
}
@@ -432,7 +432,7 @@ static inline struct rte_mbuf *bnxt_tpa_end(
struct bnxt_tpa_info *tpa_info;
if (unlikely(rxq->in_reset)) {
- PMD_DRV_LOG(ERR, "rxq->in_reset: raw_cp_cons:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "rxq->in_reset: raw_cp_cons:%d",
*raw_cp_cons);
bnxt_discard_rx(rxq->bp, cpr, raw_cp_cons, tpa_end);
return NULL;
@@ -1093,7 +1093,7 @@ static int bnxt_crx_pkt(struct rte_mbuf **rx_pkt,
bnxt_set_vlan_crx(rxcmp, mbuf);
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod)) {
- PMD_DRV_LOG(ERR, "mbuf alloc failed with prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "mbuf alloc failed with prod=0x%x",
raw_prod);
rc = -ENOMEM;
goto rx;
@@ -1186,7 +1186,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
cons = rxcmp->opaque;
if (unlikely(cons != rxr->rx_next_cons)) {
bnxt_discard_rx(bp, cpr, &tmp_raw_cons, rxcmp);
- PMD_DRV_LOG(ERR, "RX cons %x != expected cons %x\n",
+ PMD_DRV_LOG_LINE(ERR, "RX cons %x != expected cons %x",
cons, rxr->rx_next_cons);
bnxt_sched_ring_reset(rxq);
rc = -EBUSY;
@@ -1272,7 +1272,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
*/
raw_prod = RING_NEXT(raw_prod);
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod)) {
- PMD_DRV_LOG(ERR, "mbuf alloc failed with prod=0x%x\n",
+ PMD_DRV_LOG_LINE(ERR, "mbuf alloc failed with prod=0x%x",
raw_prod);
rc = -ENOMEM;
goto rx;
@@ -1398,7 +1398,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
cpr->cp_ring_struct->ring_size))
break;
if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_HWRM_DONE) {
- PMD_DRV_LOG(ERR, "Rx flush done\n");
+ PMD_DRV_LOG_LINE(ERR, "Rx flush done");
} else if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_RX_L2_COMPRESS) {
rc = bnxt_crx_pkt(&rx_pkts[nb_rx_pkts], rxq,
(struct rx_pkt_compress_cmpl *)rxcmp,
@@ -1631,8 +1631,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
for (i = 0; i < ring->ring_size; i++) {
if (unlikely(!rxr->rx_buf_ring[i])) {
if (bnxt_alloc_rx_data(rxq, rxr, raw_prod) != 0) {
- PMD_DRV_LOG(WARNING,
- "RxQ %d allocated %d of %d mbufs\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "RxQ %d allocated %d of %d mbufs",
rxq->queue_id, i, ring->ring_size);
return -ENOMEM;
}
@@ -1661,8 +1661,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
for (i = 0; i < ring->ring_size; i++) {
if (unlikely(!rxr->ag_buf_ring[i])) {
if (bnxt_alloc_ag_data(rxq, rxr, raw_prod) != 0) {
- PMD_DRV_LOG(WARNING,
- "RxQ %d allocated %d of %d mbufs\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "RxQ %d allocated %d of %d mbufs",
rxq->queue_id, i, ring->ring_size);
return -ENOMEM;
}
@@ -1670,7 +1670,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
rxr->ag_raw_prod = raw_prod;
raw_prod = RING_NEXT(raw_prod);
}
- PMD_DRV_LOG(DEBUG, "AGG Done!\n");
+ PMD_DRV_LOG_LINE(DEBUG, "AGG Done!");
if (rxr->tpa_info) {
unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);
@@ -1687,7 +1687,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
}
}
}
- PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
+ PMD_DRV_LOG_LINE(DEBUG, "TPA alloc Done!");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
index 976f258044..43d9528134 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
@@ -869,7 +869,7 @@ bnxt_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 04864e0b95..0ff1641c19 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -432,7 +432,7 @@ bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index e367fbfbd1..9f1a02f0ab 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -679,7 +679,7 @@ bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index b9cce227d9..5e59afe79f 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -781,7 +781,7 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
return ret;
if (!eth_dev->data->dev_started) {
- PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+ PMD_DRV_LOG_LINE(ERR, "Device Initialization not complete!");
return -EINVAL;
}
@@ -1180,13 +1180,13 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
if (BNXT_VF(bp) || !BNXT_SINGLE_PF(bp) ||
!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- PMD_DRV_LOG(ERR, "Operation not supported\n");
+ PMD_DRV_LOG_LINE(ERR, "Operation not supported");
return -ENOTSUP;
}
ret = bnxt_hwrm_port_clr_stats(bp);
if (ret != 0)
- PMD_DRV_LOG(ERR, "Failed to reset xstats: %s\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to reset xstats: %s",
strerror(-ret));
bnxt_clear_prev_stat(bp);
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 05032f7807..c864935992 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -135,14 +135,14 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
return rc;
if (queue_idx >= bnxt_max_rings(bp)) {
- PMD_DRV_LOG(ERR,
- "Cannot create Tx ring %d. Only %d rings available\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot create Tx ring %d. Only %d rings available",
queue_idx, bp->max_tx_rings);
return -EINVAL;
}
if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_TX_DESC_CNT) {
- PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
+ PMD_DRV_LOG_LINE(ERR, "nb_desc %d is invalid", nb_desc);
return -EINVAL;
}
@@ -154,7 +154,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
txq = rte_zmalloc_socket("bnxt_tx_queue", sizeof(struct bnxt_tx_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq) {
- PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_tx_queue allocation failed!");
return -ENOMEM;
}
@@ -165,7 +165,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
sizeof(struct rte_mbuf *) * nb_desc,
RTE_CACHE_LINE_SIZE, socket_id);
if (!txq->free) {
- PMD_DRV_LOG(ERR, "allocation of tx mbuf free array failed!");
+ PMD_DRV_LOG_LINE(ERR, "allocation of tx mbuf free array failed!");
rc = -ENOMEM;
goto err;
}
@@ -187,20 +187,20 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
/* Allocate TX ring hardware descriptors */
if (bnxt_alloc_rings(bp, socket_id, queue_idx, txq, NULL, txq->cp_ring,
NULL, "txr")) {
- PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!");
+ PMD_DRV_LOG_LINE(ERR, "ring_dma_zone_reserve for tx_ring failed!");
rc = -ENOMEM;
goto err;
}
if (bnxt_init_one_tx_ring(txq)) {
- PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_init_one_tx_ring failed!");
rc = -ENOMEM;
goto err;
}
rc = pthread_mutex_init(&txq->txq_lock, NULL);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "TxQ mutex init failed!");
+ PMD_DRV_LOG_LINE(ERR, "TxQ mutex init failed!");
goto err;
}
return 0;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 83c003d258..6a38c7c6e4 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -140,7 +140,7 @@ bnxt_zero_data_len_tso_segsz(struct rte_mbuf *tx_pkt, uint8_t data_len_chk)
}
if (len_to_check == 0) {
- PMD_DRV_LOG(ERR, "Error! Tx pkt %s == 0\n", type_str);
+ PMD_DRV_LOG_LINE(ERR, "Error! Tx pkt %s == 0", type_str);
rte_pktmbuf_dump(stdout, tx_pkt, 64);
rte_dump_stack();
return true;
@@ -226,8 +226,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
/* Check if number of Tx descriptors is above HW limit */
if (unlikely(nr_bds > BNXT_MAX_TSO_SEGS)) {
- PMD_DRV_LOG(ERR,
- "Num descriptors %d exceeds HW limit\n", nr_bds);
+ PMD_DRV_LOG_LINE(ERR,
+ "Num descriptors %d exceeds HW limit", nr_bds);
return -ENOSPC;
}
@@ -237,8 +237,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
char *seg = rte_pktmbuf_append(tx_pkt, pad);
if (!seg) {
- PMD_DRV_LOG(ERR,
- "Failed to pad mbuf by %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to pad mbuf by %d bytes",
pad);
return -ENOMEM;
}
@@ -593,7 +593,7 @@ uint16_t _bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Tx queue was stopped; wait for it to be restarted */
if (unlikely(!txq->tx_started)) {
- PMD_DRV_LOG(DEBUG, "Tx q stopped;return\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx q stopped;return");
return 0;
}
@@ -639,7 +639,7 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
txq->tx_started = true;
- PMD_DRV_LOG(DEBUG, "Tx queue started\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue started");
return 0;
}
@@ -659,7 +659,7 @@ int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
txq->tx_started = false;
- PMD_DRV_LOG(DEBUG, "Tx queue stopped\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Tx queue stopped");
return 0;
}
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 16373be015..29124a6b9d 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -86,7 +86,7 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp)
/* Find the 1st unused vnic from the free_vnic_list pool*/
vnic = STAILQ_FIRST(&bp->free_vnic_list);
if (!vnic) {
- PMD_DRV_LOG(ERR, "No more free VNIC resources\n");
+ PMD_DRV_LOG_LINE(ERR, "No more free VNIC resources");
return NULL;
}
STAILQ_REMOVE_HEAD(&bp->free_vnic_list, next);
@@ -164,8 +164,8 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
RTE_MEMZONE_SIZE_HINT_ONLY,
BNXT_PAGE_SIZE);
if (mz == NULL) {
- PMD_DRV_LOG(ERR,
- "Cannot allocate vnic_attributes memory\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot allocate vnic_attributes memory");
return -ENOMEM;
}
}
@@ -207,7 +207,7 @@ void bnxt_free_vnic_mem(struct bnxt *bp)
for (i = 0; i < max_vnics; i++) {
vnic = &bp->vnic_info[i];
if (vnic->fw_vnic_id != (uint16_t)HWRM_NA_SIGNATURE) {
- PMD_DRV_LOG(ERR, "VNIC is not freed yet!\n");
+ PMD_DRV_LOG_LINE(ERR, "VNIC is not freed yet!");
/* TODO Call HWRM to free VNIC */
}
}
@@ -226,7 +226,7 @@ int bnxt_alloc_vnic_mem(struct bnxt *bp)
vnic_mem = rte_zmalloc("bnxt_vnic_info",
max_vnics * sizeof(struct bnxt_vnic_info), 0);
if (vnic_mem == NULL) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for %d VNICs",
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc memory for %d VNICs",
max_vnics);
return -ENOMEM;
}
@@ -242,8 +242,8 @@ int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->fw_grp_ids = rte_zmalloc("vnic_fw_grp_ids", size, 0);
if (!vnic->fw_grp_ids) {
- PMD_DRV_LOG(ERR,
- "Failed to alloc %d bytes for group ids\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to alloc %d bytes for group ids",
size);
return -ENOMEM;
}
@@ -311,8 +311,8 @@ int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl)
if ((BNXT_CHIP_P5(bp) && BNXT_VNIC_OUTER_RSS_UNSUPPORTED(bp)) ||
(!BNXT_CHIP_P5(bp) && !(bp->vnic_cap_flags & BNXT_VNIC_CAP_OUTER_RSS))) {
if (lvl)
- PMD_DRV_LOG(INFO,
- "Given RSS level is unsupported, using default RSS level\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "Given RSS level is unsupported, using default RSS level");
return mode;
}
@@ -448,7 +448,7 @@ bnxt_vnic_queue_delete(struct bnxt *bp, uint16_t vnic_idx)
struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_idx];
if (bnxt_hwrm_vnic_free(bp, vnic))
- PMD_DRV_LOG(ERR, "Failed to delete queue\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to delete queue");
if (vnic->fw_grp_ids) {
rte_free(vnic->fw_grp_ids);
@@ -476,7 +476,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
vnic = &bp->vnic_info[vnic_id];
if (vnic->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "invalid queue configuration %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "invalid queue configuration %d", vnic_id);
return NULL;
}
@@ -498,7 +498,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
/* Allocate vnic group for p4 platform */
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to allocate vnic groups\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to allocate vnic groups");
goto cleanup;
}
@@ -508,7 +508,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to allocate vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to allocate vnic %d", q_index);
goto cleanup;
}
@@ -523,7 +523,7 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
vnic->mru = saved_mru;
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to configure vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure vnic %d", q_index);
goto cleanup;
}
@@ -531,11 +531,11 @@ bnxt_vnic_queue_create(struct bnxt *bp, int32_t vnic_id, uint16_t q_index)
(rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) ?
true : false);
if (rc)
- PMD_DRV_LOG(DEBUG, "Failed to configure TPA on this vnic %d\n", q_index);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure TPA on this vnic %d", q_index);
rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
if (rc) {
- PMD_DRV_LOG(DEBUG, "Failed to configure vnic plcmode %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure vnic plcmode %d",
q_index);
goto cleanup;
}
@@ -573,14 +573,14 @@ bnxt_vnic_queue_db_add(struct bnxt *bp, uint64_t *q_list)
(const void *)q_list);
if (vnic_id < 0 || vnic_id >= bp->max_vnics) {
- PMD_DRV_LOG(DEBUG, "unable to assign vnic index %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "unable to assign vnic index %d",
vnic_id);
return rc;
}
vnic_info = &bp->vnic_info[vnic_id];
if (vnic_info->fw_vnic_id != INVALID_HW_RING_ID) {
- PMD_DRV_LOG(DEBUG, "Invalid ring id for %d.\n", vnic_id);
+ PMD_DRV_LOG_LINE(DEBUG, "Invalid ring id for %d.", vnic_id);
return rc;
}
return vnic_id;
@@ -598,7 +598,7 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
int32_t out_idx;
if (!(dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS)) {
- PMD_DRV_LOG(ERR, "Error Rss is not supported on this port\n");
+ PMD_DRV_LOG_LINE(ERR, "Error Rss is not supported on this port");
return rc;
}
@@ -610,7 +610,7 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
/* Check to see if the queues id are in supported range */
if (rss_info->queue_num > bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR, "Error unsupported queue num.\n");
+ PMD_DRV_LOG_LINE(ERR, "Error unsupported queue num.");
return rc;
}
@@ -618,8 +618,8 @@ int32_t bnxt_vnic_queue_db_rss_validate(struct bnxt *bp,
for (idx = 0; idx < BNXT_VNIC_MAX_QUEUE_SIZE; idx++) {
if (BNXT_VNIC_BITMAP_GET(rss_info->queue_list, idx)) {
if (idx >= bp->rx_nr_rings) {
- PMD_DRV_LOG(ERR,
- "Error %d beyond support size %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error %d beyond support size %u",
idx, bp->rx_nr_rings);
return rc;
}
@@ -711,7 +711,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* Allocate vnic group for p4 platform */
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate vnic groups\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate vnic groups");
goto fail_cleanup;
}
@@ -722,7 +722,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* Allocate the vnic in the firmware */
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to allocate vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate vnic %d", idx);
goto fail_cleanup;
}
@@ -735,8 +735,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
break;
}
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM ctx %d alloc failure rc: %x\n", idx, rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "HWRM ctx %d alloc failure rc: %x", idx, rc);
goto fail_cleanup;
}
vnic->num_lb_ctxts = nr_ctxs;
@@ -749,7 +749,7 @@ bnxt_vnic_rss_create(struct bnxt *bp,
rc = bnxt_hwrm_vnic_cfg(bp, vnic);
vnic->mru = saved_mru;
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to configure vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(ERR, "Failed to configure vnic %d", idx);
goto fail_cleanup;
}
@@ -757,11 +757,11 @@ bnxt_vnic_rss_create(struct bnxt *bp,
(rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) ?
true : false);
if (rc)
- PMD_DRV_LOG(DEBUG, "Failed to configure TPA on this vnic %d\n", idx);
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to configure TPA on this vnic %d", idx);
rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to configure vnic plcmode %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to configure vnic plcmode %d",
idx);
goto fail_cleanup;
}
@@ -771,8 +771,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
/* If only unsupported type(s) are specified then quit */
if (rss_info->rss_types == 0) {
- PMD_DRV_LOG(ERR,
- "Unsupported RSS hash type(s)\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported RSS hash type(s)");
goto fail_cleanup;
}
@@ -805,8 +805,8 @@ bnxt_vnic_rss_create(struct bnxt *bp,
rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
if (rc) {
memset(vnic->rss_hash_key, 0, HW_HASH_KEY_SIZE);
- PMD_DRV_LOG(ERR,
- "Failed to configure vnic rss details %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to configure vnic rss details %d",
idx);
goto fail_cleanup;
}
@@ -834,7 +834,7 @@ bnxt_vnic_rss_queue_status_update(struct bnxt *bp, struct bnxt_vnic_info *vnic)
/* configure the rss table */
if (bnxt_hwrm_vnic_rss_cfg(bp, vnic)) {
- PMD_DRV_LOG(DEBUG, "Failed to update vnic rss details\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Failed to update vnic rss details");
return -EINVAL;
}
return 0;
@@ -854,8 +854,8 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
/* validate key length */
if (rss_info->key_len != 0 && rss_info->key_len != HW_HASH_KEY_SIZE) {
- PMD_DRV_LOG(ERR,
- "Invalid hashkey length, should be %d bytes\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Invalid hashkey length, should be %d bytes",
HW_HASH_KEY_SIZE);
return -EINVAL;
}
@@ -865,8 +865,8 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
/* If only unsupported type(s) are specified then quit */
if (!rss_info->rss_types) {
- PMD_DRV_LOG(ERR,
- "Unsupported RSS hash type\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported RSS hash type");
return -EINVAL;
}
@@ -912,10 +912,10 @@ bnxt_vnic_rss_hash_algo_update(struct bnxt *bp,
if (apply) {
if (bnxt_hwrm_vnic_rss_cfg(bp, vnic)) {
memcpy(vnic->rss_hash_key, old_rss_hash_key, HW_HASH_KEY_SIZE);
- PMD_DRV_LOG(ERR, "Error configuring vnic RSS config\n");
+ PMD_DRV_LOG_LINE(ERR, "Error configuring vnic RSS config");
return -EINVAL;
}
- PMD_DRV_LOG(INFO, "Rss config successfully applied\n");
+ PMD_DRV_LOG_LINE(INFO, "Rss config successfully applied");
}
return 0;
}
@@ -947,7 +947,7 @@ int32_t bnxt_vnic_queue_db_init(struct bnxt *bp)
hash_tbl_params.socket_id = rte_socket_id();
bp->vnic_queue_db.rss_q_db = rte_hash_create(&hash_tbl_params);
if (bp->vnic_queue_db.rss_q_db == NULL) {
- PMD_DRV_LOG(ERR, "Failed to create rss hash tbl\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to create rss hash tbl");
return -ENOMEM;
}
return 0;
@@ -967,13 +967,13 @@ void bnxt_vnic_queue_db_update_dlft_vnic(struct bnxt *bp)
vnic_id = bnxt_vnic_queue_db_add(bp, bitmap);
if (vnic_id < 0) {
- PMD_DRV_LOG(ERR, "Unable to alloc vnic for default rss\n");
+ PMD_DRV_LOG_LINE(ERR, "Unable to alloc vnic for default rss");
return;
}
dflt_vnic = bnxt_vnic_queue_db_get_vnic(bp, vnic_id);
if (dflt_vnic == NULL) {
- PMD_DRV_LOG(ERR, "Invalid vnic for default rss %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic for default rss %d", vnic_id);
return;
}
/* Update the default vnic structure */
@@ -995,7 +995,7 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
/* validate the given queue id */
if (q_index >= bp->rx_nr_rings || q_index >= BNXT_VNIC_MAX_QUEUE_SIZE) {
- PMD_DRV_LOG(ERR, "invalid queue id should be less than %d\n",
+ PMD_DRV_LOG_LINE(ERR, "invalid queue id should be less than %d",
bp->rx_nr_rings);
return rc;
}
@@ -1009,14 +1009,14 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
/* Assign the vnic slot */
idx = bnxt_vnic_queue_db_add(bp, queue_list);
if (idx < 0) {
- PMD_DRV_LOG(DEBUG, "Unable to alloc vnic for queue\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unable to alloc vnic for queue");
return rc;
}
/* Allocate a new one */
vnic_info = bnxt_vnic_queue_create(bp, idx, q_index);
if (!vnic_info) {
- PMD_DRV_LOG(ERR, "failed to create vnic - %d\n",
+ PMD_DRV_LOG_LINE(ERR, "failed to create vnic - %d",
q_index);
bnxt_vnic_queue_db_del(bp, queue_list);
return rc; /* failed */
@@ -1024,7 +1024,7 @@ int32_t bnxt_vnic_queue_action_alloc(struct bnxt *bp,
} else {
vnic_info = bnxt_vnic_queue_db_get_vnic(bp, idx);
if (vnic_info == NULL) {
- PMD_DRV_LOG(ERR, "Unable to lookup vnic for queue %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unable to lookup vnic for queue %d",
q_index);
return rc;
}
@@ -1045,14 +1045,14 @@ bnxt_vnic_queue_action_free(struct bnxt *bp, uint16_t vnic_id)
/* validate the given vnic idx */
if (vnic_idx >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic idx %d\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic idx %d", vnic_idx);
return rc;
}
/* validate the vnic info */
vnic_info = &bp->vnic_info[vnic_idx];
if (!vnic_info->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "Invalid vnic idx, no queues being used\n");
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic idx, no queues being used");
return rc;
}
if (vnic_info->ref_cnt) {
@@ -1062,7 +1062,7 @@ bnxt_vnic_queue_action_free(struct bnxt *bp, uint16_t vnic_id)
vnic_info->queue_bitmap);
/* Check to ensure there is no corruption */
if (idx != vnic_idx)
- PMD_DRV_LOG(ERR, "bad vnic idx %d\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "bad vnic idx %d", vnic_idx);
bnxt_vnic_queue_delete(bp, vnic_idx);
}
@@ -1083,26 +1083,26 @@ bnxt_vnic_rss_action_alloc(struct bnxt *bp,
/* validate the given parameters */
rc = bnxt_vnic_queue_db_rss_validate(bp, rss_info, &idx);
if (rc == -EINVAL) {
- PMD_DRV_LOG(ERR, "Failed to apply the rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to apply the rss action.");
return rc;
} else if (rc == -ENOENT) {
/* Allocate a new entry */
idx = bnxt_vnic_queue_db_add(bp, rss_info->queue_list);
if (idx < 0) {
- PMD_DRV_LOG(DEBUG, "Unable to alloc vnic for rss\n");
+ PMD_DRV_LOG_LINE(DEBUG, "Unable to alloc vnic for rss");
return rc;
}
/* create the rss vnic */
vnic_info = bnxt_vnic_rss_create(bp, rss_info, idx);
if (!vnic_info) {
- PMD_DRV_LOG(ERR, "Failed to create rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to create rss action.");
bnxt_vnic_queue_db_del(bp, rss_info->queue_list);
return rc;
}
} else {
vnic_info = bnxt_vnic_queue_db_get_vnic(bp, idx);
if (vnic_info == NULL) {
- PMD_DRV_LOG(ERR, "Unable to lookup vnic for idx %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unable to lookup vnic for idx %d",
idx);
return rc;
}
@@ -1112,7 +1112,7 @@ bnxt_vnic_rss_action_alloc(struct bnxt *bp,
/* check configuration has changed then update hash details */
rc = bnxt_vnic_rss_hash_algo_update(bp, vnic_info, rss_info);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update the rss action.\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to update the rss action.");
return rc;
}
}
@@ -1133,14 +1133,14 @@ bnxt_vnic_rss_action_free(struct bnxt *bp, uint16_t vnic_id)
/* validate the given vnic id */
if (vnic_id >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic id %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic id %d", vnic_id);
return rc;
}
/* validate vnic info */
vnic_info = &bp->vnic_info[vnic_id];
if (!vnic_info->rx_queue_cnt) {
- PMD_DRV_LOG(ERR, "Invalid vnic id, not using any queues\n");
+ PMD_DRV_LOG_LINE(ERR, "Invalid vnic id, not using any queues");
return rc;
}
@@ -1165,7 +1165,7 @@ bnxt_vnic_rss_action_free(struct bnxt *bp, uint16_t vnic_id)
/* check to ensure there is no corruption */
if (idx != vnic_id)
- PMD_DRV_LOG(ERR, "bad vnic idx %d\n", vnic_id);
+ PMD_DRV_LOG_LINE(ERR, "bad vnic idx %d", vnic_id);
bnxt_vnic_rss_delete(bp, vnic_id);
}
}
@@ -1192,7 +1192,7 @@ bnxt_vnic_reta_config_update(struct bnxt *bp,
q_id = reta_conf[idx].reta[sft];
if (q_id >= bp->vnic_queue_db.num_queues ||
!bp->eth_dev->data->rx_queues[q_id]) {
- PMD_DRV_LOG(ERR, "Queue id %d is invalid\n", q_id);
+ PMD_DRV_LOG_LINE(ERR, "Queue id %d is invalid", q_id);
return -EINVAL;
}
BNXT_VNIC_BITMAP_SET(l_bitmap, q_id);
@@ -1273,7 +1273,7 @@ bnxt_vnic_queue_db_get_vnic(struct bnxt *bp, uint16_t vnic_idx)
struct bnxt_vnic_info *vnic_info;
if (vnic_idx >= bp->max_vnics) {
- PMD_DRV_LOG(ERR, "invalid vnic index %u\n", vnic_idx);
+ PMD_DRV_LOG_LINE(ERR, "invalid vnic index %u", vnic_idx);
return NULL;
}
vnic_info = &bp->vnic_info[vnic_idx];
@@ -1338,7 +1338,7 @@ int bnxt_rte_flow_to_hwrm_ring_select_mode(enum rte_eth_hash_function hash_f,
hash_f != RTE_ETH_HASH_FUNCTION_DEFAULT) {
if (hash_f == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ ||
(!BNXT_CHIP_P7(bp) && hash_f == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)) {
- PMD_DRV_LOG(ERR, "Unsupported hash function\n");
+ PMD_DRV_LOG_LINE(ERR, "Unsupported hash function");
return -ENOTSUP;
}
}
@@ -1355,7 +1355,7 @@ int bnxt_rte_flow_to_hwrm_ring_select_mode(enum rte_eth_hash_function hash_f,
vnic->rss_types_local = types;
return 0;
}
- PMD_DRV_LOG(ERR, "Hash function not supported with checksun type\n");
+ PMD_DRV_LOG_LINE(ERR, "Hash function not supported with checksun type");
return -ENOTSUP;
}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 964a5aeb05..e9b5739050 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -57,8 +57,8 @@ int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)
bp = eth_dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set Tx loopback on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set Tx loopback on non-PF port %d!",
port);
return -ENOTSUP;
}
@@ -99,8 +99,8 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
bp = eth_dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set all queues drop on non-PF port!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set all queues drop on non-PF port!");
return -ENOTSUP;
}
@@ -112,7 +112,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
bp->vnic_info[i].bd_stall = !on;
rc = bnxt_hwrm_vnic_cfg(bp, &bp->vnic_info[i]);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update PF VNIC %d.\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update PF VNIC %d.", i);
return rc;
}
}
@@ -123,7 +123,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
rte_pmd_bnxt_set_all_queues_drop_en_cb, &on,
bnxt_hwrm_vnic_cfg);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", i);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", i);
break;
}
}
@@ -147,8 +147,8 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -160,8 +160,8 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d mac address on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d mac address on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -189,8 +189,8 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -211,7 +211,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
/* Requested BW can't be greater than link speed */
if (tot_rate > eth_dev->data->dev_link.link_speed) {
- PMD_DRV_LOG(ERR, "Rate > Link speed. Set to %d\n", tot_rate);
+ PMD_DRV_LOG_LINE(ERR, "Rate > Link speed. Set to %d", tot_rate);
return -EINVAL;
}
@@ -247,8 +247,8 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -256,8 +256,8 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set mac spoof on non-PF port %d!\n", port);
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set mac spoof on non-PF port %d!", port);
return -EINVAL;
}
@@ -306,8 +306,8 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -315,8 +315,8 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VLAN spoof on non-PF port %d!\n", port);
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VLAN spoof on non-PF port %d!", port);
return -EINVAL;
}
@@ -334,7 +334,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
rc = -1;
}
} else {
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", vf);
}
return rc;
@@ -363,8 +363,8 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -375,8 +375,8 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d stripq on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d stripq on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -385,7 +385,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
rte_pmd_bnxt_set_vf_vlan_stripq_cb, &on,
bnxt_hwrm_vnic_cfg);
if (rc)
- PMD_DRV_LOG(ERR, "Failed to update VF VNIC %d.\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Failed to update VF VNIC %d.", vf);
return rc;
}
@@ -407,8 +407,8 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -422,7 +422,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
return -EINVAL;
if (rx_mask & RTE_ETH_VMDQ_ACCEPT_UNTAG) {
- PMD_DRV_LOG(ERR, "Currently cannot toggle this setting\n");
+ PMD_DRV_LOG_LINE(ERR, "Currently cannot toggle this setting");
return -ENOTSUP;
}
@@ -445,7 +445,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
&bp->pf->vf_info[vf].l2_rx_mask,
bnxt_set_rx_mask_no_vlan);
if (rc)
- PMD_DRV_LOG(ERR, "bnxt_hwrm_func_vf_vnic_set_rxmask failed\n");
+ PMD_DRV_LOG_LINE(ERR, "bnxt_hwrm_func_vf_vnic_set_rxmask failed");
return rc;
}
@@ -457,8 +457,8 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
struct bnxt_vnic_info vnic;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VLAN table on non-PF port!\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VLAN table on non-PF port!");
return -EINVAL;
}
@@ -470,7 +470,7 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
/* This simply indicates there's no driver loaded.
* This is not an error.
*/
- PMD_DRV_LOG(ERR, "Unable to get default VNIC for VF %d\n", vf);
+ PMD_DRV_LOG_LINE(ERR, "Unable to get default VNIC for VF %d", vf);
} else {
memset(&vnic, 0, sizeof(vnic));
vnic.fw_vnic_id = dflt_vnic;
@@ -534,10 +534,10 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
/* Now check that there's space */
if (cnt == getpagesize() / sizeof(struct
bnxt_vlan_antispoof_table_entry)) {
- PMD_DRV_LOG(ERR,
- "VLAN anti-spoof table is full\n");
- PMD_DRV_LOG(ERR,
- "VF %d cannot add VLAN %u\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "VLAN anti-spoof table is full");
+ PMD_DRV_LOG_LINE(ERR,
+ "VF %d cannot add VLAN %u",
i, vlan);
rc = -1;
continue;
@@ -598,8 +598,8 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -610,8 +610,8 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to get VF %d stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to get VF %d stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -634,8 +634,8 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -646,8 +646,8 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to reset VF %d stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to reset VF %d stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -668,8 +668,8 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -680,8 +680,8 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to query VF %d RX stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to query VF %d RX stats on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -703,8 +703,8 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -715,8 +715,8 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to query VF %d TX drops on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to query VF %d TX drops on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -742,8 +742,8 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -754,8 +754,8 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to config VF %d MAC on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to config VF %d MAC on non-PF port %d!",
vf_id, port);
return -ENOTSUP;
}
@@ -825,8 +825,8 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -837,8 +837,8 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
return -EINVAL;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set VF %d vlan insert on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set VF %d vlan insert on non-PF port %d!",
vf, port);
return -ENOTSUP;
}
@@ -869,8 +869,8 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
dev = &rte_eth_devices[port];
rc = rte_eth_dev_info_get(port, &dev_info);
if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Error during getting device (port %u) info: %s\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Error during getting device (port %u) info: %s",
port, strerror(-rc));
return rc;
@@ -878,8 +878,8 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
bp = dev->data->dev_private;
if (!BNXT_PF(bp)) {
- PMD_DRV_LOG(ERR,
- "Attempt to set persist stats on non-PF port %d!\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Attempt to set persist stats on non-PF port %d!",
port);
return -EINVAL;
}
diff --git a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
index d72ac83295..9c527e152d 100644
--- a/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_hash_internal.c
@@ -62,8 +62,8 @@ tf_em_hash_insert_int_entry(struct tf *tfp,
DP_DEFRAG_TO_FIT);
if (index == DP_INVALID_INDEX) {
- PMD_DRV_LOG(ERR,
- "%s, EM entry index allocation failed\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "%s, EM entry index allocation failed",
tf_dir_2_str(parms->dir));
return -1;
}
diff --git a/drivers/net/bnxt/tf_core/tf_em_internal.c b/drivers/net/bnxt/tf_core/tf_em_internal.c
index 46de63a9da..7f7a663789 100644
--- a/drivers/net/bnxt/tf_core/tf_em_internal.c
+++ b/drivers/net/bnxt/tf_core/tf_em_internal.c
@@ -56,8 +56,8 @@ tf_em_insert_int_entry(struct tf *tfp,
pool = (struct dpool *)tfs->em_pool[parms->dir];
index = dpool_alloc(pool, TF_SESSION_EM_ENTRY_SIZE, 0);
if (index == DP_INVALID_INDEX) {
- PMD_DRV_LOG(ERR,
- "%s, EM entry index allocation failed\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "%s, EM entry index allocation failed",
tf_dir_2_str(parms->dir));
return -1;
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
index cd4cd8ac74..747f1da557 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_common.h
@@ -11,7 +11,8 @@
#include "bnxt_ulp.h"
#include "ulp_template_db_enum.h"
-#define BNXT_TF_DBG(lvl, fmt, args...) PMD_DRV_LOG(lvl, fmt, ## args)
+#define BNXT_TF_DBG(lvl, fmt, ...) \
+ RTE_LOG(lvl, BNXT, "%s(): " fmt, __func__, ## __VA_ARGS__)
#define BNXT_TF_INF(fmt, args...)
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
index 96d61c3ed2..75a0b77ac2 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
@@ -54,19 +54,19 @@ bnxt_pmd_get_bp(uint16_t port)
struct rte_eth_dev *dev;
if (!rte_eth_dev_is_valid_port(port)) {
- PMD_DRV_LOG(ERR, "Invalid port %d\n", port);
+ PMD_DRV_LOG_LINE(ERR, "Invalid port %d", port);
return NULL;
}
dev = &rte_eth_devices[port];
if (!is_bnxt_supported(dev)) {
- PMD_DRV_LOG(ERR, "Device %d not supported\n", port);
+ PMD_DRV_LOG_LINE(ERR, "Device %d not supported", port);
return NULL;
}
bp = (struct bnxt *)dev->data->dev_private;
if (!BNXT_TRUFLOW_EN(bp)) {
- PMD_DRV_LOG(ERR, "TRUFLOW not enabled\n");
+ PMD_DRV_LOG_LINE(ERR, "TRUFLOW not enabled");
return NULL;
}
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 33028c470f..361bed7b3e 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -1347,7 +1347,7 @@ ulp_ctx_attach(struct bnxt *bp,
/* Create a TF Client */
rc = ulp_ctx_session_open(bp, session);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to open ctxt session, rc:%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Failed to open ctxt session, rc:%d", rc);
tfp->session = NULL;
return rc;
}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index c39cde39aa..2360788f8f 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -86,7 +86,7 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)
rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to initialize fc mutex\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize fc mutex");
goto error;
}
@@ -269,16 +269,16 @@ ulp_bulk_get_flow_stats(struct tf *tfp,
((uintptr_t)(fc_info->shadow_hw_tbl[dir].mem_pa));
if (!stats) {
- PMD_DRV_LOG(ERR,
- "BULK: Memory not initialized id:0x%x dir:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "BULK: Memory not initialized id:0x%x dir:%d",
parms.starting_idx, dir);
return -EINVAL;
}
rc = tf_tbl_bulk_get(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "BULK: Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "BULK: Get failed for id:0x%x rc:%d",
parms.starting_idx, rc);
return rc;
}
@@ -337,8 +337,8 @@ ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
parms.data = (uint8_t *)&stats;
rc = tf_get_tbl_entry(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Get failed for id:0x%x rc:%d",
parms.idx, rc);
return rc;
}
@@ -358,7 +358,7 @@ ulp_fc_tf_flow_stat_get(struct bnxt_ulp_context *ctxt,
sparms.data_sz_in_bytes = sizeof(uint64_t);
rc = tf_set_tbl_entry(tfp, &sparms);
if (rc) {
- PMD_DRV_LOG(ERR, "Set failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR, "Set failed for id:0x%x rc:%d",
sparms.idx, rc);
return rc;
}
@@ -391,8 +391,8 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,
parms.data = (uint8_t *)&stats;
rc = tf_get_tbl_entry(tfp, &parms);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Get failed for id:0x%x rc:%d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Get failed for id:0x%x rc:%d",
parms.idx, rc);
return rc;
}
@@ -419,7 +419,7 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,
if (ulp_flow_db_parent_flow_count_update(ctxt, pc_idx,
t_sw->pkt_count,
t_sw->byte_count)) {
- PMD_DRV_LOG(ERR, "Error updating parent counters\n");
+ PMD_DRV_LOG_LINE(ERR, "Error updating parent counters");
}
}
diff --git a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
index 852deef3b4..074cb4ff45 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
@@ -413,7 +413,7 @@ ulp_ha_mgr_init(struct bnxt_ulp_context *ulp_ctx)
rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to initialize ha mutex\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize ha mutex");
goto cleanup;
}
rc = ulp_ha_mgr_timer_start(ulp_ctx->cfg_data);
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 06c21ebe6d..cdedf67c6f 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -16,9 +16,9 @@
static void bond_mode_8023ad_ext_periodic_cb(void *arg);
#ifdef RTE_LIBRTE_BOND_DEBUG_8023AD
-#define MODE4_DEBUG(fmt, ...) \
+#define MODE4_DEBUG_LOG(fmt, ...) \
rte_log(RTE_LOG_DEBUG, bond_logtype, \
- "%6u [Port %u: %s] " fmt, \
+ "%6u [Port %u: %s] " fmt "\n", \
bond_dbg_get_time_diff_ms(), member_id, \
__func__, ##__VA_ARGS__)
@@ -122,7 +122,7 @@ bond_print_lacp(struct lacpdu *l)
#define BOND_PRINT_LACP(lacpdu) bond_print_lacp(lacpdu)
#else
#define BOND_PRINT_LACP(lacpdu) do { } while (0)
-#define MODE4_DEBUG(fmt, ...) do { } while (0)
+#define MODE4_DEBUG_LOG(...) do { } while (0)
#endif
static const struct rte_ether_addr lacp_mac_addr = {
@@ -234,7 +234,7 @@ show_warnings(uint16_t member_id)
member_id);
if (warnings & WRN_NOT_LACP_CAPABLE)
- MODE4_DEBUG("Port %u is not LACP capable!\n", member_id);
+ MODE4_DEBUG_LOG("Port %u is not LACP capable!", member_id);
}
static void
@@ -264,7 +264,7 @@ rx_machine(struct bond_dev_private *internals, uint16_t member_id,
if (SM_FLAG(port, BEGIN)) {
/* Initialize stuff */
- MODE4_DEBUG("-> INITIALIZE\n");
+ MODE4_DEBUG_LOG("-> INITIALIZE");
SM_FLAG_CLR(port, MOVED);
port->selected = UNSELECTED;
@@ -296,7 +296,7 @@ rx_machine(struct bond_dev_private *internals, uint16_t member_id,
}
if (lacp) {
- MODE4_DEBUG("LACP -> CURRENT\n");
+ MODE4_DEBUG_LOG("LACP -> CURRENT");
BOND_PRINT_LACP(lacp);
/* Update selected flag. If partner parameters are defaulted assume they
* are match. If not defaulted compare LACP actor with ports partner
@@ -305,7 +305,7 @@ rx_machine(struct bond_dev_private *internals, uint16_t member_id,
(ACTOR_STATE(port, AGGREGATION) != PARTNER_STATE(port, AGGREGATION)
|| memcmp(&port->partner, &lacp->actor.port_params,
sizeof(port->partner)) != 0)) {
- MODE4_DEBUG("selected <- UNSELECTED\n");
+ MODE4_DEBUG_LOG("selected <- UNSELECTED");
port->selected = UNSELECTED;
}
@@ -404,7 +404,7 @@ periodic_machine(struct bond_dev_private *internals, uint16_t member_id)
timer_force_expired(&port->tx_machine_timer);
SM_FLAG_CLR(port, PARTNER_SHORT_TIMEOUT);
- MODE4_DEBUG("-> NO_PERIODIC ( %s%s%s)\n",
+ MODE4_DEBUG_LOG("-> NO_PERIODIC ( %s%s%s)",
SM_FLAG(port, BEGIN) ? "begin " : "",
SM_FLAG(port, LACP_ENABLED) ? "" : "LACP disabled ",
active ? "LACP active " : "LACP passive ");
@@ -471,7 +471,7 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
if (SM_FLAG(port, BEGIN) ||
!timer_is_stopped(&port->wait_while_timer)) {
SM_FLAG_SET(port, NTT);
- MODE4_DEBUG("-> DETACHED\n");
+ MODE4_DEBUG_LOG("-> DETACHED");
}
timer_cancel(&port->wait_while_timer);
}
@@ -481,7 +481,7 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
timer_set(&port->wait_while_timer,
internals->mode4.aggregate_wait_timeout);
- MODE4_DEBUG("DETACHED -> WAITING\n");
+ MODE4_DEBUG_LOG("DETACHED -> WAITING");
}
/* Waiting state entered */
return;
@@ -499,7 +499,7 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
ACTOR_STATE_CLR(port, COLLECTING);
/* Clear actor sync to activate transit ATTACHED in condition bellow */
ACTOR_STATE_CLR(port, SYNCHRONIZATION);
- MODE4_DEBUG("Out of sync -> ATTACHED\n");
+ MODE4_DEBUG_LOG("Out of sync -> ATTACHED");
}
if (!ACTOR_STATE(port, SYNCHRONIZATION)) {
@@ -509,11 +509,11 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
ACTOR_STATE_SET(port, SYNCHRONIZATION);
SM_FLAG_SET(port, NTT);
- MODE4_DEBUG("ATTACHED Entered\n");
+ MODE4_DEBUG_LOG("ATTACHED Entered");
} else if (!ACTOR_STATE(port, COLLECTING)) {
/* Start collecting if in sync */
if (PARTNER_STATE(port, SYNCHRONIZATION)) {
- MODE4_DEBUG("ATTACHED -> COLLECTING\n");
+ MODE4_DEBUG_LOG("ATTACHED -> COLLECTING");
ACTOR_STATE_SET(port, COLLECTING);
SM_FLAG_SET(port, NTT);
}
@@ -525,7 +525,7 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
/* Enable DISTRIBUTING if partner is collecting */
ACTOR_STATE_SET(port, DISTRIBUTING);
SM_FLAG_SET(port, NTT);
- MODE4_DEBUG("COLLECTING -> DISTRIBUTING\n");
+ MODE4_DEBUG_LOG("COLLECTING -> DISTRIBUTING");
RTE_BOND_LOG(INFO,
"Bond %u: member id %u distributing started.",
internals->port_id, member_id);
@@ -536,7 +536,7 @@ mux_machine(struct bond_dev_private *internals, uint16_t member_id)
* is not collecting */
ACTOR_STATE_CLR(port, DISTRIBUTING);
SM_FLAG_SET(port, NTT);
- MODE4_DEBUG("DISTRIBUTING -> COLLECTING\n");
+ MODE4_DEBUG_LOG("DISTRIBUTING -> COLLECTING");
RTE_BOND_LOG(INFO,
"Bond %u: member id %u distributing stopped.",
internals->port_id, member_id);
@@ -622,7 +622,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t member_id)
lacpdu->tlv_type_terminator = TLV_TYPE_TERMINATOR_INFORMATION;
lacpdu->terminator_length = 0;
- MODE4_DEBUG("Sending LACP frame\n");
+ MODE4_DEBUG_LOG("Sending LACP frame");
BOND_PRINT_LACP(lacpdu);
if (internals->mode4.dedicated_queues.enabled == 0) {
@@ -752,9 +752,9 @@ selection_logic(struct bond_dev_private *internals, uint16_t member_id)
if (new_agg_id != port->aggregator_port_id) {
port->aggregator_port_id = new_agg_id;
- MODE4_DEBUG("-> SELECTED: ID=%3u\n"
- "\t%s aggregator ID=%3u\n",
- port->aggregator_port_id,
+ MODE4_DEBUG_LOG("-> SELECTED: ID=%3u",
+ port->aggregator_port_id);
+ MODE4_DEBUG_LOG("\t%s aggregator ID=%3u",
port->aggregator_port_id == member_id ?
"aggregator not found, using default" : "aggregator found",
port->aggregator_port_id);
@@ -828,8 +828,8 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t member_id,
RTE_ETHER_ADDR_FMT_SIZE, &partner->port_params.system);
rte_ether_format_addr(self_system_name,
RTE_ETHER_ADDR_FMT_SIZE, &agg->actor.system);
- MODE4_DEBUG("preferred partner system %s "
- "is not equal with self system: %s\n",
+ MODE4_DEBUG_LOG("preferred partner system %s "
+ "is not equal with self system: %s",
preferred_system_name, self_system_name);
}
rte_pktmbuf_free(lacp_pkt);
@@ -1666,7 +1666,7 @@ rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t member_id,
if (lacp->lacpdu.subtype != SLOW_SUBTYPE_LACP)
return -EINVAL;
- MODE4_DEBUG("sending LACP frame\n");
+ MODE4_DEBUG_LOG("sending LACP frame");
return rte_ring_enqueue(port->tx_ring, lacp_pkt);
}
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index e0c239e88f..a846ab6dae 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -503,17 +503,17 @@ __extension__ ({ \
if (ret == 0) { \
mp_proc_##f(_a, rsp, ## __VA_ARGS__); \
} else { \
- PMD_DRV_LOG(ERR, \
- "%s returned error: %d\n", \
+ PMD_DRV_LOG_LINE(ERR, \
+ "%s returned error: %d", \
mp_name_ ## f, rsp->result);\
} \
free(mp_rep.msgs); \
} else if (rte_errno == ENOTSUP) { \
- PMD_DRV_LOG(ERR, \
- "No IPC, can't proxy to primary\n");\
+ PMD_DRV_LOG_LINE(ERR, \
+ "No IPC, can't proxy to primary");\
ret = -rte_errno; \
} else { \
- PMD_DRV_LOG(ERR, "Request %s failed: %s\n", \
+ PMD_DRV_LOG_LINE(ERR, "Request %s failed: %s", \
mp_name_ ## f, \
rte_strerror(rte_errno)); \
ret = -EIO; \
@@ -778,10 +778,10 @@ static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
}
if (tx_info)
- PMD_TX_LOG(ERR, "tx_info doesn't have valid mbuf. queue %d:%d req_id %u\n",
+ PMD_TX_LOG_LINE(ERR, "tx_info doesn't have valid mbuf. queue %d:%d req_id %u",
tx_ring->port_id, tx_ring->id, req_id);
else
- PMD_TX_LOG(ERR, "Invalid req_id: %hu in queue %d:%d\n",
+ PMD_TX_LOG_LINE(ERR, "Invalid req_id: %hu in queue %d:%d",
req_id, tx_ring->port_id, tx_ring->id);
/* Trigger device reset */
@@ -798,7 +798,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
/* Allocate only the host info */
rc = ena_com_allocate_host_info(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot allocate host info\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot allocate host info");
return;
}
@@ -825,9 +825,9 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
rc = ena_com_set_host_attributes(ena_dev);
if (rc) {
if (rc == ENA_COM_UNSUPPORTED)
- PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(WARNING, "Cannot set host attributes");
else
- PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set host attributes");
goto err;
}
@@ -862,16 +862,16 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
rc = ena_com_allocate_debug_area(&adapter->ena_dev, debug_area_size);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot allocate debug area\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot allocate debug area");
return;
}
rc = ena_com_set_host_attributes(&adapter->ena_dev);
if (rc) {
if (rc == ENA_COM_UNSUPPORTED)
- PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(WARNING, "Cannot set host attributes");
else
- PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set host attributes");
goto err;
}
@@ -904,7 +904,7 @@ static int ena_close(struct rte_eth_dev *dev)
rte_intr_disable(intr_handle);
rc = rte_intr_callback_unregister_sync(intr_handle, ena_control_path_handler, dev);
if (unlikely(rc != 0))
- PMD_INIT_LOG(ERR, "Failed to unregister interrupt handler\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to unregister interrupt handler");
} else {
rte_eal_alarm_cancel(ena_control_path_poll_handler, dev);
}
@@ -944,19 +944,19 @@ ena_dev_reset(struct rte_eth_dev *dev)
/* Cannot release memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_reset not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_reset not supported in secondary.");
return -EPERM;
}
rc = eth_ena_dev_uninit(dev);
if (rc) {
- PMD_INIT_LOG(CRIT, "Failed to un-initialize device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to un-initialize device");
return rc;
}
rc = eth_ena_dev_init(dev);
if (rc)
- PMD_INIT_LOG(CRIT, "Cannot initialize device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Cannot initialize device");
return rc;
}
@@ -995,7 +995,7 @@ static void ena_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
ring->configured = 0;
- PMD_DRV_LOG(NOTICE, "Rx queue %d:%d released\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Rx queue %d:%d released",
ring->port_id, ring->id);
}
@@ -1016,7 +1016,7 @@ static void ena_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
ring->configured = 0;
- PMD_DRV_LOG(NOTICE, "Tx queue %d:%d released\n",
+ PMD_DRV_LOG_LINE(NOTICE, "Tx queue %d:%d released",
ring->port_id, ring->id);
}
@@ -1091,8 +1091,8 @@ static int ena_queue_start_all(struct rte_eth_dev *dev,
rc = ena_queue_start(dev, &queues[i]);
if (rc) {
- PMD_INIT_LOG(ERR,
- "Failed to start queue[%d] of type(%d)\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Failed to start queue[%d] of type(%d)",
i, ring_type);
goto err;
}
@@ -1173,8 +1173,8 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
* queue depth when working in large llq policy.
*/
max_tx_queue_size >>= 1;
- PMD_INIT_LOG(INFO,
- "large LLQ policy requires limiting Tx queue size to %u entries\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "large LLQ policy requires limiting Tx queue size to %u entries",
max_tx_queue_size);
} else if (dev->max_wide_llq_depth < max_tx_queue_size) {
/* In case the queue depth that the driver calculated exceeds
@@ -1184,20 +1184,20 @@ ena_calc_io_queue_size(struct ena_calc_queue_size_ctx *ctx,
max_tx_queue_size = dev->max_wide_llq_depth;
}
} else {
- PMD_INIT_LOG(INFO,
- "Forcing large LLQ headers failed since device lacks this support\n");
+ PMD_INIT_LOG_LINE(INFO,
+ "Forcing large LLQ headers failed since device lacks this support");
}
}
if (unlikely(max_rx_queue_size == 0 || max_tx_queue_size == 0)) {
- PMD_INIT_LOG(ERR, "Invalid queue size\n");
+ PMD_INIT_LOG_LINE(ERR, "Invalid queue size");
return -EFAULT;
}
ctx->max_tx_queue_size = max_tx_queue_size;
ctx->max_rx_queue_size = max_rx_queue_size;
- PMD_DRV_LOG(INFO, "tx queue size %u\n", max_tx_queue_size);
+ PMD_DRV_LOG_LINE(INFO, "tx queue size %u", max_tx_queue_size);
return 0;
}
@@ -1228,7 +1228,7 @@ static int ena_stats_get(struct rte_eth_dev *dev,
&ena_stats);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc)) {
- PMD_DRV_LOG(ERR, "Could not retrieve statistics from ENA\n");
+ PMD_DRV_LOG_LINE(ERR, "Could not retrieve statistics from ENA");
return rc;
}
@@ -1286,9 +1286,9 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
rc = ENA_PROXY(adapter, ena_com_set_dev_mtu, ena_dev, mtu);
if (rc)
- PMD_DRV_LOG(ERR, "Could not set MTU: %d\n", mtu);
+ PMD_DRV_LOG_LINE(ERR, "Could not set MTU: %d", mtu);
else
- PMD_DRV_LOG(NOTICE, "MTU set to: %d\n", mtu);
+ PMD_DRV_LOG_LINE(NOTICE, "MTU set to: %d", mtu);
return rc;
}
@@ -1302,7 +1302,7 @@ static int ena_start(struct rte_eth_dev *dev)
/* Cannot allocate memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_start not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_start not supported in secondary.");
return -EPERM;
}
@@ -1361,7 +1361,7 @@ static int ena_stop(struct rte_eth_dev *dev)
/* Cannot free memory in secondary process */
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- PMD_DRV_LOG(WARNING, "dev_stop not supported in secondary.\n");
+ PMD_DRV_LOG_LINE(WARNING, "dev_stop not supported in secondary.");
return -EPERM;
}
@@ -1372,7 +1372,7 @@ static int ena_stop(struct rte_eth_dev *dev)
if (adapter->trigger_reset) {
rc = ena_com_dev_reset(ena_dev, adapter->reset_reason);
if (rc)
- PMD_DRV_LOG(ERR, "Device reset failed, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Device reset failed, rc: %d", rc);
}
rte_intr_disable(intr_handle);
@@ -1434,8 +1434,8 @@ static int ena_create_io_queue(struct rte_eth_dev *dev, struct ena_ring *ring)
rc = ena_com_create_io_queue(ena_dev, &ctx);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to create IO queue[%d] (qid:%d), rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to create IO queue[%d] (qid:%d), rc: %d",
ring->id, ena_qid, rc);
return rc;
}
@@ -1444,8 +1444,8 @@ static int ena_create_io_queue(struct rte_eth_dev *dev, struct ena_ring *ring)
&ring->ena_com_io_sq,
&ring->ena_com_io_cq);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Failed to get IO queue[%d] handlers, rc: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to get IO queue[%d] handlers, rc: %d",
ring->id, rc);
ena_com_destroy_io_queue(ena_dev, ena_qid);
return rc;
@@ -1503,7 +1503,7 @@ static int ena_queue_start(struct rte_eth_dev *dev, struct ena_ring *ring)
rc = ena_create_io_queue(dev, ring);
if (rc) {
- PMD_INIT_LOG(ERR, "Failed to create IO queue\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to create IO queue");
return rc;
}
@@ -1521,7 +1521,7 @@ static int ena_queue_start(struct rte_eth_dev *dev, struct ena_ring *ring)
if (rc != bufs_num) {
ena_com_destroy_io_queue(&ring->adapter->ena_dev,
ENA_IO_RXQ_IDX(ring->id));
- PMD_INIT_LOG(ERR, "Failed to populate Rx ring\n");
+ PMD_INIT_LOG_LINE(ERR, "Failed to populate Rx ring");
return ENA_COM_FAULT;
}
/* Flush per-core RX buffers pools cache as they can be used on other
@@ -1546,22 +1546,22 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
txq = &adapter->tx_ring[queue_idx];
if (txq->configured) {
- PMD_DRV_LOG(CRIT,
- "API violation. Queue[%d] is already configured\n",
+ PMD_DRV_LOG_LINE(CRIT,
+ "API violation. Queue[%d] is already configured",
queue_idx);
return ENA_COM_FAULT;
}
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Tx queue: %d is not a power of 2.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Tx queue: %d is not a power of 2.",
nb_desc);
return -EINVAL;
}
if (nb_desc > adapter->max_tx_ring_size) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Tx queue (max size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Tx queue (max size: %d)",
adapter->max_tx_ring_size);
return -EINVAL;
}
@@ -1580,8 +1580,8 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->tx_buffer_info) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Tx buffer info\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Tx buffer info");
return -ENOMEM;
}
@@ -1590,8 +1590,8 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->empty_tx_reqs) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for empty Tx requests\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for empty Tx requests");
rte_free(txq->tx_buffer_info);
return -ENOMEM;
}
@@ -1602,7 +1602,7 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!txq->push_buf_intermediate_buf) {
- PMD_DRV_LOG(ERR, "Failed to alloc push buffer for LLQ\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to alloc push buffer for LLQ");
rte_free(txq->tx_buffer_info);
rte_free(txq->empty_tx_reqs);
return -ENOMEM;
@@ -1648,22 +1648,22 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
rxq = &adapter->rx_ring[queue_idx];
if (rxq->configured) {
- PMD_DRV_LOG(CRIT,
- "API violation. Queue[%d] is already configured\n",
+ PMD_DRV_LOG_LINE(CRIT,
+ "API violation. Queue[%d] is already configured",
queue_idx);
return ENA_COM_FAULT;
}
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx queue: %d is not a power of 2.\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx queue: %d is not a power of 2.",
nb_desc);
return -EINVAL;
}
if (nb_desc > adapter->max_rx_ring_size) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx queue (max size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx queue (max size: %d)",
adapter->max_rx_ring_size);
return -EINVAL;
}
@@ -1671,8 +1671,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
/* ENA isn't supporting buffers smaller than 1400 bytes */
buffer_size = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
if (buffer_size < ENA_RX_BUF_MIN_SIZE) {
- PMD_DRV_LOG(ERR,
- "Unsupported size of Rx buffer: %zu (min size: %d)\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Unsupported size of Rx buffer: %zu (min size: %d)",
buffer_size, ENA_RX_BUF_MIN_SIZE);
return -EINVAL;
}
@@ -1690,8 +1690,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->rx_buffer_info) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Rx buffer info\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Rx buffer info");
return -ENOMEM;
}
@@ -1700,8 +1700,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->rx_refill_buffer) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for Rx refill buffer\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for Rx refill buffer");
rte_free(rxq->rx_buffer_info);
rxq->rx_buffer_info = NULL;
return -ENOMEM;
@@ -1712,8 +1712,8 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE,
socket_id);
if (!rxq->empty_rx_reqs) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for empty Rx requests\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for empty Rx requests");
rte_free(rxq->rx_buffer_info);
rxq->rx_buffer_info = NULL;
rte_free(rxq->rx_refill_buffer);
@@ -1754,7 +1754,7 @@ static int ena_add_single_rx_desc(struct ena_com_io_sq *io_sq,
/* pass resource to device */
rc = ena_com_add_single_rx_desc(io_sq, &ebuf, id);
if (unlikely(rc != 0))
- PMD_RX_LOG(WARNING, "Failed adding Rx desc\n");
+ PMD_RX_LOG_LINE(WARNING, "Failed adding Rx desc");
return rc;
}
@@ -1777,7 +1777,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
in_use = rxq->ring_size - 1 -
ena_com_free_q_entries(rxq->ena_com_io_sq);
if (unlikely((in_use + count) >= rxq->ring_size))
- PMD_RX_LOG(ERR, "Bad Rx ring state\n");
+ PMD_RX_LOG_LINE(ERR, "Bad Rx ring state");
#endif
/* get resources for incoming packets */
@@ -1785,7 +1785,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
if (unlikely(rc < 0)) {
rte_atomic64_inc(&rxq->adapter->drv_stats->rx_nombuf);
++rxq->rx_stats.mbuf_alloc_fail;
- PMD_RX_LOG(DEBUG, "There are not enough free buffers\n");
+ PMD_RX_LOG_LINE(DEBUG, "There are not enough free buffers");
return 0;
}
@@ -1808,8 +1808,8 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
}
if (unlikely(i < count)) {
- PMD_RX_LOG(WARNING,
- "Refilled Rx queue[%d] with only %d/%d buffers\n",
+ PMD_RX_LOG_LINE(WARNING,
+ "Refilled Rx queue[%d] with only %d/%d buffers",
rxq->id, i, count);
rte_pktmbuf_free_bulk(&mbufs[i], count - i);
++rxq->rx_stats.refill_partial;
@@ -1835,9 +1835,9 @@ static size_t ena_get_metrics_entries(struct ena_adapter *adapter)
metrics_num = ENA_STATS_ARRAY_METRICS;
else if (ena_com_get_cap(ena_dev, ENA_ADMIN_ENI_STATS))
metrics_num = ENA_STATS_ARRAY_METRICS_LEGACY;
- PMD_DRV_LOG(NOTICE, "0x%x customer metrics are supported\n", (unsigned int)metrics_num);
+ PMD_DRV_LOG_LINE(NOTICE, "0x%x customer metrics are supported", (unsigned int)metrics_num);
if (metrics_num > ENA_MAX_CUSTOMER_METRICS) {
- PMD_DRV_LOG(NOTICE, "Not enough space for the requested customer metrics\n");
+ PMD_DRV_LOG_LINE(NOTICE, "Not enough space for the requested customer metrics");
metrics_num = ENA_MAX_CUSTOMER_METRICS;
}
return metrics_num;
@@ -1855,7 +1855,7 @@ static int ena_device_init(struct ena_adapter *adapter,
/* Initialize mmio registers */
rc = ena_com_mmio_reg_read_request_init(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Failed to init MMIO read less\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to init MMIO read less");
return rc;
}
@@ -1868,14 +1868,14 @@ static int ena_device_init(struct ena_adapter *adapter,
/* reset device */
rc = ena_com_dev_reset(ena_dev, ENA_REGS_RESET_NORMAL);
if (rc) {
- PMD_DRV_LOG(ERR, "Cannot reset device\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot reset device");
goto err_mmio_read_less;
}
/* check FW version */
rc = ena_com_validate_version(ena_dev);
if (rc) {
- PMD_DRV_LOG(ERR, "Device version is too low\n");
+ PMD_DRV_LOG_LINE(ERR, "Device version is too low");
goto err_mmio_read_less;
}
@@ -1884,8 +1884,8 @@ static int ena_device_init(struct ena_adapter *adapter,
/* ENA device administration layer init */
rc = ena_com_admin_init(ena_dev, &aenq_handlers);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Cannot initialize ENA admin queue\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot initialize ENA admin queue");
goto err_mmio_read_less;
}
@@ -1900,8 +1900,8 @@ static int ena_device_init(struct ena_adapter *adapter,
/* Get Device Attributes and features */
rc = ena_com_get_dev_attr_feat(ena_dev, get_feat_ctx);
if (rc) {
- PMD_DRV_LOG(ERR,
- "Cannot get attribute for ENA device, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot get attribute for ENA device, rc: %d", rc);
goto err_admin_init;
}
@@ -1952,7 +1952,7 @@ static void ena_control_path_poll_handler(void *cb_arg)
rc = rte_eal_alarm_set(adapter->control_path_poll_interval,
ena_control_path_poll_handler, cb_arg);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to retrigger control path alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to retrigger control path alarm");
ena_trigger_reset(adapter, ENA_REGS_RESET_GENERIC);
}
}
@@ -1968,7 +1968,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
if (unlikely((rte_get_timer_cycles() - adapter->timestamp_wd) >=
adapter->keep_alive_timeout)) {
- PMD_DRV_LOG(ERR, "Keep alive timeout\n");
+ PMD_DRV_LOG_LINE(ERR, "Keep alive timeout");
ena_trigger_reset(adapter, ENA_REGS_RESET_KEEP_ALIVE_TO);
++adapter->dev_stats.wd_expired;
}
@@ -1978,7 +1978,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
static void check_for_admin_com_state(struct ena_adapter *adapter)
{
if (unlikely(!ena_com_get_admin_running_state(&adapter->ena_dev))) {
- PMD_DRV_LOG(ERR, "ENA admin queue is not in running state\n");
+ PMD_DRV_LOG_LINE(ERR, "ENA admin queue is not in running state");
ena_trigger_reset(adapter, ENA_REGS_RESET_ADMIN_TO);
}
}
@@ -2003,9 +2003,9 @@ static int check_for_tx_completion_in_queue(struct ena_adapter *adapter,
completion_delay = rte_get_timer_cycles() - timestamp;
if (completion_delay > adapter->missing_tx_completion_to) {
if (unlikely(!tx_buf->print_once)) {
- PMD_TX_LOG(WARNING,
+ PMD_TX_LOG_LINE(WARNING,
"Found a Tx that wasn't completed on time, qid %d, index %d. "
- "Missing Tx outstanding for %" PRIu64 " msecs.\n",
+ "Missing Tx outstanding for %" PRIu64 " msecs.",
tx_ring->id, i, completion_delay /
rte_get_timer_hz() * 1000);
tx_buf->print_once = true;
@@ -2015,9 +2015,9 @@ static int check_for_tx_completion_in_queue(struct ena_adapter *adapter,
}
if (unlikely(missed_tx > tx_ring->missing_tx_completion_threshold)) {
- PMD_DRV_LOG(ERR,
+ PMD_DRV_LOG_LINE(ERR,
"The number of lost Tx completions is above the threshold (%d > %d). "
- "Trigger the device reset.\n",
+ "Trigger the device reset.",
missed_tx,
tx_ring->missing_tx_completion_threshold);
adapter->reset_reason = ENA_REGS_RESET_MISS_TX_CMPL;
@@ -2078,7 +2078,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
check_for_tx_completions(adapter);
if (unlikely(adapter->trigger_reset)) {
- PMD_DRV_LOG(ERR, "Trigger reset is on\n");
+ PMD_DRV_LOG_LINE(ERR, "Trigger reset is on");
rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
NULL);
}
@@ -2116,32 +2116,32 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
u32 llq_feature_mask;
if (adapter->llq_header_policy == ENA_LLQ_POLICY_DISABLED) {
- PMD_DRV_LOG(WARNING,
+ PMD_DRV_LOG_LINE(WARNING,
"NOTE: LLQ has been disabled as per user's request. "
- "This may lead to a huge performance degradation!\n");
+ "This may lead to a huge performance degradation!");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
llq_feature_mask = 1 << ENA_ADMIN_LLQ;
if (!(ena_dev->supported_features & llq_feature_mask)) {
- PMD_DRV_LOG(INFO,
- "LLQ is not supported. Fallback to host mode policy.\n");
+ PMD_DRV_LOG_LINE(INFO,
+ "LLQ is not supported. Fallback to host mode policy.");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
if (adapter->dev_mem_base == NULL) {
- PMD_DRV_LOG(ERR,
- "LLQ is advertised as supported, but device doesn't expose mem bar\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "LLQ is advertised as supported, but device doesn't expose mem bar");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
rc = ena_com_config_dev_mode(ena_dev, llq, llq_default_configurations);
if (unlikely(rc)) {
- PMD_INIT_LOG(WARNING,
- "Failed to config dev mode. Fallback to host mode policy.\n");
+ PMD_INIT_LOG_LINE(WARNING,
+ "Failed to config dev mode. Fallback to host mode policy.");
ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
return 0;
}
@@ -2185,7 +2185,7 @@ static uint32_t ena_calc_max_io_queue_num(struct ena_com_dev *ena_dev,
max_num_io_queues = RTE_MIN(max_num_io_queues, io_tx_cq_num);
if (unlikely(max_num_io_queues == 0)) {
- PMD_DRV_LOG(ERR, "Number of IO queues cannot not be 0\n");
+ PMD_DRV_LOG_LINE(ERR, "Number of IO queues cannot not be 0");
return -EFAULT;
}
@@ -2290,7 +2290,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
- PMD_INIT_LOG(INFO, "Initializing " PCI_PRI_FMT "\n",
+ PMD_INIT_LOG_LINE(INFO, "Initializing " PCI_PRI_FMT,
pci_dev->addr.domain,
pci_dev->addr.bus,
pci_dev->addr.devid,
@@ -2302,7 +2302,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
adapter->dev_mem_base = pci_dev->mem_resource[ENA_MEM_BAR].addr;
if (!adapter->regs) {
- PMD_INIT_LOG(CRIT, "Failed to access registers BAR(%d)\n",
+ PMD_INIT_LOG_LINE(CRIT, "Failed to access registers BAR(%d)",
ENA_REGS_BAR);
return -ENXIO;
}
@@ -2327,21 +2327,21 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
/* Get user bypass */
rc = ena_parse_devargs(adapter, pci_dev->device.devargs);
if (rc != 0) {
- PMD_INIT_LOG(CRIT, "Failed to parse devargs\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to parse devargs");
goto err;
}
adapter->llq_header_policy = ena_define_llq_hdr_policy(adapter);
rc = ena_com_allocate_customer_metrics_buffer(ena_dev);
if (rc != 0) {
- PMD_INIT_LOG(CRIT, "Failed to allocate customer metrics buffer\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to allocate customer metrics buffer");
goto err;
}
/* device specific initialization routine */
rc = ena_device_init(adapter, pci_dev, &get_feat_ctx);
if (rc) {
- PMD_INIT_LOG(CRIT, "Failed to init ENA device\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to init ENA device");
goto err_metrics_delete;
}
@@ -2355,7 +2355,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = ena_set_queues_placement_policy(adapter, ena_dev,
&get_feat_ctx.llq, &llq_config);
if (unlikely(rc)) {
- PMD_INIT_LOG(CRIT, "Failed to set placement policy\n");
+ PMD_INIT_LOG_LINE(CRIT, "Failed to set placement policy");
return rc;
}
@@ -2363,9 +2363,9 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
queue_type_str = "Regular";
} else {
queue_type_str = "Low latency";
- PMD_DRV_LOG(INFO, "LLQ entry size %uB\n", llq_config.llq_ring_entry_size_value);
+ PMD_DRV_LOG_LINE(INFO, "LLQ entry size %uB", llq_config.llq_ring_entry_size_value);
}
- PMD_DRV_LOG(INFO, "Placement policy: %s\n", queue_type_str);
+ PMD_DRV_LOG_LINE(INFO, "Placement policy: %s", queue_type_str);
calc_queue_ctx.ena_dev = ena_dev;
calc_queue_ctx.get_feat_ctx = &get_feat_ctx;
@@ -2409,7 +2409,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = ena_com_rss_init(ena_dev, ENA_RX_RSS_TABLE_LOG_SIZE);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to initialize RSS in ENA device\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to initialize RSS in ENA device");
goto err_delete_debug_area;
}
@@ -2417,8 +2417,8 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
sizeof(*adapter->drv_stats),
RTE_CACHE_LINE_SIZE);
if (!adapter->drv_stats) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate memory for adapter statistics\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate memory for adapter statistics");
rc = -ENOMEM;
goto err_rss_destroy;
}
@@ -2435,7 +2435,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
rc = rte_eal_alarm_set(adapter->control_path_poll_interval,
ena_control_path_poll_handler, eth_dev);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set control path alarm\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set control path alarm");
goto err_control_path_destroy;
}
}
@@ -2780,8 +2780,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
#ifdef RTE_ETHDEV_DEBUG_RX
/* Check adapter state */
if (unlikely(rx_ring->adapter->state != ENA_ADAPTER_STATE_RUNNING)) {
- PMD_RX_LOG(ALERT,
- "Trying to receive pkts while device is NOT running\n");
+ PMD_RX_LOG_LINE(ALERT,
+ "Trying to receive pkts while device is NOT running");
return 0;
}
#endif
@@ -2800,8 +2800,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
rx_ring->ena_com_io_sq,
&ena_rx_ctx);
if (unlikely(rc)) {
- PMD_RX_LOG(ERR,
- "Failed to get the packet from the device, rc: %d\n",
+ PMD_RX_LOG_LINE(ERR,
+ "Failed to get the packet from the device, rc: %d",
rc);
if (rc == ENA_COM_NO_SPACE) {
++rx_ring->rx_stats.bad_desc_num;
@@ -2883,8 +2883,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
/* SCTP checksum offload is not supported by the ENA. */
if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) ||
l4_csum_flag == RTE_MBUF_F_TX_SCTP_CKSUM) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "] has unsupported offloads flags set: 0x%" PRIu64 "\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "] has unsupported offloads flags set: 0x%" PRIu64,
i, ol_flags);
rte_errno = ENOTSUP;
return i;
@@ -2894,8 +2894,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
!(tx_ring->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV &&
m->nb_segs == tx_ring->sgl_size &&
m->data_len < tx_ring->tx_max_header_size))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "] has too many segments: %" PRIu16 "\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "] has too many segments: %" PRIu16,
i, m->nb_segs);
rte_errno = EINVAL;
return i;
@@ -2909,8 +2909,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
!(tx_ring->offloads & RTE_ETH_TX_OFFLOAD_TCP_CKSUM)) ||
(l4_csum_flag == RTE_MBUF_F_TX_UDP_CKSUM &&
!(tx_ring->offloads & RTE_ETH_TX_OFFLOAD_UDP_CKSUM))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "]: requested offloads: %" PRIu16 " are not enabled for the queue[%u]\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "]: requested offloads: %" PRIu16 " are not enabled for the queue[%u]",
i, m->nb_segs, tx_ring->id);
rte_errno = EINVAL;
return i;
@@ -2921,8 +2921,8 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
*/
if (unlikely(ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK) &&
(m->l2_len == 0 || m->l3_len == 0))) {
- PMD_TX_LOG(DEBUG,
- "mbuf[%" PRIu32 "]: l2_len or l3_len values are 0 while the offload was requested\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "mbuf[%" PRIu32 "]: l2_len or l3_len values are 0 while the offload was requested",
i);
rte_errno = EINVAL;
return i;
@@ -3122,7 +3122,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
*/
if (!ena_com_sq_have_enough_space(tx_ring->ena_com_io_sq,
mbuf->nb_segs + 2)) {
- PMD_TX_LOG(DEBUG, "Not enough space in the tx queue\n");
+ PMD_TX_LOG_LINE(DEBUG, "Not enough space in the tx queue");
return ENA_COM_NO_MEM;
}
@@ -3147,8 +3147,8 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
if (unlikely(ena_com_is_doorbell_needed(tx_ring->ena_com_io_sq,
&ena_tx_ctx))) {
- PMD_TX_LOG(DEBUG,
- "LLQ Tx max burst size of queue %d achieved, writing doorbell to send burst\n",
+ PMD_TX_LOG_LINE(DEBUG,
+ "LLQ Tx max burst size of queue %d achieved, writing doorbell to send burst",
tx_ring->id);
ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
tx_ring->tx_stats.doorbells++;
@@ -3159,7 +3159,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
rc = ena_com_prepare_tx(tx_ring->ena_com_io_sq, &ena_tx_ctx,
&nb_hw_desc);
if (unlikely(rc)) {
- PMD_DRV_LOG(ERR, "Failed to prepare Tx buffers, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Failed to prepare Tx buffers, rc: %d", rc);
++tx_ring->tx_stats.prepare_ctx_err;
ena_trigger_reset(tx_ring->adapter,
ENA_REGS_RESET_DRIVER_INVALID_STATE);
@@ -3262,8 +3262,8 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
#ifdef RTE_ETHDEV_DEBUG_TX
/* Check adapter state */
if (unlikely(tx_ring->adapter->state != ENA_ADAPTER_STATE_RUNNING)) {
- PMD_TX_LOG(ALERT,
- "Trying to xmit pkts while device is NOT running\n");
+ PMD_TX_LOG_LINE(ALERT,
+ "Trying to xmit pkts while device is NOT running");
return 0;
}
#endif
@@ -3303,7 +3303,7 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
if (ena_com_get_cap(ena_dev, ENA_ADMIN_CUSTOMER_METRICS)) {
if (num_metrics != ENA_STATS_ARRAY_METRICS) {
- PMD_DRV_LOG(ERR, "Detected discrepancy in the number of customer metrics");
+ PMD_DRV_LOG_LINE(ERR, "Detected discrepancy in the number of customer metrics");
return;
}
rte_spinlock_lock(&adapter->admin_lock);
@@ -3314,13 +3314,13 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
num_metrics * sizeof(uint64_t));
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != 0) {
- PMD_DRV_LOG(WARNING, "Failed to get customer metrics, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING, "Failed to get customer metrics, rc: %d", rc);
return;
}
} else if (ena_com_get_cap(ena_dev, ENA_ADMIN_ENI_STATS)) {
if (num_metrics != ENA_STATS_ARRAY_METRICS_LEGACY) {
- PMD_DRV_LOG(ERR, "Detected discrepancy in the number of legacy metrics");
+ PMD_DRV_LOG_LINE(ERR, "Detected discrepancy in the number of legacy metrics");
return;
}
@@ -3331,8 +3331,8 @@ static void ena_copy_customer_metrics(struct ena_adapter *adapter, uint64_t *buf
(struct ena_admin_eni_stats *)buf);
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != 0) {
- PMD_DRV_LOG(WARNING,
- "Failed to get ENI metrics, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Failed to get ENI metrics, rc: %d", rc);
return;
}
}
@@ -3353,8 +3353,8 @@ static void ena_copy_ena_srd_info(struct ena_adapter *adapter,
(struct ena_admin_ena_srd_info *)srd_info);
rte_spinlock_unlock(&adapter->admin_lock);
if (rc != ENA_COM_OK && rc != ENA_COM_UNSUPPORTED) {
- PMD_DRV_LOG(WARNING,
- "Failed to get ENA express srd info, rc: %d\n", rc);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Failed to get ENA express srd info, rc: %d", rc);
return;
}
}
@@ -3445,8 +3445,8 @@ static int ena_xstats_get_names_by_id(struct rte_eth_dev *dev,
for (i = 0; i < size; ++i) {
id = ids[i];
if (id > xstats_count) {
- PMD_DRV_LOG(ERR,
- "ID value out of range: id=%" PRIu64 ", xstats_num=%" PRIu64 "\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "ID value out of range: id=%" PRIu64 ", xstats_num=%" PRIu64,
id, xstats_count);
return -EINVAL;
}
@@ -3687,45 +3687,45 @@ static int ena_process_uint_devarg(const char *key,
uint64_value = strtoull(value, &str_end, DECIMAL_BASE);
if (value == str_end) {
- PMD_INIT_LOG(ERR,
- "Invalid value for key '%s'. Only uint values are accepted.\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Invalid value for key '%s'. Only uint values are accepted.",
key);
return -EINVAL;
}
if (strcmp(key, ENA_DEVARG_MISS_TXC_TO) == 0) {
if (uint64_value > ENA_MAX_TX_TIMEOUT_SECONDS) {
- PMD_INIT_LOG(ERR,
- "Tx timeout too high: %" PRIu64 " sec. Maximum allowed: %d sec.\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Tx timeout too high: %" PRIu64 " sec. Maximum allowed: %d sec.",
uint64_value, ENA_MAX_TX_TIMEOUT_SECONDS);
return -EINVAL;
} else if (uint64_value == 0) {
- PMD_INIT_LOG(INFO,
- "Check for missing Tx completions has been disabled.\n");
+ PMD_INIT_LOG_LINE(INFO,
+ "Check for missing Tx completions has been disabled.");
adapter->missing_tx_completion_to =
ENA_HW_HINTS_NO_TIMEOUT;
} else {
- PMD_INIT_LOG(INFO,
- "Tx packet completion timeout set to %" PRIu64 " seconds.\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "Tx packet completion timeout set to %" PRIu64 " seconds.",
uint64_value);
adapter->missing_tx_completion_to =
uint64_value * rte_get_timer_hz();
}
} else if (strcmp(key, ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL) == 0) {
if (uint64_value > ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC) {
- PMD_INIT_LOG(ERR,
+ PMD_INIT_LOG_LINE(ERR,
"Control path polling interval is too long: %" PRIu64 " msecs. "
- "Maximum allowed: %d msecs.\n",
+ "Maximum allowed: %d msecs.",
uint64_value, ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC);
return -EINVAL;
} else if (uint64_value == 0) {
- PMD_INIT_LOG(INFO,
+ PMD_INIT_LOG_LINE(INFO,
"Control path polling interval is set to zero. Operating in "
- "interrupt mode.\n");
+ "interrupt mode.");
adapter->control_path_poll_interval = 0;
} else {
- PMD_INIT_LOG(INFO,
- "Control path polling interval is set to %" PRIu64 " msecs.\n",
+ PMD_INIT_LOG_LINE(INFO,
+ "Control path polling interval is set to %" PRIu64 " msecs.",
uint64_value);
adapter->control_path_poll_interval = uint64_value * USEC_PER_MSEC;
}
@@ -3747,8 +3747,8 @@ static int ena_process_bool_devarg(const char *key,
} else if (strcmp(value, "0") == 0) {
bool_value = false;
} else {
- PMD_INIT_LOG(ERR,
- "Invalid value: '%s' for key '%s'. Accepted: '0' or '1'\n",
+ PMD_INIT_LOG_LINE(ERR,
+ "Invalid value: '%s' for key '%s'. Accepted: '0' or '1'",
value, key);
return -EINVAL;
}
@@ -3783,7 +3783,7 @@ static int ena_parse_devargs(struct ena_adapter *adapter,
kvlist = rte_kvargs_parse(devargs->args, allowed_args);
if (kvlist == NULL) {
- PMD_INIT_LOG(ERR, "Invalid device arguments: %s\n",
+ PMD_INIT_LOG_LINE(ERR, "Invalid device arguments: %s",
devargs->args);
return -EINVAL;
}
@@ -3827,8 +3827,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
return 0;
if (!rte_intr_cap_multiple(intr_handle)) {
- PMD_DRV_LOG(ERR,
- "Rx interrupt requested, but it isn't supported by the PCI driver\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Rx interrupt requested, but it isn't supported by the PCI driver");
return -ENOTSUP;
}
@@ -3838,8 +3838,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
/* Verify if there are enough vectors available. */
vectors_nb = dev->data->nb_rx_queues;
if (vectors_nb > RTE_MAX_RXTX_INTR_VEC_ID) {
- PMD_DRV_LOG(ERR,
- "Too many Rx interrupts requested, maximum number: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Too many Rx interrupts requested, maximum number: %d",
RTE_MAX_RXTX_INTR_VEC_ID);
rc = -ENOTSUP;
goto enable_intr;
@@ -3848,8 +3848,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
/* Allocate the vector list */
if (rte_intr_vec_list_alloc(intr_handle, "intr_vec",
dev->data->nb_rx_queues)) {
- PMD_DRV_LOG(ERR,
- "Failed to allocate interrupt vector for %d queues\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to allocate interrupt vector for %d queues",
dev->data->nb_rx_queues);
rc = -ENOMEM;
goto enable_intr;
@@ -3860,8 +3860,8 @@ static int ena_setup_rx_intr(struct rte_eth_dev *dev)
goto free_intr_vec;
if (!rte_intr_allow_others(intr_handle)) {
- PMD_DRV_LOG(ERR,
- "Not enough interrupts available to use both ENA Admin and Rx interrupts\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Not enough interrupts available to use both ENA Admin and Rx interrupts");
goto disable_intr_efd;
}
@@ -3920,8 +3920,8 @@ static int ena_configure_aenq(struct ena_adapter *adapter)
*/
if (adapter->edev_data->dev_conf.intr_conf.lsc != 0) {
if (!(aenq_groups & BIT(ENA_ADMIN_LINK_CHANGE))) {
- PMD_DRV_LOG(ERR,
- "LSC requested, but it's not supported by the AENQ\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "LSC requested, but it's not supported by the AENQ");
return -EINVAL;
}
} else {
@@ -3933,7 +3933,7 @@ static int ena_configure_aenq(struct ena_adapter *adapter)
rc = ena_com_set_aenq_config(&adapter->ena_dev, aenq_groups);
if (rc != 0) {
- PMD_DRV_LOG(ERR, "Cannot configure AENQ groups, rc=%d\n", rc);
+ PMD_DRV_LOG_LINE(ERR, "Cannot configure AENQ groups, rc=%d", rc);
return rc;
}
@@ -3971,8 +3971,8 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
rc = snprintf(z_name, RTE_MEMZONE_NAMESIZE, "ena_p%d_mz%" PRIu64 "",
data->port_id, adapter->memzone_cnt);
if (rc >= RTE_MEMZONE_NAMESIZE) {
- PMD_DRV_LOG(ERR,
- "Name for the ena_com memzone is too long. Port: %d, mz_num: %" PRIu64 "\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Name for the ena_com memzone is too long. Port: %d, mz_num: %" PRIu64,
data->port_id, adapter->memzone_cnt);
goto error;
}
@@ -3981,7 +3981,7 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
memzone = rte_memzone_reserve_aligned(z_name, size, socket_id,
RTE_MEMZONE_IOVA_CONTIG, alignment);
if (memzone == NULL) {
- PMD_DRV_LOG(ERR, "Failed to allocate ena_com memzone: %s\n",
+ PMD_DRV_LOG_LINE(ERR, "Failed to allocate ena_com memzone: %s",
z_name);
goto error;
}
@@ -4070,7 +4070,7 @@ static void ena_notification(void *adapter_data,
struct ena_admin_ena_hw_hints *hints;
if (aenq_e->aenq_common_desc.group != ENA_ADMIN_NOTIFICATION)
- PMD_DRV_LOG(WARNING, "Invalid AENQ group: %x. Expected: %x\n",
+ PMD_DRV_LOG_LINE(WARNING, "Invalid AENQ group: %x. Expected: %x",
aenq_e->aenq_common_desc.group,
ENA_ADMIN_NOTIFICATION);
@@ -4081,7 +4081,7 @@ static void ena_notification(void *adapter_data,
ena_update_hints(adapter, hints);
break;
default:
- PMD_DRV_LOG(ERR, "Invalid AENQ notification link state: %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Invalid AENQ notification link state: %d",
aenq_e->aenq_common_desc.syndrome);
}
}
@@ -4121,8 +4121,8 @@ static void ena_suboptimal_configuration(__rte_unused void *adapter_data,
num_bits = BITS_PER_TYPE(desc->notifications_bitmap);
for (bit = 0; bit < num_bits; bit++) {
if (desc->notifications_bitmap & RTE_BIT64(bit)) {
- PMD_DRV_LOG(WARNING,
- "Sub-optimal configuration notification code: %d\n", bit + 1);
+ PMD_DRV_LOG_LINE(WARNING,
+ "Sub-optimal configuration notification code: %d", bit + 1);
}
}
}
@@ -4133,8 +4133,8 @@ static void ena_suboptimal_configuration(__rte_unused void *adapter_data,
static void unimplemented_aenq_handler(__rte_unused void *data,
__rte_unused struct ena_admin_aenq_entry *aenq_e)
{
- PMD_DRV_LOG(ERR,
- "Unknown event was received or event with unimplemented handler\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Unknown event was received or event with unimplemented handler");
}
static struct ena_aenq_handlers aenq_handlers = {
@@ -4168,7 +4168,7 @@ ena_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
if (!rte_eth_dev_is_valid_port(req->port_id)) {
rte_errno = ENODEV;
res = -rte_errno;
- PMD_DRV_LOG(ERR, "Unknown port %d in request %d\n",
+ PMD_DRV_LOG_LINE(ERR, "Unknown port %d in request %d",
req->port_id, req->type);
goto end;
}
@@ -4205,7 +4205,7 @@ ena_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
(struct ena_admin_ena_srd_info *)&adapter->srd_stats);
break;
default:
- PMD_DRV_LOG(ERR, "Unknown request type %d\n", req->type);
+ PMD_DRV_LOG_LINE(ERR, "Unknown request type %d", req->type);
res = -EINVAL;
break;
}
@@ -4233,7 +4233,7 @@ static bool ena_use_large_llq_hdr(struct ena_adapter *adapter, uint8_t recommend
if (adapter->llq_header_policy == ENA_LLQ_POLICY_LARGE) {
return true;
} else if (adapter->llq_header_policy == ENA_LLQ_POLICY_RECOMMENDED) {
- PMD_DRV_LOG(INFO, "Recommended device entry size policy %u\n",
+ PMD_DRV_LOG_LINE(INFO, "Recommended device entry size policy %u",
recommended_entry_size);
if (recommended_entry_size == ENA_ADMIN_LIST_ENTRY_SIZE_256B)
return true;
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index 43f16458ea..5c9ec1772b 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -7,31 +7,31 @@
#define _ENA_LOGS_H_
extern int ena_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_init, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_INIT ena_logtype_init
+#define PMD_INIT_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_INIT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ena_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_rx, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_RX ena_logtype_rx
+#define PMD_RX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_RX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ena_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_tx, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_TX ena_logtype_tx
+#define PMD_TX_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_TX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
extern int ena_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ena_logtype_driver, \
- "%s(): " fmt, __func__, ## args)
+#define RTE_LOGTYPE_ENA_DRIVER ena_logtype_driver
+#define PMD_DRV_LOG_LINE(level, fmt, ...) \
+ RTE_LOG(level, ENA_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
#endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_rss.c b/drivers/net/ena/ena_rss.c
index d0ba9d5c0a..85c6152f0c 100644
--- a/drivers/net/ena/ena_rss.c
+++ b/drivers/net/ena/ena_rss.c
@@ -76,14 +76,14 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
return -EINVAL;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR,
- "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "RSS was not configured for the PMD");
return -ENOTSUP;
}
if (reta_size > ENA_RX_RSS_TABLE_SIZE) {
- PMD_DRV_LOG(WARNING,
- "Requested indirection table size (%d) is bigger than supported: %d\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "Requested indirection table size (%d) is bigger than supported: %d",
reta_size, ENA_RX_RSS_TABLE_SIZE);
return -EINVAL;
}
@@ -103,8 +103,8 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
rc = ena_com_indirect_table_fill_entry(ena_dev, i,
entry_value);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Cannot fill indirection table\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot fill indirection table");
rte_spinlock_unlock(&adapter->admin_lock);
return rc;
}
@@ -114,11 +114,11 @@ int ena_rss_reta_update(struct rte_eth_dev *dev,
rc = ena_mp_indirect_table_set(adapter);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Cannot set the indirection table\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot set the indirection table");
return rc;
}
- PMD_DRV_LOG(DEBUG, "RSS configured %d entries for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS configured %d entries for port %d",
reta_size, dev->data->port_id);
return 0;
@@ -140,8 +140,8 @@ int ena_rss_reta_query(struct rte_eth_dev *dev,
return -EINVAL;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR,
- "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "RSS was not configured for the PMD");
return -ENOTSUP;
}
@@ -149,7 +149,7 @@ int ena_rss_reta_query(struct rte_eth_dev *dev,
rc = ena_mp_indirect_table_get(adapter, indirect_table);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Cannot get indirection table\n");
+ PMD_DRV_LOG_LINE(ERR, "Cannot get indirection table");
return rc;
}
@@ -177,8 +177,8 @@ static int ena_fill_indirect_table_default(struct ena_com_dev *ena_dev,
rc = ena_com_indirect_table_fill_entry(ena_dev, i,
ENA_IO_RXQ_IDX(val));
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(DEBUG,
- "Failed to set %zu indirection table entry with val %" PRIu16 "\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Failed to set %zu indirection table entry with val %" PRIu16 "",
i, val);
return rc;
}
@@ -380,8 +380,8 @@ static int ena_set_hash_fields(struct ena_com_dev *ena_dev, uint64_t rss_hf)
(enum ena_admin_flow_hash_proto)i,
selected_fields[i].fields);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(DEBUG,
- "Failed to set ENA HF %d with fields %" PRIu16 "\n",
+ PMD_DRV_LOG_LINE(DEBUG,
+ "Failed to set ENA HF %d with fields %" PRIu16 "",
i, selected_fields[i].fields);
return rc;
}
@@ -411,23 +411,23 @@ static int ena_rss_hash_set(struct ena_com_dev *ena_dev,
rc = ena_com_fill_hash_function(ena_dev, ENA_ADMIN_TOEPLITZ,
rss_key, ENA_HASH_KEY_SIZE, 0);
if (rc != 0 && !(default_allowed && rc == ENA_COM_UNSUPPORTED)) {
- PMD_DRV_LOG(ERR,
- "Failed to set RSS hash function in the device\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to set RSS hash function in the device");
return rc;
}
rc = ena_set_hash_fields(ena_dev, rss_conf->rss_hf);
if (rc == ENA_COM_UNSUPPORTED) {
if (rss_conf->rss_key == NULL && !default_allowed) {
- PMD_DRV_LOG(ERR,
- "Setting RSS hash fields is not supported\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Setting RSS hash fields is not supported");
return -ENOTSUP;
}
- PMD_DRV_LOG(WARNING,
- "Setting RSS hash fields is not supported. Using default values: 0x%" PRIx64 "\n",
+ PMD_DRV_LOG_LINE(WARNING,
+ "Setting RSS hash fields is not supported. Using default values: 0x%"PRIx64,
(uint64_t)(ENA_ALL_RSS_HF));
} else if (rc != 0) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash fields\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash fields");
return rc;
}
@@ -456,8 +456,8 @@ static int ena_get_rss_hash_key(struct ena_com_dev *ena_dev, uint8_t *rss_key)
* explicitly set, this operation shouldn't be supported.
*/
if (ena_dev->rss.hash_key == NULL) {
- PMD_DRV_LOG(WARNING,
- "Retrieving default RSS hash key is not supported\n");
+ PMD_DRV_LOG_LINE(WARNING,
+ "Retrieving default RSS hash key is not supported");
return -ENOTSUP;
}
@@ -489,25 +489,25 @@ int ena_rss_configure(struct ena_adapter *adapter)
rc = ena_fill_indirect_table_default(ena_dev, ENA_RX_RSS_TABLE_SIZE,
adapter->edev_data->nb_rx_queues);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Failed to fill indirection table with default values\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to fill indirection table with default values");
return rc;
}
rc = ena_com_indirect_table_set(ena_dev);
if (unlikely(rc != 0 && rc != ENA_COM_UNSUPPORTED)) {
- PMD_DRV_LOG(ERR,
- "Failed to set indirection table in the device\n");
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to set indirection table in the device");
return rc;
}
rc = ena_rss_hash_set(ena_dev, rss_conf, true);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash");
return rc;
}
- PMD_DRV_LOG(DEBUG, "RSS configured for port %d\n",
+ PMD_DRV_LOG_LINE(DEBUG, "RSS configured for port %d",
adapter->edev_data->port_id);
return 0;
@@ -523,7 +523,7 @@ int ena_rss_hash_update(struct rte_eth_dev *dev,
rc = ena_rss_hash_set(&adapter->ena_dev, rss_conf, false);
rte_spinlock_unlock(&adapter->admin_lock);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR, "Failed to set RSS hash\n");
+ PMD_DRV_LOG_LINE(ERR, "Failed to set RSS hash");
return rc;
}
@@ -542,15 +542,15 @@ int ena_rss_hash_conf_get(struct rte_eth_dev *dev,
static bool warn_once;
if (!(dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_RSS_HASH)) {
- PMD_DRV_LOG(ERR, "RSS was not configured for the PMD\n");
+ PMD_DRV_LOG_LINE(ERR, "RSS was not configured for the PMD");
return -ENOTSUP;
}
if (rss_conf->rss_key != NULL) {
rc = ena_get_rss_hash_key(ena_dev, rss_conf->rss_key);
if (unlikely(rc != 0)) {
- PMD_DRV_LOG(ERR,
- "Cannot retrieve RSS hash key, err: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Cannot retrieve RSS hash key, err: %d",
rc);
return rc;
}
@@ -569,15 +569,15 @@ int ena_rss_hash_conf_get(struct rte_eth_dev *dev,
* interested only in the key value.
*/
if (!warn_once) {
- PMD_DRV_LOG(WARNING,
- "Reading hash control from the device is not supported. .rss_hf will contain a default value.\n");
+ PMD_DRV_LOG_LINE(WARNING,
+ "Reading hash control from the device is not supported. .rss_hf will contain a default value.");
warn_once = true;
}
rss_hf = ENA_ALL_RSS_HF;
break;
} else if (rc != 0) {
- PMD_DRV_LOG(ERR,
- "Failed to retrieve hash ctrl for proto: %d with err: %d\n",
+ PMD_DRV_LOG_LINE(ERR,
+ "Failed to retrieve hash ctrl for proto: %d with err: %d",
i, rc);
return rc;
}
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 21bbb008e0..6ccb228872 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -22,9 +22,11 @@
#include "rte_eth_vhost.h"
RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
+#define RTE_LOGTYPE_VHOST vhost_logtype
-#define VHOST_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__)
+#define VHOST_LOG_LINE(level, ...) \
+ RTE_LOG(level, VHOST, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
+ RTE_FMT_TAIL(__VA_ARGS__ ,)))
enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
@@ -298,7 +300,7 @@ vhost_dev_csum_configure(struct rte_eth_dev *eth_dev)
if (internal->features & (1ULL << VIRTIO_NET_F_CSUM)) {
if (!(rxmode->offloads &
(RTE_ETH_RX_OFFLOAD_UDP_CKSUM | RTE_ETH_RX_OFFLOAD_TCP_CKSUM))) {
- VHOST_LOG(NOTICE, "Rx csum will be done in SW, may impact performance.\n");
+ VHOST_LOG_LINE(NOTICE, "Rx csum will be done in SW, may impact performance.");
internal->rx_sw_csum = true;
}
}
@@ -306,7 +308,7 @@ vhost_dev_csum_configure(struct rte_eth_dev *eth_dev)
if (!(internal->features & (1ULL << VIRTIO_NET_F_GUEST_CSUM))) {
if (txmode->offloads &
(RTE_ETH_TX_OFFLOAD_UDP_CKSUM | RTE_ETH_TX_OFFLOAD_TCP_CKSUM)) {
- VHOST_LOG(NOTICE, "Tx csum will be done in SW, may impact performance.\n");
+ VHOST_LOG_LINE(NOTICE, "Tx csum will be done in SW, may impact performance.");
internal->tx_sw_csum = true;
}
}
@@ -557,7 +559,7 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
return;
if (rte_vhost_get_vhost_vring(vq->vid, (rxq_idx << 1) + 1, &vring) < 0) {
- VHOST_LOG(DEBUG, "Failed to get rxq-%d's vring, skip!\n", rxq_idx);
+ VHOST_LOG_LINE(DEBUG, "Failed to get rxq-%d's vring, skip!", rxq_idx);
return;
}
@@ -566,10 +568,10 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
/* Remove previous kickfd from proxy epoll */
if (vq->kickfd >= 0 && vq->kickfd != vring.kickfd) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_DEL, vq->kickfd, &vq->ev) < 0) {
- VHOST_LOG(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s",
vq->kickfd, rxq_idx, strerror(errno));
} else {
- VHOST_LOG(DEBUG, "Unregistered %d from rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Unregistered %d from rxq-%d epoll",
vq->kickfd, rxq_idx);
}
vq->kickfd = -1;
@@ -578,11 +580,11 @@ eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)
/* Add new one, if valid */
if (vq->kickfd != vring.kickfd && vring.kickfd >= 0) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_ADD, vring.kickfd, &vq->ev) < 0) {
- VHOST_LOG(ERR, "Failed to register %d in rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(ERR, "Failed to register %d in rxq-%d epoll: %s",
vring.kickfd, rxq_idx, strerror(errno));
} else {
vq->kickfd = vring.kickfd;
- VHOST_LOG(DEBUG, "Registered %d in rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Registered %d in rxq-%d epoll",
vq->kickfd, rxq_idx);
}
}
@@ -643,7 +645,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
dev->intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
if (dev->intr_handle == NULL) {
- VHOST_LOG(ERR, "Fail to allocate intr_handle\n");
+ VHOST_LOG_LINE(ERR, "Fail to allocate intr_handle");
ret = -ENOMEM;
goto error;
}
@@ -653,17 +655,17 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)
}
if (rte_intr_vec_list_alloc(dev->intr_handle, NULL, nb_rxq)) {
- VHOST_LOG(ERR, "Failed to allocate memory for interrupt vector\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for interrupt vector");
ret = -ENOMEM;
goto error;
}
- VHOST_LOG(DEBUG, "Prepare intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Prepare intr vec");
for (i = 0; i < nb_rxq; i++) {
int epoll_fd = epoll_create1(0);
if (epoll_fd < 0) {
- VHOST_LOG(ERR, "Failed to create proxy epoll fd for rxq-%d\n", i);
+ VHOST_LOG_LINE(ERR, "Failed to create proxy epoll fd for rxq-%d", i);
ret = -errno;
goto error;
}
@@ -707,7 +709,7 @@ eth_vhost_configure_intr(struct rte_eth_dev *dev)
{
int i;
- VHOST_LOG(DEBUG, "Configure intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Configure intr vec");
for (i = 0; i < dev->data->nb_rx_queues; i++)
eth_vhost_update_intr(dev, i);
}
@@ -718,7 +720,7 @@ eth_vhost_unconfigure_intr(struct rte_eth_dev *eth_dev)
struct vhost_queue *vq;
int i;
- VHOST_LOG(DEBUG, "Unconfigure intr vec\n");
+ VHOST_LOG_LINE(DEBUG, "Unconfigure intr vec");
for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
vq = eth_dev->data->rx_queues[i];
if (vq == NULL || vq->vid < 0)
@@ -729,10 +731,10 @@ eth_vhost_unconfigure_intr(struct rte_eth_dev *eth_dev)
/* Remove previous kickfd from proxy epoll */
if (vq->kickfd >= 0) {
if (epoll_ctl(vq->ev.data.fd, EPOLL_CTL_DEL, vq->kickfd, &vq->ev) < 0) {
- VHOST_LOG(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s\n",
+ VHOST_LOG_LINE(DEBUG, "Failed to unregister %d from rxq-%d epoll: %s",
vq->kickfd, i, strerror(errno));
} else {
- VHOST_LOG(DEBUG, "Unregistered %d from rxq-%d epoll\n",
+ VHOST_LOG_LINE(DEBUG, "Unregistered %d from rxq-%d epoll",
vq->kickfd, i);
}
vq->kickfd = -1;
@@ -826,7 +828,7 @@ new_device(int vid)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(INFO, "Invalid device name: %s\n", ifname);
+ VHOST_LOG_LINE(INFO, "Invalid device name: %s", ifname);
return -1;
}
@@ -841,7 +843,7 @@ new_device(int vid)
#endif
if (rte_vhost_get_negotiated_features(vid, &internal->features)) {
- VHOST_LOG(ERR, "Failed to get device features\n");
+ VHOST_LOG_LINE(ERR, "Failed to get device features");
return -1;
}
@@ -864,7 +866,7 @@ new_device(int vid)
rte_atomic32_set(&internal->dev_attached, 1);
update_queuing_status(eth_dev, false);
- VHOST_LOG(INFO, "Vhost device %d created\n", vid);
+ VHOST_LOG_LINE(INFO, "Vhost device %d created", vid);
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
@@ -885,7 +887,7 @@ destroy_device(int vid)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(ERR, "Invalid interface name: %s\n", ifname);
+ VHOST_LOG_LINE(ERR, "Invalid interface name: %s", ifname);
return;
}
eth_dev = list->eth_dev;
@@ -921,7 +923,7 @@ destroy_device(int vid)
state->max_vring = 0;
rte_spinlock_unlock(&state->lock);
- VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
+ VHOST_LOG_LINE(INFO, "Vhost device %d destroyed", vid);
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
}
@@ -937,7 +939,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
rte_vhost_get_ifname(vid, ifname, sizeof(ifname));
list = find_internal_resource(ifname);
if (list == NULL) {
- VHOST_LOG(ERR, "Invalid interface name: %s\n", ifname);
+ VHOST_LOG_LINE(ERR, "Invalid interface name: %s", ifname);
return -1;
}
@@ -959,7 +961,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
update_queuing_status(eth_dev, false);
- VHOST_LOG(INFO, "vring%u is %s\n",
+ VHOST_LOG_LINE(INFO, "vring%u is %s",
vring, enable ? "enabled" : "disabled");
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
@@ -1018,12 +1020,12 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
if (rte_vhost_driver_callback_register(internal->iface_name,
&vhost_ops) < 0) {
- VHOST_LOG(ERR, "Can't register callbacks\n");
+ VHOST_LOG_LINE(ERR, "Can't register callbacks");
goto drv_unreg;
}
if (rte_vhost_driver_start(internal->iface_name) < 0) {
- VHOST_LOG(ERR, "Failed to start driver for %s\n",
+ VHOST_LOG_LINE(ERR, "Failed to start driver for %s",
internal->iface_name);
goto drv_unreg;
}
@@ -1053,13 +1055,13 @@ rte_eth_vhost_get_queue_event(uint16_t port_id,
int idx;
if (port_id >= RTE_MAX_ETHPORTS) {
- VHOST_LOG(ERR, "Invalid port id\n");
+ VHOST_LOG_LINE(ERR, "Invalid port id");
return -1;
}
state = vring_states[port_id];
if (!state) {
- VHOST_LOG(ERR, "Unused port\n");
+ VHOST_LOG_LINE(ERR, "Unused port");
return -1;
}
@@ -1139,7 +1141,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
eth_vhost_uninstall_intr(eth_dev);
if (dev_conf->intr_conf.rxq && eth_vhost_install_intr(eth_dev) < 0) {
- VHOST_LOG(ERR, "Failed to install interrupt handler.\n");
+ VHOST_LOG_LINE(ERR, "Failed to install interrupt handler.");
return -1;
}
@@ -1235,7 +1237,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
vq = rte_zmalloc_socket(NULL, sizeof(struct vhost_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (vq == NULL) {
- VHOST_LOG(ERR, "Failed to allocate memory for rx queue\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for rx queue");
return -ENOMEM;
}
@@ -1259,7 +1261,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
vq = rte_zmalloc_socket(NULL, sizeof(struct vhost_queue),
RTE_CACHE_LINE_SIZE, socket_id);
if (vq == NULL) {
- VHOST_LOG(ERR, "Failed to allocate memory for tx queue\n");
+ VHOST_LOG_LINE(ERR, "Failed to allocate memory for tx queue");
return -ENOMEM;
}
@@ -1279,7 +1281,7 @@ eth_dev_info(struct rte_eth_dev *dev,
internal = dev->data->dev_private;
if (internal == NULL) {
- VHOST_LOG(ERR, "Invalid device specified\n");
+ VHOST_LOG_LINE(ERR, "Invalid device specified");
return -ENODEV;
}
@@ -1508,7 +1510,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
struct rte_eth_dev *eth_dev = NULL;
struct rte_ether_addr *eth_addr = NULL;
- VHOST_LOG(INFO, "Creating VHOST-USER backend on numa socket %u\n",
+ VHOST_LOG_LINE(INFO, "Creating VHOST-USER backend on numa socket %u",
numa_node);
/* reserve an ethdev entry */
@@ -1613,12 +1615,12 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev;
const char *name = rte_vdev_device_name(dev);
- VHOST_LOG(INFO, "Initializing pmd_vhost for %s\n", name);
+ VHOST_LOG_LINE(INFO, "Initializing pmd_vhost for %s", name);
if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
eth_dev = rte_eth_dev_attach_secondary(name);
if (!eth_dev) {
- VHOST_LOG(ERR, "Failed to probe %s\n", name);
+ VHOST_LOG_LINE(ERR, "Failed to probe %s", name);
return -1;
}
eth_dev->rx_pkt_burst = eth_vhost_rx;
@@ -1736,7 +1738,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
ret = eth_dev_vhost_create(dev, iface_name, queues,
dev->device.numa_node, flags, disable_flags);
if (ret == -1)
- VHOST_LOG(ERR, "Failed to create %s\n", name);
+ VHOST_LOG_LINE(ERR, "Failed to create %s", name);
out_free:
rte_kvargs_free(kvlist);
@@ -1750,7 +1752,7 @@ rte_pmd_vhost_remove(struct rte_vdev_device *dev)
struct rte_eth_dev *eth_dev = NULL;
name = rte_vdev_device_name(dev);
- VHOST_LOG(INFO, "Un-Initializing pmd_vhost for %s\n", name);
+ VHOST_LOG_LINE(INFO, "Un-Initializing pmd_vhost for %s", name);
/* find an ethdev entry */
eth_dev = rte_eth_dev_allocated(name);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 11/14] drivers: remove redundant newline from logs
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (9 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 10/14] drivers: replace logging helpers David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 12/14] drivers: split multilines log messages David Marchand
` (5 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev
Cc: stable, Chengwen Feng, Nicolas Chautru, Gagandeep Singh,
Hemant Agrawal, Nipun Gupta, Nikhil Agarwal, Sachin Saxena,
Rosen Xu, Long Li, Wei Hu, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Anoob Joseph,
Jingjing Wu, Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang,
Ashish Gupta, Sunila Sahu, Ajit Khaparde, Raveendra Padasalagi,
Vikas Gupta, Sunil Uttarwar, Ankur Dwivedi, Tejasree Kondoj,
Zhangfei Gao, Jay Zhou, Bruce Richardson, Kevin Laatz,
Conor Walsh, Pavan Nikhilesh, Shijith Thotton, Abdullah Sevincer,
Jerin Jacob, Liang Ma, Peter Mccarthy, Harry van Haaren,
Srikanth Yalavarthi, Igor Russkikh, Selwin Sebastian,
Julien Aube, Chas Williams, Min Hu (Connor),
Apeksha Gupta, John Daley, Hyong Youb Kim, Gaetan Rivet,
Jeroen de Borst, Rushil Gupta, Joshua Washington, Ziyang Xuan,
Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar, Matan Azrad,
Viacheslav Ovsiienko, Jiawen Wu, Vamsi Attunuru,
Devendra Singh Rawat, Alok Prasad, Maciej Czekaj, Jian Wang,
Maxime Coquelin, Chenbo Xia, Jochen Behrens, Liron Himi,
Chaoyong He
Fix places where two newline characters may be logged.
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
Changes since v1:
- added changes to event/dlb2 and net/bonding,
---
drivers/baseband/acc/rte_acc100_pmd.c | 20 +-
drivers/baseband/acc/rte_vrb_pmd.c | 26 +--
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 16 +-
drivers/baseband/la12xx/bbdev_la12xx.c | 4 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 4 +-
drivers/bus/cdx/cdx_vfio.c | 8 +-
drivers/bus/dpaa/include/fman.h | 3 +-
drivers/bus/fslmc/fslmc_bus.c | 8 +-
drivers/bus/fslmc/fslmc_vfio.c | 10 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpci.c | 4 +-
drivers/bus/ifpga/ifpga_bus.c | 8 +-
drivers/bus/vdev/vdev_params.c | 2 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/roc_dev.c | 2 +-
drivers/common/cnxk/roc_model.c | 2 +-
drivers/common/cnxk/roc_nix_ops.c | 20 +-
drivers/common/cnxk/roc_nix_tm.c | 2 +-
drivers/common/cnxk/roc_nix_tm_mark.c | 2 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_nix_tm_utils.c | 2 +-
drivers/common/cnxk/roc_sso.c | 2 +-
drivers/common/cnxk/roc_tim.c | 2 +-
drivers/common/cpt/cpt_ucode.h | 4 +-
drivers/common/idpf/idpf_common_logs.h | 5 +-
drivers/common/octeontx/octeontx_mbox.c | 4 +-
drivers/common/qat/qat_pf2vf.c | 4 +-
drivers/common/qat/qat_qp.c | 2 +-
drivers/compress/isal/isal_compress_pmd.c | 78 +++----
drivers/compress/octeontx/otx_zip.h | 12 +-
drivers/compress/octeontx/otx_zip_pmd.c | 14 +-
drivers/compress/zlib/zlib_pmd.c | 26 +--
drivers/compress/zlib/zlib_pmd_ops.c | 4 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_session.c | 2 +-
drivers/crypto/caam_jr/caam_jr.c | 32 +--
drivers/crypto/caam_jr/caam_jr_uio.c | 6 +-
drivers/crypto/ccp/ccp_dev.c | 2 +-
drivers/crypto/ccp/rte_ccp_pmd.c | 2 +-
drivers/crypto/cnxk/cnxk_se.h | 6 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 44 ++--
drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 16 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 27 ++-
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 2 +-
drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 6 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 4 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 2 +-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 28 +--
drivers/crypto/ipsec_mb/pmd_snow3g.c | 4 +-
.../crypto/octeontx/otx_cryptodev_hw_access.h | 6 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 42 ++--
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 44 ++--
drivers/crypto/qat/qat_asym.c | 2 +-
drivers/crypto/qat/qat_sym_session.c | 12 +-
drivers/crypto/uadk/uadk_crypto_pmd.c | 8 +-
drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
drivers/dma/dpaa/dpaa_qdma.c | 40 ++--
drivers/dma/dpaa2/dpaa2_qdma.c | 10 +-
drivers/dma/hisilicon/hisi_dmadev.c | 6 +-
drivers/dma/idxd/idxd_common.c | 2 +-
drivers/dma/idxd/idxd_pci.c | 6 +-
drivers/dma/ioat/ioat_dmadev.c | 14 +-
drivers/event/cnxk/cnxk_tim_evdev.c | 2 +-
drivers/event/dlb2/dlb2.c | 220 +++++++++---------
drivers/event/dlb2/dlb2_xstats.c | 6 +-
drivers/event/dlb2/pf/dlb2_main.c | 52 ++---
drivers/event/dlb2/pf/dlb2_pf.c | 20 +-
drivers/event/dpaa2/dpaa2_eventdev.c | 14 +-
drivers/event/octeontx/timvf_evdev.c | 2 +-
drivers/event/opdl/opdl_evdev.c | 30 +--
drivers/event/opdl/opdl_test.c | 116 ++++-----
drivers/event/sw/sw_evdev.c | 22 +-
drivers/event/sw/sw_evdev_xstats.c | 4 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 8 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 22 +-
.../mempool/octeontx/rte_mempool_octeontx.c | 6 +-
drivers/ml/cnxk/cn10k_ml_dev.c | 32 +--
drivers/ml/cnxk/cnxk_ml_ops.c | 20 +-
drivers/net/atlantic/atl_rxtx.c | 4 +-
drivers/net/atlantic/hw_atl/hw_atl_utils.c | 12 +-
drivers/net/axgbe/axgbe_ethdev.c | 2 +-
drivers/net/bnx2x/bnx2x.c | 8 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 4 +-
drivers/net/bonding/rte_eth_bond_alb.c | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 4 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 6 +-
drivers/net/cnxk/cn10k_ethdev.c | 2 +-
drivers/net/cnxk/cn9k_ethdev.c | 2 +-
drivers/net/cnxk/cnxk_eswitch_devargs.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.c | 4 +-
drivers/net/cnxk/cnxk_ethdev_mcs.c | 14 +-
drivers/net/cnxk/cnxk_ethdev_ops.c | 2 +-
drivers/net/cnxk/cnxk_rep.c | 8 +-
drivers/net/cnxk/cnxk_rep.h | 2 +-
drivers/net/cpfl/cpfl_ethdev.c | 2 +-
drivers/net/cpfl/cpfl_flow_parser.c | 2 +-
drivers/net/cpfl/cpfl_fxp_rule.c | 8 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 16 +-
drivers/net/dpaa2/dpaa2_flow.c | 36 +--
drivers/net/dpaa2/dpaa2_mux.c | 4 +-
drivers/net/dpaa2/dpaa2_recycle.c | 6 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 14 +-
drivers/net/dpaa2/dpaa2_sparser.c | 8 +-
drivers/net/dpaa2/dpaa2_tm.c | 24 +-
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/enetc/enetc_ethdev.c | 4 +-
drivers/net/enetfec/enet_ethdev.c | 4 +-
drivers/net/enetfec/enet_uio.c | 10 +-
drivers/net/enic/enic_ethdev.c | 20 +-
drivers/net/enic/enic_flow.c | 20 +-
drivers/net/enic/enic_vf_representor.c | 16 +-
drivers/net/failsafe/failsafe_args.c | 2 +-
drivers/net/failsafe/failsafe_eal.c | 2 +-
drivers/net/failsafe/failsafe_ether.c | 4 +-
drivers/net/failsafe/failsafe_intr.c | 6 +-
drivers/net/gve/base/gve_adminq.c | 4 +-
drivers/net/gve/gve_rx.c | 2 +-
drivers/net/gve/gve_tx.c | 2 +-
drivers/net/hinic/base/hinic_pmd_eqs.c | 2 +-
drivers/net/hinic/base/hinic_pmd_mbox.c | 6 +-
drivers/net/hinic/base/hinic_pmd_niccfg.c | 8 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 4 +-
drivers/net/hns3/hns3_dump.c | 12 +-
drivers/net/hns3/hns3_intr.c | 12 +-
drivers/net/hns3/hns3_ptp.c | 2 +-
drivers/net/hns3/hns3_regs.c | 4 +-
drivers/net/i40e/i40e_ethdev.c | 51 ++--
drivers/net/i40e/i40e_pf.c | 8 +-
drivers/net/i40e/i40e_rxtx.c | 42 ++--
drivers/net/iavf/iavf_ethdev.c | 12 +-
drivers/net/iavf/iavf_rxtx.c | 16 +-
drivers/net/ice/ice_dcf_ethdev.c | 4 +-
drivers/net/ice/ice_dcf_vf_representor.c | 14 +-
drivers/net/ice/ice_ethdev.c | 50 ++--
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 8 +-
drivers/net/ice/ice_rxtx.c | 18 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 23 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 20 +-
drivers/net/ipn3ke/ipn3ke_tm.c | 10 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 7 +-
drivers/net/ixgbe/ixgbe_ipsec.c | 24 +-
drivers/net/ixgbe/ixgbe_pf.c | 18 +-
drivers/net/ixgbe/rte_pmd_ixgbe.c | 8 +-
drivers/net/memif/rte_eth_memif.c | 2 +-
drivers/net/mlx4/mlx4.c | 4 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/ngbe/base/ngbe_hw.c | 2 +-
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
drivers/net/ngbe/ngbe_pf.c | 10 +-
drivers/net/octeon_ep/cnxk_ep_tx.c | 2 +-
drivers/net/octeon_ep/cnxk_ep_vf.c | 12 +-
drivers/net/octeon_ep/otx2_ep_vf.c | 18 +-
drivers/net/octeon_ep/otx_ep_common.h | 2 +-
drivers/net/octeon_ep/otx_ep_ethdev.c | 82 +++----
drivers/net/octeon_ep/otx_ep_mbox.c | 30 +--
drivers/net/octeon_ep/otx_ep_rxtx.c | 74 +++---
drivers/net/octeon_ep/otx_ep_vf.c | 20 +-
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 4 +-
drivers/net/pcap/pcap_ethdev.c | 4 +-
drivers/net/pfe/pfe_ethdev.c | 22 +-
drivers/net/pfe/pfe_hif.c | 12 +-
drivers/net/pfe/pfe_hif_lib.c | 2 +-
drivers/net/qede/qede_rxtx.c | 66 +++---
drivers/net/thunderx/nicvf_ethdev.c | 2 +-
drivers/net/txgbe/txgbe_ethdev.c | 4 +-
drivers/net/txgbe/txgbe_ipsec.c | 24 +-
drivers/net/txgbe/txgbe_pf.c | 20 +-
drivers/net/virtio/virtio_user/vhost_vdpa.c | 2 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 2 +-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +-
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 14 +-
drivers/raw/ifpga/afu_pmd_n3000.c | 2 +-
drivers/raw/ifpga/ifpga_rawdev.c | 94 ++++----
drivers/regex/cn9k/cn9k_regexdev.c | 2 +-
drivers/vdpa/ifc/ifcvf_vdpa.c | 10 +-
drivers/vdpa/nfp/nfp_vdpa.c | 2 +-
180 files changed, 1244 insertions(+), 1262 deletions(-)
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index ab69350080..5c91acab7e 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -229,7 +229,7 @@ fetch_acc100_config(struct rte_bbdev *dev)
}
rte_bbdev_log_debug(
- "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u AQ %u %u %u %u Len %u %u %u %u\n",
+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u AQ %u %u %u %u Len %u %u %u %u",
(d->pf_device) ? "PF" : "VF",
(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
@@ -2672,7 +2672,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
uint32_t harq_index;
if (harq_in_length == 0) {
- rte_bbdev_log(ERR, "Loopback of invalid null size\n");
+ rte_bbdev_log(ERR, "Loopback of invalid null size");
return -EINVAL;
}
@@ -2710,7 +2710,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
fcw->hcin_en = 1;
fcw->hcout_en = 1;
- rte_bbdev_log(DEBUG, "Loopback IN %d Index %d offset %d length %d %d\n",
+ rte_bbdev_log(DEBUG, "Loopback IN %d Index %d offset %d length %d %d",
ddr_mem_in, harq_index,
harq_layout[harq_index].offset, harq_in_length,
harq_dma_length_in);
@@ -2726,7 +2726,7 @@ harq_loopback(struct acc_queue *q, struct rte_bbdev_dec_op *op,
fcw->hcin_size0 = harq_in_length;
}
harq_layout[harq_index].val = 0;
- rte_bbdev_log(DEBUG, "Loopback FCW Config %d %d %d\n",
+ rte_bbdev_log(DEBUG, "Loopback FCW Config %d %d %d",
fcw->hcin_size0, fcw->hcin_offset, fcw->hcin_size1);
fcw->hcout_size0 = harq_in_length;
fcw->hcin_decomp_mode = h_comp;
@@ -3450,7 +3450,7 @@ acc100_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
}
avail -= 1;
- rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d\n",
+ rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d",
i, ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,
ops[i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,
ops[i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,
@@ -3566,7 +3566,7 @@ dequeue_enc_one_op_cb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x num %d\n", desc, rsp.val, desc->req.numCBs);
+ rte_bbdev_log_debug("Resp. desc %p: %x num %d", desc, rsp.val, desc->req.numCBs);
/* Dequeue */
op = desc->req.op_addr;
@@ -3643,7 +3643,7 @@ dequeue_enc_one_op_tb(struct acc_queue *q, struct rte_bbdev_enc_op **ref_op,
atom_desc.atom_hdr = rte_atomic_load_explicit((uint64_t __rte_atomic *)desc,
rte_memory_order_relaxed);
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x descs %d cbs %d\n",
+ rte_bbdev_log_debug("Resp. desc %p: %x descs %d cbs %d",
desc, rsp.val, descs_in_tb, desc->req.numCBs);
op->status |= ((rsp.dma_err) ? (1 << RTE_BBDEV_DRV_ERROR) : 0);
@@ -3739,7 +3739,7 @@ dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x\n", desc, rsp.val);
+ rte_bbdev_log_debug("Resp. desc %p: %x", desc, rsp.val);
/* Dequeue */
op = desc->req.op_addr;
@@ -3818,7 +3818,7 @@ dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
atom_desc.atom_hdr = rte_atomic_load_explicit((uint64_t __rte_atomic *)desc,
rte_memory_order_relaxed);
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d\n",
+ rte_bbdev_log_debug("Resp. desc %p: %x r %d c %d",
desc, rsp.val, cb_idx, cbs_in_tb);
op->status |= ((rsp.input_err) ? (1 << RTE_BBDEV_DATA_ERROR) : 0);
@@ -4552,7 +4552,7 @@ acc100_configure(const char *dev_name, struct rte_acc_conf *conf)
}
if (aram_address > ACC100_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, ACC100_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index 585dc49bd6..fad984ccc1 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -348,7 +348,7 @@ fetch_acc_config(struct rte_bbdev *dev)
}
rte_bbdev_log_debug(
- "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u\n",
+ "%s Config LLR SIGN IN/OUT %s %s QG %u %u %u %u %u %u AQ %u %u %u %u %u %u Len %u %u %u %u %u %u",
(d->pf_device) ? "PF" : "VF",
(acc_conf->input_pos_llr_1_bit) ? "POS" : "NEG",
(acc_conf->output_pos_llr_1_bit) ? "POS" : "NEG",
@@ -464,7 +464,7 @@ vrb_dev_interrupt_handler(void *cb_arg)
}
} else {
rte_bbdev_log_debug(
- "VRB VF Interrupt received, Info Ring data: 0x%x\n",
+ "VRB VF Interrupt received, Info Ring data: 0x%x",
ring_data->val);
switch (int_nb) {
case ACC_VF_INT_DMA_DL_DESC_IRQ:
@@ -698,7 +698,7 @@ vrb_intr_enable(struct rte_bbdev *dev)
if (d->device_variant == VRB1_VARIANT) {
/* On VRB1: cannot enable MSI/IR to avoid potential back-pressure corner case. */
- rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt\n",
+ rte_bbdev_log(ERR, "VRB1 (%s) doesn't support any MSI/MSI-X interrupt",
dev->data->name);
return -ENOTSUP;
}
@@ -800,7 +800,7 @@ vrb_intr_enable(struct rte_bbdev *dev)
return 0;
}
- rte_bbdev_log(ERR, "Device (%s) supports only VFIO MSI/MSI-X interrupts\n",
+ rte_bbdev_log(ERR, "Device (%s) supports only VFIO MSI/MSI-X interrupts",
dev->data->name);
return -ENOTSUP;
}
@@ -1023,7 +1023,7 @@ vrb_queue_setup(struct rte_bbdev *dev, uint16_t queue_id,
d->queue_offset(d->pf_device, q->vf_id, q->qgrp_id, q->aq_id));
rte_bbdev_log_debug(
- "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p\n",
+ "Setup dev%u q%u: qgrp_id=%u, vf_id=%u, aq_id=%u, aq_depth=%u, mmio_reg_enqueue=%p base %p",
dev->data->dev_id, queue_id, q->qgrp_id, q->vf_id,
q->aq_id, q->aq_depth, q->mmio_reg_enqueue,
d->mmio_base);
@@ -1076,7 +1076,7 @@ vrb_print_op(struct rte_bbdev_dec_op *op, enum rte_bbdev_op_type op_type,
);
} else if (op_type == RTE_BBDEV_OP_MLDTS) {
struct rte_bbdev_mldts_op *op_mldts = (struct rte_bbdev_mldts_op *) op;
- rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x\n",
+ rte_bbdev_log(INFO, " Op MLD %d RBs %d NL %d Rp %d %d %x",
index,
op_mldts->mldts.num_rbs, op_mldts->mldts.num_layers,
op_mldts->mldts.r_rep,
@@ -2492,7 +2492,7 @@ vrb_enqueue_ldpc_dec_one_op_cb(struct acc_queue *q, struct rte_bbdev_dec_op *op,
hq_output = op->ldpc_dec.harq_combined_output.data;
hq_len = op->ldpc_dec.harq_combined_output.length;
if (unlikely(!mbuf_append(hq_output_head, hq_output, hq_len))) {
- rte_bbdev_log(ERR, "HARQ output mbuf issue %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output mbuf issue %d %d",
hq_output->buf_len,
hq_len);
return -1;
@@ -2985,7 +2985,7 @@ vrb_enqueue_ldpc_dec_cb(struct rte_bbdev_queue_data *q_data,
break;
}
avail -= 1;
- rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d %d\n",
+ rte_bbdev_log(INFO, "Op %d %d %d %d %d %d %d %d %d %d %d %d",
i, ops[i]->ldpc_dec.op_flags, ops[i]->ldpc_dec.rv_index,
ops[i]->ldpc_dec.iter_max, ops[i]->ldpc_dec.iter_count,
ops[i]->ldpc_dec.basegraph, ops[i]->ldpc_dec.z_c,
@@ -3304,7 +3304,7 @@ vrb_dequeue_ldpc_dec_one_op_cb(struct rte_bbdev_queue_data *q_data,
return -1;
rsp.val = atom_desc.rsp.val;
- rte_bbdev_log_debug("Resp. desc %p: %x %x %x\n", desc, rsp.val, desc->rsp.add_info_0,
+ rte_bbdev_log_debug("Resp. desc %p: %x %x %x", desc, rsp.val, desc->rsp.add_info_0,
desc->rsp.add_info_1);
/* Dequeue. */
@@ -3411,7 +3411,7 @@ vrb_dequeue_dec_one_op_tb(struct acc_queue *q, struct rte_bbdev_dec_op **ref_op,
}
if (check_bit(op->ldpc_dec.op_flags, RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK)) {
- rte_bbdev_log_debug("TB-CRC Check %x\n", tb_crc_check);
+ rte_bbdev_log_debug("TB-CRC Check %x", tb_crc_check);
if (tb_crc_check > 0)
op->status |= 1 << RTE_BBDEV_CRC_ERROR;
}
@@ -3946,7 +3946,7 @@ vrb2_check_mld_r_constraint(struct rte_bbdev_mldts_op *op) {
layer_idx = RTE_MIN(op->mldts.num_layers - VRB2_MLD_MIN_LAYER,
VRB2_MLD_MAX_LAYER - VRB2_MLD_MIN_LAYER);
rrep_idx = RTE_MIN(op->mldts.r_rep, VRB2_MLD_MAX_RREP);
- rte_bbdev_log_debug("RB %d index %d %d max %d\n", op->mldts.num_rbs, layer_idx, rrep_idx,
+ rte_bbdev_log_debug("RB %d index %d %d max %d", op->mldts.num_rbs, layer_idx, rrep_idx,
max_rb[layer_idx][rrep_idx]);
return (op->mldts.num_rbs <= max_rb[layer_idx][rrep_idx]);
@@ -4606,7 +4606,7 @@ vrb1_configure(const char *dev_name, struct rte_acc_conf *conf)
}
if (aram_address > VRB1_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, VRB1_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
@@ -4976,7 +4976,7 @@ vrb2_configure(const char *dev_name, struct rte_acc_conf *conf)
}
}
if (aram_address > VRB2_WORDS_IN_ARAM_SIZE) {
- rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d\n",
+ rte_bbdev_log(ERR, "ARAM Configuration not fitting %d %d",
aram_address, VRB2_WORDS_IN_ARAM_SIZE);
return -EINVAL;
}
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 9b253cde28..3e04e44ba2 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -1997,10 +1997,10 @@ fpga_5gnr_mutex_acquisition(struct fpga_5gnr_queue *q)
do {
if (cnt > 0)
usleep(FPGA_5GNR_TIMEOUT_CHECK_INTERVAL);
- rte_bbdev_log_debug("Acquiring Mutex for %x\n", q->ddr_mutex_uuid);
+ rte_bbdev_log_debug("Acquiring Mutex for %x", q->ddr_mutex_uuid);
fpga_5gnr_reg_write_32(q->d->mmio_base, FPGA_5GNR_FEC_MUTEX, mutex_ctrl);
mutex_read = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_MUTEX);
- rte_bbdev_log_debug("Mutex %x cnt %d owner %x\n",
+ rte_bbdev_log_debug("Mutex %x cnt %d owner %x",
mutex_read, cnt, q->ddr_mutex_uuid);
cnt++;
} while ((mutex_read >> 16) != q->ddr_mutex_uuid);
@@ -2038,7 +2038,7 @@ fpga_5gnr_harq_write_loopback(struct fpga_5gnr_queue *q,
reg_32 = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_HARQ_BUF_SIZE_REGS);
if (reg_32 < harq_in_length) {
left_length = reg_32;
- rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
+ rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size");
}
}
@@ -2108,17 +2108,17 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q,
reg = fpga_5gnr_reg_read_32(q->d->mmio_base, FPGA_5GNR_FEC_HARQ_BUF_SIZE_REGS);
if (reg < harq_in_length) {
harq_in_length = reg;
- rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size\n");
+ rte_bbdev_log(ERR, "HARQ in length > HARQ buffer size");
}
}
if (!mbuf_append(harq_output, harq_output, harq_in_length)) {
- rte_bbdev_log(ERR, "HARQ output buffer warning %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output buffer warning %d %d",
harq_output->buf_len - rte_pktmbuf_headroom(harq_output),
harq_in_length);
harq_in_length = harq_output->buf_len - rte_pktmbuf_headroom(harq_output);
if (!mbuf_append(harq_output, harq_output, harq_in_length)) {
- rte_bbdev_log(ERR, "HARQ output buffer issue %d %d\n",
+ rte_bbdev_log(ERR, "HARQ output buffer issue %d %d",
harq_output->buf_len, harq_in_length);
return -1;
}
@@ -2142,7 +2142,7 @@ fpga_5gnr_harq_read_loopback(struct fpga_5gnr_queue *q,
while (reg != 1) {
reg = fpga_5gnr_reg_read_8(q->d->mmio_base, FPGA_5GNR_FEC_DDR4_RD_RDY_REGS);
if (reg == FPGA_5GNR_DDR_OVERFLOW) {
- rte_bbdev_log(ERR, "Read address is overflow!\n");
+ rte_bbdev_log(ERR, "Read address is overflow!");
return -1;
}
}
@@ -3376,7 +3376,7 @@ int rte_fpga_5gnr_fec_configure(const char *dev_name, const struct rte_fpga_5gnr
return -ENODEV;
}
struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(bbdev->device);
- rte_bbdev_log(INFO, "Configure dev id %x\n", pci_dev->id.device_id);
+ rte_bbdev_log(INFO, "Configure dev id %x", pci_dev->id.device_id);
if (pci_dev->id.device_id == VC_5GNR_PF_DEVICE_ID)
return vc_5gnr_configure(dev_name, conf);
else if (pci_dev->id.device_id == AGX100_PF_DEVICE_ID)
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index 1a56e73abd..af4b4f1e9a 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -201,7 +201,7 @@ la12xx_e200_queue_setup(struct rte_bbdev *dev,
q_priv->la12xx_core_id = LA12XX_LDPC_DEC_CORE;
break;
default:
- rte_bbdev_log(ERR, "Unsupported op type\n");
+ rte_bbdev_log(ERR, "Unsupported op type");
return -1;
}
@@ -269,7 +269,7 @@ la12xx_e200_queue_setup(struct rte_bbdev *dev,
ch->feca_blk_id = rte_cpu_to_be_32(priv->num_ldpc_dec_queues++);
break;
default:
- rte_bbdev_log(ERR, "Not supported op type\n");
+ rte_bbdev_log(ERR, "Not supported op type");
return -1;
}
ch->op_type = rte_cpu_to_be_32(q_priv->op_type);
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 574743a9da..1f661dd801 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -269,7 +269,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
dev_info->num_queues[op_cap->type] = num_queue_per_type;
}
- rte_bbdev_log_debug("got device info from %u\n", dev->data->dev_id);
+ rte_bbdev_log_debug("got device info from %u", dev->data->dev_id);
}
/* Release queue */
@@ -1951,7 +1951,7 @@ turbo_sw_bbdev_probe(struct rte_vdev_device *vdev)
parse_turbo_sw_params(&init_params, input_args);
rte_bbdev_log_debug(
- "Initialising %s on NUMA node %d with max queues: %d\n",
+ "Initialising %s on NUMA node %d with max queues: %d",
name, init_params.socket_id, init_params.queues_num);
return turbo_sw_bbdev_create(vdev, &init_params);
diff --git a/drivers/bus/cdx/cdx_vfio.c b/drivers/bus/cdx/cdx_vfio.c
index 79abc3f120..664f267471 100644
--- a/drivers/bus/cdx/cdx_vfio.c
+++ b/drivers/bus/cdx/cdx_vfio.c
@@ -638,7 +638,7 @@ rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev)
feature->flags |= VFIO_DEVICE_FEATURE_SET;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret) {
- CDX_BUS_ERR("Bus Master configuring not supported for device: %s, error: %d (%s)\n",
+ CDX_BUS_ERR("Bus Master configuring not supported for device: %s, error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
return ret;
@@ -648,7 +648,7 @@ rte_cdx_vfio_bm_enable(struct rte_cdx_device *dev)
vfio_bm_feature->op = VFIO_DEVICE_FEATURE_SET_MASTER;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret < 0)
- CDX_BUS_ERR("BM Enable Error for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("BM Enable Error for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
@@ -682,7 +682,7 @@ rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev)
feature->flags |= VFIO_DEVICE_FEATURE_SET;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret) {
- CDX_BUS_ERR("Bus Master configuring not supported for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("Bus Master configuring not supported for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
return ret;
@@ -692,7 +692,7 @@ rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev)
vfio_bm_feature->op = VFIO_DEVICE_FEATURE_CLEAR_MASTER;
ret = ioctl(vfio_dev_fd, RTE_VFIO_DEVICE_FEATURE, feature);
if (ret < 0)
- CDX_BUS_ERR("BM Disable Error for device: %s, Error: %d (%s)\n",
+ CDX_BUS_ERR("BM Disable Error for device: %s, Error: %d (%s)",
dev->name, errno, strerror(errno));
free(feature);
diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h
index 3a6dd555a7..19f6132bba 100644
--- a/drivers/bus/dpaa/include/fman.h
+++ b/drivers/bus/dpaa/include/fman.h
@@ -403,7 +403,8 @@ extern int fman_ccsr_map_fd;
#define FMAN_ERR(rc, fmt, args...) \
do { \
_errno = (rc); \
- DPAA_BUS_LOG(ERR, fmt "(%d)", ##args, errno); \
+ rte_log(RTE_LOG_ERR, dpaa_logtype_bus, "dpaa: " fmt "(%d)\n", \
+ ##args, errno); \
} while (0)
#define FMAN_IP_REV_1 0xC30C4
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index c155f4a2fd..097d6dca08 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -500,7 +500,7 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
const struct rte_dpaa2_device *dstart;
struct rte_dpaa2_device *dev;
- DPAA2_BUS_DEBUG("Finding a device named %s\n", (const char *)data);
+ DPAA2_BUS_DEBUG("Finding a device named %s", (const char *)data);
/* find_device is always called with an opaque object which should be
* passed along to the 'cmp' function iterating over all device obj
@@ -515,7 +515,7 @@ rte_fslmc_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
}
while (dev != NULL) {
if (cmp(&dev->device, data) == 0) {
- DPAA2_BUS_DEBUG("Found device (%s)\n",
+ DPAA2_BUS_DEBUG("Found device (%s)",
dev->device.name);
return &dev->device;
}
@@ -629,14 +629,14 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
/* Expectation is that device would be name=device_name */
if (strncmp(str, "name=", 5) != 0) {
- DPAA2_BUS_DEBUG("Invalid device string (%s)\n", str);
+ DPAA2_BUS_DEBUG("Invalid device string (%s)", str);
return NULL;
}
/* Now that name=device_name format is available, split */
dup = strdup(str);
if (dup == NULL) {
- DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
+ DPAA2_BUS_DEBUG("Dup string (%s) failed!", str);
return NULL;
}
dev_name = dup + strlen("name=");
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index e12fd62f34..6981679a2d 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -232,7 +232,7 @@ fslmc_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
/* iova_addr may be set to RTE_BAD_IOVA */
if (iova_addr == RTE_BAD_IOVA) {
- DPAA2_BUS_DEBUG("Segment has invalid iova, skipping\n");
+ DPAA2_BUS_DEBUG("Segment has invalid iova, skipping");
cur_len += map_len;
continue;
}
@@ -389,7 +389,7 @@ rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size)
dma_map.vaddr = vaddr;
dma_map.iova = iova;
- DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64"\n",
+ DPAA2_BUS_DEBUG("VFIOdmamap 0x%"PRIx64":0x%"PRIx64",size 0x%"PRIx64,
(uint64_t)dma_map.vaddr, (uint64_t)dma_map.iova,
(uint64_t)dma_map.size);
ret = ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA,
@@ -480,13 +480,13 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
ret = ioctl(vfio_group_fd, VFIO_GROUP_GET_STATUS, &group_status);
if (ret) {
DPAA2_BUS_ERR(" %s cannot get group status, "
- "error %i (%s)\n", dev_addr,
+ "error %i (%s)", dev_addr,
errno, strerror(errno));
close(vfio_group_fd);
rte_vfio_clear_group(vfio_group_fd);
return -1;
} else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) {
- DPAA2_BUS_ERR(" %s VFIO group is not viable!\n", dev_addr);
+ DPAA2_BUS_ERR(" %s VFIO group is not viable!", dev_addr);
close(vfio_group_fd);
rte_vfio_clear_group(vfio_group_fd);
return -1;
@@ -503,7 +503,7 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
&vfio_container_fd);
if (ret) {
DPAA2_BUS_ERR(" %s cannot add VFIO group to container, "
- "error %i (%s)\n", dev_addr,
+ "error %i (%s)", dev_addr,
errno, strerror(errno));
close(vfio_group_fd);
close(vfio_container_fd);
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
index 07256ed7ec..7e858a113f 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpci.c
@@ -86,7 +86,7 @@ rte_dpaa2_create_dpci_device(int vdev_fd __rte_unused,
sizeof(struct queue_storage_info_t),
RTE_CACHE_LINE_SIZE);
if (!rxq->q_storage) {
- DPAA2_BUS_ERR("q_storage allocation failed\n");
+ DPAA2_BUS_ERR("q_storage allocation failed");
ret = -ENOMEM;
goto err;
}
@@ -94,7 +94,7 @@ rte_dpaa2_create_dpci_device(int vdev_fd __rte_unused,
memset(rxq->q_storage, 0, sizeof(struct queue_storage_info_t));
ret = dpaa2_alloc_dq_storage(rxq->q_storage);
if (ret) {
- DPAA2_BUS_ERR("dpaa2_alloc_dq_storage failed\n");
+ DPAA2_BUS_ERR("dpaa2_alloc_dq_storage failed");
goto err;
}
}
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index ffb0c61214..11b31eee4f 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -180,7 +180,7 @@ ifpga_scan_one(struct rte_rawdev *rawdev,
rawdev->dev_ops->firmware_load &&
rawdev->dev_ops->firmware_load(rawdev,
&afu_pr_conf)){
- IFPGA_BUS_ERR("firmware load error %d\n", ret);
+ IFPGA_BUS_ERR("firmware load error %d", ret);
goto end;
}
afu_dev->id.uuid.uuid_low = afu_pr_conf.afu_id.uuid.uuid_low;
@@ -316,7 +316,7 @@ ifpga_probe_all_drivers(struct rte_afu_device *afu_dev)
/* Check if a driver is already loaded */
if (rte_dev_is_probed(&afu_dev->device)) {
- IFPGA_BUS_DEBUG("Device %s is already probed\n",
+ IFPGA_BUS_DEBUG("Device %s is already probed",
rte_ifpga_device_name(afu_dev));
return -EEXIST;
}
@@ -353,7 +353,7 @@ ifpga_probe(void)
if (ret == -EEXIST)
continue;
if (ret < 0)
- IFPGA_BUS_ERR("failed to initialize %s device\n",
+ IFPGA_BUS_ERR("failed to initialize %s device",
rte_ifpga_device_name(afu_dev));
}
@@ -408,7 +408,7 @@ ifpga_remove_driver(struct rte_afu_device *afu_dev)
name = rte_ifpga_device_name(afu_dev);
if (afu_dev->driver == NULL) {
- IFPGA_BUS_DEBUG("no driver attach to device %s\n", name);
+ IFPGA_BUS_DEBUG("no driver attach to device %s", name);
return 1;
}
diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c
index 51583fe949..68ae09e2e9 100644
--- a/drivers/bus/vdev/vdev_params.c
+++ b/drivers/bus/vdev/vdev_params.c
@@ -53,7 +53,7 @@ rte_vdev_dev_iterate(const void *start,
if (str != NULL) {
kvargs = rte_kvargs_parse(str, vdev_params_keys);
if (kvargs == NULL) {
- VDEV_LOG(ERR, "cannot parse argument list\n");
+ VDEV_LOG(ERR, "cannot parse argument list");
rte_errno = EINVAL;
return NULL;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index b9139c6e6c..8a965d10d9 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -108,7 +108,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
/* no initialization when marked as blocked, return without error */
if (dev->device.devargs != NULL &&
dev->device.devargs->policy == RTE_DEV_BLOCKED) {
- VMBUS_LOG(INFO, " Device is blocked, not initializing\n");
+ VMBUS_LOG(INFO, " Device is blocked, not initializing");
return 1;
}
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index daf7684d8e..438ac72563 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -1564,7 +1564,7 @@ dev_init(struct dev *dev, struct plt_pci_device *pci_dev)
rc = plt_thread_create_control(&dev->sync.pfvf_msg_thread, name,
pf_vf_mbox_thread_main, dev);
if (rc != 0) {
- plt_err("Failed to create thread for VF mbox handling\n");
+ plt_err("Failed to create thread for VF mbox handling");
goto thread_fail;
}
}
diff --git a/drivers/common/cnxk/roc_model.c b/drivers/common/cnxk/roc_model.c
index 6dc2afe7f0..446ab3d2bd 100644
--- a/drivers/common/cnxk/roc_model.c
+++ b/drivers/common/cnxk/roc_model.c
@@ -153,7 +153,7 @@ cn10k_part_pass_get(uint32_t *part, uint32_t *pass)
dir = opendir(SYSFS_PCI_DEVICES);
if (dir == NULL) {
- plt_err("%s(): opendir failed: %s\n", __func__,
+ plt_err("%s(): opendir failed: %s", __func__,
strerror(errno));
return -errno;
}
diff --git a/drivers/common/cnxk/roc_nix_ops.c b/drivers/common/cnxk/roc_nix_ops.c
index 9e66ad1a49..efb0a41d07 100644
--- a/drivers/common/cnxk/roc_nix_ops.c
+++ b/drivers/common/cnxk/roc_nix_ops.c
@@ -220,7 +220,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
}
- plt_nix_dbg("tcpv4 lso fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tcpv4 lso fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TCP LSO
@@ -240,7 +240,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
}
- plt_nix_dbg("tcpv6 lso fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tcpv6 lso fmt=%u", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv4/TCP LSO
@@ -256,7 +256,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v4v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v4v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv6/TCP LSO
@@ -272,7 +272,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v4v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v4v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv4/TCP LSO
@@ -288,7 +288,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v6v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v6v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv6/TCP LSO
@@ -304,7 +304,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_udp_tun_idx[ROC_NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
- plt_nix_dbg("udp tun v6v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("udp tun v6v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv4/TCP LSO
@@ -320,7 +320,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
- plt_nix_dbg("tun v4v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v4v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv6/TCP LSO
@@ -336,7 +336,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
- plt_nix_dbg("tun v4v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v4v6 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv4/TCP LSO
@@ -352,7 +352,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
- plt_nix_dbg("tun v6v4 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v6v4 fmt=%u", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv6/TCP LSO
@@ -369,7 +369,7 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
goto exit;
nix->lso_tun_idx[ROC_NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
- plt_nix_dbg("tun v6v6 fmt=%u\n", rsp->lso_format_idx);
+ plt_nix_dbg("tun v6v6 fmt=%u", rsp->lso_format_idx);
rc = 0;
exit:
mbox_put(mbox);
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index ac522f8235..d890fad681 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -908,7 +908,7 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
if (rc) {
roc_nix_tm_dump(sq->roc_nix, NULL);
roc_nix_queues_ctx_dump(sq->roc_nix, NULL);
- plt_err("Failed to drain sq %u, rc=%d\n", sq->qid, rc);
+ plt_err("Failed to drain sq %u, rc=%d", sq->qid, rc);
return rc;
}
/* Freed all pending SQEs for this SQ, so disable this node */
diff --git a/drivers/common/cnxk/roc_nix_tm_mark.c b/drivers/common/cnxk/roc_nix_tm_mark.c
index e9a7604e79..092d0851b9 100644
--- a/drivers/common/cnxk/roc_nix_tm_mark.c
+++ b/drivers/common/cnxk/roc_nix_tm_mark.c
@@ -266,7 +266,7 @@ nix_tm_mark_init(struct nix *nix)
}
nix->tm_markfmt[i][j] = rsp->mark_format_idx;
- plt_tm_dbg("Mark type: %u, Mark Color:%u, id:%u\n", i,
+ plt_tm_dbg("Mark type: %u, Mark Color:%u, id:%u", i,
j, nix->tm_markfmt[i][j]);
}
}
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 9f3870a311..e24826bb5d 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -504,7 +504,7 @@ roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix)
/* Wait for sq entries to be flushed */
rc = roc_nix_tm_sq_flush_spin(sq);
if (rc) {
- plt_err("Failed to drain sq, rc=%d\n", rc);
+ plt_err("Failed to drain sq, rc=%d", rc);
goto cleanup;
}
}
diff --git a/drivers/common/cnxk/roc_nix_tm_utils.c b/drivers/common/cnxk/roc_nix_tm_utils.c
index 8e3da95a45..4a09cc2aae 100644
--- a/drivers/common/cnxk/roc_nix_tm_utils.c
+++ b/drivers/common/cnxk/roc_nix_tm_utils.c
@@ -583,7 +583,7 @@ nix_tm_topology_reg_prep(struct nix *nix, struct nix_tm_node *node,
/* Configure TL4 to send to SDP channel instead of CGX/LBK */
if (nix->sdp_link) {
relchan = nix->tx_chan_base & 0xff;
- plt_tm_dbg("relchan=%u schq=%u tx_chan_cnt=%u\n", relchan, schq,
+ plt_tm_dbg("relchan=%u schq=%u tx_chan_cnt=%u", relchan, schq,
nix->tx_chan_cnt);
reg[k] = NIX_AF_TL4X_SDP_LINK_CFG(schq);
regval[k] = BIT_ULL(12);
diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index 293b0c81a1..499f93e373 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -186,7 +186,7 @@ sso_rsrc_get(struct roc_sso *roc_sso)
mbox_alloc_msg_free_rsrc_cnt(mbox);
rc = mbox_process_msg(mbox, (void **)&rsrc_cnt);
if (rc) {
- plt_err("Failed to get free resource count\n");
+ plt_err("Failed to get free resource count");
rc = -EIO;
goto exit;
}
diff --git a/drivers/common/cnxk/roc_tim.c b/drivers/common/cnxk/roc_tim.c
index 095afbb9e6..83228fb2b6 100644
--- a/drivers/common/cnxk/roc_tim.c
+++ b/drivers/common/cnxk/roc_tim.c
@@ -342,7 +342,7 @@ tim_free_lf_count_get(struct dev *dev, uint16_t *nb_lfs)
mbox_alloc_msg_free_rsrc_cnt(mbox);
rc = mbox_process_msg(mbox, (void **)&rsrc_cnt);
if (rc) {
- plt_err("Failed to get free resource count\n");
+ plt_err("Failed to get free resource count");
mbox_put(mbox);
return -EIO;
}
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 87a3ac80b9..636f93604e 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2589,7 +2589,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
sess->cpt_op |= CPT_OP_CIPHER_DECRYPT;
sess->cpt_op |= CPT_OP_AUTH_VERIFY;
} else {
- CPT_LOG_DP_ERR("Unknown aead operation\n");
+ CPT_LOG_DP_ERR("Unknown aead operation");
return -1;
}
switch (aead_form->algo) {
@@ -2658,7 +2658,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
ctx->dec_auth = 1;
}
} else {
- CPT_LOG_DP_ERR("Unknown cipher operation\n");
+ CPT_LOG_DP_ERR("Unknown cipher operation");
return -1;
}
diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/common/idpf/idpf_common_logs.h
index e638c616d8..561836760c 100644
--- a/drivers/common/idpf/idpf_common_logs.h
+++ b/drivers/common/idpf/idpf_common_logs.h
@@ -10,7 +10,7 @@
extern int idpf_common_logtype;
#define RTE_LOGTYPE_IDPF_COMMON idpf_common_logtype
-#define DRV_LOG_RAW(level, ...) \
+#define DRV_LOG(level, ...) \
rte_log(RTE_LOG_ ## level, \
idpf_common_logtype, \
RTE_FMT("%s(): " \
@@ -18,9 +18,6 @@ extern int idpf_common_logtype;
__func__, \
RTE_FMT_TAIL(__VA_ARGS__,)))
-#define DRV_LOG(level, fmt, args...) \
- DRV_LOG_RAW(level, fmt "\n", ## args)
-
#ifdef RTE_LIBRTE_IDPF_DEBUG_RX
#define RX_LOG(level, ...) \
RTE_LOG(level, \
diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
index 4fd3fda721..f98942c79c 100644
--- a/drivers/common/octeontx/octeontx_mbox.c
+++ b/drivers/common/octeontx/octeontx_mbox.c
@@ -264,7 +264,7 @@ octeontx_start_domain(void)
result = octeontx_mbox_send(&hdr, NULL, 0, NULL, 0);
if (result != 0) {
- mbox_log_err("Could not start domain. Err=%d. FuncErr=%d\n",
+ mbox_log_err("Could not start domain. Err=%d. FuncErr=%d",
result, hdr.res_code);
result = -EINVAL;
}
@@ -288,7 +288,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
sizeof(struct mbox_intf_ver),
&kernel_intf_ver, sizeof(kernel_intf_ver));
if (result != sizeof(kernel_intf_ver)) {
- mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
+ mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d",
result, hdr.res_code);
result = -EINVAL;
}
diff --git a/drivers/common/qat/qat_pf2vf.c b/drivers/common/qat/qat_pf2vf.c
index 621f12fce2..9b25fdc6a0 100644
--- a/drivers/common/qat/qat_pf2vf.c
+++ b/drivers/common/qat/qat_pf2vf.c
@@ -36,7 +36,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
}
if ((pf2vf_msg.msg_type & type_mask) != pf2vf_msg.msg_type) {
- QAT_LOG(ERR, "PF2VF message type 0x%X out of range\n",
+ QAT_LOG(ERR, "PF2VF message type 0x%X out of range",
pf2vf_msg.msg_type);
return -EINVAL;
}
@@ -65,7 +65,7 @@ int qat_pf2vf_exch_msg(struct qat_pci_device *qat_dev,
(++count < ADF_IOV_MSG_ACK_MAX_RETRY));
if (val & ADF_PFVF_INT) {
- QAT_LOG(ERR, "ACK not received from remote\n");
+ QAT_LOG(ERR, "ACK not received from remote");
return -EIO;
}
diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index ad44b0e01f..4bf9bac23e 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -267,7 +267,7 @@ qat_queue_create(struct qat_pci_device *qat_dev, struct qat_queue *queue,
if (qat_qp_check_queue_alignment(queue->base_phys_addr,
queue_size_bytes)) {
QAT_LOG(ERR, "Invalid alignment on queue create "
- " 0x%"PRIx64"\n",
+ " 0x%"PRIx64,
queue->base_phys_addr);
ret = -EFAULT;
goto queue_create_err;
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index cb23e929ed..0e783243a8 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -42,10 +42,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
/* Set private xform algorithm */
if (xform->compress.algo != RTE_COMP_ALGO_DEFLATE) {
if (xform->compress.algo == RTE_COMP_ALGO_NULL) {
- ISAL_PMD_LOG(ERR, "By-pass not supported\n");
+ ISAL_PMD_LOG(ERR, "By-pass not supported");
return -ENOTSUP;
}
- ISAL_PMD_LOG(ERR, "Algorithm not supported\n");
+ ISAL_PMD_LOG(ERR, "Algorithm not supported");
return -ENOTSUP;
}
priv_xform->compress.algo = RTE_COMP_ALGO_DEFLATE;
@@ -55,7 +55,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
priv_xform->compress.window_size =
RTE_COMP_ISAL_WINDOW_SIZE;
else {
- ISAL_PMD_LOG(ERR, "Window size not supported\n");
+ ISAL_PMD_LOG(ERR, "Window size not supported");
return -ENOTSUP;
}
@@ -74,7 +74,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
RTE_COMP_HUFFMAN_DYNAMIC;
break;
default:
- ISAL_PMD_LOG(ERR, "Huffman code not supported\n");
+ ISAL_PMD_LOG(ERR, "Huffman code not supported");
return -ENOTSUP;
}
@@ -92,10 +92,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
break;
case(RTE_COMP_CHECKSUM_CRC32_ADLER32):
ISAL_PMD_LOG(ERR, "Combined CRC and ADLER checksum not"
- " supported\n");
+ " supported");
return -ENOTSUP;
default:
- ISAL_PMD_LOG(ERR, "Checksum type not supported\n");
+ ISAL_PMD_LOG(ERR, "Checksum type not supported");
priv_xform->compress.chksum = IGZIP_DEFLATE;
break;
}
@@ -105,21 +105,21 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
*/
if (xform->compress.level < RTE_COMP_LEVEL_PMD_DEFAULT ||
xform->compress.level > RTE_COMP_LEVEL_MAX) {
- ISAL_PMD_LOG(ERR, "Compression level out of range\n");
+ ISAL_PMD_LOG(ERR, "Compression level out of range");
return -EINVAL;
}
/* Check for Compressdev API level 0, No compression
* not supported in ISA-L
*/
else if (xform->compress.level == RTE_COMP_LEVEL_NONE) {
- ISAL_PMD_LOG(ERR, "No Compression not supported\n");
+ ISAL_PMD_LOG(ERR, "No Compression not supported");
return -ENOTSUP;
}
/* If using fixed huffman code, level must be 0 */
else if (priv_xform->compress.deflate.huffman ==
RTE_COMP_HUFFMAN_FIXED) {
ISAL_PMD_LOG(DEBUG, "ISA-L level 0 used due to a"
- " fixed huffman code\n");
+ " fixed huffman code");
priv_xform->compress.level = RTE_COMP_ISAL_LEVEL_ZERO;
priv_xform->level_buffer_size =
ISAL_DEF_LVL0_DEFAULT;
@@ -169,7 +169,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
ISAL_PMD_LOG(DEBUG, "Requested ISA-L level"
" 3 or above; Level 3 optimized"
" for AVX512 & AVX2 only."
- " level changed to 2.\n");
+ " level changed to 2.");
priv_xform->compress.level =
RTE_COMP_ISAL_LEVEL_TWO;
priv_xform->level_buffer_size =
@@ -188,10 +188,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
/* Set private xform algorithm */
if (xform->decompress.algo != RTE_COMP_ALGO_DEFLATE) {
if (xform->decompress.algo == RTE_COMP_ALGO_NULL) {
- ISAL_PMD_LOG(ERR, "By pass not supported\n");
+ ISAL_PMD_LOG(ERR, "By pass not supported");
return -ENOTSUP;
}
- ISAL_PMD_LOG(ERR, "Algorithm not supported\n");
+ ISAL_PMD_LOG(ERR, "Algorithm not supported");
return -ENOTSUP;
}
priv_xform->decompress.algo = RTE_COMP_ALGO_DEFLATE;
@@ -210,10 +210,10 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
break;
case(RTE_COMP_CHECKSUM_CRC32_ADLER32):
ISAL_PMD_LOG(ERR, "Combined CRC and ADLER checksum not"
- " supported\n");
+ " supported");
return -ENOTSUP;
default:
- ISAL_PMD_LOG(ERR, "Checksum type not supported\n");
+ ISAL_PMD_LOG(ERR, "Checksum type not supported");
priv_xform->decompress.chksum = ISAL_DEFLATE;
break;
}
@@ -223,7 +223,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
priv_xform->decompress.window_size =
RTE_COMP_ISAL_WINDOW_SIZE;
else {
- ISAL_PMD_LOG(ERR, "Window size not supported\n");
+ ISAL_PMD_LOG(ERR, "Window size not supported");
return -ENOTSUP;
}
}
@@ -263,7 +263,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
remaining_offset);
if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
- ISAL_PMD_LOG(ERR, "Invalid source or destination buffer\n");
+ ISAL_PMD_LOG(ERR, "Invalid source or destination buffer");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -279,7 +279,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
remaining_data = op->src.length - qp->stream->total_in;
if (ret != COMP_OK) {
- ISAL_PMD_LOG(ERR, "Compression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Compression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -294,7 +294,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
RTE_MIN(remaining_data, src->data_len);
} else {
ISAL_PMD_LOG(ERR,
- "Not enough input buffer segments\n");
+ "Not enough input buffer segments");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -309,7 +309,7 @@ chained_mbuf_compression(struct rte_comp_op *op, struct isal_comp_qp *qp)
qp->stream->avail_out = dst->data_len;
} else {
ISAL_PMD_LOG(ERR,
- "Not enough output buffer segments\n");
+ "Not enough output buffer segments");
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return -1;
@@ -378,14 +378,14 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
if (ret == ISAL_OUT_OVERFLOW) {
ISAL_PMD_LOG(ERR, "Decompression operation ran "
- "out of space, but can be recovered.\n%d bytes "
- "consumed\t%d bytes produced\n",
+ "out of space, but can be recovered.%d bytes "
+ "consumed\t%d bytes produced",
consumed_data, qp->state->total_out);
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE;
return ret;
} else if (ret < 0) {
- ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Decompression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -399,7 +399,7 @@ chained_mbuf_decompression(struct rte_comp_op *op, struct isal_comp_qp *qp)
qp->state->avail_out = dst->data_len;
} else {
ISAL_PMD_LOG(ERR,
- "Not enough output buffer segments\n");
+ "Not enough output buffer segments");
op->status =
RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return -1;
@@ -451,14 +451,14 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
IGZIP_HUFFTABLE_DEFAULT);
if (op->m_src->pkt_len < (op->src.length + op->src.offset)) {
- ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.\n");
+ ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
if (op->dst.offset >= op->m_dst->pkt_len) {
ISAL_PMD_LOG(ERR, "Output mbuf(s) not big enough"
- " for offset provided.\n");
+ " for offset provided.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -483,7 +483,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
ISAL_PMD_LOG(ERR, "Invalid source or destination"
- " buffers\n");
+ " buffers");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -493,7 +493,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that output buffer did not run out of space */
if (ret == STATELESS_OVERFLOW) {
- ISAL_PMD_LOG(ERR, "Output buffer not big enough\n");
+ ISAL_PMD_LOG(ERR, "Output buffer not big enough");
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return ret;
}
@@ -501,13 +501,13 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that input buffer has been fully consumed */
if (qp->stream->avail_in != (uint32_t)0) {
ISAL_PMD_LOG(ERR, "Input buffer could not be read"
- " entirely\n");
+ " entirely");
op->status = RTE_COMP_OP_STATUS_ERROR;
return -1;
}
if (ret != COMP_OK) {
- ISAL_PMD_LOG(ERR, "Compression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Compression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -543,14 +543,14 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
qp->state->crc_flag = priv_xform->decompress.chksum;
if (op->m_src->pkt_len < (op->src.length + op->src.offset)) {
- ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.\n");
+ ISAL_PMD_LOG(ERR, "Input mbuf(s) not big enough.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
if (op->dst.offset >= op->m_dst->pkt_len) {
ISAL_PMD_LOG(ERR, "Output mbuf not big enough for "
- "offset provided.\n");
+ "offset provided.");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -574,7 +574,7 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
if (unlikely(!qp->state->next_in || !qp->state->next_out)) {
ISAL_PMD_LOG(ERR, "Invalid source or destination"
- " buffers\n");
+ " buffers");
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -1;
}
@@ -583,7 +583,7 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
ret = isal_inflate_stateless(qp->state);
if (ret == ISAL_OUT_OVERFLOW) {
- ISAL_PMD_LOG(ERR, "Output buffer not big enough\n");
+ ISAL_PMD_LOG(ERR, "Output buffer not big enough");
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
return ret;
}
@@ -591,13 +591,13 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
/* Check that input buffer has been fully consumed */
if (qp->state->avail_in != (uint32_t)0) {
ISAL_PMD_LOG(ERR, "Input buffer could not be read"
- " entirely\n");
+ " entirely");
op->status = RTE_COMP_OP_STATUS_ERROR;
return -1;
}
if (ret != ISAL_DECOMP_OK && ret != ISAL_END_INPUT) {
- ISAL_PMD_LOG(ERR, "Decompression operation failed\n");
+ ISAL_PMD_LOG(ERR, "Decompression operation failed");
op->status = RTE_COMP_OP_STATUS_ERROR;
return ret;
}
@@ -622,7 +622,7 @@ process_op(struct isal_comp_qp *qp, struct rte_comp_op *op,
process_isal_inflate(op, qp, priv_xform);
break;
default:
- ISAL_PMD_LOG(ERR, "Operation Not Supported\n");
+ ISAL_PMD_LOG(ERR, "Operation Not Supported");
return -ENOTSUP;
}
return 0;
@@ -641,7 +641,7 @@ isal_comp_pmd_enqueue_burst(void *queue_pair, struct rte_comp_op **ops,
for (i = 0; i < num_enq; i++) {
if (unlikely(ops[i]->op_type != RTE_COMP_OP_STATELESS)) {
ops[i]->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ISAL_PMD_LOG(ERR, "Stateful operation not Supported\n");
+ ISAL_PMD_LOG(ERR, "Stateful operation not Supported");
qp->qp_stats.enqueue_err_count++;
continue;
}
@@ -696,7 +696,7 @@ compdev_isal_create(const char *name, struct rte_vdev_device *vdev,
dev->dequeue_burst = isal_comp_pmd_dequeue_burst;
dev->enqueue_burst = isal_comp_pmd_enqueue_burst;
- ISAL_PMD_LOG(INFO, "\nISA-L library version used: "ISAL_VERSION_STRING);
+ ISAL_PMD_LOG(INFO, "ISA-L library version used: "ISAL_VERSION_STRING);
return 0;
}
@@ -739,7 +739,7 @@ compdev_isal_probe(struct rte_vdev_device *dev)
retval = rte_compressdev_pmd_parse_input_args(&init_params, args);
if (retval) {
ISAL_PMD_LOG(ERR,
- "Failed to parse initialisation arguments[%s]\n", args);
+ "Failed to parse initialisation arguments[%s]", args);
return -EINVAL;
}
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index bb19854b50..7353fd4957 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -206,7 +206,7 @@ zipvf_prepare_sgl(struct rte_mbuf *buf, int64_t offset, struct zipvf_sginfo *sg_
break;
}
- ZIP_PMD_LOG(DEBUG, "ZIP SGL buf[%d], len = %d, iova = 0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "ZIP SGL buf[%d], len = %d, iova = 0x%"PRIx64,
sgidx, sginfo[sgidx].sg_ctl.s.length, sginfo[sgidx].sg_addr.s.addr);
++sgidx;
}
@@ -219,7 +219,7 @@ zipvf_prepare_sgl(struct rte_mbuf *buf, int64_t offset, struct zipvf_sginfo *sg_
}
qp->num_sgbuf = ++sgidx;
- ZIP_PMD_LOG(DEBUG, "Tot_buf_len:%d max_segs:%"PRIx64"\n", tot_buf_len,
+ ZIP_PMD_LOG(DEBUG, "Tot_buf_len:%d max_segs:%"PRIx64, tot_buf_len,
qp->num_sgbuf);
return ret;
}
@@ -246,7 +246,7 @@ zipvf_prepare_in_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_com
inst->s.inp_ptr_ctl.s.length = qp->num_sgbuf;
inst->s.inp_ptr_ctl.s.fw = 0;
- ZIP_PMD_LOG(DEBUG, "Gather(input): len(nb_segs):%d, iova: 0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "Gather(input): len(nb_segs):%d, iova: 0x%"PRIx64,
inst->s.inp_ptr_ctl.s.length, inst->s.inp_ptr_addr.s.addr);
return ret;
}
@@ -256,7 +256,7 @@ zipvf_prepare_in_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_com
inst->s.inp_ptr_addr.s.addr = rte_pktmbuf_iova_offset(m_src, offset);
inst->s.inp_ptr_ctl.s.length = inlen;
- ZIP_PMD_LOG(DEBUG, "Direct input - inlen:%d\n", inlen);
+ ZIP_PMD_LOG(DEBUG, "Direct input - inlen:%d", inlen);
return ret;
}
@@ -282,7 +282,7 @@ zipvf_prepare_out_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_co
inst->s.out_ptr_addr.s.addr = rte_mem_virt2iova(qp->s_info);
inst->s.out_ptr_ctl.s.length = qp->num_sgbuf;
- ZIP_PMD_LOG(DEBUG, "Scatter(output): nb_segs:%d, iova:0x%"PRIx64"\n",
+ ZIP_PMD_LOG(DEBUG, "Scatter(output): nb_segs:%d, iova:0x%"PRIx64,
inst->s.out_ptr_ctl.s.length, inst->s.out_ptr_addr.s.addr);
return ret;
}
@@ -296,7 +296,7 @@ zipvf_prepare_out_buf(union zip_inst_s *inst, struct zipvf_qp *qp, struct rte_co
inst->s.out_ptr_ctl.s.length = inst->s.totaloutputlength;
- ZIP_PMD_LOG(DEBUG, "Direct output - outlen:%d\n", inst->s.totaloutputlength);
+ ZIP_PMD_LOG(DEBUG, "Direct output - outlen:%d", inst->s.totaloutputlength);
return ret;
}
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index fd20139da6..c8f456b319 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -161,7 +161,7 @@ zip_set_stream_parameters(struct rte_compressdev *dev,
*/
} else {
- ZIP_PMD_ERR("\nxform type not supported");
+ ZIP_PMD_ERR("xform type not supported");
ret = -1;
goto err;
}
@@ -527,7 +527,7 @@ zip_pmd_enqueue_burst(void *queue_pair,
}
qp->enqed = enqd;
- ZIP_PMD_LOG(DEBUG, "ops_enqd[nb_ops:%d]:%d\n", nb_ops, enqd);
+ ZIP_PMD_LOG(DEBUG, "ops_enqd[nb_ops:%d]:%d", nb_ops, enqd);
return enqd;
}
@@ -563,7 +563,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->status = RTE_COMP_OP_STATUS_SUCCESS;
} else {
/* FATAL error cannot do anything */
- ZIP_PMD_ERR("operation failed with error code:%d\n",
+ ZIP_PMD_ERR("operation failed with error code:%d",
zresult->s.compcode);
if (zresult->s.compcode == ZIP_COMP_E_DSTOP)
op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
@@ -571,7 +571,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->status = RTE_COMP_OP_STATUS_ERROR;
}
- ZIP_PMD_LOG(DEBUG, "written %d\n", zresult->s.totalbyteswritten);
+ ZIP_PMD_LOG(DEBUG, "written %d", zresult->s.totalbyteswritten);
/* Update op stats */
switch (op->status) {
@@ -582,7 +582,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
op->produced = zresult->s.totalbyteswritten;
break;
default:
- ZIP_PMD_ERR("stats not updated for status:%d\n",
+ ZIP_PMD_ERR("stats not updated for status:%d",
op->status);
break;
}
@@ -598,7 +598,7 @@ zip_pmd_dequeue_burst(void *queue_pair,
rte_mempool_put(qp->vf->sg_mp, qp->s_info);
}
- ZIP_PMD_LOG(DEBUG, "ops_deqd[nb_ops:%d]: %d\n", nb_ops, nb_dequeued);
+ ZIP_PMD_LOG(DEBUG, "ops_deqd[nb_ops:%d]: %d", nb_ops, nb_dequeued);
return nb_dequeued;
}
@@ -676,7 +676,7 @@ zip_pci_remove(struct rte_pci_device *pci_dev)
char compressdev_name[RTE_COMPRESSDEV_NAME_MAX_LEN];
if (pci_dev == NULL) {
- ZIP_PMD_ERR(" Invalid PCI Device\n");
+ ZIP_PMD_ERR(" Invalid PCI Device");
return -EINVAL;
}
rte_pci_device_name(&pci_dev->addr, compressdev_name,
diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 98abd41013..92e808e78c 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -29,13 +29,13 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
break;
default:
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid flush value\n");
+ ZLIB_PMD_ERR("Invalid flush value");
return;
}
if (unlikely(!strm)) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid z_stream\n");
+ ZLIB_PMD_ERR("Invalid z_stream");
return;
}
/* Update z_stream with the inputs provided by application */
@@ -98,7 +98,7 @@ process_zlib_deflate(struct rte_comp_op *op, z_stream *strm)
op->produced += strm->total_out;
break;
default:
- ZLIB_PMD_ERR("stats not updated for status:%d\n",
+ ZLIB_PMD_ERR("stats not updated for status:%d",
op->status);
}
@@ -114,7 +114,7 @@ process_zlib_inflate(struct rte_comp_op *op, z_stream *strm)
if (unlikely(!strm)) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
- ZLIB_PMD_ERR("Invalid z_stream\n");
+ ZLIB_PMD_ERR("Invalid z_stream");
return;
}
strm->next_in = rte_pktmbuf_mtod_offset(mbuf_src, uint8_t *,
@@ -184,7 +184,7 @@ process_zlib_inflate(struct rte_comp_op *op, z_stream *strm)
op->produced += strm->total_out;
break;
default:
- ZLIB_PMD_ERR("stats not produced for status:%d\n",
+ ZLIB_PMD_ERR("stats not produced for status:%d",
op->status);
}
@@ -203,7 +203,7 @@ process_zlib_op(struct zlib_qp *qp, struct rte_comp_op *op)
(op->dst.offset > rte_pktmbuf_data_len(op->m_dst))) {
op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
ZLIB_PMD_ERR("Invalid source or destination buffers or "
- "invalid Operation requested\n");
+ "invalid Operation requested");
} else {
private_xform = (struct zlib_priv_xform *)op->private_xform;
stream = &private_xform->stream;
@@ -238,7 +238,7 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
wbits = -(xform->compress.window_size);
break;
default:
- ZLIB_PMD_ERR("Compression algorithm not supported\n");
+ ZLIB_PMD_ERR("Compression algorithm not supported");
return -1;
}
/** Compression Level */
@@ -260,7 +260,7 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
if (level < RTE_COMP_LEVEL_MIN ||
level > RTE_COMP_LEVEL_MAX) {
ZLIB_PMD_ERR("Compression level %d "
- "not supported\n",
+ "not supported",
level);
return -1;
}
@@ -278,13 +278,13 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
strategy = Z_DEFAULT_STRATEGY;
break;
default:
- ZLIB_PMD_ERR("Compression strategy not supported\n");
+ ZLIB_PMD_ERR("Compression strategy not supported");
return -1;
}
if (deflateInit2(strm, level,
Z_DEFLATED, wbits,
DEF_MEM_LEVEL, strategy) != Z_OK) {
- ZLIB_PMD_ERR("Deflate init failed\n");
+ ZLIB_PMD_ERR("Deflate init failed");
return -1;
}
break;
@@ -298,12 +298,12 @@ zlib_set_stream_parameters(const struct rte_comp_xform *xform,
wbits = -(xform->decompress.window_size);
break;
default:
- ZLIB_PMD_ERR("Compression algorithm not supported\n");
+ ZLIB_PMD_ERR("Compression algorithm not supported");
return -1;
}
if (inflateInit2(strm, wbits) != Z_OK) {
- ZLIB_PMD_ERR("Inflate init failed\n");
+ ZLIB_PMD_ERR("Inflate init failed");
return -1;
}
break;
@@ -395,7 +395,7 @@ zlib_probe(struct rte_vdev_device *vdev)
retval = rte_compressdev_pmd_parse_input_args(&init_params, input_args);
if (retval < 0) {
ZLIB_PMD_LOG(ERR,
- "Failed to parse initialisation arguments[%s]\n",
+ "Failed to parse initialisation arguments[%s]",
input_args);
return -EINVAL;
}
diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c
index 445a3baa67..a530d15119 100644
--- a/drivers/compress/zlib/zlib_pmd_ops.c
+++ b/drivers/compress/zlib/zlib_pmd_ops.c
@@ -48,8 +48,8 @@ zlib_pmd_config(struct rte_compressdev *dev,
NULL, config->socket_id,
0);
if (mp == NULL) {
- ZLIB_PMD_ERR("Cannot create private xform pool on "
- "socket %d\n", config->socket_id);
+ ZLIB_PMD_ERR("Cannot create private xform pool on socket %d",
+ config->socket_id);
return -ENOMEM;
}
internals->mp = mp;
diff --git a/drivers/crypto/bcmfs/bcmfs_qp.c b/drivers/crypto/bcmfs/bcmfs_qp.c
index d1ede5e990..59e39a6c14 100644
--- a/drivers/crypto/bcmfs/bcmfs_qp.c
+++ b/drivers/crypto/bcmfs/bcmfs_qp.c
@@ -142,7 +142,7 @@ bcmfs_queue_create(struct bcmfs_queue *queue,
if (bcmfs_qp_check_queue_alignment(qp_mz->iova, align)) {
BCMFS_LOG(ERR, "Invalid alignment on queue create "
- " 0x%" PRIx64 "\n",
+ " 0x%" PRIx64,
queue->base_phys_addr);
ret = -EFAULT;
goto queue_create_err;
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index 78272d616c..d3b1e25d57 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -217,7 +217,7 @@ bcmfs_sym_qp_setup(struct rte_cryptodev *cdev, uint16_t qp_id,
bcmfs_private->fsdev->qps_in_use[qp_id] = *qp_addr;
cdev->data->queue_pairs[qp_id] = qp;
- BCMFS_LOG(NOTICE, "queue %d setup done\n", qp_id);
+ BCMFS_LOG(NOTICE, "queue %d setup done", qp_id);
return 0;
}
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.c b/drivers/crypto/bcmfs/bcmfs_sym_session.c
index 40813d1fe5..64bd4a317a 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.c
@@ -192,7 +192,7 @@ crypto_set_session_parameters(struct bcmfs_sym_session *sess,
rc = -EINVAL;
break;
default:
- BCMFS_DP_LOG(ERR, "Invalid chain order\n");
+ BCMFS_DP_LOG(ERR, "Invalid chain order");
rc = -EINVAL;
break;
}
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 6ed7a8f41c..27cdbf5ed4 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -309,7 +309,7 @@ caam_jr_prep_cdb(struct caam_jr_session *ses)
cdb = caam_jr_dma_mem_alloc(L1_CACHE_BYTES, sizeof(struct sec_cdb));
if (!cdb) {
- CAAM_JR_ERR("failed to allocate memory for cdb\n");
+ CAAM_JR_ERR("failed to allocate memory for cdb");
return -1;
}
@@ -606,7 +606,7 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring,
/*TODO for multiple ops, packets*/
ctx = container_of(current_desc, struct caam_jr_op_ctx, jobdes);
if (unlikely(sec_error_code)) {
- CAAM_JR_ERR("desc at cidx %d generated error 0x%x\n",
+ CAAM_JR_ERR("desc at cidx %d generated error 0x%x",
job_ring->cidx, sec_error_code);
hw_handle_job_ring_error(job_ring, sec_error_code);
//todo improve with exact errors
@@ -1368,7 +1368,7 @@ caam_jr_enqueue_op(struct rte_crypto_op *op, struct caam_jr_qp *qp)
}
if (unlikely(!ses->qp || ses->qp != qp)) {
- CAAM_JR_DP_DEBUG("Old:sess->qp=%p New qp = %p\n", ses->qp, qp);
+ CAAM_JR_DP_DEBUG("Old:sess->qp=%p New qp = %p", ses->qp, qp);
ses->qp = qp;
caam_jr_prep_cdb(ses);
}
@@ -1554,7 +1554,7 @@ caam_jr_cipher_init(struct rte_cryptodev *dev __rte_unused,
session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length,
RTE_CACHE_LINE_SIZE);
if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) {
- CAAM_JR_ERR("No Memory for cipher key\n");
+ CAAM_JR_ERR("No Memory for cipher key");
return -ENOMEM;
}
session->cipher_key.length = xform->cipher.key.length;
@@ -1576,7 +1576,7 @@ caam_jr_auth_init(struct rte_cryptodev *dev __rte_unused,
session->auth_key.data = rte_zmalloc(NULL, xform->auth.key.length,
RTE_CACHE_LINE_SIZE);
if (session->auth_key.data == NULL && xform->auth.key.length > 0) {
- CAAM_JR_ERR("No Memory for auth key\n");
+ CAAM_JR_ERR("No Memory for auth key");
return -ENOMEM;
}
session->auth_key.length = xform->auth.key.length;
@@ -1602,7 +1602,7 @@ caam_jr_aead_init(struct rte_cryptodev *dev __rte_unused,
session->aead_key.data = rte_zmalloc(NULL, xform->aead.key.length,
RTE_CACHE_LINE_SIZE);
if (session->aead_key.data == NULL && xform->aead.key.length > 0) {
- CAAM_JR_ERR("No Memory for aead key\n");
+ CAAM_JR_ERR("No Memory for aead key");
return -ENOMEM;
}
session->aead_key.length = xform->aead.key.length;
@@ -1755,7 +1755,7 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
RTE_CACHE_LINE_SIZE);
if (session->cipher_key.data == NULL &&
cipher_xform->key.length > 0) {
- CAAM_JR_ERR("No Memory for cipher key\n");
+ CAAM_JR_ERR("No Memory for cipher key");
return -ENOMEM;
}
@@ -1765,7 +1765,7 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
RTE_CACHE_LINE_SIZE);
if (session->auth_key.data == NULL &&
auth_xform->key.length > 0) {
- CAAM_JR_ERR("No Memory for auth key\n");
+ CAAM_JR_ERR("No Memory for auth key");
rte_free(session->cipher_key.data);
return -ENOMEM;
}
@@ -1810,11 +1810,11 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
case RTE_CRYPTO_AUTH_KASUMI_F9:
case RTE_CRYPTO_AUTH_AES_CBC_MAC:
case RTE_CRYPTO_AUTH_ZUC_EIA3:
- CAAM_JR_ERR("Crypto: Unsupported auth alg %u\n",
+ CAAM_JR_ERR("Crypto: Unsupported auth alg %u",
auth_xform->algo);
goto out;
default:
- CAAM_JR_ERR("Crypto: Undefined Auth specified %u\n",
+ CAAM_JR_ERR("Crypto: Undefined Auth specified %u",
auth_xform->algo);
goto out;
}
@@ -1834,11 +1834,11 @@ caam_jr_set_ipsec_session(__rte_unused struct rte_cryptodev *dev,
case RTE_CRYPTO_CIPHER_3DES_ECB:
case RTE_CRYPTO_CIPHER_AES_ECB:
case RTE_CRYPTO_CIPHER_KASUMI_F8:
- CAAM_JR_ERR("Crypto: Unsupported Cipher alg %u\n",
+ CAAM_JR_ERR("Crypto: Unsupported Cipher alg %u",
cipher_xform->algo);
goto out;
default:
- CAAM_JR_ERR("Crypto: Undefined Cipher specified %u\n",
+ CAAM_JR_ERR("Crypto: Undefined Cipher specified %u",
cipher_xform->algo);
goto out;
}
@@ -1962,7 +1962,7 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
NULL, NULL, NULL, NULL,
SOCKET_ID_ANY, 0);
if (!internals->ctx_pool) {
- CAAM_JR_ERR("%s create failed\n", str);
+ CAAM_JR_ERR("%s create failed", str);
return -ENOMEM;
}
} else
@@ -2180,7 +2180,7 @@ init_job_ring(void *reg_base_addr, int irq_id)
}
}
if (job_ring == NULL) {
- CAAM_JR_ERR("No free job ring\n");
+ CAAM_JR_ERR("No free job ring");
return NULL;
}
@@ -2301,7 +2301,7 @@ caam_jr_dev_init(const char *name,
job_ring->uio_fd);
if (!dev->data->dev_private) {
- CAAM_JR_ERR("Ring memory allocation failed\n");
+ CAAM_JR_ERR("Ring memory allocation failed");
goto cleanup2;
}
@@ -2334,7 +2334,7 @@ caam_jr_dev_init(const char *name,
security_instance = rte_malloc("caam_jr",
sizeof(struct rte_security_ctx), 0);
if (security_instance == NULL) {
- CAAM_JR_ERR("memory allocation failed\n");
+ CAAM_JR_ERR("memory allocation failed");
//todo error handling.
goto cleanup2;
}
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index 0dcf971a15..8956f7750d 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -338,7 +338,7 @@ free_job_ring(int uio_fd)
}
if (job_ring == NULL) {
- CAAM_JR_ERR("JR not available for fd = %x\n", uio_fd);
+ CAAM_JR_ERR("JR not available for fd = %x", uio_fd);
return;
}
@@ -378,7 +378,7 @@ uio_job_ring *config_job_ring(void)
}
if (job_ring == NULL) {
- CAAM_JR_ERR("No free job ring\n");
+ CAAM_JR_ERR("No free job ring");
return NULL;
}
@@ -441,7 +441,7 @@ sec_configure(void)
dir->d_name, "name", uio_name);
CAAM_JR_INFO("sec device uio name: %s", uio_name);
if (ret != 0) {
- CAAM_JR_ERR("file_read_first_line failed\n");
+ CAAM_JR_ERR("file_read_first_line failed");
closedir(d);
return -1;
}
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 0c800fc350..5088d8ded6 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -362,7 +362,7 @@ ccp_find_lsb_regions(struct ccp_queue *cmd_q, uint64_t status)
if (ccp_get_bit(&cmd_q->lsbmask, j))
weight++;
- CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu\n",
+ CCP_LOG_DBG("Queue %d can access %d LSB regions of mask %lu",
(int)cmd_q->id, weight, cmd_q->lsbmask);
return weight ? 0 : -EINVAL;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ca99bc6f42..700e141667 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -227,7 +227,7 @@ cryptodev_ccp_create(const char *name,
}
cryptodev_cnt++;
- CCP_LOG_DBG("CCP : Crypto device count = %d\n", cryptodev_cnt);
+ CCP_LOG_DBG("CCP : Crypto device count = %d", cryptodev_cnt);
dev->device = &pci_dev->device;
dev->device->driver = &pci_drv->driver;
dev->driver_id = ccp_cryptodev_driver_id;
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index dbd36a8a54..32415e815e 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1953,7 +1953,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
sess->cpt_op |= ROC_SE_OP_CIPHER_DECRYPT;
sess->cpt_op |= ROC_SE_OP_AUTH_VERIFY;
} else {
- plt_dp_err("Unknown aead operation\n");
+ plt_dp_err("Unknown aead operation");
return -1;
}
switch (aead_form->algo) {
@@ -2037,7 +2037,7 @@ fill_sm_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *ses
sess->cpt_op |= ROC_SE_OP_CIPHER_DECRYPT;
sess->roc_se_ctx.template_w4.s.opcode_minor = ROC_SE_FC_MINOR_OP_DECRYPT;
} else {
- plt_dp_err("Unknown cipher operation\n");
+ plt_dp_err("Unknown cipher operation");
return -1;
}
@@ -2114,7 +2114,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
ROC_SE_FC_MINOR_OP_HMAC_FIRST;
}
} else {
- plt_dp_err("Unknown cipher operation\n");
+ plt_dp_err("Unknown cipher operation");
return -1;
}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c1f7181d55..99b6359e52 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1146,7 +1146,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d"
- " data_off: 0x%x\n",
+ " data_off: 0x%x",
data_offset,
data_len,
sess->iv.length,
@@ -1172,7 +1172,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SET_FLE_FIN(sge);
DPAA2_SEC_DP_DEBUG(
- "CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d\n",
+ "CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -1212,7 +1212,7 @@ build_cipher_sg_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER SG: fdaddr =%" PRIx64 " bpid =%d meta =%d"
- " off =%d, len =%d\n",
+ " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_BPID(fd),
rte_dpaa2_bpid_info[bpid].meta_data_size,
@@ -1292,7 +1292,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER: cipher_off: 0x%x/length %d, ivlen=%d,"
- " data_off: 0x%x\n",
+ " data_off: 0x%x",
data_offset,
data_len,
sess->iv.length,
@@ -1303,7 +1303,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
fle->length = data_len + sess->iv.length;
DPAA2_SEC_DP_DEBUG(
- "CIPHER: 1 - flc = %p, fle = %p FLEaddr = %x-%x, length %d\n",
+ "CIPHER: 1 - flc = %p, fle = %p FLEaddr = %x-%x, length %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -1326,7 +1326,7 @@ build_cipher_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
DPAA2_SEC_DP_DEBUG(
"CIPHER: fdaddr =%" PRIx64 " bpid =%d meta =%d"
- " off =%d, len =%d\n",
+ " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_BPID(fd),
rte_dpaa2_bpid_info[bpid].meta_data_size,
@@ -1348,12 +1348,12 @@ build_sec_fd(struct rte_crypto_op *op,
} else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
sess = SECURITY_GET_SESS_PRIV(op->sym->session);
} else {
- DPAA2_SEC_DP_ERR("Session type invalid\n");
+ DPAA2_SEC_DP_ERR("Session type invalid");
return -ENOTSUP;
}
if (!sess) {
- DPAA2_SEC_DP_ERR("Session not available\n");
+ DPAA2_SEC_DP_ERR("Session not available");
return -EINVAL;
}
@@ -1447,7 +1447,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1476,7 +1476,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
bpid = mempool_to_bpid(mb_pool);
ret = build_sec_fd(*ops, &fd_arr[loop], bpid, dpaa2_qp);
if (ret) {
- DPAA2_SEC_DP_DEBUG("FD build failed\n");
+ DPAA2_SEC_DP_DEBUG("FD build failed");
goto skip_tx;
}
ops++;
@@ -1494,7 +1494,7 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
num_tx += loop;
nb_ops -= loop;
- DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
+ DPAA2_SEC_DP_DEBUG("Enqueue fail");
/* freeing the fle buffers */
while (loop < frames_to_send) {
free_fle(&fd_arr[loop],
@@ -1570,7 +1570,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)
fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
- DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x\n",
+ DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x",
fle->addr_hi, fle->addr_lo, fle->fin_bpid_offset);
/* we are using the first FLE entry to store Mbuf.
@@ -1603,7 +1603,7 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, struct dpaa2_sec_qp *qp)
}
DPAA2_SEC_DP_DEBUG("mbuf %p BMAN buf addr %p,"
- " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d\n",
+ " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d",
(void *)dst,
dst->buf_addr,
DPAA2_GET_FD_ADDR(fd),
@@ -1825,7 +1825,7 @@ dpaa2_sec_enqueue_burst_ordered(void *qp, struct rte_crypto_op **ops,
bpid = mempool_to_bpid(mb_pool);
ret = build_sec_fd(*ops, &fd_arr[loop], bpid, dpaa2_qp);
if (ret) {
- DPAA2_SEC_DP_DEBUG("FD build failed\n");
+ DPAA2_SEC_DP_DEBUG("FD build failed");
goto skip_tx;
}
ops++;
@@ -1842,7 +1842,7 @@ dpaa2_sec_enqueue_burst_ordered(void *qp, struct rte_crypto_op **ops,
if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
num_tx += loop;
nb_ops -= loop;
- DPAA2_SEC_DP_DEBUG("Enqueue fail\n");
+ DPAA2_SEC_DP_DEBUG("Enqueue fail");
/* freeing the fle buffers */
while (loop < frames_to_send) {
free_fle(&fd_arr[loop],
@@ -1885,7 +1885,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1938,7 +1938,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely(
(status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_SEC_DP_DEBUG("No frame is delivered\n");
+ DPAA2_SEC_DP_DEBUG("No frame is delivered");
continue;
}
}
@@ -1949,7 +1949,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
if (unlikely(fd->simple.frc)) {
/* TODO Parse SEC errors */
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_NO_DUMP) {
- DPAA2_SEC_DP_ERR("SEC returned Error - %x\n",
+ DPAA2_SEC_DP_ERR("SEC returned Error - %x",
fd->simple.frc);
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_ERR_DUMP)
dpaa2_sec_dump(ops[num_rx], stdout);
@@ -1967,7 +1967,7 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
dpaa2_qp->rx_vq.rx_pkts += num_rx;
- DPAA2_SEC_DP_DEBUG("SEC RX pkts %d err pkts %" PRIu64 "\n", num_rx,
+ DPAA2_SEC_DP_DEBUG("SEC RX pkts %d err pkts %" PRIu64, num_rx,
dpaa2_qp->rx_vq.err_pkts);
/*Return the total number of packets received to DPAA2 app*/
return num_rx;
@@ -2017,7 +2017,7 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
if (qp_conf->nb_descriptors < (2 * FLE_POOL_CACHE_SIZE)) {
DPAA2_SEC_ERR("Minimum supported nb_descriptors %d,"
- " but given %d\n", (2 * FLE_POOL_CACHE_SIZE),
+ " but given %d", (2 * FLE_POOL_CACHE_SIZE),
qp_conf->nb_descriptors);
return -EINVAL;
}
@@ -2544,7 +2544,7 @@ dpaa2_sec_aead_init(struct rte_crypto_sym_xform *xform,
#ifdef CAAM_DESC_DEBUG
int i;
for (i = 0; i < bufsize; i++)
- DPAA2_SEC_DEBUG("DESC[%d]:0x%x\n",
+ DPAA2_SEC_DEBUG("DESC[%d]:0x%x",
i, priv->flc_desc[0].desc[i]);
#endif
return ret;
@@ -4254,7 +4254,7 @@ check_devargs_handler(const char *key, const char *value,
if (dpaa2_sec_dp_dump > DPAA2_SEC_DP_FULL_DUMP) {
DPAA2_SEC_WARN("WARN: DPAA2_SEC_DP_DUMP_LEVEL is not "
"supported, changing to FULL error"
- " prints\n");
+ " prints");
dpaa2_sec_dp_dump = DPAA2_SEC_DP_FULL_DUMP;
}
} else
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
index 4754b9d6f8..883584a6e2 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c
@@ -605,7 +605,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
flc = &priv->flc_desc[0].flc;
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d\n",
+ "RAW CIPHER SG: cipher_off: 0x%x/length %d, ivlen=%d",
data_offset,
data_len,
sess->iv.length);
@@ -642,7 +642,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
DPAA2_SET_FLE_FIN(sge);
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d\n",
+ "RAW CIPHER SG: 1 - flc = %p, fle = %p FLEaddr = %x-%x, len %d",
flc, fle, fle->addr_hi, fle->addr_lo,
fle->length);
@@ -678,7 +678,7 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "RAW CIPHER SG: fdaddr =%" PRIx64 " off =%d, len =%d\n",
+ "RAW CIPHER SG: fdaddr =%" PRIx64 " off =%d, len =%d",
DPAA2_GET_FD_ADDR(fd),
DPAA2_GET_FD_OFFSET(fd),
DPAA2_GET_FD_LEN(fd));
@@ -721,7 +721,7 @@ dpaa2_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -811,7 +811,7 @@ sec_fd_to_userdata(const struct qbman_fd *fd)
void *userdata;
fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
- DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x\n",
+ DPAA2_SEC_DP_DEBUG("FLE addr = %x - %x, offset = %x",
fle->addr_hi, fle->addr_lo, fle->fin_bpid_offset);
userdata = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));
/* free the fle memory */
@@ -847,7 +847,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_SEC_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -900,7 +900,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely(
(status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_SEC_DP_DEBUG("No frame is delivered\n");
+ DPAA2_SEC_DP_DEBUG("No frame is delivered");
continue;
}
}
@@ -929,7 +929,7 @@ dpaa2_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
*dequeue_status = 1;
*n_success = num_rx;
- DPAA2_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA2_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
/*Return the total number of packets received to DPAA2 app*/
return num_rx;
}
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 1ddad6944e..225bf950e9 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -102,7 +102,7 @@ ern_sec_fq_handler(struct qman_portal *qm __rte_unused,
struct qman_fq *fq,
const struct qm_mr_entry *msg)
{
- DPAA_SEC_DP_ERR("sec fq %d error, RC = %x, seqnum = %x\n",
+ DPAA_SEC_DP_ERR("sec fq %d error, RC = %x, seqnum = %x",
fq->fqid, msg->ern.rc, msg->ern.seqnum);
}
@@ -851,7 +851,7 @@ dpaa_sec_deq(struct dpaa_sec_qp *qp, struct rte_crypto_op **ops, int nb_ops)
op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
} else {
if (dpaa_sec_dp_dump > DPAA_SEC_DP_NO_DUMP) {
- DPAA_SEC_DP_WARN("SEC return err:0x%x\n",
+ DPAA_SEC_DP_WARN("SEC return err:0x%x",
ctx->fd_status);
if (dpaa_sec_dp_dump > DPAA_SEC_DP_ERR_DUMP)
dpaa_sec_dump(ctx, qp, stdout);
@@ -1946,7 +1946,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
} else if (unlikely(ses->qp[rte_lcore_id() %
MAX_DPAA_CORES] != qp)) {
DPAA_SEC_DP_ERR("Old:sess->qp = %p"
- " New qp = %p\n",
+ " New qp = %p",
ses->qp[rte_lcore_id() %
MAX_DPAA_CORES], qp);
frames_to_send = loop;
@@ -2056,7 +2056,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
fd->cmd = 0x80000000 |
*((uint32_t *)((uint8_t *)op +
ses->pdcp.hfn_ovd_offset));
- DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u\n",
+ DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u",
*((uint32_t *)((uint8_t *)op +
ses->pdcp.hfn_ovd_offset)),
ses->pdcp.hfn_ovd);
@@ -2097,7 +2097,7 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
dpaa_qp->rx_pkts += num_rx;
dpaa_qp->rx_errs += nb_ops - num_rx;
- DPAA_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
return num_rx;
}
@@ -2160,7 +2160,7 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
NULL, NULL, NULL, NULL,
SOCKET_ID_ANY, 0);
if (!qp->ctx_pool) {
- DPAA_SEC_ERR("%s create failed\n", str);
+ DPAA_SEC_ERR("%s create failed", str);
return -ENOMEM;
}
} else
@@ -2466,7 +2466,7 @@ dpaa_sec_aead_init(struct rte_cryptodev *dev __rte_unused,
session->aead_key.data = rte_zmalloc(NULL, xform->aead.key.length,
RTE_CACHE_LINE_SIZE);
if (session->aead_key.data == NULL && xform->aead.key.length > 0) {
- DPAA_SEC_ERR("No Memory for aead key\n");
+ DPAA_SEC_ERR("No Memory for aead key");
return -ENOMEM;
}
session->aead_key.length = xform->aead.key.length;
@@ -2517,9 +2517,8 @@ dpaa_sec_detach_rxq(struct dpaa_sec_dev_private *qi, struct qman_fq *fq)
if (&qi->inq[i] == fq) {
ret = qman_retire_fq(fq, NULL);
if (ret != 0)
- DPAA_SEC_ERR("Queue %d is not retired"
- " err: %d\n", fq->fqid,
- ret);
+ DPAA_SEC_ERR("Queue %d is not retired err: %d",
+ fq->fqid, ret);
qman_oos_fq(fq);
qi->inq_attach[i] = 0;
return 0;
@@ -3475,7 +3474,7 @@ dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
qp->outq.cb.dqrr_dpdk_cb = dpaa_sec_process_atomic_event;
break;
case RTE_SCHED_TYPE_ORDERED:
- DPAA_SEC_ERR("Ordered queue schedule type is not supported\n");
+ DPAA_SEC_ERR("Ordered queue schedule type is not supported");
return -ENOTSUP;
default:
opts.fqd.fq_ctrl |= QM_FQCTRL_AVOIDBLOCK;
@@ -3574,7 +3573,7 @@ check_devargs_handler(__rte_unused const char *key, const char *value,
dpaa_sec_dp_dump = atoi(value);
if (dpaa_sec_dp_dump > DPAA_SEC_DP_FULL_DUMP) {
DPAA_SEC_WARN("WARN: DPAA_SEC_DP_DUMP_LEVEL is not "
- "supported, changing to FULL error prints\n");
+ "supported, changing to FULL error prints");
dpaa_sec_dp_dump = DPAA_SEC_DP_FULL_DUMP;
}
@@ -3637,7 +3636,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
ret = munmap(internals->sec_hw, MAP_SIZE);
if (ret)
- DPAA_SEC_WARN("munmap failed\n");
+ DPAA_SEC_WARN("munmap failed");
close(map_fd);
cryptodev->driver_id = dpaa_cryptodev_driver_id;
@@ -3705,7 +3704,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
return 0;
init_error:
- DPAA_SEC_ERR("driver %s: create failed\n", cryptodev->data->name);
+ DPAA_SEC_ERR("driver %s: create failed", cryptodev->data->name);
rte_free(cryptodev->security_ctx);
return -EFAULT;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
index f8c85b6528..60dbaee4ec 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
@@ -30,7 +30,7 @@ extern int dpaa_logtype_sec;
/* DP Logs, toggled out at compile time if level lower than current level */
#define DPAA_SEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_SEC, fmt, ## args)
+ RTE_LOG_DP_LINE(level, DPAA_SEC, fmt, ## args)
#define DPAA_SEC_DP_DEBUG(fmt, args...) \
DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
index ce49c4996f..f62c803894 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c
@@ -761,7 +761,7 @@ build_dpaa_raw_proto_sg(uint8_t *drv_ctx,
fd->cmd = 0x80000000 |
*((uint32_t *)((uint8_t *)userdata +
ses->pdcp.hfn_ovd_offset));
- DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u\n",
+ DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u",
*((uint32_t *)((uint8_t *)userdata +
ses->pdcp.hfn_ovd_offset)),
ses->pdcp.hfn_ovd);
@@ -806,7 +806,7 @@ dpaa_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx,
} else if (unlikely(ses->qp[rte_lcore_id() %
MAX_DPAA_CORES] != dpaa_qp)) {
DPAA_SEC_DP_ERR("Old:sess->qp = %p"
- " New qp = %p\n",
+ " New qp = %p",
ses->qp[rte_lcore_id() %
MAX_DPAA_CORES], dpaa_qp);
frames_to_send = loop;
@@ -955,7 +955,7 @@ dpaa_sec_raw_dequeue_burst(void *qp_data, uint8_t *drv_ctx,
*dequeue_status = 1;
*n_success = num_rx;
- DPAA_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx);
+ DPAA_SEC_DP_DEBUG("SEC Received %d Packets", num_rx);
return num_rx;
}
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.c b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
index f485d130b6..0d2538832d 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.c
@@ -165,7 +165,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
rte_cryptodev_pmd_probing_finish(dev);
- IPSEC_MB_LOG(INFO, "IPSec Multi-buffer library version used: %s\n",
+ IPSEC_MB_LOG(INFO, "IPSec Multi-buffer library version used: %s",
imb_get_version_str());
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
@@ -176,7 +176,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev,
if (retval)
IPSEC_MB_LOG(ERR,
- "IPSec Multi-buffer register MP request failed.\n");
+ "IPSec Multi-buffer register MP request failed.");
}
return retval;
}
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index be6dbe9b1b..d42acd913c 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -198,7 +198,7 @@ alloc_init_mb_mgr(void)
IMB_MGR *mb_mgr = alloc_mb_mgr(0);
if (unlikely(mb_mgr == NULL)) {
- IPSEC_MB_LOG(ERR, "Failed to allocate IMB_MGR data\n");
+ IPSEC_MB_LOG(ERR, "Failed to allocate IMB_MGR data");
return NULL;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index ef4228bd38..f3633091a9 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -113,7 +113,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
uint16_t xcbc_mac_digest_len =
get_truncated_digest_byte_length(IMB_AUTH_AES_XCBC);
if (sess->auth.req_digest_len != xcbc_mac_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -136,7 +136,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
get_digest_byte_length(IMB_AUTH_AES_CMAC);
if (sess->auth.req_digest_len > cmac_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
/*
@@ -171,7 +171,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len >
get_digest_byte_length(IMB_AUTH_AES_GMAC)) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -198,7 +198,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
sess->template_job.key_len_in_bytes = IMB_KEY_256_BYTES;
break;
default:
- IPSEC_MB_LOG(ERR, "Invalid authentication key length\n");
+ IPSEC_MB_LOG(ERR, "Invalid authentication key length");
return -EINVAL;
}
sess->template_job.u.GMAC._key = &sess->cipher.gcm_key;
@@ -211,7 +211,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
sess->template_job.hash_alg = IMB_AUTH_ZUC_EIA3_BITLEN;
if (sess->auth.req_digest_len != 4) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
} else if (xform->auth.key.length == 32) {
@@ -223,11 +223,11 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
#else
if (sess->auth.req_digest_len != 4) {
#endif
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
} else {
- IPSEC_MB_LOG(ERR, "Invalid authentication key length\n");
+ IPSEC_MB_LOG(ERR, "Invalid authentication key length");
return -EINVAL;
}
@@ -243,7 +243,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
get_truncated_digest_byte_length(
IMB_AUTH_SNOW3G_UIA2_BITLEN);
if (sess->auth.req_digest_len != snow3g_uia2_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -258,7 +258,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
uint16_t kasumi_f9_digest_len =
get_truncated_digest_byte_length(IMB_AUTH_KASUMI_UIA1);
if (sess->auth.req_digest_len != kasumi_f9_digest_len) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
sess->template_job.auth_tag_output_len_in_bytes = sess->auth.req_digest_len;
@@ -389,7 +389,7 @@ aesni_mb_set_session_auth_parameters(IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len > full_digest_size ||
sess->auth.req_digest_len == 0) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
@@ -725,7 +725,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
(sess->auth.req_digest_len & 1) == 1) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -761,7 +761,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
/* GCM digest size must be between 1 and 16 */
if (sess->auth.req_digest_len == 0 ||
sess->auth.req_digest_len > 16) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -782,7 +782,7 @@ aesni_mb_set_session_aead_parameters(const IMB_MGR *mb_mgr,
sess->template_job.enc_keys = sess->cipher.expanded_aes_keys.encode;
sess->template_job.dec_keys = sess->cipher.expanded_aes_keys.decode;
if (sess->auth.req_digest_len != 16) {
- IPSEC_MB_LOG(ERR, "Invalid digest size\n");
+ IPSEC_MB_LOG(ERR, "Invalid digest size");
return -EINVAL;
}
break;
@@ -1234,7 +1234,7 @@ handle_sgl_linear(IMB_JOB *job, struct rte_crypto_op *op, uint32_t dst_offset,
total_len = sgl_linear_cipher_auth_len(job, &auth_len);
linear_buf = rte_zmalloc(NULL, total_len + job->auth_tag_output_len_in_bytes, 0);
if (linear_buf == NULL) {
- IPSEC_MB_LOG(ERR, "Error allocating memory for SGL Linear Buffer\n");
+ IPSEC_MB_LOG(ERR, "Error allocating memory for SGL Linear Buffer");
return -1;
}
diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g.c b/drivers/crypto/ipsec_mb/pmd_snow3g.c
index a96779f059..65f0e5c568 100644
--- a/drivers/crypto/ipsec_mb/pmd_snow3g.c
+++ b/drivers/crypto/ipsec_mb/pmd_snow3g.c
@@ -186,7 +186,7 @@ process_snow3g_cipher_op_bit(struct ipsec_mb_qp *qp,
src = rte_pktmbuf_mtod(op->sym->m_src, uint8_t *);
if (op->sym->m_dst == NULL) {
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
- IPSEC_MB_LOG(ERR, "bit-level in-place not supported\n");
+ IPSEC_MB_LOG(ERR, "bit-level in-place not supported");
return 0;
}
length_in_bits = op->sym->cipher.data.length;
@@ -317,7 +317,7 @@ process_ops(struct rte_crypto_op **ops, struct snow3g_session *session,
IPSEC_MB_LOG(ERR,
"PMD supports only contiguous mbufs, "
"op (%p) provides noncontiguous mbuf as "
- "source/destination buffer.\n", ops[i]);
+ "source/destination buffer.", ops[i]);
ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return 0;
}
diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
index 6e2afde34f..3104e6d31e 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
+++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h
@@ -211,7 +211,7 @@ otx_cpt_ring_dbell(struct cpt_instance *instance, uint16_t count)
static __rte_always_inline void *
get_cpt_inst(struct command_queue *cqueue)
{
- CPT_LOG_DP_DEBUG("CPT queue idx %u\n", cqueue->idx);
+ CPT_LOG_DP_DEBUG("CPT queue idx %u", cqueue->idx);
return &cqueue->qhead[cqueue->idx * CPT_INST_SIZE];
}
@@ -305,9 +305,9 @@ check_nb_command_id(struct cpt_request_info *user_req,
" error, MC completion code : 0x%x", user_req,
ret);
}
- CPT_LOG_DP_DEBUG("MC status %.8x\n",
+ CPT_LOG_DP_DEBUG("MC status %.8x",
*((volatile uint32_t *)user_req->alternate_caddr));
- CPT_LOG_DP_DEBUG("HW status %.8x\n",
+ CPT_LOG_DP_DEBUG("HW status %.8x",
*((volatile uint32_t *)user_req->completion_addr));
} else if ((cptres->s8x.compcode == CPT_8X_COMP_E_SWERR) ||
(cptres->s8x.compcode == CPT_8X_COMP_E_FAULT)) {
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 101111e85b..e10a172f46 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -57,13 +57,13 @@ static void ossl_legacy_provider_load(void)
/* Load Multiple providers into the default (NULL) library context */
legacy = OSSL_PROVIDER_load(NULL, "legacy");
if (legacy == NULL) {
- OPENSSL_LOG(ERR, "Failed to load Legacy provider\n");
+ OPENSSL_LOG(ERR, "Failed to load Legacy provider");
return;
}
deflt = OSSL_PROVIDER_load(NULL, "default");
if (deflt == NULL) {
- OPENSSL_LOG(ERR, "Failed to load Default provider\n");
+ OPENSSL_LOG(ERR, "Failed to load Default provider");
OSSL_PROVIDER_unload(legacy);
return;
}
@@ -2123,7 +2123,7 @@ process_openssl_dsa_sign_op_evp(struct rte_crypto_op *cop,
dsa_sign_data_p = (const unsigned char *)dsa_sign_data;
DSA_SIG *sign = d2i_DSA_SIG(NULL, &dsa_sign_data_p, outlen);
if (!sign) {
- OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, "%s:%d", __func__, __LINE__);
OPENSSL_free(dsa_sign_data);
goto err_dsa_sign;
} else {
@@ -2168,7 +2168,7 @@ process_openssl_dsa_verify_op_evp(struct rte_crypto_op *cop,
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
if (!param_bld) {
- OPENSSL_LOG(ERR, " %s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, " %s:%d", __func__, __LINE__);
return -1;
}
@@ -2246,7 +2246,7 @@ process_openssl_dsa_sign_op(struct rte_crypto_op *cop,
dsa);
if (sign == NULL) {
- OPENSSL_LOG(ERR, "%s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, "%s:%d", __func__, __LINE__);
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
} else {
const BIGNUM *r = NULL, *s = NULL;
@@ -2275,7 +2275,7 @@ process_openssl_dsa_verify_op(struct rte_crypto_op *cop,
BIGNUM *pub_key = NULL;
if (sign == NULL) {
- OPENSSL_LOG(ERR, " %s:%d\n", __func__, __LINE__);
+ OPENSSL_LOG(ERR, " %s:%d", __func__, __LINE__);
cop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
return -1;
}
@@ -2352,7 +2352,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (!OSSL_PARAM_BLD_push_BN(param_bld_peer, OSSL_PKEY_PARAM_PUB_KEY,
pub_key)) {
- OPENSSL_LOG(ERR, "Failed to set public key\n");
+ OPENSSL_LOG(ERR, "Failed to set public key");
OSSL_PARAM_BLD_free(param_bld_peer);
BN_free(pub_key);
return ret;
@@ -2397,7 +2397,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (!OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
priv_key)) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
EVP_PKEY_CTX_free(peer_ctx);
OSSL_PARAM_free(params_peer);
BN_free(pub_key);
@@ -2423,7 +2423,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
goto err_dh;
if (op->ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) {
- OPENSSL_LOG(DEBUG, "%s:%d updated pub key\n", __func__, __LINE__);
+ OPENSSL_LOG(DEBUG, "%s:%d updated pub key", __func__, __LINE__);
if (!EVP_PKEY_get_bn_param(dhpkey, OSSL_PKEY_PARAM_PUB_KEY, &pub_key))
goto err_dh;
/* output public key */
@@ -2432,7 +2432,7 @@ process_openssl_dh_op_evp(struct rte_crypto_op *cop,
if (op->ke_type == RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE) {
- OPENSSL_LOG(DEBUG, "%s:%d updated priv key\n", __func__, __LINE__);
+ OPENSSL_LOG(DEBUG, "%s:%d updated priv key", __func__, __LINE__);
if (!EVP_PKEY_get_bn_param(dhpkey, OSSL_PKEY_PARAM_PRIV_KEY, &priv_key))
goto err_dh;
@@ -2527,7 +2527,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
}
ret = set_dh_priv_key(dh_key, priv_key);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
BN_free(peer_key);
BN_free(priv_key);
@@ -2574,7 +2574,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
}
ret = set_dh_priv_key(dh_key, priv_key);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to set private key\n");
+ OPENSSL_LOG(ERR, "Failed to set private key");
cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
BN_free(priv_key);
return 0;
@@ -2596,7 +2596,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
if (asym_op->dh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_GENERATE) {
const BIGNUM *pub_key = NULL;
- OPENSSL_LOG(DEBUG, "%s:%d update public key\n",
+ OPENSSL_LOG(DEBUG, "%s:%d update public key",
__func__, __LINE__);
/* get the generated keys */
@@ -2610,7 +2610,7 @@ process_openssl_dh_op(struct rte_crypto_op *cop,
if (asym_op->dh.ke_type == RTE_CRYPTO_ASYM_KE_PRIV_KEY_GENERATE) {
const BIGNUM *priv_key = NULL;
- OPENSSL_LOG(DEBUG, "%s:%d updated priv key\n",
+ OPENSSL_LOG(DEBUG, "%s:%d updated priv key",
__func__, __LINE__);
/* get the generated keys */
@@ -2719,7 +2719,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
default:
cop->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
OPENSSL_LOG(ERR,
- "rsa pad type not supported %d\n", pad);
+ "rsa pad type not supported %d", pad);
return ret;
}
@@ -2746,7 +2746,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
op->rsa.cipher.length = outlen;
OPENSSL_LOG(DEBUG,
- "length of encrypted text %zu\n", outlen);
+ "length of encrypted text %zu", outlen);
break;
case RTE_CRYPTO_ASYM_OP_DECRYPT:
@@ -2770,7 +2770,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
goto err_rsa;
op->rsa.message.length = outlen;
- OPENSSL_LOG(DEBUG, "length of decrypted text %zu\n", outlen);
+ OPENSSL_LOG(DEBUG, "length of decrypted text %zu", outlen);
break;
case RTE_CRYPTO_ASYM_OP_SIGN:
@@ -2825,7 +2825,7 @@ process_openssl_rsa_op_evp(struct rte_crypto_op *cop,
OPENSSL_LOG(DEBUG,
"Length of public_decrypt %zu "
- "length of message %zd\n",
+ "length of message %zd",
outlen, op->rsa.message.length);
if (CRYPTO_memcmp(tmp, op->rsa.message.data,
op->rsa.message.length)) {
@@ -3097,7 +3097,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
default:
cop->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
OPENSSL_LOG(ERR,
- "rsa pad type not supported %d\n", pad);
+ "rsa pad type not supported %d", pad);
return 0;
}
@@ -3112,7 +3112,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
if (ret > 0)
op->rsa.cipher.length = ret;
OPENSSL_LOG(DEBUG,
- "length of encrypted text %d\n", ret);
+ "length of encrypted text %d", ret);
break;
case RTE_CRYPTO_ASYM_OP_DECRYPT:
@@ -3150,7 +3150,7 @@ process_openssl_rsa_op(struct rte_crypto_op *cop,
OPENSSL_LOG(DEBUG,
"Length of public_decrypt %d "
- "length of message %zd\n",
+ "length of message %zd",
ret, op->rsa.message.length);
if ((ret <= 0) || (CRYPTO_memcmp(tmp, op->rsa.message.data,
op->rsa.message.length))) {
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1bbb855a59..b7b612fc57 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -892,7 +892,7 @@ static int openssl_set_asym_session_parameters(
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
OSSL_PARAM_BLD * param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_rsa;
}
@@ -900,7 +900,7 @@ static int openssl_set_asym_session_parameters(
|| !OSSL_PARAM_BLD_push_BN(param_bld,
OSSL_PKEY_PARAM_RSA_E, e)) {
OSSL_PARAM_BLD_free(param_bld);
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_rsa;
}
@@ -1033,14 +1033,14 @@ static int openssl_set_asym_session_parameters(
ret = set_rsa_params(rsa, p, q);
if (ret) {
OPENSSL_LOG(ERR,
- "failed to set rsa params\n");
+ "failed to set rsa params");
RSA_free(rsa);
goto err_rsa;
}
ret = set_rsa_crt_params(rsa, dmp1, dmq1, iqmp);
if (ret) {
OPENSSL_LOG(ERR,
- "failed to set crt params\n");
+ "failed to set crt params");
RSA_free(rsa);
/*
* set already populated params to NULL
@@ -1053,7 +1053,7 @@ static int openssl_set_asym_session_parameters(
ret = set_rsa_keys(rsa, n, e, d);
if (ret) {
- OPENSSL_LOG(ERR, "Failed to load rsa keys\n");
+ OPENSSL_LOG(ERR, "Failed to load rsa keys");
RSA_free(rsa);
return ret;
}
@@ -1080,7 +1080,7 @@ static int openssl_set_asym_session_parameters(
BN_CTX *ctx = BN_CTX_new();
if (ctx == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
return ret;
}
BN_CTX_start(ctx);
@@ -1111,7 +1111,7 @@ static int openssl_set_asym_session_parameters(
BN_CTX *ctx = BN_CTX_new();
if (ctx == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
return ret;
}
BN_CTX_start(ctx);
@@ -1152,7 +1152,7 @@ static int openssl_set_asym_session_parameters(
OSSL_PARAM_BLD *param_bld = NULL;
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dh;
}
if ((!OSSL_PARAM_BLD_push_utf8_string(param_bld,
@@ -1168,7 +1168,7 @@ static int openssl_set_asym_session_parameters(
OSSL_PARAM_BLD *param_bld_peer = NULL;
param_bld_peer = OSSL_PARAM_BLD_new();
if (!param_bld_peer) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
OSSL_PARAM_BLD_free(param_bld);
goto err_dh;
}
@@ -1203,7 +1203,7 @@ static int openssl_set_asym_session_parameters(
dh = DH_new();
if (dh == NULL) {
OPENSSL_LOG(ERR,
- "failed to allocate resources\n");
+ "failed to allocate resources");
goto err_dh;
}
ret = set_dh_params(dh, p, g);
@@ -1217,7 +1217,7 @@ static int openssl_set_asym_session_parameters(
break;
err_dh:
- OPENSSL_LOG(ERR, " failed to set dh params\n");
+ OPENSSL_LOG(ERR, " failed to set dh params");
#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
BN_free(*p);
BN_free(*g);
@@ -1263,7 +1263,7 @@ static int openssl_set_asym_session_parameters(
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dsa;
}
@@ -1273,7 +1273,7 @@ static int openssl_set_asym_session_parameters(
|| !OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
*priv_key)) {
OSSL_PARAM_BLD_free(param_bld);
- OPENSSL_LOG(ERR, "failed to allocate resources\n");
+ OPENSSL_LOG(ERR, "failed to allocate resources");
goto err_dsa;
}
asym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_DSA;
@@ -1313,14 +1313,14 @@ static int openssl_set_asym_session_parameters(
DSA *dsa = DSA_new();
if (dsa == NULL) {
OPENSSL_LOG(ERR,
- " failed to allocate resources\n");
+ " failed to allocate resources");
goto err_dsa;
}
ret = set_dsa_params(dsa, p, q, g);
if (ret) {
DSA_free(dsa);
- OPENSSL_LOG(ERR, "Failed to dsa params\n");
+ OPENSSL_LOG(ERR, "Failed to dsa params");
goto err_dsa;
}
@@ -1334,7 +1334,7 @@ static int openssl_set_asym_session_parameters(
ret = set_dsa_keys(dsa, pub_key, priv_key);
if (ret) {
DSA_free(dsa);
- OPENSSL_LOG(ERR, "Failed to set keys\n");
+ OPENSSL_LOG(ERR, "Failed to set keys");
goto err_dsa;
}
asym_session->u.s.dsa = dsa;
@@ -1369,21 +1369,21 @@ static int openssl_set_asym_session_parameters(
param_bld = OSSL_PARAM_BLD_new();
if (!param_bld) {
- OPENSSL_LOG(ERR, "failed to allocate params\n");
+ OPENSSL_LOG(ERR, "failed to allocate params");
goto err_sm2;
}
ret = OSSL_PARAM_BLD_push_utf8_string(param_bld,
OSSL_ASYM_CIPHER_PARAM_DIGEST, "SM3", 0);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
ret = OSSL_PARAM_BLD_push_utf8_string(param_bld,
OSSL_PKEY_PARAM_GROUP_NAME, "SM2", 0);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
@@ -1393,7 +1393,7 @@ static int openssl_set_asym_session_parameters(
ret = OSSL_PARAM_BLD_push_BN(param_bld, OSSL_PKEY_PARAM_PRIV_KEY,
pkey_bn);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
@@ -1408,13 +1408,13 @@ static int openssl_set_asym_session_parameters(
ret = OSSL_PARAM_BLD_push_octet_string(param_bld,
OSSL_PKEY_PARAM_PUB_KEY, pubkey, len);
if (!ret) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
params = OSSL_PARAM_BLD_to_param(param_bld);
if (!params) {
- OPENSSL_LOG(ERR, "failed to push params\n");
+ OPENSSL_LOG(ERR, "failed to push params");
goto err_sm2;
}
diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 491f5ecd5b..e43884e69b 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -1531,7 +1531,7 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev)
snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
qat_pci_dev->name, "asym");
- QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
+ QAT_LOG(DEBUG, "Creating QAT ASYM device %s", name);
if (qat_pci_dev->qat_dev_gen == QAT_VQAT &&
sub_id != ADF_VQAT_ASYM_PCI_SUBSYSTEM_ID) {
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index eb267db424..50d687fd37 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -581,7 +581,7 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
ret = -ENOTSUP;
goto error_out;
default:
- QAT_LOG(ERR, "Crypto: Undefined Cipher specified %u\n",
+ QAT_LOG(ERR, "Crypto: Undefined Cipher specified %u",
cipher_xform->algo);
ret = -EINVAL;
goto error_out;
@@ -1180,7 +1180,7 @@ qat_sym_session_configure_aead(struct rte_cryptodev *dev,
aead_xform);
break;
default:
- QAT_LOG(ERR, "Crypto: Undefined AEAD specified %u\n",
+ QAT_LOG(ERR, "Crypto: Undefined AEAD specified %u",
aead_xform->algo);
return -EINVAL;
}
@@ -1805,7 +1805,7 @@ static int aes_ipsecmb_job(uint8_t *in, uint8_t *out, IMB_MGR *m,
err = imb_get_errno(m);
if (err)
- QAT_LOG(ERR, "Error: %s!\n", imb_get_strerror(err));
+ QAT_LOG(ERR, "Error: %s!", imb_get_strerror(err));
return -EFAULT;
}
@@ -2657,10 +2657,8 @@ int qat_sym_cd_auth_set(struct qat_sym_session *cdesc,
&state2_size, cdesc->aes_cmac);
#endif
if (ret) {
- cdesc->aes_cmac ? QAT_LOG(ERR,
- "(CMAC)precompute failed")
- : QAT_LOG(ERR,
- "(XCBC)precompute failed");
+ QAT_LOG(ERR, "(%s)precompute failed",
+ cdesc->aes_cmac ? "CMAC" : "XCBC");
return -EFAULT;
}
break;
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c
index 824383512e..e4b1a32398 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd.c
+++ b/drivers/crypto/uadk/uadk_crypto_pmd.c
@@ -634,7 +634,7 @@ uadk_set_session_cipher_parameters(struct rte_cryptodev *dev,
setup.sched_param = ¶ms;
sess->handle_cipher = wd_cipher_alloc_sess(&setup);
if (!sess->handle_cipher) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
ret = -EINVAL;
goto env_uninit;
}
@@ -642,7 +642,7 @@ uadk_set_session_cipher_parameters(struct rte_cryptodev *dev,
ret = wd_cipher_set_key(sess->handle_cipher, cipher->key.data, cipher->key.length);
if (ret) {
wd_cipher_free_sess(sess->handle_cipher);
- UADK_LOG(ERR, "uadk failed to set key!\n");
+ UADK_LOG(ERR, "uadk failed to set key!");
ret = -EINVAL;
goto env_uninit;
}
@@ -734,7 +734,7 @@ uadk_set_session_auth_parameters(struct rte_cryptodev *dev,
setup.sched_param = ¶ms;
sess->handle_digest = wd_digest_alloc_sess(&setup);
if (!sess->handle_digest) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
ret = -EINVAL;
goto env_uninit;
}
@@ -745,7 +745,7 @@ uadk_set_session_auth_parameters(struct rte_cryptodev *dev,
xform->auth.key.data,
xform->auth.key.length);
if (ret) {
- UADK_LOG(ERR, "uadk failed to alloc session!\n");
+ UADK_LOG(ERR, "uadk failed to alloc session!");
wd_digest_free_sess(sess->handle_digest);
sess->handle_digest = 0;
ret = -EINVAL;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4854820ba6..c0d3178b71 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -591,7 +591,7 @@ virtio_crypto_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
qp_conf->nb_descriptors, socket_id, &vq);
if (ret < 0) {
VIRTIO_CRYPTO_INIT_LOG_ERR(
- "virtio crypto data queue initialization failed\n");
+ "virtio crypto data queue initialization failed");
return ret;
}
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index 10e65ef1d7..3d4fd818f8 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -295,7 +295,7 @@ static struct fsl_qdma_queue
for (i = 0; i < queue_num; i++) {
if (queue_size[i] > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX ||
queue_size[i] < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) {
- DPAA_QDMA_ERR("Get wrong queue-sizes.\n");
+ DPAA_QDMA_ERR("Get wrong queue-sizes.");
goto fail;
}
queue_temp = queue_head + i + (j * queue_num);
@@ -345,7 +345,7 @@ fsl_qdma_queue *fsl_qdma_prep_status_queue(void)
status_size = QDMA_STATUS_SIZE;
if (status_size > FSL_QDMA_CIRCULAR_DESC_SIZE_MAX ||
status_size < FSL_QDMA_CIRCULAR_DESC_SIZE_MIN) {
- DPAA_QDMA_ERR("Get wrong status_size.\n");
+ DPAA_QDMA_ERR("Get wrong status_size.");
return NULL;
}
@@ -643,7 +643,7 @@ fsl_qdma_alloc_chan_resources(struct fsl_qdma_chan *fsl_chan)
FSL_QDMA_COMMAND_BUFFER_SIZE, 64);
if (ret) {
DPAA_QDMA_ERR(
- "failed to alloc dma buffer for comp descriptor\n");
+ "failed to alloc dma buffer for comp descriptor");
goto exit;
}
@@ -779,7 +779,7 @@ dpaa_qdma_enqueue(void *dev_private, uint16_t vchan,
(dma_addr_t)dst, (dma_addr_t)src,
length, NULL, NULL);
if (!fsl_comp) {
- DPAA_QDMA_DP_DEBUG("fsl_comp is NULL\n");
+ DPAA_QDMA_DP_DEBUG("fsl_comp is NULL");
return -1;
}
ret = fsl_qdma_enqueue_desc(fsl_chan, fsl_comp, flags);
@@ -803,19 +803,19 @@ dpaa_qdma_dequeue_status(void *dev_private, uint16_t vchan,
intr = qdma_readl_be(status + FSL_QDMA_DEDR);
if (intr) {
- DPAA_QDMA_ERR("DMA transaction error! %x\n", intr);
+ DPAA_QDMA_ERR("DMA transaction error! %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW0R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW1R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW2R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW3R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFQIDR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECBR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x", intr);
qdma_writel(0xffffffff,
status + FSL_QDMA_DEDR);
intr = qdma_readl(status + FSL_QDMA_DEDR);
@@ -849,19 +849,19 @@ dpaa_qdma_dequeue(void *dev_private,
intr = qdma_readl_be(status + FSL_QDMA_DEDR);
if (intr) {
- DPAA_QDMA_ERR("DMA transaction error! %x\n", intr);
+ DPAA_QDMA_ERR("DMA transaction error! %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW0R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW0R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW1R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW1R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW2R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW2R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFDW3R);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFDW3R %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECFQIDR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECFQIDR %x", intr);
intr = qdma_readl(status + FSL_QDMA_DECBR);
- DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x\n", intr);
+ DPAA_QDMA_INFO("reg FSL_QDMA_DECBR %x", intr);
qdma_writel(0xffffffff,
status + FSL_QDMA_DEDR);
intr = qdma_readl(status + FSL_QDMA_DEDR);
@@ -974,7 +974,7 @@ dpaa_qdma_init(struct rte_dma_dev *dmadev)
close(ccsr_qdma_fd);
if (fsl_qdma->ctrl_base == MAP_FAILED) {
DPAA_QDMA_ERR("Can not map CCSR base qdma: Phys: %08" PRIx64
- "size %d\n", phys_addr, regs_size);
+ "size %d", phys_addr, regs_size);
goto err;
}
@@ -998,7 +998,7 @@ dpaa_qdma_init(struct rte_dma_dev *dmadev)
ret = fsl_qdma_reg_init(fsl_qdma);
if (ret) {
- DPAA_QDMA_ERR("Can't Initialize the qDMA engine.\n");
+ DPAA_QDMA_ERR("Can't Initialize the qDMA engine.");
munmap(fsl_qdma->ctrl_base, regs_size);
goto err;
}
diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 2c91ceec13..5780e49297 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -578,7 +578,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -608,7 +608,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_QDMA_DP_WARN(
- "VDQ command not issued.QBMAN busy\n");
+ "VDQ command not issued.QBMAN busy");
/* Portal was busy, try again */
continue;
}
@@ -684,7 +684,7 @@ dpdmai_dev_dequeue_multijob_prefetch(struct qdma_virt_queue *qdma_vq,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_QDMA_DP_WARN(
- "VDQ command is not issued. QBMAN is busy (2)\n");
+ "VDQ command is not issued. QBMAN is busy (2)");
continue;
}
break;
@@ -728,7 +728,7 @@ dpdmai_dev_dequeue_multijob_no_prefetch(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -825,7 +825,7 @@ dpdmai_dev_submit_multi(struct qdma_virt_queue *qdma_vq,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_QDMA_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 7cd6ebc1e0..bce4b4b277 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -357,7 +357,7 @@ hisi_dma_start(struct rte_dma_dev *dev)
struct hisi_dma_dev *hw = dev->data->dev_private;
if (hw->iomz == NULL) {
- HISI_DMA_ERR(hw, "Vchan was not setup, start fail!\n");
+ HISI_DMA_ERR(hw, "Vchan was not setup, start fail!");
return -EINVAL;
}
@@ -630,7 +630,7 @@ hisi_dma_scan_cq(struct hisi_dma_dev *hw)
* status array indexed by csq_head. Only error logs
* are used for prompting.
*/
- HISI_DMA_ERR(hw, "invalid csq_head:%u!\n", csq_head);
+ HISI_DMA_ERR(hw, "invalid csq_head:%u!", csq_head);
count = 0;
break;
}
@@ -912,7 +912,7 @@ hisi_dma_probe(struct rte_pci_driver *pci_drv __rte_unused,
rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
if (pci_dev->mem_resource[2].addr == NULL) {
- HISI_DMA_LOG(ERR, "%s BAR2 is NULL!\n", name);
+ HISI_DMA_LOG(ERR, "%s BAR2 is NULL!", name);
return -ENODEV;
}
diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index 83d53942eb..dc2e8cd432 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -616,7 +616,7 @@ idxd_dmadev_create(const char *name, struct rte_device *dev,
sizeof(idxd->batch_comp_ring[0])) * (idxd->max_batches + 1),
sizeof(idxd->batch_comp_ring[0]), dev->numa_node);
if (idxd->batch_comp_ring == NULL) {
- IDXD_PMD_ERR("Unable to reserve memory for batch data\n");
+ IDXD_PMD_ERR("Unable to reserve memory for batch data");
ret = -ENOMEM;
goto cleanup;
}
diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 81637d9420..60ac219559 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -324,7 +324,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
/* look up queue 0 to get the PCI structure */
snprintf(qname, sizeof(qname), "%s-q0", name);
- IDXD_PMD_INFO("Looking up %s\n", qname);
+ IDXD_PMD_INFO("Looking up %s", qname);
ret = idxd_dmadev_create(qname, &dev->device, NULL, &idxd_pci_ops);
if (ret != 0) {
IDXD_PMD_ERR("Failed to create dmadev %s", name);
@@ -339,7 +339,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
for (qid = 1; qid < max_qid; qid++) {
/* add the queue number to each device name */
snprintf(qname, sizeof(qname), "%s-q%d", name, qid);
- IDXD_PMD_INFO("Looking up %s\n", qname);
+ IDXD_PMD_INFO("Looking up %s", qname);
ret = idxd_dmadev_create(qname, &dev->device, NULL, &idxd_pci_ops);
if (ret != 0) {
IDXD_PMD_ERR("Failed to create dmadev %s", name);
@@ -365,7 +365,7 @@ idxd_dmadev_probe_pci(struct rte_pci_driver *drv, struct rte_pci_device *dev)
return ret;
}
if (idxd.u.pci->portals == NULL) {
- IDXD_PMD_ERR("Error, invalid portal assigned during initialization\n");
+ IDXD_PMD_ERR("Error, invalid portal assigned during initialization");
free(idxd.u.pci);
return -EINVAL;
}
diff --git a/drivers/dma/ioat/ioat_dmadev.c b/drivers/dma/ioat/ioat_dmadev.c
index 5fc14bcf22..8b7ff5652f 100644
--- a/drivers/dma/ioat/ioat_dmadev.c
+++ b/drivers/dma/ioat/ioat_dmadev.c
@@ -156,12 +156,12 @@ ioat_dev_start(struct rte_dma_dev *dev)
ioat->offset = 0;
ioat->failure = 0;
- IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]\n",
+ IOAT_PMD_DEBUG("channel status - %s [0x%"PRIx64"]",
chansts_readable[ioat->status & IOAT_CHANSTS_STATUS],
ioat->status);
if ((ioat->regs->chansts & IOAT_CHANSTS_STATUS) == IOAT_CHANSTS_HALTED) {
- IOAT_PMD_WARN("Device HALTED on start, attempting to recover\n");
+ IOAT_PMD_WARN("Device HALTED on start, attempting to recover");
if (__ioat_recover(ioat) != 0) {
IOAT_PMD_ERR("Device couldn't be recovered");
return -1;
@@ -469,7 +469,7 @@ ioat_completed(void *dev_private, uint16_t qid __rte_unused, const uint16_t max_
ioat->failure = ioat->regs->chanerr;
ioat->next_read = read + count + 1;
if (__ioat_recover(ioat) != 0) {
- IOAT_PMD_ERR("Device HALTED and could not be recovered\n");
+ IOAT_PMD_ERR("Device HALTED and could not be recovered");
__dev_dump(dev_private, stdout);
return 0;
}
@@ -515,7 +515,7 @@ ioat_completed_status(void *dev_private, uint16_t qid __rte_unused,
count++;
ioat->next_read = read + count;
if (__ioat_recover(ioat) != 0) {
- IOAT_PMD_ERR("Device HALTED and could not be recovered\n");
+ IOAT_PMD_ERR("Device HALTED and could not be recovered");
__dev_dump(dev_private, stdout);
return 0;
}
@@ -652,12 +652,12 @@ ioat_dmadev_create(const char *name, struct rte_pci_device *dev)
/* Do device initialization - reset and set error behaviour. */
if (ioat->regs->chancnt != 1)
- IOAT_PMD_WARN("%s: Channel count == %d\n", __func__,
+ IOAT_PMD_WARN("%s: Channel count == %d", __func__,
ioat->regs->chancnt);
/* Locked by someone else. */
if (ioat->regs->chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE) {
- IOAT_PMD_WARN("%s: Channel appears locked\n", __func__);
+ IOAT_PMD_WARN("%s: Channel appears locked", __func__);
ioat->regs->chanctrl = 0;
}
@@ -676,7 +676,7 @@ ioat_dmadev_create(const char *name, struct rte_pci_device *dev)
rte_delay_ms(1);
if (++retry >= 200) {
IOAT_PMD_ERR("%s: cannot reset device. CHANCMD=%#"PRIx8
- ", CHANSTS=%#"PRIx64", CHANERR=%#"PRIx32"\n",
+ ", CHANSTS=%#"PRIx64", CHANERR=%#"PRIx32,
__func__,
ioat->regs->chancmd,
ioat->regs->chansts,
diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c
index 6d59fdf909..bba70646fa 100644
--- a/drivers/event/cnxk/cnxk_tim_evdev.c
+++ b/drivers/event/cnxk/cnxk_tim_evdev.c
@@ -268,7 +268,7 @@ cnxk_tim_ring_create(struct rte_event_timer_adapter *adptr)
sso_set_priv_mem_fn(dev->event_dev, NULL);
plt_tim_dbg(
- "Total memory used %" PRIu64 "MB\n",
+ "Total memory used %" PRIu64 "MB",
(uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz) +
(tim_ring->nb_bkts * sizeof(struct cnxk_tim_bkt))) /
BIT_ULL(20)));
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index f0a4998bdd..c43ab864ca 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -171,7 +171,7 @@ dlb2_hw_query_resources(struct dlb2_eventdev *dlb2)
ret = dlb2_iface_get_num_resources(handle,
&dlb2->hw_rsrc_query_results);
if (ret) {
- DLB2_LOG_ERR("ioctl get dlb2 num resources, err=%d\n", ret);
+ DLB2_LOG_ERR("ioctl get dlb2 num resources, err=%d", ret);
return ret;
}
@@ -259,7 +259,7 @@ set_producer_coremask(const char *key __rte_unused,
const char **mask_str = opaque;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -293,7 +293,7 @@ set_max_cq_depth(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -304,7 +304,7 @@ set_max_cq_depth(const char *key __rte_unused,
if (*max_cq_depth < DLB2_MIN_CQ_DEPTH_OVERRIDE ||
*max_cq_depth > DLB2_MAX_CQ_DEPTH_OVERRIDE ||
!rte_is_power_of_2(*max_cq_depth)) {
- DLB2_LOG_ERR("dlb2: max_cq_depth %d and %d and a power of 2\n",
+ DLB2_LOG_ERR("dlb2: max_cq_depth %d and %d and a power of 2",
DLB2_MIN_CQ_DEPTH_OVERRIDE,
DLB2_MAX_CQ_DEPTH_OVERRIDE);
return -EINVAL;
@@ -322,7 +322,7 @@ set_max_enq_depth(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -333,7 +333,7 @@ set_max_enq_depth(const char *key __rte_unused,
if (*max_enq_depth < DLB2_MIN_ENQ_DEPTH_OVERRIDE ||
*max_enq_depth > DLB2_MAX_ENQ_DEPTH_OVERRIDE ||
!rte_is_power_of_2(*max_enq_depth)) {
- DLB2_LOG_ERR("dlb2: max_enq_depth %d and %d and a power of 2\n",
+ DLB2_LOG_ERR("dlb2: max_enq_depth %d and %d and a power of 2",
DLB2_MIN_ENQ_DEPTH_OVERRIDE,
DLB2_MAX_ENQ_DEPTH_OVERRIDE);
return -EINVAL;
@@ -351,7 +351,7 @@ set_max_num_events(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -361,7 +361,7 @@ set_max_num_events(const char *key __rte_unused,
if (*max_num_events < 0 || *max_num_events >
DLB2_MAX_NUM_LDB_CREDITS) {
- DLB2_LOG_ERR("dlb2: max_num_events must be between 0 and %d\n",
+ DLB2_LOG_ERR("dlb2: max_num_events must be between 0 and %d",
DLB2_MAX_NUM_LDB_CREDITS);
return -EINVAL;
}
@@ -378,7 +378,7 @@ set_num_dir_credits(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -388,7 +388,7 @@ set_num_dir_credits(const char *key __rte_unused,
if (*num_dir_credits < 0 ||
*num_dir_credits > DLB2_MAX_NUM_DIR_CREDITS(DLB2_HW_V2)) {
- DLB2_LOG_ERR("dlb2: num_dir_credits must be between 0 and %d\n",
+ DLB2_LOG_ERR("dlb2: num_dir_credits must be between 0 and %d",
DLB2_MAX_NUM_DIR_CREDITS(DLB2_HW_V2));
return -EINVAL;
}
@@ -405,7 +405,7 @@ set_dev_id(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -425,7 +425,7 @@ set_poll_interval(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -445,7 +445,7 @@ set_port_cos(const char *key __rte_unused,
int first, last, cos_id, i;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -458,18 +458,18 @@ set_port_cos(const char *key __rte_unused,
} else if (sscanf(value, "%d:%d", &first, &cos_id) == 2) {
last = first;
} else {
- DLB2_LOG_ERR("Error parsing ldb port port_cos devarg. Should be port-port:val, or port:val\n");
+ DLB2_LOG_ERR("Error parsing ldb port port_cos devarg. Should be port-port:val, or port:val");
return -EINVAL;
}
if (first > last || first < 0 ||
last >= DLB2_MAX_NUM_LDB_PORTS) {
- DLB2_LOG_ERR("Error parsing ldb port cos_id arg, invalid port value\n");
+ DLB2_LOG_ERR("Error parsing ldb port cos_id arg, invalid port value");
return -EINVAL;
}
if (cos_id < DLB2_COS_0 || cos_id > DLB2_COS_3) {
- DLB2_LOG_ERR("Error parsing ldb port cos_id devarg, must be between 0 and 4\n");
+ DLB2_LOG_ERR("Error parsing ldb port cos_id devarg, must be between 0 and 4");
return -EINVAL;
}
@@ -487,7 +487,7 @@ set_cos_bw(const char *key __rte_unused,
struct dlb2_cos_bw *cos_bw = opaque;
if (opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -495,11 +495,11 @@ set_cos_bw(const char *key __rte_unused,
if (sscanf(value, "%d:%d:%d:%d", &cos_bw->val[0], &cos_bw->val[1],
&cos_bw->val[2], &cos_bw->val[3]) != 4) {
- DLB2_LOG_ERR("Error parsing cos bandwidth devarg. Should be bw0:bw1:bw2:bw3 where all values combined are <= 100\n");
+ DLB2_LOG_ERR("Error parsing cos bandwidth devarg. Should be bw0:bw1:bw2:bw3 where all values combined are <= 100");
return -EINVAL;
}
if (cos_bw->val[0] + cos_bw->val[1] + cos_bw->val[2] + cos_bw->val[3] > 100) {
- DLB2_LOG_ERR("Error parsing cos bandwidth devarg. Should be bw0:bw1:bw2:bw3 where all values combined are <= 100\n");
+ DLB2_LOG_ERR("Error parsing cos bandwidth devarg. Should be bw0:bw1:bw2:bw3 where all values combined are <= 100");
return -EINVAL;
}
@@ -515,7 +515,7 @@ set_sw_credit_quanta(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -524,7 +524,7 @@ set_sw_credit_quanta(const char *key __rte_unused,
return ret;
if (*sw_credit_quanta <= 0) {
- DLB2_LOG_ERR("sw_credit_quanta must be > 0\n");
+ DLB2_LOG_ERR("sw_credit_quanta must be > 0");
return -EINVAL;
}
@@ -540,7 +540,7 @@ set_hw_credit_quanta(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -560,7 +560,7 @@ set_default_depth_thresh(const char *key __rte_unused,
int ret;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -579,7 +579,7 @@ set_vector_opts_enab(const char *key __rte_unused,
bool *dlb2_vector_opts_enabled = opaque;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -599,7 +599,7 @@ set_default_ldb_port_allocation(const char *key __rte_unused,
bool *default_ldb_port_allocation = opaque;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -619,7 +619,7 @@ set_enable_cq_weight(const char *key __rte_unused,
bool *enable_cq_weight = opaque;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -640,7 +640,7 @@ set_qid_depth_thresh(const char *key __rte_unused,
int first, last, thresh, i;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -657,18 +657,18 @@ set_qid_depth_thresh(const char *key __rte_unused,
} else if (sscanf(value, "%d:%d", &first, &thresh) == 2) {
last = first;
} else {
- DLB2_LOG_ERR("Error parsing qid depth devarg. Should be all:val, qid-qid:val, or qid:val\n");
+ DLB2_LOG_ERR("Error parsing qid depth devarg. Should be all:val, qid-qid:val, or qid:val");
return -EINVAL;
}
if (first > last || first < 0 ||
last >= DLB2_MAX_NUM_QUEUES(DLB2_HW_V2)) {
- DLB2_LOG_ERR("Error parsing qid depth devarg, invalid qid value\n");
+ DLB2_LOG_ERR("Error parsing qid depth devarg, invalid qid value");
return -EINVAL;
}
if (thresh < 0 || thresh > DLB2_MAX_QUEUE_DEPTH_THRESHOLD) {
- DLB2_LOG_ERR("Error parsing qid depth devarg, threshold > %d\n",
+ DLB2_LOG_ERR("Error parsing qid depth devarg, threshold > %d",
DLB2_MAX_QUEUE_DEPTH_THRESHOLD);
return -EINVAL;
}
@@ -688,7 +688,7 @@ set_qid_depth_thresh_v2_5(const char *key __rte_unused,
int first, last, thresh, i;
if (value == NULL || opaque == NULL) {
- DLB2_LOG_ERR("NULL pointer\n");
+ DLB2_LOG_ERR("NULL pointer");
return -EINVAL;
}
@@ -705,18 +705,18 @@ set_qid_depth_thresh_v2_5(const char *key __rte_unused,
} else if (sscanf(value, "%d:%d", &first, &thresh) == 2) {
last = first;
} else {
- DLB2_LOG_ERR("Error parsing qid depth devarg. Should be all:val, qid-qid:val, or qid:val\n");
+ DLB2_LOG_ERR("Error parsing qid depth devarg. Should be all:val, qid-qid:val, or qid:val");
return -EINVAL;
}
if (first > last || first < 0 ||
last >= DLB2_MAX_NUM_QUEUES(DLB2_HW_V2_5)) {
- DLB2_LOG_ERR("Error parsing qid depth devarg, invalid qid value\n");
+ DLB2_LOG_ERR("Error parsing qid depth devarg, invalid qid value");
return -EINVAL;
}
if (thresh < 0 || thresh > DLB2_MAX_QUEUE_DEPTH_THRESHOLD) {
- DLB2_LOG_ERR("Error parsing qid depth devarg, threshold > %d\n",
+ DLB2_LOG_ERR("Error parsing qid depth devarg, threshold > %d",
DLB2_MAX_QUEUE_DEPTH_THRESHOLD);
return -EINVAL;
}
@@ -738,7 +738,7 @@ dlb2_eventdev_info_get(struct rte_eventdev *dev,
if (ret) {
const struct rte_eventdev_data *data = dev->data;
- DLB2_LOG_ERR("get resources err=%d, devid=%d\n",
+ DLB2_LOG_ERR("get resources err=%d, devid=%d",
ret, data->dev_id);
/* fn is void, so fall through and return values set up in
* probe
@@ -781,7 +781,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
struct dlb2_create_sched_domain_args *cfg;
if (resources_asked == NULL) {
- DLB2_LOG_ERR("dlb2: dlb2_create NULL parameter\n");
+ DLB2_LOG_ERR("dlb2: dlb2_create NULL parameter");
ret = EINVAL;
goto error_exit;
}
@@ -809,7 +809,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
if (cos_ports > resources_asked->num_ldb_ports ||
(cos_ports && dlb2->max_cos_port >= resources_asked->num_ldb_ports)) {
- DLB2_LOG_ERR("dlb2: num_ldb_ports < cos_ports\n");
+ DLB2_LOG_ERR("dlb2: num_ldb_ports < cos_ports");
ret = EINVAL;
goto error_exit;
}
@@ -854,7 +854,7 @@ dlb2_hw_create_sched_domain(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_sched_domain_create(handle, cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: domain create failed, ret = %d, extra status: %s\n",
+ DLB2_LOG_ERR("dlb2: domain create failed, ret = %d, extra status: %s",
ret,
dlb2_error_strings[cfg->response.status]);
@@ -930,27 +930,27 @@ dlb2_eventdev_configure(const struct rte_eventdev *dev)
dlb2_hw_reset_sched_domain(dev, true);
ret = dlb2_hw_query_resources(dlb2);
if (ret) {
- DLB2_LOG_ERR("get resources err=%d, devid=%d\n",
+ DLB2_LOG_ERR("get resources err=%d, devid=%d",
ret, data->dev_id);
return ret;
}
}
if (config->nb_event_queues > rsrcs->num_queues) {
- DLB2_LOG_ERR("nb_event_queues parameter (%d) exceeds the QM device's capabilities (%d).\n",
+ DLB2_LOG_ERR("nb_event_queues parameter (%d) exceeds the QM device's capabilities (%d).",
config->nb_event_queues,
rsrcs->num_queues);
return -EINVAL;
}
if (config->nb_event_ports > (rsrcs->num_ldb_ports
+ rsrcs->num_dir_ports)) {
- DLB2_LOG_ERR("nb_event_ports parameter (%d) exceeds the QM device's capabilities (%d).\n",
+ DLB2_LOG_ERR("nb_event_ports parameter (%d) exceeds the QM device's capabilities (%d).",
config->nb_event_ports,
(rsrcs->num_ldb_ports + rsrcs->num_dir_ports));
return -EINVAL;
}
if (config->nb_events_limit > rsrcs->nb_events_limit) {
- DLB2_LOG_ERR("nb_events_limit parameter (%d) exceeds the QM device's capabilities (%d).\n",
+ DLB2_LOG_ERR("nb_events_limit parameter (%d) exceeds the QM device's capabilities (%d).",
config->nb_events_limit,
rsrcs->nb_events_limit);
return -EINVAL;
@@ -1000,7 +1000,7 @@ dlb2_eventdev_configure(const struct rte_eventdev *dev)
if (dlb2_hw_create_sched_domain(dlb2, handle, rsrcs,
dlb2->version) < 0) {
- DLB2_LOG_ERR("dlb2_hw_create_sched_domain failed\n");
+ DLB2_LOG_ERR("dlb2_hw_create_sched_domain failed");
return -ENODEV;
}
@@ -1068,7 +1068,7 @@ dlb2_get_sn_allocation(struct dlb2_eventdev *dlb2, int group)
ret = dlb2_iface_get_sn_allocation(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: get_sn_allocation ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: get_sn_allocation ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -1088,7 +1088,7 @@ dlb2_set_sn_allocation(struct dlb2_eventdev *dlb2, int group, int num)
ret = dlb2_iface_set_sn_allocation(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: set_sn_allocation ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: set_sn_allocation ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -1107,7 +1107,7 @@ dlb2_get_sn_occupancy(struct dlb2_eventdev *dlb2, int group)
ret = dlb2_iface_get_sn_occupancy(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: get_sn_occupancy ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: get_sn_occupancy ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -1161,7 +1161,7 @@ dlb2_program_sn_allocation(struct dlb2_eventdev *dlb2,
}
if (i == DLB2_NUM_SN_GROUPS) {
- DLB2_LOG_ERR("[%s()] No groups with %d sequence_numbers are available or have free slots\n",
+ DLB2_LOG_ERR("[%s()] No groups with %d sequence_numbers are available or have free slots",
__func__, sequence_numbers);
return;
}
@@ -1236,7 +1236,7 @@ dlb2_hw_create_ldb_queue(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_ldb_queue_create(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: create LB event queue error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: create LB event queue error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return -EINVAL;
}
@@ -1272,7 +1272,7 @@ dlb2_eventdev_ldb_queue_setup(struct rte_eventdev *dev,
qm_qid = dlb2_hw_create_ldb_queue(dlb2, ev_queue, queue_conf);
if (qm_qid < 0) {
- DLB2_LOG_ERR("Failed to create the load-balanced queue\n");
+ DLB2_LOG_ERR("Failed to create the load-balanced queue");
return qm_qid;
}
@@ -1380,7 +1380,7 @@ dlb2_init_consume_qe(struct dlb2_port *qm_port, char *mz_name)
RTE_CACHE_LINE_SIZE);
if (qe == NULL) {
- DLB2_LOG_ERR("dlb2: no memory for consume_qe\n");
+ DLB2_LOG_ERR("dlb2: no memory for consume_qe");
return -ENOMEM;
}
qm_port->consume_qe = qe;
@@ -1412,7 +1412,7 @@ dlb2_init_int_arm_qe(struct dlb2_port *qm_port, char *mz_name)
RTE_CACHE_LINE_SIZE);
if (qe == NULL) {
- DLB2_LOG_ERR("dlb2: no memory for complete_qe\n");
+ DLB2_LOG_ERR("dlb2: no memory for complete_qe");
return -ENOMEM;
}
qm_port->int_arm_qe = qe;
@@ -1440,20 +1440,20 @@ dlb2_init_qe_mem(struct dlb2_port *qm_port, char *mz_name)
qm_port->qe4 = rte_zmalloc(mz_name, sz, RTE_CACHE_LINE_SIZE);
if (qm_port->qe4 == NULL) {
- DLB2_LOG_ERR("dlb2: no qe4 memory\n");
+ DLB2_LOG_ERR("dlb2: no qe4 memory");
ret = -ENOMEM;
goto error_exit;
}
ret = dlb2_init_int_arm_qe(qm_port, mz_name);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: dlb2_init_int_arm_qe ret=%d\n", ret);
+ DLB2_LOG_ERR("dlb2: dlb2_init_int_arm_qe ret=%d", ret);
goto error_exit;
}
ret = dlb2_init_consume_qe(qm_port, mz_name);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: dlb2_init_consume_qe ret=%d\n", ret);
+ DLB2_LOG_ERR("dlb2: dlb2_init_consume_qe ret=%d", ret);
goto error_exit;
}
@@ -1536,14 +1536,14 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
return -EINVAL;
if (dequeue_depth < DLB2_MIN_CQ_DEPTH) {
- DLB2_LOG_ERR("dlb2: invalid cq depth, must be at least %d\n",
+ DLB2_LOG_ERR("dlb2: invalid cq depth, must be at least %d",
DLB2_MIN_CQ_DEPTH);
return -EINVAL;
}
if (dlb2->version == DLB2_HW_V2 && ev_port->cq_weight != 0 &&
ev_port->cq_weight > dequeue_depth) {
- DLB2_LOG_ERR("dlb2: invalid cq dequeue depth %d, must be >= cq weight %d\n",
+ DLB2_LOG_ERR("dlb2: invalid cq dequeue depth %d, must be >= cq weight %d",
dequeue_depth, ev_port->cq_weight);
return -EINVAL;
}
@@ -1579,7 +1579,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_ldb_port_create(handle, &cfg, dlb2->poll_mode);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: dlb2_ldb_port_create error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: dlb2_ldb_port_create error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
goto error_exit;
}
@@ -1602,7 +1602,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
ret = dlb2_init_qe_mem(qm_port, mz_name);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: init_qe_mem failed, ret=%d\n", ret);
+ DLB2_LOG_ERR("dlb2: init_qe_mem failed, ret=%d", ret);
goto error_exit;
}
@@ -1615,7 +1615,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_enable_cq_weight(handle, &cq_weight_args);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: dlb2_dir_port_create error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: dlb2_dir_port_create error, ret=%d (driver status: %s)",
ret,
dlb2_error_strings[cfg.response. status]);
goto error_exit;
@@ -1717,7 +1717,7 @@ dlb2_hw_create_ldb_port(struct dlb2_eventdev *dlb2,
rte_spinlock_unlock(&handle->resource_lock);
- DLB2_LOG_ERR("dlb2: create ldb port failed!\n");
+ DLB2_LOG_ERR("dlb2: create ldb port failed!");
return ret;
}
@@ -1761,13 +1761,13 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
return -EINVAL;
if (dequeue_depth < DLB2_MIN_CQ_DEPTH) {
- DLB2_LOG_ERR("dlb2: invalid dequeue_depth, must be %d-%d\n",
+ DLB2_LOG_ERR("dlb2: invalid dequeue_depth, must be %d-%d",
DLB2_MIN_CQ_DEPTH, DLB2_MAX_INPUT_QUEUE_DEPTH);
return -EINVAL;
}
if (enqueue_depth < DLB2_MIN_ENQUEUE_DEPTH) {
- DLB2_LOG_ERR("dlb2: invalid enqueue_depth, must be at least %d\n",
+ DLB2_LOG_ERR("dlb2: invalid enqueue_depth, must be at least %d",
DLB2_MIN_ENQUEUE_DEPTH);
return -EINVAL;
}
@@ -1802,7 +1802,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_dir_port_create(handle, &cfg, dlb2->poll_mode);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: dlb2_dir_port_create error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: dlb2_dir_port_create error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
goto error_exit;
}
@@ -1827,7 +1827,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
ret = dlb2_init_qe_mem(qm_port, mz_name);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: init_qe_mem failed, ret=%d\n", ret);
+ DLB2_LOG_ERR("dlb2: init_qe_mem failed, ret=%d", ret);
goto error_exit;
}
@@ -1916,7 +1916,7 @@ dlb2_hw_create_dir_port(struct dlb2_eventdev *dlb2,
rte_spinlock_unlock(&handle->resource_lock);
- DLB2_LOG_ERR("dlb2: create dir port failed!\n");
+ DLB2_LOG_ERR("dlb2: create dir port failed!");
return ret;
}
@@ -1932,7 +1932,7 @@ dlb2_eventdev_port_setup(struct rte_eventdev *dev,
int ret;
if (dev == NULL || port_conf == NULL) {
- DLB2_LOG_ERR("Null parameter\n");
+ DLB2_LOG_ERR("Null parameter");
return -EINVAL;
}
@@ -1950,7 +1950,7 @@ dlb2_eventdev_port_setup(struct rte_eventdev *dev,
ev_port = &dlb2->ev_ports[ev_port_id];
/* configured? */
if (ev_port->setup_done) {
- DLB2_LOG_ERR("evport %d is already configured\n", ev_port_id);
+ DLB2_LOG_ERR("evport %d is already configured", ev_port_id);
return -EINVAL;
}
@@ -1982,7 +1982,7 @@ dlb2_eventdev_port_setup(struct rte_eventdev *dev,
if (port_conf->enqueue_depth > sw_credit_quanta ||
port_conf->enqueue_depth > hw_credit_quanta) {
- DLB2_LOG_ERR("Invalid port config. Enqueue depth %d must be <= credit quanta %d and batch size %d\n",
+ DLB2_LOG_ERR("Invalid port config. Enqueue depth %d must be <= credit quanta %d and batch size %d",
port_conf->enqueue_depth,
sw_credit_quanta,
hw_credit_quanta);
@@ -2004,7 +2004,7 @@ dlb2_eventdev_port_setup(struct rte_eventdev *dev,
port_conf->dequeue_depth,
port_conf->enqueue_depth);
if (ret < 0) {
- DLB2_LOG_ERR("Failed to create the lB port ve portId=%d\n",
+ DLB2_LOG_ERR("Failed to create the lB port ve portId=%d",
ev_port_id);
return ret;
@@ -2015,7 +2015,7 @@ dlb2_eventdev_port_setup(struct rte_eventdev *dev,
port_conf->dequeue_depth,
port_conf->enqueue_depth);
if (ret < 0) {
- DLB2_LOG_ERR("Failed to create the DIR port\n");
+ DLB2_LOG_ERR("Failed to create the DIR port");
return ret;
}
}
@@ -2082,9 +2082,9 @@ dlb2_hw_map_ldb_qid_to_port(struct dlb2_hw_dev *handle,
ret = dlb2_iface_map_qid(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: map qid error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: map qid error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
- DLB2_LOG_ERR("dlb2: grp=%d, qm_port=%d, qm_qid=%d prio=%d\n",
+ DLB2_LOG_ERR("dlb2: grp=%d, qm_port=%d, qm_qid=%d prio=%d",
handle->domain_id, cfg.port_id,
cfg.qid,
cfg.priority);
@@ -2117,7 +2117,7 @@ dlb2_event_queue_join_ldb(struct dlb2_eventdev *dlb2,
first_avail = i;
}
if (first_avail == -1) {
- DLB2_LOG_ERR("dlb2: qm_port %d has no available QID slots.\n",
+ DLB2_LOG_ERR("dlb2: qm_port %d has no available QID slots.",
ev_port->qm_port.id);
return -EINVAL;
}
@@ -2154,7 +2154,7 @@ dlb2_hw_create_dir_queue(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_dir_queue_create(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: create DIR event queue error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: create DIR event queue error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return -EINVAL;
}
@@ -2172,7 +2172,7 @@ dlb2_eventdev_dir_queue_setup(struct dlb2_eventdev *dlb2,
qm_qid = dlb2_hw_create_dir_queue(dlb2, ev_queue, ev_port->qm_port.id);
if (qm_qid < 0) {
- DLB2_LOG_ERR("Failed to create the DIR queue\n");
+ DLB2_LOG_ERR("Failed to create the DIR queue");
return qm_qid;
}
@@ -2202,7 +2202,7 @@ dlb2_do_port_link(struct rte_eventdev *dev,
err = dlb2_event_queue_join_ldb(dlb2, ev_port, ev_queue, prio);
if (err) {
- DLB2_LOG_ERR("port link failure for %s ev_q %d, ev_port %d\n",
+ DLB2_LOG_ERR("port link failure for %s ev_q %d, ev_port %d",
ev_queue->qm_queue.is_directed ? "DIR" : "LDB",
ev_queue->id, ev_port->id);
@@ -2240,7 +2240,7 @@ dlb2_validate_port_link(struct dlb2_eventdev_port *ev_port,
queue_is_dir = ev_queue->qm_queue.is_directed;
if (port_is_dir != queue_is_dir) {
- DLB2_LOG_ERR("%s queue %u can't link to %s port %u\n",
+ DLB2_LOG_ERR("%s queue %u can't link to %s port %u",
queue_is_dir ? "DIR" : "LDB", ev_queue->id,
port_is_dir ? "DIR" : "LDB", ev_port->id);
@@ -2250,7 +2250,7 @@ dlb2_validate_port_link(struct dlb2_eventdev_port *ev_port,
/* Check if there is space for the requested link */
if (!link_exists && index == -1) {
- DLB2_LOG_ERR("no space for new link\n");
+ DLB2_LOG_ERR("no space for new link");
rte_errno = -ENOSPC;
return -1;
}
@@ -2258,7 +2258,7 @@ dlb2_validate_port_link(struct dlb2_eventdev_port *ev_port,
/* Check if the directed port is already linked */
if (ev_port->qm_port.is_directed && ev_port->num_links > 0 &&
!link_exists) {
- DLB2_LOG_ERR("Can't link DIR port %d to >1 queues\n",
+ DLB2_LOG_ERR("Can't link DIR port %d to >1 queues",
ev_port->id);
rte_errno = -EINVAL;
return -1;
@@ -2267,7 +2267,7 @@ dlb2_validate_port_link(struct dlb2_eventdev_port *ev_port,
/* Check if the directed queue is already linked */
if (ev_queue->qm_queue.is_directed && ev_queue->num_links > 0 &&
!link_exists) {
- DLB2_LOG_ERR("Can't link DIR queue %d to >1 ports\n",
+ DLB2_LOG_ERR("Can't link DIR queue %d to >1 ports",
ev_queue->id);
rte_errno = -EINVAL;
return -1;
@@ -2289,14 +2289,14 @@ dlb2_eventdev_port_link(struct rte_eventdev *dev, void *event_port,
RTE_SET_USED(dev);
if (ev_port == NULL) {
- DLB2_LOG_ERR("dlb2: evport not setup\n");
+ DLB2_LOG_ERR("dlb2: evport not setup");
rte_errno = -EINVAL;
return 0;
}
if (!ev_port->setup_done &&
ev_port->qm_port.config_state != DLB2_PREV_CONFIGURED) {
- DLB2_LOG_ERR("dlb2: evport not setup\n");
+ DLB2_LOG_ERR("dlb2: evport not setup");
rte_errno = -EINVAL;
return 0;
}
@@ -2381,7 +2381,7 @@ dlb2_hw_unmap_ldb_qid_from_port(struct dlb2_hw_dev *handle,
ret = dlb2_iface_unmap_qid(handle, &cfg);
if (ret < 0)
- DLB2_LOG_ERR("dlb2: unmap qid error, ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: unmap qid error, ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
@@ -2434,7 +2434,7 @@ dlb2_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,
RTE_SET_USED(dev);
if (!ev_port->setup_done) {
- DLB2_LOG_ERR("dlb2: evport %d is not configured\n",
+ DLB2_LOG_ERR("dlb2: evport %d is not configured",
ev_port->id);
rte_errno = -EINVAL;
return 0;
@@ -2459,7 +2459,7 @@ dlb2_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,
int ret, j;
if (queues[i] >= dlb2->num_queues) {
- DLB2_LOG_ERR("dlb2: invalid queue id %d\n", queues[i]);
+ DLB2_LOG_ERR("dlb2: invalid queue id %d", queues[i]);
rte_errno = -EINVAL;
return i; /* return index of offending queue */
}
@@ -2477,7 +2477,7 @@ dlb2_eventdev_port_unlink(struct rte_eventdev *dev, void *event_port,
ret = dlb2_event_queue_detach_ldb(dlb2, ev_port, ev_queue);
if (ret) {
- DLB2_LOG_ERR("unlink err=%d for port %d queue %d\n",
+ DLB2_LOG_ERR("unlink err=%d for port %d queue %d",
ret, ev_port->id, queues[i]);
rte_errno = -ENOENT;
return i; /* return index of offending queue */
@@ -2504,7 +2504,7 @@ dlb2_eventdev_port_unlinks_in_progress(struct rte_eventdev *dev,
RTE_SET_USED(dev);
if (!ev_port->setup_done) {
- DLB2_LOG_ERR("dlb2: evport %d is not configured\n",
+ DLB2_LOG_ERR("dlb2: evport %d is not configured",
ev_port->id);
rte_errno = -EINVAL;
return 0;
@@ -2516,7 +2516,7 @@ dlb2_eventdev_port_unlinks_in_progress(struct rte_eventdev *dev,
ret = dlb2_iface_pending_port_unmaps(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: num_unlinks_in_progress ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: num_unlinks_in_progress ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -2609,7 +2609,7 @@ dlb2_eventdev_start(struct rte_eventdev *dev)
rte_spinlock_lock(&dlb2->qm_instance.resource_lock);
if (dlb2->run_state != DLB2_RUN_STATE_STOPPED) {
- DLB2_LOG_ERR("bad state %d for dev_start\n",
+ DLB2_LOG_ERR("bad state %d for dev_start",
(int)dlb2->run_state);
rte_spinlock_unlock(&dlb2->qm_instance.resource_lock);
return -EINVAL;
@@ -2645,7 +2645,7 @@ dlb2_eventdev_start(struct rte_eventdev *dev)
ret = dlb2_iface_sched_domain_start(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: sched_domain_start ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: sched_domain_start ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -2890,7 +2890,7 @@ dlb2_event_enqueue_prep(struct dlb2_eventdev_port *ev_port,
case RTE_SCHED_TYPE_ORDERED:
DLB2_LOG_LINE_DBG("dlb2: put_qe: RTE_SCHED_TYPE_ORDERED");
if (qm_queue->sched_type != RTE_SCHED_TYPE_ORDERED) {
- DLB2_LOG_ERR("dlb2: tried to send ordered event to unordered queue %d\n",
+ DLB2_LOG_ERR("dlb2: tried to send ordered event to unordered queue %d",
*queue_id);
rte_errno = -EINVAL;
return 1;
@@ -2909,7 +2909,7 @@ dlb2_event_enqueue_prep(struct dlb2_eventdev_port *ev_port,
*sched_type = DLB2_SCHED_UNORDERED;
break;
default:
- DLB2_LOG_ERR("Unsupported LDB sched type in put_qe\n");
+ DLB2_LOG_ERR("Unsupported LDB sched type in put_qe");
DLB2_INC_STAT(ev_port->stats.tx_invalid, 1);
rte_errno = -EINVAL;
return 1;
@@ -3156,7 +3156,7 @@ dlb2_event_release(struct dlb2_eventdev *dlb2,
int i;
if (port_id > dlb2->num_ports) {
- DLB2_LOG_ERR("Invalid port id %d in dlb2-event_release\n",
+ DLB2_LOG_ERR("Invalid port id %d in dlb2-event_release",
port_id);
rte_errno = -EINVAL;
return;
@@ -3213,7 +3213,7 @@ dlb2_event_release(struct dlb2_eventdev *dlb2,
sw_credit_update:
/* each release returns one credit */
if (unlikely(!ev_port->outstanding_releases)) {
- DLB2_LOG_ERR("%s: Outstanding releases underflowed.\n",
+ DLB2_LOG_ERR("%s: Outstanding releases underflowed.",
__func__);
return;
}
@@ -3367,7 +3367,7 @@ dlb2_process_dequeue_qes(struct dlb2_eventdev_port *ev_port,
* buffer is a mbuf.
*/
if (unlikely(qe->error)) {
- DLB2_LOG_ERR("QE error bit ON\n");
+ DLB2_LOG_ERR("QE error bit ON");
DLB2_INC_STAT(ev_port->stats.traffic.rx_drop, 1);
dlb2_consume_qe_immediate(qm_port, 1);
continue; /* Ignore */
@@ -4283,7 +4283,7 @@ dlb2_get_ldb_queue_depth(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_get_ldb_queue_depth(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: get_ldb_queue_depth ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: get_ldb_queue_depth ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -4303,7 +4303,7 @@ dlb2_get_dir_queue_depth(struct dlb2_eventdev *dlb2,
ret = dlb2_iface_get_dir_queue_depth(handle, &cfg);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2: get_dir_queue_depth ret=%d (driver status: %s)\n",
+ DLB2_LOG_ERR("dlb2: get_dir_queue_depth ret=%d (driver status: %s)",
ret, dlb2_error_strings[cfg.response.status]);
return ret;
}
@@ -4394,7 +4394,7 @@ dlb2_drain(struct rte_eventdev *dev)
}
if (i == dlb2->num_ports) {
- DLB2_LOG_ERR("internal error: no LDB ev_ports\n");
+ DLB2_LOG_ERR("internal error: no LDB ev_ports");
return;
}
@@ -4402,7 +4402,7 @@ dlb2_drain(struct rte_eventdev *dev)
rte_event_port_unlink(dev_id, ev_port->id, NULL, 0);
if (rte_errno) {
- DLB2_LOG_ERR("internal error: failed to unlink ev_port %d\n",
+ DLB2_LOG_ERR("internal error: failed to unlink ev_port %d",
ev_port->id);
return;
}
@@ -4420,7 +4420,7 @@ dlb2_drain(struct rte_eventdev *dev)
/* Link the ev_port to the queue */
ret = rte_event_port_link(dev_id, ev_port->id, &qid, &prio, 1);
if (ret != 1) {
- DLB2_LOG_ERR("internal error: failed to link ev_port %d to queue %d\n",
+ DLB2_LOG_ERR("internal error: failed to link ev_port %d to queue %d",
ev_port->id, qid);
return;
}
@@ -4435,7 +4435,7 @@ dlb2_drain(struct rte_eventdev *dev)
/* Unlink the ev_port from the queue */
ret = rte_event_port_unlink(dev_id, ev_port->id, &qid, 1);
if (ret != 1) {
- DLB2_LOG_ERR("internal error: failed to unlink ev_port %d to queue %d\n",
+ DLB2_LOG_ERR("internal error: failed to unlink ev_port %d to queue %d",
ev_port->id, qid);
return;
}
@@ -4454,7 +4454,7 @@ dlb2_eventdev_stop(struct rte_eventdev *dev)
rte_spinlock_unlock(&dlb2->qm_instance.resource_lock);
return;
} else if (dlb2->run_state != DLB2_RUN_STATE_STARTED) {
- DLB2_LOG_ERR("Internal error: bad state %d for dev_stop\n",
+ DLB2_LOG_ERR("Internal error: bad state %d for dev_stop",
(int)dlb2->run_state);
rte_spinlock_unlock(&dlb2->qm_instance.resource_lock);
return;
@@ -4610,7 +4610,7 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
err = dlb2_iface_open(&dlb2->qm_instance, name);
if (err < 0) {
- DLB2_LOG_ERR("could not open event hardware device, err=%d\n",
+ DLB2_LOG_ERR("could not open event hardware device, err=%d",
err);
return err;
}
@@ -4618,14 +4618,14 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
err = dlb2_iface_get_device_version(&dlb2->qm_instance,
&dlb2->revision);
if (err < 0) {
- DLB2_LOG_ERR("dlb2: failed to get the device version, err=%d\n",
+ DLB2_LOG_ERR("dlb2: failed to get the device version, err=%d",
err);
return err;
}
err = dlb2_hw_query_resources(dlb2);
if (err) {
- DLB2_LOG_ERR("get resources err=%d for %s\n",
+ DLB2_LOG_ERR("get resources err=%d for %s",
err, name);
return err;
}
@@ -4648,7 +4648,7 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
break;
}
if (ret) {
- DLB2_LOG_ERR("dlb2: failed to configure class of service, err=%d\n",
+ DLB2_LOG_ERR("dlb2: failed to configure class of service, err=%d",
err);
return err;
}
@@ -4656,7 +4656,7 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
err = dlb2_iface_get_cq_poll_mode(&dlb2->qm_instance, &dlb2->poll_mode);
if (err < 0) {
- DLB2_LOG_ERR("dlb2: failed to get the poll mode, err=%d\n",
+ DLB2_LOG_ERR("dlb2: failed to get the poll mode, err=%d",
err);
return err;
}
@@ -4664,7 +4664,7 @@ dlb2_primary_eventdev_probe(struct rte_eventdev *dev,
/* Complete xtstats runtime initialization */
err = dlb2_xstats_init(dlb2);
if (err) {
- DLB2_LOG_ERR("dlb2: failed to init xstats, err=%d\n", err);
+ DLB2_LOG_ERR("dlb2: failed to init xstats, err=%d", err);
return err;
}
@@ -4694,14 +4694,14 @@ dlb2_secondary_eventdev_probe(struct rte_eventdev *dev,
err = dlb2_iface_open(&dlb2->qm_instance, name);
if (err < 0) {
- DLB2_LOG_ERR("could not open event hardware device, err=%d\n",
+ DLB2_LOG_ERR("could not open event hardware device, err=%d",
err);
return err;
}
err = dlb2_hw_query_resources(dlb2);
if (err) {
- DLB2_LOG_ERR("get resources err=%d for %s\n",
+ DLB2_LOG_ERR("get resources err=%d for %s",
err, name);
return err;
}
diff --git a/drivers/event/dlb2/dlb2_xstats.c b/drivers/event/dlb2/dlb2_xstats.c
index 22094f30bb..c037cfe786 100644
--- a/drivers/event/dlb2/dlb2_xstats.c
+++ b/drivers/event/dlb2/dlb2_xstats.c
@@ -766,7 +766,7 @@ dlb2_xstats_update(struct dlb2_eventdev *dlb2,
fn = get_queue_stat;
break;
default:
- DLB2_LOG_ERR("Unexpected xstat fn_id %d\n", xs->fn_id);
+ DLB2_LOG_ERR("Unexpected xstat fn_id %d", xs->fn_id);
goto invalid_value;
}
@@ -827,7 +827,7 @@ dlb2_eventdev_xstats_get_by_name(const struct rte_eventdev *dev,
fn = get_queue_stat;
break;
default:
- DLB2_LOG_ERR("Unexpected xstat fn_id %d\n",
+ DLB2_LOG_ERR("Unexpected xstat fn_id %d",
xs->fn_id);
return (uint64_t)-1;
}
@@ -865,7 +865,7 @@ dlb2_xstats_reset_range(struct dlb2_eventdev *dlb2, uint32_t start,
fn = get_queue_stat;
break;
default:
- DLB2_LOG_ERR("Unexpected xstat fn_id %d\n", xs->fn_id);
+ DLB2_LOG_ERR("Unexpected xstat fn_id %d", xs->fn_id);
return;
}
diff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c
index a95d3227a4..89eabc2a93 100644
--- a/drivers/event/dlb2/pf/dlb2_main.c
+++ b/drivers/event/dlb2/pf/dlb2_main.c
@@ -72,7 +72,7 @@ static int dlb2_pf_wait_for_device_ready(struct dlb2_dev *dlb2_dev,
};
if (retries == DLB2_READY_RETRY_LIMIT) {
- DLB2_LOG_ERR("[%s()] wait for device ready timed out\n",
+ DLB2_LOG_ERR("[%s()] wait for device ready timed out",
__func__);
return -1;
}
@@ -214,7 +214,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
pcie_cap_offset = rte_pci_find_capability(pdev, RTE_PCI_CAP_ID_EXP);
if (pcie_cap_offset < 0) {
- DLB2_LOG_ERR("[%s()] failed to find the pcie capability\n",
+ DLB2_LOG_ERR("[%s()] failed to find the pcie capability",
__func__);
return pcie_cap_offset;
}
@@ -261,7 +261,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = RTE_PCI_COMMAND;
cmd = 0;
if (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pci command\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pci command",
__func__);
return ret;
}
@@ -273,7 +273,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_DEVSTA;
ret = rte_pci_read_config(pdev, &devsta_busy_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to read the pci device status\n",
+ DLB2_LOG_ERR("[%s()] failed to read the pci device status",
__func__);
return ret;
}
@@ -286,7 +286,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
}
if (wait_count == 4) {
- DLB2_LOG_ERR("[%s()] wait for pci pending transactions timed out\n",
+ DLB2_LOG_ERR("[%s()] wait for pci pending transactions timed out",
__func__);
return -1;
}
@@ -294,7 +294,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_DEVCTL;
ret = rte_pci_read_config(pdev, &devctl_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to read the pcie device control\n",
+ DLB2_LOG_ERR("[%s()] failed to read the pcie device control",
__func__);
return ret;
}
@@ -303,7 +303,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
ret = rte_pci_write_config(pdev, &devctl_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie device control\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie device control",
__func__);
return ret;
}
@@ -316,7 +316,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_DEVCTL;
ret = rte_pci_write_config(pdev, &dev_ctl_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie device control at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie device control at offset %d",
__func__, (int)off);
return ret;
}
@@ -324,7 +324,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_LNKCTL;
ret = rte_pci_write_config(pdev, &lnk_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -332,7 +332,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_SLTCTL;
ret = rte_pci_write_config(pdev, &slt_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -340,7 +340,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_RTCTL;
ret = rte_pci_write_config(pdev, &rt_ctl_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -348,7 +348,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_DEVCTL2;
ret = rte_pci_write_config(pdev, &dev_ctl2_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -356,7 +356,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_LNKCTL2;
ret = rte_pci_write_config(pdev, &lnk_word2, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -364,7 +364,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pcie_cap_offset + RTE_PCI_EXP_SLTCTL2;
ret = rte_pci_write_config(pdev, &slt_word2, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -376,7 +376,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pri_cap_offset + RTE_PCI_PRI_ALLOC_REQ;
ret = rte_pci_write_config(pdev, &pri_reqs_dword, 4, off);
if (ret != 4) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -384,7 +384,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = pri_cap_offset + RTE_PCI_PRI_CTRL;
ret = rte_pci_write_config(pdev, &pri_ctrl_word, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -402,7 +402,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
ret = rte_pci_write_config(pdev, &tmp, 4, off);
if (ret != 4) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -413,7 +413,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
ret = rte_pci_write_config(pdev, &tmp, 4, off);
if (ret != 4) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -424,7 +424,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
ret = rte_pci_write_config(pdev, &tmp, 4, off);
if (ret != 4) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -434,7 +434,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = (i - 1) * 4;
ret = rte_pci_write_config(pdev, &dword[i - 1], 4, off);
if (ret != 4) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -444,7 +444,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
if (rte_pci_read_config(pdev, &cmd, 2, off) == 2) {
cmd &= ~RTE_PCI_COMMAND_INTX_DISABLE;
if (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pci command\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pci command",
__func__);
return ret;
}
@@ -457,7 +457,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
cmd |= RTE_PCI_MSIX_FLAGS_ENABLE;
cmd |= RTE_PCI_MSIX_FLAGS_MASKALL;
if (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {
- DLB2_LOG_ERR("[%s()] failed to write msix flags\n",
+ DLB2_LOG_ERR("[%s()] failed to write msix flags",
__func__);
return ret;
}
@@ -467,7 +467,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
if (rte_pci_read_config(pdev, &cmd, 2, off) == 2) {
cmd &= ~RTE_PCI_MSIX_FLAGS_MASKALL;
if (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {
- DLB2_LOG_ERR("[%s()] failed to write msix flags\n",
+ DLB2_LOG_ERR("[%s()] failed to write msix flags",
__func__);
return ret;
}
@@ -493,7 +493,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
ret = rte_pci_write_config(pdev, &acs_ctrl, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -509,7 +509,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
off = acs_cap_offset + RTE_PCI_ACS_CTRL;
ret = rte_pci_write_config(pdev, &acs_ctrl, 2, off);
if (ret != 2) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return ret;
}
@@ -520,7 +520,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
*/
off = DLB2_PCI_PASID_CAP_OFFSET;
if (rte_pci_pasid_set_state(pdev, off, false) < 0) {
- DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+ DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d",
__func__, (int)off);
return -1;
}
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index b3576e5f42..ed4e6e424c 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -336,7 +336,7 @@ dlb2_pf_ldb_port_create(struct dlb2_hw_dev *handle,
/* Lock the page in memory */
ret = rte_mem_lock_page(port_base);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2 pf pmd could not lock page for device i/o\n");
+ DLB2_LOG_ERR("dlb2 pf pmd could not lock page for device i/o");
goto create_port_err;
}
@@ -411,7 +411,7 @@ dlb2_pf_dir_port_create(struct dlb2_hw_dev *handle,
/* Lock the page in memory */
ret = rte_mem_lock_page(port_base);
if (ret < 0) {
- DLB2_LOG_ERR("dlb2 pf pmd could not lock page for device i/o\n");
+ DLB2_LOG_ERR("dlb2 pf pmd could not lock page for device i/o");
goto create_port_err;
}
@@ -737,7 +737,7 @@ dlb2_eventdev_pci_init(struct rte_eventdev *eventdev)
&dlb2_args,
dlb2->version);
if (ret) {
- DLB2_LOG_ERR("PFPMD failed to parse args ret=%d, errno=%d\n",
+ DLB2_LOG_ERR("PFPMD failed to parse args ret=%d, errno=%d",
ret, rte_errno);
goto dlb2_probe_failed;
}
@@ -748,7 +748,7 @@ dlb2_eventdev_pci_init(struct rte_eventdev *eventdev)
dlb2->qm_instance.pf_dev = dlb2_probe(pci_dev, probe_args);
if (dlb2->qm_instance.pf_dev == NULL) {
- DLB2_LOG_ERR("DLB2 PF Probe failed with error %d\n",
+ DLB2_LOG_ERR("DLB2 PF Probe failed with error %d",
rte_errno);
ret = -rte_errno;
goto dlb2_probe_failed;
@@ -766,13 +766,13 @@ dlb2_eventdev_pci_init(struct rte_eventdev *eventdev)
if (ret)
goto dlb2_probe_failed;
- DLB2_LOG_INFO("DLB2 PF Probe success\n");
+ DLB2_LOG_INFO("DLB2 PF Probe success");
return 0;
dlb2_probe_failed:
- DLB2_LOG_INFO("DLB2 PF Probe failed, ret=%d\n", ret);
+ DLB2_LOG_INFO("DLB2 PF Probe failed, ret=%d", ret);
return ret;
}
@@ -811,7 +811,7 @@ event_dlb2_pci_probe(struct rte_pci_driver *pci_drv,
event_dlb2_pf_name);
if (ret) {
DLB2_LOG_INFO("rte_event_pmd_pci_probe_named() failed, "
- "ret=%d\n", ret);
+ "ret=%d", ret);
}
return ret;
@@ -826,7 +826,7 @@ event_dlb2_pci_remove(struct rte_pci_device *pci_dev)
if (ret) {
DLB2_LOG_INFO("rte_event_pmd_pci_remove() failed, "
- "ret=%d\n", ret);
+ "ret=%d", ret);
}
return ret;
@@ -845,7 +845,7 @@ event_dlb2_5_pci_probe(struct rte_pci_driver *pci_drv,
event_dlb2_pf_name);
if (ret) {
DLB2_LOG_INFO("rte_event_pmd_pci_probe_named() failed, "
- "ret=%d\n", ret);
+ "ret=%d", ret);
}
return ret;
@@ -860,7 +860,7 @@ event_dlb2_5_pci_remove(struct rte_pci_device *pci_dev)
if (ret) {
DLB2_LOG_INFO("rte_event_pmd_pci_remove() failed, "
- "ret=%d\n", ret);
+ "ret=%d", ret);
}
return ret;
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 1273455673..f0b2c7de99 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -74,7 +74,7 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[],
ret = dpaa2_affine_qbman_swp();
if (ret < 0) {
DPAA2_EVENTDEV_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -276,7 +276,7 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[],
ret = dpaa2_affine_qbman_swp();
if (ret < 0) {
DPAA2_EVENTDEV_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -851,7 +851,7 @@ dpaa2_eventdev_crypto_queue_add_all(const struct rte_eventdev *dev,
for (i = 0; i < cryptodev->data->nb_queue_pairs; i++) {
ret = dpaa2_sec_eventq_attach(cryptodev, i, dpcon, ev);
if (ret) {
- DPAA2_EVENTDEV_ERR("dpaa2_sec_eventq_attach failed: ret %d\n",
+ DPAA2_EVENTDEV_ERR("dpaa2_sec_eventq_attach failed: ret %d",
ret);
goto fail;
}
@@ -885,7 +885,7 @@ dpaa2_eventdev_crypto_queue_add(const struct rte_eventdev *dev,
dpcon, &conf->ev);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_attach failed: ret: %d\n", ret);
+ "dpaa2_sec_eventq_attach failed: ret: %d", ret);
return ret;
}
return 0;
@@ -905,7 +905,7 @@ dpaa2_eventdev_crypto_queue_del_all(const struct rte_eventdev *dev,
ret = dpaa2_sec_eventq_detach(cdev, i);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_detach failed:ret %d\n", ret);
+ "dpaa2_sec_eventq_detach failed:ret %d", ret);
return ret;
}
}
@@ -928,7 +928,7 @@ dpaa2_eventdev_crypto_queue_del(const struct rte_eventdev *dev,
ret = dpaa2_sec_eventq_detach(cryptodev, rx_queue_id);
if (ret) {
DPAA2_EVENTDEV_ERR(
- "dpaa2_sec_eventq_detach failed: ret: %d\n", ret);
+ "dpaa2_sec_eventq_detach failed: ret: %d", ret);
return ret;
}
@@ -1161,7 +1161,7 @@ dpaa2_eventdev_destroy(const char *name)
eventdev = rte_event_pmd_get_named_dev(name);
if (eventdev == NULL) {
- RTE_EDEV_LOG_ERR("eventdev with name %s not allocated", name);
+ DPAA2_EVENTDEV_ERR("eventdev with name %s not allocated", name);
return -1;
}
diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index 090b3ed183..82f17144a6 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -196,7 +196,7 @@ timvf_ring_start(const struct rte_event_timer_adapter *adptr)
timr->tck_int = NSEC2CLK(timr->tck_nsec, rte_get_timer_hz());
timr->fast_div = rte_reciprocal_value_u64(timr->tck_int);
timvf_log_info("nb_bkts %d min_ns %"PRIu64" min_cyc %"PRIu64""
- " maxtmo %"PRIu64"\n",
+ " maxtmo %"PRIu64,
timr->nb_bkts, timr->tck_nsec, interval,
timr->max_tout);
diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index b34a5fcacd..25853166bf 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -99,7 +99,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (unlikely(dev->data->dev_started)) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to link queue (%u) to port %d while device started\n",
+ "Attempt to link queue (%u) to port %d while device started",
dev->data->dev_id,
queues[0],
p->id);
@@ -110,7 +110,7 @@ opdl_port_link(struct rte_eventdev *dev,
/* Max of 1 queue per port */
if (num > 1) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to link more than one queue (%u) to port %d requested\n",
+ "Attempt to link more than one queue (%u) to port %d requested",
dev->data->dev_id,
num,
p->id);
@@ -120,7 +120,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (!p->configured) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "port %d not configured, cannot link to %u\n",
+ "port %d not configured, cannot link to %u",
dev->data->dev_id,
p->id,
queues[0]);
@@ -130,7 +130,7 @@ opdl_port_link(struct rte_eventdev *dev,
if (p->external_qid != OPDL_INVALID_QID) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "port %d already linked to queue %u, cannot link to %u\n",
+ "port %d already linked to queue %u, cannot link to %u",
dev->data->dev_id,
p->id,
p->external_qid,
@@ -157,7 +157,7 @@ opdl_port_unlink(struct rte_eventdev *dev,
if (unlikely(dev->data->dev_started)) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to unlink queue (%u) to port %d while device started\n",
+ "Attempt to unlink queue (%u) to port %d while device started",
dev->data->dev_id,
queues[0],
p->id);
@@ -188,7 +188,7 @@ opdl_port_setup(struct rte_eventdev *dev,
/* Check if port already configured */
if (p->configured) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Attempt to setup port %d which is already setup\n",
+ "Attempt to setup port %d which is already setup",
dev->data->dev_id,
p->id);
return -EDQUOT;
@@ -244,7 +244,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
/* Extra sanity check, probably not needed */
if (queue_id == OPDL_INVALID_QID) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Invalid queue id %u requested\n",
+ "Invalid queue id %u requested",
dev->data->dev_id,
queue_id);
return -EINVAL;
@@ -252,7 +252,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
if (device->nb_q_md > device->max_queue_nb) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Max number of queues %u exceeded by request %u\n",
+ "Max number of queues %u exceeded by request %u",
dev->data->dev_id,
device->max_queue_nb,
device->nb_q_md);
@@ -262,7 +262,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
if (RTE_EVENT_QUEUE_CFG_ALL_TYPES
& conf->event_queue_cfg) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "QUEUE_CFG_ALL_TYPES not supported\n",
+ "QUEUE_CFG_ALL_TYPES not supported",
dev->data->dev_id);
return -ENOTSUP;
} else if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK
@@ -281,7 +281,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
break;
default:
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "Unknown queue type %d requested\n",
+ "Unknown queue type %d requested",
dev->data->dev_id,
conf->event_queue_cfg);
return -EINVAL;
@@ -292,7 +292,7 @@ opdl_queue_setup(struct rte_eventdev *dev,
for (i = 0; i < device->nb_q_md; i++) {
if (device->q_md[i].ext_id == queue_id) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "queue id %u already setup\n",
+ "queue id %u already setup",
dev->data->dev_id,
queue_id);
return -EINVAL;
@@ -352,7 +352,7 @@ opdl_dev_configure(const struct rte_eventdev *dev)
if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
- "DEQUEUE_TIMEOUT not supported\n",
+ "DEQUEUE_TIMEOUT not supported",
dev->data->dev_id);
return -ENOTSUP;
}
@@ -662,7 +662,7 @@ opdl_probe(struct rte_vdev_device *vdev)
if (!kvlist) {
PMD_DRV_LOG(INFO,
- "Ignoring unsupported parameters when creating device '%s'\n",
+ "Ignoring unsupported parameters when creating device '%s'",
name);
} else {
int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
@@ -709,7 +709,7 @@ opdl_probe(struct rte_vdev_device *vdev)
PMD_DRV_LOG(INFO, "DEV_ID:[%02d] : "
"Success - creating eventdev device %s, numa_node:[%d], do_validation:[%s]"
- " , self_test:[%s]\n",
+ " , self_test:[%s]",
dev->data->dev_id,
name,
socket_id,
@@ -753,7 +753,7 @@ opdl_remove(struct rte_vdev_device *vdev)
if (name == NULL)
return -EINVAL;
- PMD_DRV_LOG(INFO, "Closing eventdev opdl device %s\n", name);
+ PMD_DRV_LOG(INFO, "Closing eventdev opdl device %s", name);
return rte_event_pmd_vdev_uninit(name);
}
diff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c
index b69c4769dc..9b0c4db5ce 100644
--- a/drivers/event/opdl/opdl_test.c
+++ b/drivers/event/opdl/opdl_test.c
@@ -101,7 +101,7 @@ init(struct test *t, int nb_queues, int nb_ports)
ret = rte_event_dev_configure(evdev, &config);
if (ret < 0)
- PMD_DRV_LOG(ERR, "%d: Error configuring device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error configuring device", __LINE__);
return ret;
};
@@ -119,7 +119,7 @@ create_ports(struct test *t, int num_ports)
for (i = 0; i < num_ports; i++) {
if (rte_event_port_setup(evdev, i, &conf) < 0) {
- PMD_DRV_LOG(ERR, "Error setting up port %d\n", i);
+ PMD_DRV_LOG(ERR, "Error setting up port %d", i);
return -1;
}
t->port[i] = i;
@@ -158,7 +158,7 @@ create_queues_type(struct test *t, int num_qids, enum queue_type flags)
for (i = t->nb_qids ; i < t->nb_qids + num_qids; i++) {
if (rte_event_queue_setup(evdev, i, &conf) < 0) {
- PMD_DRV_LOG(ERR, "%d: error creating qid %d\n ",
+ PMD_DRV_LOG(ERR, "%d: error creating qid %d ",
__LINE__, i);
return -1;
}
@@ -180,7 +180,7 @@ cleanup(struct test *t __rte_unused)
{
rte_event_dev_stop(evdev);
rte_event_dev_close(evdev);
- PMD_DRV_LOG(ERR, "clean up for test done\n");
+ PMD_DRV_LOG(ERR, "clean up for test done");
return 0;
};
@@ -202,7 +202,7 @@ ordered_basic(struct test *t)
if (init(t, 2, tx_port+1) < 0 ||
create_ports(t, tx_port+1) < 0 ||
create_queues_type(t, 2, OPDL_Q_TYPE_ORDERED)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -226,7 +226,7 @@ ordered_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[i], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n",
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid",
__LINE__);
cleanup(t);
return -1;
@@ -236,13 +236,13 @@ ordered_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[tx_port], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping TX qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping TX qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error with start call\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error with start call", __LINE__);
return -1;
}
/* Enqueue 3 packets to the rx port */
@@ -250,7 +250,7 @@ ordered_basic(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -262,7 +262,7 @@ ordered_basic(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__, i, err);
return -1;
}
@@ -278,7 +278,7 @@ ordered_basic(struct test *t)
deq_pkts = rte_event_dequeue_burst(evdev, t->port[i],
&deq_ev[i], 1, 0);
if (deq_pkts != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to deq\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Failed to deq", __LINE__);
rte_event_dev_dump(evdev, stdout);
return -1;
}
@@ -286,7 +286,7 @@ ordered_basic(struct test *t)
if (seq != (i-1)) {
PMD_DRV_LOG(ERR, " seq test failed ! eq is %d , "
- "port number is %u\n", seq, i);
+ "port number is %u", seq, i);
return -1;
}
}
@@ -298,7 +298,7 @@ ordered_basic(struct test *t)
deq_ev[i].queue_id = t->qid[1];
err = rte_event_enqueue_burst(evdev, t->port[i], &deq_ev[i], 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue", __LINE__);
return -1;
}
}
@@ -309,7 +309,7 @@ ordered_basic(struct test *t)
/* Check to see if we've got all 3 packets */
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
rte_event_dev_dump(evdev, stdout);
return 1;
@@ -339,7 +339,7 @@ atomic_basic(struct test *t)
if (init(t, 2, tx_port+1) < 0 ||
create_ports(t, tx_port+1) < 0 ||
create_queues_type(t, 2, OPDL_Q_TYPE_ATOMIC)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -364,7 +364,7 @@ atomic_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[i], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n",
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid",
__LINE__);
cleanup(t);
return -1;
@@ -374,13 +374,13 @@ atomic_basic(struct test *t)
err = rte_event_port_link(evdev, t->port[tx_port], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping TX qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping TX qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error with start call\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error with start call", __LINE__);
return -1;
}
@@ -389,7 +389,7 @@ atomic_basic(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -402,7 +402,7 @@ atomic_basic(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__, i, err);
return -1;
}
@@ -419,7 +419,7 @@ atomic_basic(struct test *t)
if (t->port[i] != 2) {
if (deq_pkts != 0) {
- PMD_DRV_LOG(ERR, "%d: deq none zero !\n",
+ PMD_DRV_LOG(ERR, "%d: deq none zero !",
__LINE__);
rte_event_dev_dump(evdev, stdout);
return -1;
@@ -427,7 +427,7 @@ atomic_basic(struct test *t)
} else {
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: deq not eqal to 3 %u !\n",
+ PMD_DRV_LOG(ERR, "%d: deq not eqal to 3 %u !",
__LINE__, deq_pkts);
rte_event_dev_dump(evdev, stdout);
return -1;
@@ -444,7 +444,7 @@ atomic_basic(struct test *t)
if (err != 3) {
PMD_DRV_LOG(ERR, "port %d: Failed to enqueue pkt %u, "
- "retval = %u\n",
+ "retval = %u",
t->port[i], 3, err);
return -1;
}
@@ -460,7 +460,7 @@ atomic_basic(struct test *t)
/* Check to see if we've got all 3 packets */
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 3 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
rte_event_dev_dump(evdev, stdout);
return 1;
@@ -568,7 +568,7 @@ single_link_w_stats(struct test *t)
create_ports(t, 3) < 0 || /* 0,1,2 */
create_queues_type(t, 1, OPDL_Q_TYPE_SINGLE_LINK) < 0 ||
create_queues_type(t, 1, OPDL_Q_TYPE_ORDERED) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -587,7 +587,7 @@ single_link_w_stats(struct test *t)
err = rte_event_port_link(evdev, t->port[1], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]\n",
+ PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]",
__LINE__,
t->port[1],
t->qid[0]);
@@ -598,7 +598,7 @@ single_link_w_stats(struct test *t)
err = rte_event_port_link(evdev, t->port[2], &t->qid[1], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]\n",
+ PMD_DRV_LOG(ERR, "%d: error linking port:[%u] to queue:[%u]",
__LINE__,
t->port[2],
t->qid[1]);
@@ -607,7 +607,7 @@ single_link_w_stats(struct test *t)
}
if (rte_event_dev_start(evdev) != 0) {
- PMD_DRV_LOG(ERR, "%d: failed to start device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: failed to start device", __LINE__);
cleanup(t);
return -1;
}
@@ -619,7 +619,7 @@ single_link_w_stats(struct test *t)
struct rte_event ev;
mbufs[i] = rte_gen_arp(0, t->mbuf_pool);
if (!mbufs[i]) {
- PMD_DRV_LOG(ERR, "%d: gen of pkt failed\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: gen of pkt failed", __LINE__);
return -1;
}
@@ -631,7 +631,7 @@ single_link_w_stats(struct test *t)
/* generate pkt and enqueue */
err = rte_event_enqueue_burst(evdev, t->port[rx_port], &ev, 1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u\n",
+ PMD_DRV_LOG(ERR, "%d: Failed to enqueue pkt %u, retval = %u",
__LINE__,
t->port[rx_port],
err);
@@ -647,7 +647,7 @@ single_link_w_stats(struct test *t)
deq_ev, 3, 0);
if (deq_pkts != 3) {
- PMD_DRV_LOG(ERR, "%d: deq not 3 !\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: deq not 3 !", __LINE__);
cleanup(t);
return -1;
}
@@ -662,7 +662,7 @@ single_link_w_stats(struct test *t)
NEW_NUM_PACKETS);
if (deq_pkts != 2) {
- PMD_DRV_LOG(ERR, "%d: enq not 2 but %u!\n", __LINE__, deq_pkts);
+ PMD_DRV_LOG(ERR, "%d: enq not 2 but %u!", __LINE__, deq_pkts);
cleanup(t);
return -1;
}
@@ -676,7 +676,7 @@ single_link_w_stats(struct test *t)
/* Check to see if we've got all 2 packets */
if (deq_pkts != 2) {
- PMD_DRV_LOG(ERR, "%d: expected 2 pkts at tx port got %d from port %d\n",
+ PMD_DRV_LOG(ERR, "%d: expected 2 pkts at tx port got %d from port %d",
__LINE__, deq_pkts, tx_port);
cleanup(t);
return -1;
@@ -706,7 +706,7 @@ single_link(struct test *t)
create_ports(t, 3) < 0 || /* 0,1,2 */
create_queues_type(t, 1, OPDL_Q_TYPE_SINGLE_LINK) < 0 ||
create_queues_type(t, 1, OPDL_Q_TYPE_ORDERED) < 0) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -725,7 +725,7 @@ single_link(struct test *t)
err = rte_event_port_link(evdev, t->port[1], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid", __LINE__);
cleanup(t);
return -1;
}
@@ -733,14 +733,14 @@ single_link(struct test *t)
err = rte_event_port_link(evdev, t->port[2], &t->qid[0], NULL,
1);
if (err != 1) {
- PMD_DRV_LOG(ERR, "%d: error mapping lb qid\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: error mapping lb qid", __LINE__);
cleanup(t);
return -1;
}
if (rte_event_dev_start(evdev) == 0) {
PMD_DRV_LOG(ERR, "%d: start DIDN'T FAIL with more than 1 "
- "SINGLE_LINK PORT\n", __LINE__);
+ "SINGLE_LINK PORT", __LINE__);
cleanup(t);
return -1;
}
@@ -789,7 +789,7 @@ qid_basic(struct test *t)
if (init(t, NUM_QUEUES, NUM_QUEUES+1) < 0 ||
create_ports(t, NUM_QUEUES+1) < 0 ||
create_queues_type(t, NUM_QUEUES, OPDL_Q_TYPE_ORDERED)) {
- PMD_DRV_LOG(ERR, "%d: Error initializing device\n", __LINE__);
+ PMD_DRV_LOG(ERR, "%d: Error initializing device", __LINE__);
return -1;
}
@@ -805,7 +805,7 @@ qid_basic(struct test *t)
if (nb_linked != 1) {
- PMD_DRV_LOG(ERR, "%s:%d: error mapping port:%u to queue:%u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: error mapping port:%u to queue:%u",
__FILE__,
__LINE__,
i + 1,
@@ -826,7 +826,7 @@ qid_basic(struct test *t)
&t_qid,
NULL,
1) > 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Second call to port link on same port DID NOT fail\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Second call to port link on same port DID NOT fail",
__FILE__,
__LINE__);
err = -1;
@@ -841,7 +841,7 @@ qid_basic(struct test *t)
BATCH_SIZE,
0);
if (test_num_events != 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing 0 packets from port %u on stopped device\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing 0 packets from port %u on stopped device",
__FILE__,
__LINE__,
p_id);
@@ -855,7 +855,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (test_num_events != 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing 0 packets to port %u on stopped device\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing 0 packets to port %u on stopped device",
__FILE__,
__LINE__,
p_id);
@@ -868,7 +868,7 @@ qid_basic(struct test *t)
/* Start the device */
if (!err) {
if (rte_event_dev_start(evdev) < 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Error with start call\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error with start call",
__FILE__,
__LINE__);
err = -1;
@@ -884,7 +884,7 @@ qid_basic(struct test *t)
&t_qid,
NULL,
1) > 0) {
- PMD_DRV_LOG(ERR, "%s:%d: Call to port link on started device DID NOT fail\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Call to port link on started device DID NOT fail",
__FILE__,
__LINE__);
err = -1;
@@ -904,7 +904,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing rx packets\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing rx packets",
__FILE__,
__LINE__);
err = -1;
@@ -921,7 +921,7 @@ qid_basic(struct test *t)
0);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from port %u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from port %u",
__FILE__,
__LINE__,
p_id);
@@ -930,7 +930,7 @@ qid_basic(struct test *t)
}
if (ev[0].queue_id != q_id) {
- PMD_DRV_LOG(ERR, "%s:%d: Error event portid[%u] q_id:[%u] does not match expected:[%u]\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error event portid[%u] q_id:[%u] does not match expected:[%u]",
__FILE__,
__LINE__,
p_id,
@@ -949,7 +949,7 @@ qid_basic(struct test *t)
ev,
BATCH_SIZE);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing packets from port:%u to queue:%u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error enqueuing packets from port:%u to queue:%u",
__FILE__,
__LINE__,
p_id,
@@ -967,7 +967,7 @@ qid_basic(struct test *t)
BATCH_SIZE,
0);
if (num_events != BATCH_SIZE) {
- PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from tx port %u\n",
+ PMD_DRV_LOG(ERR, "%s:%d: Error dequeuing packets from tx port %u",
__FILE__,
__LINE__,
p_id);
@@ -993,17 +993,17 @@ opdl_selftest(void)
evdev = rte_event_dev_get_dev_id(eventdev_name);
if (evdev < 0) {
- PMD_DRV_LOG(ERR, "%d: Eventdev %s not found - creating.\n",
+ PMD_DRV_LOG(ERR, "%d: Eventdev %s not found - creating.",
__LINE__, eventdev_name);
/* turn on stats by default */
if (rte_vdev_init(eventdev_name, "do_validation=1") < 0) {
- PMD_DRV_LOG(ERR, "Error creating eventdev\n");
+ PMD_DRV_LOG(ERR, "Error creating eventdev");
free(t);
return -1;
}
evdev = rte_event_dev_get_dev_id(eventdev_name);
if (evdev < 0) {
- PMD_DRV_LOG(ERR, "Error finding newly created eventdev\n");
+ PMD_DRV_LOG(ERR, "Error finding newly created eventdev");
free(t);
return -1;
}
@@ -1019,27 +1019,27 @@ opdl_selftest(void)
512, /* use very small mbufs */
rte_socket_id());
if (!eventdev_func_mempool) {
- PMD_DRV_LOG(ERR, "ERROR creating mempool\n");
+ PMD_DRV_LOG(ERR, "ERROR creating mempool");
free(t);
return -1;
}
}
t->mbuf_pool = eventdev_func_mempool;
- PMD_DRV_LOG(ERR, "*** Running Ordered Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running Ordered Basic test...");
ret = ordered_basic(t);
- PMD_DRV_LOG(ERR, "*** Running Atomic Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running Atomic Basic test...");
ret = atomic_basic(t);
- PMD_DRV_LOG(ERR, "*** Running QID Basic test...\n");
+ PMD_DRV_LOG(ERR, "*** Running QID Basic test...");
ret = qid_basic(t);
- PMD_DRV_LOG(ERR, "*** Running SINGLE LINK failure test...\n");
+ PMD_DRV_LOG(ERR, "*** Running SINGLE LINK failure test...");
ret = single_link(t);
- PMD_DRV_LOG(ERR, "*** Running SINGLE LINK w stats test...\n");
+ PMD_DRV_LOG(ERR, "*** Running SINGLE LINK w stats test...");
ret = single_link_w_stats(t);
/*
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 19a52afc7d..7913bc547e 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -173,7 +173,7 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_id,
dev->data->socket_id,
RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);
if (p->rx_worker_ring == NULL) {
- SW_LOG_ERR("Error creating RX worker ring for port %d\n",
+ SW_LOG_ERR("Error creating RX worker ring for port %d",
port_id);
return -1;
}
@@ -193,7 +193,7 @@ sw_port_setup(struct rte_eventdev *dev, uint8_t port_id,
RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ);
if (p->cq_worker_ring == NULL) {
rte_event_ring_free(p->rx_worker_ring);
- SW_LOG_ERR("Error creating CQ worker ring for port %d\n",
+ SW_LOG_ERR("Error creating CQ worker ring for port %d",
port_id);
return -1;
}
@@ -253,7 +253,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
if (!window_size) {
SW_LOG_DBG(
- "invalid reorder_window_size for ordered queue\n"
+ "invalid reorder_window_size for ordered queue"
);
goto cleanup;
}
@@ -262,7 +262,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
window_size * sizeof(qid->reorder_buffer[0]),
0, socket_id);
if (!qid->reorder_buffer) {
- SW_LOG_DBG("reorder_buffer malloc failed\n");
+ SW_LOG_DBG("reorder_buffer malloc failed");
goto cleanup;
}
@@ -334,7 +334,7 @@ sw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
type = SW_SCHED_TYPE_DIRECT;
} else if (RTE_EVENT_QUEUE_CFG_ALL_TYPES
& conf->event_queue_cfg) {
- SW_LOG_ERR("QUEUE_CFG_ALL_TYPES not supported\n");
+ SW_LOG_ERR("QUEUE_CFG_ALL_TYPES not supported");
return -ENOTSUP;
}
@@ -772,7 +772,7 @@ sw_start(struct rte_eventdev *dev)
/* check a service core is mapped to this service */
if (!rte_service_runstate_get(sw->service_id)) {
- SW_LOG_ERR("Warning: No Service core enabled on service %s\n",
+ SW_LOG_ERR("Warning: No Service core enabled on service %s",
sw->service_name);
return -ENOENT;
}
@@ -780,7 +780,7 @@ sw_start(struct rte_eventdev *dev)
/* check all ports are set up */
for (i = 0; i < sw->port_count; i++)
if (sw->ports[i].rx_worker_ring == NULL) {
- SW_LOG_ERR("Port %d not configured\n", i);
+ SW_LOG_ERR("Port %d not configured", i);
return -ESTALE;
}
@@ -788,7 +788,7 @@ sw_start(struct rte_eventdev *dev)
for (i = 0; i < sw->qid_count; i++)
if (!sw->qids[i].initialized ||
sw->qids[i].cq_num_mapped_cqs == 0) {
- SW_LOG_ERR("Queue %d not configured\n", i);
+ SW_LOG_ERR("Queue %d not configured", i);
return -ENOLINK;
}
@@ -1000,7 +1000,7 @@ sw_probe(struct rte_vdev_device *vdev)
if (!kvlist) {
SW_LOG_INFO(
- "Ignoring unsupported parameters when creating device '%s'\n",
+ "Ignoring unsupported parameters when creating device '%s'",
name);
} else {
int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
@@ -1070,7 +1070,7 @@ sw_probe(struct rte_vdev_device *vdev)
SW_LOG_INFO(
"Creating eventdev sw device %s, numa_node=%d, "
"sched_quanta=%d, credit_quanta=%d "
- "min_burst=%d, deq_burst=%d, refill_once=%d\n",
+ "min_burst=%d, deq_burst=%d, refill_once=%d",
name, socket_id, sched_quanta, credit_quanta,
min_burst_size, deq_burst_size, refill_once);
@@ -1134,7 +1134,7 @@ sw_remove(struct rte_vdev_device *vdev)
if (name == NULL)
return -EINVAL;
- SW_LOG_INFO("Closing eventdev sw device %s\n", name);
+ SW_LOG_INFO("Closing eventdev sw device %s", name);
return rte_event_pmd_vdev_uninit(name);
}
diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
index fbac8f3ab5..076b982ab8 100644
--- a/drivers/event/sw/sw_evdev_xstats.c
+++ b/drivers/event/sw/sw_evdev_xstats.c
@@ -419,7 +419,7 @@ sw_xstats_get_names(const struct rte_eventdev *dev,
start_offset = sw->xstats_offset_for_qid[queue_port_id];
break;
default:
- SW_LOG_ERR("Invalid mode received in sw_xstats_get_names()\n");
+ SW_LOG_ERR("Invalid mode received in sw_xstats_get_names()");
return -EINVAL;
};
@@ -470,7 +470,7 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
xstats_mode_count = sw->xstats_count_per_qid[queue_port_id];
break;
default:
- SW_LOG_ERR("Invalid mode received in sw_xstats_get()\n");
+ SW_LOG_ERR("Invalid mode received in sw_xstats_get()");
goto invalid_value;
};
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 42e17d984c..886fb7fbb0 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -69,7 +69,7 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
goto err1;
}
@@ -213,7 +213,7 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
ret = dpaa2_affine_qbman_swp();
if (ret != 0) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -357,7 +357,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
ret = dpaa2_affine_qbman_swp();
if (ret != 0) {
DPAA2_MEMPOOL_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return ret;
}
@@ -472,7 +472,7 @@ dpaa2_populate(struct rte_mempool *mp, unsigned int max_objs,
msl = rte_mem_virt2memseg_list(vaddr);
if (!msl) {
- DPAA2_MEMPOOL_DEBUG("Memsegment is External.\n");
+ DPAA2_MEMPOOL_DEBUG("Memsegment is External.");
rte_fslmc_vfio_mem_dmamap((size_t)vaddr,
(size_t)paddr, (size_t)len);
}
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 1513c632c6..966fee8bfe 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -134,7 +134,7 @@ octeontx_fpa_gpool_alloc(unsigned int object_size)
if (res->sz128 == 0) {
res->sz128 = sz128;
- fpavf_log_dbg("gpool %d blk_sz %d\n", res->vf_id,
+ fpavf_log_dbg("gpool %d blk_sz %d", res->vf_id,
sz128);
return res->vf_id;
@@ -273,7 +273,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
goto err;
}
- fpavf_log_dbg(" vfid %d gpool %d aid %d pool_cfg 0x%x pool_stack_base %" PRIx64 " pool_stack_end %" PRIx64" aura_cfg %" PRIx64 "\n",
+ fpavf_log_dbg(" vfid %d gpool %d aid %d pool_cfg 0x%x pool_stack_base %" PRIx64 " pool_stack_end %" PRIx64" aura_cfg %" PRIx64,
fpa->vf_id, gpool, cfg.aid, (unsigned int)cfg.pool_cfg,
cfg.pool_stack_base, cfg.pool_stack_end, cfg.aura_cfg);
@@ -351,8 +351,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
sizeof(struct octeontx_mbox_fpa_cfg),
&resp, sizeof(resp));
if (ret < 0) {
- fpavf_log_err("Could not attach fpa ");
- fpavf_log_err("aura %d to pool %d. Err=%d. FuncErr=%d\n",
+ fpavf_log_err("Could not attach fpa aura %d to pool %d. Err=%d. FuncErr=%d",
FPA_AURA_IDX(gpool_index), gpool_index, ret,
hdr.res_code);
ret = -EACCES;
@@ -380,7 +379,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
hdr.vfid = gpool_index;
ret = octeontx_mbox_send(&hdr, &cfg, sizeof(cfg), NULL, 0);
if (ret < 0) {
- fpavf_log_err("Couldn't detach FPA aura %d Err=%d FuncErr=%d\n",
+ fpavf_log_err("Couldn't detach FPA aura %d Err=%d FuncErr=%d",
FPA_AURA_IDX(gpool_index), ret,
hdr.res_code);
ret = -EINVAL;
@@ -428,8 +427,7 @@ octeontx_fpapf_start_count(uint16_t gpool_index)
hdr.vfid = gpool_index;
ret = octeontx_mbox_send(&hdr, NULL, 0, NULL, 0);
if (ret < 0) {
- fpavf_log_err("Could not start buffer counting for ");
- fpavf_log_err("FPA pool %d. Err=%d. FuncErr=%d\n",
+ fpavf_log_err("Could not start buffer counting for FPA pool %d. Err=%d. FuncErr=%d",
gpool_index, ret, hdr.res_code);
ret = -EINVAL;
goto err;
@@ -636,7 +634,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
cnt = fpavf_read64((void *)((uintptr_t)pool_bar +
FPA_VF_VHAURA_CNT(gaura)));
if (cnt) {
- fpavf_log_dbg("buffer exist in pool cnt %" PRId64 "\n", cnt);
+ fpavf_log_dbg("buffer exist in pool cnt %" PRId64, cnt);
return -EBUSY;
}
@@ -664,7 +662,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
(pool_bar + FPA_VF_VHAURA_OP_ALLOC(gaura)));
if (node == NULL) {
- fpavf_log_err("GAURA[%u] missing %" PRIx64 " buf\n",
+ fpavf_log_err("GAURA[%u] missing %" PRIx64 " buf",
gaura, avail);
break;
}
@@ -684,7 +682,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
curr = curr[0]) {
if (curr == curr[0] ||
((uintptr_t)curr != ((uintptr_t)curr[0] - sz))) {
- fpavf_log_err("POOL# %u buf sequence err (%p vs. %p)\n",
+ fpavf_log_err("POOL# %u buf sequence err (%p vs. %p)",
gpool, curr, curr[0]);
}
}
@@ -705,7 +703,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
ret = octeontx_fpapf_aura_detach(gpool);
if (ret) {
- fpavf_log_err("Failed to detach gaura %u. error code=%d\n",
+ fpavf_log_err("Failed to detach gaura %u. error code=%d",
gpool, ret);
}
@@ -757,7 +755,7 @@ octeontx_fpavf_identify(void *bar0)
stack_ln_ptr = fpavf_read64((void *)((uintptr_t)bar0 +
FPA_VF_VHPOOL_THRESHOLD(0)));
if (vf_idx >= FPA_VF_MAX) {
- fpavf_log_err("vf_id(%d) greater than max vf (32)\n", vf_id);
+ fpavf_log_err("vf_id(%d) greater than max vf (32)", vf_id);
return -E2BIG;
}
diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx.c b/drivers/mempool/octeontx/rte_mempool_octeontx.c
index f4de1c8412..631e521b58 100644
--- a/drivers/mempool/octeontx/rte_mempool_octeontx.c
+++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c
@@ -27,11 +27,11 @@ octeontx_fpavf_alloc(struct rte_mempool *mp)
goto _end;
if ((uint32_t)rc != object_size)
- fpavf_log_err("buffer size mismatch: %d instead of %u\n",
+ fpavf_log_err("buffer size mismatch: %d instead of %u",
rc, object_size);
- fpavf_log_info("Pool created %p with .. ", (void *)pool);
- fpavf_log_info("obj_sz %d, cnt %d\n", object_size, memseg_count);
+ fpavf_log_info("Pool created %p with .. obj_sz %d, cnt %d",
+ (void *)pool, object_size, memseg_count);
/* assign pool handle to mempool */
mp->pool_id = (uint64_t)pool;
diff --git a/drivers/ml/cnxk/cn10k_ml_dev.c b/drivers/ml/cnxk/cn10k_ml_dev.c
index 41f3b7a95d..3c328d9d0e 100644
--- a/drivers/ml/cnxk/cn10k_ml_dev.c
+++ b/drivers/ml/cnxk/cn10k_ml_dev.c
@@ -108,14 +108,14 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
kvlist = rte_kvargs_parse(devargs->args, valid_args);
if (kvlist == NULL) {
- plt_err("Error parsing devargs\n");
+ plt_err("Error parsing devargs");
return -EINVAL;
}
if (rte_kvargs_count(kvlist, CN10K_ML_FW_PATH) == 1) {
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_PATH, &parse_string_arg, &fw_path);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_FW_PATH);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_FW_PATH);
ret = -EINVAL;
goto exit;
}
@@ -126,7 +126,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_ENABLE_DPE_WARNINGS,
&parse_integer_arg, &cn10k_mldev->fw.enable_dpe_warnings);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_FW_ENABLE_DPE_WARNINGS);
ret = -EINVAL;
goto exit;
@@ -138,7 +138,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_FW_REPORT_DPE_WARNINGS,
&parse_integer_arg, &cn10k_mldev->fw.report_dpe_warnings);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_FW_REPORT_DPE_WARNINGS);
ret = -EINVAL;
goto exit;
@@ -150,7 +150,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_DEV_CACHE_MODEL_DATA, &parse_integer_arg,
&cn10k_mldev->cache_model_data);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_DEV_CACHE_MODEL_DATA);
ret = -EINVAL;
goto exit;
@@ -162,7 +162,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_OCM_ALLOC_MODE, &parse_string_arg,
&ocm_alloc_mode);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_OCM_ALLOC_MODE);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_OCM_ALLOC_MODE);
ret = -EINVAL;
goto exit;
}
@@ -173,7 +173,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_DEV_HW_QUEUE_LOCK, &parse_integer_arg,
&cn10k_mldev->hw_queue_lock);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n",
+ plt_err("Error processing arguments, key = %s",
CN10K_ML_DEV_HW_QUEUE_LOCK);
ret = -EINVAL;
goto exit;
@@ -185,7 +185,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
ret = rte_kvargs_process(kvlist, CN10K_ML_OCM_PAGE_SIZE, &parse_integer_arg,
&cn10k_mldev->ocm_page_size);
if (ret < 0) {
- plt_err("Error processing arguments, key = %s\n", CN10K_ML_OCM_PAGE_SIZE);
+ plt_err("Error processing arguments, key = %s", CN10K_ML_OCM_PAGE_SIZE);
ret = -EINVAL;
goto exit;
}
@@ -204,7 +204,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if ((cn10k_mldev->fw.enable_dpe_warnings < 0) ||
(cn10k_mldev->fw.enable_dpe_warnings > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_FW_ENABLE_DPE_WARNINGS,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_FW_ENABLE_DPE_WARNINGS,
cn10k_mldev->fw.enable_dpe_warnings);
ret = -EINVAL;
goto exit;
@@ -218,7 +218,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if ((cn10k_mldev->fw.report_dpe_warnings < 0) ||
(cn10k_mldev->fw.report_dpe_warnings > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_FW_REPORT_DPE_WARNINGS,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_FW_REPORT_DPE_WARNINGS,
cn10k_mldev->fw.report_dpe_warnings);
ret = -EINVAL;
goto exit;
@@ -231,7 +231,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->cache_model_data = CN10K_ML_DEV_CACHE_MODEL_DATA_DEFAULT;
} else {
if ((cn10k_mldev->cache_model_data < 0) || (cn10k_mldev->cache_model_data > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_DEV_CACHE_MODEL_DATA,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_DEV_CACHE_MODEL_DATA,
cn10k_mldev->cache_model_data);
ret = -EINVAL;
goto exit;
@@ -244,7 +244,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
} else {
if (!((strcmp(ocm_alloc_mode, "lowest") == 0) ||
(strcmp(ocm_alloc_mode, "largest") == 0))) {
- plt_err("Invalid argument, %s = %s\n", CN10K_ML_OCM_ALLOC_MODE,
+ plt_err("Invalid argument, %s = %s", CN10K_ML_OCM_ALLOC_MODE,
ocm_alloc_mode);
ret = -EINVAL;
goto exit;
@@ -257,7 +257,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->hw_queue_lock = CN10K_ML_DEV_HW_QUEUE_LOCK_DEFAULT;
} else {
if ((cn10k_mldev->hw_queue_lock < 0) || (cn10k_mldev->hw_queue_lock > 1)) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_DEV_HW_QUEUE_LOCK,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_DEV_HW_QUEUE_LOCK,
cn10k_mldev->hw_queue_lock);
ret = -EINVAL;
goto exit;
@@ -269,7 +269,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
cn10k_mldev->ocm_page_size = CN10K_ML_OCM_PAGE_SIZE_DEFAULT;
} else {
if (cn10k_mldev->ocm_page_size < 0) {
- plt_err("Invalid argument, %s = %d\n", CN10K_ML_OCM_PAGE_SIZE,
+ plt_err("Invalid argument, %s = %d", CN10K_ML_OCM_PAGE_SIZE,
cn10k_mldev->ocm_page_size);
ret = -EINVAL;
goto exit;
@@ -284,7 +284,7 @@ cn10k_mldev_parse_devargs(struct rte_devargs *devargs, struct cn10k_ml_dev *cn10
}
if (!found) {
- plt_err("Unsupported ocm_page_size = %d\n", cn10k_mldev->ocm_page_size);
+ plt_err("Unsupported ocm_page_size = %d", cn10k_mldev->ocm_page_size);
ret = -EINVAL;
goto exit;
}
@@ -773,7 +773,7 @@ cn10k_ml_fw_load(struct cnxk_ml_dev *cnxk_mldev)
/* Read firmware image to a buffer */
ret = rte_firmware_read(fw->path, &fw_buffer, &fw_size);
if ((ret < 0) || (fw_buffer == NULL)) {
- plt_err("Unable to read firmware data: %s\n", fw->path);
+ plt_err("Unable to read firmware data: %s", fw->path);
return ret;
}
diff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c
index 971362b242..7bd73727e1 100644
--- a/drivers/ml/cnxk/cnxk_ml_ops.c
+++ b/drivers/ml/cnxk/cnxk_ml_ops.c
@@ -437,7 +437,7 @@ cnxk_ml_model_xstats_reset(struct cnxk_ml_dev *cnxk_mldev, int32_t model_id,
model = cnxk_mldev->mldev->data->models[model_id];
if (model == NULL) {
- plt_err("Invalid model_id = %d\n", model_id);
+ plt_err("Invalid model_id = %d", model_id);
return -EINVAL;
}
}
@@ -454,7 +454,7 @@ cnxk_ml_model_xstats_reset(struct cnxk_ml_dev *cnxk_mldev, int32_t model_id,
} else {
for (j = 0; j < nb_ids; j++) {
if (stat_ids[j] < start_id || stat_ids[j] > end_id) {
- plt_err("Invalid stat_ids[%d] = %d for model_id = %d\n", j,
+ plt_err("Invalid stat_ids[%d] = %d for model_id = %d", j,
stat_ids[j], lcl_model_id);
return -EINVAL;
}
@@ -510,12 +510,12 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co
cnxk_ml_dev_info_get(dev, &dev_info);
if (conf->nb_models > dev_info.max_models) {
- plt_err("Invalid device config, nb_models > %u\n", dev_info.max_models);
+ plt_err("Invalid device config, nb_models > %u", dev_info.max_models);
return -EINVAL;
}
if (conf->nb_queue_pairs > dev_info.max_queue_pairs) {
- plt_err("Invalid device config, nb_queue_pairs > %u\n", dev_info.max_queue_pairs);
+ plt_err("Invalid device config, nb_queue_pairs > %u", dev_info.max_queue_pairs);
return -EINVAL;
}
@@ -533,10 +533,10 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co
plt_ml_dbg("Re-configuring ML device, nb_queue_pairs = %u, nb_models = %u",
conf->nb_queue_pairs, conf->nb_models);
} else if (cnxk_mldev->state == ML_CNXK_DEV_STATE_STARTED) {
- plt_err("Device can't be reconfigured in started state\n");
+ plt_err("Device can't be reconfigured in started state");
return -ENOTSUP;
} else if (cnxk_mldev->state == ML_CNXK_DEV_STATE_CLOSED) {
- plt_err("Device can't be reconfigured after close\n");
+ plt_err("Device can't be reconfigured after close");
return -ENOTSUP;
}
@@ -853,7 +853,7 @@ cnxk_ml_dev_queue_pair_setup(struct rte_ml_dev *dev, uint16_t queue_pair_id,
uint32_t nb_desc;
if (queue_pair_id >= dev->data->nb_queue_pairs) {
- plt_err("Queue-pair id = %u (>= max queue pairs supported, %u)\n", queue_pair_id,
+ plt_err("Queue-pair id = %u (>= max queue pairs supported, %u)", queue_pair_id,
dev->data->nb_queue_pairs);
return -EINVAL;
}
@@ -1249,11 +1249,11 @@ cnxk_ml_model_load(struct rte_ml_dev *dev, struct rte_ml_model_params *params, u
}
if ((total_wb_pages + max_scratch_pages) > ocm->num_pages) {
- plt_err("model_id = %u: total_wb_pages (%u) + scratch_pages (%u) > %u\n",
+ plt_err("model_id = %u: total_wb_pages (%u) + scratch_pages (%u) > %u",
lcl_model_id, total_wb_pages, max_scratch_pages, ocm->num_pages);
if (model->type == ML_CNXK_MODEL_TYPE_GLOW) {
- plt_ml_dbg("layer_id = %u: wb_pages = %u, scratch_pages = %u\n", layer_id,
+ plt_ml_dbg("layer_id = %u: wb_pages = %u, scratch_pages = %u", layer_id,
model->layer[layer_id].glow.ocm_map.wb_pages,
model->layer[layer_id].glow.ocm_map.scratch_pages);
#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM
@@ -1262,7 +1262,7 @@ cnxk_ml_model_load(struct rte_ml_dev *dev, struct rte_ml_model_params *params, u
layer_id++) {
if (model->layer[layer_id].type == ML_CNXK_LAYER_TYPE_MRVL) {
plt_ml_dbg(
- "layer_id = %u: wb_pages = %u, scratch_pages = %u\n",
+ "layer_id = %u: wb_pages = %u, scratch_pages = %u",
layer_id,
model->layer[layer_id].glow.ocm_map.wb_pages,
model->layer[layer_id].glow.ocm_map.scratch_pages);
diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index cb6f8141a8..0f367faad5 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -359,13 +359,13 @@ atl_rx_init(struct rte_eth_dev *eth_dev)
buff_size = RTE_ALIGN_FLOOR(buff_size, 1024);
if (buff_size > HW_ATL_B0_RXD_BUF_SIZE_MAX) {
PMD_INIT_LOG(WARNING,
- "Port %d queue %d: mem pool buff size is too big\n",
+ "Port %d queue %d: mem pool buff size is too big",
rxq->port_id, rxq->queue_id);
buff_size = HW_ATL_B0_RXD_BUF_SIZE_MAX;
}
if (buff_size < 1024) {
PMD_INIT_LOG(ERR,
- "Port %d queue %d: mem pool buff size is too small\n",
+ "Port %d queue %d: mem pool buff size is too small",
rxq->port_id, rxq->queue_id);
return -EINVAL;
}
diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
index 84d11ab3a5..06d79115b9 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
@@ -76,7 +76,7 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
self->fw_ver_actual) == 0) {
*fw_ops = &aq_fw_2x_ops;
} else {
- PMD_DRV_LOG(ERR, "Bad FW version detected: %x\n",
+ PMD_DRV_LOG(ERR, "Bad FW version detected: %x",
self->fw_ver_actual);
return -EOPNOTSUPP;
}
@@ -124,7 +124,7 @@ static int hw_atl_utils_soft_reset_flb(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "MAC kickstart failed\n");
+ PMD_DRV_LOG(ERR, "MAC kickstart failed");
return -EIO;
}
@@ -152,7 +152,7 @@ static int hw_atl_utils_soft_reset_flb(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "FW kickstart failed\n");
+ PMD_DRV_LOG(ERR, "FW kickstart failed");
return -EIO;
}
/* Old FW requires fixed delay after init */
@@ -209,7 +209,7 @@ static int hw_atl_utils_soft_reset_rbl(struct aq_hw_s *self)
aq_hw_write_reg(self, 0x534, 0xA0);
if (rbl_status == 0xF1A7) {
- PMD_DRV_LOG(ERR, "No FW detected. Dynamic FW load not implemented\n");
+ PMD_DRV_LOG(ERR, "No FW detected. Dynamic FW load not implemented");
return -EOPNOTSUPP;
}
@@ -221,7 +221,7 @@ static int hw_atl_utils_soft_reset_rbl(struct aq_hw_s *self)
AQ_HW_SLEEP(10);
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "FW kickstart failed\n");
+ PMD_DRV_LOG(ERR, "FW kickstart failed");
return -EIO;
}
/* Old FW requires fixed delay after init */
@@ -246,7 +246,7 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
}
if (k == 1000) {
- PMD_DRV_LOG(ERR, "Neither RBL nor FLB firmware started\n");
+ PMD_DRV_LOG(ERR, "Neither RBL nor FLB firmware started");
return -EOPNOTSUPP;
}
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 17b7b5c543..5448a5f3d7 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1353,7 +1353,7 @@ axgbe_priority_flow_ctrl_set(struct rte_eth_dev *dev,
tc_num = pdata->pfc_map[pfc_conf->priority];
if (pfc_conf->priority >= pdata->hw_feat.tc_cnt) {
- PMD_INIT_LOG(ERR, "Max supported traffic class: %d\n",
+ PMD_INIT_LOG(ERR, "Max supported traffic class: %d",
pdata->hw_feat.tc_cnt);
return -EINVAL;
}
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 597ee43359..3153cc4d80 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -8124,7 +8124,7 @@ static int bnx2x_get_shmem_info(struct bnx2x_softc *sc)
val = sc->devinfo.bc_ver >> 8;
if (val < BNX2X_BC_VER) {
/* for now only warn later we might need to enforce this */
- PMD_DRV_LOG(NOTICE, sc, "This driver needs bc_ver %X but found %X, please upgrade BC\n",
+ PMD_DRV_LOG(NOTICE, sc, "This driver needs bc_ver %X but found %X, please upgrade BC",
BNX2X_BC_VER, val);
}
sc->link_params.feature_config_flags |=
@@ -9489,16 +9489,16 @@ static int bnx2x_prev_unload(struct bnx2x_softc *sc)
hw_lock_val = (REG_RD(sc, hw_lock_reg));
if (hw_lock_val) {
if (hw_lock_val & HW_LOCK_RESOURCE_NVRAM) {
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held NVRAM lock\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held NVRAM lock");
REG_WR(sc, MCP_REG_MCPR_NVM_SW_ARB,
(MCPR_NVM_SW_ARB_ARB_REQ_CLR1 << SC_PORT(sc)));
}
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held HW lock\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held HW lock");
REG_WR(sc, hw_lock_reg, 0xffffffff);
}
if (MCPR_ACCESS_LOCK_LOCK & REG_RD(sc, MCP_REG_MCPR_ACCESS_LOCK)) {
- PMD_DRV_LOG(DEBUG, sc, "Releasing previously held ALR\n");
+ PMD_DRV_LOG(DEBUG, sc, "Releasing previously held ALR");
REG_WR(sc, MCP_REG_MCPR_ACCESS_LOCK, 0);
}
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index cdedf67c6f..209cf5a80c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -702,7 +702,7 @@ selection_logic(struct bond_dev_private *internals, uint16_t member_id)
ret = rte_eth_link_get_nowait(members[i], &link_info);
if (ret < 0) {
RTE_BOND_LOG(ERR,
- "Member (port %u) link get failed: %s\n",
+ "Member (port %u) link get failed: %s",
members[i], rte_strerror(-ret));
continue;
}
@@ -879,7 +879,7 @@ bond_mode_8023ad_periodic_cb(void *arg)
ret = rte_eth_link_get_nowait(member_id, &link_info);
if (ret < 0) {
RTE_BOND_LOG(ERR,
- "Member (port %u) link get failed: %s\n",
+ "Member (port %u) link get failed: %s",
member_id, rte_strerror(-ret));
}
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index 56945e2349..253f38da4a 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -60,7 +60,7 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev)
0, data_size, socket_id);
if (internals->mode6.mempool == NULL) {
- RTE_BOND_LOG(ERR, "%s: Failed to initialize ALB mempool.\n",
+ RTE_BOND_LOG(ERR, "%s: Failed to initialize ALB mempool.",
bond_dev->device->name);
goto mempool_alloc_error;
}
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 99e496556a..ffc1322047 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -482,7 +482,7 @@ __eth_bond_member_add_lock_free(uint16_t bonding_port_id, uint16_t member_port_i
ret = rte_eth_dev_info_get(member_port_id, &dev_info);
if (ret != 0) {
RTE_BOND_LOG(ERR,
- "%s: Error during getting device (port %u) info: %s\n",
+ "%s: Error during getting device (port %u) info: %s",
__func__, member_port_id, strerror(-ret));
return ret;
@@ -609,7 +609,7 @@ __eth_bond_member_add_lock_free(uint16_t bonding_port_id, uint16_t member_port_i
&bonding_eth_dev->data->port_id);
internals->member_count--;
RTE_BOND_LOG(ERR,
- "Member (port %u) link get failed: %s\n",
+ "Member (port %u) link get failed: %s",
member_port_id, rte_strerror(-ret));
return -1;
}
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c40d18d128..4144c86be4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -191,7 +191,7 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
ret = rte_eth_dev_info_get(member_port, &member_info);
if (ret != 0) {
RTE_BOND_LOG(ERR,
- "%s: Error during getting device (port %u) info: %s\n",
+ "%s: Error during getting device (port %u) info: %s",
__func__, member_port, strerror(-ret));
return ret;
@@ -221,7 +221,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id) {
ret = rte_eth_dev_info_get(bond_dev->data->port_id, &bond_info);
if (ret != 0) {
RTE_BOND_LOG(ERR,
- "%s: Error during getting device (port %u) info: %s\n",
+ "%s: Error during getting device (port %u) info: %s",
__func__, bond_dev->data->port_id,
strerror(-ret));
@@ -2289,7 +2289,7 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
ret = rte_eth_dev_info_get(member.port_id, &member_info);
if (ret != 0) {
RTE_BOND_LOG(ERR,
- "%s: Error during getting device (port %u) info: %s\n",
+ "%s: Error during getting device (port %u) info: %s",
__func__,
member.port_id,
strerror(-ret));
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 55ed54bb0f..ad6bc1ec21 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -707,7 +707,7 @@ cn10k_rx_descriptor_dump(const struct rte_eth_dev *eth_dev, uint16_t qid,
available_pkts = cn10k_nix_rx_avail_get(rxq);
if ((offset + num - 1) >= available_pkts) {
- plt_err("Invalid BD num=%u\n", num);
+ plt_err("Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index ea92b1dcb6..84c88655f8 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -708,7 +708,7 @@ cn9k_rx_descriptor_dump(const struct rte_eth_dev *eth_dev, uint16_t qid,
available_pkts = cn9k_nix_rx_avail_get(rxq);
if ((offset + num - 1) >= available_pkts) {
- plt_err("Invalid BD num=%u\n", num);
+ plt_err("Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/cnxk/cnxk_eswitch_devargs.c b/drivers/net/cnxk/cnxk_eswitch_devargs.c
index 8167ce673a..655813c71a 100644
--- a/drivers/net/cnxk/cnxk_eswitch_devargs.c
+++ b/drivers/net/cnxk/cnxk_eswitch_devargs.c
@@ -26,7 +26,7 @@ populate_repr_hw_info(struct cnxk_eswitch_dev *eswitch_dev, struct rte_eth_devar
if (eth_da->type != RTE_ETH_REPRESENTOR_VF && eth_da->type != RTE_ETH_REPRESENTOR_PF &&
eth_da->type != RTE_ETH_REPRESENTOR_SF) {
- plt_err("unsupported representor type %d\n", eth_da->type);
+ plt_err("unsupported representor type %d", eth_da->type);
return -ENOTSUP;
}
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 38746c81c5..33bac55704 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -589,7 +589,7 @@ cnxk_nix_process_rx_conf(const struct rte_eth_rxconf *rx_conf,
}
if (mp == NULL || mp[0] == NULL || mp[1] == NULL) {
- plt_err("invalid memory pools\n");
+ plt_err("invalid memory pools");
return -EINVAL;
}
@@ -617,7 +617,7 @@ cnxk_nix_process_rx_conf(const struct rte_eth_rxconf *rx_conf,
return -EINVAL;
}
- plt_info("spb_pool:%s lpb_pool:%s lpb_len:%u spb_len:%u\n", (*spb_pool)->name,
+ plt_info("spb_pool:%s lpb_pool:%s lpb_len:%u spb_len:%u", (*spb_pool)->name,
(*lpb_pool)->name, (*lpb_pool)->elt_size, (*spb_pool)->elt_size);
return 0;
diff --git a/drivers/net/cnxk/cnxk_ethdev_mcs.c b/drivers/net/cnxk/cnxk_ethdev_mcs.c
index 06ef7c98f3..119060bcf3 100644
--- a/drivers/net/cnxk/cnxk_ethdev_mcs.c
+++ b/drivers/net/cnxk/cnxk_ethdev_mcs.c
@@ -568,17 +568,17 @@ cnxk_eth_macsec_session_stats_get(struct cnxk_eth_dev *dev, struct cnxk_macsec_s
req.id = sess->flow_id;
req.dir = sess->dir;
roc_mcs_flowid_stats_get(mcs_dev->mdev, &req, &flow_stats);
- plt_nix_dbg("\n******* FLOW_ID IDX[%u] STATS dir: %u********\n", sess->flow_id, sess->dir);
- plt_nix_dbg("TX: tcam_hit_cnt: 0x%" PRIx64 "\n", flow_stats.tcam_hit_cnt);
+ plt_nix_dbg("******* FLOW_ID IDX[%u] STATS dir: %u********", sess->flow_id, sess->dir);
+ plt_nix_dbg("TX: tcam_hit_cnt: 0x%" PRIx64, flow_stats.tcam_hit_cnt);
req.id = mcs_dev->port_id;
req.dir = sess->dir;
roc_mcs_port_stats_get(mcs_dev->mdev, &req, &port_stats);
- plt_nix_dbg("\n********** PORT[0] STATS ****************\n");
- plt_nix_dbg("RX tcam_miss_cnt: 0x%" PRIx64 "\n", port_stats.tcam_miss_cnt);
- plt_nix_dbg("RX parser_err_cnt: 0x%" PRIx64 "\n", port_stats.parser_err_cnt);
- plt_nix_dbg("RX preempt_err_cnt: 0x%" PRIx64 "\n", port_stats.preempt_err_cnt);
- plt_nix_dbg("RX sectag_insert_err_cnt: 0x%" PRIx64 "\n", port_stats.sectag_insert_err_cnt);
+ plt_nix_dbg("********** PORT[0] STATS ****************");
+ plt_nix_dbg("RX tcam_miss_cnt: 0x%" PRIx64, port_stats.tcam_miss_cnt);
+ plt_nix_dbg("RX parser_err_cnt: 0x%" PRIx64, port_stats.parser_err_cnt);
+ plt_nix_dbg("RX preempt_err_cnt: 0x%" PRIx64, port_stats.preempt_err_cnt);
+ plt_nix_dbg("RX sectag_insert_err_cnt: 0x%" PRIx64, port_stats.sectag_insert_err_cnt);
req.id = sess->secy_id;
req.dir = sess->dir;
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index b1093dd584..5b0948e07a 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -532,7 +532,7 @@ cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev)
/* Wait for sq entries to be flushed */
rc = roc_nix_tm_sq_flush_spin(sq);
if (rc) {
- plt_err("Failed to drain sq, rc=%d\n", rc);
+ plt_err("Failed to drain sq, rc=%d", rc);
goto exit;
}
if (data->tx_queue_state[i] == RTE_ETH_QUEUE_STATE_STARTED) {
diff --git a/drivers/net/cnxk/cnxk_rep.c b/drivers/net/cnxk/cnxk_rep.c
index ca0637bde5..652d419ad8 100644
--- a/drivers/net/cnxk/cnxk_rep.c
+++ b/drivers/net/cnxk/cnxk_rep.c
@@ -270,7 +270,7 @@ cnxk_representee_mtu_msg_process(struct cnxk_eswitch_dev *eswitch_dev, uint16_t
rep_dev = cnxk_rep_pmd_priv(rep_eth_dev);
if (rep_dev->rep_id == rep_id) {
- plt_rep_dbg("Setting MTU as %d for hw_func %x rep_id %d\n", mtu, hw_func,
+ plt_rep_dbg("Setting MTU as %d for hw_func %x rep_id %d", mtu, hw_func,
rep_id);
rep_dev->repte_mtu = mtu;
break;
@@ -423,7 +423,7 @@ cnxk_rep_parent_setup(struct cnxk_eswitch_dev *eswitch_dev)
plt_err("Failed to alloc switch domain: %d", rc);
goto fail;
}
- plt_rep_dbg("Allocated switch domain id %d for pf %d\n", switch_domain_id, pf);
+ plt_rep_dbg("Allocated switch domain id %d for pf %d", switch_domain_id, pf);
eswitch_dev->sw_dom[j].switch_domain_id = switch_domain_id;
eswitch_dev->sw_dom[j].pf = pf;
prev_pf = pf;
@@ -549,7 +549,7 @@ cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct cnxk_eswitch_dev *eswi
int i, j, rc;
if (eswitch_dev->repr_cnt.nb_repr_created > RTE_MAX_ETHPORTS) {
- plt_err("nb_representor_ports %d > %d MAX ETHPORTS\n",
+ plt_err("nb_representor_ports %d > %d MAX ETHPORTS",
eswitch_dev->repr_cnt.nb_repr_created, RTE_MAX_ETHPORTS);
rc = -EINVAL;
goto fail;
@@ -604,7 +604,7 @@ cnxk_rep_dev_probe(struct rte_pci_device *pci_dev, struct cnxk_eswitch_dev *eswi
name, cnxk_representee_msg_thread_main,
eswitch_dev);
if (rc != 0) {
- plt_err("Failed to create thread for VF mbox handling\n");
+ plt_err("Failed to create thread for VF mbox handling");
goto thread_fail;
}
}
diff --git a/drivers/net/cnxk/cnxk_rep.h b/drivers/net/cnxk/cnxk_rep.h
index ad89649702..aaae2d4e8f 100644
--- a/drivers/net/cnxk/cnxk_rep.h
+++ b/drivers/net/cnxk/cnxk_rep.h
@@ -93,7 +93,7 @@ cnxk_rep_pmd_priv(const struct rte_eth_dev *eth_dev)
static __rte_always_inline void
cnxk_rep_pool_buffer_stats(struct rte_mempool *pool)
{
- plt_rep_dbg(" pool %s size %d buffer count in use %d available %d\n", pool->name,
+ plt_rep_dbg(" pool %s size %d buffer count in use %d available %d", pool->name,
pool->size, rte_mempool_in_use_count(pool), rte_mempool_avail_count(pool));
}
diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index 222e178949..6f6707a0bd 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -2284,7 +2284,7 @@ get_running_host_id(void)
uint8_t host_id = CPFL_INVALID_HOST_ID;
if (uname(&unamedata) != 0)
- PMD_INIT_LOG(ERR, "Cannot fetch node_name for host\n");
+ PMD_INIT_LOG(ERR, "Cannot fetch node_name for host");
else if (strstr(unamedata.nodename, "ipu-imc"))
PMD_INIT_LOG(ERR, "CPFL PMD cannot be running on IMC.");
else if (strstr(unamedata.nodename, "ipu-acc"))
diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c
index 40569ddc6f..011229a470 100644
--- a/drivers/net/cpfl/cpfl_flow_parser.c
+++ b/drivers/net/cpfl/cpfl_flow_parser.c
@@ -2020,7 +2020,7 @@ cpfl_metadata_write_port_id(struct cpfl_itf *itf)
dev_id = cpfl_get_port_id(itf);
if (dev_id == CPFL_INVALID_HW_ID) {
- PMD_DRV_LOG(ERR, "fail to get hw ID\n");
+ PMD_DRV_LOG(ERR, "fail to get hw ID");
return false;
}
cpfl_metadata_write16(&itf->adapter->meta, type, offset, dev_id << 3);
diff --git a/drivers/net/cpfl/cpfl_fxp_rule.c b/drivers/net/cpfl/cpfl_fxp_rule.c
index be34da9fa2..42553c9641 100644
--- a/drivers/net/cpfl/cpfl_fxp_rule.c
+++ b/drivers/net/cpfl/cpfl_fxp_rule.c
@@ -77,7 +77,7 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
if (ret && ret != CPFL_ERR_CTLQ_NO_WORK && ret != CPFL_ERR_CTLQ_ERROR &&
ret != CPFL_ERR_CTLQ_EMPTY) {
- PMD_INIT_LOG(ERR, "failed to recv ctrlq msg. err: 0x%4x\n", ret);
+ PMD_INIT_LOG(ERR, "failed to recv ctrlq msg. err: 0x%4x", ret);
retries++;
continue;
}
@@ -108,7 +108,7 @@ cpfl_receive_ctlq_msg(struct idpf_hw *hw, struct idpf_ctlq_info *cq, u16 num_q_m
buff_cnt = dma ? 1 : 0;
ret = cpfl_vport_ctlq_post_rx_buffs(hw, cq, &buff_cnt, &dma);
if (ret)
- PMD_INIT_LOG(WARNING, "could not posted recv bufs\n");
+ PMD_INIT_LOG(WARNING, "could not posted recv bufs");
}
break;
}
@@ -131,7 +131,7 @@ cpfl_mod_rule_pack(struct cpfl_rule_info *rinfo, struct idpf_dma_mem *dma,
/* prepare rule blob */
if (!dma->va) {
- PMD_INIT_LOG(ERR, "dma mem passed to %s is null\n", __func__);
+ PMD_INIT_LOG(ERR, "dma mem passed to %s is null", __func__);
return -1;
}
blob = (union cpfl_rule_cfg_pkt_record *)dma->va;
@@ -176,7 +176,7 @@ cpfl_default_rule_pack(struct cpfl_rule_info *rinfo, struct idpf_dma_mem *dma,
uint16_t cfg_ctrl;
if (!dma->va) {
- PMD_INIT_LOG(ERR, "dma mem passed to %s is null\n", __func__);
+ PMD_INIT_LOG(ERR, "dma mem passed to %s is null", __func__);
return -1;
}
blob = (union cpfl_rule_cfg_pkt_record *)dma->va;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 449bbda7ca..88374ea905 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -728,7 +728,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
total_nb_rx_desc += nb_rx_desc;
if (total_nb_rx_desc > MAX_NB_RX_DESC) {
- DPAA2_PMD_WARN("\nTotal nb_rx_desc exceeds %d limit. Please use Normal buffers",
+ DPAA2_PMD_WARN("Total nb_rx_desc exceeds %d limit. Please use Normal buffers",
MAX_NB_RX_DESC);
DPAA2_PMD_WARN("To use Normal buffers, run 'export DPNI_NORMAL_BUF=1' before running dynamic_dpl.sh script");
}
@@ -1063,7 +1063,7 @@ dpaa2_dev_rx_queue_count(void *rx_queue)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return -EINVAL;
}
@@ -1934,7 +1934,7 @@ dpaa2_dev_link_update(struct rte_eth_dev *dev,
if (ret == -1)
DPAA2_PMD_DEBUG("No change in status");
else
- DPAA2_PMD_INFO("Port %d Link is %s\n", dev->data->port_id,
+ DPAA2_PMD_INFO("Port %d Link is %s", dev->data->port_id,
link.link_status ? "Up" : "Down");
return ret;
@@ -2308,7 +2308,7 @@ int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
dpaa2_ethq->tc_index, flow_id,
OPR_OPT_CREATE, &ocfg, 0);
if (ret) {
- DPAA2_PMD_ERR("Error setting opr: ret: %d\n", ret);
+ DPAA2_PMD_ERR("Error setting opr: ret: %d", ret);
return ret;
}
@@ -2424,7 +2424,7 @@ rte_pmd_dpaa2_thread_init(void)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -2839,7 +2839,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
WRIOP_SS_INITIALIZER(priv);
ret = dpaa2_eth_load_wriop_soft_parser(priv, DPNI_SS_INGRESS);
if (ret < 0) {
- DPAA2_PMD_ERR(" Error(%d) in loading softparser\n",
+ DPAA2_PMD_ERR(" Error(%d) in loading softparser",
ret);
return ret;
}
@@ -2847,7 +2847,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
ret = dpaa2_eth_enable_wriop_soft_parser(priv,
DPNI_SS_INGRESS);
if (ret < 0) {
- DPAA2_PMD_ERR(" Error(%d) in enabling softparser\n",
+ DPAA2_PMD_ERR(" Error(%d) in enabling softparser",
ret);
return ret;
}
@@ -2930,7 +2930,7 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv,
DPAA2_MAX_SGS * sizeof(struct qbman_sge),
rte_socket_id());
if (dpaa2_tx_sg_pool == NULL) {
- DPAA2_PMD_ERR("SG pool creation failed\n");
+ DPAA2_PMD_ERR("SG pool creation failed");
return -ENOMEM;
}
}
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 6c7bac4d48..62e350d736 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -3360,7 +3360,7 @@ dpaa2_flow_verify_action(
rxq = priv->rx_vq[rss_conf->queue[i]];
if (rxq->tc_index != attr->group) {
DPAA2_PMD_ERR(
- "Queue/Group combination are not supported\n");
+ "Queue/Group combination are not supported");
return -ENOTSUP;
}
}
@@ -3602,7 +3602,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &qos_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS QoS table can not be configured(%d)\n",
+ "RSS QoS table can not be configured(%d)",
ret);
return -1;
}
@@ -3720,14 +3720,14 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
&priv->extract.tc_key_extract[flow->tc_id].dpkg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "unable to set flow distribution.please check queue config\n");
+ "unable to set flow distribution.please check queue config");
return ret;
}
/* Allocate DMA'ble memory to write the rules */
param = (size_t)rte_malloc(NULL, 256, 64);
if (!param) {
- DPAA2_PMD_ERR("Memory allocation failure\n");
+ DPAA2_PMD_ERR("Memory allocation failure");
return -1;
}
@@ -3749,7 +3749,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &tc_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS TC table cannot be configured: %d\n",
+ "RSS TC table cannot be configured: %d",
ret);
rte_free((void *)param);
return -1;
@@ -3774,7 +3774,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,
priv->token, &qos_cfg);
if (ret < 0) {
DPAA2_PMD_ERR(
- "RSS QoS dist can't be configured-%d\n",
+ "RSS QoS dist can't be configured-%d",
ret);
return -1;
}
@@ -3843,20 +3843,20 @@ dpaa2_dev_verify_attr(struct dpni_attr *dpni_attr,
int ret = 0;
if (unlikely(attr->group >= dpni_attr->num_rx_tcs)) {
- DPAA2_PMD_ERR("Priority group is out of range\n");
+ DPAA2_PMD_ERR("Priority group is out of range");
ret = -ENOTSUP;
}
if (unlikely(attr->priority >= dpni_attr->fs_entries)) {
- DPAA2_PMD_ERR("Priority within the group is out of range\n");
+ DPAA2_PMD_ERR("Priority within the group is out of range");
ret = -ENOTSUP;
}
if (unlikely(attr->egress)) {
DPAA2_PMD_ERR(
- "Flow configuration is not supported on egress side\n");
+ "Flow configuration is not supported on egress side");
ret = -ENOTSUP;
}
if (unlikely(!attr->ingress)) {
- DPAA2_PMD_ERR("Ingress flag must be configured\n");
+ DPAA2_PMD_ERR("Ingress flag must be configured");
ret = -EINVAL;
}
return ret;
@@ -3935,7 +3935,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpni_get_attributes(dpni, CMD_PRI_LOW, token, &dpni_attr);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Failure to get dpni@%p attribute, err code %d\n",
+ "Failure to get dpni@%p attribute, err code %d",
dpni, ret);
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ATTR,
@@ -3947,7 +3947,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_attr(&dpni_attr, flow_attr);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid attributes are given\n");
+ "Invalid attributes are given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ATTR,
flow_attr, "invalid");
@@ -3957,7 +3957,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_patterns(pattern);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid pattern list is given\n");
+ "Invalid pattern list is given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ITEM,
pattern, "invalid");
@@ -3967,7 +3967,7 @@ int dpaa2_flow_validate(struct rte_eth_dev *dev,
ret = dpaa2_dev_verify_actions(actions);
if (ret < 0) {
DPAA2_PMD_ERR(
- "Invalid action list is given\n");
+ "Invalid action list is given");
rte_flow_error_set(error, EPERM,
RTE_FLOW_ERROR_TYPE_ACTION,
actions, "invalid");
@@ -4014,13 +4014,13 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,
key_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!key_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
mask_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!mask_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
@@ -4031,13 +4031,13 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,
key_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!key_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
mask_iova = (size_t)rte_zmalloc(NULL, 256, 64);
if (!mask_iova) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto mem_failure;
}
diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index 2ff1a98fda..7dd5a60966 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -88,7 +88,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
(2 * DIST_PARAM_IOVA_SIZE), RTE_CACHE_LINE_SIZE);
if (!flow) {
DPAA2_PMD_ERR(
- "Memory allocation failure for rule configuration\n");
+ "Memory allocation failure for rule configuration");
goto creation_error;
}
key_iova = (void *)((size_t)flow + sizeof(struct rte_flow));
@@ -211,7 +211,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
vf_conf = (const struct rte_flow_action_vf *)(actions[0]->conf);
if (vf_conf->id == 0 || vf_conf->id > dpdmux_dev->num_ifs) {
- DPAA2_PMD_ERR("Invalid destination id\n");
+ DPAA2_PMD_ERR("Invalid destination id");
goto creation_error;
}
dpdmux_action.dest_if = vf_conf->id;
diff --git a/drivers/net/dpaa2/dpaa2_recycle.c b/drivers/net/dpaa2/dpaa2_recycle.c
index fbfdf360d1..4fde9b95a0 100644
--- a/drivers/net/dpaa2/dpaa2_recycle.c
+++ b/drivers/net/dpaa2/dpaa2_recycle.c
@@ -423,7 +423,7 @@ ls_mac_serdes_lpbk_support(uint16_t mac_id,
sd_idx = ls_serdes_cfg_to_idx(sd_cfg, sd_id);
if (sd_idx < 0) {
- DPAA2_PMD_ERR("Serdes protocol(0x%02x) does not exist\n",
+ DPAA2_PMD_ERR("Serdes protocol(0x%02x) does not exist",
sd_cfg);
return false;
}
@@ -552,7 +552,7 @@ ls_serdes_eth_lpbk(uint16_t mac_id, int en)
(serdes_id - LSX_SERDES_1) * 0x10000,
sizeof(struct ccsr_ls_serdes) / 64 * 64 + 64);
if (!serdes_base) {
- DPAA2_PMD_ERR("Serdes register map failed\n");
+ DPAA2_PMD_ERR("Serdes register map failed");
return -ENOMEM;
}
@@ -587,7 +587,7 @@ lx_serdes_eth_lpbk(uint16_t mac_id, int en)
(serdes_id - LSX_SERDES_1) * 0x10000,
sizeof(struct ccsr_lx_serdes) / 64 * 64 + 64);
if (!serdes_base) {
- DPAA2_PMD_ERR("Serdes register map failed\n");
+ DPAA2_PMD_ERR("Serdes register map failed");
return -ENOMEM;
}
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 23f7c4132d..b64232b88f 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -640,7 +640,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
ret = dpaa2_affine_qbman_swp();
if (ret) {
- DPAA2_PMD_ERR("Failed to allocate IO portal, tid: %d\n",
+ DPAA2_PMD_ERR("Failed to allocate IO portal, tid: %d",
rte_gettid());
return;
}
@@ -691,7 +691,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
hw_annot_addr = (void *)((size_t)v_addr + DPAA2_FD_PTA_SIZE);
fas = hw_annot_addr;
- DPAA2_PMD_ERR("\n\n[%d] error packet on port[%d]:"
+ DPAA2_PMD_ERR("[%d] error packet on port[%d]:"
" fd_off: %d, fd_err: %x, fas_status: %x",
rte_lcore_id(), eth_data->port_id,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ERR(fd),
@@ -976,7 +976,7 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1107,7 +1107,7 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1256,7 +1256,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1573,7 +1573,7 @@ dpaa2_dev_tx_multi_txq_ordered(void **queue,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -1747,7 +1747,7 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_PMD_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
diff --git a/drivers/net/dpaa2/dpaa2_sparser.c b/drivers/net/dpaa2/dpaa2_sparser.c
index 36a14526a5..59f7a172c6 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.c
+++ b/drivers/net/dpaa2/dpaa2_sparser.c
@@ -165,7 +165,7 @@ int dpaa2_eth_load_wriop_soft_parser(struct dpaa2_dev_priv *priv,
addr = rte_malloc(NULL, sp_param.size, 64);
if (!addr) {
- DPAA2_PMD_ERR("Memory unavailable for soft parser param\n");
+ DPAA2_PMD_ERR("Memory unavailable for soft parser param");
return -1;
}
@@ -174,7 +174,7 @@ int dpaa2_eth_load_wriop_soft_parser(struct dpaa2_dev_priv *priv,
ret = dpni_load_sw_sequence(dpni, CMD_PRI_LOW, priv->token, &cfg);
if (ret) {
- DPAA2_PMD_ERR("dpni_load_sw_sequence failed\n");
+ DPAA2_PMD_ERR("dpni_load_sw_sequence failed");
rte_free(addr);
return ret;
}
@@ -214,7 +214,7 @@ int dpaa2_eth_enable_wriop_soft_parser(struct dpaa2_dev_priv *priv,
if (cfg.param_size) {
param_addr = rte_malloc(NULL, cfg.param_size, 64);
if (!param_addr) {
- DPAA2_PMD_ERR("Memory unavailable for soft parser param\n");
+ DPAA2_PMD_ERR("Memory unavailable for soft parser param");
return -1;
}
@@ -227,7 +227,7 @@ int dpaa2_eth_enable_wriop_soft_parser(struct dpaa2_dev_priv *priv,
ret = dpni_enable_sw_sequence(dpni, CMD_PRI_LOW, priv->token, &cfg);
if (ret) {
- DPAA2_PMD_ERR("dpni_enable_sw_sequence failed for dpni%d\n",
+ DPAA2_PMD_ERR("dpni_enable_sw_sequence failed for dpni%d",
priv->hw_id);
rte_free(param_addr);
return ret;
diff --git a/drivers/net/dpaa2/dpaa2_tm.c b/drivers/net/dpaa2/dpaa2_tm.c
index cb854964b4..97d65e7181 100644
--- a/drivers/net/dpaa2/dpaa2_tm.c
+++ b/drivers/net/dpaa2/dpaa2_tm.c
@@ -584,7 +584,7 @@ dpaa2_tm_configure_queue(struct rte_eth_dev *dev, struct dpaa2_tm_node *node)
return -1;
}
- DPAA2_PMD_DEBUG("tc_id = %d, channel = %d\n\n", tc_id,
+ DPAA2_PMD_DEBUG("tc_id = %d, channel = %d", tc_id,
node->parent->channel_id);
ret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_TX,
((node->parent->channel_id << 8) | tc_id),
@@ -653,7 +653,7 @@ dpaa2_tm_sort_and_configure(struct rte_eth_dev *dev,
int i;
if (n == 1) {
- DPAA2_PMD_DEBUG("node id = %d\n, priority = %d, index = %d\n",
+ DPAA2_PMD_DEBUG("node id = %d, priority = %d, index = %d",
nodes[n - 1]->id, nodes[n - 1]->priority,
n - 1);
dpaa2_tm_configure_queue(dev, nodes[n - 1]);
@@ -669,7 +669,7 @@ dpaa2_tm_sort_and_configure(struct rte_eth_dev *dev,
}
dpaa2_tm_sort_and_configure(dev, nodes, n - 1);
- DPAA2_PMD_DEBUG("node id = %d\n, priority = %d, index = %d\n",
+ DPAA2_PMD_DEBUG("node id = %d, priority = %d, index = %d",
nodes[n - 1]->id, nodes[n - 1]->priority,
n - 1);
dpaa2_tm_configure_queue(dev, nodes[n - 1]);
@@ -709,7 +709,7 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
}
}
if (i > 0) {
- DPAA2_PMD_DEBUG("Configure queues\n");
+ DPAA2_PMD_DEBUG("Configure queues");
dpaa2_tm_sort_and_configure(dev, nodes, i);
}
}
@@ -733,13 +733,13 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
node->profile->params.peak.rate / (1024 * 1024);
/* root node */
if (node->parent == NULL) {
- DPAA2_PMD_DEBUG("LNI S.rate = %u, burst =%u\n",
+ DPAA2_PMD_DEBUG("LNI S.rate = %u, burst =%u",
tx_cr_shaper.rate_limit,
tx_cr_shaper.max_burst_size);
param = 0x2;
param |= node->profile->params.pkt_length_adjust << 16;
} else {
- DPAA2_PMD_DEBUG("Channel = %d S.rate = %u\n",
+ DPAA2_PMD_DEBUG("Channel = %d S.rate = %u",
node->channel_id,
tx_cr_shaper.rate_limit);
param = (node->channel_id << 8);
@@ -871,15 +871,15 @@ dpaa2_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
"Scheduling Failed\n");
goto out;
}
- DPAA2_PMD_DEBUG("########################################\n");
- DPAA2_PMD_DEBUG("Channel idx = %d\n", prio_cfg.channel_idx);
+ DPAA2_PMD_DEBUG("########################################");
+ DPAA2_PMD_DEBUG("Channel idx = %d", prio_cfg.channel_idx);
for (t = 0; t < DPNI_MAX_TC; t++) {
DPAA2_PMD_DEBUG("tc = %d mode = %d ", t, prio_cfg.tc_sched[t].mode);
- DPAA2_PMD_DEBUG("delta = %d\n", prio_cfg.tc_sched[t].delta_bandwidth);
+ DPAA2_PMD_DEBUG("delta = %d", prio_cfg.tc_sched[t].delta_bandwidth);
}
- DPAA2_PMD_DEBUG("prioritya = %d\n", prio_cfg.prio_group_A);
- DPAA2_PMD_DEBUG("priorityb = %d\n", prio_cfg.prio_group_B);
- DPAA2_PMD_DEBUG("separate grps = %d\n\n", prio_cfg.separate_groups);
+ DPAA2_PMD_DEBUG("prioritya = %d", prio_cfg.prio_group_A);
+ DPAA2_PMD_DEBUG("priorityb = %d", prio_cfg.prio_group_B);
+ DPAA2_PMD_DEBUG("separate grps = %d", prio_cfg.separate_groups);
}
return 0;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 095be27b08..1e0a483d4a 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5116,7 +5116,7 @@ eth_igb_get_module_info(struct rte_eth_dev *dev,
PMD_DRV_LOG(ERR,
"Address change required to access page 0xA2, "
"but not supported. Please report the module "
- "type to the driver maintainers.\n");
+ "type to the driver maintainers.");
page_swap = true;
}
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index d02ee206f1..ffbecc407c 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -151,7 +151,7 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
char buf[RTE_ETHER_ADDR_FMT_SIZE];
rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
- ENETC_PMD_NOTICE("%s%s\n", name, buf);
+ ENETC_PMD_NOTICE("%s%s", name, buf);
}
static int
@@ -198,7 +198,7 @@ enetc_hardware_init(struct enetc_eth_hw *hw)
char *first_byte;
ENETC_PMD_NOTICE("MAC is not available for this SI, "
- "set random MAC\n");
+ "set random MAC");
mac = (uint32_t *)hw->mac.addr;
*mac = (uint32_t)rte_rand();
first_byte = (char *)mac;
diff --git a/drivers/net/enetfec/enet_ethdev.c b/drivers/net/enetfec/enet_ethdev.c
index 898aad1c37..8c7067fbb5 100644
--- a/drivers/net/enetfec/enet_ethdev.c
+++ b/drivers/net/enetfec/enet_ethdev.c
@@ -253,7 +253,7 @@ enetfec_eth_link_update(struct rte_eth_dev *dev,
link.link_status = lstatus;
link.link_speed = RTE_ETH_SPEED_NUM_1G;
- ENETFEC_PMD_INFO("Port (%d) link is %s\n", dev->data->port_id,
+ ENETFEC_PMD_INFO("Port (%d) link is %s", dev->data->port_id,
"Up");
return rte_eth_linkstatus_set(dev, &link);
@@ -462,7 +462,7 @@ enetfec_rx_queue_setup(struct rte_eth_dev *dev,
}
if (queue_idx >= ENETFEC_MAX_Q) {
- ENETFEC_PMD_ERR("Invalid queue id %" PRIu16 ", max %d\n",
+ ENETFEC_PMD_ERR("Invalid queue id %" PRIu16 ", max %d",
queue_idx, ENETFEC_MAX_Q);
return -EINVAL;
}
diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
index 6539cbb354..9f4e896985 100644
--- a/drivers/net/enetfec/enet_uio.c
+++ b/drivers/net/enetfec/enet_uio.c
@@ -177,7 +177,7 @@ config_enetfec_uio(struct enetfec_private *fep)
/* Mapping is done only one time */
if (enetfec_count > 0) {
- ENETFEC_PMD_INFO("Mapped!\n");
+ ENETFEC_PMD_INFO("Mapped!");
return 0;
}
@@ -191,7 +191,7 @@ config_enetfec_uio(struct enetfec_private *fep)
/* Open device file */
uio_job->uio_fd = open(uio_device_file_name, O_RDWR);
if (uio_job->uio_fd < 0) {
- ENETFEC_PMD_WARN("Unable to open ENETFEC_UIO file\n");
+ ENETFEC_PMD_WARN("Unable to open ENETFEC_UIO file");
return -1;
}
@@ -230,7 +230,7 @@ enetfec_configure(void)
d = opendir(FEC_UIO_DEVICE_SYS_ATTR_PATH);
if (d == NULL) {
- ENETFEC_PMD_ERR("\nError opening directory '%s': %s\n",
+ ENETFEC_PMD_ERR("Error opening directory '%s': %s",
FEC_UIO_DEVICE_SYS_ATTR_PATH, strerror(errno));
return -1;
}
@@ -249,7 +249,7 @@ enetfec_configure(void)
ret = sscanf(dir->d_name + strlen("uio"), "%d",
&uio_minor_number);
if (ret < 0)
- ENETFEC_PMD_ERR("Error: not find minor number\n");
+ ENETFEC_PMD_ERR("Error: not find minor number");
/*
* Open file uioX/name and read first line which
* contains the name for the device. Based on the
@@ -259,7 +259,7 @@ enetfec_configure(void)
ret = file_read_first_line(FEC_UIO_DEVICE_SYS_ATTR_PATH,
dir->d_name, "name", uio_name);
if (ret != 0) {
- ENETFEC_PMD_INFO("file_read_first_line failed\n");
+ ENETFEC_PMD_INFO("file_read_first_line failed");
closedir(d);
return -1;
}
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index cad8db2f6f..c1dba0c0fd 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -672,7 +672,7 @@ static void debug_log_add_del_addr(struct rte_ether_addr *addr, bool add)
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, addr);
- ENICPMD_LOG(DEBUG, " %s address %s\n",
+ ENICPMD_LOG(DEBUG, " %s address %s",
add ? "add" : "remove", mac_str);
}
@@ -695,7 +695,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
rte_is_broadcast_ether_addr(addr)) {
rte_ether_format_addr(mac_str,
RTE_ETHER_ADDR_FMT_SIZE, addr);
- ENICPMD_LOG(ERR, " invalid multicast address %s\n",
+ ENICPMD_LOG(ERR, " invalid multicast address %s",
mac_str);
return -EINVAL;
}
@@ -703,7 +703,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
/* Flush all if requested */
if (nb_mc_addr == 0 || mc_addr_set == NULL) {
- ENICPMD_LOG(DEBUG, " flush multicast addresses\n");
+ ENICPMD_LOG(DEBUG, " flush multicast addresses");
for (i = 0; i < enic->mc_count; i++) {
addr = &enic->mc_addrs[i];
debug_log_add_del_addr(addr, false);
@@ -716,7 +716,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
}
if (nb_mc_addr > ENIC_MULTICAST_PERFECT_FILTERS) {
- ENICPMD_LOG(ERR, " too many multicast addresses: max=%d\n",
+ ENICPMD_LOG(ERR, " too many multicast addresses: max=%d",
ENIC_MULTICAST_PERFECT_FILTERS);
return -ENOSPC;
}
@@ -982,7 +982,7 @@ static int udp_tunnel_common_check(struct enic *enic,
tnl->prot_type != RTE_ETH_TUNNEL_TYPE_GENEVE)
return -ENOTSUP;
if (!enic->overlay_offload) {
- ENICPMD_LOG(DEBUG, " overlay offload is not supported\n");
+ ENICPMD_LOG(DEBUG, " overlay offload is not supported");
return -ENOTSUP;
}
return 0;
@@ -995,10 +995,10 @@ static int update_tunnel_port(struct enic *enic, uint16_t port, bool vxlan)
cfg = vxlan ? OVERLAY_CFG_VXLAN_PORT_UPDATE :
OVERLAY_CFG_GENEVE_PORT_UPDATE;
if (vnic_dev_overlay_offload_cfg(enic->vdev, cfg, port)) {
- ENICPMD_LOG(DEBUG, " failed to update tunnel port\n");
+ ENICPMD_LOG(DEBUG, " failed to update tunnel port");
return -EINVAL;
}
- ENICPMD_LOG(DEBUG, " updated %s port to %u\n",
+ ENICPMD_LOG(DEBUG, " updated %s port to %u",
vxlan ? "vxlan" : "geneve", port);
if (vxlan)
enic->vxlan_port = port;
@@ -1029,7 +1029,7 @@ static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,
* "Adding" a new port number replaces it.
*/
if (tnl->udp_port == port || tnl->udp_port == 0) {
- ENICPMD_LOG(DEBUG, " %u is already configured or invalid\n",
+ ENICPMD_LOG(DEBUG, " %u is already configured or invalid",
tnl->udp_port);
return -EINVAL;
}
@@ -1061,7 +1061,7 @@ static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
* which is tied to inner RSS and TSO.
*/
if (tnl->udp_port != port) {
- ENICPMD_LOG(DEBUG, " %u is not a configured tunnel port\n",
+ ENICPMD_LOG(DEBUG, " %u is not a configured tunnel port",
tnl->udp_port);
return -EINVAL;
}
@@ -1325,7 +1325,7 @@ static int eth_enic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- ENICPMD_LOG(ERR, "unsupported representor type: %s\n",
+ ENICPMD_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index e6c9ad442a..758000ea21 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -1351,14 +1351,14 @@ static void
enic_dump_actions(const struct filter_action_v2 *ea)
{
if (ea->type == FILTER_ACTION_RQ_STEERING) {
- ENICPMD_LOG(INFO, "Action(V1), queue: %u\n", ea->rq_idx);
+ ENICPMD_LOG(INFO, "Action(V1), queue: %u", ea->rq_idx);
} else if (ea->type == FILTER_ACTION_V2) {
- ENICPMD_LOG(INFO, "Actions(V2)\n");
+ ENICPMD_LOG(INFO, "Actions(V2)");
if (ea->flags & FILTER_ACTION_RQ_STEERING_FLAG)
- ENICPMD_LOG(INFO, "\tqueue: %u\n",
+ ENICPMD_LOG(INFO, "\tqueue: %u",
enic_sop_rq_idx_to_rte_idx(ea->rq_idx));
if (ea->flags & FILTER_ACTION_FILTER_ID_FLAG)
- ENICPMD_LOG(INFO, "\tfilter_id: %u\n", ea->filter_id);
+ ENICPMD_LOG(INFO, "\tfilter_id: %u", ea->filter_id);
}
}
@@ -1374,13 +1374,13 @@ enic_dump_filter(const struct filter_v2 *filt)
switch (filt->type) {
case FILTER_IPV4_5TUPLE:
- ENICPMD_LOG(INFO, "FILTER_IPV4_5TUPLE\n");
+ ENICPMD_LOG(INFO, "FILTER_IPV4_5TUPLE");
break;
case FILTER_USNIC_IP:
case FILTER_DPDK_1:
/* FIXME: this should be a loop */
gp = &filt->u.generic_1;
- ENICPMD_LOG(INFO, "Filter: vlan: 0x%04x, mask: 0x%04x\n",
+ ENICPMD_LOG(INFO, "Filter: vlan: 0x%04x, mask: 0x%04x",
gp->val_vlan, gp->mask_vlan);
if (gp->mask_flags & FILTER_GENERIC_1_IPV4)
@@ -1438,7 +1438,7 @@ enic_dump_filter(const struct filter_v2 *filt)
? "ipfrag(y)" : "ipfrag(n)");
else
sprintf(ipfrag, "%s ", "ipfrag(x)");
- ENICPMD_LOG(INFO, "\tFlags: %s%s%s%s%s%s%s%s\n", ip4, ip6, udp,
+ ENICPMD_LOG(INFO, "\tFlags: %s%s%s%s%s%s%s%s", ip4, ip6, udp,
tcp, tcpudp, ip4csum, l4csum, ipfrag);
for (i = 0; i < FILTER_GENERIC_1_NUM_LAYERS; i++) {
@@ -1455,7 +1455,7 @@ enic_dump_filter(const struct filter_v2 *filt)
bp += 2;
}
*bp = '\0';
- ENICPMD_LOG(INFO, "\tL%u mask: %s\n", i + 2, buf);
+ ENICPMD_LOG(INFO, "\tL%u mask: %s", i + 2, buf);
bp = buf;
for (j = 0; j <= mbyte; j++) {
sprintf(bp, "%02x",
@@ -1463,11 +1463,11 @@ enic_dump_filter(const struct filter_v2 *filt)
bp += 2;
}
*bp = '\0';
- ENICPMD_LOG(INFO, "\tL%u val: %s\n", i + 2, buf);
+ ENICPMD_LOG(INFO, "\tL%u val: %s", i + 2, buf);
}
break;
default:
- ENICPMD_LOG(INFO, "FILTER UNKNOWN\n");
+ ENICPMD_LOG(INFO, "FILTER UNKNOWN");
break;
}
}
diff --git a/drivers/net/enic/enic_vf_representor.c b/drivers/net/enic/enic_vf_representor.c
index 5d8d29135c..8469e06de9 100644
--- a/drivers/net/enic/enic_vf_representor.c
+++ b/drivers/net/enic/enic_vf_representor.c
@@ -64,7 +64,7 @@ static int enic_vf_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
/* Pass vf not pf because of cq index calculation. See enic_alloc_wq */
err = enic_alloc_wq(&vf->enic, queue_idx, socket_id, nb_desc);
if (err) {
- ENICPMD_LOG(ERR, "error in allocating wq\n");
+ ENICPMD_LOG(ERR, "error in allocating wq");
return err;
}
return 0;
@@ -104,7 +104,7 @@ static int enic_vf_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
ret = enic_alloc_rq(&vf->enic, queue_idx, socket_id, mp, nb_desc,
rx_conf->rx_free_thresh);
if (ret) {
- ENICPMD_LOG(ERR, "error in allocating rq\n");
+ ENICPMD_LOG(ERR, "error in allocating rq");
return ret;
}
return 0;
@@ -230,14 +230,14 @@ static int enic_vf_dev_start(struct rte_eth_dev *eth_dev)
/* enic_enable */
ret = enic_alloc_rx_queue_mbufs(pf, &pf->rq[index]);
if (ret) {
- ENICPMD_LOG(ERR, "Failed to alloc sop RX queue mbufs\n");
+ ENICPMD_LOG(ERR, "Failed to alloc sop RX queue mbufs");
return ret;
}
ret = enic_alloc_rx_queue_mbufs(pf, data_rq);
if (ret) {
/* Release the allocated mbufs for the sop rq*/
enic_rxmbuf_queue_release(pf, &pf->rq[index]);
- ENICPMD_LOG(ERR, "Failed to alloc data RX queue mbufs\n");
+ ENICPMD_LOG(ERR, "Failed to alloc data RX queue mbufs");
return ret;
}
enic_start_rq(pf, vf->pf_rq_sop_idx);
@@ -430,7 +430,7 @@ static int enic_vf_stats_get(struct rte_eth_dev *eth_dev,
/* Get VF stats via PF */
err = vnic_dev_stats_dump(vf->enic.vdev, &vs);
if (err) {
- ENICPMD_LOG(ERR, "error in getting stats\n");
+ ENICPMD_LOG(ERR, "error in getting stats");
return err;
}
stats->ipackets = vs->rx.rx_frames_ok;
@@ -453,7 +453,7 @@ static int enic_vf_stats_reset(struct rte_eth_dev *eth_dev)
/* Ask PF to clear VF stats */
err = vnic_dev_stats_clear(vf->enic.vdev);
if (err)
- ENICPMD_LOG(ERR, "error in clearing stats\n");
+ ENICPMD_LOG(ERR, "error in clearing stats");
return err;
}
@@ -581,7 +581,7 @@ static int get_vf_config(struct enic_vf_representor *vf)
/* VF MAC */
err = vnic_dev_get_mac_addr(vf->enic.vdev, vf->mac_addr.addr_bytes);
if (err) {
- ENICPMD_LOG(ERR, "error in getting MAC address\n");
+ ENICPMD_LOG(ERR, "error in getting MAC address");
return err;
}
rte_ether_addr_copy(&vf->mac_addr, vf->eth_dev->data->mac_addrs);
@@ -591,7 +591,7 @@ static int get_vf_config(struct enic_vf_representor *vf)
offsetof(struct vnic_enet_config, mtu),
sizeof(c->mtu), &c->mtu);
if (err) {
- ENICPMD_LOG(ERR, "error in getting MTU\n");
+ ENICPMD_LOG(ERR, "error in getting MTU");
return err;
}
/*
diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index 3b867437d7..1b8f1d3050 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -406,7 +406,7 @@ failsafe_args_parse(struct rte_eth_dev *dev, const char *params)
kvlist = rte_kvargs_parse(mut_params,
pmd_failsafe_init_parameters);
if (kvlist == NULL) {
- ERROR("Error parsing parameters, usage:\n"
+ ERROR("Error parsing parameters, usage:"
PMD_FAILSAFE_PARAM_STRING);
return -1;
}
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index d71b512f81..e79d3b4120 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -16,7 +16,7 @@ fs_ethdev_portid_get(const char *name, uint16_t *port_id)
size_t len;
if (name == NULL) {
- DEBUG("Null pointer is specified\n");
+ DEBUG("Null pointer is specified");
return -EINVAL;
}
len = strlen(name);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 031f3eb13f..dc4aba6e30 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -38,7 +38,7 @@ fs_flow_complain(struct rte_flow_error *error)
errstr = "unknown type";
else
errstr = errstrlist[error->type];
- ERROR("Caught error type %d (%s): %s%s\n",
+ ERROR("Caught error type %d (%s): %s%s",
error->type, errstr,
error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ",
error->cause), buf) : "",
@@ -640,7 +640,7 @@ failsafe_eth_new_event_callback(uint16_t port_id,
if (sdev->state >= DEV_PROBED)
continue;
if (dev->device == NULL) {
- WARN("Trying to probe malformed device %s.\n",
+ WARN("Trying to probe malformed device %s.",
sdev->devargs.name);
continue;
}
diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c
index 969ded6ced..68b7310b85 100644
--- a/drivers/net/failsafe/failsafe_intr.c
+++ b/drivers/net/failsafe/failsafe_intr.c
@@ -173,17 +173,17 @@ fs_rx_event_proxy_service_install(struct fs_priv *priv)
/* run the service */
ret = rte_service_component_runstate_set(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed Setting component runstate\n");
+ ERROR("Failed Setting component runstate");
return ret;
}
ret = rte_service_set_stats_enable(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed enabling stats\n");
+ ERROR("Failed enabling stats");
return ret;
}
ret = rte_service_runstate_set(priv->rxp.sid, 1);
if (ret < 0) {
- ERROR("Failed to run service\n");
+ ERROR("Failed to run service");
return ret;
}
priv->rxp.sstate = SS_READY;
diff --git a/drivers/net/gve/base/gve_adminq.c b/drivers/net/gve/base/gve_adminq.c
index 09c6bff026..bcb983e4a0 100644
--- a/drivers/net/gve/base/gve_adminq.c
+++ b/drivers/net/gve/base/gve_adminq.c
@@ -11,7 +11,7 @@
#define GVE_ADMINQ_SLEEP_LEN 20
#define GVE_MAX_ADMINQ_EVENT_COUNTER_CHECK 100
-#define GVE_DEVICE_OPTION_ERROR_FMT "%s option error:\n Expected: length=%d, feature_mask=%x.\n Actual: length=%d, feature_mask=%x."
+#define GVE_DEVICE_OPTION_ERROR_FMT "%s option error: Expected: length=%d, feature_mask=%x. Actual: length=%d, feature_mask=%x."
#define GVE_DEVICE_OPTION_TOO_BIG_FMT "Length of %s option larger than expected. Possible older version of guest driver."
@@ -736,7 +736,7 @@ gve_set_max_desc_cnt(struct gve_priv *priv,
{
if (priv->queue_format == GVE_DQO_RDA_FORMAT) {
PMD_DRV_LOG(DEBUG, "Overriding max ring size from device for DQ "
- "queue format to 4096.\n");
+ "queue format to 4096.");
priv->max_rx_desc_cnt = GVE_MAX_QUEUE_SIZE_DQO;
priv->max_tx_desc_cnt = GVE_MAX_QUEUE_SIZE_DQO;
return;
diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
index 89b6ef384a..1f5fa3f1da 100644
--- a/drivers/net/gve/gve_rx.c
+++ b/drivers/net/gve/gve_rx.c
@@ -306,7 +306,7 @@ gve_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
/* Ring size is required to be a power of two. */
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.\n",
+ PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.",
nb_desc);
return -EINVAL;
}
diff --git a/drivers/net/gve/gve_tx.c b/drivers/net/gve/gve_tx.c
index 658bfb972b..015ea9646b 100644
--- a/drivers/net/gve/gve_tx.c
+++ b/drivers/net/gve/gve_tx.c
@@ -561,7 +561,7 @@ gve_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, uint16_t nb_desc,
/* Ring size is required to be a power of two. */
if (!rte_is_power_of_2(nb_desc)) {
- PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.\n",
+ PMD_DRV_LOG(ERR, "Invalid ring size %u. GVE ring size must be a power of 2.",
nb_desc);
return -EINVAL;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_eqs.c b/drivers/net/hinic/base/hinic_pmd_eqs.c
index fecb653401..f0e1139a98 100644
--- a/drivers/net/hinic/base/hinic_pmd_eqs.c
+++ b/drivers/net/hinic/base/hinic_pmd_eqs.c
@@ -471,7 +471,7 @@ int hinic_comm_aeqs_init(struct hinic_hwdev *hwdev)
num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif);
if (num_aeqs < HINIC_MIN_AEQS) {
- PMD_DRV_LOG(ERR, "PMD need %d AEQs, Chip has %d\n",
+ PMD_DRV_LOG(ERR, "PMD need %d AEQs, Chip has %d",
HINIC_MIN_AEQS, num_aeqs);
return -EINVAL;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index 92a7cc1a11..a75a6953ad 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -310,7 +310,7 @@ static int mbox_msg_ack_aeqn(struct hinic_hwdev *hwdev)
/* This is used for ovs */
msg_ack_aeqn = HINIC_AEQN_1;
} else {
- PMD_DRV_LOG(ERR, "Warning: Invalid aeq num: %d\n", aeq_num);
+ PMD_DRV_LOG(ERR, "Warning: Invalid aeq num: %d", aeq_num);
msg_ack_aeqn = -1;
}
@@ -372,13 +372,13 @@ static int init_mbox_info(struct hinic_recv_mbox *mbox_info)
mbox_info->mbox = kzalloc(MBOX_MAX_BUF_SZ, GFP_KERNEL);
if (!mbox_info->mbox) {
- PMD_DRV_LOG(ERR, "Alloc mbox buf_in mem failed\n");
+ PMD_DRV_LOG(ERR, "Alloc mbox buf_in mem failed");
return -ENOMEM;
}
mbox_info->buf_out = kzalloc(MBOX_MAX_BUF_SZ, GFP_KERNEL);
if (!mbox_info->buf_out) {
- PMD_DRV_LOG(ERR, "Alloc mbox buf_out mem failed\n");
+ PMD_DRV_LOG(ERR, "Alloc mbox buf_out mem failed");
err = -ENOMEM;
goto alloc_buf_out_err;
}
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index 8c08d63286..a08020313f 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -683,7 +683,7 @@ int hinic_get_pause_info(void *hwdev, struct nic_pause_config *nic_pause)
&pause_info, sizeof(pause_info),
&pause_info, &out_size);
if (err || !out_size || pause_info.mgmt_msg_head.status) {
- PMD_DRV_LOG(ERR, "Failed to get pause info, err: %d, status: 0x%x, out size: 0x%x\n",
+ PMD_DRV_LOG(ERR, "Failed to get pause info, err: %d, status: 0x%x, out size: 0x%x",
err, pause_info.mgmt_msg_head.status, out_size);
return -EIO;
}
@@ -1332,7 +1332,7 @@ int hinic_get_mgmt_version(void *hwdev, char *fw)
&fw_ver, sizeof(fw_ver), &fw_ver,
&out_size);
if (err || !out_size || fw_ver.mgmt_msg_head.status) {
- PMD_DRV_LOG(ERR, "Failed to get mgmt version, err: %d, status: 0x%x, out size: 0x%x\n",
+ PMD_DRV_LOG(ERR, "Failed to get mgmt version, err: %d, status: 0x%x, out size: 0x%x",
err, fw_ver.mgmt_msg_head.status, out_size);
return -EIO;
}
@@ -1767,7 +1767,7 @@ int hinic_set_fdir_filter(void *hwdev, u8 filter_type, u8 qid, u8 type_enable,
&port_filer_cmd, &out_size);
if (err || !out_size || port_filer_cmd.mgmt_msg_head.status) {
PMD_DRV_LOG(ERR, "Set port Q filter failed, err: %d, status: 0x%x, out size: 0x%x, type: 0x%x,"
- " enable: 0x%x, qid: 0x%x, filter_type_enable: 0x%x\n",
+ " enable: 0x%x, qid: 0x%x, filter_type_enable: 0x%x",
err, port_filer_cmd.mgmt_msg_head.status, out_size,
filter_type, enable, qid, type_enable);
return -EIO;
@@ -1819,7 +1819,7 @@ int hinic_set_normal_filter(void *hwdev, u8 qid, u8 normal_type_enable,
&port_filer_cmd, &out_size);
if (err || !out_size || port_filer_cmd.mgmt_msg_head.status) {
PMD_DRV_LOG(ERR, "Set normal filter failed, err: %d, status: 0x%x, out size: 0x%x, fdir_flag: 0x%x,"
- " enable: 0x%x, qid: 0x%x, normal_type_enable: 0x%x, key:0x%x\n",
+ " enable: 0x%x, qid: 0x%x, normal_type_enable: 0x%x, key:0x%x",
err, port_filer_cmd.mgmt_msg_head.status, out_size,
flag, enable, qid, normal_type_enable, key);
return -EIO;
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index d4978e0649..cb5c013b21 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1914,7 +1914,7 @@ static int hinic_flow_ctrl_set(struct rte_eth_dev *dev,
nic_dev->nic_pause.rx_pause = nic_pause.rx_pause;
nic_dev->nic_pause.tx_pause = nic_pause.tx_pause;
- PMD_DRV_LOG(INFO, "Set pause options, tx: %s, rx: %s, auto: %s\n",
+ PMD_DRV_LOG(INFO, "Set pause options, tx: %s, rx: %s, auto: %s",
nic_pause.tx_pause ? "on" : "off",
nic_pause.rx_pause ? "on" : "off",
nic_pause.auto_neg ? "on" : "off");
@@ -2559,7 +2559,7 @@ static int hinic_pf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
valid_cos_bitmap = hwdev->cfg_mgmt->svc_cap.valid_cos_bitmap;
if (!valid_cos_bitmap) {
- PMD_DRV_LOG(ERR, "PF has none cos to support\n");
+ PMD_DRV_LOG(ERR, "PF has none cos to support");
return -EFAULT;
}
diff --git a/drivers/net/hns3/hns3_dump.c b/drivers/net/hns3/hns3_dump.c
index cb369be5be..a3b58e0a8f 100644
--- a/drivers/net/hns3/hns3_dump.c
+++ b/drivers/net/hns3/hns3_dump.c
@@ -242,7 +242,7 @@ hns3_get_rx_queue(struct rte_eth_dev *dev)
for (queue_id = 0; queue_id < dev->data->nb_rx_queues; queue_id++) {
rx_queues = dev->data->rx_queues;
if (rx_queues == NULL || rx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect rx_queues is NULL!\n");
+ hns3_err(hw, "detect rx_queues is NULL!");
return NULL;
}
@@ -267,7 +267,7 @@ hns3_get_tx_queue(struct rte_eth_dev *dev)
for (queue_id = 0; queue_id < dev->data->nb_tx_queues; queue_id++) {
tx_queues = dev->data->tx_queues;
if (tx_queues == NULL || tx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect tx_queues is NULL!\n");
+ hns3_err(hw, "detect tx_queues is NULL!");
return NULL;
}
@@ -297,7 +297,7 @@ hns3_get_rxtx_fake_queue_info(FILE *file, struct rte_eth_dev *dev)
if (dev->data->nb_rx_queues < dev->data->nb_tx_queues) {
rx_queues = hw->fkq_data.rx_queues;
if (rx_queues == NULL || rx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect rx_queues is NULL!\n");
+ hns3_err(hw, "detect rx_queues is NULL!");
return;
}
rxq = (struct hns3_rx_queue *)rx_queues[queue_id];
@@ -311,7 +311,7 @@ hns3_get_rxtx_fake_queue_info(FILE *file, struct rte_eth_dev *dev)
queue_id = 0;
if (tx_queues == NULL || tx_queues[queue_id] == NULL) {
- hns3_err(hw, "detect tx_queues is NULL!\n");
+ hns3_err(hw, "detect tx_queues is NULL!");
return;
}
txq = (struct hns3_tx_queue *)tx_queues[queue_id];
@@ -961,7 +961,7 @@ hns3_rx_descriptor_dump(const struct rte_eth_dev *dev, uint16_t queue_id,
return -EINVAL;
if (num > rxq->nb_rx_desc) {
- hns3_err(hw, "Invalid BD num=%u\n", num);
+ hns3_err(hw, "Invalid BD num=%u", num);
return -EINVAL;
}
@@ -1003,7 +1003,7 @@ hns3_tx_descriptor_dump(const struct rte_eth_dev *dev, uint16_t queue_id,
return -EINVAL;
if (num > txq->nb_tx_desc) {
- hns3_err(hw, "Invalid BD num=%u\n", num);
+ hns3_err(hw, "Invalid BD num=%u", num);
return -EINVAL;
}
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 26fa2eb951..f7162ee7bc 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1806,7 +1806,7 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret)
- hns3_err(hw, "fail to %s TM QCN mem errors, ret = %d\n",
+ hns3_err(hw, "fail to %s TM QCN mem errors, ret = %d",
en ? "enable" : "disable", ret);
return ret;
@@ -1847,7 +1847,7 @@ enable_common_err_intr(struct hns3_adapter *hns, bool en)
ret = hns3_cmd_send(hw, &desc[0], RTE_DIM(desc));
if (ret)
- hns3_err(hw, "fail to %s common err interrupts, ret = %d\n",
+ hns3_err(hw, "fail to %s common err interrupts, ret = %d",
en ? "enable" : "disable", ret);
return ret;
@@ -1984,7 +1984,7 @@ query_num_bds(struct hns3_hw *hw, bool is_ras, uint32_t *mpf_bd_num,
pf_bd_num_val = rte_le_to_cpu_32(desc.data[1]);
if (mpf_bd_num_val < mpf_min_bd_num || pf_bd_num_val < pf_min_bd_num) {
hns3_err(hw, "error bd num: mpf(%u), min_mpf(%u), "
- "pf(%u), min_pf(%u)\n", mpf_bd_num_val, mpf_min_bd_num,
+ "pf(%u), min_pf(%u)", mpf_bd_num_val, mpf_min_bd_num,
pf_bd_num_val, pf_min_bd_num);
return -EINVAL;
}
@@ -2061,7 +2061,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
opcode = HNS3_OPC_QUERY_CLEAR_PF_RAS_INT;
break;
default:
- hns3_err(hw, "error hardware err_type = %d\n", err_type);
+ hns3_err(hw, "error hardware err_type = %d", err_type);
return -EINVAL;
}
@@ -2069,7 +2069,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
hns3_cmd_setup_basic_desc(&desc[0], opcode, true);
ret = hns3_cmd_send(hw, &desc[0], num);
if (ret) {
- hns3_err(hw, "query hw err int 0x%x cmd failed, ret = %d\n",
+ hns3_err(hw, "query hw err int 0x%x cmd failed, ret = %d",
opcode, ret);
return ret;
}
@@ -2097,7 +2097,7 @@ hns3_handle_hw_error(struct hns3_adapter *hns, struct hns3_cmd_desc *desc,
hns3_cmd_reuse_desc(&desc[0], false);
ret = hns3_cmd_send(hw, &desc[0], num);
if (ret)
- hns3_err(hw, "clear all hw err int cmd failed, ret = %d\n",
+ hns3_err(hw, "clear all hw err int cmd failed, ret = %d",
ret);
return ret;
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 894ac6dd71..c6e77d21cb 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -50,7 +50,7 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en)
ret = hns3_cmd_send(hw, &desc, 1);
if (ret)
hns3_err(hw,
- "failed to %s ptp interrupt, ret = %d\n",
+ "failed to %s ptp interrupt, ret = %d",
en ? "enable" : "disable", ret);
return ret;
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index be1be6a89c..955bc7e3af 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -355,7 +355,7 @@ hns3_get_dfx_reg_bd_num(struct hns3_hw *hw, uint32_t *bd_num_list,
ret = hns3_cmd_send(hw, desc, HNS3_GET_DFX_REG_BD_NUM_SIZE);
if (ret) {
- hns3_err(hw, "fail to get dfx bd num, ret = %d.\n", ret);
+ hns3_err(hw, "fail to get dfx bd num, ret = %d.", ret);
return ret;
}
@@ -387,7 +387,7 @@ hns3_dfx_reg_cmd_send(struct hns3_hw *hw, struct hns3_cmd_desc *desc,
ret = hns3_cmd_send(hw, desc, bd_num);
if (ret)
hns3_err(hw, "fail to query dfx registers, opcode = 0x%04X, "
- "ret = %d.\n", opcode, ret);
+ "ret = %d.", opcode, ret);
return ret;
}
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f847bf82bc..42f51c7621 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -668,7 +668,7 @@ eth_i40e_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type: %s\n",
+ PMD_DRV_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
@@ -1583,10 +1583,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
val = I40E_READ_REG(hw, I40E_GL_FWSTS);
if (val & I40E_GL_FWSTS_FWS1B_MASK) {
- PMD_INIT_LOG(ERR, "\nERROR: "
- "Firmware recovery mode detected. Limiting functionality.\n"
- "Refer to the Intel(R) Ethernet Adapters and Devices "
- "User Guide for details on firmware recovery mode.");
+ PMD_INIT_LOG(ERR, "ERROR: Firmware recovery mode detected. Limiting functionality.");
return -EIO;
}
@@ -2326,7 +2323,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
status = i40e_aq_get_phy_capabilities(hw, false, true, &phy_ab,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
status);
return ret;
}
@@ -2336,7 +2333,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_ab,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d",
status);
return ret;
}
@@ -2361,7 +2358,7 @@ i40e_phy_conf_link(struct i40e_hw *hw,
* Warn users and config the default available speeds.
*/
if (is_up && !(force_speed & avail_speed)) {
- PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+ PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!");
phy_conf.link_speed = avail_speed;
} else {
phy_conf.link_speed = is_up ? force_speed : avail_speed;
@@ -6959,7 +6956,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_GL_MDET_TX_QUEUE_SHIFT) -
hw->func_caps.base_queue;
PMD_DRV_LOG(WARNING, "Malicious Driver Detection event 0x%02x on TX "
- "queue %d PF number 0x%02x VF number 0x%02x device %s\n",
+ "queue %d PF number 0x%02x VF number 0x%02x device %s",
event, queue, pf_num, vf_num, dev->data->name);
I40E_WRITE_REG(hw, I40E_GL_MDET_TX, I40E_MDD_CLEAR32);
mdd_detected = true;
@@ -6975,7 +6972,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
hw->func_caps.base_queue;
PMD_DRV_LOG(WARNING, "Malicious Driver Detection event 0x%02x on RX "
- "queue %d of function 0x%02x device %s\n",
+ "queue %d of function 0x%02x device %s",
event, queue, func, dev->data->name);
I40E_WRITE_REG(hw, I40E_GL_MDET_RX, I40E_MDD_CLEAR32);
mdd_detected = true;
@@ -6985,13 +6982,13 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
reg = I40E_READ_REG(hw, I40E_PF_MDET_TX);
if (reg & I40E_PF_MDET_TX_VALID_MASK) {
I40E_WRITE_REG(hw, I40E_PF_MDET_TX, I40E_MDD_CLEAR16);
- PMD_DRV_LOG(WARNING, "TX driver issue detected on PF\n");
+ PMD_DRV_LOG(WARNING, "TX driver issue detected on PF");
}
reg = I40E_READ_REG(hw, I40E_PF_MDET_RX);
if (reg & I40E_PF_MDET_RX_VALID_MASK) {
I40E_WRITE_REG(hw, I40E_PF_MDET_RX,
I40E_MDD_CLEAR16);
- PMD_DRV_LOG(WARNING, "RX driver issue detected on PF\n");
+ PMD_DRV_LOG(WARNING, "RX driver issue detected on PF");
}
}
@@ -7004,7 +7001,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_MDD_CLEAR16);
vf->num_mdd_events++;
PMD_DRV_LOG(WARNING, "TX driver issue detected on VF %d %-"
- PRIu64 "times\n",
+ PRIu64 "times",
i, vf->num_mdd_events);
}
@@ -7014,7 +7011,7 @@ i40e_handle_mdd_event(struct rte_eth_dev *dev)
I40E_MDD_CLEAR16);
vf->num_mdd_events++;
PMD_DRV_LOG(WARNING, "RX driver issue detected on VF %d %-"
- PRIu64 "times\n",
+ PRIu64 "times",
i, vf->num_mdd_events);
}
}
@@ -11449,7 +11446,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE)) {
PMD_DRV_LOG(ERR,
"Module EEPROM memory read not supported. "
- "Please update the NVM image.\n");
+ "Please update the NVM image.");
return -EINVAL;
}
@@ -11460,7 +11457,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (hw->phy.link_info.phy_type == I40E_PHY_TYPE_EMPTY) {
PMD_DRV_LOG(ERR,
"Cannot read module EEPROM memory. "
- "No module connected.\n");
+ "No module connected.");
return -EINVAL;
}
@@ -11490,7 +11487,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
if (sff8472_swap & I40E_MODULE_SFF_ADDR_MODE) {
PMD_DRV_LOG(WARNING,
"Module address swap to access "
- "page 0xA2 is not supported.\n");
+ "page 0xA2 is not supported.");
modinfo->type = RTE_ETH_MODULE_SFF_8079;
modinfo->eeprom_len = RTE_ETH_MODULE_SFF_8079_LEN;
} else if (sff8472_comp == 0x00) {
@@ -11526,7 +11523,7 @@ static int i40e_get_module_info(struct rte_eth_dev *dev,
modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
break;
default:
- PMD_DRV_LOG(ERR, "Module type unrecognized\n");
+ PMD_DRV_LOG(ERR, "Module type unrecognized");
return -EINVAL;
}
return 0;
@@ -11828,7 +11825,7 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
}
}
name[strlen(name) - 1] = '\0';
- PMD_DRV_LOG(INFO, "name = %s\n", name);
+ PMD_DRV_LOG(INFO, "name = %s", name);
if (!strcmp(name, "GTPC"))
new_pctype =
i40e_find_customized_pctype(pf,
@@ -11972,7 +11969,7 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
continue;
memset(name, 0, sizeof(name));
strcpy(name, proto[n].name);
- PMD_DRV_LOG(INFO, "name = %s\n", name);
+ PMD_DRV_LOG(INFO, "name = %s", name);
if (!strncasecmp(name, "PPPOE", 5))
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_L2_ETHER_PPPOE;
@@ -12317,7 +12314,7 @@ i40e_fec_get_capability(struct rte_eth_dev *dev,
if (hw->mac.type == I40E_MAC_X722 &&
!(hw->flags & I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE)) {
PMD_DRV_LOG(ERR, "Setting FEC encoding not supported by"
- " firmware. Please update the NVM image.\n");
+ " firmware. Please update the NVM image.");
return -ENOTSUP;
}
@@ -12359,7 +12356,7 @@ i40e_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
/* Get link info */
ret = i40e_aq_get_link_info(hw, enable_lse, &link_status, NULL);
if (ret != I40E_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get link information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get link information: %d",
ret);
return -ENOTSUP;
}
@@ -12369,7 +12366,7 @@ i40e_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = i40e_aq_get_phy_capabilities(hw, false, false, &abilities,
NULL);
if (ret) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
ret);
return -ENOTSUP;
}
@@ -12435,7 +12432,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
if (hw->mac.type == I40E_MAC_X722 &&
!(hw->flags & I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE)) {
PMD_DRV_LOG(ERR, "Setting FEC encoding not supported by"
- " firmware. Please update the NVM image.\n");
+ " firmware. Please update the NVM image.");
return -ENOTSUP;
}
@@ -12507,7 +12504,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
status = i40e_aq_get_phy_capabilities(hw, false, false, &abilities,
NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d",
status);
return -ENOTSUP;
}
@@ -12524,7 +12521,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
config.fec_config = req_fec & I40E_AQ_PHY_FEC_CONFIG_MASK;
status = i40e_aq_set_phy_config(hw, &config, NULL);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d",
status);
return -ENOTSUP;
}
@@ -12532,7 +12529,7 @@ i40e_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa)
status = i40e_update_link_info(hw);
if (status) {
- PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to set PHY capabilities: %d",
status);
return -ENOTSUP;
}
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 15d9ff868f..4a47a8f7ee 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -1280,17 +1280,17 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
req_pairs = i40e_align_floor(req_pairs) << 1;
if (req_pairs == 0) {
- PMD_DRV_LOG(ERR, "VF %d tried to request 0 queues. Ignoring.\n",
+ PMD_DRV_LOG(ERR, "VF %d tried to request 0 queues. Ignoring.",
vf->vf_idx);
} else if (req_pairs > I40E_MAX_QP_NUM_PER_VF) {
PMD_DRV_LOG(ERR,
- "VF %d tried to request more than %d queues.\n",
+ "VF %d tried to request more than %d queues.",
vf->vf_idx,
I40E_MAX_QP_NUM_PER_VF);
vfres->num_queue_pairs = I40E_MAX_QP_NUM_PER_VF;
} else if (req_pairs > cur_pairs + pf->qp_pool.num_free) {
PMD_DRV_LOG(ERR, "VF %d requested %d queues (rounded to %d) "
- "but only %d available\n",
+ "but only %d available",
vf->vf_idx,
vfres->num_queue_pairs,
req_pairs,
@@ -1550,7 +1550,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
if (first_cycle && cur_cycle < first_cycle +
(uint64_t)pf->vf_msg_cfg.period * rte_get_timer_hz()) {
PMD_DRV_LOG(WARNING, "VF %u too much messages(%u in %u"
- " seconds),\n\tany new message from which"
+ " seconds), any new message from which"
" will be ignored during next %u seconds!",
vf_id, pf->vf_msg_cfg.max_msg,
(uint32_t)((cur_cycle - first_cycle +
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index ff977a3681..839c8a5442 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1229,11 +1229,11 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
ctx_txd->type_cmd_tso_mss =
rte_cpu_to_le_64(cd_type_cmd_tso_mss);
- PMD_TX_LOG(DEBUG, "mbuf: %p, TCD[%u]:\n"
- "tunneling_params: %#x;\n"
- "l2tag2: %#hx;\n"
- "rsvd: %#hx;\n"
- "type_cmd_tso_mss: %#"PRIx64";\n",
+ PMD_TX_LOG(DEBUG, "mbuf: %p, TCD[%u]: "
+ "tunneling_params: %#x; "
+ "l2tag2: %#hx; "
+ "rsvd: %#hx; "
+ "type_cmd_tso_mss: %#"PRIx64";",
tx_pkt, tx_id,
ctx_txd->tunneling_params,
ctx_txd->l2tag2,
@@ -1276,12 +1276,12 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
txd = &txr[tx_id];
txn = &sw_ring[txe->next_id];
}
- PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]:\n"
- "buf_dma_addr: %#"PRIx64";\n"
- "td_cmd: %#x;\n"
- "td_offset: %#x;\n"
- "td_len: %u;\n"
- "td_tag: %#x;\n",
+ PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]: "
+ "buf_dma_addr: %#"PRIx64"; "
+ "td_cmd: %#x; "
+ "td_offset: %#x; "
+ "td_len: %u; "
+ "td_tag: %#x;",
tx_pkt, tx_id, buf_dma_addr,
td_cmd, td_offset, slen, td_tag);
@@ -1564,7 +1564,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
if ((adapter->mbuf_check & I40E_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -1573,7 +1573,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
(mb->data_len > mb->pkt_len ||
mb->data_len < I40E_TX_MIN_PKT_LEN ||
mb->data_len > adapter->max_pkt_len)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)",
mb->data_len, I40E_TX_MIN_PKT_LEN, adapter->max_pkt_len);
pkt_error = true;
break;
@@ -1586,13 +1586,13 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
* the limites.
*/
if (mb->nb_segs > I40E_TX_MAX_MTU_SEG) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_TX_MAX_MTU_SEG);
pkt_error = true;
break;
}
if (mb->pkt_len > I40E_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -1606,18 +1606,18 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
/**
* MSS outside the range are considered malicious
*/
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, I40E_MIN_TSO_MSS, I40E_MAX_TSO_MSS);
pkt_error = true;
break;
}
if (mb->nb_segs > ((struct i40e_tx_queue *)tx_queue)->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
if (mb->pkt_len > I40E_TSO_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, I40E_TSO_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -1627,13 +1627,13 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
if (adapter->mbuf_check & I40E_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & I40E_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
@@ -3573,7 +3573,7 @@ i40e_set_tx_function_flag(struct rte_eth_dev *dev, struct i40e_tx_queue *txq)
txq->queue_id);
else
PMD_INIT_LOG(DEBUG,
- "Neither simple nor vector Tx enabled on Tx queue %u\n",
+ "Neither simple nor vector Tx enabled on Tx queue %u",
txq->queue_id);
}
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 44276dcf38..c56fcfadf0 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2383,7 +2383,7 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
kvlist = rte_kvargs_parse(devargs->args, iavf_valid_args);
if (!kvlist) {
- PMD_INIT_LOG(ERR, "invalid kvargs key\n");
+ PMD_INIT_LOG(ERR, "invalid kvargs key");
return -EINVAL;
}
@@ -2418,7 +2418,7 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
if (ad->devargs.quanta_size != 0 &&
(ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
ad->devargs.quanta_size & 0x40)) {
- PMD_INIT_LOG(ERR, "invalid quanta size\n");
+ PMD_INIT_LOG(ERR, "invalid quanta size");
ret = -EINVAL;
goto bail;
}
@@ -3059,12 +3059,12 @@ iavf_dev_reset(struct rte_eth_dev *dev)
*/
ret = iavf_check_vf_reset_done(hw);
if (ret) {
- PMD_DRV_LOG(ERR, "Wait too long for reset done!\n");
+ PMD_DRV_LOG(ERR, "Wait too long for reset done!");
return ret;
}
iavf_set_no_poll(adapter, false);
- PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");
+ PMD_DRV_LOG(DEBUG, "Start dev_reset ...");
ret = iavf_dev_uninit(dev);
if (ret)
return ret;
@@ -3109,7 +3109,7 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
return;
if (!iavf_is_reset_detected(adapter)) {
- PMD_DRV_LOG(DEBUG, "reset not start\n");
+ PMD_DRV_LOG(DEBUG, "reset not start");
return;
}
@@ -3136,7 +3136,7 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
goto exit;
error:
- PMD_DRV_LOG(DEBUG, "RESET recover with error code=%d\n", ret);
+ PMD_DRV_LOG(DEBUG, "RESET recover with error code=%dn", ret);
exit:
vf->in_reset_recovery = false;
iavf_set_no_poll(adapter, false);
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index ecc31430d1..4850b9e381 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3036,7 +3036,7 @@ iavf_check_vlan_up2tc(struct iavf_tx_queue *txq, struct rte_mbuf *m)
up = m->vlan_tci >> IAVF_VLAN_TAG_PCP_OFFSET;
if (!(vf->qos_cap->cap[txq->tc].tc_prio & BIT(up))) {
- PMD_TX_LOG(ERR, "packet with vlan pcp %u cannot transmit in queue %u\n",
+ PMD_TX_LOG(ERR, "packet with vlan pcp %u cannot transmit in queue %u",
up, txq->queue_id);
return -1;
} else {
@@ -3830,7 +3830,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if ((adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -3838,7 +3838,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if ((adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_SIZE) &&
(mb->data_len < IAVF_TX_MIN_PKT_LEN ||
mb->data_len > adapter->vf.max_pkt_len)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %u)",
mb->data_len, IAVF_TX_MIN_PKT_LEN, adapter->vf.max_pkt_len);
pkt_error = true;
break;
@@ -3848,7 +3848,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Check condition for nb_segs > IAVF_TX_MAX_MTU_SEG. */
if (!(ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG))) {
if (mb->nb_segs > IAVF_TX_MAX_MTU_SEG) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, IAVF_TX_MAX_MTU_SEG);
pkt_error = true;
break;
@@ -3856,12 +3856,12 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
} else if ((mb->tso_segsz < IAVF_MIN_TSO_MSS) ||
(mb->tso_segsz > IAVF_MAX_TSO_MSS)) {
/* MSS outside the range are considered malicious */
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, IAVF_MIN_TSO_MSS, IAVF_MAX_TSO_MSS);
pkt_error = true;
break;
} else if (mb->nb_segs > txq->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
@@ -3869,13 +3869,13 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
if (adapter->devargs.mbuf_check & IAVF_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & IAVF_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 8f3a385ca5..91f4943a11 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -1646,7 +1646,7 @@ ice_dcf_init_repr_info(struct ice_dcf_adapter *dcf_adapter)
dcf_adapter->real_hw.num_vfs,
sizeof(dcf_adapter->repr_infos[0]), 0);
if (!dcf_adapter->repr_infos) {
- PMD_DRV_LOG(ERR, "Failed to alloc memory for VF representors\n");
+ PMD_DRV_LOG(ERR, "Failed to alloc memory for VF representors");
return -ENOMEM;
}
@@ -2088,7 +2088,7 @@ eth_ice_dcf_pci_probe(__rte_unused struct rte_pci_driver *pci_drv,
}
if (dcf_adapter->real_hw.vf_vsi_map[vf_id] == dcf_vsi_id) {
- PMD_DRV_LOG(ERR, "VF ID %u is DCF's ID.\n", vf_id);
+ PMD_DRV_LOG(ERR, "VF ID %u is DCF's ID.", vf_id);
ret = -EINVAL;
break;
}
diff --git a/drivers/net/ice/ice_dcf_vf_representor.c b/drivers/net/ice/ice_dcf_vf_representor.c
index af281f069a..564ff02fd8 100644
--- a/drivers/net/ice/ice_dcf_vf_representor.c
+++ b/drivers/net/ice/ice_dcf_vf_representor.c
@@ -133,7 +133,7 @@ ice_dcf_vf_repr_hw(struct ice_dcf_vf_repr *repr)
struct ice_dcf_adapter *dcf_adapter;
if (!repr->dcf_valid) {
- PMD_DRV_LOG(ERR, "DCF for VF representor has been released\n");
+ PMD_DRV_LOG(ERR, "DCF for VF representor has been released");
return NULL;
}
@@ -272,7 +272,7 @@ ice_dcf_vf_repr_vlan_offload_set(struct rte_eth_dev *dev, int mask)
if (enable && repr->outer_vlan_info.port_vlan_ena) {
PMD_DRV_LOG(ERR,
- "Disable the port VLAN firstly\n");
+ "Disable the port VLAN firstly");
return -EINVAL;
}
@@ -318,7 +318,7 @@ ice_dcf_vf_repr_vlan_pvid_set(struct rte_eth_dev *dev,
if (repr->outer_vlan_info.stripping_ena) {
PMD_DRV_LOG(ERR,
- "Disable the VLAN stripping firstly\n");
+ "Disable the VLAN stripping firstly");
return -EINVAL;
}
@@ -367,7 +367,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
if (vlan_type != RTE_ETH_VLAN_TYPE_OUTER) {
PMD_DRV_LOG(ERR,
- "Can accelerate only outer VLAN in QinQ\n");
+ "Can accelerate only outer VLAN in QinQ");
return -EINVAL;
}
@@ -375,7 +375,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
tpid != RTE_ETHER_TYPE_VLAN &&
tpid != RTE_ETHER_TYPE_QINQ1) {
PMD_DRV_LOG(ERR,
- "Invalid TPID: 0x%04x\n", tpid);
+ "Invalid TPID: 0x%04x", tpid);
return -EINVAL;
}
@@ -387,7 +387,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
true);
if (err) {
PMD_DRV_LOG(ERR,
- "Failed to reset port VLAN : %d\n",
+ "Failed to reset port VLAN : %d",
err);
return err;
}
@@ -398,7 +398,7 @@ ice_dcf_vf_repr_vlan_tpid_set(struct rte_eth_dev *dev,
RTE_ETH_VLAN_STRIP_MASK);
if (err) {
PMD_DRV_LOG(ERR,
- "Failed to reset VLAN stripping : %d\n",
+ "Failed to reset VLAN stripping : %d",
err);
return err;
}
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 304f959b7e..7b1bd163a2 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1907,7 +1907,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE);
if (rte_firmware_read(pkg_file, &buf, &bufsz) < 0) {
- PMD_INIT_LOG(ERR, "failed to search file path\n");
+ PMD_INIT_LOG(ERR, "failed to search file path");
return -1;
}
@@ -1916,7 +1916,7 @@ int ice_load_pkg(struct ice_adapter *adapter, bool use_dsn, uint64_t dsn)
err = ice_copy_and_init_pkg(hw, buf, bufsz);
if (!ice_is_init_pkg_successful(err)) {
- PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d\n", err);
+ PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d", err);
free(buf);
return -1;
}
@@ -2166,7 +2166,7 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
kvlist = rte_kvargs_parse(devargs->args, ice_valid_args);
if (kvlist == NULL) {
- PMD_INIT_LOG(ERR, "Invalid kvargs key\n");
+ PMD_INIT_LOG(ERR, "Invalid kvargs key");
return -EINVAL;
}
@@ -2405,20 +2405,20 @@ ice_dev_init(struct rte_eth_dev *dev)
if (pos) {
if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0 ||
rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) {
- PMD_INIT_LOG(ERR, "Failed to read pci config space\n");
+ PMD_INIT_LOG(ERR, "Failed to read pci config space");
} else {
use_dsn = true;
dsn = (uint64_t)dsn_high << 32 | dsn_low;
}
} else {
- PMD_INIT_LOG(ERR, "Failed to read device serial number\n");
+ PMD_INIT_LOG(ERR, "Failed to read device serial number");
}
ret = ice_load_pkg(pf->adapter, use_dsn, dsn);
if (ret == 0) {
ret = ice_init_hw_tbls(hw);
if (ret) {
- PMD_INIT_LOG(ERR, "ice_init_hw_tbls failed: %d\n", ret);
+ PMD_INIT_LOG(ERR, "ice_init_hw_tbls failed: %d", ret);
rte_free(hw->pkg_copy);
}
}
@@ -2470,14 +2470,14 @@ ice_dev_init(struct rte_eth_dev *dev)
ret = ice_aq_stop_lldp(hw, true, false, NULL);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "lldp has already stopped\n");
+ PMD_INIT_LOG(DEBUG, "lldp has already stopped");
ret = ice_init_dcb(hw, true);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "Failed to init DCB\n");
+ PMD_INIT_LOG(DEBUG, "Failed to init DCB");
/* Forward LLDP packets to default VSI */
ret = ice_lldp_fltr_add_remove(hw, vsi->vsi_id, true);
if (ret != ICE_SUCCESS)
- PMD_INIT_LOG(DEBUG, "Failed to cfg lldp\n");
+ PMD_INIT_LOG(DEBUG, "Failed to cfg lldp");
/* register callback func to eal lib */
rte_intr_callback_register(intr_handle,
ice_interrupt_handler, dev);
@@ -2502,7 +2502,7 @@ ice_dev_init(struct rte_eth_dev *dev)
if (hw->phy_model == ICE_PHY_E822) {
ret = ice_start_phy_timer_e822(hw, hw->pf_id);
if (ret)
- PMD_INIT_LOG(ERR, "Failed to start phy timer\n");
+ PMD_INIT_LOG(ERR, "Failed to start phy timer");
}
if (!ad->is_safe_mode) {
@@ -2748,7 +2748,7 @@ ice_hash_moveout(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)
status = ice_rem_rss_cfg(hw, vsi->idx, cfg);
if (status && status != ICE_ERR_DOES_NOT_EXIST) {
PMD_DRV_LOG(ERR,
- "ice_rem_rss_cfg failed for VSI:%d, error:%d\n",
+ "ice_rem_rss_cfg failed for VSI:%d, error:%d",
vsi->idx, status);
return -EBUSY;
}
@@ -2769,7 +2769,7 @@ ice_hash_moveback(struct ice_pf *pf, struct ice_rss_hash_cfg *cfg)
status = ice_add_rss_cfg(hw, vsi->idx, cfg);
if (status) {
PMD_DRV_LOG(ERR,
- "ice_add_rss_cfg failed for VSI:%d, error:%d\n",
+ "ice_add_rss_cfg failed for VSI:%d, error:%d",
vsi->idx, status);
return -EBUSY;
}
@@ -3164,7 +3164,7 @@ ice_rem_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,
ret = ice_rem_rss_cfg(hw, vsi_id, cfg);
if (ret && ret != ICE_ERR_DOES_NOT_EXIST)
- PMD_DRV_LOG(ERR, "remove rss cfg failed\n");
+ PMD_DRV_LOG(ERR, "remove rss cfg failed");
ice_rem_rss_cfg_post(pf, cfg->addl_hdrs);
@@ -3180,15 +3180,15 @@ ice_add_rss_cfg_wrap(struct ice_pf *pf, uint16_t vsi_id,
ret = ice_add_rss_cfg_pre(pf, cfg->addl_hdrs);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg pre failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg pre failed");
ret = ice_add_rss_cfg(hw, vsi_id, cfg);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg failed");
ret = ice_add_rss_cfg_post(pf, cfg);
if (ret)
- PMD_DRV_LOG(ERR, "add rss cfg post failed\n");
+ PMD_DRV_LOG(ERR, "add rss cfg post failed");
return 0;
}
@@ -3378,7 +3378,7 @@ ice_get_default_rss_key(uint8_t *rss_key, uint32_t rss_key_size)
if (rss_key_size > sizeof(default_key)) {
PMD_DRV_LOG(WARNING,
"requested size %u is larger than default %zu, "
- "only %zu bytes are gotten for key\n",
+ "only %zu bytes are gotten for key",
rss_key_size, sizeof(default_key),
sizeof(default_key));
}
@@ -3413,12 +3413,12 @@ static int ice_init_rss(struct ice_pf *pf)
if (nb_q == 0) {
PMD_DRV_LOG(WARNING,
- "RSS is not supported as rx queues number is zero\n");
+ "RSS is not supported as rx queues number is zero");
return 0;
}
if (is_safe_mode) {
- PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode\n");
+ PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode");
return 0;
}
@@ -4277,7 +4277,7 @@ ice_phy_conf_link(struct ice_hw *hw,
cfg.phy_type_low = phy_type_low & phy_caps->phy_type_low;
cfg.phy_type_high = phy_type_high & phy_caps->phy_type_high;
} else {
- PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+ PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!");
cfg.phy_type_low = phy_caps->phy_type_low;
cfg.phy_type_high = phy_caps->phy_type_high;
}
@@ -5734,7 +5734,7 @@ ice_get_module_info(struct rte_eth_dev *dev,
}
break;
default:
- PMD_DRV_LOG(WARNING, "SFF Module Type not recognized.\n");
+ PMD_DRV_LOG(WARNING, "SFF Module Type not recognized.");
return -EINVAL;
}
return 0;
@@ -5805,7 +5805,7 @@ ice_get_module_eeprom(struct rte_eth_dev *dev,
0, NULL);
PMD_DRV_LOG(DEBUG, "SFF %02X %02X %02X %X = "
"%02X%02X%02X%02X."
- "%02X%02X%02X%02X (%X)\n",
+ "%02X%02X%02X%02X (%X)",
addr, offset, page, is_sfp,
value[0], value[1],
value[2], value[3],
@@ -6773,7 +6773,7 @@ ice_fec_get_capability(struct rte_eth_dev *dev, struct rte_eth_fec_capa *speed_f
ret = ice_aq_get_phy_caps(hw->port_info, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA,
&pcaps, NULL);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get capability information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get capability information: %d",
ret);
return -ENOTSUP;
}
@@ -6805,7 +6805,7 @@ ice_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = ice_get_link_info_safe(pf, enable_lse, &link_status);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get link information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get link information: %d",
ret);
return -ENOTSUP;
}
@@ -6815,7 +6815,7 @@ ice_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)
ret = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP_MEDIA,
&pcaps, NULL);
if (ret != ICE_SUCCESS) {
- PMD_DRV_LOG(ERR, "Failed to get capability information: %d\n",
+ PMD_DRV_LOG(ERR, "Failed to get capability information: %d",
ret);
return -ENOTSUP;
}
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index edd8cc8f1a..741107f939 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -334,7 +334,7 @@ ice_fdir_counter_alloc(struct ice_pf *pf, uint32_t shared, uint32_t id)
}
if (!counter_free) {
- PMD_DRV_LOG(ERR, "No free counter found\n");
+ PMD_DRV_LOG(ERR, "No free counter found");
return NULL;
}
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index b720e0f755..00d65bc637 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -1245,13 +1245,13 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad,
ice_get_hw_vsi_num(hw, vsi_handle),
id);
if (ret) {
- PMD_DRV_LOG(ERR, "remove RSS flow failed\n");
+ PMD_DRV_LOG(ERR, "remove RSS flow failed");
return ret;
}
ret = ice_rem_prof(hw, ICE_BLK_RSS, id);
if (ret) {
- PMD_DRV_LOG(ERR, "remove RSS profile failed\n");
+ PMD_DRV_LOG(ERR, "remove RSS profile failed");
return ret;
}
}
@@ -1259,7 +1259,7 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad,
/* add new profile */
ret = ice_flow_set_hw_prof(hw, vsi_handle, 0, prof, ICE_BLK_RSS);
if (ret) {
- PMD_DRV_LOG(ERR, "HW profile add failed\n");
+ PMD_DRV_LOG(ERR, "HW profile add failed");
return ret;
}
@@ -1381,7 +1381,7 @@ ice_hash_rem_raw_cfg(struct ice_adapter *ad,
return 0;
err:
- PMD_DRV_LOG(ERR, "HW profile remove failed\n");
+ PMD_DRV_LOG(ERR, "HW profile remove failed");
return ret;
}
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f270498ed1..acd7539b5e 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2839,7 +2839,7 @@ ice_xmit_cleanup(struct ice_tx_queue *txq)
if (!(txd[desc_to_clean_to].cmd_type_offset_bsz &
rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DESC_DONE))) {
PMD_TX_LOG(DEBUG, "TX descriptor %4u is not done "
- "(port=%d queue=%d) value=0x%"PRIx64"\n",
+ "(port=%d queue=%d) value=0x%"PRIx64,
desc_to_clean_to,
txq->port_id, txq->queue_id,
txd[desc_to_clean_to].cmd_type_offset_bsz);
@@ -3714,7 +3714,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
if ((adapter->devargs.mbuf_check & ICE_MBUF_CHECK_F_TX_MBUF) &&
(rte_mbuf_check(mb, 1, &reason) != 0)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: %s\n", reason);
+ PMD_TX_LOG(ERR, "INVALID mbuf: %s", reason);
pkt_error = true;
break;
}
@@ -3723,7 +3723,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
(mb->data_len > mb->pkt_len ||
mb->data_len < ICE_TX_MIN_PKT_LEN ||
mb->data_len > ICE_FRAME_SIZE_MAX)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %d)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: data_len (%u) is out of range, reasonable range (%d - %d)",
mb->data_len, ICE_TX_MIN_PKT_LEN, ICE_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -3736,13 +3736,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
* the limites.
*/
if (mb->nb_segs > ICE_TX_MTU_SEG_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, ICE_TX_MTU_SEG_MAX);
pkt_error = true;
break;
}
if (mb->pkt_len > ICE_FRAME_SIZE_MAX) {
- PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: pkt_len (%d) exceeds HW limit, maximum allowed value is %d",
mb->nb_segs, ICE_FRAME_SIZE_MAX);
pkt_error = true;
break;
@@ -3756,13 +3756,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/**
* MSS outside the range are considered malicious
*/
- PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)\n",
+ PMD_TX_LOG(ERR, "INVALID mbuf: tso_segsz (%u) is out of range, reasonable range (%d - %u)",
mb->tso_segsz, ICE_MIN_TSO_MSS, ICE_MAX_TSO_MSS);
pkt_error = true;
break;
}
if (mb->nb_segs > ((struct ice_tx_queue *)tx_queue)->nb_tx_desc) {
- PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: nb_segs out of ring length");
pkt_error = true;
break;
}
@@ -3771,13 +3771,13 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
if (adapter->devargs.mbuf_check & ICE_MBUF_CHECK_F_TX_OFFLOAD) {
if (ol_flags & ICE_TX_OFFLOAD_NOTSUP_MASK) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload is not supported");
pkt_error = true;
break;
}
if (!rte_validate_tx_offload(mb)) {
- PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error\n");
+ PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
pkt_error = true;
break;
}
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index 2c15611a23..baae80d661 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -203,7 +203,7 @@ ipn3ke_vbng_init_done(struct ipn3ke_hw *hw)
}
if (!timeout) {
- IPN3KE_AFU_PMD_ERR("IPN3KE vBNG INIT timeout.\n");
+ IPN3KE_AFU_PMD_ERR("IPN3KE vBNG INIT timeout.");
return -1;
}
@@ -348,7 +348,7 @@ ipn3ke_hw_init(struct rte_afu_device *afu_dev,
hw->acc_tm = 1;
hw->acc_flow = 1;
- IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x\n",
+ IPN3KE_AFU_PMD_DEBUG("UPL_version is 0x%x",
IPN3KE_READ_REG(hw, 0));
}
diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c
index d20a29b9a2..a2f76268b5 100644
--- a/drivers/net/ipn3ke/ipn3ke_flow.c
+++ b/drivers/net/ipn3ke/ipn3ke_flow.c
@@ -993,7 +993,7 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
uint32_t time_out = MHL_COMMAND_TIME_COUNT;
uint32_t i;
- IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump start\n");
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump start");
pdata = (uint32_t *)flow->rule.key;
IPN3KE_AFU_PMD_DEBUG(" - key :");
@@ -1003,7 +1003,6 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
for (i = 0; i < 4; i++)
IPN3KE_AFU_PMD_DEBUG(" %02x", ipn3ke_swap32(pdata[3 - i]));
- IPN3KE_AFU_PMD_DEBUG("\n");
pdata = (uint32_t *)flow->rule.result;
IPN3KE_AFU_PMD_DEBUG(" - result:");
@@ -1013,7 +1012,7 @@ ipn3ke_flow_hw_update(struct ipn3ke_hw *hw,
for (i = 0; i < 1; i++)
IPN3KE_AFU_PMD_DEBUG(" %02x", pdata[i]);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump end\n");
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE flow dump end");
pdata = (uint32_t *)flow->rule.key;
@@ -1254,7 +1253,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_RX_TEST,
0,
0x1);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_TEST: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_TEST: %x", data);
/* configure base mac address */
IPN3KE_MASK_WRITE_REG(hw,
@@ -1268,7 +1267,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_BASE_DST_MAC_ADDR_HI,
0,
0xFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_HI: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_HI: %x", data);
IPN3KE_MASK_WRITE_REG(hw,
IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW,
@@ -1281,7 +1280,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_BASE_DST_MAC_ADDR_LOW: %x", data);
/* configure hash lookup rules enable */
@@ -1296,7 +1295,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_LKUP_ENABLE,
0,
0xFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_LKUP_ENABLE: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_LKUP_ENABLE: %x", data);
/* configure rx parse config, settings associated with VxLAN */
@@ -1311,7 +1310,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_RX_PARSE_CFG,
0,
0x3FFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_PARSE_CFG: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_RX_PARSE_CFG: %x", data);
/* configure QinQ S-Tag */
@@ -1326,7 +1325,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_QINQ_STAG,
0,
0xFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_QINQ_STAG: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_QINQ_STAG: %x", data);
/* configure gen ctrl */
@@ -1341,7 +1340,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_MHL_GEN_CTRL,
0,
0x1F);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_GEN_CTRL: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_GEN_CTRL: %x", data);
/* clear monitoring register */
@@ -1356,7 +1355,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_MHL_MON_0,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_MON_0: %x\n", data);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_MHL_MON_0: %x", data);
ipn3ke_flow_hw_flush(hw);
@@ -1366,7 +1365,7 @@ int ipn3ke_flow_init(void *dev)
IPN3KE_CLF_EM_NUM,
0,
0xFFFFFFFF);
- IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_EN_NUM: %x\n", hw->flow_max_entries);
+ IPN3KE_AFU_PMD_DEBUG("IPN3KE_CLF_EN_NUM: %x", hw->flow_max_entries);
hw->flow_num_entries = 0;
return 0;
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 8145f1bb2a..feb57420c3 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2401,8 +2401,8 @@ ipn3ke_update_link(struct rte_rawdev *rawdev,
else
link->link_status = 0;
- IPN3KE_AFU_PMD_DEBUG("port is %d\n", port);
- IPN3KE_AFU_PMD_DEBUG("link->link_status is %d\n", link->link_status);
+ IPN3KE_AFU_PMD_DEBUG("port is %d", port);
+ IPN3KE_AFU_PMD_DEBUG("link->link_status is %d", link->link_status);
rawdev->dev_ops->attr_get(rawdev,
"LineSideLinkSpeed",
@@ -2479,14 +2479,14 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
if (!rpst->ori_linfo.link_status &&
link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Up\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Up", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Up\n",
+ IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Up",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_up(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2494,7 +2494,7 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
}
} else if (rpst->ori_linfo.link_status &&
!link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Update Rpst %d Down",
rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
@@ -2502,7 +2502,7 @@ ipn3ke_rpst_link_update(struct rte_eth_dev *ethdev,
rte_eth_linkstatus_set(ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Update FVL PF %d Down",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_down(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2537,14 +2537,14 @@ ipn3ke_rpst_link_check(struct ipn3ke_rpst *rpst)
if (!rpst->ori_linfo.link_status &&
link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Up\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Up", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(rpst->ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Up\n",
+ IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Up",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_up(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
@@ -2552,14 +2552,14 @@ ipn3ke_rpst_link_check(struct ipn3ke_rpst *rpst)
}
} else if (rpst->ori_linfo.link_status &&
!link.link_status) {
- IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Down\n", rpst->port_id);
+ IPN3KE_AFU_PMD_DEBUG("Check Rpst %d Down", rpst->port_id);
rpst->ori_linfo.link_status = link.link_status;
rpst->ori_linfo.link_speed = link.link_speed;
rte_eth_linkstatus_set(rpst->ethdev, &link);
if (rpst->i40e_pf_eth) {
- IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Down\n",
+ IPN3KE_AFU_PMD_DEBUG("Check FVL PF %d Down",
rpst->i40e_pf_eth_port_id);
rte_eth_dev_set_link_down(rpst->i40e_pf_eth_port_id);
pf = rpst->i40e_pf_eth;
diff --git a/drivers/net/ipn3ke/ipn3ke_tm.c b/drivers/net/ipn3ke/ipn3ke_tm.c
index 0260227900..44a8b88699 100644
--- a/drivers/net/ipn3ke/ipn3ke_tm.c
+++ b/drivers/net/ipn3ke/ipn3ke_tm.c
@@ -1934,10 +1934,10 @@ ipn3ke_tm_show(struct rte_eth_dev *dev)
tm_id = tm->tm_id;
- IPN3KE_AFU_PMD_DEBUG("***HQoS Tree(%d)***\n", tm_id);
+ IPN3KE_AFU_PMD_DEBUG("***HQoS Tree(%d)***", tm_id);
port_n = tm->h.port_node;
- IPN3KE_AFU_PMD_DEBUG("Port: (%d|%s)\n", port_n->node_index,
+ IPN3KE_AFU_PMD_DEBUG("Port: (%d|%s)", port_n->node_index,
str_state[port_n->node_state]);
vt_nl = &tm->h.port_node->children_node_list;
@@ -1951,7 +1951,6 @@ ipn3ke_tm_show(struct rte_eth_dev *dev)
cos_n->node_index,
str_state[cos_n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
}
}
@@ -1969,14 +1968,13 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
tm_id = tm->tm_id;
- IPN3KE_AFU_PMD_DEBUG("***Commit Tree(%d)***\n", tm_id);
+ IPN3KE_AFU_PMD_DEBUG("***Commit Tree(%d)***", tm_id);
n = tm->h.port_commit_node;
IPN3KE_AFU_PMD_DEBUG("Port: ");
if (n)
IPN3KE_AFU_PMD_DEBUG("(%d|%s)",
n->node_index,
str_state[n->node_state]);
- IPN3KE_AFU_PMD_DEBUG("\n");
nl = &tm->h.vt_commit_node_list;
IPN3KE_AFU_PMD_DEBUG("VT : ");
@@ -1985,7 +1983,6 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
n->node_index,
str_state[n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
nl = &tm->h.cos_commit_node_list;
IPN3KE_AFU_PMD_DEBUG("COS : ");
@@ -1994,7 +1991,6 @@ ipn3ke_tm_show_commmit(struct rte_eth_dev *dev)
n->node_index,
str_state[n->node_state]);
}
- IPN3KE_AFU_PMD_DEBUG("\n");
}
/* Traffic manager hierarchy commit */
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d88d4065f1..357307b2e0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1155,10 +1155,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
}
if (hw->mac.ops.fw_recovery_mode && hw->mac.ops.fw_recovery_mode(hw)) {
- PMD_INIT_LOG(ERR, "\nERROR: "
- "Firmware recovery mode detected. Limiting functionality.\n"
- "Refer to the Intel(R) Ethernet Adapters and Devices "
- "User Guide for details on firmware recovery mode.");
+ PMD_INIT_LOG(ERR, "ERROR: Firmware recovery mode detected. Limiting functionality.");
return -EIO;
}
@@ -1783,7 +1780,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
if (eth_da.nb_representor_ports > 0 &&
eth_da.type != RTE_ETH_REPRESENTOR_VF) {
- PMD_DRV_LOG(ERR, "unsupported representor type: %s\n",
+ PMD_DRV_LOG(ERR, "unsupported representor type: %s",
pci_dev->device.devargs->args);
return -ENOTSUP;
}
diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c
index d331308556..3a666ba15f 100644
--- a/drivers/net/ixgbe/ixgbe_ipsec.c
+++ b/drivers/net/ixgbe/ixgbe_ipsec.c
@@ -120,7 +120,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no match and no free entries*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx IP table\n");
+ "No free entry left in the Rx IP table");
return -1;
}
@@ -134,7 +134,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx SA table\n");
+ "No free entry left in the Rx SA table");
return -1;
}
@@ -232,7 +232,7 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Tx SA table\n");
+ "No free entry left in the Tx SA table");
return -1;
}
@@ -291,7 +291,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx IP table\n");
+ "Entry not found in the Rx IP table");
return -1;
}
@@ -306,7 +306,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx SA table\n");
+ "Entry not found in the Rx SA table");
return -1;
}
@@ -349,7 +349,7 @@ ixgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Tx SA table\n");
+ "Entry not found in the Tx SA table");
return -1;
}
reg_val = IPSRXIDX_WRITE | (sa_index << 3);
@@ -379,7 +379,7 @@ ixgbe_crypto_create_session(void *device,
if (conf->crypto_xform->type != RTE_CRYPTO_SYM_XFORM_AEAD ||
conf->crypto_xform->aead.algo !=
RTE_CRYPTO_AEAD_AES_GCM) {
- PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode\n");
+ PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode");
return -ENOTSUP;
}
aead_xform = &conf->crypto_xform->aead;
@@ -388,14 +388,14 @@ ixgbe_crypto_create_session(void *device,
if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
ic_session->op = IXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec decryption not enabled");
return -ENOTSUP;
}
} else {
if (dev_conf->txmode.offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
ic_session->op = IXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec encryption not enabled");
return -ENOTSUP;
}
}
@@ -409,7 +409,7 @@ ixgbe_crypto_create_session(void *device,
if (ic_session->op == IXGBE_OP_AUTHENTICATED_ENCRYPTION) {
if (ixgbe_crypto_add_sa(ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to add SA\n");
+ PMD_DRV_LOG(ERR, "Failed to add SA");
return -EPERM;
}
}
@@ -431,12 +431,12 @@ ixgbe_crypto_remove_session(void *device,
struct ixgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session);
if (eth_dev != ic_session->dev) {
- PMD_DRV_LOG(ERR, "Session not bound to this device\n");
+ PMD_DRV_LOG(ERR, "Session not bound to this device");
return -ENODEV;
}
if (ixgbe_crypto_remove_sa(eth_dev, ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to remove session\n");
+ PMD_DRV_LOG(ERR, "Failed to remove session");
return -EFAULT;
}
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 91ba395ac3..e967fe5e48 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -173,14 +173,14 @@ ixgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
struct ixgbe_ethertype_filter ethertype_filter;
if (!hw->mac.ops.set_ethertype_anti_spoofing) {
- PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.\n");
+ PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.");
return;
}
i = ixgbe_ethertype_filter_lookup(filter_info,
IXGBE_ETHERTYPE_FLOW_CTRL);
if (i >= 0) {
- PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!\n");
+ PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!");
return;
}
@@ -193,7 +193,7 @@ ixgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
i = ixgbe_ethertype_filter_insert(filter_info,
ðertype_filter);
if (i < 0) {
- PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.\n");
+ PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.");
return;
}
@@ -424,7 +424,7 @@ ixgbe_disable_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf)
vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~IXGBE_VMOLR_MPE;
@@ -630,7 +630,7 @@ ixgbe_negotiate_vf_api(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -679,7 +679,7 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
case RTE_ETH_MQ_TX_NONE:
case RTE_ETH_MQ_TX_DCB:
PMD_DRV_LOG(ERR, "PF must work with virtualization for VF %u"
- ", but its tx mode = %d\n", vf,
+ ", but its tx mode = %d", vf,
eth_conf->txmode.mq_mode);
return -1;
@@ -713,7 +713,7 @@ ixgbe_get_vf_queues(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
break;
default:
- PMD_DRV_LOG(ERR, "PF work with invalid mode = %d\n",
+ PMD_DRV_LOG(ERR, "PF work with invalid mode = %d",
eth_conf->txmode.mq_mode);
return -1;
}
@@ -769,7 +769,7 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (!(fctrl & IXGBE_FCTRL_UPE)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -806,7 +806,7 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(
(struct rte_ether_addr *)new_mac)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index f76ef63921..15c28e7a3f 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -955,7 +955,7 @@ STATIC s32 rte_pmd_ixgbe_acquire_swfw(struct ixgbe_hw *hw, u32 mask)
while (--retries) {
status = ixgbe_acquire_swfw_semaphore(hw, mask);
if (status) {
- PMD_DRV_LOG(ERR, "Get SWFW sem failed, Status = %d\n",
+ PMD_DRV_LOG(ERR, "Get SWFW sem failed, Status = %d",
status);
return status;
}
@@ -964,18 +964,18 @@ STATIC s32 rte_pmd_ixgbe_acquire_swfw(struct ixgbe_hw *hw, u32 mask)
return IXGBE_SUCCESS;
if (status == IXGBE_ERR_TOKEN_RETRY)
- PMD_DRV_LOG(ERR, "Get PHY token failed, Status = %d\n",
+ PMD_DRV_LOG(ERR, "Get PHY token failed, Status = %d",
status);
ixgbe_release_swfw_semaphore(hw, mask);
if (status != IXGBE_ERR_TOKEN_RETRY) {
PMD_DRV_LOG(ERR,
- "Retry get PHY token failed, Status=%d\n",
+ "Retry get PHY token failed, Status=%d",
status);
return status;
}
}
- PMD_DRV_LOG(ERR, "swfw acquisition retries failed!: PHY ID = 0x%08X\n",
+ PMD_DRV_LOG(ERR, "swfw acquisition retries failed!: PHY ID = 0x%08X",
hw->phy.id);
return status;
}
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 16da22b5c6..e220ffaf92 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1292,7 +1292,7 @@ memif_connect(struct rte_eth_dev *dev)
PROT_READ | PROT_WRITE,
MAP_SHARED, mr->fd, 0);
if (mr->addr == MAP_FAILED) {
- MIF_LOG(ERR, "mmap failed: %s\n",
+ MIF_LOG(ERR, "mmap failed: %s",
strerror(errno));
return -1;
}
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index c19db5c0eb..9c2872429f 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -106,7 +106,7 @@ mlx4_init_shared_data(void)
sizeof(*mlx4_shared_data),
SOCKET_ID_ANY, 0);
if (mz == NULL) {
- ERROR("Cannot allocate mlx4 shared data\n");
+ ERROR("Cannot allocate mlx4 shared data");
ret = -rte_errno;
goto error;
}
@@ -117,7 +117,7 @@ mlx4_init_shared_data(void)
/* Lookup allocated shared memory. */
mz = rte_memzone_lookup(MZ_MLX4_PMD_SHARED_DATA);
if (mz == NULL) {
- ERROR("Cannot attach mlx4 shared data\n");
+ ERROR("Cannot attach mlx4 shared data");
ret = -rte_errno;
goto error;
}
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 9bf1ec5509..297ff3fb31 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -257,7 +257,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
if (tx_free_thresh + 3 >= nb_desc) {
PMD_INIT_LOG(ERR,
"tx_free_thresh must be less than the number of TX entries minus 3(%u)."
- " (tx_free_thresh=%u port=%u queue=%u)\n",
+ " (tx_free_thresh=%u port=%u queue=%u)",
nb_desc - 3,
tx_free_thresh, dev->data->port_id, queue_idx);
return -EINVAL;
@@ -902,7 +902,7 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
if (!rxq->rxbuf_info) {
PMD_DRV_LOG(ERR,
- "Could not allocate rxbuf info for queue %d\n",
+ "Could not allocate rxbuf info for queue %d",
queue_id);
rte_free(rxq->event_buf);
rte_free(rxq);
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index e8dda8d460..29944f5070 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1119,7 +1119,7 @@ s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
u32 i;
if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
- DEBUGOUT("Cannot configure PCI bus master\n");
+ DEBUGOUT("Cannot configure PCI bus master");
return -1;
}
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 23a452cacd..6c45ffaad3 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -382,7 +382,7 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
err = ngbe_flash_read_dword(hw, 0xFFFDC, &ssid);
if (err) {
PMD_INIT_LOG(ERR,
- "Read of internal subsystem device id failed\n");
+ "Read of internal subsystem device id failed");
return -ENODEV;
}
hw->sub_system_id = (u16)ssid >> 8 | (u16)ssid << 8;
diff --git a/drivers/net/ngbe/ngbe_pf.c b/drivers/net/ngbe/ngbe_pf.c
index 947ae7fe94..bb62e2fbb7 100644
--- a/drivers/net/ngbe/ngbe_pf.c
+++ b/drivers/net/ngbe/ngbe_pf.c
@@ -71,7 +71,7 @@ int ngbe_pf_host_init(struct rte_eth_dev *eth_dev)
sizeof(struct ngbe_vf_info) * vf_num, 0);
if (*vfinfo == NULL) {
PMD_INIT_LOG(ERR,
- "Cannot allocate memory for private VF data\n");
+ "Cannot allocate memory for private VF data");
return -ENOMEM;
}
@@ -320,7 +320,7 @@ ngbe_disable_vf_mc_promisc(struct rte_eth_dev *eth_dev, uint32_t vf)
vmolr = rd32(hw, NGBE_POOLETHCTL(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~NGBE_POOLETHCTL_MCP;
@@ -482,7 +482,7 @@ ngbe_negotiate_vf_api(struct rte_eth_dev *eth_dev,
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -564,7 +564,7 @@ ngbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev,
if (!(fctrl & NGBE_PSRCTL_UCP)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -601,7 +601,7 @@ ngbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(ea)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/octeon_ep/cnxk_ep_tx.c b/drivers/net/octeon_ep/cnxk_ep_tx.c
index 45ea0b9c34..e84de5c1c7 100644
--- a/drivers/net/octeon_ep/cnxk_ep_tx.c
+++ b/drivers/net/octeon_ep/cnxk_ep_tx.c
@@ -170,7 +170,7 @@ cnxk_ep_xmit_pkts_scalar_mseg(struct rte_mbuf **tx_pkts, struct otx_ep_instr_que
num_sg = (frags + mask) / OTX_EP_NUM_SG_PTRS;
if (unlikely(pkt_len > OTX_EP_MAX_PKT_SZ && num_sg > OTX_EP_MAX_SG_LISTS)) {
- otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments\n");
+ otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments");
goto exit;
}
diff --git a/drivers/net/octeon_ep/cnxk_ep_vf.c b/drivers/net/octeon_ep/cnxk_ep_vf.c
index 39b28de2d0..d44ac211f1 100644
--- a/drivers/net/octeon_ep/cnxk_ep_vf.c
+++ b/drivers/net/octeon_ep/cnxk_ep_vf.c
@@ -102,7 +102,7 @@ cnxk_ep_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
}
if (loop < 0) {
- otx_ep_err("IDLE bit is not set\n");
+ otx_ep_err("IDLE bit is not set");
return -EIO;
}
@@ -134,7 +134,7 @@ cnxk_ep_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
} while (reg_val != 0 && loop--);
if (loop < 0) {
- otx_ep_err("INST CNT REGISTER is not zero\n");
+ otx_ep_err("INST CNT REGISTER is not zero");
return -EIO;
}
@@ -181,7 +181,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("OUT CNT REGISTER value is zero\n");
+ otx_ep_err("OUT CNT REGISTER value is zero");
return -EIO;
}
@@ -217,7 +217,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets credit register value is not cleared\n");
+ otx_ep_err("Packets credit register value is not cleared");
return -EIO;
}
@@ -250,7 +250,7 @@ cnxk_ep_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets sent register value is not cleared\n");
+ otx_ep_err("Packets sent register value is not cleared");
return -EIO;
}
@@ -280,7 +280,7 @@ cnxk_ep_vf_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("INSTR DBELL not coming back to 0\n");
+ otx_ep_err("INSTR DBELL not coming back to 0");
return -EIO;
}
diff --git a/drivers/net/octeon_ep/otx2_ep_vf.c b/drivers/net/octeon_ep/otx2_ep_vf.c
index 2aeebb4675..76f72c64c9 100644
--- a/drivers/net/octeon_ep/otx2_ep_vf.c
+++ b/drivers/net/octeon_ep/otx2_ep_vf.c
@@ -37,7 +37,7 @@ otx2_vf_reset_iq(struct otx_ep_device *otx_ep, int q_no)
SDP_VF_R_IN_INSTR_DBELL(q_no));
}
if (loop < 0) {
- otx_ep_err("%s: doorbell init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: doorbell init retry limit exceeded.", __func__);
return -EIO;
}
@@ -48,7 +48,7 @@ otx2_vf_reset_iq(struct otx_ep_device *otx_ep, int q_no)
rte_delay_ms(1);
} while ((d64 & ~SDP_VF_R_IN_CNTS_OUT_INT) != 0 && loop--);
if (loop < 0) {
- otx_ep_err("%s: in_cnts init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: in_cnts init retry limit exceeded.", __func__);
return -EIO;
}
@@ -81,7 +81,7 @@ otx2_vf_reset_oq(struct otx_ep_device *otx_ep, int q_no)
SDP_VF_R_OUT_SLIST_DBELL(q_no));
}
if (loop < 0) {
- otx_ep_err("%s: doorbell init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: doorbell init retry limit exceeded.", __func__);
return -EIO;
}
@@ -109,7 +109,7 @@ otx2_vf_reset_oq(struct otx_ep_device *otx_ep, int q_no)
rte_delay_ms(1);
} while ((d64 & ~SDP_VF_R_OUT_CNTS_IN_INT) != 0 && loop--);
if (loop < 0) {
- otx_ep_err("%s: out_cnts init retry limit exceeded.\n", __func__);
+ otx_ep_err("%s: out_cnts init retry limit exceeded.", __func__);
return -EIO;
}
@@ -252,7 +252,7 @@ otx2_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
}
if (loop < 0) {
- otx_ep_err("IDLE bit is not set\n");
+ otx_ep_err("IDLE bit is not set");
return -EIO;
}
@@ -283,7 +283,7 @@ otx2_vf_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
} while (reg_val != 0 && loop--);
if (loop < 0) {
- otx_ep_err("INST CNT REGISTER is not zero\n");
+ otx_ep_err("INST CNT REGISTER is not zero");
return -EIO;
}
@@ -332,7 +332,7 @@ otx2_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("OUT CNT REGISTER value is zero\n");
+ otx_ep_err("OUT CNT REGISTER value is zero");
return -EIO;
}
@@ -368,7 +368,7 @@ otx2_vf_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0) {
- otx_ep_err("Packets credit register value is not cleared\n");
+ otx_ep_err("Packets credit register value is not cleared");
return -EIO;
}
otx_ep_dbg("SDP_R[%d]_credit:%x", oq_no, rte_read32(droq->pkts_credit_reg));
@@ -425,7 +425,7 @@ otx2_vf_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("INSTR DBELL not coming back to 0\n");
+ otx_ep_err("INSTR DBELL not coming back to 0");
return -EIO;
}
diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
index 73eb0c9d31..7d5dd91a77 100644
--- a/drivers/net/octeon_ep/otx_ep_common.h
+++ b/drivers/net/octeon_ep/otx_ep_common.h
@@ -120,7 +120,7 @@ union otx_ep_instr_irh {
{\
typeof(value) val = (value); \
typeof(reg_off) off = (reg_off); \
- otx_ep_dbg("octeon_write_csr64: reg: 0x%08lx val: 0x%016llx\n", \
+ otx_ep_dbg("octeon_write_csr64: reg: 0x%08lx val: 0x%016llx", \
(unsigned long)off, (unsigned long long)val); \
rte_write64(val, ((base_addr) + off)); \
}
diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c
index 46211361a0..c4a5a67c79 100644
--- a/drivers/net/octeon_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
@@ -175,7 +175,7 @@ otx_ep_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
ret = otx_ep_mbox_get_link_info(eth_dev, &link);
if (ret)
return -EINVAL;
- otx_ep_dbg("link status resp link %d duplex %d autoneg %d link_speed %d\n",
+ otx_ep_dbg("link status resp link %d duplex %d autoneg %d link_speed %d",
link.link_status, link.link_duplex, link.link_autoneg, link.link_speed);
return rte_eth_linkstatus_set(eth_dev, &link);
}
@@ -220,7 +220,7 @@ otx_ep_dev_set_default_mac_addr(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_set_mac_addr(eth_dev, mac_addr);
if (ret)
return -EINVAL;
- otx_ep_dbg("Default MAC address " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Default MAC address " RTE_ETHER_ADDR_PRT_FMT "",
RTE_ETHER_ADDR_BYTES(mac_addr));
rte_ether_addr_copy(mac_addr, eth_dev->data->mac_addrs);
return 0;
@@ -237,7 +237,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
/* Enable IQ/OQ for this device */
ret = otx_epvf->fn_list.enable_io_queues(otx_epvf);
if (ret) {
- otx_ep_err("IOQ enable failed\n");
+ otx_ep_err("IOQ enable failed");
return ret;
}
@@ -246,7 +246,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
otx_epvf->droq[q]->pkts_credit_reg);
rte_wmb();
- otx_ep_info("OQ[%d] dbells [%d]\n", q,
+ otx_ep_info("OQ[%d] dbells [%d]", q,
rte_read32(otx_epvf->droq[q]->pkts_credit_reg));
}
@@ -255,7 +255,7 @@ otx_ep_dev_start(struct rte_eth_dev *eth_dev)
otx_ep_set_tx_func(eth_dev);
otx_ep_set_rx_func(eth_dev);
- otx_ep_info("dev started\n");
+ otx_ep_info("dev started");
for (q = 0; q < eth_dev->data->nb_rx_queues; q++)
eth_dev->data->rx_queue_state[q] = RTE_ETH_QUEUE_STATE_STARTED;
@@ -298,7 +298,7 @@ otx_ep_ism_setup(struct otx_ep_device *otx_epvf)
/* Same DMA buffer is shared by OQ and IQ, clear it at start */
memset(otx_epvf->ism_buffer_mz->addr, 0, OTX_EP_ISM_BUFFER_SIZE);
if (otx_epvf->ism_buffer_mz == NULL) {
- otx_ep_err("Failed to allocate ISM buffer\n");
+ otx_ep_err("Failed to allocate ISM buffer");
return(-1);
}
otx_ep_dbg("ISM: virt: 0x%p, dma: 0x%" PRIX64,
@@ -342,12 +342,12 @@ otx_ep_chip_specific_setup(struct otx_ep_device *otx_epvf)
ret = -EINVAL;
break;
default:
- otx_ep_err("Unsupported device\n");
+ otx_ep_err("Unsupported device");
ret = -EINVAL;
}
if (!ret)
- otx_ep_info("OTX_EP dev_id[%d]\n", dev_id);
+ otx_ep_info("OTX_EP dev_id[%d]", dev_id);
return ret;
}
@@ -361,7 +361,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
ret = otx_ep_chip_specific_setup(otx_epvf);
if (ret) {
- otx_ep_err("Chip specific setup failed\n");
+ otx_ep_err("Chip specific setup failed");
goto setup_fail;
}
@@ -385,7 +385,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
otx_epvf->eth_dev->rx_pkt_burst = &cnxk_ep_recv_pkts;
otx_epvf->chip_gen = OTX_EP_CN10XX;
} else {
- otx_ep_err("Invalid chip_id\n");
+ otx_ep_err("Invalid chip_id");
ret = -EINVAL;
goto setup_fail;
}
@@ -393,7 +393,7 @@ otx_epdev_init(struct otx_ep_device *otx_epvf)
otx_epvf->max_rx_queues = ethdev_queues;
otx_epvf->max_tx_queues = ethdev_queues;
- otx_ep_info("OTX_EP Device is Ready\n");
+ otx_ep_info("OTX_EP Device is Ready");
setup_fail:
return ret;
@@ -413,10 +413,10 @@ otx_ep_dev_configure(struct rte_eth_dev *eth_dev)
txmode = &conf->txmode;
if (eth_dev->data->nb_rx_queues > otx_epvf->max_rx_queues ||
eth_dev->data->nb_tx_queues > otx_epvf->max_tx_queues) {
- otx_ep_err("invalid num queues\n");
+ otx_ep_err("invalid num queues");
return -EINVAL;
}
- otx_ep_info("OTX_EP Device is configured with num_txq %d num_rxq %d\n",
+ otx_ep_info("OTX_EP Device is configured with num_txq %d num_rxq %d",
eth_dev->data->nb_rx_queues, eth_dev->data->nb_tx_queues);
otx_epvf->rx_offloads = rxmode->offloads;
@@ -460,29 +460,29 @@ otx_ep_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
uint16_t buf_size;
if (q_no >= otx_epvf->max_rx_queues) {
- otx_ep_err("Invalid rx queue number %u\n", q_no);
+ otx_ep_err("Invalid rx queue number %u", q_no);
return -EINVAL;
}
if (num_rx_descs & (num_rx_descs - 1)) {
- otx_ep_err("Invalid rx desc number should be pow 2 %u\n",
+ otx_ep_err("Invalid rx desc number should be pow 2 %u",
num_rx_descs);
return -EINVAL;
}
if (num_rx_descs < (SDP_GBL_WMARK * 8)) {
- otx_ep_err("Invalid rx desc number(%u) should at least be greater than 8xwmark %u\n",
+ otx_ep_err("Invalid rx desc number(%u) should at least be greater than 8xwmark %u",
num_rx_descs, (SDP_GBL_WMARK * 8));
return -EINVAL;
}
- otx_ep_dbg("setting up rx queue %u\n", q_no);
+ otx_ep_dbg("setting up rx queue %u", q_no);
mbp_priv = rte_mempool_get_priv(mp);
buf_size = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM;
if (otx_ep_setup_oqs(otx_epvf, q_no, num_rx_descs, buf_size, mp,
socket_id)) {
- otx_ep_err("droq allocation failed\n");
+ otx_ep_err("droq allocation failed");
return -1;
}
@@ -511,7 +511,7 @@ otx_ep_rx_queue_release(struct rte_eth_dev *dev, uint16_t q_no)
int q_id = rq->q_no;
if (otx_ep_delete_oqs(otx_epvf, q_id))
- otx_ep_err("Failed to delete OQ:%d\n", q_id);
+ otx_ep_err("Failed to delete OQ:%d", q_id);
}
/**
@@ -545,16 +545,16 @@ otx_ep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
int retval;
if (q_no >= otx_epvf->max_tx_queues) {
- otx_ep_err("Invalid tx queue number %u\n", q_no);
+ otx_ep_err("Invalid tx queue number %u", q_no);
return -EINVAL;
}
if (num_tx_descs & (num_tx_descs - 1)) {
- otx_ep_err("Invalid tx desc number should be pow 2 %u\n",
+ otx_ep_err("Invalid tx desc number should be pow 2 %u",
num_tx_descs);
return -EINVAL;
}
if (num_tx_descs < (SDP_GBL_WMARK * 8)) {
- otx_ep_err("Invalid tx desc number(%u) should at least be greater than 8*wmark(%u)\n",
+ otx_ep_err("Invalid tx desc number(%u) should at least be greater than 8*wmark(%u)",
num_tx_descs, (SDP_GBL_WMARK * 8));
return -EINVAL;
}
@@ -562,12 +562,12 @@ otx_ep_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
retval = otx_ep_setup_iqs(otx_epvf, q_no, num_tx_descs, socket_id);
if (retval) {
- otx_ep_err("IQ(TxQ) creation failed.\n");
+ otx_ep_err("IQ(TxQ) creation failed.");
return retval;
}
eth_dev->data->tx_queues[q_no] = otx_epvf->instr_queue[q_no];
- otx_ep_dbg("tx queue[%d] setup\n", q_no);
+ otx_ep_dbg("tx queue[%d] setup", q_no);
return 0;
}
@@ -660,23 +660,23 @@ otx_ep_dev_close(struct rte_eth_dev *eth_dev)
num_queues = otx_epvf->nb_rx_queues;
for (q_no = 0; q_no < num_queues; q_no++) {
if (otx_ep_delete_oqs(otx_epvf, q_no)) {
- otx_ep_err("Failed to delete OQ:%d\n", q_no);
+ otx_ep_err("Failed to delete OQ:%d", q_no);
return -EINVAL;
}
}
- otx_ep_dbg("Num OQs:%d freed\n", otx_epvf->nb_rx_queues);
+ otx_ep_dbg("Num OQs:%d freed", otx_epvf->nb_rx_queues);
num_queues = otx_epvf->nb_tx_queues;
for (q_no = 0; q_no < num_queues; q_no++) {
if (otx_ep_delete_iqs(otx_epvf, q_no)) {
- otx_ep_err("Failed to delete IQ:%d\n", q_no);
+ otx_ep_err("Failed to delete IQ:%d", q_no);
return -EINVAL;
}
}
- otx_ep_dbg("Num IQs:%d freed\n", otx_epvf->nb_tx_queues);
+ otx_ep_dbg("Num IQs:%d freed", otx_epvf->nb_tx_queues);
if (rte_eth_dma_zone_free(eth_dev, "ism", 0)) {
- otx_ep_err("Failed to delete ISM buffer\n");
+ otx_ep_err("Failed to delete ISM buffer");
return -EINVAL;
}
@@ -692,7 +692,7 @@ otx_ep_dev_get_mac_addr(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_get_mac_addr(eth_dev, mac_addr);
if (ret)
return -EINVAL;
- otx_ep_dbg("Get MAC address " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Get MAC address " RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
return 0;
}
@@ -741,22 +741,22 @@ static int otx_ep_eth_dev_query_set_vf_mac(struct rte_eth_dev *eth_dev,
ret_val = otx_ep_dev_get_mac_addr(eth_dev, mac_addr);
if (!ret_val) {
if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
- otx_ep_dbg("PF doesn't have valid VF MAC addr" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("PF doesn't have valid VF MAC addr" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
rte_eth_random_addr(mac_addr->addr_bytes);
- otx_ep_dbg("Setting Random MAC address" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Setting Random MAC address" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
ret_val = otx_ep_dev_set_default_mac_addr(eth_dev, mac_addr);
if (ret_val) {
- otx_ep_err("Setting MAC address " RTE_ETHER_ADDR_PRT_FMT "fails\n",
+ otx_ep_err("Setting MAC address " RTE_ETHER_ADDR_PRT_FMT "fails",
RTE_ETHER_ADDR_BYTES(mac_addr));
return ret_val;
}
}
- otx_ep_dbg("Received valid MAC addr from PF" RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("Received valid MAC addr from PF" RTE_ETHER_ADDR_PRT_FMT,
RTE_ETHER_ADDR_BYTES(mac_addr));
} else {
- otx_ep_err("Getting MAC address from PF via Mbox fails with ret_val: %d\n",
+ otx_ep_err("Getting MAC address from PF via Mbox fails with ret_val: %d",
ret_val);
return ret_val;
}
@@ -780,7 +780,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
/* Parse devargs string */
if (otx_ethdev_parse_devargs(eth_dev->device->devargs, otx_epvf)) {
- otx_ep_err("Failed to parse devargs\n");
+ otx_ep_err("Failed to parse devargs");
return -EINVAL;
}
@@ -797,7 +797,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
otx_epvf->mbox_neg_ver = OTX_EP_MBOX_VERSION_V1;
eth_dev->data->mac_addrs = rte_zmalloc("otx_ep", RTE_ETHER_ADDR_LEN, 0);
if (eth_dev->data->mac_addrs == NULL) {
- otx_ep_err("MAC addresses memory allocation failed\n");
+ otx_ep_err("MAC addresses memory allocation failed");
eth_dev->dev_ops = NULL;
return -ENOMEM;
}
@@ -817,12 +817,12 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
otx_epvf->chip_id == PCI_DEVID_CNF10KA_EP_NET_VF ||
otx_epvf->chip_id == PCI_DEVID_CNF10KB_EP_NET_VF) {
otx_epvf->pkind = SDP_OTX2_PKIND_FS0;
- otx_ep_info("using pkind %d\n", otx_epvf->pkind);
+ otx_ep_info("using pkind %d", otx_epvf->pkind);
} else if (otx_epvf->chip_id == PCI_DEVID_OCTEONTX_EP_VF) {
otx_epvf->pkind = SDP_PKIND;
- otx_ep_info("Using pkind %d.\n", otx_epvf->pkind);
+ otx_ep_info("Using pkind %d.", otx_epvf->pkind);
} else {
- otx_ep_err("Invalid chip id\n");
+ otx_ep_err("Invalid chip id");
return -EINVAL;
}
@@ -831,7 +831,7 @@ otx_ep_eth_dev_init(struct rte_eth_dev *eth_dev)
if (otx_ep_eth_dev_query_set_vf_mac(eth_dev,
(struct rte_ether_addr *)&vf_mac_addr)) {
- otx_ep_err("set mac addr failed\n");
+ otx_ep_err("set mac addr failed");
return -ENODEV;
}
rte_ether_addr_copy(&vf_mac_addr, eth_dev->data->mac_addrs);
diff --git a/drivers/net/octeon_ep/otx_ep_mbox.c b/drivers/net/octeon_ep/otx_ep_mbox.c
index 4118645dc7..c92adeaf9a 100644
--- a/drivers/net/octeon_ep/otx_ep_mbox.c
+++ b/drivers/net/octeon_ep/otx_ep_mbox.c
@@ -44,11 +44,11 @@ __otx_ep_send_mbox_cmd(struct otx_ep_device *otx_ep,
}
}
if (count == OTX_EP_MBOX_TIMEOUT_MS) {
- otx_ep_err("mbox send Timeout count:%d\n", count);
+ otx_ep_err("mbox send Timeout count:%d", count);
return OTX_EP_MBOX_TIMEOUT_MS;
}
if (rsp->s.type != OTX_EP_MBOX_TYPE_RSP_ACK) {
- otx_ep_err("mbox received NACK from PF\n");
+ otx_ep_err("mbox received NACK from PF");
return OTX_EP_MBOX_CMD_STATUS_NACK;
}
@@ -65,7 +65,7 @@ otx_ep_send_mbox_cmd(struct otx_ep_device *otx_ep,
rte_spinlock_lock(&otx_ep->mbox_lock);
if (otx_ep_cmd_versions[cmd.s.opcode] > otx_ep->mbox_neg_ver) {
- otx_ep_dbg("CMD:%d not supported in Version:%d\n", cmd.s.opcode,
+ otx_ep_dbg("CMD:%d not supported in Version:%d", cmd.s.opcode,
otx_ep->mbox_neg_ver);
rte_spinlock_unlock(&otx_ep->mbox_lock);
return -EOPNOTSUPP;
@@ -92,7 +92,7 @@ otx_ep_mbox_bulk_read(struct otx_ep_device *otx_ep,
/* Send cmd to read data from PF */
ret = __otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("mbox bulk read data request failed\n");
+ otx_ep_err("mbox bulk read data request failed");
rte_spinlock_unlock(&otx_ep->mbox_lock);
return ret;
}
@@ -108,7 +108,7 @@ otx_ep_mbox_bulk_read(struct otx_ep_device *otx_ep,
while (data_len) {
ret = __otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("mbox bulk read data request failed\n");
+ otx_ep_err("mbox bulk read data request failed");
otx_ep->mbox_data_index = 0;
memset(otx_ep->mbox_data_buf, 0, OTX_EP_MBOX_MAX_DATA_BUF_SIZE);
rte_spinlock_unlock(&otx_ep->mbox_lock);
@@ -154,10 +154,10 @@ otx_ep_mbox_set_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu)
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("set MTU failed\n");
+ otx_ep_err("set MTU failed");
return -EINVAL;
}
- otx_ep_dbg("mtu set success mtu %u\n", mtu);
+ otx_ep_dbg("mtu set success mtu %u", mtu);
return 0;
}
@@ -178,10 +178,10 @@ otx_ep_mbox_set_mac_addr(struct rte_eth_dev *eth_dev,
cmd.s_set_mac.mac_addr[i] = mac_addr->addr_bytes[i];
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("set MAC address failed\n");
+ otx_ep_err("set MAC address failed");
return -EINVAL;
}
- otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT,
__func__, RTE_ETHER_ADDR_BYTES(mac_addr));
rte_ether_addr_copy(mac_addr, eth_dev->data->mac_addrs);
return 0;
@@ -201,12 +201,12 @@ otx_ep_mbox_get_mac_addr(struct rte_eth_dev *eth_dev,
cmd.s_set_mac.opcode = OTX_EP_MBOX_CMD_GET_MAC_ADDR;
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("get MAC address failed\n");
+ otx_ep_err("get MAC address failed");
return -EINVAL;
}
for (i = 0; i < RTE_ETHER_ADDR_LEN; i++)
mac_addr->addr_bytes[i] = rsp.s_set_mac.mac_addr[i];
- otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT "\n",
+ otx_ep_dbg("%s VF MAC " RTE_ETHER_ADDR_PRT_FMT,
__func__, RTE_ETHER_ADDR_BYTES(mac_addr));
return 0;
}
@@ -224,7 +224,7 @@ int otx_ep_mbox_get_link_status(struct rte_eth_dev *eth_dev,
cmd.s_link_status.opcode = OTX_EP_MBOX_CMD_GET_LINK_STATUS;
ret = otx_ep_send_mbox_cmd(otx_ep, cmd, &rsp);
if (ret) {
- otx_ep_err("Get link status failed\n");
+ otx_ep_err("Get link status failed");
return -EINVAL;
}
*oper_up = rsp.s_link_status.status;
@@ -242,7 +242,7 @@ int otx_ep_mbox_get_link_info(struct rte_eth_dev *eth_dev,
ret = otx_ep_mbox_bulk_read(otx_ep, OTX_EP_MBOX_CMD_GET_LINK_INFO,
(uint8_t *)&link_info, (int32_t *)&size);
if (ret) {
- otx_ep_err("Get link info failed\n");
+ otx_ep_err("Get link info failed");
return ret;
}
link->link_status = RTE_ETH_LINK_UP;
@@ -310,12 +310,12 @@ int otx_ep_mbox_version_check(struct rte_eth_dev *eth_dev)
* during initialization of PMD driver.
*/
if (ret == OTX_EP_MBOX_CMD_STATUS_NACK || rsp.s_version.version == 0) {
- otx_ep_dbg("VF Mbox version fallback to base version from:%u\n",
+ otx_ep_dbg("VF Mbox version fallback to base version from:%u",
(uint32_t)cmd.s_version.version);
return 0;
}
otx_ep->mbox_neg_ver = (uint32_t)rsp.s_version.version;
- otx_ep_dbg("VF Mbox version:%u Negotiated VF version with PF:%u\n",
+ otx_ep_dbg("VF Mbox version:%u Negotiated VF version with PF:%u",
(uint32_t)cmd.s_version.version,
(uint32_t)rsp.s_version.version);
return 0;
diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c
index ec32ab087e..9680a59797 100644
--- a/drivers/net/octeon_ep/otx_ep_rxtx.c
+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c
@@ -23,19 +23,19 @@ otx_ep_dmazone_free(const struct rte_memzone *mz)
int ret = 0;
if (mz == NULL) {
- otx_ep_err("Memzone: NULL\n");
+ otx_ep_err("Memzone: NULL");
return;
}
mz_tmp = rte_memzone_lookup(mz->name);
if (mz_tmp == NULL) {
- otx_ep_err("Memzone %s Not Found\n", mz->name);
+ otx_ep_err("Memzone %s Not Found", mz->name);
return;
}
ret = rte_memzone_free(mz);
if (ret)
- otx_ep_err("Memzone free failed : ret = %d\n", ret);
+ otx_ep_err("Memzone free failed : ret = %d", ret);
}
/* Free IQ resources */
@@ -47,7 +47,7 @@ otx_ep_delete_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no)
iq = otx_ep->instr_queue[iq_no];
if (iq == NULL) {
- otx_ep_err("Invalid IQ[%d]\n", iq_no);
+ otx_ep_err("Invalid IQ[%d]", iq_no);
return -EINVAL;
}
@@ -69,7 +69,7 @@ otx_ep_delete_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no)
otx_ep->nb_tx_queues--;
- otx_ep_info("IQ[%d] is deleted\n", iq_no);
+ otx_ep_info("IQ[%d] is deleted", iq_no);
return 0;
}
@@ -95,7 +95,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
OTX_EP_PCI_RING_ALIGN,
socket_id);
if (iq->iq_mz == NULL) {
- otx_ep_err("IQ[%d] memzone alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] memzone alloc failed", iq_no);
goto iq_init_fail;
}
@@ -103,7 +103,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
iq->base_addr = (uint8_t *)iq->iq_mz->addr;
if (num_descs & (num_descs - 1)) {
- otx_ep_err("IQ[%d] descs not in power of 2\n", iq_no);
+ otx_ep_err("IQ[%d] descs not in power of 2", iq_no);
goto iq_init_fail;
}
@@ -118,7 +118,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
RTE_CACHE_LINE_SIZE,
rte_socket_id());
if (iq->req_list == NULL) {
- otx_ep_err("IQ[%d] req_list alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] req_list alloc failed", iq_no);
goto iq_init_fail;
}
@@ -126,7 +126,7 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
sg = rte_zmalloc_socket("sg_entry", (OTX_EP_MAX_SG_LISTS * OTX_EP_SG_ENTRY_SIZE),
OTX_EP_SG_ALIGN, rte_socket_id());
if (sg == NULL) {
- otx_ep_err("IQ[%d] sg_entries alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] sg_entries alloc failed", iq_no);
goto iq_init_fail;
}
@@ -134,14 +134,14 @@ otx_ep_init_instr_queue(struct otx_ep_device *otx_ep, int iq_no, int num_descs,
iq->req_list[i].finfo.g.sg = sg;
}
- otx_ep_info("IQ[%d]: base: %p basedma: %lx count: %d\n",
+ otx_ep_info("IQ[%d]: base: %p basedma: %lx count: %d",
iq_no, iq->base_addr, (unsigned long)iq->base_addr_dma,
iq->nb_desc);
iq->mbuf_list = rte_zmalloc_socket("mbuf_list", (iq->nb_desc * sizeof(struct rte_mbuf *)),
RTE_CACHE_LINE_SIZE, rte_socket_id());
if (!iq->mbuf_list) {
- otx_ep_err("IQ[%d] mbuf_list alloc failed\n", iq_no);
+ otx_ep_err("IQ[%d] mbuf_list alloc failed", iq_no);
goto iq_init_fail;
}
@@ -187,12 +187,12 @@ otx_ep_setup_iqs(struct otx_ep_device *otx_ep, uint32_t iq_no, int num_descs,
otx_ep->instr_queue[iq_no] = iq;
if (otx_ep_init_instr_queue(otx_ep, iq_no, num_descs, socket_id)) {
- otx_ep_err("IQ init is failed\n");
+ otx_ep_err("IQ init is failed");
goto delete_IQ;
}
otx_ep->nb_tx_queues++;
- otx_ep_info("IQ[%d] is created.\n", iq_no);
+ otx_ep_info("IQ[%d] is created.", iq_no);
return 0;
@@ -235,7 +235,7 @@ otx_ep_delete_oqs(struct otx_ep_device *otx_ep, uint32_t oq_no)
droq = otx_ep->droq[oq_no];
if (droq == NULL) {
- otx_ep_err("Invalid droq[%d]\n", oq_no);
+ otx_ep_err("Invalid droq[%d]", oq_no);
return -EINVAL;
}
@@ -255,7 +255,7 @@ otx_ep_delete_oqs(struct otx_ep_device *otx_ep, uint32_t oq_no)
otx_ep->nb_rx_queues--;
- otx_ep_info("OQ[%d] is deleted\n", oq_no);
+ otx_ep_info("OQ[%d] is deleted", oq_no);
return 0;
}
@@ -270,7 +270,7 @@ otx_ep_droq_setup_ring_buffers(struct otx_ep_droq *droq)
for (idx = 0; idx < droq->nb_desc; idx++) {
buf = rte_pktmbuf_alloc(droq->mpool);
if (buf == NULL) {
- otx_ep_err("OQ buffer alloc failed\n");
+ otx_ep_err("OQ buffer alloc failed");
droq->stats.rx_alloc_failure++;
return -ENOMEM;
}
@@ -324,7 +324,7 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,
uint32_t desc_ring_size;
int ret;
- otx_ep_info("OQ[%d] Init start\n", q_no);
+ otx_ep_info("OQ[%d] Init start", q_no);
droq = otx_ep->droq[q_no];
droq->otx_ep_dev = otx_ep;
@@ -344,23 +344,23 @@ otx_ep_init_droq(struct otx_ep_device *otx_ep, uint32_t q_no,
socket_id);
if (droq->desc_ring_mz == NULL) {
- otx_ep_err("OQ:%d desc_ring allocation failed\n", q_no);
+ otx_ep_err("OQ:%d desc_ring allocation failed", q_no);
goto init_droq_fail;
}
droq->desc_ring_dma = droq->desc_ring_mz->iova;
droq->desc_ring = (struct otx_ep_droq_desc *)droq->desc_ring_mz->addr;
- otx_ep_dbg("OQ[%d]: desc_ring: virt: 0x%p, dma: %lx\n",
+ otx_ep_dbg("OQ[%d]: desc_ring: virt: 0x%p, dma: %lx",
q_no, droq->desc_ring, (unsigned long)droq->desc_ring_dma);
- otx_ep_dbg("OQ[%d]: num_desc: %d\n", q_no, droq->nb_desc);
+ otx_ep_dbg("OQ[%d]: num_desc: %d", q_no, droq->nb_desc);
/* OQ buf_list set up */
droq->recv_buf_list = rte_zmalloc_socket("recv_buf_list",
(droq->nb_desc * sizeof(struct rte_mbuf *)),
RTE_CACHE_LINE_SIZE, socket_id);
if (droq->recv_buf_list == NULL) {
- otx_ep_err("OQ recv_buf_list alloc failed\n");
+ otx_ep_err("OQ recv_buf_list alloc failed");
goto init_droq_fail;
}
@@ -396,17 +396,17 @@ otx_ep_setup_oqs(struct otx_ep_device *otx_ep, int oq_no, int num_descs,
droq = (struct otx_ep_droq *)rte_zmalloc("otx_ep_OQ",
sizeof(*droq), RTE_CACHE_LINE_SIZE);
if (droq == NULL) {
- otx_ep_err("Droq[%d] Creation Failed\n", oq_no);
+ otx_ep_err("Droq[%d] Creation Failed", oq_no);
return -ENOMEM;
}
otx_ep->droq[oq_no] = droq;
if (otx_ep_init_droq(otx_ep, oq_no, num_descs, desc_size, mpool,
socket_id)) {
- otx_ep_err("Droq[%d] Initialization failed\n", oq_no);
+ otx_ep_err("Droq[%d] Initialization failed", oq_no);
goto delete_OQ;
}
- otx_ep_info("OQ[%d] is created.\n", oq_no);
+ otx_ep_info("OQ[%d] is created.", oq_no);
otx_ep->nb_rx_queues++;
@@ -431,12 +431,12 @@ otx_ep_iqreq_delete(struct otx_ep_instr_queue *iq, uint32_t idx)
case OTX_EP_REQTYPE_NORESP_GATHER:
/* This will take care of multiple segments also */
rte_pktmbuf_free(mbuf);
- otx_ep_dbg("IQ buffer freed at idx[%d]\n", idx);
+ otx_ep_dbg("IQ buffer freed at idx[%d]", idx);
break;
case OTX_EP_REQTYPE_NONE:
default:
- otx_ep_info("This iqreq mode is not supported:%d\n", reqtype);
+ otx_ep_info("This iqreq mode is not supported:%d", reqtype);
}
/* Reset the request list at this index */
@@ -599,7 +599,7 @@ prepare_xmit_gather_list(struct otx_ep_instr_queue *iq, struct rte_mbuf *m, uint
num_sg = (frags + mask) / OTX_EP_NUM_SG_PTRS;
if (unlikely(pkt_len > OTX_EP_MAX_PKT_SZ && num_sg > OTX_EP_MAX_SG_LISTS)) {
- otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments\n");
+ otx_ep_err("Failed to xmit the pkt, pkt_len is higher or pkt has more segments");
goto exit;
}
@@ -675,16 +675,16 @@ otx_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts)
iqcmd.irh.u64 = rte_bswap64(iqcmd.irh.u64);
#ifdef OTX_EP_IO_DEBUG
- otx_ep_dbg("After swapping\n");
- otx_ep_dbg("Word0 [dptr]: 0x%016lx\n",
+ otx_ep_dbg("After swapping");
+ otx_ep_dbg("Word0 [dptr]: 0x%016lx",
(unsigned long)iqcmd.dptr);
- otx_ep_dbg("Word1 [ihtx]: 0x%016lx\n", (unsigned long)iqcmd.ih);
- otx_ep_dbg("Word2 [pki_ih3]: 0x%016lx\n",
+ otx_ep_dbg("Word1 [ihtx]: 0x%016lx", (unsigned long)iqcmd.ih);
+ otx_ep_dbg("Word2 [pki_ih3]: 0x%016lx",
(unsigned long)iqcmd.pki_ih3);
- otx_ep_dbg("Word3 [rptr]: 0x%016lx\n",
+ otx_ep_dbg("Word3 [rptr]: 0x%016lx",
(unsigned long)iqcmd.rptr);
- otx_ep_dbg("Word4 [irh]: 0x%016lx\n", (unsigned long)iqcmd.irh);
- otx_ep_dbg("Word5 [exhdr[0]]: 0x%016lx\n",
+ otx_ep_dbg("Word4 [irh]: 0x%016lx", (unsigned long)iqcmd.irh);
+ otx_ep_dbg("Word5 [exhdr[0]]: 0x%016lx",
(unsigned long)iqcmd.exhdr[0]);
rte_pktmbuf_dump(stdout, m, rte_pktmbuf_pkt_len(m));
#endif
@@ -757,7 +757,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
if (unlikely(!info->length)) {
int retry = OTX_EP_MAX_DELAYED_PKT_RETRIES;
/* otx_ep_dbg("OCTEON DROQ[%d]: read_idx: %d; Data not ready "
- * "yet, Retry; pending=%lu\n", droq->q_no, droq->read_idx,
+ * "yet, Retry; pending=%lu", droq->q_no, droq->read_idx,
* droq->pkts_pending);
*/
droq->stats.pkts_delayed_data++;
@@ -766,7 +766,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
rte_delay_us_block(50);
}
if (!retry && !info->length) {
- otx_ep_err("OCTEON DROQ[%d]: read_idx: %d; Retry failed !!\n",
+ otx_ep_err("OCTEON DROQ[%d]: read_idx: %d; Retry failed !!",
droq->q_no, droq->read_idx);
/* May be zero length packet; drop it */
assert(0);
@@ -834,7 +834,7 @@ otx_ep_droq_read_packet(struct otx_ep_device *otx_ep, struct otx_ep_droq *droq,
last_buf = mbuf;
} else {
- otx_ep_err("no buf\n");
+ otx_ep_err("no buf");
assert(0);
}
diff --git a/drivers/net/octeon_ep/otx_ep_vf.c b/drivers/net/octeon_ep/otx_ep_vf.c
index 236b7a874c..7defb0f13d 100644
--- a/drivers/net/octeon_ep/otx_ep_vf.c
+++ b/drivers/net/octeon_ep/otx_ep_vf.c
@@ -142,7 +142,7 @@ otx_ep_setup_iq_regs(struct otx_ep_device *otx_ep, uint32_t iq_no)
iq->inst_cnt_reg = (uint8_t *)otx_ep->hw_addr +
OTX_EP_R_IN_CNTS(iq_no);
- otx_ep_dbg("InstQ[%d]:dbell reg @ 0x%p inst_cnt_reg @ 0x%p\n",
+ otx_ep_dbg("InstQ[%d]:dbell reg @ 0x%p inst_cnt_reg @ 0x%p",
iq_no, iq->doorbell_reg, iq->inst_cnt_reg);
loop = OTX_EP_BUSY_LOOP_COUNT;
@@ -220,14 +220,14 @@ otx_ep_setup_oq_regs(struct otx_ep_device *otx_ep, uint32_t oq_no)
}
if (loop < 0)
return -EIO;
- otx_ep_dbg("OTX_EP_R[%d]_credit:%x\n", oq_no,
+ otx_ep_dbg("OTX_EP_R[%d]_credit:%x", oq_no,
rte_read32(droq->pkts_credit_reg));
/* Clear the OQ_OUT_CNTS doorbell */
reg_val = rte_read32(droq->pkts_sent_reg);
rte_write32((uint32_t)reg_val, droq->pkts_sent_reg);
- otx_ep_dbg("OTX_EP_R[%d]_sent: %x\n", oq_no,
+ otx_ep_dbg("OTX_EP_R[%d]_sent: %x", oq_no,
rte_read32(droq->pkts_sent_reg));
loop = OTX_EP_BUSY_LOOP_COUNT;
@@ -259,7 +259,7 @@ otx_ep_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
}
if (loop < 0) {
- otx_ep_err("dbell reset failed\n");
+ otx_ep_err("dbell reset failed");
return -EIO;
}
@@ -269,7 +269,7 @@ otx_ep_enable_iq(struct otx_ep_device *otx_ep, uint32_t q_no)
otx_ep_write64(reg_val, otx_ep->hw_addr, OTX_EP_R_IN_ENABLE(q_no));
- otx_ep_info("IQ[%d] enable done\n", q_no);
+ otx_ep_info("IQ[%d] enable done", q_no);
return 0;
}
@@ -290,7 +290,7 @@ otx_ep_enable_oq(struct otx_ep_device *otx_ep, uint32_t q_no)
rte_delay_ms(1);
}
if (loop < 0) {
- otx_ep_err("dbell reset failed\n");
+ otx_ep_err("dbell reset failed");
return -EIO;
}
@@ -299,7 +299,7 @@ otx_ep_enable_oq(struct otx_ep_device *otx_ep, uint32_t q_no)
reg_val |= 0x1ull;
otx_ep_write64(reg_val, otx_ep->hw_addr, OTX_EP_R_OUT_ENABLE(q_no));
- otx_ep_info("OQ[%d] enable done\n", q_no);
+ otx_ep_info("OQ[%d] enable done", q_no);
return 0;
}
@@ -402,10 +402,10 @@ otx_ep_vf_setup_device(struct otx_ep_device *otx_ep)
if (otx_ep->conf == NULL) {
otx_ep->conf = otx_ep_get_defconf(otx_ep);
if (otx_ep->conf == NULL) {
- otx_ep_err("OTX_EP VF default config not found\n");
+ otx_ep_err("OTX_EP VF default config not found");
return -ENOENT;
}
- otx_ep_info("Default config is used\n");
+ otx_ep_info("Default config is used");
}
/* Get IOQs (RPVF] count */
@@ -414,7 +414,7 @@ otx_ep_vf_setup_device(struct otx_ep_device *otx_ep)
otx_ep->sriov_info.rings_per_vf = ((reg_val >> OTX_EP_R_IN_CTL_RPVF_POS)
& OTX_EP_R_IN_CTL_RPVF_MASK);
- otx_ep_info("OTX_EP RPVF: %d\n", otx_ep->sriov_info.rings_per_vf);
+ otx_ep_info("OTX_EP RPVF: %d", otx_ep->sriov_info.rings_per_vf);
otx_ep->fn_list.setup_iq_regs = otx_ep_setup_iq_regs;
otx_ep->fn_list.setup_oq_regs = otx_ep_setup_oq_regs;
diff --git a/drivers/net/octeontx/base/octeontx_pkovf.c b/drivers/net/octeontx/base/octeontx_pkovf.c
index 5d445dfb49..7aec84a813 100644
--- a/drivers/net/octeontx/base/octeontx_pkovf.c
+++ b/drivers/net/octeontx/base/octeontx_pkovf.c
@@ -364,7 +364,7 @@ octeontx_pko_chan_stop(struct octeontx_pko_vf_ctl_s *ctl, uint64_t chanid)
res = octeontx_pko_dq_close(dq);
if (res < 0)
- octeontx_log_err("closing DQ%d failed\n", dq);
+ octeontx_log_err("closing DQ%d failed", dq);
dq_cnt++;
dq++;
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 3c2154043c..c802b2c389 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1223,7 +1223,7 @@ octeontx_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
if (dev->data->tx_queues[qid]) {
res = octeontx_dev_tx_queue_stop(dev, qid);
if (res < 0)
- octeontx_log_err("failed stop tx_queue(%d)\n", qid);
+ octeontx_log_err("failed stop tx_queue(%d)", qid);
rte_free(dev->data->tx_queues[qid]);
}
@@ -1342,7 +1342,7 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
/* Verify queue index */
if (qidx >= dev->data->nb_rx_queues) {
- octeontx_log_err("QID %d not supported (0 - %d available)\n",
+ octeontx_log_err("QID %d not supported (0 - %d available)",
qidx, (dev->data->nb_rx_queues - 1));
return -ENOTSUP;
}
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index bfec085045..9626c343dc 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -1093,11 +1093,11 @@ set_iface_direction(const char *iface, pcap_t *pcap,
{
const char *direction_str = (direction == PCAP_D_IN) ? "IN" : "OUT";
if (pcap_setdirection(pcap, direction) < 0) {
- PMD_LOG(ERR, "Setting %s pcap direction %s failed - %s\n",
+ PMD_LOG(ERR, "Setting %s pcap direction %s failed - %s",
iface, direction_str, pcap_geterr(pcap));
return -1;
}
- PMD_LOG(INFO, "Setting %s pcap direction %s\n",
+ PMD_LOG(INFO, "Setting %s pcap direction %s",
iface, direction_str);
return 0;
}
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index eccaaa2448..725ffcb2bc 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -161,7 +161,7 @@ pfe_recv_pkts_on_intr(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
writel(readl(HIF_INT_ENABLE) | HIF_RXPKT_INT, HIF_INT_ENABLE);
ret = epoll_wait(priv->pfe->hif.epoll_fd, &epoll_ev, 1, ticks);
if (ret < 0 && errno != EINTR)
- PFE_PMD_ERR("epoll_wait fails with %d\n", errno);
+ PFE_PMD_ERR("epoll_wait fails with %d", errno);
}
return work_done;
@@ -338,9 +338,9 @@ pfe_eth_open_cdev(struct pfe_eth_priv_s *priv)
pfe_cdev_fd = open(PFE_CDEV_PATH, O_RDONLY);
if (pfe_cdev_fd < 0) {
- PFE_PMD_WARN("Unable to open PFE device file (%s).\n",
+ PFE_PMD_WARN("Unable to open PFE device file (%s).",
PFE_CDEV_PATH);
- PFE_PMD_WARN("Link status update will not be available.\n");
+ PFE_PMD_WARN("Link status update will not be available.");
priv->link_fd = PFE_CDEV_INVALID_FD;
return -1;
}
@@ -583,16 +583,16 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
ret = ioctl(priv->link_fd, ioctl_cmd, &lstatus);
if (ret != 0) {
- PFE_PMD_ERR("Unable to fetch link status (ioctl)\n");
+ PFE_PMD_ERR("Unable to fetch link status (ioctl)");
return -1;
}
- PFE_PMD_DEBUG("Fetched link state (%d) for dev %d.\n",
+ PFE_PMD_DEBUG("Fetched link state (%d) for dev %d.",
lstatus, priv->id);
}
if (old.link_status == lstatus) {
/* no change in status */
- PFE_PMD_DEBUG("No change in link status; Not updating.\n");
+ PFE_PMD_DEBUG("No change in link status; Not updating.");
return -1;
}
@@ -603,7 +603,7 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
pfe_eth_atomic_write_link_status(dev, &link);
- PFE_PMD_INFO("Port (%d) link is %s\n", dev->data->port_id,
+ PFE_PMD_INFO("Port (%d) link is %s", dev->data->port_id,
link.link_status ? "up" : "down");
return 0;
@@ -993,24 +993,24 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)
addr = of_get_address(np, 0, &cbus_size, NULL);
if (!addr) {
- PFE_PMD_ERR("of_get_address cannot return qman address\n");
+ PFE_PMD_ERR("of_get_address cannot return qman address");
goto err;
}
cbus_addr = of_translate_address(np, addr);
if (!cbus_addr) {
- PFE_PMD_ERR("of_translate_address failed\n");
+ PFE_PMD_ERR("of_translate_address failed");
goto err;
}
addr = of_get_address(np, 1, &ddr_size, NULL);
if (!addr) {
- PFE_PMD_ERR("of_get_address cannot return qman address\n");
+ PFE_PMD_ERR("of_get_address cannot return qman address");
goto err;
}
g_pfe->ddr_phys_baseaddr = of_translate_address(np, addr);
if (!g_pfe->ddr_phys_baseaddr) {
- PFE_PMD_ERR("of_translate_address failed\n");
+ PFE_PMD_ERR("of_translate_address failed");
goto err;
}
diff --git a/drivers/net/pfe/pfe_hif.c b/drivers/net/pfe/pfe_hif.c
index e2b23bbeb7..abb9cde996 100644
--- a/drivers/net/pfe/pfe_hif.c
+++ b/drivers/net/pfe/pfe_hif.c
@@ -309,7 +309,7 @@ client_put_rxpacket(struct hif_rx_queue *queue,
if (readl(&desc->ctrl) & CL_DESC_OWN) {
mbuf = rte_cpu_to_le_64(rte_pktmbuf_alloc(pool));
if (unlikely(!mbuf)) {
- PFE_PMD_WARN("Buffer allocation failure\n");
+ PFE_PMD_WARN("Buffer allocation failure");
return NULL;
}
@@ -770,9 +770,9 @@ pfe_hif_rx_idle(struct pfe_hif *hif)
} while (--hif_stop_loop);
if (readl(HIF_RX_STATUS) & BDP_CSR_RX_DMA_ACTV)
- PFE_PMD_ERR("Failed\n");
+ PFE_PMD_ERR("Failed");
else
- PFE_PMD_INFO("Done\n");
+ PFE_PMD_INFO("Done");
}
#endif
@@ -806,7 +806,7 @@ pfe_hif_init(struct pfe *pfe)
pfe_cdev_fd = open(PFE_CDEV_PATH, O_RDWR);
if (pfe_cdev_fd < 0) {
- PFE_PMD_WARN("Unable to open PFE device file (%s).\n",
+ PFE_PMD_WARN("Unable to open PFE device file (%s).",
PFE_CDEV_PATH);
pfe->cdev_fd = PFE_CDEV_INVALID_FD;
return -1;
@@ -817,7 +817,7 @@ pfe_hif_init(struct pfe *pfe)
/* hif interrupt enable */
err = ioctl(pfe->cdev_fd, PFE_CDEV_HIF_INTR_EN, &event_fd);
if (err) {
- PFE_PMD_ERR("\nioctl failed for intr enable err: %d\n",
+ PFE_PMD_ERR("ioctl failed for intr enable err: %d",
errno);
goto err0;
}
@@ -826,7 +826,7 @@ pfe_hif_init(struct pfe *pfe)
epoll_ev.data.fd = event_fd;
err = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, event_fd, &epoll_ev);
if (err < 0) {
- PFE_PMD_ERR("epoll_ctl failed with err = %d\n", errno);
+ PFE_PMD_ERR("epoll_ctl failed with err = %d", errno);
goto err0;
}
pfe->hif.epoll_fd = epoll_fd;
diff --git a/drivers/net/pfe/pfe_hif_lib.c b/drivers/net/pfe/pfe_hif_lib.c
index 6fe6d33d23..541ba365c6 100644
--- a/drivers/net/pfe/pfe_hif_lib.c
+++ b/drivers/net/pfe/pfe_hif_lib.c
@@ -157,7 +157,7 @@ hif_lib_client_init_rx_buffers(struct hif_client_s *client,
queue->queue_id = 0;
queue->port_id = client->port_id;
queue->priv = client->priv;
- PFE_PMD_DEBUG("rx queue: %d, base: %p, size: %d\n", qno,
+ PFE_PMD_DEBUG("rx queue: %d, base: %p, size: %d", qno,
queue->base, queue->size);
}
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index ede5fc83e3..25e28fd9f6 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -887,7 +887,7 @@ qede_free_tx_pkt(struct qede_tx_queue *txq)
mbuf = txq->sw_tx_ring[idx];
if (mbuf) {
nb_segs = mbuf->nb_segs;
- PMD_TX_LOG(DEBUG, txq, "nb_segs to free %u\n", nb_segs);
+ PMD_TX_LOG(DEBUG, txq, "nb_segs to free %u", nb_segs);
while (nb_segs) {
/* It's like consuming rxbuf in recv() */
ecore_chain_consume(&txq->tx_pbl);
@@ -897,7 +897,7 @@ qede_free_tx_pkt(struct qede_tx_queue *txq)
rte_pktmbuf_free(mbuf);
txq->sw_tx_ring[idx] = NULL;
txq->sw_tx_cons++;
- PMD_TX_LOG(DEBUG, txq, "Freed tx packet\n");
+ PMD_TX_LOG(DEBUG, txq, "Freed tx packet");
} else {
ecore_chain_consume(&txq->tx_pbl);
txq->nb_tx_avail++;
@@ -919,7 +919,7 @@ qede_process_tx_compl(__rte_unused struct ecore_dev *edev,
#ifdef RTE_LIBRTE_QEDE_DEBUG_TX
sw_tx_cons = ecore_chain_get_cons_idx(&txq->tx_pbl);
- PMD_TX_LOG(DEBUG, txq, "Tx Completions = %u\n",
+ PMD_TX_LOG(DEBUG, txq, "Tx Completions = %u",
abs(hw_bd_cons - sw_tx_cons));
#endif
while (hw_bd_cons != ecore_chain_get_cons_idx(&txq->tx_pbl))
@@ -1353,7 +1353,7 @@ qede_rx_process_tpa_cmn_cont_end_cqe(__rte_unused struct qede_dev *qdev,
tpa_info->tpa_tail = curr_frag;
qede_rx_bd_ring_consume(rxq);
if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
- PMD_RX_LOG(ERR, rxq, "mbuf allocation fails\n");
+ PMD_RX_LOG(ERR, rxq, "mbuf allocation fails");
rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;
rxq->rx_alloc_errors++;
}
@@ -1365,7 +1365,7 @@ qede_rx_process_tpa_cont_cqe(struct qede_dev *qdev,
struct qede_rx_queue *rxq,
struct eth_fast_path_rx_tpa_cont_cqe *cqe)
{
- PMD_RX_LOG(INFO, rxq, "TPA cont[%d] - len [%d]\n",
+ PMD_RX_LOG(INFO, rxq, "TPA cont[%d] - len [%d]",
cqe->tpa_agg_index, rte_le_to_cpu_16(cqe->len_list[0]));
/* only len_list[0] will have value */
qede_rx_process_tpa_cmn_cont_end_cqe(qdev, rxq, cqe->tpa_agg_index,
@@ -1388,7 +1388,7 @@ qede_rx_process_tpa_end_cqe(struct qede_dev *qdev,
rx_mb->pkt_len = cqe->total_packet_len;
PMD_RX_LOG(INFO, rxq, "TPA End[%d] reason %d cqe_len %d nb_segs %d"
- " pkt_len %d\n", cqe->tpa_agg_index, cqe->end_reason,
+ " pkt_len %d", cqe->tpa_agg_index, cqe->end_reason,
rte_le_to_cpu_16(cqe->len_list[0]), rx_mb->nb_segs,
rx_mb->pkt_len);
}
@@ -1471,7 +1471,7 @@ qede_process_sg_pkts(void *p_rxq, struct rte_mbuf *rx_mb,
pkt_len;
if (unlikely(!cur_size)) {
PMD_RX_LOG(ERR, rxq, "Length is 0 while %u BDs"
- " left for mapping jumbo\n", num_segs);
+ " left for mapping jumbo", num_segs);
qede_recycle_rx_bd_ring(rxq, qdev, num_segs);
return -EINVAL;
}
@@ -1497,7 +1497,7 @@ print_rx_bd_info(struct rte_mbuf *m, struct qede_rx_queue *rxq,
PMD_RX_LOG(INFO, rxq,
"len 0x%04x bf 0x%04x hash_val 0x%x"
" ol_flags 0x%04lx l2=%s l3=%s l4=%s tunn=%s"
- " inner_l2=%s inner_l3=%s inner_l4=%s\n",
+ " inner_l2=%s inner_l3=%s inner_l4=%s",
m->data_len, bitfield, m->hash.rss,
(unsigned long)m->ol_flags,
rte_get_ptype_l2_name(m->packet_type),
@@ -1548,7 +1548,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
PMD_RX_LOG(ERR, rxq,
"New buffers allocation failed,"
- "dropping incoming packets\n");
+ "dropping incoming packets");
dev = &rte_eth_devices[rxq->port_id];
dev->data->rx_mbuf_alloc_failed += count;
rxq->rx_alloc_errors += count;
@@ -1579,13 +1579,13 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
cqe =
(union eth_rx_cqe *)ecore_chain_consume(&rxq->rx_comp_ring);
cqe_type = cqe->fast_path_regular.type;
- PMD_RX_LOG(INFO, rxq, "Rx CQE type %d\n", cqe_type);
+ PMD_RX_LOG(INFO, rxq, "Rx CQE type %d", cqe_type);
if (likely(cqe_type == ETH_RX_CQE_TYPE_REGULAR)) {
fp_cqe = &cqe->fast_path_regular;
} else {
if (cqe_type == ETH_RX_CQE_TYPE_SLOW_PATH) {
- PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE\n");
+ PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE");
ecore_eth_cqe_completion
(&edev->hwfns[rxq->queue_id %
edev->num_hwfns],
@@ -1611,10 +1611,10 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
#endif
if (unlikely(qede_tunn_exist(parse_flag))) {
- PMD_RX_LOG(INFO, rxq, "Rx tunneled packet\n");
+ PMD_RX_LOG(INFO, rxq, "Rx tunneled packet");
if (unlikely(qede_check_tunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1624,7 +1624,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (unlikely(qede_check_tunn_csum_l3(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "Outer L3 csum failed, flags = 0x%x\n",
+ "Outer L3 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
@@ -1659,7 +1659,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
if (unlikely(qede_check_notunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1667,7 +1667,7 @@ qede_recv_pkts_regular(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
}
if (unlikely(qede_check_notunn_csum_l3(rx_mb, parse_flag))) {
- PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x\n",
+ PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
@@ -1776,7 +1776,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
PMD_RX_LOG(ERR, rxq,
"New buffers allocation failed,"
- "dropping incoming packets\n");
+ "dropping incoming packets");
dev = &rte_eth_devices[rxq->port_id];
dev->data->rx_mbuf_alloc_failed += count;
rxq->rx_alloc_errors += count;
@@ -1805,7 +1805,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
cqe =
(union eth_rx_cqe *)ecore_chain_consume(&rxq->rx_comp_ring);
cqe_type = cqe->fast_path_regular.type;
- PMD_RX_LOG(INFO, rxq, "Rx CQE type %d\n", cqe_type);
+ PMD_RX_LOG(INFO, rxq, "Rx CQE type %d", cqe_type);
switch (cqe_type) {
case ETH_RX_CQE_TYPE_REGULAR:
@@ -1823,7 +1823,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
PMD_RX_LOG(INFO, rxq,
"TPA start[%d] - len_on_first_bd %d header %d"
- " [bd_list[0] %d], [seg_len %d]\n",
+ " [bd_list[0] %d], [seg_len %d]",
cqe_start_tpa->tpa_agg_index,
rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
cqe_start_tpa->header_len,
@@ -1843,7 +1843,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rx_mb = rxq->tpa_info[tpa_agg_idx].tpa_head;
goto tpa_end;
case ETH_RX_CQE_TYPE_SLOW_PATH:
- PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE\n");
+ PMD_RX_LOG(INFO, rxq, "Got unexpected slowpath CQE");
ecore_eth_cqe_completion(
&edev->hwfns[rxq->queue_id % edev->num_hwfns],
(struct eth_slow_path_rx_cqe *)cqe);
@@ -1881,10 +1881,10 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rss_hash = rte_le_to_cpu_32(cqe_start_tpa->rss_hash);
}
if (qede_tunn_exist(parse_flag)) {
- PMD_RX_LOG(INFO, rxq, "Rx tunneled packet\n");
+ PMD_RX_LOG(INFO, rxq, "Rx tunneled packet");
if (unlikely(qede_check_tunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1894,7 +1894,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (unlikely(qede_check_tunn_csum_l3(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "Outer L3 csum failed, flags = 0x%x\n",
+ "Outer L3 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
@@ -1933,7 +1933,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
*/
if (unlikely(qede_check_notunn_csum_l4(parse_flag))) {
PMD_RX_LOG(ERR, rxq,
- "L4 csum failed, flags = 0x%x\n",
+ "L4 csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
@@ -1941,7 +1941,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
}
if (unlikely(qede_check_notunn_csum_l3(rx_mb, parse_flag))) {
- PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x\n",
+ PMD_RX_LOG(ERR, rxq, "IP csum failed, flags = 0x%x",
parse_flag);
rxq->rx_hw_errors++;
ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
@@ -2117,13 +2117,13 @@ print_tx_bd_info(struct qede_tx_queue *txq,
rte_cpu_to_le_16(bd1->data.bitfields));
if (bd2)
PMD_TX_LOG(INFO, txq,
- "BD2: nbytes=0x%04x bf1=0x%04x bf2=0x%04x tunn_ip=0x%04x\n",
+ "BD2: nbytes=0x%04x bf1=0x%04x bf2=0x%04x tunn_ip=0x%04x",
rte_cpu_to_le_16(bd2->nbytes), bd2->data.bitfields1,
bd2->data.bitfields2, bd2->data.tunn_ip_size);
if (bd3)
PMD_TX_LOG(INFO, txq,
"BD3: nbytes=0x%04x bf=0x%04x MSS=0x%04x "
- "tunn_l4_hdr_start_offset_w=0x%04x tunn_hdr_size=0x%04x\n",
+ "tunn_l4_hdr_start_offset_w=0x%04x tunn_hdr_size=0x%04x",
rte_cpu_to_le_16(bd3->nbytes),
rte_cpu_to_le_16(bd3->data.bitfields),
rte_cpu_to_le_16(bd3->data.lso_mss),
@@ -2131,7 +2131,7 @@ print_tx_bd_info(struct qede_tx_queue *txq,
bd3->data.tunn_hdr_size_w);
rte_get_tx_ol_flag_list(tx_ol_flags, ol_buf, sizeof(ol_buf));
- PMD_TX_LOG(INFO, txq, "TX offloads = %s\n", ol_buf);
+ PMD_TX_LOG(INFO, txq, "TX offloads = %s", ol_buf);
}
#endif
@@ -2201,7 +2201,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts,
#ifdef RTE_LIBRTE_QEDE_DEBUG_TX
if (unlikely(i != nb_pkts))
- PMD_TX_LOG(ERR, txq, "TX prepare failed for %u\n",
+ PMD_TX_LOG(ERR, txq, "TX prepare failed for %u",
nb_pkts - i);
#endif
return i;
@@ -2215,16 +2215,16 @@ qede_mpls_tunn_tx_sanity_check(struct rte_mbuf *mbuf,
struct qede_tx_queue *txq)
{
if (((mbuf->outer_l2_len + mbuf->outer_l3_len) / 2) > 0xff)
- PMD_TX_LOG(ERR, txq, "tunn_l4_hdr_start_offset overflow\n");
+ PMD_TX_LOG(ERR, txq, "tunn_l4_hdr_start_offset overflow");
if (((mbuf->outer_l2_len + mbuf->outer_l3_len +
MPLSINUDP_HDR_SIZE) / 2) > 0xff)
- PMD_TX_LOG(ERR, txq, "tunn_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "tunn_hdr_size overflow");
if (((mbuf->l2_len - MPLSINUDP_HDR_SIZE) / 2) >
ETH_TX_DATA_2ND_BD_TUNN_INNER_L2_HDR_SIZE_W_MASK)
- PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow");
if (((mbuf->l2_len - MPLSINUDP_HDR_SIZE + mbuf->l3_len) / 2) >
ETH_TX_DATA_2ND_BD_L4_HDR_START_OFFSET_W_MASK)
- PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow\n");
+ PMD_TX_LOG(ERR, txq, "inner_l2_hdr_size overflow");
}
#endif
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 609d95dcfa..4441a90bdf 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -1814,7 +1814,7 @@ nicvf_dev_start(struct rte_eth_dev *dev)
/* Apply new link configurations if changed */
ret = nicvf_apply_link_speed(dev);
if (ret) {
- PMD_INIT_LOG(ERR, "Failed to set link configuration\n");
+ PMD_INIT_LOG(ERR, "Failed to set link configuration");
return ret;
}
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 2fabb9fc4e..2834468764 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -613,7 +613,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
err = txgbe_flash_read_dword(hw, 0xFFFDC, &ssid);
if (err) {
PMD_INIT_LOG(ERR,
- "Read of internal subsystem device id failed\n");
+ "Read of internal subsystem device id failed");
return -ENODEV;
}
hw->subsystem_device_id = (u16)ssid >> 8 | (u16)ssid << 8;
@@ -2762,7 +2762,7 @@ txgbe_dev_detect_sfp(void *param)
PMD_DRV_LOG(INFO, "SFP not present.");
} else if (err == 0) {
hw->mac.setup_sfp(hw);
- PMD_DRV_LOG(INFO, "detected SFP+: %d\n", hw->phy.sfp_type);
+ PMD_DRV_LOG(INFO, "detected SFP+: %d", hw->phy.sfp_type);
txgbe_dev_setup_link_alarm_handler(dev);
txgbe_dev_link_update(dev, 0);
}
diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c
index f9f8108fb8..4af49dd802 100644
--- a/drivers/net/txgbe/txgbe_ipsec.c
+++ b/drivers/net/txgbe/txgbe_ipsec.c
@@ -100,7 +100,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no match and no free entries*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx IP table\n");
+ "No free entry left in the Rx IP table");
return -1;
}
@@ -114,7 +114,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Rx SA table\n");
+ "No free entry left in the Rx SA table");
return -1;
}
@@ -210,7 +210,7 @@ txgbe_crypto_add_sa(struct txgbe_crypto_session *ic_session)
/* Fail if no free entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "No free entry left in the Tx SA table\n");
+ "No free entry left in the Tx SA table");
return -1;
}
@@ -269,7 +269,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (ip_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx IP table\n");
+ "Entry not found in the Rx IP table");
return -1;
}
@@ -284,7 +284,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Rx SA table\n");
+ "Entry not found in the Rx SA table");
return -1;
}
@@ -329,7 +329,7 @@ txgbe_crypto_remove_sa(struct rte_eth_dev *dev,
/* Fail if no match entries*/
if (sa_index < 0) {
PMD_DRV_LOG(ERR,
- "Entry not found in the Tx SA table\n");
+ "Entry not found in the Tx SA table");
return -1;
}
reg_val = TXGBE_IPSRXIDX_WRITE | (sa_index << 3);
@@ -359,7 +359,7 @@ txgbe_crypto_create_session(void *device,
if (conf->crypto_xform->type != RTE_CRYPTO_SYM_XFORM_AEAD ||
conf->crypto_xform->aead.algo !=
RTE_CRYPTO_AEAD_AES_GCM) {
- PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode\n");
+ PMD_DRV_LOG(ERR, "Unsupported crypto transformation mode");
return -ENOTSUP;
}
aead_xform = &conf->crypto_xform->aead;
@@ -368,14 +368,14 @@ txgbe_crypto_create_session(void *device,
if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_DECRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec decryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec decryption not enabled");
return -ENOTSUP;
}
} else {
if (dev_conf->txmode.offloads & RTE_ETH_TX_OFFLOAD_SECURITY) {
ic_session->op = TXGBE_OP_AUTHENTICATED_ENCRYPTION;
} else {
- PMD_DRV_LOG(ERR, "IPsec encryption not enabled\n");
+ PMD_DRV_LOG(ERR, "IPsec encryption not enabled");
return -ENOTSUP;
}
}
@@ -389,7 +389,7 @@ txgbe_crypto_create_session(void *device,
if (ic_session->op == TXGBE_OP_AUTHENTICATED_ENCRYPTION) {
if (txgbe_crypto_add_sa(ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to add SA\n");
+ PMD_DRV_LOG(ERR, "Failed to add SA");
return -EPERM;
}
}
@@ -411,12 +411,12 @@ txgbe_crypto_remove_session(void *device,
struct txgbe_crypto_session *ic_session = SECURITY_GET_SESS_PRIV(session);
if (eth_dev != ic_session->dev) {
- PMD_DRV_LOG(ERR, "Session not bound to this device\n");
+ PMD_DRV_LOG(ERR, "Session not bound to this device");
return -ENODEV;
}
if (txgbe_crypto_remove_sa(eth_dev, ic_session)) {
- PMD_DRV_LOG(ERR, "Failed to remove session\n");
+ PMD_DRV_LOG(ERR, "Failed to remove session");
return -EFAULT;
}
diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c
index 176f79005c..700632bd88 100644
--- a/drivers/net/txgbe/txgbe_pf.c
+++ b/drivers/net/txgbe/txgbe_pf.c
@@ -85,7 +85,7 @@ int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
sizeof(struct txgbe_vf_info) * vf_num, 0);
if (*vfinfo == NULL) {
PMD_INIT_LOG(ERR,
- "Cannot allocate memory for private VF data\n");
+ "Cannot allocate memory for private VF data");
return -ENOMEM;
}
@@ -167,14 +167,14 @@ txgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
struct txgbe_ethertype_filter ethertype_filter;
if (!hw->mac.set_ethertype_anti_spoofing) {
- PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.\n");
+ PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.");
return;
}
i = txgbe_ethertype_filter_lookup(filter_info,
TXGBE_ETHERTYPE_FLOW_CTRL);
if (i >= 0) {
- PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!\n");
+ PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!");
return;
}
@@ -187,7 +187,7 @@ txgbe_add_tx_flow_control_drop_filter(struct rte_eth_dev *eth_dev)
i = txgbe_ethertype_filter_insert(filter_info,
ðertype_filter);
if (i < 0) {
- PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.\n");
+ PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.");
return;
}
@@ -408,7 +408,7 @@ txgbe_disable_vf_mc_promisc(struct rte_eth_dev *eth_dev, uint32_t vf)
vmolr = rd32(hw, TXGBE_POOLETHCTL(vf));
- PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous", vf);
vmolr &= ~TXGBE_POOLETHCTL_MCP;
@@ -570,7 +570,7 @@ txgbe_negotiate_vf_api(struct rte_eth_dev *eth_dev,
break;
}
- PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d",
api_version, vf);
return -1;
@@ -614,7 +614,7 @@ txgbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
case RTE_ETH_MQ_TX_NONE:
case RTE_ETH_MQ_TX_DCB:
PMD_DRV_LOG(ERR, "PF must work with virtualization for VF %u"
- ", but its tx mode = %d\n", vf,
+ ", but its tx mode = %d", vf,
eth_conf->txmode.mq_mode);
return -1;
@@ -648,7 +648,7 @@ txgbe_get_vf_queues(struct rte_eth_dev *eth_dev, uint32_t vf, uint32_t *msgbuf)
break;
default:
- PMD_DRV_LOG(ERR, "PF work with invalid mode = %d\n",
+ PMD_DRV_LOG(ERR, "PF work with invalid mode = %d",
eth_conf->txmode.mq_mode);
return -1;
}
@@ -704,7 +704,7 @@ txgbe_set_vf_mc_promisc(struct rte_eth_dev *eth_dev,
if (!(fctrl & TXGBE_PSRCTL_UCP)) {
/* VF promisc requires PF in promisc */
PMD_DRV_LOG(ERR,
- "Enabling VF promisc requires PF in promisc\n");
+ "Enabling VF promisc requires PF in promisc");
return -1;
}
@@ -741,7 +741,7 @@ txgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
if (index) {
if (!rte_is_valid_assigned_ether_addr(ea)) {
- PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
+ PMD_DRV_LOG(ERR, "set invalid mac vf:%d", vf);
return -1;
}
diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c
index 3246b74e13..bc3e2a9af5 100644
--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c
+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c
@@ -670,7 +670,7 @@ vhost_vdpa_map_notification_area(struct virtio_user_dev *dev)
notify_area[i] = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED | MAP_FILE,
data->vhostfd, i * page_size);
if (notify_area[i] == MAP_FAILED) {
- PMD_DRV_LOG(ERR, "(%s) Map failed for notify address of queue %d\n",
+ PMD_DRV_LOG(ERR, "(%s) Map failed for notify address of queue %d",
dev->path, i);
i--;
goto map_err;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 48b872524a..e8642be86b 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -1149,7 +1149,7 @@ virtio_user_dev_create_shadow_cvq(struct virtio_user_dev *dev, struct virtqueue
scvq = virtqueue_alloc(&dev->hw, vq->vq_queue_index, vq->vq_nentries,
VTNET_CQ, SOCKET_ID_ANY, name);
if (!scvq) {
- PMD_INIT_LOG(ERR, "(%s) Failed to alloc shadow control vq\n", dev->path);
+ PMD_INIT_LOG(ERR, "(%s) Failed to alloc shadow control vq", dev->path);
return -ENOMEM;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 467fb61137..78fac63ab6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1095,10 +1095,10 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
ret = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (ret != 0)
PMD_INIT_LOG(DEBUG,
- "Failed in setup memory region cmd\n");
+ "Failed in setup memory region cmd");
ret = 0;
} else {
- PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n");
+ PMD_INIT_LOG(DEBUG, "Failed to setup memory region");
}
} else {
PMD_INIT_LOG(WARNING, "Memregs can't init (rx: %d, tx: %d)",
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 380f41f98b..e226641fdf 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1341,7 +1341,7 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
/* Zero number of descriptors in the configuration of the RX queue */
if (ret == 0) {
PMD_INIT_LOG(ERR,
- "Invalid configuration in Rx queue: %d, buffers ring: %d\n",
+ "Invalid configuration in Rx queue: %d, buffers ring: %d",
i, j);
return -EINVAL;
}
diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
index aeee4ac289..de8c024abb 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
@@ -68,7 +68,7 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_CMDIF_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -99,14 +99,14 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
do {
ret = qbman_swp_enqueue_multiple(swp, &eqdesc, &fd, NULL, 1);
if (ret < 0 && ret != -EBUSY)
- DPAA2_CMDIF_ERR("Transmit failure with err: %d\n", ret);
+ DPAA2_CMDIF_ERR("Transmit failure with err: %d", ret);
retry_count++;
} while ((ret == -EBUSY) && (retry_count < DPAA2_MAX_TX_RETRY_COUNT));
if (ret < 0)
return ret;
- DPAA2_CMDIF_DP_DEBUG("Successfully transmitted a packet\n");
+ DPAA2_CMDIF_DP_DEBUG("Successfully transmitted a packet");
return 1;
}
@@ -133,7 +133,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
ret = dpaa2_affine_qbman_swp();
if (ret) {
DPAA2_CMDIF_ERR(
- "Failed to allocate IO portal, tid: %d\n",
+ "Failed to allocate IO portal, tid: %d",
rte_gettid());
return 0;
}
@@ -152,7 +152,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
- DPAA2_CMDIF_DP_WARN("VDQ cmd not issued. QBMAN is busy\n");
+ DPAA2_CMDIF_DP_WARN("VDQ cmd not issued. QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -169,7 +169,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
/* Check for valid frame. */
status = (uint8_t)qbman_result_DQ_flags(dq_storage);
if (unlikely((status & QBMAN_DQ_STAT_VALIDFRAME) == 0)) {
- DPAA2_CMDIF_DP_DEBUG("No frame is delivered\n");
+ DPAA2_CMDIF_DP_DEBUG("No frame is delivered");
return 0;
}
@@ -181,7 +181,7 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev,
cmdif_rcv_cnxt->flc = DPAA2_GET_FD_FLC(fd);
cmdif_rcv_cnxt->frc = DPAA2_GET_FD_FRC(fd);
- DPAA2_CMDIF_DP_DEBUG("packet received\n");
+ DPAA2_CMDIF_DP_DEBUG("packet received");
return 1;
}
diff --git a/drivers/raw/ifpga/afu_pmd_n3000.c b/drivers/raw/ifpga/afu_pmd_n3000.c
index 67b3941265..6aae1b224e 100644
--- a/drivers/raw/ifpga/afu_pmd_n3000.c
+++ b/drivers/raw/ifpga/afu_pmd_n3000.c
@@ -1506,7 +1506,7 @@ static int dma_afu_set_irqs(struct afu_rawdev *dev, uint32_t vec_start,
rte_memcpy(&irq_set->data, efds, sizeof(*efds) * count);
ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
if (ret)
- IFPGA_RAWDEV_PMD_ERR("Error enabling MSI-X interrupts\n");
+ IFPGA_RAWDEV_PMD_ERR("Error enabling MSI-X interrupts");
rte_free(irq_set);
return ret;
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index a972b3b7a4..113a22b0a7 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -383,7 +383,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
goto fail;
if (value == 0xdeadbeef) {
- IFPGA_RAWDEV_PMD_DEBUG("dev_id %d sensor %s value %x\n",
+ IFPGA_RAWDEV_PMD_DEBUG("dev_id %d sensor %s value %x",
raw_dev->dev_id, sensor->name, value);
continue;
}
@@ -391,13 +391,13 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
/* monitor temperature sensors */
if (!strcmp(sensor->name, "Board Temperature") ||
!strcmp(sensor->name, "FPGA Die Temperature")) {
- IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d\n",
+ IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d",
sensor->name, value, sensor->high_warn,
sensor->high_fatal);
if (HIGH_WARN(sensor, value) ||
LOW_WARN(sensor, value)) {
- IFPGA_RAWDEV_PMD_INFO("%s reach threshold %d\n",
+ IFPGA_RAWDEV_PMD_INFO("%s reach threshold %d",
sensor->name, value);
*gsd_start = true;
break;
@@ -408,7 +408,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
if (!strcmp(sensor->name, "12V AUX Voltage")) {
if (value < AUX_VOLTAGE_WARN) {
IFPGA_RAWDEV_PMD_INFO(
- "%s reach threshold %d mV\n",
+ "%s reach threshold %d mV",
sensor->name, value);
*gsd_start = true;
break;
@@ -444,7 +444,7 @@ static int set_surprise_link_check_aer(
if (ifpga_monitor_sensor(rdev, &enable))
return -EFAULT;
if (enable || force_disable) {
- IFPGA_RAWDEV_PMD_ERR("Set AER, pls graceful shutdown\n");
+ IFPGA_RAWDEV_PMD_ERR("Set AER, pls graceful shutdown");
ifpga_rdev->aer_enable = 1;
/* get bridge fd */
strlcpy(path, "/sys/bus/pci/devices/", sizeof(path));
@@ -661,7 +661,7 @@ ifpga_rawdev_info_get(struct rte_rawdev *dev,
continue;
if (ifpga_fill_afu_dev(acc, afu_dev)) {
- IFPGA_RAWDEV_PMD_ERR("cannot get info\n");
+ IFPGA_RAWDEV_PMD_ERR("cannot get info");
return -ENOENT;
}
}
@@ -816,13 +816,13 @@ fpga_pr(struct rte_rawdev *raw_dev, u32 port_id, const char *buffer, u32 size,
ret = opae_manager_flash(mgr, port_id, buffer, size, status);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("%s pr error %d\n", __func__, ret);
+ IFPGA_RAWDEV_PMD_ERR("%s pr error %d", __func__, ret);
return ret;
}
ret = opae_bridge_reset(br);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("%s reset port:%d error %d\n",
+ IFPGA_RAWDEV_PMD_ERR("%s reset port:%d error %d",
__func__, port_id, ret);
return ret;
}
@@ -846,14 +846,14 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
file_fd = open(file_name, O_RDONLY);
if (file_fd < 0) {
- IFPGA_RAWDEV_PMD_ERR("%s: open file error: %s\n",
+ IFPGA_RAWDEV_PMD_ERR("%s: open file error: %s",
__func__, file_name);
- IFPGA_RAWDEV_PMD_ERR("Message : %s\n", strerror(errno));
+ IFPGA_RAWDEV_PMD_ERR("Message : %s", strerror(errno));
return -EINVAL;
}
ret = stat(file_name, &file_stat);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("stat on bitstream file failed: %s\n",
+ IFPGA_RAWDEV_PMD_ERR("stat on bitstream file failed: %s",
file_name);
ret = -EINVAL;
goto close_fd;
@@ -864,7 +864,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
goto close_fd;
}
- IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu\n", buffer_size);
+ IFPGA_RAWDEV_PMD_INFO("bitstream file size: %zu", buffer_size);
buffer = rte_malloc(NULL, buffer_size, 0);
if (!buffer) {
ret = -ENOMEM;
@@ -880,7 +880,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
/*do PR now*/
ret = fpga_pr(rawdev, port_id, buffer, buffer_size, &pr_error);
- IFPGA_RAWDEV_PMD_INFO("downloading to device port %d....%s.\n", port_id,
+ IFPGA_RAWDEV_PMD_INFO("downloading to device port %d....%s.", port_id,
ret ? "failed" : "success");
if (ret) {
ret = -EINVAL;
@@ -923,7 +923,7 @@ ifpga_rawdev_pr(struct rte_rawdev *dev,
afu_pr_conf->afu_id.port,
afu_pr_conf->bs_path);
if (ret) {
- IFPGA_RAWDEV_PMD_ERR("do pr error %d\n", ret);
+ IFPGA_RAWDEV_PMD_ERR("do pr error %d", ret);
return ret;
}
}
@@ -954,7 +954,7 @@ ifpga_rawdev_pr(struct rte_rawdev *dev,
rte_memcpy(&afu_pr_conf->afu_id.uuid.uuid_high, uuid.b + 8,
sizeof(u64));
- IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx\n",
+ IFPGA_RAWDEV_PMD_INFO("%s: uuid_l=0x%lx, uuid_h=0x%lx",
__func__,
(unsigned long)afu_pr_conf->afu_id.uuid.uuid_low,
(unsigned long)afu_pr_conf->afu_id.uuid.uuid_high);
@@ -1230,13 +1230,13 @@ fme_err_read_seu_emr(struct opae_manager *mgr)
if (ret)
return -EINVAL;
- IFPGA_RAWDEV_PMD_INFO("seu emr low: 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_INFO("seu emr low: 0x%" PRIx64, val);
ret = ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_SEU_EMR_HIGH, &val);
if (ret)
return -EINVAL;
- IFPGA_RAWDEV_PMD_INFO("seu emr high: 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_INFO("seu emr high: 0x%" PRIx64, val);
return 0;
}
@@ -1251,7 +1251,7 @@ static int fme_clear_warning_intr(struct opae_manager *mgr)
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_NONFATAL_ERRORS, &val))
return -EINVAL;
if ((val & 0x40) != 0)
- IFPGA_RAWDEV_PMD_INFO("clean not done\n");
+ IFPGA_RAWDEV_PMD_INFO("clean not done");
return 0;
}
@@ -1263,14 +1263,14 @@ static int fme_clean_fme_error(struct opae_manager *mgr)
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_ERRORS, &val))
return -EINVAL;
- IFPGA_RAWDEV_PMD_DEBUG("before clean 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_DEBUG("before clean 0x%" PRIx64, val);
ifpga_set_fme_error_prop(mgr, FME_ERR_PROP_CLEAR, val);
if (ifpga_get_fme_error_prop(mgr, FME_ERR_PROP_ERRORS, &val))
return -EINVAL;
- IFPGA_RAWDEV_PMD_DEBUG("after clean 0x%" PRIx64 "\n", val);
+ IFPGA_RAWDEV_PMD_DEBUG("after clean 0x%" PRIx64, val);
return 0;
}
@@ -1290,15 +1290,15 @@ fme_err_handle_error0(struct opae_manager *mgr)
fme_error0.csr = val;
if (fme_error0.fabric_err)
- IFPGA_RAWDEV_PMD_ERR("Fabric error\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric error");
else if (fme_error0.fabfifo_overflow)
- IFPGA_RAWDEV_PMD_ERR("Fabric fifo under/overflow error\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric fifo under/overflow error");
else if (fme_error0.afu_acc_mode_err)
- IFPGA_RAWDEV_PMD_ERR("AFU PF/VF access mismatch detected\n");
+ IFPGA_RAWDEV_PMD_ERR("AFU PF/VF access mismatch detected");
else if (fme_error0.pcie0cdc_parity_err)
- IFPGA_RAWDEV_PMD_ERR("PCIe0 CDC Parity Error\n");
+ IFPGA_RAWDEV_PMD_ERR("PCIe0 CDC Parity Error");
else if (fme_error0.cvlcdc_parity_err)
- IFPGA_RAWDEV_PMD_ERR("CVL CDC Parity Error\n");
+ IFPGA_RAWDEV_PMD_ERR("CVL CDC Parity Error");
else if (fme_error0.fpgaseuerr)
fme_err_read_seu_emr(mgr);
@@ -1321,17 +1321,17 @@ fme_err_handle_catfatal_error(struct opae_manager *mgr)
fme_catfatal.csr = val;
if (fme_catfatal.cci_fatal_err)
- IFPGA_RAWDEV_PMD_ERR("CCI error detected\n");
+ IFPGA_RAWDEV_PMD_ERR("CCI error detected");
else if (fme_catfatal.fabric_fatal_err)
- IFPGA_RAWDEV_PMD_ERR("Fabric fatal error detected\n");
+ IFPGA_RAWDEV_PMD_ERR("Fabric fatal error detected");
else if (fme_catfatal.pcie_poison_err)
- IFPGA_RAWDEV_PMD_ERR("Poison error from PCIe ports\n");
+ IFPGA_RAWDEV_PMD_ERR("Poison error from PCIe ports");
else if (fme_catfatal.inject_fata_err)
- IFPGA_RAWDEV_PMD_ERR("Injected Fatal Error\n");
+ IFPGA_RAWDEV_PMD_ERR("Injected Fatal Error");
else if (fme_catfatal.crc_catast_err)
- IFPGA_RAWDEV_PMD_ERR("a catastrophic EDCRC error\n");
+ IFPGA_RAWDEV_PMD_ERR("a catastrophic EDCRC error");
else if (fme_catfatal.injected_catast_err)
- IFPGA_RAWDEV_PMD_ERR("Injected Catastrophic Error\n");
+ IFPGA_RAWDEV_PMD_ERR("Injected Catastrophic Error");
else if (fme_catfatal.bmc_seu_catast_err)
fme_err_read_seu_emr(mgr);
@@ -1350,28 +1350,28 @@ fme_err_handle_nonfaterror(struct opae_manager *mgr)
nonfaterr.csr = val;
if (nonfaterr.temp_thresh_ap1)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP1\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP1");
else if (nonfaterr.temp_thresh_ap2)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP2\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP2");
else if (nonfaterr.pcie_error)
- IFPGA_RAWDEV_PMD_INFO("an error has occurred in pcie\n");
+ IFPGA_RAWDEV_PMD_INFO("an error has occurred in pcie");
else if (nonfaterr.portfatal_error)
- IFPGA_RAWDEV_PMD_INFO("fatal error occurred in AFU port.\n");
+ IFPGA_RAWDEV_PMD_INFO("fatal error occurred in AFU port.");
else if (nonfaterr.proc_hot)
- IFPGA_RAWDEV_PMD_INFO("a ProcHot event\n");
+ IFPGA_RAWDEV_PMD_INFO("a ProcHot event");
else if (nonfaterr.afu_acc_mode_err)
- IFPGA_RAWDEV_PMD_INFO("an AFU PF/VF access mismatch\n");
+ IFPGA_RAWDEV_PMD_INFO("an AFU PF/VF access mismatch");
else if (nonfaterr.injected_nonfata_err) {
- IFPGA_RAWDEV_PMD_INFO("Injected Warning Error\n");
+ IFPGA_RAWDEV_PMD_INFO("Injected Warning Error");
fme_clear_warning_intr(mgr);
} else if (nonfaterr.temp_thresh_AP6)
- IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP6\n");
+ IFPGA_RAWDEV_PMD_INFO("Temperature threshold triggered AP6");
else if (nonfaterr.power_thresh_AP1)
- IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP1\n");
+ IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP1");
else if (nonfaterr.power_thresh_AP2)
- IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP2\n");
+ IFPGA_RAWDEV_PMD_INFO("Power threshold triggered AP2");
else if (nonfaterr.mbp_err)
- IFPGA_RAWDEV_PMD_INFO("an MBP event\n");
+ IFPGA_RAWDEV_PMD_INFO("an MBP event");
return 0;
}
@@ -1381,7 +1381,7 @@ fme_interrupt_handler(void *param)
{
struct opae_manager *mgr = (struct opae_manager *)param;
- IFPGA_RAWDEV_PMD_INFO("%s interrupt occurred\n", __func__);
+ IFPGA_RAWDEV_PMD_INFO("%s interrupt occurred", __func__);
fme_err_handle_error0(mgr);
fme_err_handle_nonfaterror(mgr);
@@ -1407,7 +1407,7 @@ ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
return -EINVAL;
if ((*intr_handle) == NULL) {
- IFPGA_RAWDEV_PMD_ERR("%s interrupt %d not registered\n",
+ IFPGA_RAWDEV_PMD_ERR("%s interrupt %d not registered",
type == IFPGA_FME_IRQ ? "FME" : "AFU",
type == IFPGA_FME_IRQ ? 0 : vec_start);
return -ENOENT;
@@ -1417,7 +1417,7 @@ ifpga_unregister_msix_irq(struct ifpga_rawdev *dev, enum ifpga_irq_type type,
rc = rte_intr_callback_unregister(*intr_handle, handler, arg);
if (rc < 0) {
- IFPGA_RAWDEV_PMD_ERR("Failed to unregister %s interrupt %d\n",
+ IFPGA_RAWDEV_PMD_ERR("Failed to unregister %s interrupt %d",
type == IFPGA_FME_IRQ ? "FME" : "AFU",
type == IFPGA_FME_IRQ ? 0 : vec_start);
} else {
@@ -1480,7 +1480,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
rte_intr_efds_index_get(*intr_handle, 0)))
return -rte_errno;
- IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d\n",
+ IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d",
name, rte_intr_dev_fd_get(*intr_handle),
rte_intr_fd_get(*intr_handle));
@@ -1521,7 +1521,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,
return -EINVAL;
}
- IFPGA_RAWDEV_PMD_INFO("success register %s interrupt\n", name);
+ IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name);
free(intr_efds);
return 0;
diff --git a/drivers/regex/cn9k/cn9k_regexdev.c b/drivers/regex/cn9k/cn9k_regexdev.c
index e96cbf4141..aa809ab5bf 100644
--- a/drivers/regex/cn9k/cn9k_regexdev.c
+++ b/drivers/regex/cn9k/cn9k_regexdev.c
@@ -192,7 +192,7 @@ ree_dev_register(const char *name)
{
struct rte_regexdev *dev;
- cn9k_ree_dbg("Creating regexdev %s\n", name);
+ cn9k_ree_dbg("Creating regexdev %s", name);
/* allocate device structure */
dev = rte_regexdev_register(name);
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index f034bd59ba..2958368813 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -536,7 +536,7 @@ notify_relay(void *arg)
if (nfds < 0) {
if (errno == EINTR)
continue;
- DRV_LOG(ERR, "epoll_wait return fail\n");
+ DRV_LOG(ERR, "epoll_wait return fail");
return 1;
}
@@ -651,12 +651,12 @@ intr_relay(void *arg)
errno == EWOULDBLOCK ||
errno == EAGAIN)
continue;
- DRV_LOG(ERR, "Error reading from file descriptor %d: %s\n",
+ DRV_LOG(ERR, "Error reading from file descriptor %d: %s",
csc_event.data.fd,
strerror(errno));
goto out;
} else if (nbytes == 0) {
- DRV_LOG(ERR, "Read nothing from file descriptor %d\n",
+ DRV_LOG(ERR, "Read nothing from file descriptor %d",
csc_event.data.fd);
continue;
} else {
@@ -1500,7 +1500,7 @@ ifcvf_pci_get_device_type(struct rte_pci_device *pci_dev)
uint16_t device_id;
if (pci_device_id < 0x1000 || pci_device_id > 0x107f) {
- DRV_LOG(ERR, "Probe device is not a virtio device\n");
+ DRV_LOG(ERR, "Probe device is not a virtio device");
return -1;
}
@@ -1577,7 +1577,7 @@ ifcvf_blk_get_config(int vid, uint8_t *config, uint32_t size)
DRV_LOG(DEBUG, " sectors : %u", dev_cfg->geometry.sectors);
DRV_LOG(DEBUG, "num_queues: 0x%08x", dev_cfg->num_queues);
- DRV_LOG(DEBUG, "config: [%x] [%x] [%x] [%x] [%x] [%x] [%x] [%x]\n",
+ DRV_LOG(DEBUG, "config: [%x] [%x] [%x] [%x] [%x] [%x] [%x] [%x]",
config[0], config[1], config[2], config[3], config[4],
config[5], config[6], config[7]);
return 0;
diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c
index cef80b5476..3e4247dbcb 100644
--- a/drivers/vdpa/nfp/nfp_vdpa.c
+++ b/drivers/vdpa/nfp/nfp_vdpa.c
@@ -127,7 +127,7 @@ nfp_vdpa_vfio_setup(struct nfp_vdpa_dev *device)
if (device->vfio_group_fd < 0)
goto container_destroy;
- DRV_VDPA_LOG(DEBUG, "container_fd=%d, group_fd=%d,\n",
+ DRV_VDPA_LOG(DEBUG, "container_fd=%d, group_fd=%d,",
device->vfio_container_fd, device->vfio_group_fd);
ret = rte_pci_map_device(pci_dev);
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 12/14] drivers: split multilines log messages
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (10 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 11/14] drivers: remove redundant newline from logs David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable David Marchand
` (4 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev
Cc: Nicolas Chautru, Gagandeep Singh, Hemant Agrawal, Jay Zhou,
Ajit Khaparde, Somnath Kotur, Chas Williams, Min Hu (Connor),
Sachin Saxena, Matan Azrad, Viacheslav Ovsiienko, Harman Kalra,
Maxime Coquelin, Chenbo Xia, Jakub Palider, Tomasz Duszynski
Prepare for RTE_LOG_LINE conversion.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- added changes to event/dlb2 and net/bonding,
---
.../fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 251 +++++++++---------
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 24 +-
drivers/crypto/caam_jr/caam_jr.c | 7 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 54 ++--
drivers/crypto/virtio/virtio_cryptodev.c | 10 +-
drivers/net/bnxt/bnxt_hwrm.c | 16 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 59 ++--
drivers/net/dpaa/dpaa_ethdev.c | 9 +-
drivers/net/mlx4/mlx4_mr.c | 18 +-
drivers/net/octeontx/octeontx_ethdev.c | 22 +-
drivers/net/virtio/virtio_cvq.c | 19 +-
.../net/virtio/virtio_user/virtio_user_dev.c | 30 +--
drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 +-
13 files changed, 258 insertions(+), 263 deletions(-)
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 3e04e44ba2..b4a97de967 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -100,49 +100,49 @@ print_static_reg_debug_info(void *mmio_base, uint8_t fpga_variant)
static void
vc_5gnr_print_dma_dec_desc_debug_info(union vc_5gnr_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | iter(%"PRIu32") | et_pass(%"PRIu32")"
- " | crcb_pass (%"PRIu32") | error(%"PRIu32")\n"
- "\t-- qm_idx(%"PRIu32") | max_iter(%"PRIu32") | "
- "bg_idx (%"PRIu32") | harqin_en(%"PRIu32") | zc(%"PRIu32")\n"
- "\t-- hbstroe_offset(%"PRIu32") | num_null (%"PRIu32") "
- "| irq_en(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | desc_idx (%"PRIu32") | "
- "drop_crc24b(%"PRIu32") | RV (%"PRIu32")\n"
- "\t-- crc24b_ind(%"PRIu32") | et_dis (%"PRIu32")\n"
- "\t-- harq_input_length(%"PRIu32") | rm_e(%"PRIu32")\n"
- "\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32")"
- "| out_add (0x%08"PRIx32"%08"PRIx32")",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | iter(%"PRIu32") | et_pass(%"PRIu32")"
+ " | crcb_pass (%"PRIu32") | error(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.iter,
(uint32_t)desc->dec_req.et_pass,
(uint32_t)desc->dec_req.crcb_pass,
- (uint32_t)desc->dec_req.error,
+ (uint32_t)desc->dec_req.error);
+ rte_bbdev_log_debug("\t-- qm_idx(%"PRIu32") | max_iter(%"PRIu32") | "
+ "bg_idx (%"PRIu32") | harqin_en(%"PRIu32") | zc(%"PRIu32")",
(uint32_t)desc->dec_req.qm_idx,
(uint32_t)desc->dec_req.max_iter,
(uint32_t)desc->dec_req.bg_idx,
(uint32_t)desc->dec_req.harqin_en,
- (uint32_t)desc->dec_req.zc,
+ (uint32_t)desc->dec_req.zc);
+ rte_bbdev_log_debug("\t-- hbstroe_offset(%"PRIu32") | num_null (%"PRIu32") "
+ "| irq_en(%"PRIu32")",
(uint32_t)desc->dec_req.hbstroe_offset,
(uint32_t)desc->dec_req.num_null,
- (uint32_t)desc->dec_req.irq_en,
+ (uint32_t)desc->dec_req.irq_en);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | desc_idx (%"PRIu32") | "
+ "drop_crc24b(%"PRIu32") | RV (%"PRIu32")",
(uint32_t)desc->dec_req.ncb,
(uint32_t)desc->dec_req.desc_idx,
(uint32_t)desc->dec_req.drop_crc24b,
- (uint32_t)desc->dec_req.rv,
+ (uint32_t)desc->dec_req.rv);
+ rte_bbdev_log_debug("\t-- crc24b_ind(%"PRIu32") | et_dis (%"PRIu32")",
(uint32_t)desc->dec_req.crc24b_ind,
- (uint32_t)desc->dec_req.et_dis,
+ (uint32_t)desc->dec_req.et_dis);
+ rte_bbdev_log_debug("\t-- harq_input_length(%"PRIu32") | rm_e(%"PRIu32")",
(uint32_t)desc->dec_req.harq_input_length,
- (uint32_t)desc->dec_req.rm_e,
+ (uint32_t)desc->dec_req.rm_e);
+ rte_bbdev_log_debug("\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32")"
+ "| out_add (0x%08"PRIx32"%08"PRIx32")",
(uint32_t)desc->dec_req.cbs_in_op,
(uint32_t)desc->dec_req.in_addr_hi,
(uint32_t)desc->dec_req.in_addr_lw,
(uint32_t)desc->dec_req.out_addr_hi,
(uint32_t)desc->dec_req.out_addr_lw);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7]);
}
@@ -151,37 +151,12 @@ vc_5gnr_print_dma_dec_desc_debug_info(union vc_5gnr_dma_desc *desc)
static void
agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | tb_crc_pass(%"PRIu32") | cb_crc_all_pass(%"PRIu32")"
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | tb_crc_pass(%"PRIu32") | cb_crc_all_pass(%"PRIu32")"
" | cb_all_et_pass(%"PRIu32") | max_iter_ret(%"PRIu32") |"
"cgb_crc_bitmap(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32") |"
- "et_dis (%"PRIu32") | harq_in_en(%"PRIu32") | max_iter(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
- "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")\n"
- "\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgfi(%"PRIu32") |"
- "cbgs(%"PRIu32") | desc_idx(%"PRIu32")\n"
- "\t-- ca(%"PRIu32") | c(%"PRIu32") | llr_pckg(%"PRIu32") |"
- "syndrome_check_mode(%"PRIu32") | num_null(%"PRIu32")\n"
- "\t-- ea(%"PRIu32") | eba(%"PRIu32")\n"
- "\t-- hbstore_offset_out(%"PRIu32")\n"
- "\t-- hbstore_offset_in(%"PRIu32") | en_slice_ts(%"PRIu32") |"
- "en_host_ts(%"PRIu32") | en_cb_wr_status(%"PRIu32")"
- " | en_output_sg(%"PRIu32") | en_input_sg(%"PRIu32") | tb_cb(%"PRIu32")"
- " | crc24b_ind(%"PRIu32")| drop_crc24b(%"PRIu32")\n"
- "\t-- harq_input_length_a(%"PRIu32") | harq_input_length_b(%"PRIu32")\n"
- "\t-- input_slice_table_addr_lo(%"PRIu32")"
- " | input_start_addr_lo(%"PRIu32")\n"
- "\t-- input_slice_table_addr_hi(%"PRIu32")"
- " | input_start_addr_hi(%"PRIu32")\n"
- "\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")\n"
- "\t-- output_slice_table_addr_lo(%"PRIu32")"
- " | output_start_addr_lo(%"PRIu32")\n"
- "\t-- output_slice_table_addr_hi(%"PRIu32")"
- " | output_start_addr_hi(%"PRIu32")\n"
- "\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")\n"
- "\t-- enqueue_timestamp(%"PRIu32")\n"
- "\t-- completion_timestamp(%"PRIu32")\n",
- desc,
+ "et_dis (%"PRIu32") | harq_in_en(%"PRIu32") | max_iter(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.tb_crc_pass,
(uint32_t)desc->dec_req.cb_crc_all_pass,
@@ -192,26 +167,38 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->dec_req.error_code,
(uint32_t)desc->dec_req.et_dis,
(uint32_t)desc->dec_req.harq_in_en,
- (uint32_t)desc->dec_req.max_iter,
+ (uint32_t)desc->dec_req.max_iter);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
+ "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")",
(uint32_t)desc->dec_req.ncb,
(uint32_t)desc->dec_req.bg_idx,
(uint32_t)desc->dec_req.qm_idx,
(uint32_t)desc->dec_req.zc,
(uint32_t)desc->dec_req.rv,
- (uint32_t)desc->dec_req.int_en,
+ (uint32_t)desc->dec_req.int_en);
+ rte_bbdev_log_debug("\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgfi(%"PRIu32") |"
+ "cbgs(%"PRIu32") | desc_idx(%"PRIu32")",
(uint32_t)desc->dec_req.max_cbg,
(uint32_t)desc->dec_req.cbgti,
(uint32_t)desc->dec_req.cbgfi,
(uint32_t)desc->dec_req.cbgs,
- (uint32_t)desc->dec_req.desc_idx,
+ (uint32_t)desc->dec_req.desc_idx);
+ rte_bbdev_log_debug("\t-- ca(%"PRIu32") | c(%"PRIu32") | llr_pckg(%"PRIu32") |"
+ "syndrome_check_mode(%"PRIu32") | num_null(%"PRIu32")",
(uint32_t)desc->dec_req.ca,
(uint32_t)desc->dec_req.c,
(uint32_t)desc->dec_req.llr_pckg,
(uint32_t)desc->dec_req.syndrome_check_mode,
- (uint32_t)desc->dec_req.num_null,
+ (uint32_t)desc->dec_req.num_null);
+ rte_bbdev_log_debug("\t-- ea(%"PRIu32") | eba(%"PRIu32")",
(uint32_t)desc->dec_req.ea,
- (uint32_t)desc->dec_req.eba,
- (uint32_t)desc->dec_req.hbstore_offset_out,
+ (uint32_t)desc->dec_req.eba);
+ rte_bbdev_log_debug("\t-- hbstore_offset_out(%"PRIu32")",
+ (uint32_t)desc->dec_req.hbstore_offset_out);
+ rte_bbdev_log_debug("\t-- hbstore_offset_in(%"PRIu32") | en_slice_ts(%"PRIu32") |"
+ "en_host_ts(%"PRIu32") | en_cb_wr_status(%"PRIu32")"
+ " | en_output_sg(%"PRIu32") | en_input_sg(%"PRIu32") | tb_cb(%"PRIu32")"
+ " | crc24b_ind(%"PRIu32")| drop_crc24b(%"PRIu32")",
(uint32_t)desc->dec_req.hbstore_offset_in,
(uint32_t)desc->dec_req.en_slice_ts,
(uint32_t)desc->dec_req.en_host_ts,
@@ -220,29 +207,42 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->dec_req.en_input_sg,
(uint32_t)desc->dec_req.tb_cb,
(uint32_t)desc->dec_req.crc24b_ind,
- (uint32_t)desc->dec_req.drop_crc24b,
+ (uint32_t)desc->dec_req.drop_crc24b);
+ rte_bbdev_log_debug("\t-- harq_input_length_a(%"PRIu32") | harq_input_length_b(%"PRIu32")",
(uint32_t)desc->dec_req.harq_input_length_a,
- (uint32_t)desc->dec_req.harq_input_length_b,
+ (uint32_t)desc->dec_req.harq_input_length_b);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_lo(%"PRIu32")"
+ " | input_start_addr_lo(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_table_addr_lo,
- (uint32_t)desc->dec_req.input_start_addr_lo,
+ (uint32_t)desc->dec_req.input_start_addr_lo);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_hi(%"PRIu32")"
+ " | input_start_addr_hi(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_table_addr_hi,
- (uint32_t)desc->dec_req.input_start_addr_hi,
+ (uint32_t)desc->dec_req.input_start_addr_hi);
+ rte_bbdev_log_debug("\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")",
(uint32_t)desc->dec_req.input_slice_num,
- (uint32_t)desc->dec_req.input_length,
+ (uint32_t)desc->dec_req.input_length);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_lo(%"PRIu32")"
+ " | output_start_addr_lo(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_table_addr_lo,
- (uint32_t)desc->dec_req.output_start_addr_lo,
+ (uint32_t)desc->dec_req.output_start_addr_lo);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_hi(%"PRIu32")"
+ " | output_start_addr_hi(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_table_addr_hi,
- (uint32_t)desc->dec_req.output_start_addr_hi,
+ (uint32_t)desc->dec_req.output_start_addr_hi);
+ rte_bbdev_log_debug("\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")",
(uint32_t)desc->dec_req.output_slice_num,
- (uint32_t)desc->dec_req.output_length,
- (uint32_t)desc->dec_req.enqueue_timestamp,
+ (uint32_t)desc->dec_req.output_length);
+ rte_bbdev_log_debug("\t-- enqueue_timestamp(%"PRIu32")",
+ (uint32_t)desc->dec_req.enqueue_timestamp);
+ rte_bbdev_log_debug("\t-- completion_timestamp(%"PRIu32")",
(uint32_t)desc->dec_req.completion_timestamp);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7],
word[8], word[9], word[10], word[11],
@@ -253,31 +253,28 @@ agx100_print_dma_dec_desc_debug_info(union agx100_dma_desc *desc)
static void
vc_5gnr_print_dma_enc_desc_debug_info(union vc_5gnr_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "%"PRIu32" %"PRIu32"\n"
- "K' %"PRIu32" E %"PRIu32" desc %"PRIu32" Z %"PRIu32"\n"
- "BG %"PRIu32" Qm %"PRIu32" CRC %"PRIu32" IRQ %"PRIu32"\n"
- "k0 %"PRIu32" Ncb %"PRIu32" F %"PRIu32"\n",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("%"PRIu32" %"PRIu32,
(uint32_t)desc->enc_req.done,
- (uint32_t)desc->enc_req.error,
-
+ (uint32_t)desc->enc_req.error);
+ rte_bbdev_log_debug("K' %"PRIu32" E %"PRIu32" desc %"PRIu32" Z %"PRIu32,
(uint32_t)desc->enc_req.k_,
(uint32_t)desc->enc_req.rm_e,
(uint32_t)desc->enc_req.desc_idx,
- (uint32_t)desc->enc_req.zc,
-
+ (uint32_t)desc->enc_req.zc);
+ rte_bbdev_log_debug("BG %"PRIu32" Qm %"PRIu32" CRC %"PRIu32" IRQ %"PRIu32,
(uint32_t)desc->enc_req.bg_idx,
(uint32_t)desc->enc_req.qm_idx,
(uint32_t)desc->enc_req.crc_en,
- (uint32_t)desc->enc_req.irq_en,
-
+ (uint32_t)desc->enc_req.irq_en);
+ rte_bbdev_log_debug("k0 %"PRIu32" Ncb %"PRIu32" F %"PRIu32,
(uint32_t)desc->enc_req.k0,
(uint32_t)desc->enc_req.ncb,
(uint32_t)desc->enc_req.num_null);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7]);
}
@@ -286,49 +283,37 @@ vc_5gnr_print_dma_enc_desc_debug_info(union vc_5gnr_dma_desc *desc)
static void
agx100_print_dma_enc_desc_debug_info(union agx100_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32")\n"
- "\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
- "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")\n"
- "\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgs(%"PRIu32") | "
- "desc_idx(%"PRIu32")\n"
- "\t-- ca(%"PRIu32") | c(%"PRIu32") | num_null(%"PRIu32")\n"
- "\t-- ea(%"PRIu32")\n"
- "\t-- eb(%"PRIu32")\n"
- "\t-- k_(%"PRIu32") | en_slice_ts(%"PRIu32") | en_host_ts(%"PRIu32") | "
- "en_cb_wr_status(%"PRIu32") | en_output_sg(%"PRIu32") | "
- "en_input_sg(%"PRIu32") | tb_cb(%"PRIu32") | crc_en(%"PRIu32")\n"
- "\t-- input_slice_table_addr_lo(%"PRIu32")"
- " | input_start_addr_lo(%"PRIu32")\n"
- "\t-- input_slice_table_addr_hi(%"PRIu32")"
- " | input_start_addr_hi(%"PRIu32")\n"
- "\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")\n"
- "\t-- output_slice_table_addr_lo(%"PRIu32")"
- " | output_start_addr_lo(%"PRIu32")\n"
- "\t-- output_slice_table_addr_hi(%"PRIu32")"
- " | output_start_addr_hi(%"PRIu32")\n"
- "\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")\n"
- "\t-- enqueue_timestamp(%"PRIu32")\n"
- "\t-- completion_timestamp(%"PRIu32")\n",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | error_msg(%"PRIu32") | error_code(%"PRIu32")",
(uint32_t)desc->enc_req.done,
(uint32_t)desc->enc_req.error_msg,
- (uint32_t)desc->enc_req.error_code,
+ (uint32_t)desc->enc_req.error_code);
+ rte_bbdev_log_debug("\t-- ncb(%"PRIu32") | bg_idx (%"PRIu32") | qm_idx (%"PRIu32")"
+ "| zc(%"PRIu32") | rv(%"PRIu32") | int_en(%"PRIu32")",
(uint32_t)desc->enc_req.ncb,
(uint32_t)desc->enc_req.bg_idx,
(uint32_t)desc->enc_req.qm_idx,
(uint32_t)desc->enc_req.zc,
(uint32_t)desc->enc_req.rv,
- (uint32_t)desc->enc_req.int_en,
+ (uint32_t)desc->enc_req.int_en);
+ rte_bbdev_log_debug("\t-- max_cbg(%"PRIu32") | cbgti(%"PRIu32") | cbgs(%"PRIu32") | "
+ "desc_idx(%"PRIu32")",
(uint32_t)desc->enc_req.max_cbg,
(uint32_t)desc->enc_req.cbgti,
(uint32_t)desc->enc_req.cbgs,
- (uint32_t)desc->enc_req.desc_idx,
+ (uint32_t)desc->enc_req.desc_idx);
+ rte_bbdev_log_debug("\t-- ca(%"PRIu32") | c(%"PRIu32") | num_null(%"PRIu32")",
(uint32_t)desc->enc_req.ca,
(uint32_t)desc->enc_req.c,
- (uint32_t)desc->enc_req.num_null,
- (uint32_t)desc->enc_req.ea,
- (uint32_t)desc->enc_req.eb,
+ (uint32_t)desc->enc_req.num_null);
+ rte_bbdev_log_debug("\t-- ea(%"PRIu32")",
+ (uint32_t)desc->enc_req.ea);
+ rte_bbdev_log_debug("\t-- eb(%"PRIu32")",
+ (uint32_t)desc->enc_req.eb);
+ rte_bbdev_log_debug("\t-- k_(%"PRIu32") | en_slice_ts(%"PRIu32") | en_host_ts(%"PRIu32") | "
+ "en_cb_wr_status(%"PRIu32") | en_output_sg(%"PRIu32") | "
+ "en_input_sg(%"PRIu32") | tb_cb(%"PRIu32") | crc_en(%"PRIu32")",
(uint32_t)desc->enc_req.k_,
(uint32_t)desc->enc_req.en_slice_ts,
(uint32_t)desc->enc_req.en_host_ts,
@@ -336,27 +321,39 @@ agx100_print_dma_enc_desc_debug_info(union agx100_dma_desc *desc)
(uint32_t)desc->enc_req.en_output_sg,
(uint32_t)desc->enc_req.en_input_sg,
(uint32_t)desc->enc_req.tb_cb,
- (uint32_t)desc->enc_req.crc_en,
+ (uint32_t)desc->enc_req.crc_en);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_lo(%"PRIu32")"
+ " | input_start_addr_lo(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_table_addr_lo,
- (uint32_t)desc->enc_req.input_start_addr_lo,
+ (uint32_t)desc->enc_req.input_start_addr_lo);
+ rte_bbdev_log_debug("\t-- input_slice_table_addr_hi(%"PRIu32")"
+ " | input_start_addr_hi(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_table_addr_hi,
- (uint32_t)desc->enc_req.input_start_addr_hi,
+ (uint32_t)desc->enc_req.input_start_addr_hi);
+ rte_bbdev_log_debug("\t-- input_slice_num(%"PRIu32") | input_length(%"PRIu32")",
(uint32_t)desc->enc_req.input_slice_num,
- (uint32_t)desc->enc_req.input_length,
+ (uint32_t)desc->enc_req.input_length);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_lo(%"PRIu32")"
+ " | output_start_addr_lo(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_table_addr_lo,
- (uint32_t)desc->enc_req.output_start_addr_lo,
+ (uint32_t)desc->enc_req.output_start_addr_lo);
+ rte_bbdev_log_debug("\t-- output_slice_table_addr_hi(%"PRIu32")"
+ " | output_start_addr_hi(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_table_addr_hi,
- (uint32_t)desc->enc_req.output_start_addr_hi,
+ (uint32_t)desc->enc_req.output_start_addr_hi);
+ rte_bbdev_log_debug("\t-- output_slice_num(%"PRIu32") | output_length(%"PRIu32")",
(uint32_t)desc->enc_req.output_slice_num,
- (uint32_t)desc->enc_req.output_length,
- (uint32_t)desc->enc_req.enqueue_timestamp,
+ (uint32_t)desc->enc_req.output_length);
+ rte_bbdev_log_debug("\t-- enqueue_timestamp(%"PRIu32")",
+ (uint32_t)desc->enc_req.enqueue_timestamp);
+ rte_bbdev_log_debug("\t-- completion_timestamp(%"PRIu32")",
(uint32_t)desc->enc_req.completion_timestamp);
uint32_t *word = (uint32_t *) desc;
- rte_bbdev_log_debug("%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n"
- "%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n%08"PRIx32"\n",
+ rte_bbdev_log_debug("%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32", "
+ "%08"PRIx32", %08"PRIx32", %08"PRIx32", %08"PRIx32,
word[0], word[1], word[2], word[3],
word[4], word[5], word[6], word[7],
word[8], word[9], word[10], word[11],
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index a4a963f74d..d9373a072d 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -444,28 +444,28 @@ print_static_reg_debug_info(void *mmio_base)
static void
print_dma_dec_desc_debug_info(union fpga_dma_desc *desc)
{
- rte_bbdev_log_debug("DMA response desc %p\n"
- "\t-- done(%"PRIu32") | iter(%"PRIu32") | crc_pass(%"PRIu32")"
- " | error (%"PRIu32") | crc_type(%"PRIu32")\n"
- "\t-- max_iter(%"PRIu32") | bypass_rm(%"PRIu32") | "
- "irq_en (%"PRIu32") | drop_crc(%"PRIu32") | offset(%"PRIu32")\n"
- "\t-- k(%"PRIu32") | in_len (%"PRIu16") | op_add(%p)\n"
- "\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32") | "
- "out_add (0x%08"PRIx32"%08"PRIx32")",
- desc,
+ rte_bbdev_log_debug("DMA response desc %p",
+ desc);
+ rte_bbdev_log_debug("\t-- done(%"PRIu32") | iter(%"PRIu32") | crc_pass(%"PRIu32")"
+ " | error (%"PRIu32") | crc_type(%"PRIu32")",
(uint32_t)desc->dec_req.done,
(uint32_t)desc->dec_req.iter,
(uint32_t)desc->dec_req.crc_pass,
(uint32_t)desc->dec_req.error,
- (uint32_t)desc->dec_req.crc_type,
+ (uint32_t)desc->dec_req.crc_type);
+ rte_bbdev_log_debug("\t-- max_iter(%"PRIu32") | bypass_rm(%"PRIu32") | "
+ "irq_en (%"PRIu32") | drop_crc(%"PRIu32") | offset(%"PRIu32")",
(uint32_t)desc->dec_req.max_iter,
(uint32_t)desc->dec_req.bypass_rm,
(uint32_t)desc->dec_req.irq_en,
(uint32_t)desc->dec_req.drop_crc,
- (uint32_t)desc->dec_req.offset,
+ (uint32_t)desc->dec_req.offset);
+ rte_bbdev_log_debug("\t-- k(%"PRIu32") | in_len (%"PRIu16") | op_add(%p)",
(uint32_t)desc->dec_req.k,
(uint16_t)desc->dec_req.in_len,
- desc->dec_req.op_addr,
+ desc->dec_req.op_addr);
+ rte_bbdev_log_debug("\t-- cbs_in_op(%"PRIu32") | in_add (0x%08"PRIx32"%08"PRIx32") | "
+ "out_add (0x%08"PRIx32"%08"PRIx32")",
(uint32_t)desc->dec_req.cbs_in_op,
(uint32_t)desc->dec_req.in_addr_hi,
(uint32_t)desc->dec_req.in_addr_lw,
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 27cdbf5ed4..4082b3f422 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -123,9 +123,10 @@ void caam_jr_stats_get(struct rte_cryptodev *dev,
stats->dequeued_count += qp[i]->rx_pkts;
stats->enqueue_err_count += qp[i]->tx_errs;
stats->dequeue_err_count += qp[i]->rx_errs;
- CAAM_JR_INFO("extra stats:\n\tRX Poll ERR = %" PRIu64
- "\n\tTX Ring Full = %" PRIu64,
- qp[i]->rx_poll_err,
+ CAAM_JR_INFO("extra stats:");
+ CAAM_JR_INFO("\tRX Poll ERR = %" PRIu64,
+ qp[i]->rx_poll_err);
+ CAAM_JR_INFO("\tTX Ring Full = %" PRIu64,
qp[i]->tx_ring_full);
}
}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 99b6359e52..2cdf9308f8 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -348,11 +348,11 @@ build_authenc_gcm_sg_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_COMPOUND_FMT(fd);
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
- DPAA2_SEC_DP_DEBUG("GCM SG: auth_off: 0x%x/length %d, digest-len=%d\n"
- "iv-len=%d data_off: 0x%x\n",
+ DPAA2_SEC_DP_DEBUG("GCM SG: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->aead.data.offset,
sym_op->aead.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG("iv-len=%d data_off: 0x%x",
sess->iv.length,
sym_op->m_src->data_off);
@@ -506,11 +506,11 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_COMPOUND_FMT(fd);
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
- DPAA2_SEC_DP_DEBUG("GCM: auth_off: 0x%x/length %d, digest-len=%d\n"
- "iv-len=%d data_off: 0x%x\n",
+ DPAA2_SEC_DP_DEBUG("GCM: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->aead.data.offset,
sym_op->aead.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG("iv-len=%d data_off: 0x%x",
sess->iv.length,
sym_op->m_src->data_off);
@@ -631,11 +631,12 @@ build_authenc_sg_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "AUTHENC SG: auth_off: 0x%x/length %d, digest-len=%d\n"
- "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x\n",
+ "AUTHENC SG: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->auth.data.offset,
sym_op->auth.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG(
+ "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x",
sym_op->cipher.data.offset,
sym_op->cipher.data.length,
sess->iv.length,
@@ -791,11 +792,12 @@ build_authenc_fd(dpaa2_sec_session *sess,
DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
DPAA2_SEC_DP_DEBUG(
- "AUTHENC: auth_off: 0x%x/length %d, digest-len=%d\n"
- "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x\n",
+ "AUTHENC: auth_off: 0x%x/length %d, digest-len=%d",
sym_op->auth.data.offset,
sym_op->auth.data.length,
- sess->digest_length,
+ sess->digest_length);
+ DPAA2_SEC_DP_DEBUG(
+ "cipher_off: 0x%x/length %d, iv-len=%d data_off: 0x%x",
sym_op->cipher.data.offset,
sym_op->cipher.data.length,
sess->iv.length,
@@ -3931,20 +3933,20 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
if (ret) {
DPAA2_SEC_ERR("SEC counters failed");
} else {
- DPAA2_SEC_INFO("dpseci hardware stats:"
- "\n\tNum of Requests Dequeued = %" PRIu64
- "\n\tNum of Outbound Encrypt Requests = %" PRIu64
- "\n\tNum of Inbound Decrypt Requests = %" PRIu64
- "\n\tNum of Outbound Bytes Encrypted = %" PRIu64
- "\n\tNum of Outbound Bytes Protected = %" PRIu64
- "\n\tNum of Inbound Bytes Decrypted = %" PRIu64
- "\n\tNum of Inbound Bytes Validated = %" PRIu64,
- counters.dequeued_requests,
- counters.ob_enc_requests,
- counters.ib_dec_requests,
- counters.ob_enc_bytes,
- counters.ob_prot_bytes,
- counters.ib_dec_bytes,
+ DPAA2_SEC_INFO("dpseci hardware stats:");
+ DPAA2_SEC_INFO("\tNum of Requests Dequeued = %" PRIu64,
+ counters.dequeued_requests);
+ DPAA2_SEC_INFO("\tNum of Outbound Encrypt Requests = %" PRIu64,
+ counters.ob_enc_requests);
+ DPAA2_SEC_INFO("\tNum of Inbound Decrypt Requests = %" PRIu64,
+ counters.ib_dec_requests);
+ DPAA2_SEC_INFO("\tNum of Outbound Bytes Encrypted = %" PRIu64,
+ counters.ob_enc_bytes);
+ DPAA2_SEC_INFO("\tNum of Outbound Bytes Protected = %" PRIu64,
+ counters.ob_prot_bytes);
+ DPAA2_SEC_INFO("\tNum of Inbound Bytes Decrypted = %" PRIu64,
+ counters.ib_dec_bytes);
+ DPAA2_SEC_INFO("\tNum of Inbound Bytes Validated = %" PRIu64,
counters.ib_valid_bytes);
}
}
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index c0d3178b71..643921dc02 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -239,9 +239,8 @@ virtio_crypto_send_command(struct virtqueue *vq,
vq->vq_free_cnt++;
}
- VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d\n"
- "vq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
/* get the result */
if (input->status != VIRTIO_CRYPTO_OK) {
@@ -1057,9 +1056,8 @@ virtio_crypto_sym_clear_session(
return;
}
- VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d\n"
- "vq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
VIRTIO_CRYPTO_SESSION_LOG_INFO("Close session %"PRIu64" successfully ",
session->session_id);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index bcbcb56546..d14536e242 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1828,16 +1828,16 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
/* Display the captured P7 phy details */
if (BNXT_LINK_SPEEDS_V2(bp)) {
- PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d\n"
- "Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x\n"
- "Auto_link_speedsv2:%x, Active_lanes:%d",
+ PMD_DRV_LOG_LINE(DEBUG, "Phytype:%d, Media_type:%d, Status: %d, Link Signal:%d",
link_info->phy_type,
link_info->media_type,
link_info->phy_link_status,
- link_info->link_signal_mode,
+ link_info->link_signal_mode);
+ PMD_DRV_LOG_LINE(DEBUG, "Active Fec: %d Support_speeds2:%x, Force_link_speedsv2:%x",
(resp->active_fec_signal_mode &
HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_MASK) >> 4,
- link_info->support_speeds2, link_info->force_link_speeds2,
+ link_info->support_speeds2, link_info->force_link_speeds2);
+ PMD_DRV_LOG_LINE(DEBUG, "Auto_link_speedsv2:%x, Active_lanes:%d",
link_info->auto_link_speeds2,
link_info->active_lanes);
@@ -1850,12 +1850,12 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
desc = ((struct link_speeds2_tbl *)
bnxt_get_hwrm_to_rte_speeds2_entry(link_info->link_speed))->desc;
- PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s\n"
- "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
+ PMD_DRV_LOG_LINE(INFO, "Link Speed: %s %s, Status: %s Signal-mode: %s",
desc,
!(link_info->auto_mode) ? "Forced" : "AutoNegotiated",
link_status_str[link_info->phy_link_status % MAX_LINK_STR],
- signal_mode[link_info->link_signal_mode % MAX_SIG_MODE],
+ signal_mode[link_info->link_signal_mode % MAX_SIG_MODE]);
+ PMD_DRV_LOG_LINE(INFO, "Media type: %s, Xcvr type: %s, Active FEC: %s Lanes: %d",
media_type[link_info->media_type % MAX_MEDIA_TYPE],
bnxt_get_xcvr_type(rte_le_to_cpu_32
(resp->xcvr_identifier_type_tx_lpi_timer)),
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 209cf5a80c..1abc939376 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -79,41 +79,40 @@ bond_print_lacp(struct lacpdu *l)
if (p_len && p_state[p_len-1] == ' ')
p_state[p_len-1] = '\0';
- RTE_BOND_LOG(DEBUG,
- "LACP: {\n"
- " subtype= %02X\n"
- " ver_num=%02X\n"
- " actor={ tlv=%02X, len=%02X\n"
- " pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n"
- " state={ %s }\n"
- " }\n"
- " partner={ tlv=%02X, len=%02X\n"
- " pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n"
- " state={ %s }\n"
- " }\n"
- " collector={info=%02X, length=%02X, max_delay=%04X\n, "
- "type_term=%02X, terminator_length = %02X }",
- l->subtype,
- l->version_number,
+ RTE_BOND_LOG(DEBUG, "LACP: {");
+ RTE_BOND_LOG(DEBUG, " subtype= %02X",
+ l->subtype);
+ RTE_BOND_LOG(DEBUG, " ver_num=%02X",
+ l->version_number);
+ RTE_BOND_LOG(DEBUG, " actor={ tlv=%02X, len=%02X",
l->actor.tlv_type_info,
- l->actor.info_length,
+ l->actor.info_length);
+ RTE_BOND_LOG(DEBUG, " pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X",
l->actor.port_params.system_priority,
a_address,
l->actor.port_params.key,
l->actor.port_params.port_priority,
- l->actor.port_params.port_number,
- a_state,
+ l->actor.port_params.port_number);
+ RTE_BOND_LOG(DEBUG, " state={ %s }",
+ a_state);
+ RTE_BOND_LOG(DEBUG, " }");
+ RTE_BOND_LOG(DEBUG, " partner={ tlv=%02X, len=%02X",
l->partner.tlv_type_info,
- l->partner.info_length,
+ l->partner.info_length);
+ RTE_BOND_LOG(DEBUG, " pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X",
l->partner.port_params.system_priority,
p_address,
l->partner.port_params.key,
l->partner.port_params.port_priority,
- l->partner.port_params.port_number,
- p_state,
+ l->partner.port_params.port_number);
+ RTE_BOND_LOG(DEBUG, " state={ %s }",
+ p_state);
+ RTE_BOND_LOG(DEBUG, " }");
+ RTE_BOND_LOG(DEBUG, " collector={info=%02X, length=%02X, max_delay=%04X, ",
l->tlv_type_collector_info,
l->collector_info_length,
- l->collector_max_delay,
+ l->collector_max_delay);
+ RTE_BOND_LOG(DEBUG, "type_term=%02X, terminator_length = %02X }",
l->tlv_type_terminator,
l->terminator_length);
@@ -205,18 +204,20 @@ show_warnings(uint16_t member_id)
if (warnings & WRN_RX_QUEUE_FULL) {
RTE_BOND_LOG(DEBUG,
- "Member %u: failed to enqueue LACP packet into RX ring.\n"
- "Receive and transmit functions must be invoked on bonding"
- "interface at least 10 times per second or LACP will notwork correctly",
+ "Member %u: failed to enqueue LACP packet into RX ring.",
member_id);
+ RTE_BOND_LOG(DEBUG,
+ "Receive and transmit functions must be invoked on bonding "
+ "interface at least 10 times per second or LACP will notwork correctly");
}
if (warnings & WRN_TX_QUEUE_FULL) {
RTE_BOND_LOG(DEBUG,
- "Member %u: failed to enqueue LACP packet into TX ring.\n"
- "Receive and transmit functions must be invoked on bonding"
- "interface at least 10 times per second or LACP will not work correctly",
+ "Member %u: failed to enqueue LACP packet into TX ring.",
member_id);
+ RTE_BOND_LOG(DEBUG,
+ "Receive and transmit functions must be invoked on bonding "
+ "interface at least 10 times per second or LACP will not work correctly");
}
if (warnings & WRN_RX_MARKER_TO_FAST)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 060b8c678f..51f5422e0c 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1200,11 +1200,12 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];
struct qm_mcc_initfq opts = {0};
- if (dpaa_push_mode_max_queue)
- DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible\n"
- "PUSH mode already enabled for first %d queues.\n"
- "To disable set DPAA_PUSH_QUEUES_NUMBER to 0",
+ if (dpaa_push_mode_max_queue) {
+ DPAA_PMD_WARN("PUSH mode q and EVENTDEV are not compatible");
+ DPAA_PMD_WARN("PUSH mode already enabled for first %d queues.",
dpaa_push_mode_max_queue);
+ DPAA_PMD_WARN("To disable set DPAA_PUSH_QUEUES_NUMBER to 0");
+ }
dpaa_poll_queue_default_config(&opts);
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index e95f45aa3e..2251c624ff 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -564,9 +564,9 @@ mlx4_mr_create_secondary(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
/* Lookup can't fail. */
MLX4_ASSERT(entry->lkey != UINT32_MAX);
rte_rwlock_read_unlock(&priv->mr.rwlock);
- DEBUG("port %u MR CREATED by primary process for %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "), lkey=0x%x",
- dev->data->port_id, (void *)addr,
+ DEBUG("port %u MR CREATED by primary process for %p:",
+ dev->data->port_id, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "), lkey=0x%x",
entry->start, entry->end, entry->lkey);
return entry->lkey;
}
@@ -787,10 +787,10 @@ mlx4_mr_create_primary(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
MLX4_ASSERT((uintptr_t)mr->ibv_mr->addr == data.start);
MLX4_ASSERT(mr->ibv_mr->length == len);
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
- DEBUG("port %u MR CREATED (%p) for %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ DEBUG("port %u MR CREATED (%p) for %p:",
+ dev->data->port_id, (void *)mr, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
" lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
- dev->data->port_id, (void *)mr, (void *)addr,
data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
/* Insert to the global cache table. */
@@ -1251,10 +1251,10 @@ mlx4_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,
mr->ms_bmp_n = 1;
rte_rwlock_write_lock(&priv->mr.rwlock);
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
- DEBUG("port %u MR CREATED (%p) for external memory %p:\n"
- " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ DEBUG("port %u MR CREATED (%p) for external memory %p:",
+ dev->data->port_id, (void *)mr, (void *)addr);
+ DEBUG(" [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
" lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
- dev->data->port_id, (void *)mr, (void *)addr,
addr, addr + len, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
/* Insert to the global cache table. */
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index c802b2c389..3b8d717797 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1389,17 +1389,17 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
rte_free(rxq);
return ret;
}
- PMD_RX_LOG(DEBUG, "Port %d Rx pktbuf configured:\n"
- "\tmbuf_size:\t0x%0x\n"
- "\twqe_skip:\t0x%0x\n"
- "\tfirst_skip:\t0x%0x\n"
- "\tlater_skip:\t0x%0x\n"
- "\tcache_mode:\t%s\n",
- port,
- pktbuf_conf.mbuff_size,
- pktbuf_conf.wqe_skip,
- pktbuf_conf.first_skip,
- pktbuf_conf.later_skip,
+ PMD_RX_LOG(DEBUG, "Port %d Rx pktbuf configured:",
+ port);
+ PMD_RX_LOG(DEBUG, "\tmbuf_size:\t0x%0x",
+ pktbuf_conf.mbuff_size);
+ PMD_RX_LOG(DEBUG, "\twqe_skip:\t0x%0x",
+ pktbuf_conf.wqe_skip);
+ PMD_RX_LOG(DEBUG, "\tfirst_skip:\t0x%0x",
+ pktbuf_conf.first_skip);
+ PMD_RX_LOG(DEBUG, "\tlater_skip:\t0x%0x",
+ pktbuf_conf.later_skip);
+ PMD_RX_LOG(DEBUG, "\tcache_mode:\t%s",
(pktbuf_conf.cache_mode ==
PKI_OPC_MODE_STT) ?
"STT" :
diff --git a/drivers/net/virtio/virtio_cvq.c b/drivers/net/virtio/virtio_cvq.c
index 5e457f5fd0..657b0692b2 100644
--- a/drivers/net/virtio/virtio_cvq.c
+++ b/drivers/net/virtio/virtio_cvq.c
@@ -92,16 +92,11 @@ virtio_send_command_packed(struct virtnet_ctl *cvq,
vq->vq_packed.used_wrap_counter ^= 1;
}
- PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d\n"
- "vq->vq_avail_idx=%d\n"
- "vq->vq_used_cons_idx=%d\n"
- "vq->vq_packed.cached_flags=0x%x\n"
- "vq->vq_packed.used_wrap_counter=%d",
- vq->vq_free_cnt,
- vq->vq_avail_idx,
- vq->vq_used_cons_idx,
- vq->vq_packed.cached_flags,
- vq->vq_packed.used_wrap_counter);
+ PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ PMD_INIT_LOG(DEBUG, "vq->vq_avail_idx=%d", vq->vq_avail_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_used_cons_idx=%d", vq->vq_used_cons_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_packed.cached_flags=0x%x", vq->vq_packed.cached_flags);
+ PMD_INIT_LOG(DEBUG, "vq->vq_packed.used_wrap_counter=%d", vq->vq_packed.used_wrap_counter);
result = cvq->hdr_mz->addr;
return result;
@@ -183,8 +178,8 @@ virtio_send_command_split(struct virtnet_ctl *cvq,
vq->vq_free_cnt++;
}
- PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d\nvq->vq_desc_head_idx=%d",
- vq->vq_free_cnt, vq->vq_desc_head_idx);
+ PMD_INIT_LOG(DEBUG, "vq->vq_free_cnt=%d", vq->vq_free_cnt);
+ PMD_INIT_LOG(DEBUG, "vq->vq_desc_head_idx=%d", vq->vq_desc_head_idx);
result = cvq->hdr_mz->addr;
return result;
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index e8642be86b..2997d2bd26 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -1197,21 +1197,21 @@ virtio_user_dev_update_status(struct virtio_user_dev *dev)
ret = dev->ops->get_status(dev, &status);
if (!ret) {
dev->status = status;
- PMD_INIT_LOG(DEBUG, "Updated Device Status(0x%08x):\n"
- "\t-RESET: %u\n"
- "\t-ACKNOWLEDGE: %u\n"
- "\t-DRIVER: %u\n"
- "\t-DRIVER_OK: %u\n"
- "\t-FEATURES_OK: %u\n"
- "\t-DEVICE_NEED_RESET: %u\n"
- "\t-FAILED: %u",
- dev->status,
- (dev->status == VIRTIO_CONFIG_STATUS_RESET),
- !!(dev->status & VIRTIO_CONFIG_STATUS_ACK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_FEATURES_OK),
- !!(dev->status & VIRTIO_CONFIG_STATUS_DEV_NEED_RESET),
+ PMD_INIT_LOG(DEBUG, "Updated Device Status(0x%08x):",
+ dev->status);
+ PMD_INIT_LOG(DEBUG, "\t-RESET: %u",
+ (dev->status == VIRTIO_CONFIG_STATUS_RESET));
+ PMD_INIT_LOG(DEBUG, "\t-ACKNOWLEDGE: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_ACK));
+ PMD_INIT_LOG(DEBUG, "\t-DRIVER: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER));
+ PMD_INIT_LOG(DEBUG, "\t-DRIVER_OK: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DRIVER_OK));
+ PMD_INIT_LOG(DEBUG, "\t-FEATURES_OK: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_FEATURES_OK));
+ PMD_INIT_LOG(DEBUG, "\t-DEVICE_NEED_RESET: %u",
+ !!(dev->status & VIRTIO_CONFIG_STATUS_DEV_NEED_RESET));
+ PMD_INIT_LOG(DEBUG, "\t-FAILED: %u",
!!(dev->status & VIRTIO_CONFIG_STATUS_FAILED));
} else if (ret != -ENOTSUP) {
PMD_INIT_LOG(ERR, "(%s) Failed to get backend status", dev->path);
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index 57f77297a8..0c26cfbbe6 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -332,7 +332,7 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv,
return 0;
if (!pci_dev->mem_resource[0].addr) {
- CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p\n BAR2 %p",
+ CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p BAR2 %p",
pci_dev->mem_resource[0].addr, pci_dev->mem_resource[2].addr);
return -ENODEV;
}
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (11 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 12/14] drivers: split multilines log messages David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
` (3 subsequent siblings)
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev; +Cc: Vamsi Attunuru
In the next commit, a (unrelated) change will be done on the logging
macros in this driver.
After this change, compilation with O3 fails with the following warning:
../drivers/net/octeon_ep/otx_ep_ethdev.c: In function
‘otx_ep_dev_mtu_set’:
../drivers/net/octeon_ep/otx_ep_ethdev.c:200:12: error: ‘devinfo.max_mtu’
may be used uninitialized [-Werror=maybe-uninitialized]
200 | if (mtu > devinfo.max_mtu) {
| ^
../drivers/net/octeon_ep/otx_ep_ethdev.c:186:33: note: ‘devinfo.max_mtu’
was declared here
186 | struct rte_eth_dev_info devinfo;
| ^~~~~~~
cc1: all warnings being treated as errors
The devinfo object is passed through otx_ep_dev_info_get() which
initializes devinfo.max_mtu and returns 0.
This return code is checked at line 189 and so devinfo.max_mtu is
supposed to be initialized at this point.
This seems like a compiler optimisation bug, but we will have to live
with it.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/octeon_ep/otx_ep_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/octeon_ep/otx_ep_ethdev.c b/drivers/net/octeon_ep/otx_ep_ethdev.c
index c4a5a67c79..adc19c72b0 100644
--- a/drivers/net/octeon_ep/otx_ep_ethdev.c
+++ b/drivers/net/octeon_ep/otx_ep_ethdev.c
@@ -186,6 +186,7 @@ otx_ep_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
struct rte_eth_dev_info devinfo;
int32_t ret = 0;
+ memset(&devinfo, 0, sizeof(devinfo));
if (otx_ep_dev_info_get(eth_dev, &devinfo)) {
otx_ep_err("Cannot set MTU to %u: failed to get device info", mtu);
return -EPERM;
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* [PATCH v2 14/14] drivers: use per line logging in helpers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (12 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable David Marchand
@ 2024-09-12 8:26 ` David Marchand
2024-10-01 12:10 ` Thomas Monjalon
2024-09-16 9:32 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (2 subsequent siblings)
16 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-09-12 8:26 UTC (permalink / raw)
To: dev
Cc: Chengwen Feng, Andrew Rybchenko, Thomas Monjalon,
Nicolas Chautru, Gagandeep Singh, Hemant Agrawal, Parav Pandit,
Xueming Li, Nipun Gupta, Nikhil Agarwal, Sachin Saxena, Rosen Xu,
Tomasz Duszynski, Long Li, Wei Hu, Nithin Dabilpuram,
Kiran Kumar K, Sunil Kumar Kori, Satha Rao, Harman Kalra,
Anoob Joseph, Jingjing Wu, Chaoyong He, Nagadheeraj Rottela,
Srikanth Jampala, Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang,
Ashish Gupta, Zhangfei Gao, Sunila Sahu, Jack Bond-Preston,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Sunil Uttarwar,
Michael Shamis, Liron Himi, Jay Zhou, Bruce Richardson,
Kevin Laatz, Conor Walsh, Gowrishankar Muthukrishnan,
Vidya Sagar Velumuri, Abdullah Sevincer, Mattias Rönnblom,
Jerin Jacob, Pavan Nikhilesh, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, John W. Linville, Ciara Loftus,
Maryam Tahhan, Igor Russkikh, Steven Webster, Matt Peters,
Selwin Sebastian, Julien Aube, Somnath Kotur, Wathsala Vithanage,
Konstantin Ananyev, Chas Williams, Min Hu (Connor),
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
Changes since v1:
- when possible, used RTE_LOG_LINE_PREFIX,
- used __VA_ARGS__ to avoid adding more gcc specific variadic
arguments,
- added changes to event/dlb2 and net/bonding,
---
devtools/checkpatches.sh | 11 +++-
drivers/baseband/acc/acc100_pmd.h | 12 ++--
drivers/baseband/acc/acc_common.h | 6 +-
drivers/baseband/acc/rte_acc100_pmd.c | 1 +
drivers/baseband/acc/rte_vrb_pmd.c | 1 +
drivers/baseband/acc/vrb_pmd.h | 12 ++--
.../baseband/fpga_5gnr_fec/fpga_5gnr_fec.h | 15 ++---
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 13 ++--
.../baseband/la12xx/bbdev_la12xx_pmd_logs.h | 16 +++--
drivers/baseband/null/bbdev_null.c | 5 +-
.../baseband/turbo_sw/bbdev_turbo_software.c | 6 +-
drivers/bus/auxiliary/private.h | 5 +-
drivers/bus/cdx/cdx_logs.h | 11 ++--
drivers/bus/dpaa/include/fman.h | 3 +-
drivers/bus/dpaa/rte_dpaa_logs.h | 10 ++--
drivers/bus/fslmc/fslmc_logs.h | 11 ++--
drivers/bus/ifpga/ifpga_logs.h | 6 +-
drivers/bus/platform/private.h | 3 +-
drivers/bus/uacce/uacce.c | 6 +-
drivers/bus/vdev/vdev_logs.h | 6 +-
drivers/bus/vmbus/private.h | 6 +-
drivers/common/cnxk/roc_platform.h | 46 +++++++++-----
drivers/common/cpt/cpt_pmd_logs.h | 41 +++++++------
drivers/common/dpaax/dpaax_logs.h | 10 ++--
drivers/common/idpf/idpf_common_logs.h | 29 ++-------
drivers/common/nfp/nfp_common_log.h | 6 +-
drivers/common/nitrox/nitrox_logs.h | 4 +-
drivers/common/octeontx/octeontx_mbox.h | 7 ++-
drivers/common/qat/qat_logs.h | 12 ++--
drivers/common/sfc_efx/sfc_efx_log.h | 5 +-
.../compress/isal/isal_compress_pmd_private.h | 6 +-
drivers/compress/octeontx/otx_zip.h | 7 +--
.../compress/uadk/uadk_compress_pmd_private.h | 8 +--
drivers/compress/zlib/zlib_pmd_private.h | 6 +-
drivers/crypto/armv8/armv8_pmd_private.h | 29 ++++-----
drivers/crypto/bcmfs/bcmfs_logs.h | 12 ++--
drivers/crypto/caam_jr/caam_jr_log.h | 14 ++---
drivers/crypto/ccp/ccp_pmd_private.h | 19 +++---
drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 14 ++---
drivers/crypto/dpaa_sec/dpaa_sec_log.h | 14 ++---
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 ++-
drivers/crypto/mvsam/mrvl_pmd_private.h | 8 +--
drivers/crypto/null/null_crypto_pmd_private.h | 8 +--
drivers/crypto/openssl/openssl_pmd_private.h | 8 +--
.../crypto/scheduler/scheduler_pmd_private.h | 7 ++-
drivers/crypto/uadk/uadk_crypto_pmd_private.h | 8 +--
drivers/crypto/virtio/virtio_logs.h | 36 +++++------
drivers/dma/dpaa/dpaa_qdma_logs.h | 14 ++---
drivers/dma/dpaa2/dpaa2_qdma_logs.h | 14 ++---
drivers/dma/hisilicon/hisi_dmadev.c | 29 +++++----
drivers/dma/idxd/idxd_internal.h | 5 +-
drivers/dma/ioat/ioat_internal.h | 5 +-
drivers/dma/odm/odm.h | 9 ++-
drivers/dma/skeleton/skeleton_dmadev.c | 6 +-
drivers/event/dlb2/dlb2_log.h | 8 +--
drivers/event/dpaa/dpaa_eventdev.c | 1 +
drivers/event/dpaa/dpaa_eventdev.h | 5 +-
drivers/event/dpaa2/dpaa2_eventdev_logs.h | 11 ++--
drivers/event/dsw/dsw_evdev.h | 2 +-
drivers/event/octeontx/ssovf_evdev.h | 8 +--
drivers/event/octeontx/timvf_evdev.h | 8 +--
drivers/event/opdl/opdl_log.h | 11 +---
drivers/event/skeleton/skeleton_eventdev.h | 13 ++--
drivers/event/sw/sw_evdev_log.h | 6 +-
drivers/gpu/cuda/common.h | 3 +-
drivers/mempool/dpaa/dpaa_mempool.h | 5 +-
drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h | 10 ++--
drivers/mempool/octeontx/octeontx_pool_logs.h | 7 ++-
drivers/net/af_packet/rte_eth_af_packet.c | 12 ++--
drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +-
drivers/net/atlantic/atl_logs.h | 22 +++----
drivers/net/avp/avp_logs.h | 12 ++--
drivers/net/axgbe/axgbe_logs.h | 10 ++--
drivers/net/bnx2x/bnx2x_logs.h | 42 ++++++-------
drivers/net/bnxt/bnxt.h | 4 +-
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 4 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 4 +-
drivers/net/bnxt/bnxt_txr.c | 4 +-
drivers/net/bonding/eth_bond_private.h | 6 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 9 ++-
drivers/net/bonding/rte_eth_bond_pmd.c | 4 +-
drivers/net/cpfl/cpfl_logs.h | 16 ++---
drivers/net/dpaa/dpaa_ethdev.h | 9 ++-
drivers/net/dpaa2/dpaa2_pmd_logs.h | 16 +++--
drivers/net/dpaa2/dpaa2_rxtx.c | 30 +++++-----
drivers/net/e1000/e1000_logs.h | 26 ++++----
drivers/net/ena/ena_logs.h | 16 ++---
drivers/net/ena/ena_platform.h | 2 +-
drivers/net/enetc/enetc_logs.h | 16 +++--
drivers/net/enetfec/enet_pmd_logs.h | 11 ++--
drivers/net/enic/enic_compat.h | 6 +-
drivers/net/failsafe/failsafe_private.h | 7 +--
drivers/net/fm10k/fm10k_logs.h | 26 ++++----
drivers/net/gve/gve_logs.h | 6 +-
drivers/net/hinic/base/hinic_compat.h | 9 +--
drivers/net/hns3/hns3_logs.h | 41 +++++++------
drivers/net/i40e/i40e_logs.h | 26 ++++----
drivers/net/iavf/iavf_log.h | 31 +++++-----
drivers/net/ice/ice_logs.h | 26 ++++----
drivers/net/idpf/idpf_logs.h | 21 ++-----
drivers/net/igc/igc_logs.h | 20 +++----
drivers/net/ipn3ke/ipn3ke_logs.h | 6 +-
drivers/net/ixgbe/ixgbe_logs.h | 26 ++++----
drivers/net/mana/mana.h | 15 +++--
drivers/net/memif/rte_eth_memif.h | 6 +-
drivers/net/mlx4/mlx4_utils.h | 15 ++---
drivers/net/mvneta/mvneta_ethdev.h | 6 +-
drivers/net/mvpp2/mrvl_ethdev.h | 6 +-
drivers/net/netvsc/hn_logs.h | 26 ++++----
drivers/net/netvsc/hn_rndis.c | 60 +++++++++----------
drivers/net/nfb/nfb.h | 6 +-
drivers/net/nfp/nfp_logs.h | 34 +++++------
drivers/net/ngbe/ngbe_logs.h | 28 ++++-----
drivers/net/null/rte_eth_null.c | 6 +-
drivers/net/octeon_ep/otx_ep_common.h | 25 ++++----
drivers/net/octeon_ep/otx_ep_rxtx.c | 4 +-
drivers/net/octeontx/octeontx_logs.h | 21 ++++---
drivers/net/pcap/pcap_osdep.h | 6 +-
drivers/net/pfe/pfe_logs.h | 11 ++--
drivers/net/ring/rte_eth_ring.c | 6 +-
drivers/net/softnic/rte_eth_softnic.c | 6 +-
drivers/net/tap/tap_log.h | 6 +-
drivers/net/thunderx/nicvf_logs.h | 18 +++---
drivers/net/txgbe/txgbe_logs.h | 37 ++++++------
drivers/net/vdev_netvsc/vdev_netvsc.c | 7 +--
drivers/net/vhost/rte_eth_vhost.c | 3 +-
drivers/net/virtio/virtio_logs.h | 23 ++++---
drivers/net/vmxnet3/vmxnet3_logs.h | 29 +++++----
drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 6 +-
drivers/raw/cnxk_gpio/cnxk_gpio.h | 5 +-
drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 14 ++---
drivers/raw/ifpga/ifpga_rawdev.h | 6 +-
drivers/raw/ntb/ntb.h | 6 +-
drivers/raw/skeleton/skeleton_rawdev.h | 6 +-
drivers/raw/skeleton/skeleton_rawdev_test.c | 5 +-
drivers/vdpa/ifc/base/ifcvf.c | 10 ++--
drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +-
drivers/vdpa/nfp/nfp_vdpa_log.h | 12 ++--
138 files changed, 824 insertions(+), 908 deletions(-)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 8f245ebdab..0ab841bd5a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -53,7 +53,7 @@ print_usage () {
check_forbidden_additions() { # <patch>
res=0
- # refrain from new calls to RTE_LOG
+ # refrain from new calls to RTE_LOG in libraries
awk -v FOLDERS="lib" \
-v EXPRESSIONS="RTE_LOG\\\(" \
-v RET_ON_FAIL=1 \
@@ -61,6 +61,15 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # refrain from new calls to RTE_LOG in drivers (but leave some leeway for base drivers)
+ awk -v FOLDERS="drivers" \
+ -v SKIP_FILES='osdep.h$' \
+ -v EXPRESSIONS="RTE_LOG\\\( RTE_LOG_DP\\\( rte_log\\\(" \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Prefer RTE_LOG_LINE/RTE_LOG_DP_LINE' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# no output on stdout or stderr
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="\\\<printf\\\> \\\<fprintf\\\(stdout, \\\<fprintf\\\(stderr," \
diff --git a/drivers/baseband/acc/acc100_pmd.h b/drivers/baseband/acc/acc100_pmd.h
index aff1ef89f2..976593698e 100644
--- a/drivers/baseband/acc/acc100_pmd.h
+++ b/drivers/baseband/acc/acc100_pmd.h
@@ -11,16 +11,14 @@
#include "acc_common.h"
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, acc100_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, ACC100, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "acc100_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* ACC100 PF and VF driver names */
diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index e249f37e38..f8afa46e91 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -151,11 +151,11 @@
#define ACC_MAX_FFT_WIN 16
extern int acc_common_logtype;
+#define RTE_LOGTYPE_ACC_COMMON acc_common_logtype
/* Helper macro for logging */
-#define rte_acc_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, acc_common_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_acc_log(level, ...) \
+ RTE_LOG_LINE(level, ACC_COMMON, __VA_ARGS__)
/* ACC100 DMA Descriptor triplet */
struct acc_dma_triplet {
diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c
index 5c91acab7e..2d021710a7 100644
--- a/drivers/baseband/acc/rte_acc100_pmd.c
+++ b/drivers/baseband/acc/rte_acc100_pmd.c
@@ -30,6 +30,7 @@ RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, DEBUG);
#else
RTE_LOG_REGISTER_SUFFIX(acc100_logtype, acc100, NOTICE);
#endif
+#define RTE_LOGTYPE_ACC100 acc100_logtype
/* Calculate the offset of the enqueue register */
static inline uint32_t
diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index fad984ccc1..88075df8b4 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -26,6 +26,7 @@ RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, DEBUG);
#else
RTE_LOG_REGISTER_SUFFIX(vrb_logtype, vrb, NOTICE);
#endif
+#define RTE_LOGTYPE_VRB vrb_logtype
/* Calculate the offset of the enqueue register. */
static inline uint32_t
diff --git a/drivers/baseband/acc/vrb_pmd.h b/drivers/baseband/acc/vrb_pmd.h
index 0371db9972..a4b81640e8 100644
--- a/drivers/baseband/acc/vrb_pmd.h
+++ b/drivers/baseband/acc/vrb_pmd.h
@@ -13,16 +13,14 @@
#include "vrb_cfg.h"
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, vrb_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, VRB, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "vrb_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* VRB1 PF and VF driver names */
diff --git a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
index 2246849025..10a19e4dec 100644
--- a/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
+++ b/drivers/baseband/fpga_5gnr_fec/fpga_5gnr_fec.h
@@ -11,17 +11,18 @@
#include "agx100_pmd.h"
#include "vc_5gnr_pmd.h"
+extern int fpga_5gnr_fec_logtype;
+#define RTE_LOGTYPE_FPGA_5GNR_FEC fpga_5gnr_fec_logtype
+
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, fpga_5gnr_fec_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, FPGA_5GNR_FEC, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "fpga_5gnr_fec: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* FPGA 5GNR FEC driver names */
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index d9373a072d..eaffc35142 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -25,18 +25,17 @@ RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, DEBUG);
#else
RTE_LOG_REGISTER_DEFAULT(fpga_lte_fec_logtype, NOTICE);
#endif
+#define RTE_LOGTYPE_FPGA_LTE_FEC fpga_lte_fec_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, fpga_lte_fec_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, FPGA_LTE_FEC, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "fpga_lte_fec: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
/* FPGA LTE FEC driver names */
diff --git a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
index 49c8d35d10..db935fb7f3 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
+++ b/drivers/baseband/la12xx/bbdev_la12xx_pmd_logs.h
@@ -8,22 +8,20 @@
extern int bbdev_la12xx_logtype;
#define RTE_LOGTYPE_BBDEV_LA12XX bbdev_la12xx_logtype
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_la12xx_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_LA12XX, __VA_ARGS__)
#ifdef RTE_LIBRTE_BBDEV_DEBUG
-#define rte_bbdev_log_debug(fmt, ...) \
- rte_bbdev_log(DEBUG, "la12xx_pmd: " fmt, \
- ##__VA_ARGS__)
+#define rte_bbdev_log_debug(...) \
+ rte_bbdev_log(DEBUG, __VA_ARGS__)
#else
-#define rte_bbdev_log_debug(fmt, ...)
+#define rte_bbdev_log_debug(...)
#endif
#define PMD_INIT_FUNC_TRACE() rte_bbdev_log_debug(">>")
/* DP Logs, toggled out at compile time if level lower than current level */
-#define rte_bbdev_dp_log(level, fmt, args...) \
- RTE_LOG_DP(level, BBDEV_LA12XX, fmt, ## args)
+#define rte_bbdev_dp_log(level, ...) \
+ RTE_LOG_DP_LINE(level, BBDEV_LA12XX, __VA_ARGS__)
#endif /* _BBDEV_LA12XX_PMD_LOGS_H_ */
diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c
index 75f78993fa..dab416aa41 100644
--- a/drivers/baseband/null/bbdev_null.c
+++ b/drivers/baseband/null/bbdev_null.c
@@ -17,10 +17,11 @@
#define DRIVER_NAME baseband_null
RTE_LOG_REGISTER_DEFAULT(bbdev_null_logtype, NOTICE);
+#define RTE_LOGTYPE_BBDEV_NULL bbdev_null_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_null_logtype, fmt "\n", ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_NULL, __VA_ARGS__)
#define rte_bbdev_log_debug(fmt, ...) \
rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 1f661dd801..e527008524 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -37,11 +37,11 @@
#define DRIVER_NAME baseband_turbo_sw
RTE_LOG_REGISTER_DEFAULT(bbdev_turbo_sw_logtype, NOTICE);
+#define RTE_LOGTYPE_BBDEV_TURBO_SW bbdev_turbo_sw_logtype
/* Helper macro for logging */
-#define rte_bbdev_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, bbdev_turbo_sw_logtype, fmt "\n", \
- ##__VA_ARGS__)
+#define rte_bbdev_log(level, ...) \
+ RTE_LOG_LINE(level, BBDEV_TURBO_SW, __VA_ARGS__)
#define rte_bbdev_log_debug(fmt, ...) \
rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/bus/auxiliary/private.h b/drivers/bus/auxiliary/private.h
index 3dee13e1d1..4604f6f4a7 100644
--- a/drivers/bus/auxiliary/private.h
+++ b/drivers/bus/auxiliary/private.h
@@ -14,11 +14,10 @@
#include "bus_auxiliary_driver.h"
extern int auxiliary_bus_logtype;
+#define RTE_LOGTYPE_AUXILIARY_BUS auxiliary_bus_logtype
#define AUXILIARY_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, auxiliary_bus_logtype, \
- RTE_FMT("auxiliary bus: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, AUXILIARY_BUS, __VA_ARGS__)
/*
* Structure describing the auxiliary bus
diff --git a/drivers/bus/cdx/cdx_logs.h b/drivers/bus/cdx/cdx_logs.h
index 0ec39e9dd4..18b4010746 100644
--- a/drivers/bus/cdx/cdx_logs.h
+++ b/drivers/bus/cdx/cdx_logs.h
@@ -6,15 +6,14 @@
#define CDX_LOGS_H
extern int cdx_logtype_bus;
+#define RTE_LOGTYPE_CDX_BUS cdx_logtype_bus
-#define CDX_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cdx_logtype_bus, "cdx: " fmt "\n", \
- ##args)
+#define CDX_BUS_LOG(level, ...) \
+ RTE_LOG_LINE(level, CDX_BUS, __VA_ARGS__)
/* Debug logs with Function names */
-#define CDX_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, cdx_logtype_bus, "cdx: %s(): " fmt "\n", \
- __func__, ##args)
+#define CDX_BUS_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, CDX_BUS, "%s(): ", __func__, __VA_ARGS__)
#define CDX_BUS_INFO(fmt, args...) \
CDX_BUS_LOG(INFO, fmt, ## args)
diff --git a/drivers/bus/dpaa/include/fman.h b/drivers/bus/dpaa/include/fman.h
index 19f6132bba..f918836ec2 100644
--- a/drivers/bus/dpaa/include/fman.h
+++ b/drivers/bus/dpaa/include/fman.h
@@ -403,8 +403,7 @@ extern int fman_ccsr_map_fd;
#define FMAN_ERR(rc, fmt, args...) \
do { \
_errno = (rc); \
- rte_log(RTE_LOG_ERR, dpaa_logtype_bus, "dpaa: " fmt "(%d)\n", \
- ##args, errno); \
+ RTE_LOG_LINE(ERR, DPAA_BUS, fmt "(%d)", ##args, errno); \
} while (0)
#define FMAN_IP_REV_1 0xC30C4
diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h
index 149b127434..1e61b4e76b 100644
--- a/drivers/bus/dpaa/rte_dpaa_logs.h
+++ b/drivers/bus/dpaa/rte_dpaa_logs.h
@@ -10,9 +10,10 @@
#include <rte_log.h>
extern int dpaa_logtype_bus;
+#define RTE_LOGTYPE_DPAA_BUS dpaa_logtype_bus
-#define DPAA_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "dpaa: " fmt "\n", ##args)
+#define DPAA_BUS_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA_BUS, __VA_ARGS__)
#ifdef RTE_LIBRTE_DPAA_DEBUG_BUS
#define DPAA_BUS_HWWARN(cond, fmt, args...) \
@@ -24,9 +25,8 @@ extern int dpaa_logtype_bus;
#define DPAA_BUS_HWWARN(cond, fmt, args...) do { } while (0)
#endif
-#define DPAA_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_logtype_bus, "dpaa: %s(): " fmt "\n", \
- __func__, ##args)
+#define DPAA_BUS_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA_BUS, "%s(): ", __func__, __VA_ARGS__)
#define BUS_INIT_FUNC_TRACE() DPAA_BUS_DEBUG(" >>")
diff --git a/drivers/bus/fslmc/fslmc_logs.h b/drivers/bus/fslmc/fslmc_logs.h
index e15c603426..ac0cd3dc29 100644
--- a/drivers/bus/fslmc/fslmc_logs.h
+++ b/drivers/bus/fslmc/fslmc_logs.h
@@ -8,15 +8,14 @@
#define _FSLMC_LOGS_H_
extern int dpaa2_logtype_bus;
+#define RTE_LOGTYPE_DPAA2_BUS dpaa2_logtype_bus
-#define DPAA2_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_bus, "fslmc: " fmt "\n", \
- ##args)
+#define DPAA2_BUS_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_BUS, __VA_ARGS__)
/* Debug logs are with Function names */
-#define DPAA2_BUS_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
- __func__, ##args)
+#define DPAA2_BUS_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_BUS, "%s(): ", __func__, __VA_ARGS__)
#define DPAA2_BUS_INFO(fmt, args...) \
DPAA2_BUS_LOG(INFO, fmt, ## args)
diff --git a/drivers/bus/ifpga/ifpga_logs.h b/drivers/bus/ifpga/ifpga_logs.h
index 248bccba5d..154405a590 100644
--- a/drivers/bus/ifpga/ifpga_logs.h
+++ b/drivers/bus/ifpga/ifpga_logs.h
@@ -8,10 +8,10 @@
#include <rte_log.h>
extern int ifpga_bus_logtype;
+#define RTE_LOGTYPE_IFPGA_BUS ifpga_bus_logtype
-#define IFPGA_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define IFPGA_BUS_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IFPGA_BUS, "%s(): ", __func__, __VA_ARGS__)
#define IFPGA_BUS_FUNC_TRACE() IFPGA_BUS_LOG(DEBUG, ">>")
diff --git a/drivers/bus/platform/private.h b/drivers/bus/platform/private.h
index 72185aa457..d89ba0e4a5 100644
--- a/drivers/bus/platform/private.h
+++ b/drivers/bus/platform/private.h
@@ -35,8 +35,7 @@ struct rte_platform_bus {
extern int platform_bus_logtype;
#define RTE_LOGTYPE_PLATFORM_BUS platform_bus_logtype
#define PLATFORM_LOG_LINE(level, ...) \
- RTE_LOG(level, PLATFORM_BUS, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, PLATFORM_BUS, __VA_ARGS__)
/*
* Iterate registered platform devices and find one that matches provided string.
diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
index 8b666c4e30..c1529c38c0 100644
--- a/drivers/bus/uacce/uacce.c
+++ b/drivers/bus/uacce/uacce.c
@@ -59,9 +59,9 @@ static const char *const uacce_params_keys[] = {
RTE_TAILQ_FOREACH(p, &uacce_bus.driver_list, next)
extern int uacce_bus_logtype;
-#define UACCE_BUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, uacce_bus_logtype, "uacce: " fmt "\n", \
- ##args)
+#define RTE_LOGTYPE_UACCE_BUS uacce_bus_logtype
+#define UACCE_BUS_LOG(level, ...) \
+ RTE_LOG_LINE(level, UACCE_BUS, __VA_ARGS__)
#define UACCE_BUS_ERR(fmt, args...) UACCE_BUS_LOG(ERR, fmt, ##args)
#define UACCE_BUS_WARN(fmt, args...) UACCE_BUS_LOG(WARNING, fmt, ##args)
#define UACCE_BUS_INFO(fmt, args...) UACCE_BUS_LOG(INFO, fmt, ##args)
diff --git a/drivers/bus/vdev/vdev_logs.h b/drivers/bus/vdev/vdev_logs.h
index 8759374193..38859ae4b7 100644
--- a/drivers/bus/vdev/vdev_logs.h
+++ b/drivers/bus/vdev/vdev_logs.h
@@ -8,9 +8,9 @@
#include <rte_log.h>
extern int vdev_logtype_bus;
+#define RTE_LOGTYPE_VDEV_BUS vdev_logtype_bus
-#define VDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vdev_logtype_bus, "%s(): " fmt "\n", \
- __func__, ##args)
+#define VDEV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VDEV_BUS, "%s(): ", __func__, __VA_ARGS__)
#endif /* _VDEV_LOGS_H_ */
diff --git a/drivers/bus/vmbus/private.h b/drivers/bus/vmbus/private.h
index e33424675c..abee1b29f0 100644
--- a/drivers/bus/vmbus/private.h
+++ b/drivers/bus/vmbus/private.h
@@ -34,9 +34,9 @@ extern struct rte_vmbus_bus rte_vmbus_bus;
RTE_TAILQ_FOREACH(p, &(rte_vmbus_bus.driver_list), next)
extern int vmbus_logtype_bus;
-#define VMBUS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmbus_logtype_bus, "%s(): " fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_VMBUS_BUS vmbus_logtype_bus
+#define VMBUS_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMBUS_BUS, "%s(): ", __func__, __VA_ARGS__)
struct vmbus_br {
struct vmbus_bufring *vbr;
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 658bafb935..6944e72669 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -260,37 +260,50 @@ plt_thread_is_valid(plt_thread_t thr)
/* Log */
extern int cnxk_logtype_base;
+#define RTE_LOGTYPE_base cnxk_logtype_base
extern int cnxk_logtype_mbox;
+#define RTE_LOGTYPE_mbox cnxk_logtype_mbox
extern int cnxk_logtype_cpt;
+#define RTE_LOGTYPE_cpt cnxk_logtype_cpt
extern int cnxk_logtype_ml;
+#define RTE_LOGTYPE_ml cnxk_logtype_ml
extern int cnxk_logtype_npa;
+#define RTE_LOGTYPE_npa cnxk_logtype_npa
extern int cnxk_logtype_nix;
+#define RTE_LOGTYPE_nix cnxk_logtype_nix
extern int cnxk_logtype_npc;
+#define RTE_LOGTYPE_npc cnxk_logtype_npc
extern int cnxk_logtype_sso;
+#define RTE_LOGTYPE_sso cnxk_logtype_sso
extern int cnxk_logtype_tim;
+#define RTE_LOGTYPE_tim cnxk_logtype_tim
extern int cnxk_logtype_tm;
+#define RTE_LOGTYPE_tm cnxk_logtype_tm
extern int cnxk_logtype_ree;
+#define RTE_LOGTYPE_ree cnxk_logtype_ree
extern int cnxk_logtype_dpi;
+#define RTE_LOGTYPE_dpi cnxk_logtype_dpi
extern int cnxk_logtype_rep;
+#define RTE_LOGTYPE_rep cnxk_logtype_rep
extern int cnxk_logtype_esw;
+#define RTE_LOGTYPE_esw cnxk_logtype_esw
#define RTE_LOGTYPE_CNXK cnxk_logtype_base
-#define plt_err(fmt, args...) \
- RTE_LOG(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
-#define plt_info(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
-#define plt_warn(fmt, args...) RTE_LOG(WARNING, CNXK, fmt "\n", ##args)
-#define plt_print(fmt, args...) RTE_LOG(INFO, CNXK, fmt "\n", ##args)
+#define plt_err(...) \
+ RTE_LOG_LINE_PREFIX(ERR, CNXK, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
+#define plt_info(...) RTE_LOG_LINE(INFO, CNXK, __VA_ARGS__)
+#define plt_warn(...) RTE_LOG_LINE(WARNING, CNXK, __VA_ARGS__)
+#define plt_print(...) RTE_LOG_LINE(INFO, CNXK, __VA_ARGS__)
#define plt_dump(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
#define plt_dump_no_nl(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
/**
* Log debug message if given subsystem logging is enabled.
*/
-#define plt_dbg(subsystem, fmt, args...) \
- rte_log(RTE_LOG_DEBUG, cnxk_logtype_##subsystem, \
- "[%s] %s():%u " fmt "\n", #subsystem, __func__, __LINE__, \
-##args)
+#define plt_dbg(subsystem, ...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, subsystem, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, \
+ __VA_ARGS__)
#define plt_base_dbg(fmt, ...) plt_dbg(base, fmt, ##__VA_ARGS__)
#define plt_cpt_dbg(fmt, ...) plt_dbg(cpt, fmt, ##__VA_ARGS__)
@@ -308,12 +321,15 @@ extern int cnxk_logtype_esw;
#define plt_esw_dbg(fmt, ...) plt_dbg(esw, fmt, ##__VA_ARGS__)
/* Datapath logs */
-#define plt_dp_err(fmt, args...) \
- RTE_LOG_DP(ERR, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
-#define plt_dp_info(fmt, args...) \
- RTE_LOG_DP(INFO, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
-#define plt_dp_dbg(fmt, args...) \
- RTE_LOG_DP(DEBUG, CNXK, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
+#define plt_dp_err(...) \
+ RTE_LOG_DP_LINE_PREFIX(ERR, CNXK, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, \
+ __VA_ARGS__)
+#define plt_dp_info(...) \
+ RTE_LOG_DP_LINE_PREFIX(INFO, CNXK, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, \
+ __VA_ARGS__)
+#define plt_dp_dbg(...) \
+ RTE_LOG_DP_LINE_PREFIX(DEBUG, CNXK, "%s():%u ", __func__ RTE_LOG_COMMA __LINE__, \
+ __VA_ARGS__)
#ifdef __cplusplus
#define CNXK_PCI_ID(subsystem_dev, dev) \
diff --git a/drivers/common/cpt/cpt_pmd_logs.h b/drivers/common/cpt/cpt_pmd_logs.h
index 3c109c1983..20eb8d63ed 100644
--- a/drivers/common/cpt/cpt_pmd_logs.h
+++ b/drivers/common/cpt/cpt_pmd_logs.h
@@ -17,32 +17,31 @@
*/
#define RTE_LOGTYPE_CPT CPT_LOGTYPE
-#define CPT_PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, CPT_LOGTYPE, \
- "cpt: %s(): " fmt "\n", __func__, ##args)
+#define CPT_PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, CPT, "%s(): ", __func__, __VA_ARGS__)
-#define CPT_PMD_INIT_FUNC_TRACE() CPT_PMD_DRV_LOG_RAW(DEBUG, " >>")
+#define CPT_PMD_INIT_FUNC_TRACE() CPT_PMD_DRV_LOG(DEBUG, " >>")
-#define CPT_LOG_INFO(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(INFO, fmt, ## args)
-#define CPT_LOG_WARN(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(WARNING, fmt, ## args)
-#define CPT_LOG_ERR(fmt, args...) \
- CPT_PMD_DRV_LOG_RAW(ERR, fmt, ## args)
+#define CPT_LOG_INFO(...) \
+ CPT_PMD_DRV_LOG(INFO, __VA_ARGS__)
+#define CPT_LOG_WARN(...) \
+ CPT_PMD_DRV_LOG(WARNING, __VA_ARGS__)
+#define CPT_LOG_ERR(...) \
+ CPT_PMD_DRV_LOG(ERR, __VA_ARGS__)
/*
* DP logs, toggled out at compile time if level lower than current level.
*/
-#define CPT_LOG_DP(level, fmt, args...) \
- RTE_LOG_DP(level, CPT, fmt "\n", ## args)
-
-#define CPT_LOG_DP_DEBUG(fmt, args...) \
- CPT_LOG_DP(DEBUG, fmt, ## args)
-#define CPT_LOG_DP_INFO(fmt, args...) \
- CPT_LOG_DP(INFO, fmt, ## args)
-#define CPT_LOG_DP_WARN(fmt, args...) \
- CPT_LOG_DP(WARNING, fmt, ## args)
-#define CPT_LOG_DP_ERR(fmt, args...) \
- CPT_LOG_DP(ERR, fmt, ## args)
+#define CPT_LOG_DP(level, ...) \
+ RTE_LOG_DP_LINE(level, CPT, __VA_ARGS__)
+
+#define CPT_LOG_DP_DEBUG(...) \
+ CPT_LOG_DP(DEBUG, __VA_ARGS__)
+#define CPT_LOG_DP_INFO(...) \
+ CPT_LOG_DP(INFO, __VA_ARGS__)
+#define CPT_LOG_DP_WARN(...) \
+ CPT_LOG_DP(WARNING, __VA_ARGS__)
+#define CPT_LOG_DP_ERR(...) \
+ CPT_LOG_DP(ERR, __VA_ARGS__)
#endif /* _CPT_PMD_LOGS_H_ */
diff --git a/drivers/common/dpaax/dpaax_logs.h b/drivers/common/dpaax/dpaax_logs.h
index fe43bbc8f1..6ed29fb2ea 100644
--- a/drivers/common/dpaax/dpaax_logs.h
+++ b/drivers/common/dpaax/dpaax_logs.h
@@ -20,14 +20,12 @@ extern int dpaax_logger;
#define DPAAX_HWWARN(cond, fmt, args...) do { } while (0)
#endif
-#define DPAAX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaax_logger, "dpaax: " fmt "\n", \
- ##args)
+#define DPAAX_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAAX_LOGGER, __VA_ARGS__)
/* Debug logs are with Function names */
-#define DPAAX_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaax_logger, "dpaax: %s(): " fmt "\n", \
- __func__, ##args)
+#define DPAAX_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAAX_LOGGER, "%s(): ", __func__, __VA_ARGS__)
#define DPAAX_INFO(fmt, args...) \
DPAAX_LOG(INFO, fmt, ## args)
diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/common/idpf/idpf_common_logs.h
index 561836760c..a60f4f0e60 100644
--- a/drivers/common/idpf/idpf_common_logs.h
+++ b/drivers/common/idpf/idpf_common_logs.h
@@ -10,36 +10,19 @@
extern int idpf_common_logtype;
#define RTE_LOGTYPE_IDPF_COMMON idpf_common_logtype
-#define DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_common_logtype, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+#define DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IDPF_COMMON, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_LIBRTE_IDPF_DEBUG_RX
-#define RX_LOG(level, ...) \
- RTE_LOG(level, \
- IDPF_COMMON, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+#define RX_LOG(...) DRV_LOG(__VA_ARGS__)
#else
-#define RX_LOG(level, fmt, args...) do { } while (0)
+#define RX_LOG(...) do {} while (0)
#endif
#ifdef RTE_LIBRTE_IDPF_DEBUG_TX
-#define TX_LOG(level, ...) \
- RTE_LOG(level, \
- IDPF_COMMON, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+#define TX_LOG(...) DRV_LOG(__VA_ARGS__)
#else
-#define TX_LOG(level, fmt, args...) do { } while (0)
+#define TX_LOG(...) do {} while (0)
#endif
#endif /* _IDPF_COMMON_LOGS_H_ */
diff --git a/drivers/common/nfp/nfp_common_log.h b/drivers/common/nfp/nfp_common_log.h
index 066e38e688..040bca7e51 100644
--- a/drivers/common/nfp/nfp_common_log.h
+++ b/drivers/common/nfp/nfp_common_log.h
@@ -9,8 +9,8 @@
#include <rte_log.h>
extern int nfp_logtype_common;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_common, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_COMMON nfp_logtype_common
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_COMMON, "%s(): ", __func__, __VA_ARGS__)
#endif/* __NFP_COMMON_LOG_H__ */
diff --git a/drivers/common/nitrox/nitrox_logs.h b/drivers/common/nitrox/nitrox_logs.h
index 67964447eb..6f5f58dda6 100644
--- a/drivers/common/nitrox/nitrox_logs.h
+++ b/drivers/common/nitrox/nitrox_logs.h
@@ -7,7 +7,7 @@
extern int nitrox_logtype;
#define RTE_LOGTYPE_NITROX nitrox_logtype
-#define NITROX_LOG_LINE(level, fmt, args...) \
- RTE_LOG(level, NITROX, "%s:%d " fmt "\n", __func__, __LINE__, ## args)
+#define NITROX_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NITROX, "%s:%d ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#endif /* _NITROX_LOGS_H_ */
diff --git a/drivers/common/octeontx/octeontx_mbox.h b/drivers/common/octeontx/octeontx_mbox.h
index ab4c010558..c551f179d7 100644
--- a/drivers/common/octeontx/octeontx_mbox.h
+++ b/drivers/common/octeontx/octeontx_mbox.h
@@ -17,9 +17,9 @@
#define RM_INTERFACE_VERSION 0x2
-#define MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, octeontx_logtype_mbox,\
- "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+#define MBOX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OCTEONTX_MBOX, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__)
#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__)
@@ -27,6 +27,7 @@
#define mbox_func_trace mbox_log_dbg
extern int octeontx_logtype_mbox;
+#define RTE_LOGTYPE_OCTEONTX_MBOX octeontx_logtype_mbox
struct octeontx_mbox_hdr {
uint16_t vfid; /* VF index or pf resource index local to the domain */
diff --git a/drivers/common/qat/qat_logs.h b/drivers/common/qat/qat_logs.h
index 2e4d3945cb..9ccef818cc 100644
--- a/drivers/common/qat/qat_logs.h
+++ b/drivers/common/qat/qat_logs.h
@@ -6,15 +6,15 @@
#define _QAT_LOGS_H_
extern int qat_gen_logtype;
+#define RTE_LOGTYPE_QAT_GEN qat_gen_logtype
extern int qat_dp_logtype;
+#define RTE_LOGTYPE_QAT_DP qat_dp_logtype
-#define QAT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, qat_gen_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define QAT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, QAT_GEN, "%s(): ", __func__, __VA_ARGS__)
-#define QAT_DP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, qat_dp_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define QAT_DP_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, QAT_DP, "%s(): ", __func__, __VA_ARGS__)
#define QAT_DP_HEXDUMP_LOG(level, title, buf, len) \
qat_hexdump_log(RTE_LOG_ ## level, qat_dp_logtype, title, buf, len)
diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
index 1519ebdc17..b41ef3490b 100644
--- a/drivers/common/sfc_efx/sfc_efx_log.h
+++ b/drivers/common/sfc_efx/sfc_efx_log.h
@@ -12,11 +12,10 @@
/** Generic driver log type */
extern int sfc_efx_logtype;
+#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
/** Log message, add a prefix and a line break */
#define SFC_EFX_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \
- RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__ ,)))
+ RTE_LOG_LINE(level, SFC_EFX, ## __VA_ARGS__)
#endif /* _SFC_EFX_LOG_H_ */
diff --git a/drivers/compress/isal/isal_compress_pmd_private.h b/drivers/compress/isal/isal_compress_pmd_private.h
index c713a5bb6c..e6e3cfb50c 100644
--- a/drivers/compress/isal/isal_compress_pmd_private.h
+++ b/drivers/compress/isal/isal_compress_pmd_private.h
@@ -9,9 +9,9 @@
/**< ISA-L comp PMD device name */
extern int isal_logtype_driver;
-#define ISAL_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, isal_logtype_driver, "%s(): "fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_ISAL_DRIVER isal_logtype_driver
+#define ISAL_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ISAL_DRIVER, "%s(): ", __func__, __VA_ARGS__)
/* private data structure for each ISA-L compression device */
struct isal_comp_private {
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index 7353fd4957..bf09e2f58c 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -18,6 +18,7 @@
#include <zip_regs.h>
extern int octtx_zip_logtype_driver;
+#define RTE_LOGTYPE_OCTTX_ZIP_DRIVER octtx_zip_logtype_driver
/* ZIP VF Control/Status registers (CSRs): */
/* VF_BAR0: */
@@ -76,10 +77,8 @@ extern int octtx_zip_logtype_driver;
/**< ZIP PMD device name */
#define COMPRESSDEV_NAME_ZIP_PMD compress_octeontx
-#define ZIP_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, \
- octtx_zip_logtype_driver, "%s(): "fmt "\n", \
- __func__, ##args)
+#define ZIP_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OCTTX_ZIP_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#define ZIP_PMD_INFO(fmt, args...) \
ZIP_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/compress/uadk/uadk_compress_pmd_private.h b/drivers/compress/uadk/uadk_compress_pmd_private.h
index b09569fb94..6db53744fd 100644
--- a/drivers/compress/uadk/uadk_compress_pmd_private.h
+++ b/drivers/compress/uadk/uadk_compress_pmd_private.h
@@ -27,10 +27,10 @@ struct uadk_compress_xform {
};
extern int uadk_compress_logtype;
+#define RTE_LOGTYPE_UADK_COMPRESS uadk_compress_logtype
-#define UADK_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, uadk_compress_logtype, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
- ## __VA_ARGS__)
+#define UADK_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, UADK_COMPRESS, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#endif /* _UADK_COMPRESS_PMD_PRIVATE_H_ */
diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h
index 46a33d4d1b..7f6a57c6c5 100644
--- a/drivers/compress/zlib/zlib_pmd_private.h
+++ b/drivers/compress/zlib/zlib_pmd_private.h
@@ -15,9 +15,9 @@
#define DEF_MEM_LEVEL 8
extern int zlib_logtype_driver;
-#define ZLIB_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_ZLIB_DRIVER zlib_logtype_driver
+#define ZLIB_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ZLIB_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#define ZLIB_PMD_INFO(fmt, args...) \
ZLIB_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index c9bbcc2b74..ebae97911a 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -11,24 +11,19 @@
/**< ARMv8 Crypto PMD device name */
extern int crypto_armv8_log_type;
+#define RTE_LOGTYPE_CRYPTO_ARMV8 crypto_armv8_log_type
-#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
- rte_log(RTE_LOG_ERR, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
- __func__, __LINE__, ## args)
-
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
- rte_log(RTE_LOG_INFO, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
- __func__, __LINE__, ## args)
-
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, crypto_armv8_log_type, \
- "[%s] %s() line %u: " fmt "\n", \
- RTE_STR(CRYPTODEV_NAME_ARMV8_PMD), \
- __func__, __LINE__, ## args)
+#define ARMV8_CRYPTO_LOG_ERR(...) \
+ RTE_LOG_LINE_PREFIX(ERR, CRYPTO_ARMV8, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
+
+#define ARMV8_CRYPTO_LOG_INFO(...) \
+ RTE_LOG_LINE_PREFIX(INFO, CRYPTO_ARMV8, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
+
+#define ARMV8_CRYPTO_LOG_DBG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, CRYPTO_ARMV8, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#define NBBY 8 /* Number of bits in a byte */
#define BYTE_LENGTH(x) ((x) / NBBY) /* Number of bytes in x (round down) */
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.h b/drivers/crypto/bcmfs/bcmfs_logs.h
index c03a49b75c..c12ca33f27 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.h
+++ b/drivers/crypto/bcmfs/bcmfs_logs.h
@@ -9,15 +9,15 @@
#include <rte_log.h>
extern int bcmfs_conf_logtype;
+#define RTE_LOGTYPE_BCMFS_CONF bcmfs_conf_logtype
extern int bcmfs_dp_logtype;
+#define RTE_LOGTYPE_BCMFS_DP bcmfs_dp_logtype
-#define BCMFS_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bcmfs_conf_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define BCMFS_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, BCMFS_CONF, "%s(): ", __func__, __VA_ARGS__)
-#define BCMFS_DP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bcmfs_dp_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define BCMFS_DP_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, BCMFS_DP, "%s(): ", __func__, __VA_ARGS__)
#define BCMFS_DP_HEXDUMP_LOG(level, title, buf, len) \
bcmfs_hexdump_log(RTE_LOG_ ## level, bcmfs_dp_logtype, title, buf, len)
diff --git a/drivers/crypto/caam_jr/caam_jr_log.h b/drivers/crypto/caam_jr/caam_jr_log.h
index 8f6aa50e2a..7c50119106 100644
--- a/drivers/crypto/caam_jr/caam_jr_log.h
+++ b/drivers/crypto/caam_jr/caam_jr_log.h
@@ -10,13 +10,11 @@
extern int caam_jr_logtype;
#define RTE_LOGTYPE_CAAM_JR caam_jr_logtype
-#define CAAM_JR_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, caam_jr_logtype, "caam_jr: " \
- fmt "\n", ##args)
+#define CAAM_JR_LOG(level, ...) \
+ RTE_LOG_LINE(level, CAAM_JR, __VA_ARGS__)
-#define CAAM_JR_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, caam_jr_logtype, "caam_jr: %s(): " \
- fmt "\n", __func__, ##args)
+#define CAAM_JR_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, CAAM_JR, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() CAAM_JR_DEBUG(" >>")
@@ -28,8 +26,8 @@ extern int caam_jr_logtype;
CAAM_JR_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define CAAM_JR_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, CAAM_JR, fmt "\n", ## args)
+#define CAAM_JR_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, CAAM_JR, __VA_ARGS__)
#define CAAM_JR_DP_DEBUG(fmt, args...) \
CAAM_JR_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index 94c8fec46d..361a20fa3e 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -11,18 +11,21 @@
extern int crypto_ccp_logtype;
#define RTE_LOGTYPE_CRYPTO_CCP crypto_ccp_logtype
-#define CCP_LOG_ERR(fmt, args...) \
- RTE_LOG_LINE(ERR, CRYPTO_CCP, "%s() line %u: " fmt, __func__, __LINE__, ## args)
+#define CCP_LOG_ERR(...) \
+ RTE_LOG_LINE_PREFIX(ERR, CRYPTO_CCP, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#ifdef RTE_LIBRTE_CCP_DEBUG
-#define CCP_LOG_INFO(fmt, args...) \
- RTE_LOG_LINE(INFO, CRYPTO_CCP, "%s() line %u: " fmt, __func__, __LINE__, ## args)
+#define CCP_LOG_INFO(...) \
+ RTE_LOG_LINE_PREFIX(INFO, CRYPTO_CCP, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
-#define CCP_LOG_DBG(fmt, args...) \
- RTE_LOG_LINE(DEBUG, CRYPTO_CCP, "%s() line %u: " fmt, __func__, __LINE__, ## args)
+#define CCP_LOG_DBG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, CRYPTO_CCP, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#else
-#define CCP_LOG_INFO(fmt, args...)
-#define CCP_LOG_DBG(fmt, args...)
+#define CCP_LOG_INFO(...)
+#define CCP_LOG_DBG(...)
#endif
/**< Maximum queue pairs supported by CCP PMD */
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
index ee69209504..53a5ebc760 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h
@@ -11,13 +11,11 @@
extern int dpaa2_logtype_sec;
#define RTE_LOGTYPE_DPAA2_SEC dpaa2_logtype_sec
-#define DPAA2_SEC_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_sec, "dpaa2_sec: " \
- fmt "\n", ##args)
+#define DPAA2_SEC_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_SEC, __VA_ARGS__)
-#define DPAA2_SEC_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_sec, "dpaa2_sec: %s(): " \
- fmt "\n", __func__, ##args)
+#define DPAA2_SEC_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_SEC, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() DPAA2_SEC_DEBUG(">>")
@@ -29,8 +27,8 @@ extern int dpaa2_logtype_sec;
DPAA2_SEC_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA2_SEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_SEC, fmt, ## args)
+#define DPAA2_SEC_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA2_SEC, __VA_ARGS__)
#define DPAA2_SEC_DP_DEBUG(fmt, args...) \
DPAA2_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
index 60dbaee4ec..6ac02d07e1 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h
@@ -11,13 +11,11 @@
extern int dpaa_logtype_sec;
#define RTE_LOGTYPE_DPAA_SEC dpaa_logtype_sec
-#define DPAA_SEC_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \
- fmt "\n", ##args)
+#define DPAA_SEC_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA_SEC, __VA_ARGS__)
-#define DPAA_SEC_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_logtype_sec, "dpaa_sec: %s(): " \
- fmt "\n", __func__, ##args)
+#define DPAA_SEC_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA_SEC, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() DPAA_SEC_DEBUG(" >>")
@@ -29,8 +27,8 @@ extern int dpaa_logtype_sec;
DPAA_SEC_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA_SEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP_LINE(level, DPAA_SEC, fmt, ## args)
+#define DPAA_SEC_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA_SEC, __VA_ARGS__)
#define DPAA_SEC_DP_DEBUG(fmt, args...) \
DPAA_SEC_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index d42acd913c..025767cfce 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -59,9 +59,10 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);
/** PMD LOGTYPE DRIVER, common to all PMDs */
extern int ipsec_mb_logtype_driver;
-#define IPSEC_MB_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_##level, ipsec_mb_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
+#define RTE_LOGTYPE_IPSEC_MB ipsec_mb_logtype_driver
+#define IPSEC_MB_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IPSEC_MB, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/** All supported device types */
enum ipsec_mb_pmd_types {
diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h
index 80ff229c1b..01efc25306 100644
--- a/drivers/crypto/mvsam/mrvl_pmd_private.h
+++ b/drivers/crypto/mvsam/mrvl_pmd_private.h
@@ -14,11 +14,11 @@
/** MRVL PMD LOGTYPE DRIVER */
extern int mrvl_logtype_driver;
+#define RTE_LOGTYPE_MRVL_DRIVER mrvl_logtype_driver
-#define MRVL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
- ## __VA_ARGS__)
+#define MRVL_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MRVL_DRIVER, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/**
* Handy bits->bytes conversion macro.
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 645a68d1da..45629addcf 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -9,11 +9,11 @@
/**< Null crypto PMD device name */
extern int null_logtype_driver;
+#define RTE_LOGTYPE_NULL_DRIVER null_logtype_driver
-#define NULL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, null_logtype_driver, \
- "%s() line %u: "fmt "\n", __func__, __LINE__, \
- ## __VA_ARGS__)
+#define NULL_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NULL_DRIVER, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/** private data structure for each NULL crypto device */
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index a50e4d4918..0282b3d829 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -23,10 +23,10 @@
/** OPENSSL PMD LOGTYPE DRIVER */
extern int openssl_logtype_driver;
-#define OPENSSL_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, openssl_logtype_driver, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
- ## __VA_ARGS__)
+#define RTE_LOGTYPE_OPENSSL_DRIVER openssl_logtype_driver
+#define OPENSSL_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OPENSSL_DRIVER, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/* Maximum length for digest (SHA-512 needs 64 bytes) */
#define DIGEST_LENGTH_MAX 64
diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index 0f0a6b4a85..fc75cd29cd 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -15,10 +15,11 @@
#define PER_WORKER_BUFF_SIZE (256)
extern int scheduler_logtype_driver;
+#define RTE_LOGTYPE_SCHEDULER_DRIVER scheduler_logtype_driver
-#define CR_SCHED_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, scheduler_logtype_driver, \
- "%s() line %u: "fmt "\n", __func__, __LINE__, ##args)
+#define CR_SCHED_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, SCHEDULER_DRIVER, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
struct scheduler_worker {
uint8_t dev_id;
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
index 7a35c94a4f..1f55d09a54 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h
+++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h
@@ -71,10 +71,10 @@ struct __rte_cache_aligned uadk_crypto_priv {
};
extern int uadk_crypto_logtype;
+#define RTE_LOGTYPE_UADK_CRYPTO uadk_crypto_logtype
-#define UADK_LOG(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, uadk_crypto_logtype, \
- "%s() line %u: " fmt "\n", __func__, __LINE__, \
- ## __VA_ARGS__)
+#define UADK_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, UADK_CRYPTO, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#endif /* _UADK_CRYPTO_PMD_PRIVATE_H_ */
diff --git a/drivers/crypto/virtio/virtio_logs.h b/drivers/crypto/virtio/virtio_logs.h
index 1ee3819309..a1afb90a98 100644
--- a/drivers/crypto/virtio/virtio_logs.h
+++ b/drivers/crypto/virtio/virtio_logs.h
@@ -8,18 +8,18 @@
#include <rte_log.h>
extern int virtio_crypto_logtype_init;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_INIT virtio_crypto_logtype_init
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_init, \
- "PMD: %s(): " fmt "\n", __func__, ##args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int virtio_crypto_logtype_init;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_INIT virtio_crypto_logtype_init
-#define VIRTIO_CRYPTO_INIT_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_init, \
- "INIT: %s(): " fmt "\n", __func__, ##args)
+#define VIRTIO_CRYPTO_INIT_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_INIT, "%s(): ", __func__, __VA_ARGS__)
#define VIRTIO_CRYPTO_INIT_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_INIT_LOG_IMPL(INFO, fmt, ## args)
@@ -31,10 +31,10 @@ extern int virtio_crypto_logtype_init;
VIRTIO_CRYPTO_INIT_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_session;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_SESSION virtio_crypto_logtype_session
-#define VIRTIO_CRYPTO_SESSION_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_session, \
- "SESSION: %s(): " fmt "\n", __func__, ##args)
+#define VIRTIO_CRYPTO_SESSION_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_SESSION, "%s(): ", __func__, __VA_ARGS__)
#define VIRTIO_CRYPTO_SESSION_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_SESSION_LOG_IMPL(INFO, fmt, ## args)
@@ -46,10 +46,10 @@ extern int virtio_crypto_logtype_session;
VIRTIO_CRYPTO_SESSION_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_rx;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_RX virtio_crypto_logtype_rx
-#define VIRTIO_CRYPTO_RX_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_rx, \
- "RX: %s(): " fmt "\n", __func__, ##args)
+#define VIRTIO_CRYPTO_RX_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_RX, "%s(): ", __func__, __VA_ARGS__)
#define VIRTIO_CRYPTO_RX_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_RX_LOG_IMPL(INFO, fmt, ## args)
@@ -61,10 +61,10 @@ extern int virtio_crypto_logtype_rx;
VIRTIO_CRYPTO_RX_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_tx;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_TX virtio_crypto_logtype_tx
-#define VIRTIO_CRYPTO_TX_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_tx, \
- "TX: %s(): " fmt "\n", __func__, ##args)
+#define VIRTIO_CRYPTO_TX_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_TX, "%s(): ", __func__, __VA_ARGS__)
#define VIRTIO_CRYPTO_TX_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_TX_LOG_IMPL(INFO, fmt, ## args)
@@ -76,10 +76,10 @@ extern int virtio_crypto_logtype_tx;
VIRTIO_CRYPTO_TX_LOG_IMPL(ERR, fmt, ## args)
extern int virtio_crypto_logtype_driver;
+#define RTE_LOGTYPE_VIRTIO_CRYPTO_DRIVER virtio_crypto_logtype_driver
-#define VIRTIO_CRYPTO_DRV_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_crypto_logtype_driver, \
- "DRIVER: %s(): " fmt "\n", __func__, ##args)
+#define VIRTIO_CRYPTO_DRV_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_CRYPTO_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#define VIRTIO_CRYPTO_DRV_LOG_INFO(fmt, args...) \
VIRTIO_CRYPTO_DRV_LOG_IMPL(INFO, fmt, ## args)
diff --git a/drivers/dma/dpaa/dpaa_qdma_logs.h b/drivers/dma/dpaa/dpaa_qdma_logs.h
index 95753dcd89..2d77255fd8 100644
--- a/drivers/dma/dpaa/dpaa_qdma_logs.h
+++ b/drivers/dma/dpaa/dpaa_qdma_logs.h
@@ -8,13 +8,11 @@
extern int dpaa_qdma_logtype;
#define RTE_LOGTYPE_DPAA_QDMA dpaa_qdma_logtype
-#define DPAA_QDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_qdma_logtype, "dpaa_qdma: " \
- fmt "\n", ## args)
+#define DPAA_QDMA_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA_QDMA, __VA_ARGS__)
-#define DPAA_QDMA_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa_qdma_logtype, "dpaa_qdma: %s(): " \
- fmt "\n", __func__, ## args)
+#define DPAA_QDMA_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA_QDMA, "%s(): ", __func__, __VA_ARGS__)
#define DPAA_QDMA_FUNC_TRACE() DPAA_QDMA_DEBUG(">>")
@@ -26,8 +24,8 @@ extern int dpaa_qdma_logtype;
DPAA_QDMA_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA_QDMA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_QDMA, "dpaa_qdma: " fmt "\n", ## args)
+#define DPAA_QDMA_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA_QDMA, __VA_ARGS__)
#define DPAA_QDMA_DP_DEBUG(fmt, args...) \
DPAA_QDMA_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/dma/dpaa2/dpaa2_qdma_logs.h b/drivers/dma/dpaa2/dpaa2_qdma_logs.h
index 37a5a5c6e9..62ef60bcf2 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma_logs.h
+++ b/drivers/dma/dpaa2/dpaa2_qdma_logs.h
@@ -12,13 +12,11 @@ extern "C" {
extern int dpaa2_qdma_logtype;
#define RTE_LOGTYPE_DPAA2_QDMA dpaa2_qdma_logtype
-#define DPAA2_QDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_qdma_logtype, "dpaa2_qdma: " \
- fmt "\n", ## args)
+#define DPAA2_QDMA_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_QDMA, __VA_ARGS__)
-#define DPAA2_QDMA_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_qdma_logtype, "dpaa2_qdma: %s(): " \
- fmt "\n", __func__, ## args)
+#define DPAA2_QDMA_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_QDMA, "%s(): ", __func__, __VA_ARGS__)
#define DPAA2_QDMA_FUNC_TRACE() DPAA2_QDMA_DEBUG(">>")
@@ -30,8 +28,8 @@ extern int dpaa2_qdma_logtype;
DPAA2_QDMA_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA2_QDMA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_QDMA, "dpaa2_qdma: " fmt "\n", ## args)
+#define DPAA2_QDMA_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA2_QDMA, __VA_ARGS__)
#define DPAA2_QDMA_DP_DEBUG(fmt, args...) \
DPAA2_QDMA_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index bce4b4b277..fdd2fa225f 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -18,21 +18,20 @@
#include "hisi_dmadev.h"
RTE_LOG_REGISTER_DEFAULT(hisi_dma_logtype, INFO);
-#define HISI_DMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hisi_dma_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
-#define HISI_DMA_LOG_RAW(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hisi_dma_logtype, \
- "%s %s(): " fmt "\n", (hw)->data->dev_name, \
- __func__, ##args)
-#define HISI_DMA_DEBUG(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, DEBUG, fmt, ## args)
-#define HISI_DMA_INFO(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, INFO, fmt, ## args)
-#define HISI_DMA_WARN(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, WARNING, fmt, ## args)
-#define HISI_DMA_ERR(hw, fmt, args...) \
- HISI_DMA_LOG_RAW(hw, ERR, fmt, ## args)
+#define RTE_LOGTYPE_HISI_DMA hisi_dma_logtype
+#define HISI_DMA_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HISI_DMA, "%s(): ", __func__, __VA_ARGS__)
+#define HISI_DMA_DEV_LOG(hw, level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HISI_DMA, "%s %s(): ", \
+ (hw)->data->dev_name RTE_LOG_COMMA __func__, __VA_ARGS__)
+#define HISI_DMA_DEBUG(hw, ...) \
+ HISI_DMA_DEV_LOG(hw, DEBUG, __VA_ARGS__)
+#define HISI_DMA_INFO(hw, ...) \
+ HISI_DMA_DEV_LOG(hw, INFO, __VA_ARGS__)
+#define HISI_DMA_WARN(hw, ...) \
+ HISI_DMA_DEV_LOG(hw, WARNING, __VA_ARGS__)
+#define HISI_DMA_ERR(hw, ...) \
+ HISI_DMA_DEV_LOG(hw, ERR, __VA_ARGS__)
static uint32_t
hisi_dma_queue_base(struct hisi_dma_dev *hw)
diff --git a/drivers/dma/idxd/idxd_internal.h b/drivers/dma/idxd/idxd_internal.h
index 537cf9b1cf..99dc2b367e 100644
--- a/drivers/dma/idxd/idxd_internal.h
+++ b/drivers/dma/idxd/idxd_internal.h
@@ -20,9 +20,10 @@
*/
extern int idxd_pmd_logtype;
+#define RTE_LOGTYPE_IDXD_PMD idxd_pmd_logtype
-#define IDXD_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
- idxd_pmd_logtype, "IDXD: %s(): " fmt "\n", __func__, ##args)
+#define IDXD_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IDXD_PMD, "%s(): ", __func__, __VA_ARGS__)
#define IDXD_PMD_DEBUG(fmt, args...) IDXD_PMD_LOG(DEBUG, fmt, ## args)
#define IDXD_PMD_INFO(fmt, args...) IDXD_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/dma/ioat/ioat_internal.h b/drivers/dma/ioat/ioat_internal.h
index f4285c50f0..2da26b616f 100644
--- a/drivers/dma/ioat/ioat_internal.h
+++ b/drivers/dma/ioat/ioat_internal.h
@@ -35,9 +35,10 @@ struct ioat_dmadev {
};
extern int ioat_pmd_logtype;
+#define RTE_LOGTYPE_IOAT_PMD ioat_pmd_logtype
-#define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
- ioat_pmd_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
+#define IOAT_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IOAT_PMD, "%s(): ", __func__, __VA_ARGS__)
#define IOAT_PMD_DEBUG(fmt, args...) IOAT_PMD_LOG(DEBUG, fmt, ## args)
#define IOAT_PMD_INFO(fmt, args...) IOAT_PMD_LOG(INFO, fmt, ## args)
diff --git a/drivers/dma/odm/odm.h b/drivers/dma/odm/odm.h
index 274c21ef8d..6b96439094 100644
--- a/drivers/dma/odm/odm.h
+++ b/drivers/dma/odm/odm.h
@@ -13,8 +13,6 @@
#include <rte_log.h>
#include <rte_memzone.h>
-extern int odm_logtype;
-
/* ODM VF register offsets from VF_BAR0 */
#define ODM_VDMA_EN(x) (0x00 | (x << 3))
#define ODM_VDMA_REQQ_CTL(x) (0x80 | (x << 3))
@@ -66,10 +64,11 @@ extern int odm_logtype;
#define odm_read64(addr) rte_read64_relaxed((volatile void *)(addr))
#define odm_write64(val, addr) rte_write64_relaxed((val), (volatile void *)(addr))
+extern int odm_logtype;
+#define RTE_LOGTYPE_ODM odm_logtype
+
#define ODM_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, odm_logtype, \
- RTE_FMT("%s(): %u" RTE_FMT_HEAD(__VA_ARGS__,) "\n", __func__, __LINE__, \
- RTE_FMT_TAIL(__VA_ARGS__, )))
+ RTE_LOG_LINE_PREFIX(level, ODM, "%s(): %u", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/*
* Structure odm_instr_hdr_s for ODM
diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c
index 4b18fb3767..e287802eb9 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.c
+++ b/drivers/dma/skeleton/skeleton_dmadev.c
@@ -21,9 +21,9 @@
#include "skeleton_dmadev.h"
RTE_LOG_REGISTER_DEFAULT(skeldma_logtype, INFO);
-#define SKELDMA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeldma_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_SKELDMA skeldma_logtype
+#define SKELDMA_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, SKELDMA, "%s(): ", __func__, __VA_ARGS__)
static int
skeldma_info_get(const struct rte_dma_dev *dev, struct rte_dma_info *dev_info,
diff --git a/drivers/event/dlb2/dlb2_log.h b/drivers/event/dlb2/dlb2_log.h
index 201c88a98b..c9ce87681c 100644
--- a/drivers/event/dlb2/dlb2_log.h
+++ b/drivers/event/dlb2/dlb2_log.h
@@ -9,8 +9,8 @@ extern int eventdev_dlb2_log_level;
#define RTE_LOGTYPE_EVENTDEV_DLB2 eventdev_dlb2_log_level
/* Dynamic logging */
-#define DLB2_LOG_IMPL(level, fmt, args...) \
- RTE_LOG(level, EVENTDEV_DLB2, "%s" fmt "\n", __func__, ##args)
+#define DLB2_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, EVENTDEV_DLB2, "%s", __func__, __VA_ARGS__)
#define DLB2_LOG_INFO(fmt, args...) \
DLB2_LOG_IMPL(INFO, fmt, ## args)
@@ -19,7 +19,7 @@ extern int eventdev_dlb2_log_level;
DLB2_LOG_IMPL(ERR, fmt, ## args)
/* remove debug logs at compile time unless actually debugging */
-#define DLB2_LOG_LINE_DBG(fmt, args...) \
- RTE_LOG_DP(DEBUG, EVENTDEV_DLB2, fmt "\n", ## args)
+#define DLB2_LOG_LINE_DBG(...) \
+ RTE_LOG_DP_LINE(DEBUG, EVENTDEV_DLB2, __VA_ARGS__)
#endif /* _DLB2_EVDEV_LOG_H_ */
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index f8cf48bd2e..85ccb586ef 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -48,6 +48,7 @@
* 1 Eventdev can have N Eventqueue
*/
RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_eventdev, NOTICE);
+#define RTE_LOGTYPE_DPAA_EVENTDEV dpaa_logtype_eventdev
#define DISABLE_INTR_MODE "disable_intr"
diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h
index b4535c7b86..5831ccb4e8 100644
--- a/drivers/event/dpaa/dpaa_eventdev.h
+++ b/drivers/event/dpaa/dpaa_eventdev.h
@@ -77,9 +77,8 @@ struct dpaa_eventdev {
uint32_t event_dev_cfg;
};
-#define DPAA_EVENTDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_eventdev, "%s(): " fmt "\n", \
- __func__, ##args)
+#define DPAA_EVENTDEV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, DPAA_EVENTDEV, "%s(): ", __func__, __VA_ARGS__)
#define EVENTDEV_INIT_FUNC_TRACE() DPAA_EVENTDEV_LOG(DEBUG, " >>")
diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
index b894fb3299..12317ae39f 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
@@ -6,14 +6,13 @@
#define _DPAA2_EVENTDEV_LOGS_H_
extern int dpaa2_logtype_event;
+#define RTE_LOGTYPE_DPAA2_EVENT dpaa2_logtype_event
-#define DPAA2_EVENTDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_event, "dpaa2_event: " \
- fmt "\n", ##args)
+#define DPAA2_EVENTDEV_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_EVENT, __VA_ARGS__)
-#define DPAA2_EVENTDEV_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_event, "dpaa2_event: %s(): " \
- fmt "\n", __func__, ##args)
+#define DPAA2_EVENTDEV_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_EVENT, "%s():", __func__, __VA_ARGS__)
#define EVENTDEV_INIT_FUNC_TRACE() DPAA2_EVENTDEV_DEBUG(" >>")
diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h
index 01b7a99ba1..3f29e53929 100644
--- a/drivers/event/dsw/dsw_evdev.h
+++ b/drivers/event/dsw/dsw_evdev.h
@@ -305,7 +305,7 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev)
extern int event_dsw_logtype;
#define RTE_LOGTYPE_EVENT_DSW event_dsw_logtype
#define DSW_LOG_DP_LINE(level, fmt, args...) \
- RTE_LOG_DP(level, EVENT_DSW, "%s() line %u: " fmt "\n", \
+ RTE_LOG_DP_LINE(level, EVENT_DSW, "%s() line %u: " fmt, \
__func__, __LINE__, ## args)
#define DSW_LOG_DP_PORT_LINE(level, port_id, fmt, args...) \
diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h
index 293eb85a40..1997626438 100644
--- a/drivers/event/octeontx/ssovf_evdev.h
+++ b/drivers/event/octeontx/ssovf_evdev.h
@@ -19,10 +19,9 @@
#define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx
-#define SSOVF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_logtype_ssovf, \
- "[%s] %s() " fmt "\n", \
- RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
+#define SSOVF_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OTX_SSOVF, "[%s] %s() ", \
+ RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD) RTE_LOG_COMMA __func__, __VA_ARGS__)
#define ssovf_log_info(fmt, ...) SSOVF_LOG(INFO, fmt, ##__VA_ARGS__)
#define ssovf_log_dbg(fmt, ...) SSOVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
@@ -171,6 +170,7 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev)
}
extern int otx_logtype_ssovf;
+#define RTE_LOGTYPE_OTX_SSOVF otx_logtype_ssovf
uint16_t ssows_enq(void *port, const struct rte_event *ev);
uint16_t ssows_enq_burst(void *port,
diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h
index 3a2dc475e3..44a4ee41c4 100644
--- a/drivers/event/octeontx/timvf_evdev.h
+++ b/drivers/event/octeontx/timvf_evdev.h
@@ -26,10 +26,9 @@
#include <octeontx_mbox.h>
#include <octeontx_fpavf.h>
-#define timvf_log(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_logtype_timvf, \
- "[%s] %s() " fmt "\n", \
- RTE_STR(event_timer_octeontx), __func__, ## args)
+#define timvf_log(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OTX_TIMVF, "[%s] %s() ", \
+ RTE_STR(event_timer_octeontx) RTE_LOG_COMMA __func__, __VA_ARGS__)
#define timvf_log_info(fmt, ...) timvf_log(INFO, fmt, ##__VA_ARGS__)
#define timvf_log_dbg(fmt, ...) timvf_log(DEBUG, fmt, ##__VA_ARGS__)
@@ -113,6 +112,7 @@
#define TIMVF_ENABLE_STATS_ARG ("timvf_stats")
extern int otx_logtype_timvf;
+#define RTE_LOGTYPE_OTX_TIMVF otx_logtype_timvf
static const uint16_t nb_chunk_slots = (TIM_CHUNK_SIZE / 16) - 1;
enum timvf_clk_src {
diff --git a/drivers/event/opdl/opdl_log.h b/drivers/event/opdl/opdl_log.h
index ae5221c1e4..9a8ee71bb6 100644
--- a/drivers/event/opdl/opdl_log.h
+++ b/drivers/event/opdl/opdl_log.h
@@ -8,14 +8,9 @@
#include <rte_log.h>
extern int opdl_logtype_driver;
+#define RTE_LOGTYPE_OPDL opdl_logtype_driver
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, opdl_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-
-
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OPDL, "%s(): ", __func__, __VA_ARGS__)
#endif /* _OPDL_LOGS_H_ */
diff --git a/drivers/event/skeleton/skeleton_eventdev.h b/drivers/event/skeleton/skeleton_eventdev.h
index 283342ac19..6fca68c5d0 100644
--- a/drivers/event/skeleton/skeleton_eventdev.h
+++ b/drivers/event/skeleton/skeleton_eventdev.h
@@ -9,20 +9,19 @@
#include <eventdev_pmd_vdev.h>
extern int skeleton_eventdev_logtype;
+#define RTE_LOGTYPE_SKELETON_EVENTDEV skeleton_eventdev_logtype
#ifdef RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_eventdev_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, SKELETON_EVENTDEV, "%s(): ", __func__, __VA_ARGS__)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
+#define PMD_DRV_LOG(...) do { } while (0)
#define PMD_DRV_FUNC_TRACE() do { } while (0)
#endif
-#define PMD_DRV_ERR(fmt, args...) \
- rte_log(RTE_LOG_ERR, skeleton_eventdev_logtype, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_ERR(...) \
+ RTE_LOG_LINE_PREFIX(ERR, SKELETON_EVENTDEV, "%s(): ", __func__, __VA_ARGS__)
struct __rte_cache_aligned skeleton_eventdev {
uintptr_t reg_base;
diff --git a/drivers/event/sw/sw_evdev_log.h b/drivers/event/sw/sw_evdev_log.h
index f76825abc5..50a707939c 100644
--- a/drivers/event/sw/sw_evdev_log.h
+++ b/drivers/event/sw/sw_evdev_log.h
@@ -6,10 +6,10 @@
#define _SW_EVDEV_LOG_H_
extern int eventdev_sw_log_level;
+#define RTE_LOGTYPE_EVENT_SW eventdev_sw_log_level
-#define SW_LOG_IMPL(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eventdev_sw_log_level, "%s" fmt "\n", \
- __func__, ##args)
+#define SW_LOG_IMPL(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, EVENT_SW, "%s", __func__, __VA_ARGS__)
#define SW_LOG_INFO(fmt, args...) \
SW_LOG_IMPL(INFO, fmt, ## args)
diff --git a/drivers/gpu/cuda/common.h b/drivers/gpu/cuda/common.h
index e809988503..e098418401 100644
--- a/drivers/gpu/cuda/common.h
+++ b/drivers/gpu/cuda/common.h
@@ -13,10 +13,11 @@
#include <rte_errno.h>
extern int cuda_logtype;
+#define RTE_LOGTYPE_CUDA cuda_logtype
/* Helper macro for logging */
#define rte_cuda_log(level, fmt, ...) \
- rte_log(RTE_LOG_ ## level, cuda_logtype, fmt "\n", ##__VA_ARGS__)
+ RTE_LOG_LINE(level, CUDA, fmt, ##__VA_ARGS__)
#define rte_cuda_debug(fmt, ...) \
rte_cuda_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \
diff --git a/drivers/mempool/dpaa/dpaa_mempool.h b/drivers/mempool/dpaa/dpaa_mempool.h
index 153fefd507..135520922f 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.h
+++ b/drivers/mempool/dpaa/dpaa_mempool.h
@@ -60,9 +60,8 @@ extern struct dpaa_bp_info *rte_dpaa_bpid_info;
/* Mempool related logs */
-#define DPAA_MEMPOOL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \
- __func__, ##args)
+#define DPAA_MEMPOOL_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, DPAA_MEMPOOL, "%s(): ", __func__, __VA_ARGS__)
#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>")
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
index fbc8cb30a2..d69ef17a04 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool_logs.h
@@ -8,14 +8,12 @@
extern int dpaa2_logtype_mempool;
#define RTE_LOGTYPE_DPAA2_MEMPOOL dpaa2_logtype_mempool
-#define DPAA2_MEMPOOL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_mempool, \
- "mempool/dpaa2: " fmt "\n", ##args)
+#define DPAA2_MEMPOOL_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_MEMPOOL, __VA_ARGS__)
/* Debug logs are with Function names */
-#define DPAA2_MEMPOOL_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_mempool, \
- "mempool/dpaa2: %s(): " fmt "\n", __func__, ##args)
+#define DPAA2_MEMPOOL_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_MEMPOOL, "%s(): ", __func__, __VA_ARGS__)
#define DPAA2_MEMPOOL_INFO(fmt, args...) \
DPAA2_MEMPOOL_LOG(INFO, fmt, ## args)
diff --git a/drivers/mempool/octeontx/octeontx_pool_logs.h b/drivers/mempool/octeontx/octeontx_pool_logs.h
index 7b4e1b3877..48395e307f 100644
--- a/drivers/mempool/octeontx/octeontx_pool_logs.h
+++ b/drivers/mempool/octeontx/octeontx_pool_logs.h
@@ -7,9 +7,9 @@
#include <rte_debug.h>
-#define FPAVF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf,\
- "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+#define FPAVF_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OCTEONTX_FPAVF, "%s() line %u: ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#define fpavf_log_info(fmt, ...) FPAVF_LOG(INFO, fmt, ##__VA_ARGS__)
#define fpavf_log_dbg(fmt, ...) FPAVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
@@ -18,5 +18,6 @@
extern int octeontx_logtype_fpavf;
+#define RTE_LOGTYPE_OCTEONTX_FPAVF octeontx_logtype_fpavf
#endif /* __OCTEONTX_POOL_LOGS_H__*/
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 6b7b16f348..68870dd3e2 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -102,14 +102,14 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE);
+#define RTE_LOGTYPE_AFPACKET af_packet_logtype
-#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_packet_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AFPACKET, "%s(): ", __func__, __VA_ARGS__)
-#define PMD_LOG_ERRNO(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, af_packet_logtype, \
- "%s(): " fmt ":%s\n", __func__, ##args, strerror(errno))
+#define PMD_LOG_ERRNO(level, fmt, ...) \
+ RTE_LOG_LINE(level, AFPACKET, "%s(): " fmt ":%s", __func__, \
+ ## __VA_ARGS__, strerror(errno))
static uint16_t
eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 676006ce0d..814398ba4b 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -65,8 +65,8 @@
RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);
#define RTE_LOGTYPE_NET_AF_XDP af_xdp_logtype
-#define AF_XDP_LOG_LINE(level, fmt, args...) \
- RTE_LOG(level, NET_AF_XDP, "%s(): " fmt "\n", __func__, ##args)
+#define AF_XDP_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NET_AF_XDP, "%s(): ", __func__, __VA_ARGS__)
#define ETH_AF_XDP_FRAME_SIZE 2048
#define ETH_AF_XDP_NUM_BUFFERS 4096
diff --git a/drivers/net/atlantic/atl_logs.h b/drivers/net/atlantic/atl_logs.h
index 14a7a1de1d..a233baf461 100644
--- a/drivers/net/atlantic/atl_logs.h
+++ b/drivers/net/atlantic/atl_logs.h
@@ -7,26 +7,22 @@
#include <rte_log.h>
extern int atl_logtype_init;
+#define RTE_LOGTYPE_ATL_INIT atl_logtype_init
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, atl_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ATL_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_DP_LINE_PREFIX(level, ATL_DRIVER, "%s(): ", __func__, __VA_ARGS__)
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ATL_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_DP_LINE_PREFIX(level, ATL_DRIVER, "%s(): ", __func__, __VA_ARGS__)
extern int atl_logtype_driver;
#define RTE_LOGTYPE_ATL_DRIVER atl_logtype_driver
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, atl_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ATL_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 3f2721df1a..b84b67c3f1 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -8,15 +8,15 @@
#include <rte_log.h>
#ifdef RTE_LIBRTE_AVP_DEBUG_RX
-#define PMD_RX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s() rx: " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_RX_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AVP_DRIVER, "%s() rx: ", __func__, __VA_ARGS__)
#else
#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_AVP_DEBUG_TX
-#define PMD_TX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s() tx: " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_TX_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AVP_DRIVER, "%s() tx: ", __func__, __VA_ARGS__)
#else
#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
@@ -24,7 +24,7 @@
extern int avp_logtype_driver;
#define RTE_LOGTYPE_AVP_DRIVER avp_logtype_driver
-#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AVP_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_DRV_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AVP_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _AVP_LOGS_H_ */
diff --git a/drivers/net/axgbe/axgbe_logs.h b/drivers/net/axgbe/axgbe_logs.h
index 3962895c5a..7990c79ef7 100644
--- a/drivers/net/axgbe/axgbe_logs.h
+++ b/drivers/net/axgbe/axgbe_logs.h
@@ -8,9 +8,9 @@
#include <stdio.h>
extern int axgbe_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, axgbe_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_AXGBE_INIT axgbe_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AXGBE_INIT, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_LIBRTE_AXGBE_PMD_DEBUG
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
@@ -20,7 +20,7 @@ extern int axgbe_logtype_init;
extern int axgbe_logtype_driver;
#define RTE_LOGTYPE_AXGBE_DRIVER axgbe_logtype_driver
-#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, AXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_DRV_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, AXGBE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _AXGBE_LOGS_H_ */
diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h
index f0cf69c163..ba3b058fbb 100644
--- a/drivers/net/bnx2x/bnx2x_logs.h
+++ b/drivers/net/bnx2x/bnx2x_logs.h
@@ -9,44 +9,40 @@
#define _PMD_LOGS_H_
extern int bnx2x_logtype_init;
-#define PMD_INIT_LOG(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
- "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args)
+#define RTE_LOGTYPE_BNX2X_INIT bnx2x_logtype_init
+#define PMD_INIT_LOG(level, sc, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNX2X_INIT, "[%s] %s() ", \
+ (sc)->devinfo.name RTE_LOG_COMMA __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>")
extern int bnx2x_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "[%s:%d(%s)] " fmt, __func__, __LINE__, \
- (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
-
-#define PMD_DRV_LOG(level, sc, fmt, args...) \
- PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
+#define RTE_LOGTYPE_BNX2X_DRIVER bnx2x_logtype_driver
+#define PMD_DRV_LOG(level, sc, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNX2X_DRIVER, "[%s:%d(%s)] ", \
+ __func__ RTE_LOG_COMMA __LINE__ RTE_LOG_COMMA \
+ (sc)->devinfo.name ? (sc)->devinfo.name : "", __VA_ARGS__)
#ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNX2X_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_RX_LOG(...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNX2X_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_LOG(...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
-#define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \
- rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
- "%s(%s): " fmt "\n", __func__, \
- (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args)
+#define PMD_DEBUG_PERIODIC_LOG(level, sc, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNX2X_DRIVER, "%s(%s): ", \
+ __func__ RTE_LOG_COMMA (sc)->devinfo.name ? (sc)->devinfo.name : "", __VA_ARGS__)
#else
-#define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) do { } while (0)
+#define PMD_DEBUG_PERIODIC_LOG(...) do { } while (0)
#endif
#endif /* _PMD_LOGS_H_ */
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 8ac20961d9..02d21bae53 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1207,8 +1207,8 @@ extern const struct rte_flow_ops bnxt_flow_meter_ops;
extern int bnxt_logtype_driver;
#define RTE_LOGTYPE_BNXT bnxt_logtype_driver
-#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, BNXT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_DRV_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, BNXT, "%s(): ", __func__, __VA_ARGS__)
#define BNXT_LINK_SPEEDS_V2_OPTIONS(f) \
((f) & HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED)
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 0ff1641c19..355d41bbd3 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -357,8 +357,8 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
nb_tx_pkts += txcmp->opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 9f1a02f0ab..c1c3e1ecaf 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -578,8 +578,8 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
nb_tx_pkts += txcmp->opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 6a38c7c6e4..9087fd4e6c 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -548,8 +548,8 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
nb_tx_pkts += opaque;
else
- RTE_LOG_DP(ERR, BNXT,
- "Unhandled CMP type %02x\n",
+ RTE_LOG_DP_LINE(ERR, BNXT,
+ "Unhandled CMP type %02x",
CMP_TYPE(txcmp));
raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
index e688894210..378bbba4e6 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -34,10 +34,10 @@
#define PMD_BOND_XMIT_POLICY_LAYER34_KVARG ("l34")
extern int bond_logtype;
+#define RTE_LOGTYPE_BOND bond_logtype
-#define RTE_BOND_LOG(lvl, msg, ...) \
- rte_log(RTE_LOG_ ## lvl, bond_logtype, \
- "%s(%d) - " msg "\n", __func__, __LINE__, ##__VA_ARGS__)
+#define RTE_BOND_LOG(lvl, ...) \
+ RTE_LOG_LINE_PREFIX(lvl, BOND, "%s(%d) - ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
#define BONDING_MODE_INVALID 0xFF
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 1abc939376..7f885ab521 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -16,11 +16,10 @@
static void bond_mode_8023ad_ext_periodic_cb(void *arg);
#ifdef RTE_LIBRTE_BOND_DEBUG_8023AD
-#define MODE4_DEBUG_LOG(fmt, ...) \
- rte_log(RTE_LOG_DEBUG, bond_logtype, \
- "%6u [Port %u: %s] " fmt "\n", \
- bond_dbg_get_time_diff_ms(), member_id, \
- __func__, ##__VA_ARGS__)
+#define MODE4_DEBUG_LOG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, BOND, "%6u [Port %u: %s] ", \
+ bond_dbg_get_time_diff_ms() RTE_LOG_COMMA member_id RTE_LOG_COMMA __func__, \
+ __VA_ARGS__)
static uint64_t start_time;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 4144c86be4..34131f0e35 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -491,9 +491,9 @@ update_client_stats(uint32_t addr, uint16_t port, uint32_t *TXorRXindicator)
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
#define MODE6_DEBUG(info, src_ip, dst_ip, eth_h, arp_op, port, burstnumber) \
- rte_log(RTE_LOG_DEBUG, bond_logtype, \
+ RTE_LOG_LINE(DEBUG, BOND, \
"%s port:%d SrcMAC:" RTE_ETHER_ADDR_PRT_FMT " SrcIP:%s " \
- "DstMAC:" RTE_ETHER_ADDR_PRT_FMT " DstIP:%s %s %d\n", \
+ "DstMAC:" RTE_ETHER_ADDR_PRT_FMT " DstIP:%s %s %d", \
info, \
port, \
RTE_ETHER_ADDR_BYTES(ð_h->src_addr), \
diff --git a/drivers/net/cpfl/cpfl_logs.h b/drivers/net/cpfl/cpfl_logs.h
index bdfa5c41a5..dc77e4d4c3 100644
--- a/drivers/net/cpfl/cpfl_logs.h
+++ b/drivers/net/cpfl/cpfl_logs.h
@@ -8,22 +8,14 @@
#include <rte_log.h>
extern int cpfl_logtype_init;
+#define RTE_LOGTYPE_CPFL_INIT cpfl_logtype_init
extern int cpfl_logtype_driver;
+#define RTE_LOGTYPE_CPFL_DRIVER cpfl_logtype_driver
#define PMD_INIT_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- cpfl_logtype_init, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE_PREFIX(level, CPFL_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- cpfl_logtype_driver, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE_PREFIX(level, CPFL_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _CPFL_LOGS_H_ */
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index b6c61b8b6b..0006bd33d4 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -216,9 +216,8 @@ dpaa_rx_cb_atomic(void *event,
extern int dpaa_logtype_pmd;
#define RTE_LOGTYPE_DPAA_PMD dpaa_logtype_pmd
-#define DPAA_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \
- __func__, ##args)
+#define DPAA_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, DPAA_PMD, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>")
@@ -232,7 +231,7 @@ extern int dpaa_logtype_pmd;
DPAA_PMD_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA_PMD, fmt, ## args)
+#define DPAA_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA_PMD, __VA_ARGS__)
#endif
diff --git a/drivers/net/dpaa2/dpaa2_pmd_logs.h b/drivers/net/dpaa2/dpaa2_pmd_logs.h
index af895a6b6e..a9317b27eb 100644
--- a/drivers/net/dpaa2/dpaa2_pmd_logs.h
+++ b/drivers/net/dpaa2/dpaa2_pmd_logs.h
@@ -6,15 +6,13 @@
#define _DPAA2_PMD_LOGS_H_
extern int dpaa2_logtype_pmd;
-#define RTE_LOGTYPE_DPAA2_PMD dpaa2_logtype_pmd
+#define RTE_LOGTYPE_DPAA2_NET dpaa2_logtype_pmd
-#define DPAA2_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_logtype_pmd, "dpaa2_net: " \
- fmt "\n", ##args)
+#define DPAA2_PMD_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_NET, __VA_ARGS__)
-#define DPAA2_PMD_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_logtype_pmd, "dpaa2_net: %s(): "\
- fmt "\n", __func__, ##args)
+#define DPAA2_PMD_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_NET, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() DPAA2_PMD_DEBUG(">>")
@@ -28,8 +26,8 @@ extern int dpaa2_logtype_pmd;
DPAA2_PMD_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA2_PMD_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_PMD, fmt, ## args)
+#define DPAA2_PMD_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA2_NET, __VA_ARGS__)
#define DPAA2_PMD_DP_DEBUG(fmt, args...) \
DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index b64232b88f..92e9dd40dc 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -399,7 +399,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd,
mbuf->packet_type = dpaa2_dev_rx_parse(mbuf, hw_annot_addr);
DPAA2_PMD_DP_DEBUG("to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d,"
- "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d\n",
+ "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d",
mbuf, mbuf->buf_addr, mbuf->data_off,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ADDR(fd),
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size,
@@ -446,7 +446,7 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
} else {
temp = rte_pktmbuf_alloc(dpaa2_tx_sg_pool);
if (temp == NULL) {
- DPAA2_PMD_DP_DEBUG("No memory to allocate S/G table\n");
+ DPAA2_PMD_DP_DEBUG("No memory to allocate S/G table");
return -ENOMEM;
}
DPAA2_SET_ONLY_FD_BPID(fd, mempool_to_bpid(dpaa2_tx_sg_pool));
@@ -543,7 +543,7 @@ eth_mbuf_to_fd(struct rte_mbuf *mbuf,
DPAA2_MBUF_TO_CONTIG_FD(mbuf, fd, bpid);
DPAA2_PMD_DP_DEBUG("mbuf =%p, mbuf->buf_addr =%p, off = %d,"
- "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d\n",
+ "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d",
mbuf, mbuf->buf_addr, mbuf->data_off,
DPAA2_GET_FD_OFFSET(fd), DPAA2_GET_FD_ADDR(fd),
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size,
@@ -587,7 +587,7 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
if (rte_dpaa2_mbuf_alloc_bulk(
rte_dpaa2_bpid_info[bpid].bp_list->mp, &mb, 1)) {
- DPAA2_PMD_DP_DEBUG("Unable to allocated DPAA2 buffer\n");
+ DPAA2_PMD_DP_DEBUG("Unable to allocated DPAA2 buffer");
return -1;
}
m = (struct rte_mbuf *)mb;
@@ -609,7 +609,7 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
#endif
DPAA2_PMD_DP_DEBUG(
"mbuf: %p, BMAN buf addr: %p, fdaddr: %" PRIx64 ", bpid: %d,"
- " meta: %d, off: %d, len: %d\n",
+ " meta: %d, off: %d, len: %d",
(void *)mbuf,
mbuf->buf_addr,
DPAA2_GET_FD_ADDR(fd),
@@ -656,7 +656,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
- DPAA2_PMD_DP_DEBUG("VDQ command is not issued.QBMAN is busy\n");
+ DPAA2_PMD_DP_DEBUG("VDQ command is not issued.QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -765,7 +765,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- " QBMAN is busy (1)\n");
+ " QBMAN is busy (1)");
/* Portal was busy, try again */
continue;
}
@@ -861,7 +861,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy (2)\n");
+ "QBMAN is busy (2)");
continue;
}
break;
@@ -1002,7 +1002,7 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG(
- "VDQ command is not issued.QBMAN is busy\n");
+ "VDQ command is not issued.QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -1126,7 +1126,7 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy\n");
+ "QBMAN is busy");
/* Portal was busy, try again */
continue;
}
@@ -1263,7 +1263,7 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
swp = DPAA2_PER_LCORE_PORTAL;
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q->fqid);
#ifdef RTE_LIBRTE_IEEE1588
@@ -1598,7 +1598,7 @@ dpaa2_dev_tx_multi_txq_ordered(void **queue,
}
}
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q[loop]->fqid);
/* Check if the queue is congested */
@@ -1754,7 +1754,7 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
swp = DPAA2_PER_LCORE_PORTAL;
- DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d\n",
+ DPAA2_PMD_DP_DEBUG("===> eth_data =%p, fqid =%d",
eth_data, dpaa2_q->fqid);
/* This would also handle normal and atomic queues as any type
@@ -1989,7 +1989,7 @@ dpaa2_dev_loopback_rx(void *queue,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG(
- "VDQ command not issued.QBMAN busy\n");
+ "VDQ command not issued.QBMAN busy");
/* Portal was busy, try again */
continue;
}
@@ -2071,7 +2071,7 @@ dpaa2_dev_loopback_rx(void *queue,
while (1) {
if (qbman_swp_pull(swp, &pulldesc)) {
DPAA2_PMD_DP_DEBUG("VDQ command is not issued."
- "QBMAN is busy (2)\n");
+ "QBMAN is busy (2)");
continue;
}
break;
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 30b5531069..2060cbdbe3 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -8,35 +8,35 @@
#include <rte_log.h>
extern int e1000_logtype_init;
+#define RTE_LOGTYPE_E1000_INIT e1000_logtype_init
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, E1000_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int e1000_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_E1000_RX e1000_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, E1000_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int e1000_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, e1000_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_E1000_TX e1000_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, E1000_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
extern int e1000_logtype_driver;
#define RTE_LOGTYPE_E1000_DRIVER e1000_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, E1000_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, E1000_DRIVER, "%s(): ", __func__, __VA_ARGS__)
/* log init function shared by e1000 and igb drivers */
void e1000_igb_init_log(void);
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index 5c9ec1772b..a5840131db 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -8,14 +8,14 @@
extern int ena_logtype_init;
#define RTE_LOGTYPE_ENA_INIT ena_logtype_init
-#define PMD_INIT_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_INIT, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_INIT_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENA_INIT, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ena_logtype_rx;
#define RTE_LOGTYPE_ENA_RX ena_logtype_rx
-#define PMD_RX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_RX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_RX_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENA_RX, "%s(): ", __func__, __VA_ARGS__)
#else
#define PMD_RX_LOG_LINE(...) do { } while (0)
#endif
@@ -23,15 +23,15 @@ extern int ena_logtype_rx;
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ena_logtype_tx;
#define RTE_LOGTYPE_ENA_TX ena_logtype_tx
-#define PMD_TX_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_TX, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_TX_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENA_TX, "%s(): ", __func__, __VA_ARGS__)
#else
#define PMD_TX_LOG_LINE(...) do { } while (0)
#endif
extern int ena_logtype_driver;
#define RTE_LOGTYPE_ENA_DRIVER ena_logtype_driver
-#define PMD_DRV_LOG_LINE(level, fmt, ...) \
- RTE_LOG(level, ENA_DRIVER, "%s(): " fmt "\n", __func__, ## __VA_ARGS__)
+#define PMD_DRV_LOG_LINE(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENA_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_platform.h b/drivers/net/ena/ena_platform.h
index 748928b2d9..71190b2932 100644
--- a/drivers/net/ena/ena_platform.h
+++ b/drivers/net/ena/ena_platform.h
@@ -9,7 +9,7 @@
#define ena_assert_msg(cond, msg) \
do { \
if (unlikely(!(cond))) { \
- rte_log(RTE_LOG_ERR, ena_logtype_driver, \
+ RTE_LOG_LINE(ERR, ENA_DRIVER, \
"Assert failed on %s:%s:%d: ", \
__FILE__, __func__, __LINE__); \
rte_panic(msg); \
diff --git a/drivers/net/enetc/enetc_logs.h b/drivers/net/enetc/enetc_logs.h
index 63f6ca4cf4..57bddcf683 100644
--- a/drivers/net/enetc/enetc_logs.h
+++ b/drivers/net/enetc/enetc_logs.h
@@ -6,15 +6,13 @@
#define _ENETC_LOGS_H_
extern int enetc_logtype_pmd;
-#define RTE_LOGTYPE_ENETC_PMD enetc_logtype_pmd
+#define RTE_LOGTYPE_ENETC_NET enetc_logtype_pmd
-#define ENETC_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enetc_logtype_pmd, "enetc_net: " \
- fmt "\n", ##args)
+#define ENETC_PMD_LOG(level, ...) \
+ RTE_LOG_LINE(level, ENETC_NET, __VA_ARGS__)
-#define ENETC_PMD_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, enetc_logtype_pmd, "enetc_net: %s(): "\
- fmt "\n", __func__, ##args)
+#define ENETC_PMD_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, ENETC_NET, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() ENETC_PMD_DEBUG(">>")
@@ -30,8 +28,8 @@ extern int enetc_logtype_pmd;
ENETC_PMD_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define ENETC_PMD_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ENETC_PMD, fmt, ## args)
+#define ENETC_PMD_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, ENETC_NET, __VA_ARGS__)
#define ENETC_PMD_DP_DEBUG(fmt, args...) \
ENETC_PMD_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/net/enetfec/enet_pmd_logs.h b/drivers/net/enetfec/enet_pmd_logs.h
index 270981373f..7580b5c8cc 100644
--- a/drivers/net/enetfec/enet_pmd_logs.h
+++ b/drivers/net/enetfec/enet_pmd_logs.h
@@ -8,12 +8,11 @@
#include <rte_log.h>
extern int enetfec_logtype_pmd;
-#define RTE_LOGTYPE_ENETFEC_PMD enetfec_logtype_pmd
+#define RTE_LOGTYPE_ENETFEC_NET enetfec_logtype_pmd
/* PMD related logs */
-#define ENETFEC_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enetfec_logtype_pmd, "\nfec_net: %s()" \
- fmt "\n", __func__, ##args)
+#define ENETFEC_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENETFEC_NET, "%s()", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() ENET_PMD_LOG(DEBUG, " >>")
@@ -28,7 +27,7 @@ extern int enetfec_logtype_pmd;
ENETFEC_PMD_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define ENETFEC_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, ENETFEC_PMD, fmt, ## args)
+#define ENETFEC_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, ENETFEC_NET, __VA_ARGS__)
#endif /* _ENETFEC_LOGS_H_ */
diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index 7741273037..6d766bcd14 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -26,6 +26,7 @@
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
extern int enic_pmd_logtype;
+#define RTE_LOGTYPE_ENIC_PMD enic_pmd_logtype
#define dev_printk(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, enic_pmd_logtype, \
@@ -36,9 +37,8 @@ extern int enic_pmd_logtype;
#define dev_warning(x, args...) dev_printk(WARNING, args)
#define dev_debug(x, args...) dev_printk(DEBUG, args)
-#define ENICPMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, enic_pmd_logtype, \
- "%s " fmt "\n", __func__, ##args)
+#define ENICPMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ENIC_PMD, "%s ", __func__, __VA_ARGS__)
#define ENICPMD_FUNC_TRACE() ENICPMD_LOG(DEBUG, ">>")
typedef unsigned long long dma_addr_t;
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 53a451c1b1..babea6016e 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -357,12 +357,9 @@ extern int failsafe_mac_from_arg;
#endif
extern int failsafe_logtype;
+#define RTE_LOGTYPE_NET_FAILSAFE failsafe_logtype
-#define LOG__(l, m, ...) \
- rte_log(RTE_LOG_ ## l, failsafe_logtype, \
- "net_failsafe: " m "%c", __VA_ARGS__)
-
-#define LOG_(level, ...) LOG__(level, __VA_ARGS__, '\n')
+#define LOG_(l, ...) RTE_LOG_LINE(l, NET_FAILSAFE, __VA_ARGS__)
#define DEBUG(...) LOG_(DEBUG, __VA_ARGS__)
#define INFO(...) LOG_(INFO, __VA_ARGS__)
#define WARN(...) LOG_(WARNING, __VA_ARGS__)
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index c4c7c977d9..ea1128a4e4 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -8,33 +8,33 @@
#include <rte_log.h>
extern int fm10k_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_FM10K_INIT fm10k_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, FM10K_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int fm10k_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_FM10K_RX fm10k_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, FM10K_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int fm10k_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, fm10k_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_FM10K_TX fm10k_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, FM10K_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
extern int fm10k_logtype_driver;
#define RTE_LOGTYPE_FM10K_DRIVER fm10k_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, FM10K_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, FM10K_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _FM10K_LOGS_H_ */
diff --git a/drivers/net/gve/gve_logs.h b/drivers/net/gve/gve_logs.h
index 0d02da46e1..a3d50fa45c 100644
--- a/drivers/net/gve/gve_logs.h
+++ b/drivers/net/gve/gve_logs.h
@@ -6,9 +6,9 @@
#define _GVE_LOGS_H_
extern int gve_logtype_driver;
+#define RTE_LOGTYPE_GVE_DRIVER gve_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, gve_logtype_driver, "%s(): " fmt "\n", \
- __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, GVE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif
diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index aea332046e..ab9d1b9a02 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -80,14 +80,11 @@ typedef uint64_t dma_addr_t;
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
-/* Reported driver name. */
-#define HINIC_DRIVER_NAME "net_hinic"
-
extern int hinic_logtype;
+#define RTE_LOGTYPE_NET_HINIC hinic_logtype
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hinic_logtype, \
- HINIC_DRIVER_NAME": " fmt "\n", ##args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE(level, NET_HINIC, __VA_ARGS__)
/* common definition */
#ifndef ETH_ALEN
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
index 47d3a13220..d468c353fa 100644
--- a/drivers/net/hns3/hns3_logs.h
+++ b/drivers/net/hns3/hns3_logs.h
@@ -6,47 +6,50 @@
#define HNS3_LOGS_H
extern int hns3_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_HNS3_INIT hns3_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HNS3_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int hns3_logtype_driver;
-#define PMD_DRV_LOG_RAW(hw, level, fmt, args...) \
- rte_log(level, hns3_logtype_driver, "%s %s(): " fmt, \
- (hw)->data->name, __func__, ## args)
+#define RTE_LOGTYPE_HNS3_DRIVER hns3_logtype_driver
+#define PMD_DRV_LOG(hw, level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HNS3_DRIVER, "%s %s(): ", \
+ (hw)->data->name RTE_LOG_COMMA __func__, __VA_ARGS__)
#define hns3_err(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_ERR, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, ERR, fmt, ## args)
#define hns3_warn(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_WARNING, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, WARNING, fmt, ## args)
#define hns3_notice(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_NOTICE, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, NOTICE, fmt, ## args)
#define hns3_info(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_INFO, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, INFO, fmt, ## args)
#define hns3_dbg(hw, fmt, args...) \
- PMD_DRV_LOG_RAW(hw, RTE_LOG_DEBUG, fmt "\n", ## args)
+ PMD_DRV_LOG(hw, DEBUG, fmt, ## args)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int hns3_logtype_rx;
-#define PMD_RX_LOG(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_rx, "%s %s(): " fmt "\n", \
- (hw)->data->name, __func__, ## args)
+#define RTE_LOGTYPE_HNS3_RX hns3_logtype_rx
+#define PMD_RX_LOG(hw, level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HNS3_RX, "%s %s(): ", \
+ (hw)->data->name RTE_LOG_COMMA __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(hw, level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int hns3_logtype_tx;
-#define PMD_TX_LOG(hw, level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hns3_logtype_tx, "%s %s(): " fmt "\n", \
- (hw)->data->name, __func__, ## args)
+#define RTE_LOGTYPE_HNS3_TX hns3_logtype_tx
+#define PMD_TX_LOG(hw, level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HNS3_TX, "%s %s(): ", \
+ (hw)->data->name RTE_LOG_COMMA __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(hw, level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
#endif /* HNS3_LOGS_H */
diff --git a/drivers/net/i40e/i40e_logs.h b/drivers/net/i40e/i40e_logs.h
index fb1f3a4096..d4d33681a6 100644
--- a/drivers/net/i40e/i40e_logs.h
+++ b/drivers/net/i40e/i40e_logs.h
@@ -6,32 +6,32 @@
#define _I40E_LOGS_H_
extern int i40e_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+#define RTE_LOGTYPE_I40E_INIT i40e_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, I40E_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int i40e_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_I40E_RX i40e_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, I40E_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int i40e_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, i40e_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_I40E_TX i40e_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, I40E_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
extern int i40e_logtype_driver;
#define RTE_LOGTYPE_I40E_DRIVER i40e_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, I40E_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, I40E_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _I40E_LOGS_H_ */
diff --git a/drivers/net/iavf/iavf_log.h b/drivers/net/iavf/iavf_log.h
index ff66ab0ccf..4168080812 100644
--- a/drivers/net/iavf/iavf_log.h
+++ b/drivers/net/iavf/iavf_log.h
@@ -6,37 +6,34 @@
#define _IAVF_LOG_H_
extern int iavf_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_init, "%s(): " fmt "\n", \
- __func__, ## args)
+#define RTE_LOGTYPE_IAVF_INIT iavf_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IAVF_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
extern int iavf_logtype_driver;
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_driver, "%s(): " fmt, \
- __func__, ## args)
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+#define RTE_LOGTYPE_IAVF_DRIVER iavf_logtype_driver
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IAVF_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int iavf_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IAVF_RX iavf_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IAVF_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int iavf_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, iavf_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IAVF_TX iavf_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IAVF_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
#endif /* _IAVF_LOG_H_ */
diff --git a/drivers/net/ice/ice_logs.h b/drivers/net/ice/ice_logs.h
index a54e9d8b59..0f5ccba8ff 100644
--- a/drivers/net/ice/ice_logs.h
+++ b/drivers/net/ice/ice_logs.h
@@ -6,34 +6,34 @@
#define _ICE_LOGS_H_
extern int ice_logtype_init;
+#define RTE_LOGTYPE_ICE_INIT ice_logtype_init
extern int ice_logtype_driver;
#define RTE_LOGTYPE_ICE_DRIVER ice_logtype_driver
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_init, "%s(): " fmt "\n", \
- __func__, ##args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ICE_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ice_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_ICE_RX ice_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ICE_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ice_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ice_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_ICE_TX ice_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ICE_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, ICE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ICE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _ICE_LOGS_H_ */
diff --git a/drivers/net/idpf/idpf_logs.h b/drivers/net/idpf/idpf_logs.h
index bf0774b8e4..dd0f0b2375 100644
--- a/drivers/net/idpf/idpf_logs.h
+++ b/drivers/net/idpf/idpf_logs.h
@@ -8,25 +8,14 @@
#include <rte_log.h>
extern int idpf_logtype_init;
+#define RTE_LOGTYPE_IDPF_INIT idpf_logtype_init
extern int idpf_logtype_driver;
+#define RTE_LOGTYPE_IDPF_DRIVER idpf_logtype_driver
#define PMD_INIT_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_logtype_init, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE_PREFIX(level, IDPF_INIT, "%s(): ", __func__, __VA_ARGS__)
-#define PMD_DRV_LOG_RAW(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- idpf_logtype_driver, \
- RTE_FMT("%s(): " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
-
-#define PMD_DRV_LOG(level, fmt, args...) \
- PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IDPF_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _IDPF_LOGS_H_ */
diff --git a/drivers/net/igc/igc_logs.h b/drivers/net/igc/igc_logs.h
index 4a574f10cb..3e6afd9f10 100644
--- a/drivers/net/igc/igc_logs.h
+++ b/drivers/net/igc/igc_logs.h
@@ -12,31 +12,29 @@ extern "C" {
#endif
extern int igc_logtype_init;
+#define RTE_LOGTYPE_IGC_INIT igc_logtype_init
extern int igc_logtype_driver;
#define RTE_LOGTYPE_IGC_DRIVER igc_logtype_driver
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, igc_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IGC_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(...) PMD_DRV_LOG(__VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(...) PMD_DRV_LOG(__VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, IGC_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IGC_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#ifdef __cplusplus
}
diff --git a/drivers/net/ipn3ke/ipn3ke_logs.h b/drivers/net/ipn3ke/ipn3ke_logs.h
index 147fd8039e..42dceeeab1 100644
--- a/drivers/net/ipn3ke/ipn3ke_logs.h
+++ b/drivers/net/ipn3ke/ipn3ke_logs.h
@@ -8,10 +8,10 @@
#include <rte_log.h>
extern int ipn3ke_afu_logtype;
+#define RTE_LOGTYPE_IPN3KE_AFU ipn3ke_afu_logtype
-#define IPN3KE_AFU_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ipn3ke_afu_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define IPN3KE_AFU_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IPN3KE_AFU, "%s(): ", __func__, __VA_ARGS__)
#define IPN3KE_AFU_PMD_FUNC_TRACE() IPN3KE_AFU_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 5a2c5ccde0..150a2ea9f1 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -6,33 +6,33 @@
#define _IXGBE_LOGS_H_
extern int ixgbe_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_IXGBE_INIT ixgbe_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IXGBE_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ixgbe_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IXGBE_RX ixgbe_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IXGBE_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ixgbe_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_IXGBE_TX ixgbe_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IXGBE_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
extern int ixgbe_logtype_driver;
#define RTE_LOGTYPE_IXGBE_DRIVER ixgbe_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, IXGBE_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IXGBE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _IXGBE_LOGS_H_ */
diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h
index 37f654f0e6..41a0ca6dfe 100644
--- a/drivers/net/mana/mana.h
+++ b/drivers/net/mana/mana.h
@@ -466,17 +466,16 @@ struct mana_rxq {
extern int mana_logtype_driver;
#define RTE_LOGTYPE_MANA_DRIVER mana_logtype_driver
extern int mana_logtype_init;
+#define RTE_LOGTYPE_MANA_INIT mana_logtype_init
-#define DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mana_logtype_driver, "%s(): " fmt "\n", \
- __func__, ## args)
+#define DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MANA_DRIVER, "%s(): ", __func__, __VA_ARGS__)
-#define DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, MANA_DRIVER, fmt "\n", ## args)
+#define DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, MANA_DRIVER, __VA_ARGS__)
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mana_logtype_init, "%s(): " fmt "\n",\
- __func__, ## args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MANA_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h
index f21806c811..8e45a3ab78 100644
--- a/drivers/net/memif/rte_eth_memif.h
+++ b/drivers/net/memif/rte_eth_memif.h
@@ -28,10 +28,10 @@
#define MAX_PKT_BURST 32
extern int memif_logtype;
+#define RTE_LOGTYPE_MEMIF memif_logtype
-#define MIF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, memif_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define MIF_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MEMIF, "%s(): ", __func__, __VA_ARGS__)
enum memif_role_t {
MEMIF_ROLE_SERVER,
diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index fca21fd79c..4b3323be8c 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -25,6 +25,7 @@
#endif
extern int mlx4_logtype;
+#define RTE_LOGTYPE_MLX4 mlx4_logtype
#ifdef RTE_LIBRTE_MLX4_DEBUG
@@ -46,12 +47,9 @@ pmd_drv_log_basename(const char *s)
}
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, mlx4_logtype, \
- RTE_FMT("%s:%u: %s(): " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- pmd_drv_log_basename(__FILE__), \
- __LINE__, \
- __func__, \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE_PREFIX(level, MLX4, "%s:%u: %s(): ", \
+ pmd_drv_log_basename(__FILE__) RTE_LOG_COMMA __LINE__ RTE_LOG_COMMA __func__, \
+ __VA_ARGS__)
#define MLX4_ASSERT(exp) RTE_VERIFY(exp)
#define claim_zero(...) MLX4_ASSERT((__VA_ARGS__) == 0)
@@ -63,10 +61,7 @@ pmd_drv_log_basename(const char *s)
*/
#define PMD_DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, mlx4_logtype, \
- RTE_FMT(MLX4_DRIVER_NAME ": " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, MLX4, MLX4_DRIVER_NAME ": " __VA_ARGS__)
#define MLX4_ASSERT(exp) RTE_ASSERT(exp)
#define claim_zero(...) (__VA_ARGS__)
diff --git a/drivers/net/mvneta/mvneta_ethdev.h b/drivers/net/mvneta/mvneta_ethdev.h
index 9e711d8e5a..55859ed5e7 100644
--- a/drivers/net/mvneta/mvneta_ethdev.h
+++ b/drivers/net/mvneta/mvneta_ethdev.h
@@ -83,9 +83,9 @@ struct mvneta_priv {
/** Current log type. */
extern int mvneta_logtype;
+#define RTE_LOGTYPE_MVNETA mvneta_logtype
-#define MVNETA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mvneta_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define MVNETA_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MVNETA, "%s(): ", __func__, __VA_ARGS__)
#endif /* _MVNETA_ETHDEV_H_ */
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index 178b5103ba..8eb6278654 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -200,10 +200,10 @@ extern const struct rte_tm_ops mrvl_tm_ops;
/** Current log type. */
extern int mrvl_logtype;
+#define RTE_LOGTYPE_MRVL mrvl_logtype
-#define MRVL_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, mrvl_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define MRVL_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, MRVL, "%s(): ", __func__, __VA_ARGS__)
extern struct pp2_bpool *dummy_pool[PP2_NUM_PKT_PROC];
diff --git a/drivers/net/netvsc/hn_logs.h b/drivers/net/netvsc/hn_logs.h
index cddadef09c..791c154e01 100644
--- a/drivers/net/netvsc/hn_logs.h
+++ b/drivers/net/netvsc/hn_logs.h
@@ -6,31 +6,29 @@
#include <rte_log.h>
extern int hn_logtype_init;
+#define RTE_LOGTYPE_HN_INIT hn_logtype_init
extern int hn_logtype_driver;
+#define RTE_LOGTYPE_HN_DRIVER hn_logtype_driver
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_init, "%s(): " fmt "\n",\
- __func__, ## args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HN_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_NETVSC_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
- "%s() rx: " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HN_DRIVER, "%s() rx: ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_NETVSC_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
- "%s() tx: " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HN_DRIVER, "%s() tx: ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, hn_logtype_driver, "%s(): " fmt "\n", \
- __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, HN_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _HN_LOGS_H_ */
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 1ba75ee804..b2dae6474a 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -95,8 +95,8 @@ void hn_rndis_dump(const void *buf)
const struct rndis_pktinfo *ppi;
unsigned int ppi_len;
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_PACKET (len %u, data %u:%u, # oob %u %u:%u, pkt %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_PACKET (len %u, data %u:%u, # oob %u %u:%u, pkt %u:%u)",
rndis_msg->pkt.len,
rndis_msg->pkt.dataoffset,
rndis_msg->pkt.datalen,
@@ -116,8 +116,8 @@ void hn_rndis_dump(const void *buf)
ppi_data = ppi->data;
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- " PPI (size %u, type %u, offs %u data %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ " PPI (size %u, type %u, offs %u data %#x)",
ppi->size, ppi->type, ppi->offset,
*(const uint32_t *)ppi_data);
if (ppi->size == 0)
@@ -129,8 +129,8 @@ void hn_rndis_dump(const void *buf)
break;
}
case RNDIS_INITIALIZE_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_INIT (len %u id %#x, ver %u.%u max xfer %u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_INIT (len %u id %#x, ver %u.%u max xfer %u)",
rndis_msg->init_request.len,
rndis_msg->init_request.rid,
rndis_msg->init_request.ver_major,
@@ -139,9 +139,9 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_INITIALIZE_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
"RNDIS_MSG_INIT_C (len %u, id %#x, status 0x%x, vers %u.%u, "
- "flags %d, max xfer %u, max pkts %u, aligned %u)\n",
+ "flags %d, max xfer %u, max pkts %u, aligned %u)",
rndis_msg->init_complete.len,
rndis_msg->init_complete.rid,
rndis_msg->init_complete.status,
@@ -154,14 +154,14 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_HALT_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_HALT (len %u id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_HALT (len %u id %#x)",
rndis_msg->halt.len, rndis_msg->halt.rid);
break;
case RNDIS_QUERY_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_QUERY (len %u, id %#x, oid %#x, info %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_QUERY (len %u, id %#x, oid %#x, info %u:%u)",
rndis_msg->query_request.len,
rndis_msg->query_request.rid,
rndis_msg->query_request.oid,
@@ -170,8 +170,8 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_QUERY_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_QUERY_C (len %u, id %#x, status 0x%x, buf %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_QUERY_C (len %u, id %#x, status 0x%x, buf %u:%u)",
rndis_msg->query_complete.len,
rndis_msg->query_complete.rid,
rndis_msg->query_complete.status,
@@ -180,8 +180,8 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_SET_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_SET (len %u, id %#x, oid %#x, info %u:%u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_SET (len %u, id %#x, oid %#x, info %u:%u)",
rndis_msg->set_request.len,
rndis_msg->set_request.rid,
rndis_msg->set_request.oid,
@@ -190,16 +190,16 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_SET_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_SET_C (len %u, id 0x%x, status 0x%x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_SET_C (len %u, id 0x%x, status 0x%x)",
rndis_msg->set_complete.len,
rndis_msg->set_complete.rid,
rndis_msg->set_complete.status);
break;
case RNDIS_INDICATE_STATUS_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_MSG_INDICATE (len %u, status %#x, buf len %u, buf offset %u)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_MSG_INDICATE (len %u, status %#x, buf len %u, buf offset %u)",
rndis_msg->indicate_status.len,
rndis_msg->indicate_status.status,
rndis_msg->indicate_status.stbuflen,
@@ -207,38 +207,38 @@ void hn_rndis_dump(const void *buf)
break;
case RNDIS_RESET_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_RESET (len %u, id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_RESET (len %u, id %#x)",
rndis_msg->reset_request.len,
rndis_msg->reset_request.rid);
break;
case RNDIS_RESET_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_RESET_C (len %u, status %#x address %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_RESET_C (len %u, status %#x address %#x)",
rndis_msg->reset_complete.len,
rndis_msg->reset_complete.status,
rndis_msg->reset_complete.adrreset);
break;
case RNDIS_KEEPALIVE_MSG:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_KEEPALIVE (len %u, id %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_KEEPALIVE (len %u, id %#x)",
rndis_msg->keepalive_request.len,
rndis_msg->keepalive_request.rid);
break;
case RNDIS_KEEPALIVE_CMPLT:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS_KEEPALIVE_C (len %u, id %#x address %#x)\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS_KEEPALIVE_C (len %u, id %#x address %#x)",
rndis_msg->keepalive_complete.len,
rndis_msg->keepalive_complete.rid,
rndis_msg->keepalive_complete.status);
break;
default:
- rte_log(RTE_LOG_DEBUG, hn_logtype_driver,
- "RNDIS type %#x len %u\n",
+ RTE_LOG_LINE(DEBUG, HN_DRIVER,
+ "RNDIS type %#x len %u",
rndis_msg->hdr.type,
rndis_msg->hdr.len);
break;
diff --git a/drivers/net/nfb/nfb.h b/drivers/net/nfb/nfb.h
index ca0b647571..a8b24ff822 100644
--- a/drivers/net/nfb/nfb.h
+++ b/drivers/net/nfb/nfb.h
@@ -13,9 +13,9 @@
#include <netcope/txmac.h>
extern int nfb_logtype;
-#define NFB_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfb_logtype, "%s(): " fmt "\n", \
- __func__, ## args)
+#define RTE_LOGTYPE_NFB nfb_logtype
+#define NFB_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFB, "%s(): ", __func__, __VA_ARGS__)
#include "nfb_rx.h"
#include "nfb_tx.h"
diff --git a/drivers/net/nfp/nfp_logs.h b/drivers/net/nfp/nfp_logs.h
index 690adabffd..2b31798d73 100644
--- a/drivers/net/nfp/nfp_logs.h
+++ b/drivers/net/nfp/nfp_logs.h
@@ -9,36 +9,36 @@
#include <rte_log.h>
extern int nfp_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_INIT nfp_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_INIT, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int nfp_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_rx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_RX nfp_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int nfp_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_tx, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_TX nfp_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
extern int nfp_logtype_cpp;
-#define PMD_CPP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_cpp, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_CPP nfp_logtype_cpp
+#define PMD_CPP_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_CPP, "%s(): ", __func__, __VA_ARGS__)
extern int nfp_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_DRIVER nfp_logtype_driver
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* __NFP_LOGS_H__ */
diff --git a/drivers/net/ngbe/ngbe_logs.h b/drivers/net/ngbe/ngbe_logs.h
index e5165ffd60..f6c1ee66d9 100644
--- a/drivers/net/ngbe/ngbe_logs.h
+++ b/drivers/net/ngbe/ngbe_logs.h
@@ -10,31 +10,31 @@
* PMD_USER_LOG: for user
*/
extern int ngbe_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_NGBE_INIT ngbe_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NGBE_INIT, "%s(): ", __func__, __VA_ARGS__)
extern int ngbe_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_driver, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_NGBE_DRIVER ngbe_logtype_driver
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NGBE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ngbe_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_NGBE_RX ngbe_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NGBE_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_ETHDEV_DEBUG_TX
extern int ngbe_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ngbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_NGBE_TX ngbe_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NGBE_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
#define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index f4ed3b8a7f..6764cf2ec1 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -76,10 +76,10 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE);
+#define RTE_LOGTYPE_ETH_NULL eth_null_logtype
-#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_null_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ETH_NULL, "%s(): ", __func__, __VA_ARGS__)
static uint16_t
eth_null_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
diff --git a/drivers/net/octeon_ep/otx_ep_common.h b/drivers/net/octeon_ep/otx_ep_common.h
index 7d5dd91a77..122926cd40 100644
--- a/drivers/net/octeon_ep/otx_ep_common.h
+++ b/drivers/net/octeon_ep/otx_ep_common.h
@@ -67,20 +67,17 @@
#define OTX_EP_MAX_IOQS_PER_VF 8
#define OTX_CUST_DATA_LEN 0
-#define otx_ep_info(fmt, args...) \
- rte_log(RTE_LOG_INFO, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
- __func__, __LINE__, ##args)
-
-#define otx_ep_err(fmt, args...) \
- rte_log(RTE_LOG_ERR, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
- __func__, __LINE__, ##args)
-
-#define otx_ep_dbg(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, otx_net_ep_logtype, \
- "%s():%u " fmt "\n", \
- __func__, __LINE__, ##args)
+#define otx_ep_info(...) \
+ RTE_LOG_LINE_PREFIX(INFO, OTX_NET_EP, "%s():%u ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
+
+#define otx_ep_err(...) \
+ RTE_LOG_LINE_PREFIX(ERR, OTX_NET_EP, "%s():%u ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
+
+#define otx_ep_dbg(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, OTX_NET_EP, "%s():%u ", \
+ __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
/* IO Access */
#define oct_ep_read64(addr) rte_read64_relaxed((void *)(addr))
diff --git a/drivers/net/octeon_ep/otx_ep_rxtx.c b/drivers/net/octeon_ep/otx_ep_rxtx.c
index 9680a59797..09ed3c8da0 100644
--- a/drivers/net/octeon_ep/otx_ep_rxtx.c
+++ b/drivers/net/octeon_ep/otx_ep_rxtx.c
@@ -916,9 +916,9 @@ otx_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
next_fetch = (pkts == new_pkts - 1) ? 0 : 1;
oq_pkt = otx_ep_droq_read_packet(otx_ep, droq, next_fetch);
if (!oq_pkt) {
- RTE_LOG_DP(ERR, OTX_NET_EP,
+ RTE_LOG_DP_LINE(ERR, OTX_NET_EP,
"DROQ read pkt failed pending %" PRIu64
- "last_pkt_count %" PRIu64 "new_pkts %d.\n",
+ "last_pkt_count %" PRIu64 "new_pkts %d.",
droq->pkts_pending, droq->last_pkt_count,
new_pkts);
droq->stats.rx_err++;
diff --git a/drivers/net/octeontx/octeontx_logs.h b/drivers/net/octeontx/octeontx_logs.h
index b58f296478..2ebec8d3f8 100644
--- a/drivers/net/octeontx/octeontx_logs.h
+++ b/drivers/net/octeontx/octeontx_logs.h
@@ -5,22 +5,19 @@
#ifndef __OCTEONTX_LOGS_H__
#define __OCTEONTX_LOGS_H__
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OTX_NET_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OTX_NET_DRIVER, "%s(): ", __func__, __VA_ARGS__)
-#define PMD_MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, otx_net_logtype_mbox, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_MBOX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, OTX_NET_MBOX, "%s(): ", __func__, __VA_ARGS__)
-#define octeontx_log_info(fmt, args...) \
- RTE_LOG(INFO, OTX_NET_DRIVER, fmt "\n", ## args)
+#define octeontx_log_info(...) \
+ RTE_LOG_LINE(INFO, OTX_NET_DRIVER, __VA_ARGS__)
#define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__)
#define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__)
@@ -30,8 +27,10 @@
#define PMD_TX_LOG PMD_DRV_LOG
extern int otx_net_logtype_init;
+#define RTE_LOGTYPE_OTX_NET_INIT otx_net_logtype_init
extern int otx_net_logtype_driver;
#define RTE_LOGTYPE_OTX_NET_DRIVER otx_net_logtype_driver
extern int otx_net_logtype_mbox;
+#define RTE_LOGTYPE_OTX_NET_MBOX otx_net_logtype_mbox
#endif /* __OCTEONTX_LOGS_H__*/
diff --git a/drivers/net/pcap/pcap_osdep.h b/drivers/net/pcap/pcap_osdep.h
index bf41cba982..2aa13f3629 100644
--- a/drivers/net/pcap/pcap_osdep.h
+++ b/drivers/net/pcap/pcap_osdep.h
@@ -7,10 +7,10 @@
#include <rte_ether.h>
-#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_pcap_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ETH_PCAP, "%s(): ", __func__, __VA_ARGS__)
extern int eth_pcap_logtype;
+#define RTE_LOGTYPE_ETH_PCAP eth_pcap_logtype
int osdep_iface_index_get(const char *name);
int osdep_iface_mac_get(const char *name, struct rte_ether_addr *mac);
diff --git a/drivers/net/pfe/pfe_logs.h b/drivers/net/pfe/pfe_logs.h
index 369a50bec5..d0b6943a26 100644
--- a/drivers/net/pfe/pfe_logs.h
+++ b/drivers/net/pfe/pfe_logs.h
@@ -6,12 +6,11 @@
#define _PFE_LOGS_H_
extern int pfe_logtype_pmd;
-#define RTE_LOGTYPE_PFE_PMD pfe_logtype_pmd
+#define RTE_LOGTYPE_PFE_NET pfe_logtype_pmd
/* PMD related logs */
-#define PFE_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, pfe_logtype_pmd, "pfe_net: %s()" \
- fmt "\n", __func__, ##args)
+#define PFE_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, PFE_NET, "%s()", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PFE_PMD_LOG(DEBUG, " >>")
@@ -26,7 +25,7 @@ extern int pfe_logtype_pmd;
PFE_PMD_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define PFE_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, PFE_PMD, fmt, ## args)
+#define PFE_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, PFE_NET, __VA_ARGS__)
#endif /* _PFE_LOGS_H_ */
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 1346a0dba3..146bdc8e02 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -68,10 +68,10 @@ static struct rte_eth_link pmd_link = {
};
RTE_LOG_REGISTER_DEFAULT(eth_ring_logtype, NOTICE);
+#define RTE_LOGTYPE_ETH_RING eth_ring_logtype
-#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, eth_ring_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, ETH_RING, "%s(): ", __func__, __VA_ARGS__)
static uint16_t
eth_ring_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 1b90cf7a21..2147ea35f6 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -51,10 +51,10 @@ static const struct softnic_conn_params conn_params_default = {
};
RTE_LOG_REGISTER_DEFAULT(pmd_softnic_logtype, NOTICE);
+#define RTE_LOGTYPE_PMD_SOFTNIC pmd_softnic_logtype
-#define PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \
- "%s(): " fmt "\n", __func__, ##args)
+#define PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, PMD_SOFTNIC, "%s(): ", __func__, __VA_ARGS__)
static int
pmd_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
diff --git a/drivers/net/tap/tap_log.h b/drivers/net/tap/tap_log.h
index fa06843a4c..847d89050c 100644
--- a/drivers/net/tap/tap_log.h
+++ b/drivers/net/tap/tap_log.h
@@ -4,7 +4,7 @@
*/
extern int tap_logtype;
+#define RTE_LOGTYPE_TAP tap_logtype
-#define TAP_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, tap_logtype, "%s(): " fmt "\n", \
- __func__, ## args)
+#define TAP_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TAP, "%s(): ", __func__, __VA_ARGS__)
diff --git a/drivers/net/thunderx/nicvf_logs.h b/drivers/net/thunderx/nicvf_logs.h
index 3c455b4288..7f162b34a4 100644
--- a/drivers/net/thunderx/nicvf_logs.h
+++ b/drivers/net/thunderx/nicvf_logs.h
@@ -19,26 +19,26 @@
#define NICVF_TX_ASSERT(x) do { } while (0)
#endif
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NICVF_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NICVF_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
-#define PMD_MBOX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nicvf_logtype_mbox, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_MBOX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NICVF_MBOX, "%s(): ", __func__, __VA_ARGS__)
#define PMD_MBOX_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#define PMD_RX_LOG PMD_DRV_LOG
#define PMD_TX_LOG PMD_DRV_LOG
extern int nicvf_logtype_init;
+#define RTE_LOGTYPE_NICVF_INIT nicvf_logtype_init
extern int nicvf_logtype_driver;
+#define RTE_LOGTYPE_NICVF_DRIVER nicvf_logtype_driver
extern int nicvf_logtype_mbox;
+#define RTE_LOGTYPE_NICVF_MBOX nicvf_logtype_mbox
#endif /* __THUNDERX_NICVF_LOGS__ */
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index b5a5a9233f..e6e570734c 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -12,40 +12,41 @@
* PMD_USER_LOG: for user
*/
extern int txgbe_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_TXGBE_INIT txgbe_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TXGBE_INIT, "%s(): ", __func__, __VA_ARGS__)
extern int txgbe_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_driver, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_TXGBE_DRIVER txgbe_logtype_driver
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TXGBE_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#ifdef RTE_LIBRTE_TXGBE_DEBUG_RX
extern int txgbe_logtype_rx;
-#define PMD_RX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_rx, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_TXGBE_RX txgbe_logtype_rx
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TXGBE_RX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_RX_LOG(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_TXGBE_DEBUG_TX
extern int txgbe_logtype_tx;
-#define PMD_TX_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_tx, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_TXGBE_TX txgbe_logtype_tx
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TXGBE_TX, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_LOG(...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_TXGBE_DEBUG_TX_FREE
extern int txgbe_logtype_tx_free;
-#define PMD_TX_FREE_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, txgbe_logtype_tx_free, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_TXGBE_TX_FREE txgbe_logtype_tx_free
+#define RTE_LOGTYPE_TXGBE_TX txgbe_logtype_tx
+#define PMD_TX_FREE_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, TXGBE_TX_FREE, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
+#define PMD_TX_FREE_LOG(...) do { } while (0)
#endif
#define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index c3e045d892..f4a84783ce 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -49,13 +49,10 @@
#define NETVSC_MAX_ROUTE_LINE_SIZE 300
RTE_LOG_REGISTER_DEFAULT(vdev_netvsc_logtype, NOTICE);
+#define RTE_LOGTYPE_VDEV_NETVSC vdev_netvsc_logtype
#define DRV_LOG(level, ...) \
- rte_log(RTE_LOG_ ## level, \
- vdev_netvsc_logtype, \
- RTE_FMT(VDEV_NETVSC_DRIVER_NAME ": " \
- RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__,)))
+ RTE_LOG_LINE(level, VDEV_NETVSC, __VA_ARGS__)
/** Context structure for a vdev_netvsc instance. */
struct vdev_netvsc_ctx {
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 6ccb228872..87c05caccd 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -25,8 +25,7 @@ RTE_LOG_REGISTER_DEFAULT(vhost_logtype, NOTICE);
#define RTE_LOGTYPE_VHOST vhost_logtype
#define VHOST_LOG_LINE(level, ...) \
- RTE_LOG(level, VHOST, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \
- RTE_FMT_TAIL(__VA_ARGS__ ,)))
+ RTE_LOG_LINE(level, VHOST, __VA_ARGS__)
enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
index 01911514bd..dea1a7ac11 100644
--- a/drivers/net/virtio/virtio_logs.h
+++ b/drivers/net/virtio/virtio_logs.h
@@ -8,30 +8,29 @@
#include <rte_log.h>
extern int virtio_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
- "%s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_VIRTIO_INIT virtio_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, VIRTIO_DRIVER, "%s() rx: " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_DRIVER, "%s() rx: ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_RX_LOG(...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VIRTIO_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, VIRTIO_DRIVER, "%s() tx: " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_DRIVER, "%s() tx: ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_LOG(...) do { } while(0)
#endif
extern int virtio_logtype_driver;
#define RTE_LOGTYPE_VIRTIO_DRIVER virtio_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, virtio_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VIRTIO_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _VIRTIO_LOGS_H_ */
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 5962325d62..43a982cdf5 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -6,36 +6,35 @@
#define _VMXNET3_LOGS_H_
extern int vmxnet3_logtype_init;
-#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
- "%s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_VMXNET3_INIT vmxnet3_logtype_init
+#define PMD_INIT_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMXNET3_INIT, "%s(): ", __func__, __VA_ARGS__)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_RX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMXNET3_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_RX_LOG(...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMXNET3_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_LOG(...) do { } while(0)
#endif
#ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE
-#define PMD_TX_FREE_LOG(level, fmt, args...) \
- RTE_LOG(level, VMXNET3_DRIVER, "%s(): " fmt "\n", __func__, ## args)
+#define PMD_TX_FREE_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMXNET3_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#else
-#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_FREE_LOG(...) do { } while(0)
#endif
extern int vmxnet3_logtype_driver;
#define RTE_LOGTYPE_VMXNET3_DRIVER vmxnet3_logtype_driver
-#define PMD_DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
- "%s(): " fmt "\n", __func__, ## args)
+#define PMD_DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, VMXNET3_DRIVER, "%s(): ", __func__, __VA_ARGS__)
#endif /* _VMXNET3_LOGS_H_ */
diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
index 790b4d2a5a..f668e6ea82 100644
--- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
+++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h
@@ -27,10 +27,10 @@ extern "C" {
#endif
extern int cnxk_logtype_bphy;
+#define RTE_LOGTYPE_CNXK_BPHY cnxk_logtype_bphy
-#define CNXK_BPHY_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cnxk_logtype_bphy, \
- "%s(): " fmt "\n", __func__, ## args)
+#define CNXK_BPHY_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, CNXK_BPHY, "%s(): ", __func__, __VA_ARGS__)
/** Available message types */
enum cnxk_bphy_cgx_msg_type {
diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.h b/drivers/raw/cnxk_gpio/cnxk_gpio.h
index 336d7ac373..94c8e36977 100644
--- a/drivers/raw/cnxk_gpio/cnxk_gpio.h
+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.h
@@ -6,9 +6,10 @@
#define _CNXK_GPIO_H_
extern int cnxk_logtype_gpio;
+#define RTE_LOGTYPE_CNXK_GPIO cnxk_logtype_gpio
-#define CNXK_GPIO_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, cnxk_logtype_gpio, fmt "\n", ## args)
+#define CNXK_GPIO_LOG(level, ...) \
+ RTE_LOG_LINE(level, CNXK_GPIO, __VA_ARGS__)
struct cnxk_gpiochip;
diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
index f5f2455413..66108e0667 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h
@@ -12,13 +12,11 @@ extern "C" {
extern int dpaa2_cmdif_logtype;
#define RTE_LOGTYPE_DPAA2_CMDIF dpaa2_cmdif_logtype
-#define DPAA2_CMDIF_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, dpaa2_cmdif_logtype, "dpaa2_cmdif: " \
- fmt "\n", ## args)
+#define DPAA2_CMDIF_LOG(level, ...) \
+ RTE_LOG_LINE(level, DPAA2_CMDIF, __VA_ARGS__)
-#define DPAA2_CMDIF_DEBUG(fmt, args...) \
- rte_log(RTE_LOG_DEBUG, dpaa2_cmdif_logtype, "dpaa2_cmdif: %s(): " \
- fmt "\n", __func__, ## args)
+#define DPAA2_CMDIF_DEBUG(...) \
+ RTE_LOG_LINE_PREFIX(DEBUG, DPAA2_CMDIF, "%s(): ", __func__, __VA_ARGS__)
#define DPAA2_CMDIF_FUNC_TRACE() DPAA2_CMDIF_DEBUG(">>")
@@ -30,8 +28,8 @@ extern int dpaa2_cmdif_logtype;
DPAA2_CMDIF_LOG(WARNING, fmt, ## args)
/* DP Logs, toggled out at compile time if level lower than current level */
-#define DPAA2_CMDIF_DP_LOG(level, fmt, args...) \
- RTE_LOG_DP(level, DPAA2_CMDIF, "dpaa2_cmdif: " fmt "\n", ## args)
+#define DPAA2_CMDIF_DP_LOG(level, ...) \
+ RTE_LOG_DP_LINE(level, DPAA2_CMDIF, __VA_ARGS__)
#define DPAA2_CMDIF_DP_DEBUG(fmt, args...) \
DPAA2_CMDIF_DP_LOG(DEBUG, fmt, ## args)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 0fb66cbaae..c733ffcb41 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -6,12 +6,12 @@
#define _IFPGA_RAWDEV_H_
extern int ifpga_rawdev_logtype;
+#define RTE_LOGTYPE_IFPGA_RAWDEV ifpga_rawdev_logtype
#define IFPGA_RAWDEV_NAME_FMT "IFPGA:%02x:%02x.%x"
-#define IFPGA_RAWDEV_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define IFPGA_RAWDEV_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IFPGA_RAWDEV, "%s(): ", __func__, __VA_ARGS__)
#define IFPGA_RAWDEV_PMD_FUNC_TRACE() IFPGA_RAWDEV_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/raw/ntb/ntb.h b/drivers/raw/ntb/ntb.h
index 563ceddf18..8c7a2230f9 100644
--- a/drivers/raw/ntb/ntb.h
+++ b/drivers/raw/ntb/ntb.h
@@ -8,10 +8,10 @@
#include <stdbool.h>
extern int ntb_logtype;
+#define RTE_LOGTYPE_NTB ntb_logtype
-#define NTB_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ntb_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define NTB_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NTB, "%s(): ", __func__, __VA_ARGS__)
/* Vendor ID */
#define NTB_INTEL_VENDOR_ID 0x8086
diff --git a/drivers/raw/skeleton/skeleton_rawdev.h b/drivers/raw/skeleton/skeleton_rawdev.h
index c3f92e72ab..53f21212a2 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.h
+++ b/drivers/raw/skeleton/skeleton_rawdev.h
@@ -8,10 +8,10 @@
#include <rte_rawdev.h>
extern int skeleton_pmd_logtype;
+#define RTE_LOGTYPE_SKELETON_PMD skeleton_pmd_logtype
-#define SKELETON_PMD_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_pmd_logtype, "%s(): " fmt "\n", \
- __func__, ##args)
+#define SKELETON_PMD_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, SKELETON_PMD, "%s(): ", __func__, __VA_ARGS__)
#define SKELETON_PMD_FUNC_TRACE() SKELETON_PMD_LOG(DEBUG, ">>")
diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index b7a7f623aa..ebbaabff4d 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -18,9 +18,8 @@
#define TEST_DEV_NAME "rawdev_skeleton"
-#define SKELDEV_LOGS(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, skeleton_pmd_logtype, fmt "\n", \
- ##args)
+#define SKELDEV_LOGS(level, ...) \
+ RTE_LOG_LINE(level, SKELETON_PMD, __VA_ARGS__)
#define SKELDEV_TEST_INFO(fmt, args...) \
SKELDEV_LOGS(INFO, fmt, ## args)
diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c
index 8479172bfa..54067f94aa 100644
--- a/drivers/vdpa/ifc/base/ifcvf.c
+++ b/drivers/vdpa/ifc/base/ifcvf.c
@@ -224,10 +224,10 @@ ifcvf_enable_mq(struct ifcvf_hw *hw)
if (mq_cfg) {
if (hw->device_type == IFCVF_BLK) {
*(u32 *)mq_cfg = nr_queue;
- RTE_LOG(INFO, IFCVF_VDPA, "%d queues are enabled\n", nr_queue);
+ RTE_LOG_LINE(INFO, IFCVF_VDPA, "%d queues are enabled", nr_queue);
} else {
*(u32 *)mq_cfg = nr_queue / 2;
- RTE_LOG(INFO, IFCVF_VDPA, "%d queue pairs are enabled\n",
+ RTE_LOG_LINE(INFO, IFCVF_VDPA, "%d queue pairs are enabled",
nr_queue / 2);
}
}
@@ -246,7 +246,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i)
cfg = hw->common_cfg;
if (!cfg) {
- RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n");
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.");
return -1;
}
@@ -258,7 +258,7 @@ ifcvf_enable_vring_hw(struct ifcvf_hw *hw, int i)
IFCVF_WRITE_REG16(i + 1, &cfg->queue_msix_vector);
msix_vector = IFCVF_READ_REG16(&cfg->queue_msix_vector);
if (msix_vector == IFCVF_MSI_NO_VECTOR) {
- RTE_LOG(ERR, IFCVF_VDPA, "queue %d, msix vec alloc failed\n",
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "queue %d, msix vec alloc failed",
i);
return -1;
}
@@ -307,7 +307,7 @@ ifcvf_disable_vring_hw(struct ifcvf_hw *hw, int i)
cfg = hw->common_cfg;
if (!cfg) {
- RTE_LOG(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.\n");
+ RTE_LOG_LINE(ERR, IFCVF_VDPA, "common_cfg in HW is NULL.");
return;
}
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 2958368813..65de383b95 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -33,9 +33,9 @@
#define MIN(v1, v2) ((v1) < (v2) ? (v1) : (v2))
RTE_LOG_REGISTER(ifcvf_vdpa_logtype, pmd.vdpa.ifcvf, NOTICE);
-#define DRV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, ifcvf_vdpa_logtype, \
- "IFCVF %s(): " fmt "\n", __func__, ##args)
+#define RTE_LOGTYPE_IFCVF_VDPA ifcvf_vdpa_logtype
+#define DRV_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, IFCVF_VDPA, "%s(): ", __func__, __VA_ARGS__)
#define IFCVF_USED_RING_LEN(size) \
((size) * sizeof(struct vring_used_elem) + sizeof(uint16_t) * 3)
diff --git a/drivers/vdpa/nfp/nfp_vdpa_log.h b/drivers/vdpa/nfp/nfp_vdpa_log.h
index cf342329b1..8fa4e3b2a0 100644
--- a/drivers/vdpa/nfp/nfp_vdpa_log.h
+++ b/drivers/vdpa/nfp/nfp_vdpa_log.h
@@ -9,13 +9,13 @@
#include <rte_log.h>
extern int nfp_logtype_vdpa;
-#define DRV_VDPA_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_vdpa, \
- "NFP_VDPA: %s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_VDPA nfp_logtype_vdpa
+#define DRV_VDPA_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_VDPA, "%s(): ", __func__, __VA_ARGS__)
extern int nfp_logtype_core;
-#define DRV_CORE_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, nfp_logtype_core, \
- "NFP_CORE: %s(): " fmt "\n", __func__, ## args)
+#define RTE_LOGTYPE_NFP_CORE nfp_logtype_core
+#define DRV_CORE_LOG(level, ...) \
+ RTE_LOG_LINE_PREFIX(level, NFP_CORE, "%s(): ", __func__, __VA_ARGS__)
#endif /* __NFP_VDPA_LOG_H__ */
--
2.46.0
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 01/14] devtools: fix forbidden token check with multiple files
2024-09-12 8:26 ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
@ 2024-09-12 13:54 ` Thomas Monjalon
0 siblings, 0 replies; 47+ messages in thread
From: Thomas Monjalon @ 2024-09-12 13:54 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Andrzej Ostruszka, Arnon Warshavsky
12/09/2024 10:26, David Marchand:
> --- a/devtools/check-forbidden-tokens.awk
> +++ b/devtools/check-forbidden-tokens.awk
> @@ -32,14 +32,11 @@ BEGIN {
> for (i in deny_expr) {
> forbidden_added = "^\\+.*" deny_expr[i];
> forbidden_removed="^-.*" deny_expr[i];
> - current = expressions[deny_expr[i]]
> if ($0 ~ forbidden_added) {
> - count = count + 1;
> - expressions[deny_expr[i]] = current + 1
> + count = count + 1
> }
> if ($0 ~ forbidden_removed) {
> - count = count - 1;
> - expressions[deny_expr[i]] = current - 1
> + count = count - 1
> }
> }
> }
> @@ -55,6 +52,7 @@ BEGIN {
While at it, you could insert a missing space in "previous filehad new additions"
few lines above.
> if (count > 0) {
> exit;
> }
> + count = 0
I'm not an awk expert, but it looks simple enough.
Thank you
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 02/14] devtools: report all warnings in forbidden token check
2024-09-12 8:26 ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
@ 2024-09-12 14:10 ` Thomas Monjalon
0 siblings, 0 replies; 47+ messages in thread
From: Thomas Monjalon @ 2024-09-12 14:10 UTC (permalink / raw)
To: David Marchand; +Cc: dev
12/09/2024 10:26, David Marchand:
> Do not stop at the first file that got warnings.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
It is always better to get all issues in one pass.
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 00/14] Use RTE_LOG_LINE in drivers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (13 preceding siblings ...)
2024-09-12 8:26 ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
@ 2024-09-16 9:32 ` David Marchand
2024-09-16 15:13 ` Patrick Robb
2024-10-04 13:04 ` David Marchand
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-09-16 9:32 UTC (permalink / raw)
To: dev, Patrick Robb
On Thu, Sep 12, 2024 at 10:27 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> This is a continuation of the cleanup effort in logging macros.
>
> As a reminder of what this series is about, RTE_LOG_LINE() has been
> introduced to check that the format string does not contain a trailing \n.
> The goal was to prevent from:
> - introducing multilines log messages (ugly and unhelpful for lambda
> users),
> - introducing double \n in logs,
> - introducing missing \n in logs,
>
> I have built/maintained this series for fixing drivers/ since the
> beginning of the year and I hope we can merge this series early in
> 24.11.
>
> Some drivers are not converted because of multiple inconsistencies.
> Those may be fixed later.
>
> As for the changes on lib/, new macros have been introduced so that
> backports trigger a build error and force the backport to adjust the
> patches containing logs accordingly.
>
>
> Most of the changes have been done with some scripting, but it is likely
> there are some errors and I hope driver maintainers will review in
> depth.
>
>
> A check is added for drivers/ in the hope that new drivers don't
> introduce more mess.
>
> Yet, sometimes it is not possible to fix macros (a good example
> is base/ drivers code...), so the check skips *osdep.h headers where
> calls to RTE_LOG() may be accepted.
One note, there is an issue with the crypto_perf_cryptodev_perf test
in (legacy) DTS.
It (non explicitly) relied on the presence of an extra empty line, and
the fact that a line would not contain special chars like : (what a
joy..).
I posted a fix for DTS.
https://patchwork.dpdk.org/project/dts/patch/20240916092515.1851927-1-david.marchand@redhat.com/
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 00/14] Use RTE_LOG_LINE in drivers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (14 preceding siblings ...)
2024-09-16 9:32 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
@ 2024-09-16 15:13 ` Patrick Robb
2024-10-04 13:04 ` David Marchand
16 siblings, 0 replies; 47+ messages in thread
From: Patrick Robb @ 2024-09-16 15:13 UTC (permalink / raw)
To: dev; +Cc: David Marchand
Recheck-request: iol-intel-Functional
Rerunning with David's DTS patch mentioned above.
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 03/14] net/dpaa: remove broken debug macros
2024-09-12 8:26 ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
@ 2024-10-01 10:18 ` Thomas Monjalon
2024-10-01 12:08 ` David Marchand
0 siblings, 1 reply; 47+ messages in thread
From: Thomas Monjalon @ 2024-10-01 10:18 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Hemant Agrawal, Sachin Saxena
12/09/2024 10:26, David Marchand:
> Those debug macros never worked as existing callers never passed a
> 'level' argument.
> Remove them.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/dpaa/fmlib/fm_ext.h | 21 ++-------------------
> 1 file changed, 2 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h
> index 8e7153bdaf..4666fa3b0b 100644
> --- a/drivers/net/dpaa/fmlib/fm_ext.h
> +++ b/drivers/net/dpaa/fmlib/fm_ext.h
> @@ -15,25 +15,8 @@
> #define MODULE_FM 0x00010000
> #define __ERR_MODULE__ MODULE_FM
>
> -/* #define FM_LIB_DBG */
> -
> -#if defined(FM_LIB_DBG)
> - #define _fml_dbg(fmt, args...) \
> - rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
> - __func__, ##args)
> -#else
> - #define _fml_dbg(arg...)
> -#endif
> -
> -/*#define FM_IOCTL_DBG*/
> -
> -#if defined(FM_IOCTL_DBG)
> - #define _fm_ioctl_dbg(fmt, args...) \
> - rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
> - __func__, ##args)
> -#else
> - #define _fm_ioctl_dbg(arg...)
> -#endif
> +#define _fml_dbg(...)
> +#define _fm_ioctl_dbg(...)
Why not removing the calls to these macros?
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 03/14] net/dpaa: remove broken debug macros
2024-10-01 10:18 ` Thomas Monjalon
@ 2024-10-01 12:08 ` David Marchand
2024-10-01 13:00 ` Hemant Agrawal
0 siblings, 1 reply; 47+ messages in thread
From: David Marchand @ 2024-10-01 12:08 UTC (permalink / raw)
To: Thomas Monjalon, Hemant Agrawal; +Cc: dev, Sachin Saxena
On Tue, Oct 1, 2024 at 12:19 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 12/09/2024 10:26, David Marchand:
> > Those debug macros never worked as existing callers never passed a
> > 'level' argument.
> > Remove them.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Why not removing the calls to these macros?
I was unclear if the fmlib enters the "base driver" category.
So I simply removed macros from the header providing wrappers to dpdk API.
Relooking, I see other changes in this directory, so I agree I may as
well remove those calls.
Hemant, opinion?
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 14/14] drivers: use per line logging in helpers
2024-09-12 8:26 ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
@ 2024-10-01 12:10 ` Thomas Monjalon
0 siblings, 0 replies; 47+ messages in thread
From: Thomas Monjalon @ 2024-10-01 12:10 UTC (permalink / raw)
To: David Marchand
Cc: dev, Chengwen Feng, Andrew Rybchenko, Nicolas Chautru,
Gagandeep Singh, Hemant Agrawal, Parav Pandit, Xueming Li,
Nipun Gupta, Nikhil Agarwal, Sachin Saxena, Rosen Xu,
Tomasz Duszynski, Long Li, Wei Hu, Nithin Dabilpuram,
Kiran Kumar K, Sunil Kumar Kori, Satha Rao, Harman Kalra,
Anoob Joseph, Jingjing Wu, Chaoyong He, Nagadheeraj Rottela,
Srikanth Jampala, Kai Ji, Lee Daly, Pablo de Lara, Fan Zhang,
Ashish Gupta, Zhangfei Gao, Sunila Sahu, Jack Bond-Preston,
Ajit Khaparde, Raveendra Padasalagi, Vikas Gupta, Sunil Uttarwar,
Michael Shamis, Liron Himi, Jay Zhou, Bruce Richardson,
Kevin Laatz, Conor Walsh, Gowrishankar Muthukrishnan,
Vidya Sagar Velumuri, Abdullah Sevincer, Mattias Rönnblom,
Jerin Jacob, Pavan Nikhilesh, Liang Ma, Peter Mccarthy,
Harry van Haaren, Elena Agostini, John W. Linville, Ciara Loftus,
Maryam Tahhan, Igor Russkikh, Steven Webster, Matt Peters,
Selwin Sebastian, Julien Aube, Somnath Kotur, Wathsala Vithanage,
Konstantin Ananyev, Chas Williams, Min Hu (Connor),
Shai Brandes, Evgeny Schemeilin, Ron Beider, Amit Bernstein,
Wajeeh Atrash, Apeksha Gupta, John Daley, Hyong Youb Kim,
Gaetan Rivet, Jeroen de Borst, Rushil Gupta, Joshua Washington,
Ziyang Xuan, Xiaoyun Wang, Jie Hai, Yisen Zhuang, Jakub Grajciar,
Matan Azrad, Viacheslav Ovsiienko, Zyta Szpak, Martin Spinler,
Jiawen Wu, Tetsuya Mukawa, Vamsi Attunuru, Cristian Dumitrescu,
Stephen Hemminger, Maciej Czekaj, Jian Wang, Maxime Coquelin,
Chenbo Xia, Jochen Behrens, Jakub Palider
12/09/2024 10:26, David Marchand:
> Use RTE_LOG(_DP)?_LINE(_PREFIX)? in existing macros that append a \n.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
[...]
> --- a/devtools/checkpatches.sh
> +++ b/devtools/checkpatches.sh
> @@ -53,7 +53,7 @@ print_usage () {
> check_forbidden_additions() { # <patch>
> res=0
>
> - # refrain from new calls to RTE_LOG
> + # refrain from new calls to RTE_LOG in libraries
> awk -v FOLDERS="lib" \
> -v EXPRESSIONS="RTE_LOG\\\(" \
> -v RET_ON_FAIL=1 \
> @@ -61,6 +61,15 @@ check_forbidden_additions() { # <patch>
> -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
> "$1" || res=1
>
> + # refrain from new calls to RTE_LOG in drivers (but leave some leeway for base drivers)
> + awk -v FOLDERS="drivers" \
> + -v SKIP_FILES='osdep.h$' \
> + -v EXPRESSIONS="RTE_LOG\\\( RTE_LOG_DP\\\( rte_log\\\(" \
> + -v RET_ON_FAIL=1 \
> + -v MESSAGE='Prefer RTE_LOG_LINE/RTE_LOG_DP_LINE' \
> + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
> + "$1" || res=1
It should be easier to maintain, thanks for the cleanup.
Acked-by: Thomas Monjalon <thomas@monjalon.net>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 03/14] net/dpaa: remove broken debug macros
2024-10-01 12:08 ` David Marchand
@ 2024-10-01 13:00 ` Hemant Agrawal
0 siblings, 0 replies; 47+ messages in thread
From: Hemant Agrawal @ 2024-10-01 13:00 UTC (permalink / raw)
To: dev
On 01-10-2024 17:38, David Marchand wrote:
> On Tue, Oct 1, 2024 at 12:19 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>> 12/09/2024 10:26, David Marchand:
>>> Those debug macros never worked as existing callers never passed a
>>> 'level' argument.
>>> Remove them.
>>>
>>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>> Why not removing the calls to these macros?
> I was unclear if the fmlib enters the "base driver" category.
> So I simply removed macros from the header providing wrappers to dpdk API.
>
> Relooking, I see other changes in this directory, so I agree I may as
> well remove those calls.
>
> Hemant, opinion?
>
Yes, fmlib is a common base library. So, it is better to not remove the
calls. Otherwise, we have to maintain the changes from base.
with that
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
^ permalink raw reply [flat|nested] 47+ messages in thread
* Re: [PATCH v2 00/14] Use RTE_LOG_LINE in drivers
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
` (15 preceding siblings ...)
2024-09-16 15:13 ` Patrick Robb
@ 2024-10-04 13:04 ` David Marchand
16 siblings, 0 replies; 47+ messages in thread
From: David Marchand @ 2024-10-04 13:04 UTC (permalink / raw)
To: dev
On Thu, Sep 12, 2024 at 10:27 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> This is a continuation of the cleanup effort in logging macros.
>
> As a reminder of what this series is about, RTE_LOG_LINE() has been
> introduced to check that the format string does not contain a trailing \n.
> The goal was to prevent from:
> - introducing multilines log messages (ugly and unhelpful for lambda
> users),
> - introducing double \n in logs,
> - introducing missing \n in logs,
>
> I have built/maintained this series for fixing drivers/ since the
> beginning of the year and I hope we can merge this series early in
> 24.11.
>
> Some drivers are not converted because of multiple inconsistencies.
> Those may be fixed later.
>
> As for the changes on lib/, new macros have been introduced so that
> backports trigger a build error and force the backport to adjust the
> patches containing logs accordingly.
>
>
> Most of the changes have been done with some scripting, but it is likely
> there are some errors and I hope driver maintainers will review in
> depth.
>
>
> A check is added for drivers/ in the hope that new drivers don't
> introduce more mess.
>
> Yet, sometimes it is not possible to fix macros (a good example
> is base/ drivers code...), so the check skips *osdep.h headers where
> calls to RTE_LOG() may be accepted.
Series applied.
--
David Marchand
^ permalink raw reply [flat|nested] 47+ messages in thread
end of thread, other threads:[~2024-10-04 13:05 UTC | newest]
Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
2024-09-07 14:54 ` [PATCH 02/11] devtools: report all warnings in forbidden token check David Marchand
2024-09-07 14:54 ` [PATCH 03/11] net/dpaa: remove broken debug macros David Marchand
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
2024-09-08 8:35 ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers David Marchand
2024-09-08 8:44 ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 06/11] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
2024-09-09 6:18 ` Jiawen Wu
2024-09-09 6:50 ` David Marchand
2024-09-09 7:23 ` Jiawen Wu
2024-09-07 14:54 ` [PATCH 08/11] drivers: replace logging helpers David Marchand
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
2024-09-09 1:09 ` fengchengwen
2024-09-07 14:54 ` [PATCH 10/11] drivers: split multilines log messages David Marchand
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-08 8:55 ` Andrew Rybchenko
2024-09-09 6:55 ` David Marchand
2024-09-09 7:23 ` Andrew Rybchenko
2024-09-09 1:19 ` fengchengwen
2024-09-10 10:56 ` David Marchand
2024-09-12 8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-12 8:26 ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
2024-09-12 13:54 ` Thomas Monjalon
2024-09-12 8:26 ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
2024-09-12 14:10 ` Thomas Monjalon
2024-09-12 8:26 ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
2024-10-01 10:18 ` Thomas Monjalon
2024-10-01 12:08 ` David Marchand
2024-10-01 13:00 ` Hemant Agrawal
2024-09-12 8:26 ` [PATCH v2 04/14] net/sfc: fix driver logtype token David Marchand
2024-09-12 8:26 ` [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers David Marchand
2024-09-12 8:26 ` [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-12 8:26 ` [PATCH v2 07/14] net/txgbe: move wrapper to base driver David Marchand
2024-09-12 8:26 ` [PATCH v2 08/14] event/dlb2: fix base driver logs David Marchand
2024-09-12 8:26 ` [PATCH v2 09/14] event/dsw: use a dynamic logtype David Marchand
2024-09-12 8:26 ` [PATCH v2 10/14] drivers: replace logging helpers David Marchand
2024-09-12 8:26 ` [PATCH v2 11/14] drivers: remove redundant newline from logs David Marchand
2024-09-12 8:26 ` [PATCH v2 12/14] drivers: split multilines log messages David Marchand
2024-09-12 8:26 ` [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable David Marchand
2024-09-12 8:26 ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
2024-10-01 12:10 ` Thomas Monjalon
2024-09-16 9:32 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-16 15:13 ` Patrick Robb
2024-10-04 13:04 ` David Marchand
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).