]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_ether/rte_ethdev_pci.h
ethdev: add generic create/destroy ethdev APIs
[dpdk.git] / lib / librte_ether / rte_ethdev_pci.h
index 6565ae7d3ed35a25a0caac7fb12e0a8a91aa7ccc..603287c28530558039b28d861d0c21bbe5e1015a 100644 (file)
@@ -70,6 +70,18 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
        eth_dev->data->numa_node = pci_dev->device.numa_node;
 }
 
+static inline int
+eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
+       struct rte_pci_device *pci_dev = bus_device;
+
+       if (!pci_dev)
+               return -ENODEV;
+
+       rte_eth_copy_pci_info(eth_dev, pci_dev);
+
+       return 0;
+}
+
 /**
  * @internal
  * Allocates a new ethdev slot for an ethernet device and returns the pointer