mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
selftests/tc-testing: cls_fw: add tests for classid
As discussed in '76e42ae83199', cls_fw was handling the use of classid incorrectly. Add a few tests to check if it's conforming to the correct behaviour. Reviewed-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a4a09ac64e
commit
70ad43333c
1 changed files with 49 additions and 0 deletions
|
@ -1351,5 +1351,54 @@
|
|||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 ingress"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "e470",
|
||||
"name": "Try to delete class referenced by fw after a replace",
|
||||
"category": [
|
||||
"filter",
|
||||
"fw"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$TC qdisc add dev $DEV1 parent root handle 10: drr",
|
||||
"$TC class add dev $DEV1 parent root classid 1 drr",
|
||||
"$TC filter add dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action ok",
|
||||
"$TC filter replace dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action drop"
|
||||
],
|
||||
"cmdUnderTest": "$TC class delete dev $DEV1 parent 10: classid 10:1",
|
||||
"expExitCode": "2",
|
||||
"verifyCmd": "$TC class show dev $DEV1",
|
||||
"matchPattern": "class drr 10:1",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 parent root drr"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ec1a",
|
||||
"name": "Replace fw classid with nil",
|
||||
"category": [
|
||||
"filter",
|
||||
"fw"
|
||||
],
|
||||
"plugins": {
|
||||
"requires": "nsPlugin"
|
||||
},
|
||||
"setup": [
|
||||
"$TC qdisc add dev $DEV1 parent root handle 10: drr",
|
||||
"$TC class add dev $DEV1 parent root classid 1 drr",
|
||||
"$TC filter add dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action ok"
|
||||
],
|
||||
"cmdUnderTest": "$TC filter replace dev $DEV1 parent 10: handle 1 prio 1 fw action drop",
|
||||
"expExitCode": "0",
|
||||
"verifyCmd": "$TC filter show dev $DEV1 parent 10:",
|
||||
"matchPattern": "fw chain 0 handle 0x1",
|
||||
"matchCount": "1",
|
||||
"teardown": [
|
||||
"$TC qdisc del dev $DEV1 parent root drr"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue