summaryrefslogtreecommitdiffstats
path: root/src/vlib/pci/linux_pci.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-05-08 18:37:54 +0200
committerDamjan Marion <damarion@cisco.com>2017-05-08 18:37:54 +0200
commit3c785e09a039a20517dd9aab9c32d121a19f9d38 (patch)
tree07251e52a6f1418e48e42eb08dd5f2c4dd55a9bf /src/vlib/pci/linux_pci.c
parent7537e717d1ca6de0e33478bc50b9f7125f04c808 (diff)
vlib: do not unbind devices already bound to vfio-pci
Change-Id: I739bed5b9d9504d18ee88206e29ebc4ba1b47d28 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/pci/linux_pci.c')
-rw-r--r--src/vlib/pci/linux_pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vlib/pci/linux_pci.c b/src/vlib/pci/linux_pci.c
index f9ee47ac145..d43361aa48c 100644
--- a/src/vlib/pci/linux_pci.c
+++ b/src/vlib/pci/linux_pci.c
@@ -109,6 +109,11 @@ vlib_pci_bind_to_uio (vlib_pci_device_t * d, char *uio_driver_name)
goto done;
vec_reset_length (s);
+ s = format (s, "%v/iommu_group%c", dev_dir_name, 0);
+ if (access ((char *) s, F_OK) == 0)
+ goto done;
+ vec_reset_length (s);
+
/* walk trough all linux interfaces and if interface belonging to
this device is founf check if interface is admin up */
dir = opendir ("/sys/class/net");