git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ethdev: decouple from PCI device
[dpdk.git]
/
lib
/
librte_eal
/
common
/
include
/
rte_pci.h
diff --git
a/lib/librte_eal/common/include/rte_pci.h
b/lib/librte_eal/common/include/rte_pci.h
index
fbc4311
..
87cad59
100644
(file)
--- a/
lib/librte_eal/common/include/rte_pci.h
+++ b/
lib/librte_eal/common/include/rte_pci.h
@@
-160,6
+160,12
@@
struct rte_pci_device {
enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */
};
enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */
};
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_pci_device.
+ */
+#define RTE_DEV_TO_PCI(ptr) container_of(ptr, struct rte_pci_device, device)
+
/** Any PCI device identifier (vendor, device, ...) */
#define PCI_ANY_ID (0xffff)
#define RTE_CLASS_ANY_ID (0xffffff)
/** Any PCI device identifier (vendor, device, ...) */
#define PCI_ANY_ID (0xffff)
#define RTE_CLASS_ANY_ID (0xffffff)