🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23520

[PATCH net-next v13 0/4] net/sched: cap the accounted backlog before it can wrap

#23520
From: Jamal Hadi Salim
Date: Fri, 27 Nov 2026 11:57
74 lines
13807 bytes
This series bounds the accounted backlog of the AQM qdiscs so that it
cannot wrap mod 2^32.

  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, and saturate every subtraction from
       the counter.
  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 v12 and carry no revision-history block.

Changes in v13 (Sashiko nipa and gemini reviews of v12):
  - every core subtraction saturates.  An offloaded qdisc is exempt from
    the ceiling: its counter carries hardware bytes, so wrong statistics
    there beats a permanent drop.
  - taprio mirrors the child's net change at dequeue too, and books only
    the outermost handoff to a child.
  - htb bumps q->overlimits, which htb_dump() copies over the qstats
    field.
  - 4/4 refuses a split an ancestor cannot absorb, and its Conditions
    section states the shape that reaches the check.
  - Toke's Acked-by is dropped for the substantial change; he stays in
    the Cc.
  - rebased onto net-next at ccb81d5e317b.

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 |  70 +++++++++++++-
 net/sched/sch_api.c       |  37 +++++++-
 net/sched/sch_cake.c      | 190 +++++++++++++++++++++++++++-----------
 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   |   1 +
 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_gred.c      |   9 ++
 net/sched/sch_hfsc.c      |   6 ++
 net/sched/sch_hhf.c       |  18 +++-
 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   |  17 +++-
 net/sched/sch_taprio.c    |  98 ++++++++++++++++----
 net/sched/sch_tbf.c       |   6 ++
 30 files changed, 509 insertions(+), 96 deletions(-)

-- 
2.43.0
Technical Details
Message-ID: <QDISC-BA27.v13.r0.20261127065026@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-372701-linux-kernel-netdev=dewy.ru

Show 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-372701-linux-kernel-netdev=dewy.ru
From: jhs@mojatatu.com (Jamal Hadi Salim)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v13 0/4] net/sched: cap the accounted backlog before it can wrap
Date: Fri, 27 Nov 2026 06:57:48 -0500
Organization: Usenet Network
Message-ID: <QDISC-BA27.v13.r0.20261127065026@mojatatu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="724693"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8MvzbXrv0z5ORCS2KH4Mf8AK9o4= sha256:7S1tDL1Z42zmF29LJPU9eTRp6ulQeKxuOYkdKbaERc0=
	sha1:aEStHLAORKTSQ8ZjR3RfUjgI3Ks= sha256:uzW/7EmGIurEFWabdPTBp53awa5n6KIREQK9v1g0oJk=
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 216AA125F54; Fri, 27 Nov 2026 14:58:15 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-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 1cy9sypfk4HB;
	Fri, 27 Nov 2026 14:58:12 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372701-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 789D7125F53; Fri, 27 Nov 2026 14:58:02 +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 1CA2C4330C; Fri, 27 Nov 2026 11:58:00 +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=1795780680;
	b=EoFY+LkC+F2KulzWTJ9ViPKjjEM7s06OlMzFrmsxj66mC5xLRxetOb5HqHgx83KxMMJ1
	 aRjgp37LdwbcQlzzZ0Nb9roPBGiugKc4I0r3ZGpEmDMbdSl5fyO8eWr6+lb9diQ6l3gqy
	 SVWPACmNXV8wEJhYldgdrOYzVuaxz1k6vGXgVCYtjCq9EzAU+dHTUg7ivZ7fxmWyX4VNG
	 9jTmBo1p8iUUh/WCNO/lr0TTpiIHWMISVccetMwK+u2tpzEaGgwDo35hwxqhxjxDO84pN
	 sUIVApB4QQiuZ5a82beP0cU4Y9iV8HXx+iMHHCV9XQH8JJEJTMI+wm9J47L7N4bFokA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795780680;
	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=BsfpblzBhrRHfyZGQKRLOaVkjiPtdfhHbAWNklqE3H0=;
	b=siAvdD3g4qGijvuiZ+X7STq9t723NYBP6Pgk/GZJWKXfMt0bBraTwBTL9gU6TgdO5j25
	 totrAc5RSVswo72exhXX3TyAKkAw0YgUnE0PxtIouzbmD9jaZC2qi007U1dcTKlV217m7
	 CkdcOUS99P20nXAMzEZRRNlBhgKqZtS0A4cSqTRHx6Ey7+iyu1BxiRF/3fZs4DGXP2lpt
	 ZsRagM3528aSo+iCpv8dFnxKrMII6kvgMda0IEixUdLUWvxNtGdRjiF4/PVQMjF2rLik9
	 GScIDXOIpSQMybzzvTNBBFGZVK6ohevuqa6PJGGFcLymzd/m+9RkySIX7uYNWlY0Yog==
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=UFb+VmW8;
	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 E98DB606A32E;
	Fri, 27 Nov 2026 11:57:59 +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=UFb+VmW8
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.170
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795780679;
	b=k+jeLOqrH1lmE49W/2gtmj41kF/EqsElrTKcFZYoknVW5I86WaFm29dKBSNtHqpRDOgl
	 JT840FW9wsHAwG/K7D0tScn5MA1oSSyVNircY9gWbF/2USTuLA2uoakH2kQIiE/xbEvpX
	 CNCKdDO+nc5rQMsC6KGaweSyK9YyWIiPMNBBylmMBf9tEboI4n3zTZVXRnB+9V5025Rwt
	 1U/LzPAwNp84JRCGnrtdW7PViGJnUdkSuG6ATsKKcEbmN4mLyQQJVLrW/0K7BP0rjq9wz
	 j7D5j5PO2cL+kEteLuxXyxBg2bWoySWubVGbHLtBe7bz6q4oGuGdfkiwDAfsv/7/J9g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795780679;
	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=BsfpblzBhrRHfyZGQKRLOaVkjiPtdfhHbAWNklqE3H0=;
	b=socyp95HRgoQJEDy7VG9eFpunWY4iyxZ55GqPAgYV4JhKfgyjB+KDwlSDTpFdlIz0vKr
	 V9Bgl2r9opt3x+/t9ZhTgBHEj/2Rew3UGLiOg68R+qPsuqxRXc3Lg8pW6I6siVw817SZa
	 zN8GMxJfqVNwkJa5DWG1rHke7iWhWfsmJIAJtv/3h9/EO6OzYQRZXxnvTjws58GqeXxGR
	 YEhSmYXaJHXLwKjth9zV0ax2WT2MUIQIeArugf5nX93d0f98u1qcfLV0yWVZgZKLqsrqz
	 ImWKBqMnHFpWCDEaCPteI9R17MZBwa5zSqAP692/9i71/TYC8D/zJAiW3X3pssKZqwA==
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=UFb+VmW8;
	arc=none smtp.remote-ip=209.85.222.170
