Skip to content

Commit

Permalink
fix: add ingress_policing_burst to accurate limit ingress bandwidth
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Nov 13, 2019
1 parent 2f850ad commit fe2f261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ovs/ovs-vsctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func SetPodBandwidth(podName, podNamespace, ingress, egress string) error {

for _, ifName := range interfaceList {
// ingress_policing_rate is in Kbps
err := ovsSet("interface", ifName, fmt.Sprintf("ingress_policing_rate=%d", ingressKPS))
err := ovsSet("interface", ifName, fmt.Sprintf("ingress_policing_rate=%d", ingressKPS), fmt.Sprintf("ingress_policing_burst=%d", ingressKPS*10/8))
if err != nil {
return err
}
Expand Down

0 comments on commit fe2f261

Please sign in to comment.