mirror of
https://github.com/vishvananda/netlink.git
synced 2025-09-27 04:05:59 +08:00
Add support for TCA_NETEM_RATE64 in Netem qdisc
- `Rate64` field added to the `Netem` struct in `qdisc.go` - Implemented serialization and deserialization methods for `Rate64` - Modify `TestClassAddDel` test to validate Rate64 changes
This commit is contained in:

committed by
Alessandro Boch

parent
306ce7b5b2
commit
6765a4402e
@@ -154,6 +154,7 @@ func TestClassAddDel(t *testing.T) {
|
||||
ReorderProb: 23.4,
|
||||
CorruptProb: 10.0,
|
||||
CorruptCorr: 10,
|
||||
Rate64: 10 * 1024 * 1024,
|
||||
}
|
||||
qdiscnetem := NewNetem(qattrs, nattrs)
|
||||
if err := QdiscAdd(qdiscnetem); err != nil {
|
||||
@@ -195,6 +196,9 @@ func TestClassAddDel(t *testing.T) {
|
||||
if netem.DuplicateCorr != qdiscnetem.DuplicateCorr {
|
||||
t.Fatal("DuplicateCorr does not match")
|
||||
}
|
||||
if netem.Rate64 != qdiscnetem.Rate64 {
|
||||
t.Fatalf("Rate64 does not match. Expected %d, got %d", netem.Rate64, qdiscnetem.Rate64)
|
||||
}
|
||||
|
||||
// Deletion
|
||||
// automatically removes netem qdisc
|
||||
|
Reference in New Issue
Block a user