|SUCCESS| [v2] raw/ifpga: replace printf calls with logging

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Apr 8 22:00:40 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/162943

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-08

git sha: (from patch metadata, not a git commit review)
Author: Weijun Pan <wpan36 at wisc.edu>
Subject: [PATCH v2] raw/ifpga: replace printf calls with logging

This patch replaces direct printf() calls with DPDK logging macros in the
ifpga rawdev driver.

> diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
> index 5b9b596435..e004e002b7 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");
>  		return -EFAULT;
>  	}

The conversion looks correct. The leading and trailing newlines in the
original message were unnecessary for logging.

[ ... ]

> @@ -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_INFO(">>>>>>Set AER %x,%x %x,%x",

Does this message need the ">>>>>>Set AER" prefix? The logging macros
already provide contextual information like timestamps and log levels.
Would "Set AER %x,%x %x,%x" be clearer?

> @@ -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");

Similar to the previous comment, does this need the ">>>>>>" prefix?
Also, "Pls Shutdown APP" seems abbreviated and unclear. Would
"Please shutdown application" or explaining why the shutdown is needed
improve the message quality? For example, "Graceful shutdown detected,
please shutdown application" might be more informative.


More information about the test-report mailing list