๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20459

Re: [PATCH net-next 2/3] net: stmmac: dwmac-sun8i: emit pause frames when the RX FIFO fills

#20459
From: Nicolai Buchwitz
Date: Sun, 22 Nov 2026 15:57
32 lines
9920 bytes
On 22.11.2026 15:49, Maxime Chevallier wrote:
> The TX flow control mechanism needs multiple things setup to actually
> work:
> 
>  - The TX_FLOW_CTL_EN bit needs to be set in the TC_FLOW_CTL register,

nit: finger off by one :) TC_FLOW_CTL -> TX_FLOW_CTL

>    this is already done
> 
>  - The RX fifo thresholds needs to be set, to indicate when the MAC 
> needs
>    to start sending pause frames based on the RX fifo occupancy, and
>    when it should stop.
> 
> Let's configure the threshold the following way:
> 
>  - Send pause frames when there's less than 2K left in the RX fifo
>  - Stop sending them when there's more than 4K left in the RX fifo.
> 
> This was tested in Allwinner H2+ using the ethtool -t "flow control"
> selftest. On that SoC, the RX fifo is 16K.
> 
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

> [...]

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

Thanks,
Nicolai
Technical Details
Message-ID: <5eb47dcb49898e948968a54bfa992e72@tipi-net.de>
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-368737-linux-kernel-netdev=dewy.ru
References: <20261122144926.284857-1-maxime.chevallier@bootlin.com> <20261122144926.284857-3-maxime.chevallier@bootlin.com>

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-368737-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 2/3] net: stmmac: dwmac-sun8i: emit pause frames
 when the RX FIFO fills
