DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Parav Pandit <parav@nvidia.com>, Xueming Li <xuemingl@nvidia.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>, Kai Ji <kai.ji@intel.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>, Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: [PATCH 2/6] drivers: use dedicated log macros instead of EAL logtype
Date: Tue, 25 Jun 2024 14:24:10 +0200	[thread overview]
Message-ID: <20240625122414.1065829-3-david.marchand@redhat.com> (raw)
In-Reply-To: <20240625122414.1065829-1-david.marchand@redhat.com>

Those drivers already have their own logtype and set of logging macros.
Use them instead of logging as EAL.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/auxiliary/auxiliary_common.c | 4 ++--
 drivers/bus/dpaa/dpaa_bus.c              | 4 ++--
 drivers/bus/fslmc/fslmc_vfio.c           | 2 +-
 drivers/common/qat/qat_device.c          | 4 ++--
 drivers/net/cnxk/cnxk_rep_msg.c          | 2 +-
 drivers/net/cpfl/cpfl_ethdev.c           | 2 +-
 drivers/net/mlx4/mlx4.c                  | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 29f99342a7..e6cbc4d356 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -106,10 +106,10 @@ rte_auxiliary_probe_one_driver(struct rte_auxiliary_driver *drv,
 	}
 
 	if (dev->device.numa_node < 0 && rte_socket_count() > 1)
-		RTE_LOG(INFO, EAL, "Device %s is not NUMA-aware\n", dev->name);
+		AUXILIARY_LOG(INFO, "Device %s is not NUMA-aware", dev->name);
 
 	if (rte_dev_is_probed(&dev->device)) {
-		RTE_LOG(DEBUG, EAL, "Device %s is already probed on auxiliary bus\n",
+		AUXILIARY_LOG(DEBUG, "Device %s is already probed on auxiliary bus",
 			dev->device.name);
 		return -EEXIST;
 	}
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 5d4352bb3c..bb27daef38 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -499,7 +499,7 @@ rte_dpaa_bus_scan(void)
 
 	if ((access(DPAA_DEV_PATH1, F_OK) != 0) &&
 	    (access(DPAA_DEV_PATH2, F_OK) != 0)) {
-		RTE_LOG(DEBUG, EAL, "DPAA Bus not present. Skipping.\n");
+		DPAA_BUS_LOG(DEBUG, "DPAA Bus not present. Skipping.");
 		return 0;
 	}
 
@@ -578,7 +578,7 @@ rte_dpaa_bus_dev_build(void)
 		return -EINVAL;
 	}
 
-	RTE_LOG(NOTICE, EAL, "DPAA Bus Detected\n");
+	DPAA_BUS_LOG(NOTICE, "DPAA Bus Detected");
 
 	if (!dpaa_netcfg->num_ethports) {
 		DPAA_BUS_LOG(INFO, "NO DPDK mapped net interfaces available");
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 5966776a85..43f6a630ea 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -464,7 +464,7 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 	 * isn't managed by VFIO
 	 */
 	if (vfio_group_fd == -ENOENT) {
-		RTE_LOG(WARNING, EAL, " %s not managed by VFIO driver, skipping\n",
+		DPAA2_BUS_WARN(" %s not managed by VFIO driver, skipping",
 				dev_addr);
 		return 1;
 	}
diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index c6ac7a0015..4a972a83bd 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -372,8 +372,8 @@ qat_pci_device_allocate(struct rte_pci_device *pci_dev)
 		"QAT internal error! Read slice function not set, gen : %d",
 		qat_dev_gen);
 	if (ops_hw->qat_dev_get_slice_map(&qat_dev->options.slice_map, pci_dev) < 0) {
-		RTE_LOG(ERR, EAL,
-			"Cannot read slice configuration\n");
+		QAT_LOG(ERR,
+			"Cannot read slice configuration");
 		goto error;
 	}
 	rte_spinlock_init(&qat_dev->arb_csr_lock);
diff --git a/drivers/net/cnxk/cnxk_rep_msg.c b/drivers/net/cnxk/cnxk_rep_msg.c
index f3a62a805e..324ac219d0 100644
--- a/drivers/net/cnxk/cnxk_rep_msg.c
+++ b/drivers/net/cnxk/cnxk_rep_msg.c
@@ -116,7 +116,7 @@ open_socket_ctrl_channel(void)
 
 	sock_fd = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (sock_fd < 0) {
-		RTE_LOG(ERR, EAL, "failed to create unix socket\n");
+		plt_err("Failed to create unix socket");
 		return -1;
 	}
 
diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index 7e718e9e19..d5ded338d4 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -1579,7 +1579,7 @@ parse_repr(const char *key __rte_unused, const char *value, void *args)
 		RTE_DIM(eth_da->representor_ports));
 done:
 	if (str == NULL) {
-		RTE_LOG(ERR, EAL, "wrong representor format: %s\n", str);
+		PMD_DRV_LOG(ERR, "wrong representor format: %s", str);
 		return -1;
 	}
 
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index a1a7e93288..c19db5c0eb 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1058,7 +1058,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		priv->intr_handle =
 			rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED);
 		if (priv->intr_handle == NULL) {
-			RTE_LOG(ERR, EAL, "Fail to allocate intr_handle\n");
+			ERROR("can not allocate intr_handle");
 			goto port_error;
 		}
 
-- 
2.45.2


  parent reply	other threads:[~2024-06-25 12:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 12:24 [PATCH 0/6] Some drivers logging cleanups David Marchand
2024-06-25 12:24 ` [PATCH 1/6] vdpa/sfc: remove dead code David Marchand
2024-06-25 14:25   ` Andrew Rybchenko
2024-06-25 12:24 ` David Marchand [this message]
2024-06-25 12:24 ` [PATCH 3/6] net/sfc: remove use of EAL logtype David Marchand
2024-06-25 14:26   ` Andrew Rybchenko
2024-06-25 12:24 ` [PATCH 4/6] vdpa/sfc: " David Marchand
2024-06-25 12:24 ` [PATCH 5/6] bus/pci: use a dynamic logtype David Marchand
2024-06-26  2:05   ` Chenbo Xia
2024-06-25 12:24 ` [PATCH 6/6] crypto/ccp: " David Marchand
2024-06-28 11:57   ` David Marchand
2024-07-03 14:55 ` [PATCH 0/6] Some drivers logging cleanups David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240625122414.1065829-3-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=kai.ji@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=matan@nvidia.com \
    --cc=ndabilpuram@marvell.com \
    --cc=parav@nvidia.com \
    --cc=sachin.saxena@nxp.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=viacheslavo@nvidia.com \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).