Skip to content

net/sched: sch_fq_pie: add per-flow class statistics

Hemendra M. Naik linux-kselftest lkml netdev 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest4 patches 1 replyIn review
  2. v93 patches 1 replySuperseded
  3. v83 patches 6 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v73 patches0 repliesSuperseded
v63 patches10 repliesSuperseded
v53 patches6 repliesSuperseded
v43 patches2 repliesSuperseded
v32 patches3 repliesSuperseded
v22 patches1 replySuperseded
v12 patches2 repliesSuperseded

Changes in v10 from the cover letter

- Update Documentation/netlink/specs/tc.yaml for fq_pie

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net/sched: sch_fq_pie: add per-flow statistics via class opsinclude/uapi/linux/pkt_sched.h net/sched/sch_fq_pie.c+104 -10 replies
2/4selftests: tc-testing: add fq_pie per-flow class stats testtools/testing/selftests/tc-testing/tc-tests/qdiscs/fq_pie.json+27 -00 replies
3/4net/sched: pie: correct tc_pie_xstats field documentationinclude/uapi/linux/pkt_sched.h+2 -20 replies
4/4Documentation/netlink/specs: tc: describe fq_pie per-flow class statsDocumentation/netlink/specs/tc.yaml+33 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v10 yet.

Read the v10 thread

Cover letter [PATCH net-next v10 0/4] net/sched: sch_fq_pie: add per-flow class statistics

FQ-PIE runs an independent PIE controller per flow but exposes no per-flow statistics. This series wires up fq_pie_class_ops to expose per-flow AQM state (prob, delay, deficit, avg_dq_rate) via 'tc -s class show', following a similar pattern as FQ-CoDel.

This patch series is accompanied by a companion iproute2 patch series that will be posted on net-next as well.

Both the kernel and iproute2 patches can also be found in GitHub:
- https://github.com/H-N41K/linux-net-next/tree/fq_pie_class_stats/
- https://github.com/H-N41K/iproute2-next/tree/fq_pie_class_stats

---
Changelog:

v10:
- Update Documentation/netlink/specs/tc.yaml for fq_pie

v9: https://lore.kernel.org/netdev/[email protected]/
- Add a blank line between structs in commit 1/3.

v8: https://lore.kernel.org/netdev/[email protected]/
- No code changes since v7.
- Reword commit message to reflect usage of div_u64().

v7: https://lore.kernel.org/netdev/[email protected]/
- No code changes since v6.
- Rebased over the latest net-next tree and re-submitted patch.

v6: https://lore.kernel.org/netdev/[email protected]/
- Address Sashiko review comments:
- Revert the fq_pie flows range to [1..65536].
- Also drop the accompanying selftest 83be change.
- Compute the per-flow delay with div_u64() on the full 64-bit nanosecond value.
- Widen avg_dq_rate to u64 before scaling it by PSCHED_TICKS_PER_SEC.
- Document the 36 to 64 byte xstats growth in the patch 1 commit message.
- Fix selftest 83c0. The ping payload exceeded the TBF burst so no packet ever reached fq_pie, and the missing -W left the run waiting out ping's default timeout.

v5: https://lore.kernel.org/netdev/[email protected]/
- Addressed Sashiko review comments:
- Omitted .tcf_block / .bind_tcf / .unbind_tcf from cl_ops (statistics only being exported; filter attach to fq_pie is now disabled).
- Dropped empty tc_fq_pie_xqd_stats placeholder; class_stats is a direct struct member.
- Limited flows to [1..65535] so per-flow class handles fit in a 16-bit TC minor.
- Rewrote selftest 83c0 with TBF + fq_pie, ping traffic, and matchCount 1 on per-flow stats output.
- Updated selftest 83be for the new flows limit.
- Dropped the tools/include UAPI mirror changes from patch 3/3.

v4: https://lore.kernel.org/netdev/[email protected]/
- Fixed unaligned commit message; moved typo fixes to another patch.

v3: https://lore.kernel.org/netdev/[email protected]/
- No changes since v2.
- Resent after the previous submission was deferred due to the net-next tree closing during review.
- Updated corresponding iproute2 patch in response to review comments; kernel patches unchanged.

v2: https://lore.kernel.org/netdev/[email protected]/
- Addressed ABI backward compatibility issue for tc_fq_pie_xstats.

v1: https://lore.kernel.org/netdev/[email protected]/
- Initial submission

Hemendra M. Naik (4):
net/sched: sch_fq_pie: add per-flow statistics via class ops
selftests: tc-testing: add fq_pie per-flow class stats test net/sched: pie: correct tc_pie_xstats field documentation Documentation/netlink/specs: tc: describe fq_pie per-flow class stats

 Documentation/netlink/specs/tc.yaml           | 32 +++++++
 include/uapi/linux/pkt_sched.h                | 21 ++++-
 net/sched/sch_fq_pie.c                        | 88 ++++++++++++++++++-
 .../tc-testing/tc-tests/qdiscs/fq_pie.json    | 27 ++++++
 4 files changed, 165 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1