Skip to content

Commit 72b50ab

Browse files
congwangNipaLocal
authored and
NipaLocal
committed
selftests: tc-testing: Add TBF with SKBPRIO queue length corner case test
Add a test case to validate the interaction between TBF and SKBPRIO queueing disciplines, specifically targeting queue length accounting corner cases. This test complements the fix for the queue length accounting issue in the SKBPRIO qdisc. This is still best-effort, as timing and manipulating enqueue and dequeue from user-space is very hard. Cc: Pedro Tammela <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 591396d commit 72b50ab

File tree

1 file changed

+33
-1
lines changed
  • tools/testing/selftests/tc-testing/tc-tests/infra

1 file changed

+33
-1
lines changed

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

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,37 @@
126126
"$TC qdisc del dev $DUMMY root handle 1: drr",
127127
"$IP addr del 10.10.10.10/24 dev $DUMMY"
128128
]
129-
}
129+
},
130+
{
131+
"id": "c024",
132+
"name": "Test TBF with SKBPRIO - catch qlen corner cases",
133+
"category": [
134+
"qdisc",
135+
"tbf",
136+
"skbprio"
137+
],
138+
"plugins": {
139+
"requires": "nsPlugin"
140+
},
141+
"setup": [
142+
"$IP link set dev $DUMMY up || true",
143+
"$IP addr add 10.10.10.10/24 dev $DUMMY || true",
144+
"$TC qdisc add dev $DUMMY handle 1: root tbf rate 100bit burst 2000 limit 1000",
145+
"$TC qdisc add dev $DUMMY parent 1: handle 10: skbprio limit 1",
146+
"ping -c 1 -W 0.1 -Q 0x00 -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
147+
"ping -c 1 -W 0.1 -Q 0x1c -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
148+
"ping -c 1 -W 0.1 -Q 0x00 -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
149+
"ping -c 1 -W 0.1 -Q 0x1c -s 1400 -I $DUMMY 10.10.10.1 > /dev/null || true",
150+
"sleep 0.5"
151+
],
152+
"cmdUnderTest": "$TC -s qdisc show dev $DUMMY",
153+
"expExitCode": "0",
154+
"verifyCmd": "$TC -s qdisc show dev $DUMMY | grep -A 5 'qdisc skbprio'",
155+
"matchPattern": "dropped [1-9][0-9]*",
156+
"matchCount": "1",
157+
"teardown": [
158+
"$TC qdisc del dev $DUMMY handle 1: root",
159+
"$IP addr del 10.10.10.10/24 dev $DUMMY || true"
160+
]
161+
}
130162
]

0 commit comments

Comments
 (0)