From 8e4ee070e65d54e2e5aa23b03febfac281278bf3 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 18 Sep 2018 09:46:07 -0500 Subject: [PATCH] SRIOV: Set sriov device mtu This PS exposes the ability to set the vf device mtu. Change-Id: If1193a71f1da391918e122c3d60f967023b732e1 Signed-off-by: Pete Birley --- neutron/templates/bin/_neutron-sriov-agent-init.sh.tpl | 3 +++ neutron/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/neutron/templates/bin/_neutron-sriov-agent-init.sh.tpl b/neutron/templates/bin/_neutron-sriov-agent-init.sh.tpl index 2d38f58518..131f3825a0 100644 --- a/neutron/templates/bin/_neutron-sriov-agent-init.sh.tpl +++ b/neutron/templates/bin/_neutron-sriov-agent-init.sh.tpl @@ -25,6 +25,9 @@ else NUM_VFS=$(cat /sys/class/net/{{ $sriov.device }}/device/sriov_totalvfs) echo "${NUM_VFS}" > /sys/class/net/{{ $sriov.device }}/device/sriov_numvfs fi +{{- if $sriov.mtu }} +ip link set dev {{ $sriov.device }} mtu {{ $sriov.mtu }} +{{- end }} ip link set {{ $sriov.device }} up ip link show {{ $sriov.device }} {{- if $sriov.promisc }} diff --git a/neutron/values.yaml b/neutron/values.yaml index 64201bec0a..a19964b36d 100644 --- a/neutron/values.yaml +++ b/neutron/values.yaml @@ -113,6 +113,8 @@ network: # sriov: # - device: ${DEV} # num_vfs: 8 + # mtu: 9214 + # promisc: false server: ingress: public: true