X-Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170])
	(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 ABC3D606A31F
	for <netdev@vger.kernel.org>; Fri, 27 Nov 2026 11:57:58 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ABC3D606A31F
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-qk1-f170.google.com with SMTP id af79cd13be357-93f2049ea7aso564625285a.2
        for <netdev@vger.kernel.org>; Fri, 27 Nov 2026 03:57:58 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=mojatatu.com; s=google; t=1795780677; x=1796385477; 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=BsfpblzBhrRHfyZGQKRLOaVkjiPtdfhHbAWNklqE3H0=;
        b=UFb+VmW8GYNiSYxstZKCVRnMKKo3Rjnk9uKwyEQc2VjSwDv7SCMDWvpglAma6XGmgP
         aEHf9SF2rsP7iUi3xiTPxnsGCulTY4EfNuKcaJ8+DABiRjRCCSy5wYSJb4kijlRhh3pE
         nrWse3PjDcMmtfU3C9299v8V1LmpXS4dKlP5g=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795780677; x=1796385477;
        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=BsfpblzBhrRHfyZGQKRLOaVkjiPtdfhHbAWNklqE3H0=;
        b=bOrgVpTyg7RUBMYKg2aE5apBdKZIeZubvWDSiSXkwyrGn2p9GuArsjZBupU0GDGuIl
         w+Xiu2Bjt3XzWGKuiSm7PbeEvdsrWj+BfnrToNnnsFOheheKyj6hxhaN02bDxCWvonN7
         wUJF1tjKppqRYBxVlztQoH/v2Bld9vJPbmjb8IoRQtGTw+QTxZqsC5X4DVgHskHGuEgx
         mWFSr7DhZdVRLqQ7LKm0Qxu9ROGye6kylHRsgTZtLYvIGVKxYEKtYJWqYp2AY33PyNJr
         /yWbvf31Xa8GidoGRyToB0lcQQhDV2vesID2Wbzpxs6GoeAKh5tRL6+3dJcZ/t0/4ZPv
         B+xg==
X-Gm-Message-State: APuU4Z/96qsfAdI/VRNCjukttEH3Gtt9/V1GbyU5l6SSH2VaG6l6Kywr
	CPhpE2TnhzpG+yKUHcTCU5L06yYpyRXy5BAK11yvJGljO2xSfClHGg9U8vW+kFWT/DAeI6moVEd
	6Whk=
X-Gm-Gg: AZFdTZczYDsjmB48YqAjiIHXo23focmYvPgP5fvE/aS/8fuQSQM5xre+jo76XUSsixP
	iwFCvLifeJwo7yxnj3ChJLr+DfplKydOtkAtgn4UjQdnDB3KGa86EKv5RMfvfJEsMKEatcodS/A
	wcxVmMPRsLyr6VlXTCAkVhLGaiPqAgqw4ZFMqKkkB1x495MPOMqQgkBOug6FXnclsufeUyUyeLM
	kjPOiwZ4kgJFYQtFFvNO6FD+JNIKOnV/hyFC0CRAUB97PFA6LE+EOmOvzBYDAE3fcqvTeGSt/br
	t0GClBD0xgkVFpRdUsxEXmYeV3dO25N/EZNMdVctHgEFRTJjY/IW+NWdkFp5Tj9otWTRu8WyhXq
	4eQT4qU6GoaA23c/u9L1VWSk6FZN4STMLEdOI33F7yMKcy/KeVJJue27M899Vu88+e/SGQvrFqM
	XPL/KFaPmyD1YRjX7IzotjB8eYNs9mM+SS8fsvM8D2rFEsD0Uye4UaBw/kEHakaY6A+5opkhWRE
	UbuNTYYmRBIXNS9Jt/fgjdHVj4eIbf0bR4VVyfMkxpnFeR44JsNwG82DbJblAoQnp78DPkUu9yW
	kdk5bDeFzyXdSm1rFqTM0DKlpDPfWWDFz0fCmGmKEqCDmm7/9GG11i1gib4JrfkBH0pLNAsAEnE
	tFEcRXLoShDnPK0oYxRsEHg==
X-Received: by 2002:a05:620a:29ce:b0:949:8bd1:15d with SMTP id af79cd13be357-949ba9b3e0bmr4601207185a.26.1795780677639;
        Fri, 27 Nov 2026 03:57:57 -0800 (PST)
X-Received: from mbili.waya ([64.203.83.2])
        by smtp.gmail.com with ESMTPSA id af79cd13be357-949caf98d34sm1588177985a.2.2026.11.27.03.57.55
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Fri, 27 Nov 2026 03:57:57 -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>,
	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