forked from github/multus-cni
Bumpup CNI repo version
This commit is contained in:
committed by
Tomofumi Hayashi
parent
d9d72c7a4f
commit
c8a59dbb78
103
vendor/github.com/vishvananda/netlink/nl/tc_linux.go
generated
vendored
103
vendor/github.com/vishvananda/netlink/nl/tc_linux.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package nl
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -64,6 +65,15 @@ const (
|
||||
TCA_PRIO_MAX = TCA_PRIO_MQ
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_STATS_UNSPEC = iota
|
||||
TCA_STATS_BASIC
|
||||
TCA_STATS_RATE_EST
|
||||
TCA_STATS_QUEUE
|
||||
TCA_STATS_APP
|
||||
TCA_STATS_MAX = TCA_STATS_APP
|
||||
)
|
||||
|
||||
const (
|
||||
SizeofTcMsg = 0x14
|
||||
SizeofTcActionMsg = 0x04
|
||||
@@ -412,6 +422,57 @@ func (x *TcHtbGlob) Serialize() []byte {
|
||||
return (*(*[SizeofTcHtbGlob]byte)(unsafe.Pointer(x)))[:]
|
||||
}
|
||||
|
||||
// HFSC
|
||||
|
||||
type Curve struct {
|
||||
m1 uint32
|
||||
d uint32
|
||||
m2 uint32
|
||||
}
|
||||
|
||||
type HfscCopt struct {
|
||||
Rsc Curve
|
||||
Fsc Curve
|
||||
Usc Curve
|
||||
}
|
||||
|
||||
func (c *Curve) Attrs() (uint32, uint32, uint32) {
|
||||
return c.m1, c.d, c.m2
|
||||
}
|
||||
|
||||
func (c *Curve) Set(m1 uint32, d uint32, m2 uint32) {
|
||||
c.m1 = m1
|
||||
c.d = d
|
||||
c.m2 = m2
|
||||
}
|
||||
|
||||
func DeserializeHfscCurve(b []byte) *Curve {
|
||||
return &Curve{
|
||||
m1: binary.LittleEndian.Uint32(b[0:4]),
|
||||
d: binary.LittleEndian.Uint32(b[4:8]),
|
||||
m2: binary.LittleEndian.Uint32(b[8:12]),
|
||||
}
|
||||
}
|
||||
|
||||
func SerializeHfscCurve(c *Curve) (b []byte) {
|
||||
t := make([]byte, binary.MaxVarintLen32)
|
||||
binary.LittleEndian.PutUint32(t, c.m1)
|
||||
b = append(b, t[:4]...)
|
||||
binary.LittleEndian.PutUint32(t, c.d)
|
||||
b = append(b, t[:4]...)
|
||||
binary.LittleEndian.PutUint32(t, c.m2)
|
||||
b = append(b, t[:4]...)
|
||||
return b
|
||||
}
|
||||
|
||||
type TcHfscOpt struct {
|
||||
Defcls uint16
|
||||
}
|
||||
|
||||
func (x *TcHfscOpt) Serialize() []byte {
|
||||
return (*(*[2]byte)(unsafe.Pointer(x)))[:]
|
||||
}
|
||||
|
||||
const (
|
||||
TCA_U32_UNSPEC = iota
|
||||
TCA_U32_CLASSID
|
||||
@@ -673,3 +734,45 @@ const (
|
||||
TCA_FW_MASK
|
||||
TCA_FW_MAX = TCA_FW_MASK
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_MATCHALL_UNSPEC = iota
|
||||
TCA_MATCHALL_CLASSID
|
||||
TCA_MATCHALL_ACT
|
||||
TCA_MATCHALL_FLAGS
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_FQ_UNSPEC = iota
|
||||
TCA_FQ_PLIMIT // limit of total number of packets in queue
|
||||
TCA_FQ_FLOW_PLIMIT // limit of packets per flow
|
||||
TCA_FQ_QUANTUM // RR quantum
|
||||
TCA_FQ_INITIAL_QUANTUM // RR quantum for new flow
|
||||
TCA_FQ_RATE_ENABLE // enable/disable rate limiting
|
||||
TCA_FQ_FLOW_DEFAULT_RATE // obsolete do not use
|
||||
TCA_FQ_FLOW_MAX_RATE // per flow max rate
|
||||
TCA_FQ_BUCKETS_LOG // log2(number of buckets)
|
||||
TCA_FQ_FLOW_REFILL_DELAY // flow credit refill delay in usec
|
||||
TCA_FQ_ORPHAN_MASK // mask applied to orphaned skb hashes
|
||||
TCA_FQ_LOW_RATE_THRESHOLD // per packet delay under this rate
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_FQ_CODEL_UNSPEC = iota
|
||||
TCA_FQ_CODEL_TARGET
|
||||
TCA_FQ_CODEL_LIMIT
|
||||
TCA_FQ_CODEL_INTERVAL
|
||||
TCA_FQ_CODEL_ECN
|
||||
TCA_FQ_CODEL_FLOWS
|
||||
TCA_FQ_CODEL_QUANTUM
|
||||
TCA_FQ_CODEL_CE_THRESHOLD
|
||||
TCA_FQ_CODEL_DROP_BATCH_SIZE
|
||||
TCA_FQ_CODEL_MEMORY_LIMIT
|
||||
)
|
||||
|
||||
const (
|
||||
TCA_HFSC_UNSPEC = iota
|
||||
TCA_HFSC_RSC
|
||||
TCA_HFSC_FSC
|
||||
TCA_HFSC_USC
|
||||
)
|
||||
|
Reference in New Issue
Block a user