mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: hemendranaik@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	jiri@resnulli.us, jhs@mojatatu.com, shuah@kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	vishy0777@gmail.com, tahiliani@nitk.edu.in
Subject: Re: [PATCH net-next v9 3/3] net/sched: pie: correct tc_pie_xstats field documentation
Date: Wed, 30 Sep 2026 04:34:54 +0000	[thread overview]
Message-ID: <179074289474.434549.1623558597284494175@kernel.org> (raw)
In-Reply-To: <20260928043358.6866-4-hemendranaik@gmail.com>

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	other threads:[~2026-09-30  4:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  4:33 [PATCH net-next v9 0/3] net/sched: sch_fq_pie: add per-flow class statistics Hemendra M. Naik
2026-09-28  4:33 ` [PATCH net-next v9 1/3] net/sched: sch_fq_pie: add per-flow statistics via class ops Hemendra M. Naik
2026-09-30  4:34   ` netdev-bot+sashiko
2026-09-28  4:33 ` [PATCH net-next v9 2/3] selftests: tc-testing: add fq_pie per-flow class stats test Hemendra M. Naik
2026-09-30  4:34   ` netdev-bot+sashiko
2026-09-28  4:33 ` [PATCH net-next v9 3/3] net/sched: pie: correct tc_pie_xstats field documentation Hemendra M. Naik
2026-09-30  4:34   ` netdev-bot+sashiko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179074289474.434549.1623558597284494175@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hemendranaik@gmail.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tahiliani@nitk.edu.in \
    --cc=vishy0777@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®