|WARNING| [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 01:09:32 CET 2026


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

_AI Code Review_

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

**Patch 1/3: usertools/dpdk-devbind: align BSD output format with Linux**

Warning: user-visible output format change has no release note.

```
+            addr = f"{domain:04x}:{bus:02x}:{slot:02x}.{function:x}"
```

On FreeBSD, `dpdk-devbind.py` previously printed addresses as `pci0:152:0:1`. It now prints `0000:98:00.1`. Any script that parses the old output, or feeds it back to other tools, will break silently. This change should be noted in the current release notes, along with the new address formats accepted by `nic_uio` in patch 2/3. Users upgrading on FreeBSD will then know about it.

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

Info: the "too many addresses" message can fire when nothing valid was left.

```
+		token = strsep(&remaining, ",");
+		if (count == nitems(bdfs)) {
+			printf("nic_uio: too many PCI addresses in hw.nic_uio.bdfs, ignoring the rest\n");
```

The limit check runs after a token is consumed, before it is parsed. If the list holds exactly `MAX_DETACHED_DEVICES` valid entries followed only by invalid ones, the message says valid addresses were dropped when none were. This is harmless. Checking the limit only after a successful parse would make the message accurate.

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

Info: the format pointers are not fully const.

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

The pointers themselves are mutable. Use `static const char * const` so both the pointer and the string are read-only.

Review-Result: WARNING


More information about the test-report mailing list