|SUCCESS| [v2, 3/3] app/test: add unit tests for nic_uio BDF parsing fns

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Nov 11 00:09:12 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-10

**Patch 2/3: kernel/nic_uio: support Linux format PCI addresses**

Info: the new documentation says invalid selectors are "reported and ignored". Only `nic_uio_load()` reports them. The `nic_uio_probe()` loop drops them silently:

```c
		if (nic_uio_parse_bdf(token, &bdf) != 0)
			continue;
```

Either reword the doc to say invalid selectors are reported at module load, or note that probe ignores them silently.

Info: an empty entry in the middle of the list, such as `"a,,b"`, is passed to the parser and logged by `nic_uio_load()` as `ignoring invalid PCI address ''`. The doc only says trailing commas are ignored, which is accurate. Skipping empty tokens silently would match that intent more closely.

**Patch 3/3: app/test: add unit tests for nic_uio BDF parsing fns**

Info: the format strings in `pci_bdf_parse_linux()` are declared as non-const pointers to const data:

```c
	static const char *long_fmt = "FFFF:FF:FF.F";
	static const char *short_fmt = "FF:FF.F";
```

Prefer `static const char long_fmt[] = "FFFF:FF:FF.F";` (and the same for `short_fmt`), or `static const char * const`. This makes the pointer itself immutable, and with the array form `sizeof(long_fmt) - 1` can replace the `strlen()` calls.

Info: patch 1/3 changes the `dpdk-devbind.py` output format on FreeBSD (hex BDF instead of `pciD:b:d:f`), and patch 2/3 adds new accepted formats for `hw.nic_uio.bdfs`. Both are user-visible. Consider a short release-notes entry so users with scripts that parse the old FreeBSD output are informed.

Review-Result: CLEAN


More information about the test-report mailing list