aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-13 19:10:50 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-13 19:28:22 +0200
commit890316df4cfa1440c6e5d4d26c8eba721de7fc27 (patch)
tree7cca9caed842ab938d8141a1b565b189b932544d
parent9b38e04de451a60da0bc8a685612282cd1b60ee6 (diff)
[jump] Enable jumbo frames for vnet devices
By default, vnet devices have a MTU of 1500 on the host side, causing issue with larger packets traversing the bridges between guest VMs when guest VMs have jumbo frames enabled. JIRA: FUEL-336 JIRA: FUEL-367 JIRA: FUEL-382 [1] http://linuxaleph.blogspot.com/2013/01/ how-to-network-jumbo-frames-to-kvm-guest.html [2] https://packetpushers.net/udev/ Change-Id: I941ac9cf764e3b3fa2d6463be5363b5459775f29 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rwxr-xr-xci/deploy.sh1
-rw-r--r--mcp/scripts/lib.sh7
2 files changed, 8 insertions, 0 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 40176073d..07cde2613 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -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[@]}"
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 4e4f36908..c566cc993 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -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