bus: add helper to find which bus holds a device
[dpdk.git] / lib / librte_eal / common / include / rte_bus.h
index 052ac8d..f8b3215 100644 (file)
@@ -209,6 +209,11 @@ typedef int (*rte_bus_cmp_t)(const struct rte_bus *bus, const void *data);
 struct rte_bus *rte_bus_find(const struct rte_bus *start, rte_bus_cmp_t cmp,
                             const void *data);
 
+/**
+ * Find the registered bus for a particular device.
+ */
+struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev);
+
 /**
  * Helper for Bus registration.
  * The constructor has higher priority than PMD constructors.