-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests: qdiscs: Add TDC test for RED
Add a handful of tests for creating RED with different flags. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Petr Machata
authored and
David S. Miller
committed
Mar 15, 2020
1 parent
085793f
commit 10ef49b
Showing
1 changed file
with
117 additions
and
0 deletions.
There are no files selected for viewing
117 changes: 117 additions & 0 deletions
117
tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
[ | ||
{ | ||
"id": "8b6e", | ||
"name": "Create RED with no flags", | ||
"category": [ | ||
"qdisc", | ||
"red" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red limit 1M avpkt 1500 min 100K max 300K", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb $", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "342e", | ||
"name": "Create RED with adaptive flag", | ||
"category": [ | ||
"qdisc", | ||
"red" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red adaptive limit 1M avpkt 1500 min 100K max 300K", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb adaptive $", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "2d4b", | ||
"name": "Create RED with ECN flag", | ||
"category": [ | ||
"qdisc", | ||
"red" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn limit 1M avpkt 1500 min 100K max 300K", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn $", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "650f", | ||
"name": "Create RED with flags ECN, adaptive", | ||
"category": [ | ||
"qdisc", | ||
"red" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn adaptive limit 1M avpkt 1500 min 100K max 300K", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn adaptive $", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "5f15", | ||
"name": "Create RED with flags ECN, harddrop", | ||
"category": [ | ||
"qdisc", | ||
"red" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn harddrop limit 1M avpkt 1500 min 100K max 300K", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn harddrop $", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
} | ||
] |