Commit 972e8861 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Jakub Kicinski

selftests/tc-testings: add list case for basic filter

Test 0811: Add multiple basic filter with cmp ematch u8/link layer and
default action and dump them
Test 5129: List basic filters
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: default avatarVictor Nogueira <victor@mojatatu.com>
Tested-by: default avatarVictor Nogueira <victor@mojatatu.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fa8dfba5
...@@ -1274,5 +1274,52 @@ ...@@ -1274,5 +1274,52 @@
"teardown": [ "teardown": [
"$TC qdisc del dev $DEV1 ingress" "$TC qdisc del dev $DEV1 ingress"
] ]
},
{
"id": "0811",
"name": "Add multiple basic filter with cmp ematch u8/link layer and default action and dump them",
"category": [
"filter",
"basic"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$TC qdisc add dev $DEV1 ingress",
"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1"
],
"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 2 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
"expExitCode": "0",
"verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
"matchPattern": "^filter protocol ip pref 1 basic",
"matchCount": "3",
"teardown": [
"$TC qdisc del dev $DEV1 ingress"
]
},
{
"id": "5129",
"name": "List basic filters",
"category": [
"filter",
"basic"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$TC qdisc add dev $DEV1 ingress",
"$TC filter add dev $DEV1 parent ffff: handle 1 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1",
"$TC filter add dev $DEV1 parent ffff: handle 2 protocol ip prio 1 basic match 'cmp(u8 at 0 layer link mask 0xff gt 10)' classid 1:1"
],
"cmdUnderTest": "$TC filter show dev $DEV1 parent ffff:",
"expExitCode": "0",
"verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
"matchPattern": "cmp\\(u8 at 0 layer 0 mask 0xff gt 10\\)",
"matchCount": "2",
"teardown": [
"$TC qdisc del dev $DEV1 ingress"
]
} }
] ]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment