From: "Hemendra M. Naik" <hemendranaik@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: davem@davemloft.net, edumazet@google.com, hemendranaik@gmail.com,
horms@kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
kuba@kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, shuah@kernel.org, tahiliani@nitk.edu.in,
vishy0777@gmail.com
Subject: Re: [PATCH net-next v6 1/3] net/sched: sch_fq_pie: add per-flow statistics via class ops
Date: Wed, 23 Sep 2026 01:50:13 +0530 [thread overview]
Message-ID: <20260922202013.25126-1-hemendranaik@gmail.com> (raw)
In-Reply-To: <179002340755.2160803.3742716999091408861@kernel.org>
Thank you for the review. Replies are inline below.
> Is this paragraph describing a change made by this patch? The diff is
> purely additive and net/sched/sch_fq_pie.c had no delay or avg_dq_rate
> conversion before it, so the new fq_pie_dump_class_stats() is not
> replacing any truncating computation.
>
> The code that actually contains both of the described defects is
> pie_dump_stats() in net/sched/sch_pie.c, which this patch does not touch
> and does not mention, and there is no Fixes: tag.
>
> Could the paragraph either be reworded as a deliberate difference from
> the pie qdisc, or the series extended to fix pie_dump_stats() as well?
As you noted, the diff here is purely additive, so this paragraph isn't
describing a fix to existing code in this file - there's nothing in this
patch's history to carry a Fixes: tag for. It's explaining why the new
code uses div_u64() and a widened u64 intermediate: to avoid a known
overflow pattern, not to describe a prior bug in this file.
The bug you found in pie_dump_stats() is real, but it's independent,
pre-existing (net/sched/sch_pie.c, ~2014), and unrelated to whether this
new ABI addition is correct. We'd rather not fold a fix for that into a
series about adding per-flow statistics - it deserves its own patch,
separately from this series.
We can make the paragraph read as a comparison rather than a claim about
this file - e.g. "which can wrap" instead of "which wrapped" - a
wording-only change, no scope change.
> Growing struct tc_fq_pie_xstats from 36 to 64 bytes is visible to
> userspace in both directions [...] Does the accompanying iproute2
> change parse defensively, e.g. copying min(RTA_PAYLOAD(xstats),
> sizeof(st)) bytes into a zeroed local struct rather than bailing out?
> [...] Could that reasoning be added to the changelog?
>
> The alternative would be to leave tc_fq_pie_xstats at 36 bytes entirely
> and emit a separate struct [...] Was that option considered and
> rejected?
Yes to both. iproute2's fq_pie_print_xstats() already does exactly this:
it copies into a zeroed local struct and memcpy()s only RTA_PAYLOAD()
bytes when the reply is short, so a short/zero-filled read still
resolves to TCA_FQ_PIE_XSTATS_QDISC (0) and prints normally. This
reasoning is already in the changelog - it's there now, not something
we're planning to add.
We did consider a separate struct and rejected it. fq_codel can put its
discriminator first only because it was designed in from day one;
tc_fq_pie_xstats already has nine fixed-offset __u32 counters that
predate this patch, so a discriminator can only be appended here, not
prepended, without moving those offsets. A new, separate struct would
still need its own attribute and its own print callback wired up in tc,
splitting one qdisc's stats across two code paths for no added
compatibility benefit. Extending the existing struct was thus better.
pw-bot: cr
next prev parent reply other threads:[~2026-09-22 20:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 20:42 [PATCH net-next v6 0/3] net/sched: sch_fq_pie: add per-flow class statistics Hemendra M. Naik
2026-09-17 20:42 ` [PATCH net-next v6 1/3] net/sched: sch_fq_pie: add per-flow statistics via class ops Hemendra M. Naik
2026-09-21 20:43 ` netdev-bot+sashiko
2026-09-22 20:20 ` Hemendra M. Naik [this message]
2026-09-17 20:42 ` [PATCH net-next v6 2/3] selftests: tc-testing: add fq_pie per-flow class stats test Hemendra M. Naik
2026-09-21 20:43 ` netdev-bot+sashiko
2026-09-22 20:26 ` Hemendra M. Naik
2026-09-17 20:42 ` [PATCH net-next v6 3/3] net/sched: pie: correct tc_pie_xstats field documentation Hemendra M. Naik
2026-09-21 20:43 ` netdev-bot+sashiko
2026-09-22 20:30 ` Hemendra M. Naik
2026-09-18 22:59 ` [PATCH net-next v6 0/3] net/sched: sch_fq_pie: add per-flow class statistics Jakub Kicinski
2026-09-19 6:26 ` Hemendra M. Naik
2026-09-23 1:04 ` Jakub Kicinski
2026-09-23 4:01 ` Hemendra M. Naik
2026-09-24 2:53 ` Jakub Kicinski
2026-09-24 11:35 ` Victor Nogueira
2026-09-24 15:13 ` Jakub Kicinski
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=20260922202013.25126-1-hemendranaik@gmail.com \
--to=hemendranaik@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.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-bot+sashiko@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®