Skip to content

Commit c5a06fd

Browse files
tammelaPaolo Abeni
authored andcommitted
selftests: tc-testing: add tests for qfq mtu sanity check
QFQ only supports a certain bound of MTU size so make sure we check for this requirement in the tests. Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Zhengchao Shao <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 158810b commit c5a06fd

File tree

1 file changed

+48
-0
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/qdiscs

1 file changed

+48
-0
lines changed

tools/testing/selftests/tc-testing/tc-tests/qdiscs/qfq.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,53 @@
213213
"$TC qdisc del dev $DUMMY handle 1: root",
214214
"$IP link del dev $DUMMY type dummy"
215215
]
216+
},
217+
{
218+
"id": "85ee",
219+
"name": "QFQ with big MTU",
220+
"category": [
221+
"qdisc",
222+
"qfq"
223+
],
224+
"plugins": {
225+
"requires": "nsPlugin"
226+
},
227+
"setup": [
228+
"$IP link add dev $DUMMY type dummy || /bin/true",
229+
"$IP link set dev $DUMMY mtu 2147483647 || /bin/true",
230+
"$TC qdisc add dev $DUMMY handle 1: root qfq"
231+
],
232+
"cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100",
233+
"expExitCode": "2",
234+
"verifyCmd": "$TC class show dev $DUMMY",
235+
"matchPattern": "class qfq 1:",
236+
"matchCount": "0",
237+
"teardown": [
238+
"$IP link del dev $DUMMY type dummy"
239+
]
240+
},
241+
{
242+
"id": "ddfa",
243+
"name": "QFQ with small MTU",
244+
"category": [
245+
"qdisc",
246+
"qfq"
247+
],
248+
"plugins": {
249+
"requires": "nsPlugin"
250+
},
251+
"setup": [
252+
"$IP link add dev $DUMMY type dummy || /bin/true",
253+
"$IP link set dev $DUMMY mtu 256 || /bin/true",
254+
"$TC qdisc add dev $DUMMY handle 1: root qfq"
255+
],
256+
"cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 qfq weight 100",
257+
"expExitCode": "2",
258+
"verifyCmd": "$TC class show dev $DUMMY",
259+
"matchPattern": "class qfq 1:",
260+
"matchCount": "0",
261+
"teardown": [
262+
"$IP link del dev $DUMMY type dummy"
263+
]
216264
}
217265
]

0 commit comments

Comments
 (0)