🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23861

Re: [PATCH net-next v9 1/3] net: macb: cache ENST config across link down/up

#23861
From: Nicolai Buchwitz
Date: Sat, 28 Nov 2026 12:50
46 lines
10692 bytes
On 27.11.2026 22:44, Théo Lebrun wrote:
> Currently, ENST is not explicitly restored across interface close/open.
> If HW keeps its register state then ENST is kept, otherwise it is lost;
> but we do not write the ENST schedule again on open.
> 
> This causes trouble if the config is not compatible with the new open
> and link-up. The two issues that can occur are a link speed change (as
> all timings are configured in a unit relative to the link speed) or a
> change in the # of queues.
> 
> The latter is the main reason we do this change before implementing
> ethtool -L support.
> 
> If on link-up, the cached ENST config is invalid (link speed changed),
> then we ignore the cached config, log a warning and disable ENST on all
> queues. If it is valid, we explicitly re-apply it.
> 
> We ignore the cached config, hoping the current link speed is a 
> degraded
> state which will recover.
> 
> Take this opportunity to replace a kmalloc in
> macb_taprio_setup_replace() with a simple and tiny (104b) stack value.
> 
> Drop the old hack of checking for pm_runtime_suspended(), which has
> little value because we could race with the runtime_suspend() call.
> 
> Synchronise our config using the existing bp->mac_cfg_lock mutex, taken
> by macb_taprio_setup_replace() and macb_taprio_destroy(). To avoid an
> ABBA deadlock between bp->mac_cfg_lock and phydev->lock taken by
> phylink_ethtool_ksettings_get(), cache the link speed as 
> bp->speed_mbps.
> 
> Fixes: 89934dbf169e ("net: macb: Add TAPRIO traffic scheduling 
> support")
> Cc: <stable+noautosel@kernel.org> # more a feature than a bugfix!
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
> ---

> [...]

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>

Thanks,
Nicolai
Technical Details
Message-ID: <f45f2761a217b02d782039139bd3a046@tipi-net.de>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373117-linux-kernel-netdev=dewy.ru
References: <20261127-macb-set-channels-v9-0-0b3addec7886@bootlin.com> <20261127-macb-set-channels-v9-1-0b3addec7886@bootlin.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373117-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v9 1/3] net: macb: cache ENST config across link
 down/up
