summaryrefslogtreecommitdiff
path: root/drivers/bus/pci/private.h
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2018-09-19 18:03:31 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-03 14:19:58 +0200
commit46521ca27bde13a960a8150541f8825fde6affd7 (patch)
treeba3e6609cc1663c7fb38d3f583d3be7ba3d3fba2 /drivers/bus/pci/private.h
parent12ce2da88f032efb7bf2e3ed4e1037f220869251 (diff)
downloaddpdk-46521ca27bde13a960a8150541f8825fde6affd7.zip
dpdk-46521ca27bde13a960a8150541f8825fde6affd7.tar.gz
dpdk-46521ca27bde13a960a8150541f8825fde6affd7.tar.xz
bus/pci: implement device iteration
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Diffstat (limited to 'drivers/bus/pci/private.h')
-rw-r--r--drivers/bus/pci/private.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 8ddd03e..0e689fa 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -10,6 +10,8 @@
#include <rte_pci.h>
#include <rte_bus_pci.h>
+extern struct rte_pci_bus rte_pci_bus;
+
struct rte_pci_driver;
struct rte_pci_device;
@@ -166,4 +168,27 @@ rte_pci_match(const struct rte_pci_driver *pci_drv,
enum rte_iova_mode
rte_pci_get_iommu_class(void);
+/*
+ * Iterate over internal devices,
+ * matching any device against the provided
+ * string.
+ *
+ * @param start
+ * Iteration starting point.
+ *
+ * @param str
+ * Device string to match against.
+ *
+ * @param it
+ * (unused) iterator structure.
+ *
+ * @return
+ * A pointer to the next matching device if any.
+ * NULL otherwise.
+ */
+void *
+rte_pci_dev_iterate(const void *start,
+ const char *str,
+ const struct rte_dev_iterator *it);
+
#endif /* _PCI_PRIVATE_H_ */