Skip to contentSkip to conversation

usertools/dpdk-devbind: fix interface names on FreeBSD

PATCH Applied Bruce Richardson 2 participants 2 messages Nov 3 – Nov 12

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usertools/dpdk-devbind: fix interface names on FreeBSD

The interface names on BSD were queried from ifconfig on initial device scan. Later calls to get additional details used the non-existent linux paths to query the interface names and so cleared the values. Fix this by ensuring the interface name gets assigned to the extra details on BSD.

Fixes 06d6605f7906 ("usertools/devbind: add basic FreeBSD support")
---
 usertools/dpdk-devbind.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
usertools/dpdk-devbind.py +5 -1
index 15b19acb27..e70bdc23b4 100755
@@ -380,7 +380,11 @@ def get_device_details(devices_type):
         # get additional info and add it to existing data
         devices[d] = devices[d].copy()
         # No need to probe lspci
-        devices[d].update(get_pci_device_details(d, False).items())
+        details = get_pci_device_details(d, False)
+        if is_bsd:
+            # on BSD, interface name comes from ifconfig, not sysfs
+            details["Interface"] = devices[d].get("Interface", "")
+        devices[d].update(details.items())
 
         if is_linux and devices_type == 'net':
             for _if in ssh_if:
Signature · 1 line
2.55.0
#1 lore raw

03/11/2026 18:46, Bruce Richardson:

Quoted 10 lines

The interface names on BSD were queried from ifconfig on initial device scan. Later calls to get additional details used the non-existent linux paths to query the interface names and so cleared the values. Fix this by ensuring the interface name gets assigned to the extra details on BSD.

Fixes 06d6605f7906 ("usertools/devbind: add basic FreeBSD support")

Applied, thanks.