Page MenuHomeFreeBSD

iflib: provide probe wrapper for vendor drivers

Authored by on May 10 2019, 12:15 AM.
Referenced Files
Unknown Object (File)
Nov 3 2023, 1:13 PM
Unknown Object (File)
Sep 21 2023, 5:54 PM
Unknown Object (File)
Sep 10 2023, 8:31 PM
Unknown Object (File)
Sep 6 2023, 2:54 AM
Unknown Object (File)
Aug 15 2023, 2:09 PM
Unknown Object (File)
Aug 14 2023, 8:50 PM
Unknown Object (File)
Aug 5 2023, 5:19 PM
Unknown Object (File)
Aug 5 2023, 4:28 PM



Vendor drivers that exist out-of-tree generally should return
BUS_PROBE_VENDOR from their device probe functions. This helps ensure
that a vendor replacement driver will supersede the in-kernel driver for
a given device.

Currently, if a vendor wants to implement a driver based on iflib, it
will always report BUS_PROBE_DEFAULT.

Add a wrapper function, iflib_device_probe_vendor() which can be used in
place of iflib_device_probe(). This function will just return
BUS_PROBE_VENDOR whenever iflib_device_probe() would return

While vendor drivers can already implement such a wrapper themselves,
providing it in the iflib.h header makes it easier for the vendor driver
to do the right thing.

Signed-off-by: Jacob Keller <>

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline

We discovered this as part of our rename from ixlv to iavf.

I also considered the approach of adding a new field to the if_shared_ctx. However, this solution seemed more elegant, and is easier for us to implement as a compatibility in our driver code if it's not in the kernel yet.

We *could* just implement this oureslves, but it seemed like something that might be useful to have in the upstream, so that vendor drivers based on iflib are more likely to do the right thing.

marius added a subscriber: marius.

Looks good to me

This revision is now accepted and ready to land.May 22 2019, 5:55 PM
This revision was automatically updated to reflect the committed changes.