[PATCH 2/6] drivers: use dedicated log macros instead of EAL logtype
David Marchand
david.marchand at redhat.com
Tue Jun 25 14:24:10 CEST 2024
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 at 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
More information about the dev
mailing list