vpp_device: fix vpp device kernel driver binding
[csit.git] / resources / libraries / bash / function / device.sh
index a94244e..729a837 100644 (file)
@@ -98,15 +98,11 @@ function bind_interfaces_to_driver () {
 
     pci_path="/sys/bus/pci/devices/${ADDR}"
     drv_path="/sys/bus/pci/drivers/${DRIVER}"
-    vd=$(cat ${pci_path}/vendor ${pci_path}/device) || {
-        die "Failed to retrieve interface details!"
-    }
-    set +e
-    echo ${vd} | sudo tee ${drv_path}/new_id
-    set -e
-    echo ${ADDR} | sudo tee ${pci_path}/driver/unbind || {
-        die "Failed to unbind interface ${ADDR}!"
-    }
+    if [ -d "${pci_path}/driver" ]; then
+        echo ${ADDR} | sudo tee ${pci_path}/driver/unbind || {
+            die "Failed to unbind interface ${ADDR}!"
+        }
+    fi
     echo ${ADDR} | sudo tee ${drv_path}/bind || {
         die "Failed to bind interface ${ADDR}!"
     }
@@ -611,6 +607,9 @@ function start_topology_containers () {
     dcr_stc_params+="--volume /opt/boot/:/opt/boot/ "
     # Mount host hugepages for VMs.
     dcr_stc_params+="--volume /dev/hugepages/:/dev/hugepages/ "
+    # Disable IPv6.
+    dcr_stc_params+="--sysctl net.ipv6.conf.all.disable_ipv6=1 "
+    dcr_stc_params+="--sysctl net.ipv6.conf.default.disable_ipv6=1 "
 
     # Docker Container UUIDs.
     declare -gA DCR_UUIDS