From: Jamal Hadi Salim <jhs@mojatatu.com>
To: netdev@vger.kernel.org
Cc: "Jamal Hadi Salim" <jhs@mojatatu.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Willem de Bruijn" <willemb@google.com>,
"Simon Horman" <horms@kernel.org>,
"Jiri Pirko" <jiri@resnulli.us>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Vinicius Costa Gomes" <vinicius.gomes@intel.com>,
"Toke Høiland-Jørgensen" <toke@toke.dk>,
cake@lists.bufferbloat.net,
"Victor Nogueira" <victor@mojatatu.com>,
"Björn Töpel" <bjorn@kernel.org>,
Sashiko <sashiko-bot@kernel.org>
Subject: [PATCH net-next v15 0/4] net/sched: cap the accounted backlog before it can wrap
Date: Mon, 30 Nov 2026 13:38:21 -0500 [thread overview]
Message-ID: <20261130183825.229246-1-jhs@mojatatu.com> (raw)
This series bounds the shared qdisc backlog (sch->qstats.backlog) so that
it cannot wrap mod 2^32. A qdisc with per-CPU statistics books into
cpu_qstats and is outside this guard (stats-only).
1/4 cake: classifier refactor: cake_tcf_classify() returns its result
to the caller.
2/4 cake: use a dedicated split-GSO list iterator.
3/4 the fix: drop at enqueue once the stored backlog cannot represent
the packet's accounted length, saturate the fixed-removal helpers,
and keep the tree reconciliation modular. The ancestor-room check
is shared by tbf, dualpi2, netem and cake.
4/4 cake: split cake_hash() into key extraction (on the unsegmented
skb) and resolution (after admission), move the split-GSO path
ahead of the resolution, and refuse a split an ancestor cannot
absorb.
For the sashikos: net-next, no Fixes: (the aggregate wrap predates every
touched qdisc).
1/4 and 2/4 are unchanged from v14 and carry no revision-history block.
Changes in v15:
- the offload exemption is the pre-existing TCQ_F_OFFLOADED flag again;
the per-qdisc latch added in v14 is dropped, and the flag is cleared
only on a failed setup. The exemption is deliberately coarse: an
exact latch would have to follow the driver's own writes to
qstats.backlog, and the offload stats path still makes those.
- the ancestor-room walk crosses a NOPARENT child, so a parent that
mirrors the child still sees the growth.
- taprio rebuilds its counters from the children plus the packets
parked on the qdisc, instead of overwriting with the child sum; the
resync runs in ->dump() so the reported qlen and backlog are one
sample.
- the default taprio children are stamped NOPARENT, so their net change
is mirrored once.
- netem's corrupt-GSO split now applies the same ancestor-room check as
tbf and dualpi2.
- the split sites reserve two copies of the growth, because a netem
duplicate books its clone a second time.
- the remaining 32-bit net changes are cast to s64 where the tree
reconciliation takes them.
- 3/4 and 4/4 carry the v14 -> v15 block; 1/4 and 2/4 are unchanged.
Jamal Hadi Salim (4):
net/sched: cake: return the classifier result to the caller
net/sched: cake: use a dedicated split-GSO list iterator
net/sched: cap the accounted backlog before it can wrap
net/sched: cake: hash before segmenting and reject an overlong split
include/net/pkt_sched.h | 1 -
include/net/sch_generic.h | 48 +++++++++-
net/sched/sch_api.c | 62 +++++++++++--
net/sched/sch_cake.c | 191 +++++++++++++++++++++++++++-----------
net/sched/sch_cbs.c | 6 ++
net/sched/sch_choke.c | 6 ++
net/sched/sch_codel.c | 16 ++--
net/sched/sch_drr.c | 6 ++
net/sched/sch_dualpi2.c | 22 ++++-
net/sched/sch_etf.c | 6 ++
net/sched/sch_ets.c | 6 ++
net/sched/sch_fifo.c | 15 ++-
net/sched/sch_fq.c | 6 ++
net/sched/sch_fq_codel.c | 11 ++-
net/sched/sch_fq_pie.c | 3 +-
net/sched/sch_generic.c | 9 ++
net/sched/sch_gred.c | 9 ++
net/sched/sch_hfsc.c | 6 ++
net/sched/sch_hhf.c | 23 ++++-
net/sched/sch_htb.c | 16 +++-
net/sched/sch_netem.c | 56 ++++++++++-
net/sched/sch_pie.c | 3 +-
net/sched/sch_plug.c | 3 +-
net/sched/sch_prio.c | 6 ++
net/sched/sch_qfq.c | 6 ++
net/sched/sch_red.c | 10 ++
net/sched/sch_sfb.c | 6 ++
net/sched/sch_sfq.c | 8 +-
net/sched/sch_skbprio.c | 19 +++-
net/sched/sch_taprio.c | 150 ++++++++++++++++++++++++++----
net/sched/sch_tbf.c | 29 +++++-
31 files changed, 651 insertions(+), 113 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-30 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 18:38 Jamal Hadi Salim [this message]
2026-11-30 18:38 ` [PATCH net-next v15 1/4] net/sched: cake: return the classifier result to the caller Jamal Hadi Salim
2026-11-30 18:38 ` [PATCH net-next v15 2/4] net/sched: cake: use a dedicated split-GSO list iterator Jamal Hadi Salim
2026-11-30 18:38 ` [PATCH net-next v15 3/4] net/sched: cap the accounted backlog before it can wrap Jamal Hadi Salim
2026-11-30 18:38 ` [PATCH net-next v15 4/4] net/sched: cake: hash before segmenting and reject an overlong split Jamal Hadi Salim
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=20261130183825.229246-1-jhs@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=bjorn@kernel.org \
--cc=cake@lists.bufferbloat.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=stephen@networkplumber.org \
--cc=toke@toke.dk \
--cc=victor@mojatatu.com \
--cc=vinicius.gomes@intel.com \
--cc=willemb@google.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