summaryrefslogtreecommitdiff
path: root/vendor/github.com/vishvananda/netlink/qdisc.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-01-23 08:41:20 +0000
committerMatthew Heon <mheon@redhat.com>2020-01-23 04:00:57 -0500
commit9f927c4709a51ef72d84bb557fc371d535c19fba (patch)
tree90b9d1f46b3663d6ee0cc1e1773b6ddf686874a2 /vendor/github.com/vishvananda/netlink/qdisc.go
parentac3a6b80b0ccd2f9592110811ccf6fd844110b9e (diff)
downloadpodman-9f927c4709a51ef72d84bb557fc371d535c19fba.tar.gz
podman-9f927c4709a51ef72d84bb557fc371d535c19fba.tar.bz2
podman-9f927c4709a51ef72d84bb557fc371d535c19fba.zip
build(deps): bump github.com/vishvananda/netlink from 1.0.0 to 1.1.0
Bumps [github.com/vishvananda/netlink](https://github.com/vishvananda/netlink) from 1.0.0 to 1.1.0. - [Release notes](https://github.com/vishvananda/netlink/releases) - [Commits](https://github.com/vishvananda/netlink/compare/v1.0.0...v1.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/github.com/vishvananda/netlink/qdisc.go')
-rw-r--r--vendor/github.com/vishvananda/netlink/qdisc.go48
1 files changed, 48 insertions, 0 deletions
diff --git a/vendor/github.com/vishvananda/netlink/qdisc.go b/vendor/github.com/vishvananda/netlink/qdisc.go
index 3df4b5c29..af78305ac 100644
--- a/vendor/github.com/vishvananda/netlink/qdisc.go
+++ b/vendor/github.com/vishvananda/netlink/qdisc.go
@@ -176,6 +176,13 @@ type Netem struct {
CorruptCorr uint32
}
+func (netem *Netem) String() string {
+ return fmt.Sprintf(
+ "{Latency: %v, Limit: %v, Loss: %v, Gap: %v, Duplicate: %v, Jitter: %v}",
+ netem.Latency, netem.Limit, netem.Loss, netem.Gap, netem.Duplicate, netem.Jitter,
+ )
+}
+
func (qdisc *Netem) Attrs() *QdiscAttrs {
return &qdisc.QdiscAttrs
}
@@ -231,6 +238,33 @@ func (qdisc *GenericQdisc) Type() string {
return qdisc.QdiscType
}
+type Hfsc struct {
+ QdiscAttrs
+ Defcls uint16
+}
+
+func NewHfsc(attrs QdiscAttrs) *Hfsc {
+ return &Hfsc{
+ QdiscAttrs: attrs,
+ Defcls: 1,
+ }
+}
+
+func (hfsc *Hfsc) Attrs() *QdiscAttrs {
+ return &hfsc.QdiscAttrs
+}
+
+func (hfsc *Hfsc) Type() string {
+ return "hfsc"
+}
+
+func (hfsc *Hfsc) String() string {
+ return fmt.Sprintf(
+ "{%v -- default: %d}",
+ hfsc.Attrs(), hfsc.Defcls,
+ )
+}
+
// Fq is a classless packet scheduler meant to be mostly used for locally generated traffic.
type Fq struct {
QdiscAttrs
@@ -249,6 +283,13 @@ type Fq struct {
LowRateThreshold uint32
}
+func (fq *Fq) String() string {
+ return fmt.Sprintf(
+ "{PacketLimit: %v, FlowPacketLimit: %v, Quantum: %v, InitialQuantum: %v, Pacing: %v, FlowDefaultRate: %v, FlowMaxRate: %v, Buckets: %v, FlowRefillDelay: %v, LowRateThreshold: %v}",
+ fq.PacketLimit, fq.FlowPacketLimit, fq.Quantum, fq.InitialQuantum, fq.Pacing, fq.FlowDefaultRate, fq.FlowMaxRate, fq.Buckets, fq.FlowRefillDelay, fq.LowRateThreshold,
+ )
+}
+
func NewFq(attrs QdiscAttrs) *Fq {
return &Fq{
QdiscAttrs: attrs,
@@ -276,6 +317,13 @@ type FqCodel struct {
// There are some more attributes here, but support for them seems not ubiquitous
}
+func (fqcodel *FqCodel) String() string {
+ return fmt.Sprintf(
+ "{%v -- Target: %v, Limit: %v, Interval: %v, ECM: %v, Flows: %v, Quantum: %v}",
+ fqcodel.Attrs(), fqcodel.Target, fqcodel.Limit, fqcodel.Interval, fqcodel.ECN, fqcodel.Flows, fqcodel.Quantum,
+ )
+}
+
func NewFqCodel(attrs QdiscAttrs) *FqCodel {
return &FqCodel{
QdiscAttrs: attrs,