|SUCCESS| [v3,7/7] eal: configure initial device probing

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Apr 8 00:12:35 CEST 2026


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

_AI Code Review_

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

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 1/7] devtools: check packet forwarding in null test

This commit enhances test-null.sh to verify that testpmd is actually
forwarding packets between two ports.

> diff --git a/devtools/test-null.sh b/devtools/test-null.sh
> index e3ac168ce3..8f21189262 100755
> --- a/devtools/test-null.sh
> +++ b/devtools/test-null.sh
> @@ -26,8 +26,14 @@ else
>  	libs=
>  fi
>  
> +logfile=$build/test-null.log
>  (sleep 1 && echo stop) |
>  # testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems
>  $testpmd -l $corelist --no-huge -m 40 \
>  	$libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
> -	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia
> +	--no-mlockall --total-num-mbufs=2048 $testpmd_options -ia | tee $logfile
> +
> +# we expect two ports and some traffic is received and transmitted
> +grep -q 'io packet forwarding - ports=2 -' $build/test-null.log

Does this code use the correct variable for the second grep target? The
logfile is created with variable $logfile but this grep looks in
$build/test-null.log. Are these always the same?

> +grep 'RX-packets: ' $logfile | tail -1 | grep -q 'RX-packets:[[:space:]]*[^0[:space:]]'
> +grep 'TX-packets: ' $logfile | tail -1 | grep -q 'TX-packets:[[:space:]]*[^0[:space:]]'

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 2/7] bus/fslmc: fix bus cleanup

This commit fixes the close operation for the fslmc bus which was not
properly calling driver remove callbacks.

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 3/7] drivers/bus: require probe function for NXP drivers

This commit adds verification that all registered drivers have a probe
callback.

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 4/7] drivers/bus: cleanup devargs lookup in scan

This commit refactors devargs lookup across multiple bus implementations
to use the bus name from the bus object rather than hardcoded strings.

> diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
> index fdce1f6b1f..ca2812a960 100644
> --- a/drivers/bus/ifpga/ifpga_bus.c
> +++ b/drivers/bus/ifpga/ifpga_bus.c
> @@ -220,7 +220,7 @@ ifpga_scan(void)
>  	struct rte_afu_device *afu_dev = NULL;
>  
>  	/* for FPGA devices we scan the devargs_list populated via cmdline */
> -	RTE_EAL_DEVARGS_FOREACH(IFPGA_ARG_NAME, devargs) {
> +	RTE_EAL_DEVARGS_FOREACH(rte_ifpga_bus.name, devargs) {

[ ... ]

> @@ -516,5 +516,9 @@ static struct rte_bus rte_ifpga_bus = {
>  	.parse       = ifpga_parse,
>  };
>  
> -RTE_REGISTER_BUS(IFPGA_BUS_NAME, rte_ifpga_bus);
> +RTE_REGISTER_BUS(ifpga, rte_ifpga_bus);
> +RTE_INIT(ifpga_bus_init)
> +{
> +	RTE_VERIFY(strcmp(rte_ifpga_bus.name, RTE_STR(IFPGA_BUS_NAME)) == 0);
> +}

Does this initialization run at the correct time to verify the bus name
is set? The rte_ifpga_bus.name is set during the RTE_REGISTER_BUS macro
expansion, but is there a guarantee about constructor ordering?

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 5/7] bus: factorize devargs lookup

This commit introduces rte_bus_find_devargs() to consolidate devargs
lookup logic across all bus implementations.

> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index e3c17d41f7..356c56d989 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -572,6 +562,18 @@ rte_dpaa_bus_parse(const char *name, void *out)
>  	return 0;
>  }
>  
> +static int
> +dpaa_bus_devname_compare(const char *name1, const char *name2)
> +{
> +	char devname1[32], devname2[32];
> +
> +	if (rte_dpaa_bus_parse(name1, devname1) != 0 ||
> +			rte_dpaa_bus_parse(name2, devname2) != 0)
> +		return 1;
> +
> +	return strncmp(devname1, devname2, sizeof(devname1));

Does this code handle the case where the device names are longer than 32
characters? If rte_dpaa_bus_parse() writes exactly 32 characters into
devname1 or devname2, does strncmp() still work correctly?

[ ... ]

> +RTE_EXPORT_INTERNAL_SYMBOL(rte_bus_find_devargs)
> +struct rte_devargs *
> +rte_bus_find_devargs(const struct rte_bus *bus, const char *name)
> +{
> +	rte_bus_devname_compare_t cmp = bus->devname_compare;
> +	const char *bus_name = rte_bus_name(bus);
> +	struct rte_devargs *devargs;
> +
> +	if (cmp == NULL)
> +		cmp = strcmp;
> +
> +	RTE_EAL_DEVARGS_FOREACH(bus_name, devargs) {
> +		const char *devargs_name = devargs->name;
> +
> +		/* The name in the devargs is usually prefixed with <bus>: */
> +		if (strncmp(devargs_name, bus_name, strlen(bus_name)) == 0)
> +			devargs_name += strlen(bus_name) + 1;

Does this code check that the character after the bus name prefix is
actually a colon before skipping it? If the devargs_name is exactly equal
to bus_name (no colon), does devargs_name point to valid memory after the
increment?

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 6/7] bus: factorize device selection

This commit introduces rte_bus_is_ignored_device() to consolidate device
selection logic based on -a/-b options.

[ ... ]

Commit: series.patch
Author: David Marchand <david.marchand at redhat.com>
Subject: [PATCH v3 7/7] eal: configure initial device probing

This commit adds EAL options to control automatic device probing at
startup.

[ ... ]


More information about the test-report mailing list