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 units for struct tc_pie_xstats in
  include/uapi/linux/pkt_sched.h, but misses the other in-tree…

--

net/sched: pie: correct tc_pie_xstats field documentation

This commit changes the comments on struct tc_pie_xstats in the uapi
pkt_sched.h header so they match the values pie_dump_stats() exports.
The delay field is now documented in microseconds and avg_dq_rate in
bytes/second. There is no layout or runtime change.

> 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 Documentation/netlink/specs/tc.yaml get the same fix?

The tc-pie-xstats struct in the tc netlink spec still has the old units:

Documentation/netlink/specs/tc.yaml:
      -
        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
per second:

        .delay          = ((u32)PSCHED_TICKS2NS(READ_ONCE(q->vars.qdelay))) /
                                   NSEC_PER_USEC,
        ...
        /* unscale and return dq_rate in bytes per sec */
        if (st.dq_rate_estimating)
                st.avg_dq_rate = READ_ONCE(q->vars.avg_dq_rate) *
                                 (PSCHED_TICKS_PER_SEC) >> PIE_SCALE;

After this patch, the header and the spec describe the same fields with
different units. The generated netlink spec documentation will still
show "ms" and "bits/pie-time".

The commit message says:

    Documentation-only; no UAPI layout or runtime change. Touch
    include/uapi/linux/pkt_sched.h only

Could the patch update the delay and avg-dq-rate doc strings in tc.yaml
too? The same file already uses "microseconds" for similar fields, for
example delay-c and delay-l in tc-dualpi2-xstats.

>       __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/20260928043358.6866-1-hemendranaik%40gmail.com

Reply via email to