pci: allow to override sysfs path
authorJan Viktorin <viktorin@rehivetech.com>
Mon, 13 Jun 2016 15:07:44 +0000 (17:07 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 13 Jun 2016 19:08:48 +0000 (21:08 +0200)
commit53c3c30c1120a641ae61822cad85ff0ec3a2158b
tree435596b3c42266e80c5c0343c72562bf8a94bbe0
parentceabf73721bf77592a5bc47ac8e66e6bd346a2b2
pci: allow to override sysfs path

The SYSFS_PCI_DEVICES is a constant that makes the PCI testing
difficult as it points to an absolute path. We remove using this
constant and introducing a function pci_get_sysfs_path that gives
the same value. However, the user can pass a SYSFS_PCI_DEVICES env
variable to override the path. It is now possible to create a fake
sysfs hierarchy for testing.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
29 files changed:
MAINTAINERS
app/test/Makefile
app/test/test_pci.c
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/class [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/config [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/consistent_dma_mask_bits [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/dma_mask_bits [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/enable [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/irq [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/modalias [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/msi_bus [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/numa_node [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/resource [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/sriov_numvfs [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/sriov_totalvfs [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_device [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/uevent [new file with mode: 0644]
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor [new file with mode: 0644]
drivers/net/szedata2/rte_eth_szedata2.c
drivers/net/virtio/virtio_pci.c
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/eal_common_pci.c
lib/librte_eal/common/include/rte_pci.h
lib/librte_eal/linuxapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/eal_pci_uio.c
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c
lib/librte_eal/linuxapp/eal/rte_eal_version.map