Skip to content

Commit

Permalink
Use rate as the burst as well for ingress and egress
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 29, 2024
1 parent 8048a15 commit 65d4411
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/ctr/commands/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"encoding/csv"
"errors"
"fmt"
"math"
"strings"

"github.com/containerd/console"
Expand Down Expand Up @@ -278,12 +277,12 @@ func getBandwidthConf(context *cli.Context) *gocni.BandWidth {
// burst cannot be more than 4GB
if ingressRate := context.Uint64("ingress-rate"); ingressRate > 0 {
conf.IngressRate = ingressRate
conf.IngressBurst = math.MaxUint32
conf.IngressBurst = ingressRate
}

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

return conf
Expand Down

0 comments on commit 65d4411

Please sign in to comment.