char filename[PATH_MAX];
snprintf(filename, sizeof(filename), "%s/" PCI_PRI_FMT,
- pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid,
+ rte_pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid,
addr->function);
return pci_scan_one(filename, addr);
RTE_LOG(DEBUG, EAL, "VFIO PCI modules not loaded\n");
#endif
- dir = opendir(pci_get_sysfs_path());
+ dir = opendir(rte_pci_get_sysfs_path());
if (dir == NULL) {
RTE_LOG(ERR, EAL, "%s(): opendir failed: %s\n",
__func__, strerror(errno));
continue;
snprintf(dirname, sizeof(dirname), "%s/%s",
- pci_get_sysfs_path(), e->d_name);
+ rte_pci_get_sysfs_path(), e->d_name);
if (pci_scan_one(dirname, &addr) < 0)
goto error;
* or uio:uioX */
snprintf(dirname, sizeof(dirname),
- "%s/" PCI_PRI_FMT "/uio", pci_get_sysfs_path(),
+ "%s/" PCI_PRI_FMT "/uio", rte_pci_get_sysfs_path(),
loc->domain, loc->bus, loc->devid, loc->function);
dir = opendir(dirname);
if (dir == NULL) {
/* retry with the parent directory */
snprintf(dirname, sizeof(dirname),
- "%s/" PCI_PRI_FMT, pci_get_sysfs_path(),
+ "%s/" PCI_PRI_FMT, rte_pci_get_sysfs_path(),
loc->domain, loc->bus, loc->devid, loc->function);
dir = opendir(dirname);
/* update devname for mmap */
snprintf(devname, sizeof(devname),
"%s/" PCI_PRI_FMT "/resource%d",
- pci_get_sysfs_path(),
+ rte_pci_get_sysfs_path(),
loc->domain, loc->bus, loc->devid,
loc->function, res_idx);
/* open and read addresses of the corresponding resource in sysfs */
snprintf(filename, sizeof(filename), "%s/" PCI_PRI_FMT "/resource",
- pci_get_sysfs_path(), dev->addr.domain, dev->addr.bus,
+ rte_pci_get_sysfs_path(), dev->addr.domain, dev->addr.bus,
dev->addr.devid, dev->addr.function);
f = fopen(filename, "r");
if (f == NULL) {
goto error;
}
snprintf(filename, sizeof(filename), "%s/" PCI_PRI_FMT "/resource%d",
- pci_get_sysfs_path(), dev->addr.domain, dev->addr.bus,
+ rte_pci_get_sysfs_path(), dev->addr.domain, dev->addr.bus,
dev->addr.devid, dev->addr.function, bar);
/* mmap the pci resource */
snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
loc->domain, loc->bus, loc->devid, loc->function);
- ret = rte_vfio_setup_device(pci_get_sysfs_path(), pci_addr,
+ ret = rte_vfio_setup_device(rte_pci_get_sysfs_path(), pci_addr,
&vfio_dev_fd, &device_info);
if (ret)
return ret;
snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
loc->domain, loc->bus, loc->devid, loc->function);
- ret = rte_vfio_setup_device(pci_get_sysfs_path(), pci_addr,
+ ret = rte_vfio_setup_device(rte_pci_get_sysfs_path(), pci_addr,
&vfio_dev_fd, &device_info);
if (ret)
return ret;
return -1;
}
- ret = rte_vfio_release_device(pci_get_sysfs_path(), pci_addr,
+ ret = rte_vfio_release_device(rte_pci_get_sysfs_path(), pci_addr,
dev->intr_handle.vfio_dev_fd);
if (ret < 0) {
RTE_LOG(ERR, EAL,
#define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
-const char *pci_get_sysfs_path(void)
+const char *rte_pci_get_sysfs_path(void)
{
const char *path = NULL;
#include <rte_pci.h>
/** Pathname of PCI devices directory. */
-const char *pci_get_sysfs_path(void);
+const char *rte_pci_get_sysfs_path(void);
/* Forward declarations */
struct rte_pci_device;
global:
rte_pci_dump;
+ rte_pci_get_sysfs_path;
rte_pci_ioport_map;
rte_pci_ioport_read;
rte_pci_ioport_unmap;
return -EINVAL;
}
snprintf(rsc_filename, PATH_MAX,
- "%s/" PCI_PRI_FMT "/resource%u", pci_get_sysfs_path(),
+ "%s/" PCI_PRI_FMT "/resource%u", rte_pci_get_sysfs_path(),
pci_addr->domain, pci_addr->bus,
pci_addr->devid, pci_addr->function, PCI_RESOURCE_NUMBER);
fd = open(rsc_filename, O_RDWR);
DPDK_16.07 {
global:
- pci_get_sysfs_path;
rte_keepalive_mark_sleep;
rte_keepalive_register_relay_callback;
rte_rtm_supported;