๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3149

Re: [PATCH net-next v3 4/5] net/sched: sch_taprio: cap the number of schedule entries

#3149
From: netdev-bot+sashiko
Date: Wed, 14 Oct 2026 09:15
60 lines
7987 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] sch_taprio: hardware capability regression for SJA1110 due to
  1024 entry cap

--

> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
> --- a/net/sched/sch_taprio.c
> +++ b/net/sched/sch_taprio.c
> @@ -49,6 +49,13 @@ static struct static_key_false taprio_have_working_mqprio;
>   */
>  #define TAPRIO_PICOS_PER_BYTE_MIN 17
>  
> +/* Each entry is a separate 368-byte sched_entry and, in full offload, is
> + * also composed into a per-entry offload array. The u16 nla_len admits
> + * roughly 5460 minimal 12-byte entries, pinning ~2 MiB; 1024 matches the
> + * SJA1105 schedule-table capacity (SJA1110 provides 4096) and the act_gate cap.
> + */
> +#define TAPRIO_ENTRIES_MAX	1024U
> +
>  struct sched_entry {
>  	/* Durations between this GCL entry and the GCL entry where the
>  	 * respective traffic class gate closes

[Severity: Medium]
The commit message notes that the SJA1110 schedule table holds 4096
entries, but TAPRIO_ENTRIES_MAX is set to 1024.

Before this patch, a user could install and offload a taprio schedule
with anywhere from 1025 up to the SJA1110 hardware limit. With this
patch, parse_sched_list() fails those same configurations with -E2BIG
before the driver ever sees them. So a working full-offload setup on
SJA1110 stops installing after an upgrade. The commit message calls
this net-next hardening, but it is still a user-visible regression for
that hardware.

Why was 1024 chosen over 4096? Is it only to match the act_gate cap?
The allocation concern in the changelog would still be well bounded at
4096. Drivers that offload already have to check the entry count
against their own table size, so a software-side cap at the largest
known hardware capacity seems sufficient.

If 1024 is intentional, for example because schedules above roughly
900 entries cannot be dumped anyway, could the changelog say that
explicitly? It should state that SJA1110 users with more than 1024
entries will be broken by this change.

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/QDISC-H19Z.v3.r0.20261012193813%40mojatatu.com
Technical Details
Message-ID: <179196934250.434549.3727964213226775425@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346135-linux-kernel-netdev=dewy.ru
References: <QDISC-H19Z.v3.r0.20261012193813-4@mojatatu.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346135-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 4/5] net/sched: sch_taprio: cap the number of
 schedule entries
Date: Wed, 14 Oct 2026 09:15:42 +0000
Organization: Usenet Network
Message-ID: <179196934250.434549.3727964213226775425@kernel.org>
References: <QDISC-H19Z.v3.r0.20261012193813-4@mojatatu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2258483"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:XF+3P+EHM3nWlNqt1hPbKWMwr48= sha256:UFc+zo6tDc7Do3IouT7IbwvVrWFkvRtQb98egaLyX8A=
	sha1:JjkSYE04iEPSVuSVC+oHJICWr04= sha256:14SaR0cC6KVG3fNqn/K/yDO8ODo8tilx60y6VbQoX7w=
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 6C186110097; Wed, 14 Oct 2026 12:23:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 2VxCMLbqe0Qt;
	Wed, 14 Oct 2026 12:23:28 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-346135-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id D1AFD110098; Wed, 14 Oct 2026 12:23:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7AE80622A2; Wed, 14 Oct 2026 09:15:57 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 006204DD3C4;
	Wed, 14 Oct 2026 09:15:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SfpTnTLI"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2984361DA6
	for <netdev@vger.kernel.org>; Wed, 14 Oct 2026 09:15:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791969344; cv=none; b=II241FpcGqtJq4eu79NZMHH+P7rbrVqfvoMkKJIqfjknR7IEh7HZSzqWkwHxsRUrwB0G4BIR1XDvmy9QM4SVl+n6IJQhBjP6UT5+YjrhFEKIFCO86tm8lxAxYW1SrT6lM+efajbjsKjk7P8fwlh5nLPQQZGy8a86hjnaIz/2X28=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791969344; c=relaxed/simple;
	bh=ONftr+71LdmCakuIsRBeyuHdgD64UegCBXp+9tXzfJ8=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=vFuQ66snlDyBBzwEk+lElbvxs2RV2tecWMyJBJEiqJL64oFz0bjvD7/WmWN+Sv46kQWPrCuquwWTp4xHy0/mX5OY+bYva5ZTJGHayzNGPuwKEn9gR+V2cdyC7bcocJs+RaLyYkp3im4UHu0weUEmVxJiURYxuPEoI+IUR+tYe0g=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SfpTnTLI; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E86491F000FF;
	Wed, 14 Oct 2026 09:15:42 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1791969343;
	bh=HAupBBnrhUn5g7Eg8agGKDrjQiONRRQZP2fRPir9eJc=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=SfpTnTLInV63OtZ/r8+TdPsgHAIZRAnHIOUMAM3lgFgPHbdrAcral8gAMAe3NgGpv
	 7N22QMYB2DyLOE6sKlyar7vuBNbC2JvTQxvgn59ahH41NRQDJeY/IfUAIDfeeLgtBL
	 yDTRePIUHu34qRRtojXJ4E9adh61IKvxHiOH6K7yMWBCP3N8g7olYhXkLxt/oYBzQo
	 j2EXq67F0FYUukpkKmQ4NqMt0xyNoGb4ARlx65bpUufvX+WRIrqLF2+WG2owRUSuoR
	 qF658KzQYy/GJboWDwlaoVx5SUtuuBGi+FyIF52j7Iak3rCBeA4hFvCfnN3DOz2PD1
	 PHJm3w1s7XCHQ==
X-Cc: netdev@vger.kernel.org, jiri@resnulli.us, davem@davemloft.net,
 edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 victor@mojatatu.com, p@1g4.org
X-In-Reply-To: <QDISC-H19Z.v3.r0.20261012193813-4@mojatatu.com>
X-sashiko-severity: Medium
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>