1[
2    {
3        "id": "1820",
4        "name": "Create CBS with default setting",
5        "category": [
6            "qdisc",
7            "cbs"
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 cbs",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 0 idleslope 0 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "1532",
27        "name": "Create CBS with hicredit setting",
28        "category": [
29            "qdisc",
30            "cbs"
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 cbs hicredit 64",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 64 locredit 0 sendslope 0 idleslope 0 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "2078",
50        "name": "Create CBS with locredit setting",
51        "category": [
52            "qdisc",
53            "cbs"
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 cbs locredit 10",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 10 sendslope 0 idleslope 0 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "9271",
73        "name": "Create CBS with sendslope setting",
74        "category": [
75            "qdisc",
76            "cbs"
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 cbs sendslope 888",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 888 idleslope 0 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "0482",
96        "name": "Create CBS with idleslope setting",
97        "category": [
98            "qdisc",
99            "cbs"
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 cbs idleslope 666",
108        "expExitCode": "0",
109        "verifyCmd": "$TC qdisc show dev $DUMMY",
110        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 0 idleslope 666 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "e8f3",
119        "name": "Create CBS with multiple setting",
120        "category": [
121            "qdisc",
122            "cbs"
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 cbs hicredit 10 locredit 75 sendslope 2 idleslope 666",
131        "expExitCode": "0",
132        "verifyCmd": "$TC qdisc show dev $DUMMY",
133        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 10 locredit 75 sendslope 2 idleslope 666 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
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": "23c9",
142        "name": "Replace CBS with sendslope setting",
143        "category": [
144            "qdisc",
145            "cbs"
146        ],
147        "plugins": {
148            "requires": "nsPlugin"
149        },
150        "setup": [
151            "$IP link add dev $DUMMY type dummy || /bin/true",
152            "$TC qdisc add dev $DUMMY handle 1: root cbs idleslope 666"
153        ],
154        "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root cbs sendslope 10",
155        "expExitCode": "0",
156        "verifyCmd": "$TC qdisc show dev $DUMMY",
157        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 10 idleslope 0 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
158        "matchCount": "1",
159        "teardown": [
160            "$TC qdisc del dev $DUMMY handle 1: root",
161            "$IP link del dev $DUMMY type dummy"
162        ]
163    },
164    {
165        "id": "a07a",
166        "name": "Change CBS with idleslope setting",
167        "category": [
168            "qdisc",
169            "cbs"
170        ],
171        "plugins": {
172            "requires": "nsPlugin"
173        },
174        "setup": [
175            "$IP link add dev $DUMMY type dummy || /bin/true",
176            "$TC qdisc add dev $DUMMY handle 1: root cbs idleslope 666"
177        ],
178        "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root cbs idleslope 1",
179        "expExitCode": "0",
180        "verifyCmd": "$TC qdisc show dev $DUMMY",
181        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 0 idleslope 1 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
182        "matchCount": "1",
183        "teardown": [
184            "$TC qdisc del dev $DUMMY handle 1: root",
185            "$IP link del dev $DUMMY type dummy"
186        ]
187    },
188    {
189        "id": "43b3",
190        "name": "Delete CBS with handle",
191        "category": [
192            "qdisc",
193            "cbs"
194        ],
195        "plugins": {
196            "requires": "nsPlugin"
197        },
198        "setup": [
199            "$IP link add dev $DUMMY type dummy || /bin/true",
200            "$TC qdisc add dev $DUMMY handle 1: root cbs idleslope 666"
201        ],
202        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
203        "expExitCode": "0",
204        "verifyCmd": "$TC qdisc show dev $DUMMY",
205        "matchPattern": "qdisc cbs 1: root refcnt [0-9]+ hicredit 0 locredit 0 sendslope 0 idleslope 1 offload 0.*qdisc pfifo 0: parent 1: limit 1000p",
206        "matchCount": "0",
207        "teardown": [
208            "$IP link del dev $DUMMY type dummy"
209        ]
210    },
211    {
212        "id": "9472",
213        "name": "Show CBS class",
214        "category": [
215            "qdisc",
216            "cbs"
217        ],
218        "plugins": {
219            "requires": "nsPlugin"
220        },
221        "setup": [
222            "$IP link add dev $DUMMY type dummy || /bin/true"
223        ],
224        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root cbs",
225        "expExitCode": "0",
226        "verifyCmd": "$TC class show dev $DUMMY",
227        "matchPattern": "class cbs 1:[0-9]+ parent 1:",
228        "matchCount": "1",
229        "teardown": [
230            "$TC qdisc del dev $DUMMY handle 1: root",
231            "$IP link del dev $DUMMY type dummy"
232        ]
233    }
234]
235