1[
2    {
3        "id": "e122",
4        "name": "Add route filter with from and to tag",
5        "category": [
6            "filter",
7            "route"
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 100 route from 1 to 10 classid 1:10",
16        "expExitCode": "0",
17        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
18        "matchPattern": "flowid 1:10 to 10 from 1",
19        "matchCount": "1",
20        "teardown": [
21            "$TC qdisc del dev $DEV1 ingress"
22        ]
23    },
24    {
25        "id": "6573",
26        "name": "Add route filter with fromif and to tag",
27        "category": [
28            "filter",
29            "route"
30        ],
31        "plugins": {
32            "requires": "nsPlugin"
33        },
34        "setup": [
35            "$TC qdisc add dev $DEV1 ingress"
36        ],
37        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 100 route fromif $DEV1 to 10 classid 1:10",
38        "expExitCode": "0",
39        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
40        "matchPattern": "flowid 1:10 to 10 fromif",
41        "matchCount": "1",
42        "teardown": [
43            "$TC qdisc del dev $DEV1 ingress"
44        ]
45    },
46    {
47        "id": "1362",
48        "name": "Add route filter with to flag and reclassify action",
49        "category": [
50            "filter",
51            "route"
52        ],
53        "plugins": {
54            "requires": "nsPlugin"
55        },
56        "setup": [
57            "$TC qdisc add dev $DEV1 ingress"
58        ],
59        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route to 10 classid 1:20 action reclassify",
60        "expExitCode": "0",
61        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
62        "matchPattern": "filter protocol ip pref.*route chain [0-9]+.*flowid 1:20 to 10.*action order [0-9]+: gact action reclassify",
63        "matchCount": "1",
64        "teardown": [
65            "$TC qdisc del dev $DEV1 ingress"
66        ]
67    },
68    {
69        "id": "4720",
70        "name": "Add route filter with from flag and continue actions",
71        "category": [
72            "filter",
73            "route"
74        ],
75        "plugins": {
76            "requires": "nsPlugin"
77        },
78        "setup": [
79            "$TC qdisc add dev $DEV1 ingress"
80        ],
81        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 10 classid 1:100 action continue",
82        "expExitCode": "0",
83        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
84        "matchPattern": "filter protocol ip pref.*route chain [0-9]+.*flowid 1:100 from 10.*action continue",
85        "matchCount": "1",
86        "teardown": [
87            "$TC qdisc del dev $DEV1 ingress"
88        ]
89    },
90    {
91        "id": "2812",
92        "name": "Add route filter with form tag and pipe action",
93        "category": [
94            "filter",
95            "route"
96        ],
97        "plugins": {
98            "requires": "nsPlugin"
99        },
100        "setup": [
101            "$TC qdisc add dev $DEV1 ingress"
102        ],
103        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 10 to 2 classid 1:1 action pipe",
104        "expExitCode": "0",
105        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
106        "matchPattern": "filter protocol ip pref.*route chain [0-9]+.*flowid 1:1 to 2 from 10.*action pipe",
107        "matchCount": "1",
108        "teardown": [
109            "$TC qdisc del dev $DEV1 ingress"
110        ]
111    },
112    {
113        "id": "7994",
114        "name": "Add route filter with miltiple actions",
115        "category": [
116            "filter",
117            "route"
118        ],
119        "plugins": {
120            "requires": "nsPlugin"
121        },
122        "setup": [
123            "$TC qdisc add dev $DEV1 ingress"
124        ],
125        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 10 to 2 classid 1:1 action skbedit mark 7 pipe action gact drop",
126        "expExitCode": "0",
127        "verifyCmd": "$TC filter ls dev $DEV1 parent ffff:",
128        "matchPattern": "filter protocol ip pref.*route chain [0-9]+.*flowid 1:1 to 2 from 10.*action order [0-9]+: skbedit  mark 7 pipe.*action order [0-9]+: gact action drop",
129        "matchCount": "1",
130        "teardown": [
131            "$TC qdisc del dev $DEV1 ingress"
132        ]
133    },
134    {
135        "id": "4312",
136        "name": "List route filters",
137        "category": [
138            "filter",
139            "route"
140        ],
141        "plugins": {
142            "requires": "nsPlugin"
143        },
144        "setup": [
145            "$TC qdisc add dev $DEV1 ingress",
146            "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 10 to 2 classid 1:1 action pipe",
147            "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 20 to 1 classid 1:20 action pipe"
148        ],
149        "cmdUnderTest": "$TC filter show dev $DEV1 parent ffff:",
150        "expExitCode": "0",
151        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
152        "matchPattern": "action order [0-9]+: gact action pipe",
153        "matchCount": "2",
154        "teardown": [
155            "$TC qdisc del dev $DEV1 ingress"
156        ]
157    },
158    {
159        "id": "2634",
160        "name": "Delete route filter with pipe action",
161        "category": [
162            "filter",
163            "route"
164        ],
165        "plugins": {
166            "requires": "nsPlugin"
167        },
168        "setup": [
169            "$TC qdisc add dev $DEV1 ingress",
170            "$TC filter add dev $DEV1 parent ffff: protocol ip prio 2 route from 10 to 2 classid 1:1 action pipe"
171        ],
172        "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: protocol ip prio 2 route from 10 to 2 classid 1:1 action pipe",
173        "expExitCode": "0",
174        "verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
175        "matchPattern": "filter protocol ip pref.*route chain [0-9]+.*flowid 1:1 to 2 from 10.*action pipe",
176        "matchCount": "0",
177        "teardown": [
178            "$TC qdisc del dev $DEV1 ingress"
179        ]
180    }
181]
182