From: netdev-bot+sashiko@kernel.org
To: hemendranaik@gmail.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
jiri@resnulli.us, jhs@mojatatu.com, shuah@kernel.org,
donald.hunter@gmail.com, ast@fiberby.net, toke@redhat.com,
liuhangbin@kylinos.cn, j.koeppeler@tu-berlin.de,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
vishy0777@gmail.com, tahiliani@nitk.edu.in
Subject: Re: [PATCH net-next v11 4/4] Documentation/netlink/specs: tc: describe fq_pie per-flow class stats
Date: Sat, 05 Dec 2026 19:17:43 +0000 [thread overview]
Message-ID: <179649826362.3148.7609035964951816843@kernel.org> (raw)
In-Reply-To: <20261204190143.633361-5-hemendranaik@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The spec now describes the fq_pie xstats fixed header as 64
bytes.
--
Documentation/netlink/specs: tc: describe fq_pie per-flow class stats
This commit adds a tc-fq-pie-cl-stats struct to the tc netlink spec. It
also extends the tc-fq-pie-xstats fixed header with a type discriminator
and a class-stats member, and corrects the units in the tc-pie-xstats
member docs.
> diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
> index b6ccc645b0e33..ff71042e31c15 100644
> --- a/Documentation/netlink/specs/tc.yaml
> +++ b/Documentation/netlink/specs/tc.yaml
[ ... ]
> @@ -901,39 +926,48 @@ definitions:
[ ... ]
> -
> name: memory-usage
> type: u32
> - doc: Total memory across all queues
> + doc: Total memory across all queues (qdisc dumps only)
> + -
> + name: type
> + type: u32
> + doc: TCA_FQ_PIE_XSTATS_QDISC (0) or TCA_FQ_PIE_XSTATS_CLASS (1)
> + -
> + name: class-stats
> + type: binary
> + struct: tc-fq-pie-cl-stats
> + doc: Class statistics of a particular flow (invoked via tc class show)
[Severity: Medium]
With these two members appended, the fq_pie fixed header described by the
spec grows from 36 bytes to 64 bytes. Kernels without the earlier change
in this series, "net/sched: sch_fq_pie: add per-flow statistics via class
ops", still send the 36-byte struct tc_fq_pie_xstats (nine __u32
counters) from fq_pie_dump_stats():
gnet_stats_copy_app(d, &st, sizeof(st));
Can the in-tree YNL decoder handle that shorter payload?
The fq_pie entry in tca-stats-app-msg maps to fixed-header
tc-fq-pie-xstats. YnlFamily._decode_sub_msg() therefore calls
_decode_struct() on the TCA_XSTATS and TCA_STATS_APP payloads, and
_decode_struct() in tools/net/ynl/pyynl/lib/ynl.py walks every member
without checking len(data):
format_ = NlAttr.get_format(m.type, m.byte_order)
[ value ] = format_.unpack_from(data, offset)
offset += format_.size
For the new type member this becomes unpack_from(data, 36) on a 36-byte
buffer, which raises struct.error. Nothing in the decode path catches it.
As a result, something like:
cli.py --spec Documentation/netlink/specs/tc.yaml --dump getqdisc
run against an older kernel with an fq_pie qdisc configured would fail to
decode the whole message. Before this patch it decoded the nine legacy
counters correctly.
tc-fq-qd-stats seems to have the same limitation, since it lists members
that older kernels lack. This patch adds a new instance of it for fq_pie,
though.
Could _decode_struct() stop at the end of the available data, or could
the spec stay decodable for the legacy 36-byte layout in some other way?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204190143.633361-1-hemendranaik%40gmail.com
prev parent reply other threads:[~2026-12-05 19:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 19:01 [PATCH net-next v11 0/4] net/sched: sch_fq_pie: add per-flow class statistics Hemendra M. Naik
2026-12-04 19:01 ` [PATCH net-next v11 1/4] net/sched: sch_fq_pie: add per-flow statistics via class ops Hemendra M. Naik
2026-12-05 19:17 ` netdev-bot+sashiko
2026-12-04 19:01 ` [PATCH net-next v11 2/4] selftests: tc-testing: add fq_pie per-flow class stats test Hemendra M. Naik
2026-12-05 19:17 ` netdev-bot+sashiko
2026-12-04 19:01 ` [PATCH net-next v11 3/4] net/sched: pie: correct tc_pie_xstats field documentation Hemendra M. Naik
2026-12-04 19:01 ` [PATCH net-next v11 4/4] Documentation/netlink/specs: tc: describe fq_pie per-flow class stats Hemendra M. Naik
2026-12-05 19:17 ` 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=179649826362.3148.7609035964951816843@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=hemendranaik@gmail.com \
--cc=horms@kernel.org \
--cc=j.koeppeler@tu-berlin.de \
--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=liuhangbin@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=tahiliani@nitk.edu.in \
--cc=toke@redhat.com \
--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