Re: [PATCH net-next v10 3/4] net/sched: pie: correct tc_pie_xstats field documentation
From: netdev-bot+sashiko
Date: Wed Nov 11 2026 - 14:14:03 EST
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The patch fixes the unit comments for struct tc_pie_xstats in
include/uapi/linux/pkt_sched.h: delay is now 'microseconds' and…
--
net/sched: pie: correct tc_pie_xstats field documentation
This patch updates the comments on struct tc_pie_xstats in the uapi header.
The delay field is now documented as microseconds and avg_dq_rate as
bytes/second, which matches what pie_dump_stats() exports. There is no
change to the UAPI layout or to runtime behaviour.
> diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
> index fef848eaaab23..445a041cd103f 100644
> --- a/include/uapi/linux/pkt_sched.h
> +++ b/include/uapi/linux/pkt_sched.h
> @@ -920,9 +920,9 @@ enum {
>
> struct tc_pie_xstats {
> __u64 prob; /* current probability */
> - __u32 delay; /* current delay in ms */
> + __u32 delay; /* current delay in microseconds */
> __u32 avg_dq_rate; /* current average dq_rate in
> - * bits/pie_time
> + * bytes/second
> */
[Severity: Low]
Should the netlink YAML spec for this struct get the same correction?
The tc-pie-xstats definition in Documentation/netlink/specs/tc.yaml still
uses the old units:
name: delay
type: u32
doc: Current delay in ms
-
name: avg-dq-rate
type: u32
doc: Current average dq rate in bits/pie-time
pie_dump_stats() in net/sched/sch_pie.c exports microseconds and
bytes/second:
.delay = ((u32)PSCHED_TICKS2NS(READ_ONCE(q->vars.qdelay))) / NSEC_PER_USEC,
...
st.avg_dq_rate = READ_ONCE(q->vars.avg_dq_rate) *
(PSCHED_TICKS_PER_SEC) >> PIE_SCALE;
With this patch applied, the header and the YAML spec give different units
for the same uAPI struct.
The later commit "Documentation/netlink/specs: tc: describe fq_pie per-flow
class stats" edits tc.yaml. It documents the matching fq_pie fields as
microseconds and bytes/second, but leaves tc-pie-xstats as it is, so tc.yaml
contradicts itself at the end of the series.
The commit message says:
Touch include/uapi/linux/pkt_sched.h only
Could tc.yaml be updated here as well, or in a follow-up patch?
> __u32 dq_rate_estimating; /* is avg_dq_rate being calculated? */
> __u32 packets_in; /* total number of packets enqueued */
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261109071017.438478-1-hemendranaik%40gmail.com