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/2026…%40gmail.com