selftests: add a test case for cls_lower handle overflow
[linux-2.6-microblaze.git] / tools / testing / selftests / tc-testing / tc-tests / filters / tests.json
1 [
2     {
3         "id": "e9a3",
4         "name": "Add u32 with source match",
5         "category": [
6             "filter",
7             "u32"
8         ],
9         "setup": [
10             "$TC qdisc add dev $DEV1 ingress"
11         ],
12         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 1 u32 match ip src 127.0.0.1/32 flowid 1:1 action ok",
13         "expExitCode": "0",
14         "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
15         "matchPattern": "match 7f000001/ffffffff at 12",
16         "matchCount": "1",
17         "teardown": [
18             "$TC qdisc del dev $DEV1 ingress"
19         ]
20     },
21     {
22         "id": "2638",
23         "name": "Add matchall and try to get it",
24         "category": [
25             "filter",
26             "matchall"
27         ],
28         "setup": [
29             "$TC qdisc add dev $DEV1 clsact",
30             "$TC filter add dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall action ok"
31         ],
32         "cmdUnderTest": "$TC filter get dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall",
33         "expExitCode": "0",
34         "verifyCmd": "$TC filter show dev $DEV1 ingress",
35         "matchPattern": "filter protocol all pref 1 matchall chain 0 handle 0x1234",
36         "matchCount": "1",
37         "teardown": [
38             "$TC qdisc del dev $DEV1 clsact"
39         ]
40     },
41     {
42         "id": "2ff3",
43         "name": "Add flower with max handle and then dump it",
44         "category": [
45             "filter",
46             "flower"
47         ],
48         "setup": [
49             "$TC qdisc add dev $DEV2 ingress"
50         ],
51         "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 parent ffff: handle 0xffffffff flower action ok",
52         "expExitCode": "0",
53         "verifyCmd": "$TC filter show dev $DEV2 ingress",
54         "matchPattern": "filter protocol ip pref 1 flower.*handle 0xffffffff",
55         "matchCount": "1",
56         "teardown": [
57             "$TC qdisc del dev $DEV2 ingress"
58         ]
59     },
60     {
61         "id": "d052",
62         "name": "Add 1M filters with the same action",
63         "category": [
64             "filter",
65             "flower"
66         ],
67         "setup": [
68             "$TC qdisc add dev $DEV2 ingress",
69             "./tdc_batch.py $DEV2 $BATCH_FILE --share_action -n 1000000"
70         ],
71         "cmdUnderTest": "$TC -b $BATCH_FILE",
72         "expExitCode": "0",
73         "verifyCmd": "$TC actions list action gact",
74         "matchPattern": "action order 0: gact action drop.*index 1 ref 1000000 bind 1000000",
75         "matchCount": "1",
76         "teardown": [
77             "$TC qdisc del dev $DEV2 ingress",
78             "/bin/rm $BATCH_FILE"
79         ]
80     },
81     {
82         "id": "4cbd",
83         "name": "Try to add filter with duplicate key",
84         "category": [
85             "filter",
86             "flower"
87         ],
88         "setup": [
89             "$TC qdisc add dev $DEV2 ingress",
90             "$TC filter add dev $DEV2 protocol ip prio 1 parent ffff: flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop"
91         ],
92         "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip prio 1 parent ffff: flower dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50 ip_proto tcp src_ip 1.1.1.1 dst_ip 2.2.2.2 action drop",
93         "expExitCode": "2",
94         "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
95         "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
96         "matchCount": "1",
97         "teardown": [
98             "$TC qdisc del dev $DEV2 ingress"
99         ]
100     }
101 ]