Article View: linux.kernel.netdev
Article #24094[PATCH net-next v14 0/4] net/sched: cap the accounted backlog before it can wrap
From: Jamal Hadi Salim
Date: Sun, 29 Nov 2026 09:06
Date: Sun, 29 Nov 2026 09:06
79 lines
14334 bytes
14334 bytes
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 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 v13 and carry no revision-history block.
Changes in v14:
- the reconciliation length is s64, so a multi-gigabyte purge is
removed rather than read as growth.
- the ancestor delta is modular again; only the fixed-removal helpers
clamp a known-positive amount.
- taprio resyncs from its children when the guard would refuse traffic
and in the stats dump, under the qdisc lock; the mirror delta is s64
and the resync is skipped inside an open mirror window.
- the offload exemption is latched on a successful setup and cleared
when the counter returns to core ownership.
- the ancestor-room check is shared by tbf, dualpi2 and cake; netem's
duplicate keeps the original accounted length. tbf also bounds its
own segment-sum booking.
- 3/4 and 4/4 carry the v13 -> v14 block; 1/4 and 2/4 are unchanged.
- rebased onto net-next f89726ffabef.
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 | 68 ++++++++++++-
net/sched/sch_api.c | 50 +++++++++-
net/sched/sch_cake.c | 196 +++++++++++++++++++++++++++-----------
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 | 19 +++-
net/sched/sch_etf.c | 6 ++
net/sched/sch_ets.c | 6 ++
net/sched/sch_fifo.c | 12 +++
net/sched/sch_fq.c | 6 ++
net/sched/sch_fq_codel.c | 9 ++
net/sched/sch_fq_pie.c | 3 +-
net/sched/sch_generic.c | 11 +++
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 | 18 ++++
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 | 145 ++++++++++++++++++++++++----
net/sched/sch_tbf.c | 27 +++++-
31 files changed, 623 insertions(+), 103 deletions(-)
--
2.43.0
Technical Details
Message-ID:
<QDISC-BA27.v14.r0.20261128181551@mojatatu.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373423-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373423-linux-kernel-netdev=dewy.ru
From: jhs@mojatatu.com (Jamal Hadi Salim)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v14 0/4] net/sched: cap the accounted backlog before it can wrap
Date: Sun, 29 Nov 2026 04:06:33 -0500
Organization: Usenet Network
Message-ID: <QDISC-BA27.v14.r0.20261128181551@mojatatu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1137817"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:PKTymyIGJDO3yKgcgR1bpC9GQTs= sha256:fwvh0e0gbjSuIz/g5LveBL+HI/8PM12TPZ4QznV9s18=
sha1:TvDk+1wx6DVkttC59kz0HF+lrcQ= sha256:DdeZGYZf9kReGmkROmptlL5pcAewCKEGbtN+7Vy4P/0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 0A9C4125F9B; Sun, 29 Nov 2026 12:07:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.15
X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
header.d=mojatatu.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id hiowPw2JQ4Q8;
Sun, 29 Nov 2026 12:06:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-373423-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 245C2125F95; Sun, 29 Nov 2026 12:06:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 17D9A2695C; Sun, 29 Nov 2026 09:06:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795943204;
b=QJJUeszS3Qf/Ne69+55jTz/54eunw4u6S5Tdgi9axUSbKdchRVJ+wcF9qtKgx5iA9RGE
NUso/HDWss2eaatLfOkYESl+Q0Z+syTbHlH6qczit32QUL3g07GgZgZRwaG8zd5VxWTX0
v+TL9B5uM9nvRe82h3o+YKW5QhqWXYzKPoubj2+uRvSXUjpl9/kxniOu4egkvNkwL1tvo
oLhUgZMVMwLKVfTOr5xCfXbhVhC8frI2qsHzU0czwrc3OX2kC4fj6/j1D50P8KvFXIe/q
VlJI+/3cgtkgYPzIMJOvj0OoZ4N/jj/4JB+5+Ys9buCq7ZZ/z8FZO5J/rBgCrgOiiZA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795943204;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:Content-Type:
Content-Transfer-Encoding;
bh=so7XSV2tgW0bc2KaF1PMo+MgdsNMNRBpipeOKs0zUGE=;
b=vHkSKhvegr8KCLp5EyuLQXkyde0DEYFk6O3tgwkMTlMBb+QYuC8Rd1DVdi4DhALyp9h6
kZ9SJqTbAuyrJblCHMIsh0f1vQBbflBRYqs0ztprn6+voc0ISClUFezRxhXED2F9TFVO2
pE+pd+pJqaIK8a9JlRDmNlOvVliG1LBhmIHYl4g0vF+c91gPfDWiAt0sAgMIodQMf6Mwp
bM6niWBiGPsOLJvGLMlzSLoiLynb4uXoauQCzZC6FlZiGI/F9JmCXgidXy6O2U2SyNav3
KZB+5Eodp0qiB/Kl35KAOGFLyxvtW2bdHsCzgU54wKvYe0GCcZ5GhNjcIl/+UGWWjEg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=P586KNsd;
dmarc=none header.from=mojatatu.com;
spf=none smtp.mailfrom=mojatatu.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C03DF606A33F;
Sun, 29 Nov 2026 09:06:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=P586KNsd
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.50
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795943203;
b=k3ZruSaBVuMTZCtNToFB044xROVuCOPtZbYIvwWiOjHg3NHVwVwOfdwF3g/MysLWfAf4
Mm5EAU1iD4WbYWDal24Zif2rRXeasvvjufNxL6hVxLyeGUl0YQ0OonAoqbzd9ktgw5bUK
wxcvkk7oDworPix6GKBMtT88KAY3Tl5xRc+ZaJp/Ht/8oz89C5SAimIdufFxkBOFXY4Pe
OKcqPfaJ2OL3wLGQyHCMZO6jmxisNWvn6GuptBAcJGZAFXY3ojzTHGl+pvmO1Nk10/Wid
ro+TYZO1y/aDl8ezByStg42FRASMLb4PDCOgBXGbaDyJGYWL3XFJ6wnYppalJ/RqkKg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795943203;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-Id:X-Mailer:MIME-Version:Content-Type:
Content-Transfer-Encoding;
bh=so7XSV2tgW0bc2KaF1PMo+MgdsNMNRBpipeOKs0zUGE=;
b=pm+JofxRWBcKXyVTPBlQu1wdbOH+kC7i7+qMhBA/KoocAXuIe+ukQteP/DbvbiOrvI9Q
qwZ53UEbbzl2mdRHJqS9ojaDHdS9aPBArAHz+rMQQfDwLdz6WGgq7IOMSaFafrMAsXFPR
lckTUjh/vCs1aVMb+kAwULf1BUkhmxnDV3fOFj+tH6HIZkq8pK09uNtnoM6H2qgNDj0mI
yQ5NvA6trElfcX6INMapVDpcVdBahANAoYuscyQzzFYilfIVebCmjrY+Qs8DpTJGTlJvc
y+Fm+JMt5Vaq5DyL099cjovrxVhWqeA7wwPecGX8A4e9aikOWaXHu6ZP/wbXF0Lt4Rw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=mojatatu.com;
spf=none smtp.mailfrom=mojatatu.com;
dkim=pass header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=P586KNsd;
arc=none smtp.remote-ip=209.85.219.50
X-Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 700C6606A339
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 09:06:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 700C6606A339
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com
X-Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-91e8a05ec5aso125939986d6.1
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 01:06:43 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mojatatu.com; s=google; t=1795943202; x=1796548002; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:mime-version:message-id:date
:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=so7XSV2tgW0bc2KaF1PMo+MgdsNMNRBpipeOKs0zUGE=;
b=P586KNsdTSgywONeC0Ein2bZ0uYOikgUh0vmpLEkL/18vYkZip3RnWCMm/1L+UJGzb
afmCi5DX/ev9Nr1iWhsArYdhVuXj37/GLzW+kQsb1LT6kDsf06OcJmKz8qMdUguiKZZi
IS13WVaioj+CJyTlylleT7sa7mf/MpSMs66Y4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795943202; x=1796548002;
h=content-transfer-encoding:content-type:mime-version:message-id:date
:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=so7XSV2tgW0bc2KaF1PMo+MgdsNMNRBpipeOKs0zUGE=;
b=NynVA70IgUitHni7iRuU7COhFgmZgIUyDXfVRMuWQm6aaPtA+lvQ6TE6calrO4jqCw
5mQ6FGNK3dMG8BFFDuZGTr2elry2waFvm2q/8rzMhQ2M74qhhXU40ZNzX/7ALjEwDOpQ
i73wx7Jk+8DdkRH27uscTJYJNYXw0wjma+aKM3+6La5bjdv90F2hEwftFhFuFSc0wMtR
xb38iIWyNWjqz11yfiKScT5HUtwyWFjR1HlgnXTpf/nOXwuOb9RixGrcLqyXKnoHBCkd
A86U9L6tRGFCYUPsXHulyB2n3kcXnEdWzkDwYRPkEKT68r+BqxwbljBB+O4qVaYzfv09
rKEA==
X-Gm-Message-State: APuU4Z+8S1MwDGvbW5Sy71wIA3X5A8BDQd4McVeMTCeRwDr9MXUxxLyl
6j/+AonJuUKZ33QeDJ3SDDSe7vkkrIzvr4rQIwWBbPOUDhiiV8eWqbmAP1DlQk3qMLTXGc6Yt0R
uw0k=
X-Gm-Gg: AZFdTZdpftcARZhdCDh48SRmWO21xyLtWeE4RZR0B8sZLqbX7eH0RiV0M0HPl9jQT/I
th1o/+k6SwcdQo6wLUyU+UYN4qB6KVfd0E5LusZTHw3LMNyzIwDNwzWXK7mM1WAupV1dpVMVwry
NXCqw0zFed3m98UvDdSrNodn9iU7BI94AefdgPMLi8hxdZXMJuv+e09gDD/9Skz09s+oTB4jyoZ
rttfQmZMWNO9S6hR4+eTkZNuz40G82E9xfRgS0BEIHK3UWqsFjgGsh27yx1D0f9ka1UmabcVpob
BQeZUYsCE66HWiBL6DkfLIS0k+GOKHbbuG9FKHs4B+SFA1fMT6E+dGabZmeCAUqAU+ImaRplrLD
Ui7scMJKZ7XACshzyBwBB7hrJCkd8DHivquyVb6W2l38T1p1lN+8bhU+gdhFdecUQC87mbhTH1/
WiM7GTTY7mESdaXk+4Yc7gD8hNYKBdGTI6i8c2d30wmYPVknxdwhwamJHbwXo0hQKob/WaRik44
OV2SJtiNTesDmAIXwimfYgW2fqGj5HFAXDem65C/57vxsgvED8Ztv/YPZ2mKjTqoWPMTSkR2jqG
5Ug30v5s9CaJjyPG6IerCBm7OpQmGzVrg6H1oj30YZiuQBxOGJhh7+Vnuq4dAN5vG6YGlUK2RPG
Ane2VwxkDswaJmgziFuDenTn+9WDukg4mq5JOHhkYiWqAy5U7kh7n46HhqhIbvmvgVN60aX3QKS
gX
X-Received: by 2002:a05:6214:1c44:b0:921:5fda:931c with SMTP id 6a1803df08f44-9215fda946emr365176266d6.33.1795943202309;
Sun, 29 Nov 2026 01:06:42 -0800 (PST)
X-Received: from mbili.tail33bf8.ts.net ([64.203.83.2])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-921349cdfbasm265266006d6.17.2026.11.29.01.06.40
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 29 Nov 2026 01:06:41 -0800 (PST)
X-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>
X-Mailer: git-send-email 2.34.1
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list