0f89cd50a94b67aa9fe0e6a87955e43df51ab3fa
[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         "plugins": {
10                 "requires": "nsPlugin"
11         },
12         "setup": [
13             "$TC qdisc add dev $DEV1 ingress"
14         ],
15         "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",
16         "expExitCode": "0",
17         "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
18         "matchPattern": "match 7f000001/ffffffff at 12",
19         "matchCount": "1",
20         "teardown": [
21             "$TC qdisc del dev $DEV1 ingress"
22         ]
23     },
24     {
25         "id": "2638",
26         "name": "Add matchall and try to get it",
27         "category": [
28             "filter",
29             "matchall"
30         ],
31         "plugins": {
32                 "requires": "nsPlugin"
33         },
34         "setup": [
35             "$TC qdisc add dev $DEV1 clsact",
36             "$TC filter add dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall action ok"
37         ],
38         "cmdUnderTest": "$TC filter get dev $DEV1 protocol all pref 1 ingress handle 0x1234 matchall",
39         "expExitCode": "0",
40         "verifyCmd": "$TC filter show dev $DEV1 ingress",
41         "matchPattern": "filter protocol all pref 1 matchall chain 0 handle 0x1234",
42         "matchCount": "1",
43         "teardown": [
44             "$TC qdisc del dev $DEV1 clsact"
45         ]
46     },
47     {
48         "id": "2ff3",
49         "name": "Add flower with max handle and then dump it",
50         "category": [
51             "filter",
52             "flower"
53         ],
54         "setup": [
55             "$TC qdisc add dev $DEV2 ingress"
56         ],
57         "cmdUnderTest": "$TC filter add dev $DEV2 protocol ip pref 1 parent ffff: handle 0xffffffff flower action ok",
58         "expExitCode": "0",
59         "verifyCmd": "$TC filter show dev $DEV2 ingress",
60         "matchPattern": "filter protocol ip pref 1 flower.*handle 0xffffffff",
61         "matchCount": "1",
62         "teardown": [
63             "$TC qdisc del dev $DEV2 ingress"
64         ]
65     },
66     {
67         "id": "d052",
68         "name": "Add 1M filters with the same action",
69         "category": [
70             "filter",
71             "flower"
72         ],
73         "plugins": {
74                 "requires": "nsPlugin"
75         },
76         "setup": [
77             "$TC qdisc add dev $DEV2 ingress",
78             "./tdc_batch.py $DEV2 $BATCH_FILE --share_action -n 1000000"
79         ],
80         "cmdUnderTest": "$TC -b $BATCH_FILE",
81         "expExitCode": "0",
82         "verifyCmd": "$TC actions list action gact",
83         "matchPattern": "action order 0: gact action drop.*index 1 ref 1000000 bind 1000000",
84         "matchCount": "1",
85         "teardown": [
86             "$TC qdisc del dev $DEV2 ingress",
87             "/bin/rm $BATCH_FILE"
88         ]
89     },
90     {
91         "id": "4cbd",
92         "name": "Try to add filter with duplicate key",
93         "category": [
94             "filter",
95             "flower"
96         ],
97         "plugins": {
98                 "requires": "nsPlugin"
99         },
100         "setup": [
101             "$TC qdisc add dev $DEV2 ingress",
102             "$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"
103         ],
104         "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",
105         "expExitCode": "2",
106         "verifyCmd": "$TC -s filter show dev $DEV2 ingress",
107         "matchPattern": "filter protocol ip pref 1 flower chain 0 handle",
108         "matchCount": "1",
109         "teardown": [
110             "$TC qdisc del dev $DEV2 ingress"
111         ]
112     }
113 ]