Add QOS support for neutron sriov

Change-Id: I5a1df5d7f6cf179e8cd26a288b5749340b8827dd
This commit is contained in:
Roy Tang 2020-01-25 11:04:45 -08:00 committed by Roy Tang
parent 76049bb591
commit fdce0e46d9
2 changed files with 10 additions and 1 deletions

View File

@ -43,6 +43,13 @@ else
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 hasKey $sriov "qos" -}}
{{- range $v, $qos := $sriov.qos }}
echo "{{ $qos.share }}" > /sys/class/net/{{ $sriov.device }}/device/sriov/{{ $qos.vf_num }}/qos/share
{{- end}}
echo "1" > /sys/class/net/{{ $sriov.device }}/device/sriov/qos/apply
{{- end }}
{{- if $sriov.mtu }} {{- if $sriov.mtu }}
ip link set dev {{ $sriov.device }} mtu {{ $sriov.mtu }} ip link set dev {{ $sriov.device }} mtu {{ $sriov.mtu }}
{{- end }} {{- end }}

View File

@ -108,7 +108,6 @@ network:
# If tunnel is null there is a fallback mechanism to search # If tunnel is null there is a fallback mechanism to search
# for interface with routing using tunnel network cidr. # for interface with routing using tunnel network cidr.
tunnel_network_cidr: "0/0" tunnel_network_cidr: "0/0"
sriov:
# To perform setup of network interfaces using the SR-IOV init # To perform setup of network interfaces using the SR-IOV init
# container you can use a section similar to: # container you can use a section similar to:
# sriov: # sriov:
@ -116,6 +115,9 @@ network:
# num_vfs: 8 # num_vfs: 8
# mtu: 9214 # mtu: 9214
# promisc: false # promisc: false
# qos:
# - vf_num: 0
# share: 10
server: server:
ingress: ingress:
public: true public: true