[dpdk-dev] [PATCH 2/7] eal: Helper to convert to struct rte_pci_device

Jan Blunck jblunck at infradead.org
Sun Nov 20 11:05:22 CET 2016


Signed-off-by: Jan Blunck <jblunck at infradead.org>
---
 lib/librte_eal/common/include/rte_pci.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index 9ce8847..0376160 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -160,6 +160,8 @@ struct rte_pci_device {
 	enum rte_kernel_driver kdrv;            /**< Kernel driver passthrough */
 };
 
+#define ETH_DEV_PCI_DEV(ptr) ((ptr)->pci_dev)
+
 /** Any PCI device identifier (vendor, device, ...) */
 #define PCI_ANY_ID (0xffff)
 #define RTE_CLASS_ANY_ID (0xffffff)
-- 
2.7.4



More information about the dev mailing list