xref: /linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/choke.json (revision 5e0266f0e5f57617472d5aac4013f58a3ef264ac)
1[
2    {
3        "id": "8937",
4        "name": "Create CHOKE with default setting",
5        "category": [
6            "qdisc",
7            "choke"
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 choke limit 1000 bandwidth 10000",
16        "expExitCode": "0",
17        "verifyCmd": "$TC qdisc show dev $DUMMY",
18        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
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": "48c0",
27        "name": "Create CHOKE with min packet setting",
28        "category": [
29            "qdisc",
30            "choke"
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 choke limit 1000 bandwidth 10000 min 100",
39        "expExitCode": "0",
40        "verifyCmd": "$TC qdisc show dev $DUMMY",
41        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
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": "38c1",
50        "name": "Create CHOKE with max packet setting",
51        "category": [
52            "qdisc",
53            "choke"
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 choke limit 1000 bandwidth 10000 max 900",
62        "expExitCode": "0",
63        "verifyCmd": "$TC qdisc show dev $DUMMY",
64        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min.*max 900p",
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": "234a",
73        "name": "Create CHOKE with ecn setting",
74        "category": [
75            "qdisc",
76            "choke"
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 choke limit 1000 bandwidth 10000 ecn",
85        "expExitCode": "0",
86        "verifyCmd": "$TC qdisc show dev $DUMMY",
87        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p ecn",
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": "4380",
96        "name": "Create CHOKE with burst setting",
97        "category": [
98            "qdisc",
99            "choke"
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 choke limit 1000 bandwidth 10000 burst 100",
108        "expExitCode": "0",
109        "verifyCmd": "$TC qdisc show dev $DUMMY",
110        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
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": "48c7",
119        "name": "Delete CHOKE with valid handle",
120        "category": [
121            "qdisc",
122            "choke"
123        ],
124        "plugins": {
125            "requires": "nsPlugin"
126        },
127        "setup": [
128            "$IP link add dev $DUMMY type dummy || /bin/true",
129            "$TC qdisc add dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000"
130        ],
131        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
132        "expExitCode": "0",
133        "verifyCmd": "$TC qdisc show dev $DUMMY",
134        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 83p max 250p",
135        "matchCount": "0",
136        "teardown": [
137            "$IP link del dev $DUMMY type dummy"
138        ]
139    },
140    {
141        "id": "4398",
142        "name": "Replace CHOKE with min setting",
143        "category": [
144            "qdisc",
145            "choke"
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 choke limit 1000 bandwidth 10000"
153        ],
154        "cmdUnderTest": "$TC qdisc replace dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 min 100",
155        "expExitCode": "0",
156        "verifyCmd": "$TC qdisc show dev $DUMMY",
157        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
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": "0301",
166        "name": "Change CHOKE with limit setting",
167        "category": [
168            "qdisc",
169            "choke"
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 choke limit 1000 bandwidth 10000"
177        ],
178        "cmdUnderTest": "$TC qdisc change dev $DUMMY handle 1: root choke limit 1000 bandwidth 10000 min 100",
179        "expExitCode": "0",
180        "verifyCmd": "$TC qdisc show dev $DUMMY",
181        "matchPattern": "qdisc choke 1: root refcnt [0-9]+ limit 1000p min 100p max 250p",
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