🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19126

Re: [PATCH net-next v7 3/3] net: macb: distribute evenly Tx SRAM segments

#19126
From: Nicolai Buchwitz
Date: Thu, 19 Nov 2026 11:45
30 lines
10007 bytes
Hi Théo

On 18.11.2026 21:53, Théo Lebrun wrote:
> GEM has registers to configure the Tx SRAM segments distribution across
> active queues. The reset value is appropriate (even spread) but we need
> to care if/when number of active queues is modified (or if we inherited
> unevenly initialised hardware from bootloader).
> 
> To distribute segments, we take as input the number of queues (current
> context num_queues) and the number of segments (found inside DCFG6).
> Its output is a number of segments for each queue, formatted as
> powers-of-two. For example, 2 for queue 0 means it has 2^2=4 segments.
> 
> We define register offset GEM_TXQSEGALLOC_UPPER which is never used.
> It shall be used when an IP supports >8 number of queues.
> 
> Note that the manual mentions explicitly that only active queues are
> taken into account. So when we write 0x1 in TXQSEGALLOC and a single
> queue is active, this means we assign (1<<1) == 2 segments to the
> first (active) queue and none on the others.
> 
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

> [...]

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

Thanks,
Nicolai
Technical Details
Message-ID: <d594eb9210e2c9a31e965a47a2d5224b@tipi-net.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366980-linux-kernel-netdev=dewy.ru
References: <20261118-macb-set-channels-v7-0-2dbc00f686af@bootlin.com> <20261118-macb-set-channels-v7-3-2dbc00f686af@bootlin.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366980-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v7 3/3] net: macb: distribute evenly Tx SRAM
 segments