Date: Sun, 22 Nov 2026 16:57:40 +0100
Organization: Usenet Network
Message-ID: <5eb47dcb49898e948968a54bfa992e72@tipi-net.de>
References: <20261122144926.284857-1-maxime.chevallier@bootlin.com>
 <20261122144926.284857-3-maxime.chevallier@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="3671036"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:D2IXDpyfzDwEavkC9MGmio7GzA0= sha256:poOUWHxseeJduPArVnPA8gACB8LJTzka/LbeF4AfONU=
	sha1:gaRn4764sSuGpUYn7pdV0wGzRRQ= sha256:SAVxzQGnVMR7KIdXrlrmz+4eYJzlNpeu+WVLRXmWn7g=
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 45385125D79; Sun, 22 Nov 2026 18:58:05 +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 pIxcaPdY3QkY;
	Sun, 22 Nov 2026 18:58:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-368737-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 297E0125D7F; Sun, 22 Nov 2026 18:57:52 +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 9197E2F2F4; Sun, 22 Nov 2026 15:57:50 +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=1795363070;
	b=lxJSxKzkzwOE/3Rh0q2bhYrZv1T5EMcfKVQWOMGyubrdhhIWjxtpbiYuX5PB4T6mCECB
	 5tE7sRq6872x+ih6UOqrLKEdKOLl4T0YvICvmNyVhEzjpxhEXH2Q3S2hCUYhaG5udEmAW
	 gOKJu9OuSJIoHMsiiTit7WimXx3v5bZnaBvTWJQgkKHeLcpt+SUQHBzW2vREgMEinKJ7Y
	 TYwr/Y3/0M6jwdlpNH4iERhO44i6npxwGgKti3tqk1lIP1K2zl1mhJ7njl5gD982CAI0s
	 zsERzyMXAMhYCPnUhYsabFdDzL3F2Wco3ISmrV2SpoydD3iG8KmJIiSvnclu49djL4Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795363070;
	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=8XFKXyx1GOfO5xGIHtXdRmS/LrQDe1E2/0CLeb0IQjQ=;
	b=aQ3zE4KE74RTdSLA6V4qxgLqpUEUlU19jFSEEAWylktfnru17KKjWx7j1tNKBXUexhoI
	 t0S2mosautE3F2wDugQ/oGm8L1DDejU6NnC1doL5zVWzOzEpFrhO6GfiXCug/6A+aoBD9
	 gVgKxK4qvn0zTMo/ayYzNwbjWSnzpw/EVCDjgb56wK2aUAt/B6RYN3RRdgE9MA/Iu/++c
	 QweutCnWMzVoF4SPFgUMm2Hr++oO+ZtEIXMy/OvH9ZJAuoiAqegrh5hR2or24D75BwmGc
	 l7IRUOUdcPaV5Mjf94liXNFT8EYRv99ViskRuPLdj0EXhhXthsLk7hYN0BC+4VGiMOw==
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=QMoncX0k;
	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 66C4B606A332;
	Sun, 22 Nov 2026 15:57:50 +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=QMoncX0k
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=1795363064;
	b=0WHK0qARVM2ygF3uEPbP3IOWurW0Vcg3OqSfUalr1oSZXLlyHG74K/t/3BkSjQY8kfRB
	 RJ+xyGTNP2P/XxwqEvnPunb+cakbo9KYhwdlXjx5us0e6yR3mfZXI+BMEIfgVb+EF1Ivq
	 Si7iv/jpSgnoICojZZw7vx8SXw9twesFWCKeVUYK0gauP1ea8zpG9bzrV6QbMgoy6CkDP
	 79+PLUd5xWFzPS6TxJIO+1HEcIQiT3Jrrp1wf5zOteR3yIUy5Gfh585BEQbVmbG9GGnez
	 Rmt4AwmJRF+gD8vmnQqx7Xm3wX6GLWHRs61VVIQkse3GpG1Ovoivg7Dec5rAGmJ8JYg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795363064;
	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=8XFKXyx1GOfO5xGIHtXdRmS/LrQDe1E2/0CLeb0IQjQ=;
	b=m8mspJuNQrqJdMp5Njw8fkUh8GMpfGW5tO3jETYMLCdkbMODk04mmkUW6cUAz+veLPZo
	 fgjrVcIFfJzdKlAEdojRnE7Xiw05twSxgCDpr7ZjA5NPAydawJFKHK2LPAQMHO8xtFNHZ
	 CVs5CZXDoKanTiKurotJP5UzM0lbz7CqMtEVp40/hcqnsFV4YinpbzUBCwSov/yaTDj5r
	 H/KLptnB5VhVFgHQKJZ+7GURs15XLpLIH6VUWz0nyJ+Qzg0oTHwOQAsYwx49cQuolRcDj
	 Uf2S5gmd5e5vi8Dp/+cNvy660PVccfUAeVXBtbU4FVe+HqVR+B4L1niyfv6zI7ffWhw==
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=QMoncX0k;
	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))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D54C606A320;
	Sun, 22 Nov 2026 15:57:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0D54C606A320
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 3B944A023C;
	Sun, 22 Nov 2026 16:57:40 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1795363061; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=8XFKXyx1GOfO5xGIHtXdRmS/LrQDe1E2/0CLeb0IQjQ=;
	b=QMoncX0kbUNktHVsqC7SkFlEI0N7Fs7OwtUaYespsF20PTXAK/En3B9Grn0PPamfmiPJdU
	fyiTim553wM3e/omRjM8egf24MnL+jqrsVGGvR5cr0dfxM6tim/TvsWykJBV4xJUpyLWyu
	0Q4ACmWEPc0y/JvPdF1dSCXcDpsxIFjV9MlJ4ICjGykwIZC0QffHaWXo2HD/kV+fcU4RvF
	Xo5rx7fQ54OI1barIla3Nh8HUxzf+QasyJGERXkSf/J8sFm/XU2xARWNxRbZuXtVo7MW+Y
	uIbWXBkgFhGa/FO8xrS1koyBjqqY+Srk2amcMal6qoJaK1LipUr6mJ9/RDk2yQ==
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: Andrew Lunn <andrew+netdev@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
 davem@davemloft.net, Eric Dumazet <edumazet@google.com>, Paolo Abeni
 <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Willem de Bruijn
 <willemb@google.com>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec
 <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Maxime
 Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue
 <alexandre.torgue@foss.st.com>, Russell King <linux@armlinux.org.uk>,
 Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
 thomas.petazzoni@bootlin.com, Alexis Lothorรฉ
 <alexis.lothore@bootlin.com>, netdev@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
 linux-sunxi@lists.linux.dev
X-In-Reply-To: <20261122144926.284857-3-maxime.chevallier@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3