-
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/tc-testing: add selftests for sfq qdisc
Test 7482: Create SFQ with default setting Test c186: Create SFQ with limit setting Test ae23: Create SFQ with perturb setting Test a430: Create SFQ with quantum setting Test 4539: Create SFQ with divisor setting Test b089: Create SFQ with flows setting Test 99a0: Create SFQ with depth setting Test 7389: Create SFQ with headdrop setting Test 6472: Create SFQ with redflowlimit setting Test 8929: Show SFQ class Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Zhengchao Shao
authored and
David S. Miller
committed
Sep 28, 2022
1 parent
6ad92dc
commit 0158f65
Showing
2 changed files
with
233 additions
and
0 deletions.
There are no files selected for viewing
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
232 changes: 232 additions & 0 deletions
232
tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.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,232 @@ | ||
[ | ||
{ | ||
"id": "7482", | ||
"name": "Create SFQ with default setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum.*depth 127 divisor 1024", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "c186", | ||
"name": "Create SFQ with limit setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq limit 8", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 8p", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "ae23", | ||
"name": "Create SFQ with perturb setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq perturb 10", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "depth 127 divisor 1024 perturb 10sec", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "a430", | ||
"name": "Create SFQ with quantum setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq quantum 9000", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 9000b depth 127 divisor 1024", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "4539", | ||
"name": "Create SFQ with divisor setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq divisor 512", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 divisor 512", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "b089", | ||
"name": "Create SFQ with flows setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq flows 20", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "99a0", | ||
"name": "Create SFQ with depth setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq depth 64", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 64 divisor 1024", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "7389", | ||
"name": "Create SFQ with headdrop setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq headdrop", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 headdrop divisor 1024", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "6472", | ||
"name": "Create SFQ with redflowlimit setting", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq redflowlimit 100000 min 8000 max 60000 probability 0.20 ecn headdrop", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC qdisc show dev $DUMMY", | ||
"matchPattern": "qdisc sfq 1: root refcnt [0-9]+ limit 127p quantum 1514b depth 127 headdrop divisor 1024 ewma 6 min 8000b max 60000b probability 0.2 ecn", | ||
"matchCount": "1", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
}, | ||
{ | ||
"id": "8929", | ||
"name": "Show SFQ class", | ||
"category": [ | ||
"qdisc", | ||
"sfq" | ||
], | ||
"plugins": { | ||
"requires": "nsPlugin" | ||
}, | ||
"setup": [ | ||
"$IP link add dev $DUMMY type dummy || /bin/true" | ||
], | ||
"cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfq", | ||
"expExitCode": "0", | ||
"verifyCmd": "$TC class show dev $DUMMY", | ||
"matchPattern": "class sfq 1:", | ||
"matchCount": "0", | ||
"teardown": [ | ||
"$TC qdisc del dev $DUMMY handle 1: root", | ||
"$IP link del dev $DUMMY type dummy" | ||
] | ||
} | ||
] |