xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/hhf.json (revision 3a38ef2b3cb6b63c105247b5ea4a9cf600e673f0)
1[
2    {
3        "id": "4812",
4        "name": "Create HHF with default setting",
5        "category": [
6            "qdisc",
7            "hhf"
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 hhf",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
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": "8a92",
27        "name": "Create HHF with limit setting",
28        "category": [
29            "qdisc",
30            "hhf"
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 hhf limit 1500",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+ limit 1500p.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
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": "3491",
50        "name": "Create HHF with quantum setting",
51        "category": [
52            "qdisc",
53            "hhf"
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 hhf quantum 9000",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*quantum 9000b hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
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": "ba04",
73        "name": "Create HHF with reset_timeout setting",
74        "category": [
75            "qdisc",
76            "hhf"
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 hhf reset_timeout 100ms",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 100ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
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": "4238",
96        "name": "Create HHF with admit_bytes setting",
97        "category": [
98            "qdisc",
99            "hhf"
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 hhf admit_bytes 100000",
108        "expExitCode": "0",
109        "verifyCmd": "$TC qdisc show dev $DUMMY",
110        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 100000b evict_timeout 1s non_hh_weight 2",
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": "839f",
119        "name": "Create HHF with evict_timeout setting",
120        "category": [
121            "qdisc",
122            "hhf"
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 hhf evict_timeout 0.5s",
131        "expExitCode": "0",
132        "verifyCmd": "$TC qdisc show dev $DUMMY",
133        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 500ms non_hh_weight 2",
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": "a044",
142        "name": "Create HHF with non_hh_weight setting",
143        "category": [
144            "qdisc",
145            "hhf"
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 hhf non_hh_weight 10",
154        "expExitCode": "0",
155        "verifyCmd": "$TC qdisc show dev $DUMMY",
156        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 10",
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": "32f9",
165        "name": "Change HHF with limit setting",
166        "category": [
167            "qdisc",
168            "hhf"
169        ],
170        "plugins": {
171            "requires": "nsPlugin"
172        },
173        "setup": [
174            "$IP link add dev $DUMMY type dummy || /bin/true",
175            "$TC qdisc add dev $DUMMY handle 1: root hhf"
176        ],
177        "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root hhf limit 1500",
178        "expExitCode": "0",
179        "verifyCmd": "$TC qdisc show dev $DUMMY",
180        "matchPattern": "qdisc hhf 1: root refcnt [0-9]+ limit 1500p.*hh_limit 2048 reset_timeout 40ms admit_bytes 128Kb evict_timeout 1s non_hh_weight 2",
181        "matchCount": "1",
182        "teardown": [
183            "$TC qdisc del dev $DUMMY handle 1: root",
184            "$IP link del dev $DUMMY type dummy"
185        ]
186    },
187    {
188        "id": "385e",
189        "name": "Show HHF class",
190        "category": [
191            "qdisc",
192            "hhf"
193        ],
194        "plugins": {
195            "requires": "nsPlugin"
196        },
197        "setup": [
198            "$IP link add dev $DUMMY type dummy || /bin/true"
199        ],
200        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root hhf",
201        "expExitCode": "0",
202        "verifyCmd": "$TC class show dev $DUMMY",
203        "matchPattern": "class hhf 1:",
204        "matchCount": "0",
205        "teardown": [
206            "$TC qdisc del dev $DUMMY handle 1: root",
207            "$IP link del dev $DUMMY type dummy"
208        ]
209    }
210]
211