[dpdk-dev,v2,13/18] bus: make device recognition function public
Checks
Commit Message
As other EAL facilities now requires the bus to be explicitly mentioned,
the function rte_bus_find_by_device_name can be used by third parties to
ease the transition to a more formal device definition scheme.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 +
lib/librte_eal/common/include/rte_bus.h | 12 ++++++++++++
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 +
3 files changed, 14 insertions(+)
@@ -223,6 +223,7 @@ EXPERIMENTAL {
DPDK_17.11 {
global:
+ rte_bus_find_by_device_name;
rte_bus_get_iommu_class;
rte_eal_iova_mode;
rte_eal_mbuf_default_mempool_ops;
@@ -364,6 +364,18 @@ struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev);
struct rte_bus *rte_bus_find_by_name(const char *busname);
/**
+ * Find a bus capable of identifying a device.
+ *
+ * @param str
+ * A device identifier (PCI address, virtual PMD name, ...).
+ *
+ * @return
+ * A valid bus handle if found.
+ * NULL if no bus is able to parse this device.
+ */
+struct rte_bus *rte_bus_find_by_device_name(const char *str);
+
+/**
* Helper for Bus registration.
* The constructor has higher priority than PMD constructors.
*/
@@ -227,6 +227,7 @@ EXPERIMENTAL {
DPDK_17.11 {
global:
+ rte_bus_find_by_device_name;
rte_bus_get_iommu_class;
rte_eal_iova_mode;
rte_eal_mbuf_default_mempool_ops;