]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/rte_bus.h
bus: add helper to find which bus holds a device
[dpdk.git] / lib / librte_eal / common / include / rte_bus.h
index 052ac8d4cb04994a9dd88cab3ccb927a918f4b0a..f8b321559ec466e4a96889ab051919e86eb97aab 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.