Date: Thu, 19 Nov 2026 12:45:28 +0100
Organization: Usenet Network
Message-ID: <d594eb9210e2c9a31e965a47a2d5224b@tipi-net.de>
References: <20261118-macb-set-channels-v7-0-2dbc00f686af@bootlin.com>
 <20261118-macb-set-channels-v7-3-2dbc00f686af@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="2862512"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Iql8ArPoiXMnUNBsA+JA1HEIXnQ= sha256:FfxuYTnmzGUgFQB+Fff8NTdpOZnGMG+E+3Y0uGr6uL0=
	sha1:JyhVXcol74c7i/AN7J+PjMMnJAw= sha256:2Dq4XHMFGz8m1AkTNs6EcjBX3N1/GbGFDjc8V6g2ICw=
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 8527B1155F9; Thu, 19 Nov 2026 14:46:01 +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 PnRW8OGK4C1v;
	Thu, 19 Nov 2026 14:45:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366980-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 75489115579; Thu, 19 Nov 2026 14:45:47 +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 C8C32A24CB; Thu, 19 Nov 2026 11:45:41 +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=1795088736;
	b=G+ljraKrD5XvV46/1hARuu+xyOojFiVEYS3c7jinv9Odh8IkwXCEFDzgmtnZKHr/gtY3
	 HAIfYj/OrKlwDB+sBaeR/qCVrPZKs6sW8WjWmKMwhdBMqhLeuxg1VSmD2Cdke3CoUi+oz
	 uUaciiH2l+gLt/YPbjFPqNjxV72gvP/3p+4L4WrYF5RM65ponme1rhBqBLY3iJdeeMZQ7
	 jWfWz1VgP4RAs8ihLWldwQWTHaFwuJsFl/f5glR3ajF8p0EKtny9/ncnSy26qGxuHIWnI
	 Kv/VupW789Q23CGJJpulwTduLlVvEwgjbx1CsSuD3ycCaQ+CUZBMlQnqpHi/efP7ehg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795088736;
	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=c0AK16xIDz+yTGPTst3ZRIWhZrisEyg0sJy7pHkhxWE=;
	b=zs59cCZjT2Ok+KU7y0vqjXUnJJoiGbJA9ITWhS7RgnFL2ajuitethIyRE0Rz35rjdyTC
	 JWyHZi3ubEB4owtWabN02D27Z706iFKoKI+f4tmjk/djKQmqRcuCcRAN8puJS0BsjB550
	 oBM4qjGQYjgj/ET8vxOxYukR1+E/CllnaXYYvjPXXVDBiSU93yDQaHclZJEOZjFU+Tf4d
	 xx4P8krHg34ytOLAIq5XD12PORLgDgEr/G7OPq7aXXXveK1MIcbaWRAo6q5+m/Iz9rLOJ
	 xccYkgmFJJIEx/lYeo5w5TTrPVTdm0M+0JxY9OLcxFrL4WgVt0flIRUEZjd6EzMvoXw==
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=i2XsJQwU;
	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 79927606A33C;
	Thu, 19 Nov 2026 11:45:36 +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=i2XsJQwU
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=1795088735;
	b=NbmPTDhgk5i6E+BY/Rtlu83hzk7YdPkNNqc0j7ZTXQ7D6xjpFtYYnArN1SHUFsDFi61h
	 l0Ni8RLbr8KMqUjbwthHMoOEwqh0OoL0T6prjmK3YwU3shHquX0AtLv+/u+9UVt4bKeqJ
	 NlzL7CLZKWNuLleguQXlM3U6DYQvPkUx9pR7MG6fHPA+vKn6Zys2+pcqRTktGeHDceS+5
	 Gy7ljn+j3667+HTHBVp4mW1ZlXd+FiLejXkKb+Zy2eRzLaTXJiqh5M7YbenrR25yN7yqX
	 4KtlBxKysU1fJinY1rGU9DeHZBhFUBe6XNH4wVM7vlZRFQHzlvzytxhBH7K4LbXzEZg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795088735;
	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=c0AK16xIDz+yTGPTst3ZRIWhZrisEyg0sJy7pHkhxWE=;
	b=kKuXgaKqdLHzaqqLBojCwwrscI1QV5X5s2rfd45CLiGt4NENTTxiAs0s/lP/kXmRdspb
	 LlI7kpjDRWcoHUudizKqz5wuGPRgafDY2dL28PimCfNU01+tDIkqFS3F2BE+7Ko/TMSGu
	 9+Z6NW8EsiPFqgBvu0rP+b4sj7HvM3R773Y/ZBnIu9OZjr+5pCU6YFqXZUG29wFHQacQW
	 u0lTBes5ks5o1f3vjdSvJkRknQaA4PW3kpyc4GB38bYeEsYAsnKo6GjjyNcfmcmenPPyi
	 lMuvLfoQHyRTMTql+kHCGLe8NUd7UKsAOD0Sum77vMcrcENFEIihSNnZ7E/N0t6lSxA==
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=i2XsJQwU;
	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 7210D606A332;
	Thu, 19 Nov 2026 11:45:34 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7210D606A332
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 6E601A11AF;
	Thu, 19 Nov 2026 12:45:28 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1795088731; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=c0AK16xIDz+yTGPTst3ZRIWhZrisEyg0sJy7pHkhxWE=;
	b=i2XsJQwUCRIyMeENphjxm6geSS+Gq3m/WCKD4V2/gDhsPLIA3BMADPcK7T/Gyis1G6m+TE
	Qzt0Y4204Bmkc7uGHpNSHOsUVl0rwH4wmMtB46m91KyweDCzhbu8CY4vIRuIIeETcBJmlp
	2nTBbvpdr5Nhmwpe0OauCRYstBQ1xwGzpF17Y5x4xkh/nXA5Vq/8G9mZmcGF/Ohjk6kwVq
	tDQD2sIJNHSi4D6VhaRkDe0f29SgVmAl95nu5CE20cSIo6ETLkpmqeUd9kRNObZiF0tgAd
	aTxVodNzeHyuBX6cT+DnUp2OSy354WdNdzb/9FiuBiCaaY9oLw0Tm/Bl6stzrA==
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>
X-In-Reply-To: <20261118-macb-set-channels-v7-3-2dbc00f686af@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3