Article View: linux.kernel.netdev
Article #27431[PATCH net-next v16 0/4] net/sched: cap the accounted backlog before it can wrap
From: Jamal Hadi Salim
Date: Sat, 05 Dec 2026 17:20
Date: Sat, 05 Dec 2026 17:20
88 lines
14768 bytes
14768 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 netem; cake adds it in 4/4.
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 Cc: stable. The aggregate wrap predates
every touched qdisc; 3/4 carries a Fixes: naming the size-table commit
that makes it reachable, which a net-next patch may carry.
1/4 and 2/4 are unchanged from v15 and carry no revision-history block.
Changes in v16:
- the ancestor-room walk skips a parent that never books the counter
(multiq, mq, mqprio), and the tree reconciliation does not debit it.
- netem keeps the duplicate depth on every segment of a corrupt split,
and the split reserves the segment sum on netem and each ancestor.
- taprio's mirror saturates instead of wrapping, and a graft resyncs it.
- the split headroom reserves twice the larger of the segment sum and
the original length, not the growth alone.
- the segment drop reason is tagged before a split list is freed at
tbf, dualpi2, taprio's SDU drop and netem's limit and linearize arms.
- the offload and non-work-conserving flags use a compare-and-swap.
- 3/4 now also touches sch_multiq.c, sch_mq.c and sch_mqprio.c, so the
Cc set is re-derived.
- 3/4 and 4/4 carry the v15 -> v16 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 | 3 +-
include/net/sch_generic.h | 75 ++++++++++++++-
net/sched/sch_api.c | 66 +++++++++++--
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 | 30 +++++-
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_mq.c | 2 +-
net/sched/sch_mqprio.c | 2 +-
net/sched/sch_multiq.c | 2 +
net/sched/sch_netem.c | 85 ++++++++++++++++-
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 | 11 ++-
net/sched/sch_skbprio.c | 19 +++-
net/sched/sch_taprio.c | 165 +++++++++++++++++++++++++++-----
net/sched/sch_tbf.c | 32 ++++++-
34 files changed, 736 insertions(+), 125 deletions(-)
base-commit: 19c484e12ed269c1ce734f049cc5ccf12cb93a20
--
2.43.0
Technical Details
Message-ID:
<QDISC-BA27.v16.r0.20261205113823@mojatatu.com>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378055-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378055-linux-kernel-netdev=dewy.ru
From: jhs@mojatatu.com (Jamal Hadi Salim)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v16 0/4] net/sched: cap the accounted backlog before it can wrap
Date: Sat, 5 Dec 2026 12:20:15 -0500
Organization: Usenet Network
Message-ID: <QDISC-BA27.v16.r0.20261205113823@mojatatu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="3077491"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:zTuNtj1t05K52hL6ARSL+gyJOYE= sha256:t/Pb/UZbP40niwkfs9Ig1Do9Kx5boE6BqPbZCIUyIFg=
sha1:DXrcA18GJWdvJkug2ThiPRop2l8= sha256:9yzdMFSn61v+lKeyrZuU7aSvW6QWWYa4CTEQN7kl9ek=
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 ABAB5117E6A; Sat, 5 Dec 2026 20:21:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.298
X-Spam-Status: No, score=-3.298 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
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 8laADRwhRhBH;
Sat, 5 Dec 2026 20:21:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-378055-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id B19F6117E39; Sat, 5 Dec 2026 20:21:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 474332EB54; Sat, 5 Dec 2026 17:21:26 +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=1796491285;
b=vhpbw3bSDC3UGSTuMazKoYt2MBAR/tXv9GACwG7/75FHd4Ymc12lgr1hyfY+Vax7Y7BY
MidR14pWzNsO47jEueg5eVLRxNdvO3nxyZnyG0GIGz1YyQ0M/VFyihImmi2z6E0/5db6z
uKevLek8gwtWeJtoOa+AyDyYvF1SZS+OLcOHPipyemT4RYcaUOwnQ3jlx50mQAFhNDnYf
cv7qpYnZzJovSWhducFYfXLxe24N7SfdlAjs1P3UyqnheHMMUKIjocsKDaN+EkIyyjv5+
F6fpdZOKhbm04xc4R3YBl6+LemVezN2NeVhQ++UiJwe8T4pdM5u+xgunwyjb8fW2DBA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796491285;
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=vDX02r0p4Sg1IjWm0aksZKvd47LV+xb3I4yCxWRt1mE=;
b=JTfPAWBqOzUVP+rTha4rNf0qqq031otbbbB6cj4xWCPJDeOTqnlepicrtL/jM7NJJN5e
u5AniZaDXw9cuAUftNa/OQAy+WaVus2/4CiT6Bcp6kb+uHajHc5VWOdfis1sxv1Mv5+w4
qwqS22IzrSC2N5QcnSCppzrqePt6re5u2YqNnbLugFQpNUBRU4cv+Di5ud++Sjtmt2fBy
h4c08ASGhKFUPyp+b8aCd+SMmCMFwEFgEp7KwwTpoYW5AMTPUE4EILyqyFyQujpEa0lQW
QX7M2xsQ883WbQUQKNdKexFhT+nZU/FS/WzquLDL+clJM3PbMwtUWfXLNyLYzjK/tdA==
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=a8ArA+Gr;
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 6DD40606A334;
Sat, 5 Dec 2026 17:21:25 +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=a8ArA+Gr
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796491284;
b=myGA1rP0KsGay3yXopLQf19lz3vLkdAYVE4m32o0bCQ8i9Xm+Io695ildu69ifOYtoHy
cYN7mv2W6EpXYtHfT0aUxpOpQ+kqDQAoDtB0AHZUTxo1EkdSYoThr3gnuSHEIdLwGgENL
BnamHHq9nGCIrE8NEdvi2FSzRUCE/arndpGmXeJ9ek0m8MI/ZAe7pf/8Tk67b/R8iJQoQ
YEH/mK2zVfUK28ZP+L9yiPR6wwcLNTNFKcvofoR7Qo3qePkBDVdiWpa180/klm6hP1YDJ
cZ9Mb372RF61wbMs70OZ0cCTcqvhU+MF+8knpeHJEEvjN7Pb35X+9Np2BZjN2zMtGbw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796491284;
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=vDX02r0p4Sg1IjWm0aksZKvd47LV+xb3I4yCxWRt1mE=;
b=NFCNX4VPTQ6ckjwR83EB1LKfhqaHwyG4glw+3l39oBrqmZ96C297f5ZMFVXsjeBaXbu9
m4iML3TaVg1JxJme25t4WYaAPZc0eV+sB3eJPCHAhDCaouiXyAX4vYiWf847Z76g/X8w+
d9De+VHkfvDMX5YNfjczpgLbbmw+mY48zqzlb36NRmbRkIaL9btaZrAEXvuqTpEV6zS8R
PVR9svfLBxKsgJbIBGuMBoBrDC+A/AvmKOjTNqD2FX1vfJf0ZdDHTcfsJPpenh3p5PQ44
noxXsg29lZD20XQCZBmMvo2ms1vSxSkLBtOBKOFafcn4knYCcB7sMFn/z1fn4C29Q7w==
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=a8ArA+Gr;
arc=none smtp.remote-ip=209.85.221.172
X-Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172])
(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 0AD34606A31F
for <netdev@vger.kernel.org>; Sat, 5 Dec 2026 17:21:23 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0AD34606A31F
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-vk1-f172.google.com with SMTP id 71dfb90a1353d-5f0220251c2so396738e0c.1
for <netdev@vger.kernel.org>; Sat, 05 Dec 2026 09:21:23 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mojatatu.com; s=google; t=1796491283; x=1797096083; 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=vDX02r0p4Sg1IjWm0aksZKvd47LV+xb3I4yCxWRt1mE=;
b=a8ArA+Gr2/IY0W4QqzdBCjhl12xrPAMo7QHVia8EN1ALd4w4Y50NU4bZZWL10+Cdfa
ryD0U2LY07v6AYjCtGtlLvu9KmMF02jqgDAWkuYv58vaU8q6/SkTSqWRgEjb2PHxghAT
k8TLx3zaRxOmHp9Hn0AZckGgxyouaxlOAXF1Y=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796491283; x=1797096083;
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=vDX02r0p4Sg1IjWm0aksZKvd47LV+xb3I4yCxWRt1mE=;
b=uIQ8RwDS5ajj/PxgbSe3A7Xq1m4sBgkJRxGriZKUxGYbdwOH9+lnNbXmn0JmfVGZsE
O2bwk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DpO0oU6ITWL/YN8hZl6I3ev+HG6igW6DuqnNp+wY/A8b7Td5ZF1e+
X+P/hXqa+Cjgklq6XMctMfptcAlv60k1viLo5tOES6qVfukcWnVgVMza19XDrNhmRyfh/y75f
X-Received: by 2002:a05:6122:8716:b0:5f0:2026:4b35 with SMTP id 71dfb90a1353d-5f0202664ecmr3474294e0c.20.1796491282829;
Sat, 05 Dec 2026 09:21:22 -0800 (PST)
X-Received: from tg.tail33bf8.ts.net ([174.94.23.9])
by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5f01d3ecd41sm3852997e0c.12.2026.12.05.09.21.20
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 05 Dec 2026 09:21:21 -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,
Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
Victor Nogueira <victor@mojatatu.com>,
Björn Töpel <bjorn@kernel.org>,
Sashiko <sashiko-bot@kernel.org>
X-Mailer: git-send-email 2.43.0
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