Date: Sat, 28 Nov 2026 13:50:25 +0100
Organization: Usenet Network
Message-ID: <f45f2761a217b02d782039139bd3a046@tipi-net.de>
References: <20261127-macb-set-channels-v9-0-0b3addec7886@bootlin.com>
 <20261127-macb-set-channels-v9-1-0b3addec7886@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="949570"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:iGL+KPFVfKDT+gdbSuhcvqkHEFs= sha256:7+Ohx7/HjKnoSP4+l0MG3x/ssaCJVNnGbpelE3BpPR4=
	sha1:qqxjrZ+7JcLgk37OI8L1DH+QIaQ= sha256:eizWJn2DAKvOW9n/UTTTlkhNyiipsscIMJ6nh0u2qPg=
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 15A56125F79; Sat, 28 Nov 2026 15:50:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tipi-net.de
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 P7Hw085ikIZC;
	Sat, 28 Nov 2026 15:50:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373117-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id EB479125F76; Sat, 28 Nov 2026 15:50:46 +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 1BC7029512; Sat, 28 Nov 2026 12:50:45 +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=1795870245;
	b=eTTUhbYkygS5U39DRry8eQtYZZKon/flpLlmBKZDHpr+l6vKlXwWdJnoJFTCtQmEEwmy
	 xLzDcKSzy/Fl9NKflSwtm2K9vsboOsNmZhfhE1vfOxuQKBDWA3aCkCxJh9cGMMavhvf+Z
	 dvEWrfH+jM7Gw/eK60ys8soh5pE3NdDrMh+tmMOeUv303KEMe6GzvbZwmPEutJu/ymKDJ
	 YoQne4q+SrUEBL+9N6PfhM7iw/pOUa8jmW7RowIGkG9paK5VFJpTVgw5GydzHZ69E7ge6
	 +ka32PcZqsiFBx3iuePPiAVBCrgzQXJR8jWrZhChWPBHAL//Mdnny8aw8IicgBoaVZg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795870245;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=dlni5aenWpGsgpqbnkM0iGcnmxau0sinRxLH9PXS2Fs=;
	b=WtNL7hzwhZDDwZCrdILrXiDHPUIbqhxAs4gTl4lWxtVnxMSrRQGSYVYVc3+ArsRCAzFC
	 ucBUJ2OyjGATq+KAczT0Kpx1AE7D1PD9pwTywFEH7P1IDgGP4jcfkthNFtUpktjdyRtlV
	 4Ali3OVlt/PYJeh7H0BEPfMl1Fm4sRXc4HC1gvqG70eItPBgdu1rvHtg2eJVGdwc8c4hZ
	 PrNDZP2mH+QOo9nP0ajCatLDYFib8dxhjUi3nLX9UGhwoQlnVGx5pSZX5x5ncUUFrejRi
	 a9FgtY4ZeCiYsXNjsw+MCugRXoMAo+tb/OP4cCDXr3mxpnW0noaMFpqmSQKfH4mVabA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b="fFIw/8GT";
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	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 E76BB606A321;
	Sat, 28 Nov 2026 12:50:44 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=fFIw/8GT
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795870239;
	b=AHpm5un1kzC1LiV1SeeZLQCj217lEJH2voQKJ7R+nvT3uV8M18miZKaaFS6/DGwu9gTA
	 3gr8z/gg8mofsDBL7ohSB3VhxOmPjTf6ok8yIx2TvEPfbLrF7sCbpQUzDKLem8mPreZYH
	 NNwlxxvOAvnUs9RubDBdz+ZYYFKB4qvpNE6Y5Gf1md1UhgshXR6Z5JvGL3ktfWTR0gmpy
	 rlZLQCv9QIehv2Zk9wU70QCpCWpZTDcY9YYbvR/Qkri08VcPz6vi/ZzlcFAoLF1WYzRzs
	 Df4lcxYD2Y7J1U6a557jxl0Gt4p7UzUE1Y2sOyRyk/drGS/frX3v2FE4YxOMB99R7Vw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795870239;
	h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=dlni5aenWpGsgpqbnkM0iGcnmxau0sinRxLH9PXS2Fs=;
	b=POiCxvcFrgXkDNgi+PkmnyeKy3+r8SwcXBP1zHBcKCEOqHgLSXlzhD1XmNmHPacZrv94
	 nRw/3SvVcQSx800uKqLK4rss7r/gfOcOE0fliL0YDhAu+nwmkArkR0GA5iUE6LHNSWykd
	 4o9B4yE9eEFFBFPJxaI5Kz3OFUiqsdo5xlkN03UGZjTJqS3FgoTBB7zdQVV5g9m1v0h1B
	 NXO9LDmkHNt4MyHWR8maGi62rLMDrpdVwX1PKfSW12ECzmafW2APZky8Kr9rUvB8r1GWp
	 kaZzJ8h2IhMrPUFzIBGBYA9QNLt7e2LUwCiFJCJdk4ZaTnXhDnkRna+td1O2nEX1vXg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b="fFIw/8GT";
	arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF13B606A31C;
	Sat, 28 Nov 2026 12:50:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DF13B606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9DE4CA0011;
	Sat, 28 Nov 2026 13:50:25 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1795870229; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=dlni5aenWpGsgpqbnkM0iGcnmxau0sinRxLH9PXS2Fs=;
	b=fFIw/8GT60jjAYTmPbWKeOnP2zmwwMbyLtRS4s2ppiXXqQzdz/YKGBQGMDr1fW7Qog6q3n
	T6GT+D2QpZOLhPztQYhay7M3U1cHz2no0zVC8IzR75Ci9XOctoIZVSVjYHku+TH/KIIEcQ
	MZCoKp0mt3AvWeXWLi6xAk5NA96YYGrIhhBDTLcwLB7CF1cghiu48MuPHw6S4GgOWTIOL6
	uX6T96MFAyFttuiV6dPUJjdwtcMa42Xj39nhWpUpxBSBGSb1woCGD/g2o4A2+FTeqkAMoI
	DQasy5uezlW7CLSjebQp3Stko9jzGS/DtPL7vh0iB2ZsFCLK1hPMNl3R01ooLw==
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
X-Cc: Conor Dooley <conor.dooley@microchip.com>, Andrew Lunn
 <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric
 Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni
 <pabeni@redhat.com>, Russell King <linux@armlinux.org.uk>,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Valerio
 <pvalerio@redhat.com>, Vladimir Kondratiev
 <vladimir.kondratiev@mobileye.com>, Gregory CLEMENT
 <gregory.clement@bootlin.com>, Benoît Monin
 <benoit.monin@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>,
 Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Vineeth Karumanchi
 <vineeth.karumanchi@amd.com>, stable+noautosel@kernel.org
X-In-Reply-To: <20261127-macb-set-channels-v9-1-0b3addec7886@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3