Merge "[jump] Enable jumbo frames for vnet devices"
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 14 Aug 2018 11:29:31 +0000 (11:29 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 14 Aug 2018 11:29:31 +0000 (11:29 +0000)
ci/deploy.sh
mcp/scripts/lib.sh

index 4017607..07cde26 100755 (executable)
@@ -293,6 +293,7 @@ else
       "${virtual_nodes[@]}"
     create_networks "${OPNFV_BRIDGES[@]}"
     do_sysctl_cfg
+    do_udev_cfg
     create_vms "${STORAGE_DIR}" "${virtual_nodes_data}" "${OPNFV_BRIDGES[@]}"
     update_mcpcontrol_network
     start_vms "${virtual_nodes[@]}"
index 4e4f369..c566cc9 100644 (file)
@@ -546,6 +546,13 @@ function wait_for {
   )
 }
 
+function do_udev_cfg {
+  local _conf='/etc/udev/rules.d/99-opnfv-fuel-vnet-mtu.rules'
+  # http://linuxaleph.blogspot.com/2013/01/how-to-network-jumbo-frames-to-kvm-guest.html
+  echo 'SUBSYSTEM=="net", ACTION=="add", KERNEL=="vnet*", RUN+="/sbin/ip link set mtu 9000 dev '"'"%k"'"'"' |& sudo tee "${_conf}"
+  sudo udevadm control --reload || true
+}
+
 function do_sysctl_cfg {
   local _conf='/etc/sysctl.d/99-opnfv-fuel-bridge.conf'
   # https://wiki.libvirt.org/page/Net.bridge.bridge-nf-call_and_sysctl.conf