The comments describing `struct tc_pie_xstats` do not match the values
exported by the kernel.

Update the `delay` field comment to indicate that the value is reported
in microseconds, matching the `PSCHED_TICKS2NS() / NSEC_PER_USEC`
conversion.

Similarly, update the `avg_dq_rate` field comment to indicate that the
value is reported in bytes/second, matching the conversion performed by
`avg_dq_rate * PSCHED_TICKS_PER_SEC >> PIE_SCALE`.

These are documentation-only changes and do not modify the UAPI layout
or runtime behavior.

Signed-off-by: Hemendra M. Naik <[email protected]>
Signed-off-by: Vishal Kamath <[email protected]>
Signed-off-by: Mohit P. Tahiliani <[email protected]>
---
 include/uapi/linux/pkt_sched.h       | 4 ++--
 tools/include/uapi/linux/pkt_sched.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 9a86fa4d6846..26b7e6964adb 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
                                         */
        __u32 dq_rate_estimating;       /* is avg_dq_rate being calculated? */
        __u32 packets_in;               /* total number of packets enqueued */
diff --git a/tools/include/uapi/linux/pkt_sched.h 
b/tools/include/uapi/linux/pkt_sched.h
index 587481a19433..9bc190f0b3cf 100644
--- a/tools/include/uapi/linux/pkt_sched.h
+++ b/tools/include/uapi/linux/pkt_sched.h
@@ -847,8 +847,8 @@ enum {
 
 struct tc_pie_xstats {
        __u32 prob;             /* current probability */
-       __u32 delay;            /* current delay in ms */
-       __u32 avg_dq_rate;      /* current average dq_rate in bits/pie_time */
+       __u32 delay;            /* current delay in microseconds */
+       __u32 avg_dq_rate;      /* current average dq_rate in bytes/second */
        __u32 packets_in;       /* total number of packets enqueued */
        __u32 dropped;          /* packets dropped due to pie_action */
        __u32 overlimit;        /* dropped due to lack of space in queue */
--
2.34.1


Reply via email to