/* Map pci device */
int
-pci_map_device(struct rte_pci_device *dev)
+rte_eal_pci_map_device(struct rte_pci_device *dev)
{
int ret = -1;
/* Unmap pci device */
void
-pci_unmap_device(struct rte_pci_device *dev)
+rte_eal_pci_unmap_device(struct rte_pci_device *dev)
{
/* try unmapping the NIC resources */
switch (dev->kdrv) {
DPDK_2.3 {
global:
+ rte_eal_pci_map_device;
+ rte_eal_pci_unmap_device;
rte_cpu_feature_table;
} DPDK_2.2;
pci_config_space_set(dev);
#endif
/* map resources for devices that use igb_uio */
- ret = pci_map_device(dev);
+ ret = rte_eal_pci_map_device(dev);
if (ret != 0)
return ret;
} else if (dr->drv_flags & RTE_PCI_DRV_FORCE_UNBIND &&
if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING)
/* unmap resources for devices that use igb_uio */
- pci_unmap_device(dev);
+ rte_eal_pci_unmap_device(dev);
return 0;
}
*/
int pci_unbind_kernel_driver(struct rte_pci_device *dev);
-/**
- * Map this device
- *
- * This function is private to EAL.
- *
- * @return
- * 0 on success, negative on error and positive if no driver
- * is found for the device.
- */
-int pci_map_device(struct rte_pci_device *dev);
-
-/**
- * Unmap this device
- *
- * This function is private to EAL.
- */
-void pci_unmap_device(struct rte_pci_device *dev);
-
/**
* Map the PCI resource of a PCI device in virtual memory
*
*/
int rte_eal_pci_probe(void);
+/**
+ * Map the PCI device resources in user space virtual memory address
+ *
+ * Note that driver should not call this function when flag
+ * RTE_PCI_DRV_NEED_MAPPING is set, as EAL will do that for
+ * you when it's on.
+ *
+ * @param dev
+ * A pointer to a rte_pci_device structure describing the device
+ * to use
+ *
+ * @return
+ * 0 on success, negative on error and positive if no driver
+ * is found for the device.
+ */
+int rte_eal_pci_map_device(struct rte_pci_device *dev);
+
+/**
+ * Unmap this device
+ *
+ * @param dev
+ * A pointer to a rte_pci_device structure describing the device
+ * to use
+ */
+void rte_eal_pci_unmap_device(struct rte_pci_device *dev);
+
/**
* @internal
* Map a particular resource from a file.
/* Map pci device */
int
-pci_map_device(struct rte_pci_device *dev)
+rte_eal_pci_map_device(struct rte_pci_device *dev)
{
int ret = -1;
/* Unmap pci device */
void
-pci_unmap_device(struct rte_pci_device *dev)
+rte_eal_pci_unmap_device(struct rte_pci_device *dev)
{
/* try unmapping the NIC resources using VFIO if it exists */
switch (dev->kdrv) {
DPDK_2.3 {
global:
+ rte_eal_pci_map_device;
+ rte_eal_pci_unmap_device;
rte_cpu_feature_table;
+
} DPDK_2.2;