vendor folder bump.
This commit is contained in:
108
vendor/github.com/vishvananda/netlink/qdisc.go
generated
vendored
108
vendor/github.com/vishvananda/netlink/qdisc.go
generated
vendored
@ -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
|
||||
}
|
||||
@ -230,3 +237,104 @@ func (qdisc *GenericQdisc) Attrs() *QdiscAttrs {
|
||||
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
|
||||
PacketLimit uint32
|
||||
FlowPacketLimit uint32
|
||||
// In bytes
|
||||
Quantum uint32
|
||||
InitialQuantum uint32
|
||||
// called RateEnable under the hood
|
||||
Pacing uint32
|
||||
FlowDefaultRate uint32
|
||||
FlowMaxRate uint32
|
||||
// called BucketsLog under the hood
|
||||
Buckets uint32
|
||||
FlowRefillDelay uint32
|
||||
LowRateThreshold uint32
|
||||
}
|
||||
|
||||
func (fq *Fq) String() string {
|
||||
return fmt.Sprintf(
|
||||
"{PacketLimit: %v, FlowPacketLimit: %v, Quantum: %v, InitalQuantum: %v, Pacing: %v, FlowDefaultRate: %v, FlowMaxRate: %v, Buckets: %v, FlowRefillDelay: %v, LowRateTreshold: %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,
|
||||
Pacing: 1,
|
||||
}
|
||||
}
|
||||
|
||||
func (qdisc *Fq) Attrs() *QdiscAttrs {
|
||||
return &qdisc.QdiscAttrs
|
||||
}
|
||||
|
||||
func (qdisc *Fq) Type() string {
|
||||
return "fq"
|
||||
}
|
||||
|
||||
// FQ_Codel (Fair Queuing Controlled Delay) is queuing discipline that combines Fair Queuing with the CoDel AQM scheme.
|
||||
type FqCodel struct {
|
||||
QdiscAttrs
|
||||
Target uint32
|
||||
Limit uint32
|
||||
Interval uint32
|
||||
ECN uint32
|
||||
Flows uint32
|
||||
Quantum uint32
|
||||
// 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,
|
||||
ECN: 1,
|
||||
}
|
||||
}
|
||||
|
||||
func (qdisc *FqCodel) Attrs() *QdiscAttrs {
|
||||
return &qdisc.QdiscAttrs
|
||||
}
|
||||
|
||||
func (qdisc *FqCodel) Type() string {
|
||||
return "fq_codel"
|
||||
}
|
||||
|
Reference in New Issue
Block a user