SRIOV: Set sriov device mtu

This PS exposes the ability to set the vf device mtu.

Change-Id: If1193a71f1da391918e122c3d60f967023b732e1
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2018-09-18 09:46:07 -05:00
parent add7a9bc11
commit 8e4ee070e6
2 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,9 @@ else
NUM_VFS=$(cat /sys/class/net/{{ $sriov.device }}/device/sriov_totalvfs) NUM_VFS=$(cat /sys/class/net/{{ $sriov.device }}/device/sriov_totalvfs)
echo "${NUM_VFS}" > /sys/class/net/{{ $sriov.device }}/device/sriov_numvfs echo "${NUM_VFS}" > /sys/class/net/{{ $sriov.device }}/device/sriov_numvfs
fi fi
{{- if $sriov.mtu }}
ip link set dev {{ $sriov.device }} mtu {{ $sriov.mtu }}
{{- end }}
ip link set {{ $sriov.device }} up ip link set {{ $sriov.device }} up
ip link show {{ $sriov.device }} ip link show {{ $sriov.device }}
{{- if $sriov.promisc }} {{- if $sriov.promisc }}

View File

@ -113,6 +113,8 @@ network:
# sriov: # sriov:
# - device: ${DEV} # - device: ${DEV}
# num_vfs: 8 # num_vfs: 8
# mtu: 9214
# promisc: false
server: server:
ingress: ingress:
public: true public: true