1[
2    {
3        "id": "3294",
4        "name": "Create SFB with default setting",
5        "category": [
6            "qdisc",
7            "sfb"
8        ],
9        "plugins": {
10            "requires": "nsPlugin"
11        },
12        "setup": [
13            "$IP link add dev $DUMMY type dummy || /bin/true"
14        ],
15        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 60s",
19        "matchCount": "1",
20        "teardown": [
21            "$TC qdisc del dev $DUMMY handle 1: root",
22            "$IP link del dev $DUMMY type dummy"
23        ]
24    },
25    {
26        "id": "430a",
27        "name": "Create SFB with rehash setting",
28        "category": [
29            "qdisc",
30            "sfb"
31        ],
32        "plugins": {
33            "requires": "nsPlugin"
34        },
35        "setup": [
36            "$IP link add dev $DUMMY type dummy || /bin/true"
37        ],
38        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb rehash 60",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 60ms db 60s",
42        "matchCount": "1",
43        "teardown": [
44            "$TC qdisc del dev $DUMMY handle 1: root",
45            "$IP link del dev $DUMMY type dummy"
46        ]
47    },
48    {
49        "id": "3410",
50        "name": "Create SFB with db setting",
51        "category": [
52            "qdisc",
53            "sfb"
54        ],
55        "plugins": {
56            "requires": "nsPlugin"
57        },
58        "setup": [
59            "$IP link add dev $DUMMY type dummy || /bin/true"
60        ],
61        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb db 10",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 10ms",
65        "matchCount": "1",
66        "teardown": [
67            "$TC qdisc del dev $DUMMY handle 1: root",
68            "$IP link del dev $DUMMY type dummy"
69        ]
70    },
71    {
72        "id": "49a0",
73        "name": "Create SFB with limit setting",
74        "category": [
75            "qdisc",
76            "sfb"
77        ],
78        "plugins": {
79            "requires": "nsPlugin"
80        },
81        "setup": [
82            "$IP link add dev $DUMMY type dummy || /bin/true"
83        ],
84        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb limit 100",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc sfb 1: root refcnt [0-9]+ rehash 600s db 60s limit 100p",
88        "matchCount": "1",
89        "teardown": [
90            "$TC qdisc del dev $DUMMY handle 1: root",
91            "$IP link del dev $DUMMY type dummy"
92        ]
93    },
94    {
95        "id": "1241",
96        "name": "Create SFB with max setting",
97        "category": [
98            "qdisc",
99            "sfb"
100        ],
101        "plugins": {
102            "requires": "nsPlugin"
103        },
104        "setup": [
105            "$IP link add dev $DUMMY type dummy || /bin/true"
106        ],
107        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb max 100",
108        "expExitCode": "0",
109        "verifyCmd": "$TC qdisc show dev $DUMMY",
110        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*max 100p",
111        "matchCount": "1",
112        "teardown": [
113            "$TC qdisc del dev $DUMMY handle 1: root",
114            "$IP link del dev $DUMMY type dummy"
115        ]
116    },
117    {
118        "id": "3249",
119        "name": "Create SFB with target setting",
120        "category": [
121            "qdisc",
122            "sfb"
123        ],
124        "plugins": {
125            "requires": "nsPlugin"
126        },
127        "setup": [
128            "$IP link add dev $DUMMY type dummy || /bin/true"
129        ],
130        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb target 100",
131        "expExitCode": "0",
132        "verifyCmd": "$TC qdisc show dev $DUMMY",
133        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*target 100p",
134        "matchCount": "1",
135        "teardown": [
136            "$TC qdisc del dev $DUMMY handle 1: root",
137            "$IP link del dev $DUMMY type dummy"
138        ]
139    },
140    {
141        "id": "30a9",
142        "name": "Create SFB with increment setting",
143        "category": [
144            "qdisc",
145            "sfb"
146        ],
147        "plugins": {
148            "requires": "nsPlugin"
149        },
150        "setup": [
151            "$IP link add dev $DUMMY type dummy || /bin/true"
152        ],
153        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb increment 0.1",
154        "expExitCode": "0",
155        "verifyCmd": "$TC qdisc show dev $DUMMY",
156        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*increment 0.1",
157        "matchCount": "1",
158        "teardown": [
159            "$TC qdisc del dev $DUMMY handle 1: root",
160            "$IP link del dev $DUMMY type dummy"
161        ]
162    },
163    {
164        "id": "239a",
165        "name": "Create SFB with decrement setting",
166        "category": [
167            "qdisc",
168            "sfb"
169        ],
170        "plugins": {
171            "requires": "nsPlugin"
172        },
173        "setup": [
174            "$IP link add dev $DUMMY type dummy || /bin/true"
175        ],
176        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb decrement 0.1",
177        "expExitCode": "0",
178        "verifyCmd": "$TC qdisc show dev $DUMMY",
179        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*decrement 0.1",
180        "matchCount": "1",
181        "teardown": [
182            "$TC qdisc del dev $DUMMY handle 1: root",
183            "$IP link del dev $DUMMY type dummy"
184        ]
185    },
186    {
187        "id": "9301",
188        "name": "Create SFB with penalty_rate setting",
189        "category": [
190            "qdisc",
191            "sfb"
192        ],
193        "plugins": {
194            "requires": "nsPlugin"
195        },
196        "setup": [
197            "$IP link add dev $DUMMY type dummy || /bin/true"
198        ],
199        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb penalty_rate 4000",
200        "expExitCode": "0",
201        "verifyCmd": "$TC qdisc show dev $DUMMY",
202        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*penalty_rate 4000pps",
203        "matchCount": "1",
204        "teardown": [
205            "$TC qdisc del dev $DUMMY handle 1: root",
206            "$IP link del dev $DUMMY type dummy"
207        ]
208    },
209    {
210        "id": "2a01",
211        "name": "Create SFB with penalty_burst setting",
212        "category": [
213            "qdisc",
214            "sfb"
215        ],
216        "plugins": {
217            "requires": "nsPlugin"
218        },
219        "setup": [
220            "$IP link add dev $DUMMY type dummy || /bin/true"
221        ],
222        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb penalty_burst 64",
223        "expExitCode": "0",
224        "verifyCmd": "$TC qdisc show dev $DUMMY",
225        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 600s db 60s.*penalty_burst 64p",
226        "matchCount": "1",
227        "teardown": [
228            "$TC qdisc del dev $DUMMY handle 1: root",
229            "$IP link del dev $DUMMY type dummy"
230        ]
231    },
232    {
233        "id": "3209",
234        "name": "Change SFB with rehash setting",
235        "category": [
236            "qdisc",
237            "sfb"
238        ],
239        "plugins": {
240            "requires": "nsPlugin"
241        },
242        "setup": [
243            "$IP link add dev $DUMMY type dummy || /bin/true",
244            "$TC qdisc add dev $DUMMY handle 1: root sfb penalty_burst 64"
245        ],
246        "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root sfb rehash 100",
247        "expExitCode": "0",
248        "verifyCmd": "$TC qdisc show dev $DUMMY",
249        "matchPattern": "qdisc sfb 1: root refcnt 2 rehash 100ms db 60s",
250        "matchCount": "1",
251        "teardown": [
252            "$TC qdisc del dev $DUMMY handle 1: root",
253            "$IP link del dev $DUMMY type dummy"
254        ]
255    },
256    {
257        "id": "5447",
258        "name": "Show SFB class",
259        "category": [
260            "qdisc",
261            "sfb"
262        ],
263        "plugins": {
264            "requires": "nsPlugin"
265        },
266        "setup": [
267            "$IP link add dev $DUMMY type dummy || /bin/true"
268        ],
269        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root sfb",
270        "expExitCode": "0",
271        "verifyCmd": "$TC class show dev $DUMMY",
272        "matchPattern": "class sfb 1:",
273        "matchCount": "0",
274        "teardown": [
275            "$TC qdisc del dev $DUMMY handle 1: root",
276            "$IP link del dev $DUMMY type dummy"
277        ]
278    }
279]
280