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