Skip to content

Commit

Permalink
Fix ingress and egress burst value
Browse files Browse the repository at this point in the history
Signed-off-by: Yakul Garg <2000yeshu@gmail.com>
  • Loading branch information
2000yeshu committed Mar 28, 2024
1 parent 56c1793 commit 8048a15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/ctr/commands/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,15 @@ func getBandwidthConf(context *cli.Context) *gocni.BandWidth {

conf := &gocni.BandWidth{}

// burst cannot be more than 4GB
if ingressRate := context.Uint64("ingress-rate"); ingressRate > 0 {
conf.IngressRate = ingressRate
conf.IngressBurst = math.MaxUint64
conf.IngressBurst = math.MaxUint32
}

if egressRate := context.Uint64("egress-rate"); egressRate > 0 {
conf.EgressRate = egressRate
conf.EgressBurst = math.MaxUint64
conf.EgressBurst = math.MaxUint32
}

return conf
Expand Down

0 comments on commit 8048a15

Please sign in to comment.