|SUCCESS| [v5] ethdev: add buffer size parameter to rte_eth_dev_get_name_by_port()

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sun Nov 15 23:36:17 CET 2026


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

_AI Code Review_

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

**Info**

1. examples/multi_process/hotplug_mp/commands.c: the return value is still ignored.

   ```
   rte_eth_dev_get_name_by_port(port_id, dev_name, sizeof(dev_name));
   if (strlen(dev_name) > 0)
   ```

   - Initialising `dev_name` to `""` covers the `-ENODEV` and `-EINVAL` cases.
   - On `-ERANGE`, `strlcpy()` has already written a truncated name, so the example would print it as if it were valid.
   - Every other caller in this patch now checks the result. Checking it here too keeps the example consistent and shows applications the intended usage:

   ```c
   if (rte_eth_dev_get_name_by_port(port_id, dev_name, sizeof(dev_name)) == 0)
           cmdline_printf(cl, "%d\t%s\n", port_id, dev_name);
   else
           ...
   ```

2. lib/ethdev/rte_ethdev.h: the signature change is also an ABI change, and the patch does not use symbol versioning.

   ```
   +rte_eth_dev_get_name_by_port(uint16_t port_id, char *name, size_t size);
   ```

   - The change targets the 26.11 ABI-break window, and the release note sits under "API Changes".
   - Maintainers may also want an entry under "ABI Changes" in release_26_11.rst, since existing binaries calling the two-argument form will break.

Review-Result: CLEAN


More information about the test-report mailing list