[PATCH net-next v3 2/2] selftests: tc-testing: add fq_pie per-flow class stats test

From: Hemendra M. Naik

Date: Tue Jun 30 2026 - 14:40:01 EST


Add a tc-testing entry (id: 83c0) to verify the fq_pie class ops
wired up in the previous patch do not crash and integrate cleanly
with the tc class show path.

The test creates an fq_pie root qdisc on a dummy interface and runs
'tc -s class show'.

Signed-off-by: Hemendra M. Naik <hemendranaik@xxxxxxxxx>
Signed-off-by: Vishal Kamath <vishy0777@xxxxxxxxx>
Signed-off-by: Mohit P. Tahiliani <tahiliani@xxxxxxxxxxx>
---

Changelog:

v3:
- No changes since v2.
- Resending as the previous submission was deferred when the net-next tree closed during review.
- Corresponding iproute2 patch updated in response to review comments; no changes required for this patch.

v2:
- No changes since v1. (https://lore.kernel.org/netdev/20260614125000.6058-3-hemendranaik@xxxxxxxxx/)

v1:
- https://lore.kernel.org/netdev/20260531125314.22492-3-hemendranaik@xxxxxxxxx/
---
.../tc-testing/tc-tests/qdiscs/fq_pie.json | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json
index 229fe1bf4a90..88139f429430 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json
@@ -40,5 +40,27 @@
"matchPattern": "qdisc fq_pie 1: root refcnt [0-9]+ limit 1p",
"matchCount": "1",
"teardown": ["$TC qdisc del dev $DEV1 handle 1: root"]
+ },
+ {
+ "id": "83c0",
+ "name": "FQ-PIE class stats accessible via tc class show",
+ "category": [
+ "qdisc",
+ "fq_pie"
+ ],
+ "plugins": {
+ "requires": "nsPlugin"
+ },
+ "setup": [
+ "$TC qdisc add dev $DUMMY handle 1: root fq_pie"
+ ],
+ "cmdUnderTest": "$TC -s class show dev $DUMMY",
+ "expExitCode": "0",
+ "verifyCmd": "$TC -s class show dev $DUMMY",
+ "matchPattern": "class fq_pie",
+ "matchCount": "0",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY handle 1: root"
+ ]
}
]
--
2.34.1