|SUCCESS| [v3] raw/ifpga: replace printf calls with logging
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Apr 13 21:18:10 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163005
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-13
git sha: Fri, 10 Apr 2026 11:28:26 -0500
Author: Weijun Pan <wpan36 at wisc.edu>
Subject: [PATCH v3] raw/ifpga: replace printf calls with logging
This patch replaces direct printf() calls with DPDK logging macros in the
ifpga rawdev driver, converting runtime messages to use the driver's
logging framework instead of standard output.
> drivers/raw/ifpga/ifpga_rawdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
> index 5b9b596435..c6a1b193f7 100644
> --- a/drivers/raw/ifpga/ifpga_rawdev.c
> +++ b/drivers/raw/ifpga/ifpga_rawdev.c
> @@ -434,7 +434,7 @@ static int set_surprise_link_check_aer(
> uint32_t aer_new0, aer_new1;
>
> if (!ifpga_rdev || !ifpga_rdev->rawdev) {
> - printf("\n device does not exist\n");
> + IFPGA_RAWDEV_PMD_ERR("device does not exist");
Good change. The error message is now properly formatted without
unnecessary newlines.
[ ... ]
> @@ -491,7 +491,7 @@ static int set_surprise_link_check_aer(
> if (fd != -1)
> close(fd);
>
> - printf(">>>>>>Set AER %x,%x %x,%x\n",
> + IFPGA_RAWDEV_PMD_DEBUG(">>>>>>Set AER %x,%x %x,%x",
Can the ">>>>>>" prefix be removed from this message? Debug messages
typically do not need attention-grabbing visual markers, and the logging
framework already provides severity levels and prefixes to distinguish
messages.
[ ... ]
> @@ -527,7 +527,7 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
> }
>
> if (gsd_enable)
> - printf(">>>>>>Pls Shutdown APP\n");
> + IFPGA_RAWDEV_PMD_WARN(">>>>>>Pls Shutdown APP");
Can the ">>>>>>" prefix be removed here as well, and can the message be
rephrased for clarity? "Pls" is informal shorthand. A warning message
might be better worded as "Please shutdown application" or "Application
shutdown required".
More information about the test-report
mailing list