X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fdevice.sh;h=729a837b33d1cbd495614fc5aeac0d70cb0ff692;hp=a94244e52c9746d9baf24d78278f9b0b6c1ba509;hb=71d7150a65a7c006bf46b2c1001dbaa00b5681fb;hpb=faee3837917d93dad591933a706ed7d44df525b1 diff --git a/resources/libraries/bash/function/device.sh b/resources/libraries/bash/function/device.sh index a94244e52c..729a837b33 100644 --- a/resources/libraries/bash/function/device.sh +++ b/resources/libraries/bash/function/device.sh @@ -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