From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796063920; b=v10HsPEu79E+psnpmepcwvCHjtfanFJ9gVkEQE+wPXcDs2GPMbKcrxHiBKezDpcy3j5x S1/B/2wLsz4GiziBdWGj87SPLCTqhouIO+a9vKYUaNpBcOwFiCVEB2yfmwRSEhAXib7U4 Ugn0WhJdINoWs9WErlSxfLjcGLF9uCrAiC10E41busNpVGYYTaCLS7pOzxYL54oBCH9gU Z7Ctj3lXOAqMwemZxq4uKnIoRc6j+SgBF05OqPIj2sNa0MFtX42aXx2UZCyuEK1VEzcAS MkJuop4gwpOhaUHe6TILMgiVMmb916zGNAqf8kV0mdNl62RxQ1DLzLot84IwoSNdXmA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796063920; 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=cYL3alsiJgz3BxwRZ5aiuRyDNgKF6G7D7I2yJedR4iw=; b=rknzzg39+7Y3N7DjWZcLDKrZS46/HF0svmbPTEaxi3WHqCDzh3ZdPfmAstqo6T6j6BOG o1gLshzVNkEDGqCw0EcXBGSCzHLPqRg8zM36WZBrpYKLIjtE9NFfs7hk/7q1mGaeaZFXE 8ouHxWHZrJH5HWAMRAHS3szlmhNMu/etJp2aneWiBEH0Pq/zAF/L8B2OUcXxw3kgE1aMR glZg+NtTKP0LhNzVkvjxq6W992fgHeJD8dY+GDwjuV4Ddk/nIlK9vWCy7pYwZez8G5niK xm/WKtqb2q619jy873So0EJxJLAscABsrgsipa8CR10HSDnLNCMWp/qC6kz0RTyTxGg== 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=TR3aX4Fg; arc=none smtp.remote-ip=209.85.222.175 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 18119606A320 for ; Mon, 30 Nov 2026 18:38:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 18119606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mojatatu.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=mojatatu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=mojatatu.com header.i=@mojatatu.com header.a=rsa-sha256 header.s=google header.b=TR3aX4Fg Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-949680e6d83so996936585a.3 for ; Mon, 30 Nov 2026 10:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu.com; s=google; t=1796063919; x=1796668719; 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=cYL3alsiJgz3BxwRZ5aiuRyDNgKF6G7D7I2yJedR4iw=; b=TR3aX4Fga2XW+pZPY4OEykC7NenlsmgASKu9KX3IEJnPVvg0TzDsT4BQ1zx74MeIf5 8EEMPPN9kUgZGednPiWEA6mtVtvFrQ7VL45AouaA5swRJM4n0lAUzDe6pjaoSjGD14Lm O9l4uumaeaJXxIhusF1WeBXxyV5k8EpQptJeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796063919; x=1796668719; 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=cYL3alsiJgz3BxwRZ5aiuRyDNgKF6G7D7I2yJedR4iw=; b=TX6LmivSW7nMu5H5XEP1GqerYPIuri4iEcahnockYs2T6CnOnU5qGlqE1KEI/vuqf5 gXTi0zA/FjmtAhlQmnXHnCuVZQvOdjsCXFsTI3yHZ/aqC1Xudcpk/WEBYfAE5lw3mx/x 6pR3YJ9kzG3p/0YQPDyBq7pyxWXYGKvC3UirJohG+pg0a+oK1PWCONleFdpLugqnHv7b 5qw7WKFtaSuIns2BN5aIn5qwlPZLnSu27r5ECFISPIm9j4rfIjS++5+115IN3jWLzCgZ yU9G52tFSGjv2QKn4Xnl0yxYHPy18Aqa7UYHEIxLbC6d9R4hQFKUaGjh/tsnN9WnI3C4 GJkw== X-Gm-Message-State: APuU4Z+0vDQ3BHkBH8hNpP1SHQ5ui/2QU5bOD0rt5fr6MRddkWj1vEWr kHH52cj3eoBFCxx1uO2xcM4C/yPCUdLeEfk0YH+3EKQ9hQeuVS7s6SoaPh5IeAdRdw0+PwG3SWV /oLRGkQ== X-Gm-Gg: AZFdTZfYJeC4vrmJF0cfgIfxJYJlIN605vDhHjZeyuWAgyo1eiNo16+I9iNch/xJ2Vt acF2vNt5gTdwsIw3TPmbWy9SbyMREe3pvlwpToP5mzChtRwAKtg00Dfn5uN/qn/Qe3f70oOJM1P YelLfLHR7cLmnHpel1Rs5zfgIm//QoMR3PhHZ3W4CtqQ1HXv1FW/jadO/2o4WhAJjCDWmm9XcrW kYBnIw4OCHjCRinnnWdji2CGuQAJDlGbDrxZ1eONO0ol8IljqPFKkSkYDyxbRiQ7RT/uKzuTrKs 5u8XyIodLj6Tl71t4RGyvAhQ0RB4Y20+dojSiMCTHm1zHQNLdGT1PUUA3SLHl3OThyLMso1YAKW V4Fqx80kLSjNFMvxXJTXl+7jV3gXD3HGRk4lwm2g5j8Gg1RCvngBdkF5aM4VV/UG2hR9RixSD9a onvbuncfe0k0qA5HFaoUEZAw5lGoxiQvlXci3AG9a5drTw/NylXwu+Dt9E7TrtsH9kbeR36SKiI wUIUkgPrxEZHlBgVnGV0WWQZPDcUS1bZB0cwXPSMieowPOK7EtGR+NsT6GcJ1COT1ZtsuKWuOPA vRwk7pEYt0EKax9pDrCqcXVmPXX5lc3CHtP24D0JybLDMFw5o94jcAiYwTKnJvTYSGBhAxs/865 tmyn+O0vPk6QYQ1n3DFqGahgACfAaBoq17PueIHlybFk7EsyUCtCYOG1PVtCTamr7xw== X-Received: by 2002:a05:620a:1a07:b0:949:77c5:a57f with SMTP id af79cd13be357-949ba9e01b6mr6479548685a.47.1796063918818; Mon, 30 Nov 2026 10:38:38 -0800 (PST) Received: from majuu.waya ([184.147.180.207]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949ca846322sm2444717785a.34.2026.11.30.10.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 10:38:38 -0800 (PST) From: Jamal Hadi Salim To: netdev@vger.kernel.org Cc: Jamal Hadi Salim , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Jiri Pirko , Stephen Hemminger , Vinicius Costa Gomes , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , cake@lists.bufferbloat.net, Victor Nogueira , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Sashiko 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 Message-Id: <20261130183825.229246-1-jhs@mojatatu.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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