[PATCH v2 0/3] Support Linux format PCI addresses on BSD
Bruce Richardson
bruce.richardson at intel.com
Tue Nov 10 22:01:39 CET 2026
DPDK EAL parameters for specifying PCI devices use the linux format,
even when on FreeBSD, and Linux format is the standard throughout our
docs, so make some updates to allow BSD tools to also support that
format for consistency.
Specifically:
* Have the PCI address output from dpdk-devbind script use Linux format
on both Linux and BSD
* Allow the FreeBSD kernel module, nic_uio, accept parameters in either
BSD or Linux format.
After these changes, the Linux format ([DDDD:]BB:DD.F, all hex), can be
used across the board in BSD, while still allowing BSD format
([pciD]:B:D:F, all decimal), for compatibility as before.
V2:
* Reworked following AI review of V1.
- cleaned up patch 2 with typecasts to calls to isxdigit() etc.
- kept compatible handling of invalid BDFs by skipping them
- supported trailing commas on BDFs
Bruce Richardson (3):
usertools/dpdk-devbind: align BSD output format with Linux
kernel/nic_uio: support Linux format PCI addresses
app/test: add unit tests for nic_uio BDF parsing fns
app/test/meson.build | 1 +
app/test/test_kmod_pci_bdf.c | 187 ++++++++++++++++++++++++++
doc/guides/freebsd_gsg/build_dpdk.rst | 9 ++
doc/guides/tools/devbind.rst | 4 +
kernel/freebsd/nic_uio/meson.build | 2 +-
kernel/freebsd/nic_uio/nic_uio.c | 85 +++++-------
kernel/freebsd/nic_uio/pci_bdf.h | 157 +++++++++++++++++++++
usertools/dpdk-devbind.py | 5 +-
8 files changed, 397 insertions(+), 53 deletions(-)
create mode 100644 app/test/test_kmod_pci_bdf.c
create mode 100644 kernel/freebsd/nic_uio/pci_bdf.h
--
2.55.0
More information about the dev
mailing list