* [PATCH] raw/cnxk_bphy: use standard log calls
@ 2024-02-22 9:13 Tomasz Duszynski
2024-02-26 4:14 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Duszynski @ 2024-02-22 9:13 UTC (permalink / raw)
To: dev; +Cc: jerinj, thomas, Tomasz Duszynski
Use standard logging functions from DPDK instead of platform ones.
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
drivers/raw/cnxk_bphy/cnxk_bphy.c | 27 +++++++++++++--------------
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +-
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index 1dbab6fb3e..57f77297a8 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -81,21 +81,21 @@ bphy_rawdev_selftest(uint16_t dev_id)
goto err_desc;
if (descs != 1) {
ret = -ENODEV;
- plt_err("Wrong number of descs reported\n");
+ CNXK_BPHY_LOG(ERR, "Wrong number of descs reported");
goto err_desc;
}
ret = rte_pmd_bphy_npa_pf_func_get(dev_id, &pf_func);
if (ret || pf_func == 0)
- plt_warn("NPA pf_func is invalid");
+ CNXK_BPHY_LOG(WARNING, "NPA pf_func is invalid");
ret = rte_pmd_bphy_sso_pf_func_get(dev_id, &pf_func);
if (ret || pf_func == 0)
- plt_warn("SSO pf_func is invalid");
+ CNXK_BPHY_LOG(WARNING, "SSO pf_func is invalid");
ret = rte_pmd_bphy_intr_init(dev_id);
if (ret) {
- plt_err("intr init failed");
+ CNXK_BPHY_LOG(ERR, "intr init failed");
return ret;
}
@@ -103,7 +103,7 @@ bphy_rawdev_selftest(uint16_t dev_id)
test = rte_zmalloc("BPHY", max_irq * sizeof(*test), 0);
if (test == NULL) {
- plt_err("intr alloc failed");
+ CNXK_BPHY_LOG(ERR, "intr alloc failed");
goto err_alloc;
}
@@ -132,7 +132,7 @@ bphy_rawdev_selftest(uint16_t dev_id)
}
if (ret) {
- plt_err("intr register failed at irq %d", i);
+ CNXK_BPHY_LOG(ERR, "intr register failed at irq %d", i);
goto err_register;
}
}
@@ -142,12 +142,12 @@ bphy_rawdev_selftest(uint16_t dev_id)
for (i = 0; i < max_irq; i++) {
if (!test[i].handled_intr) {
- plt_err("intr %u not handled", i);
+ CNXK_BPHY_LOG(ERR, "intr %u not handled", i);
ret = -1;
break;
}
if (test[i].handled_data != test[i].test_data) {
- plt_err("intr %u has wrong handler", i);
+ CNXK_BPHY_LOG(ERR, "intr %u has wrong handler", i);
ret = -1;
break;
}
@@ -332,9 +332,8 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv,
return 0;
if (!pci_dev->mem_resource[0].addr) {
- plt_err("BARs have invalid values: BAR0 %p\n BAR2 %p",
- pci_dev->mem_resource[0].addr,
- pci_dev->mem_resource[2].addr);
+ CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p\n BAR2 %p",
+ pci_dev->mem_resource[0].addr, pci_dev->mem_resource[2].addr);
return -ENODEV;
}
@@ -346,7 +345,7 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv,
bphy_rawdev = rte_rawdev_pmd_allocate(name, sizeof(*bphy_dev),
rte_socket_id());
if (bphy_rawdev == NULL) {
- plt_err("Failed to allocate rawdev");
+ CNXK_BPHY_LOG(ERR, "Failed to allocate rawdev");
return -ENOMEM;
}
@@ -381,14 +380,14 @@ bphy_rawdev_remove(struct rte_pci_device *pci_dev)
return 0;
if (pci_dev == NULL) {
- plt_err("invalid pci_dev");
+ CNXK_BPHY_LOG(ERR, "invalid pci_dev");
return -EINVAL;
}
bphy_rawdev_get_name(name, pci_dev);
rawdev = rte_rawdev_pmd_get_named_dev(name);
if (rawdev == NULL) {
- plt_err("invalid device name (%s)", name);
+ CNXK_BPHY_LOG(ERR, "invalid device name (%s)", name);
return -EINVAL;
}
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
index b424d6127d..8978f03825 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c
@@ -87,7 +87,7 @@ cnxk_bphy_intr_unregister(uint16_t dev_id, int irq_num)
if (bphy_dev->irq_chip)
roc_bphy_intr_clear(bphy_dev->irq_chip, irq_num);
else
- plt_err("Missing irq chip");
+ CNXK_BPHY_LOG(ERR, "Missing irq chip");
}
struct cnxk_bphy_mem *
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] raw/cnxk_bphy: use standard log calls
2024-02-22 9:13 [PATCH] raw/cnxk_bphy: use standard log calls Tomasz Duszynski
@ 2024-02-26 4:14 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2024-02-26 4:14 UTC (permalink / raw)
To: Tomasz Duszynski; +Cc: dev, jerinj, thomas
On Thu, Feb 22, 2024 at 2:50 PM Tomasz Duszynski <tduszynski@marvell.com> wrote:
>
> Use standard logging functions from DPDK instead of platform ones.
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Applied to dpdk-next-net-mrvl/for-main. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-26 4:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 9:13 [PATCH] raw/cnxk_bphy: use standard log calls Tomasz Duszynski
2024-02-26 4:14 ` Jerin Jacob
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).