Article View: linux.kernel.netdev
Article #23168Re: [PATCH net] net: stmmac: dwmac-sun8i: Drop received MAC control frames
From: Andrew Lunn
Date: Thu, 26 Nov 2026 16:29
Date: Thu, 26 Nov 2026 16:29
34 lines
10022 bytes
10022 bytes
On Thu, Nov 26, 2026 at 09:56:52AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> sun8i_dwmac_set_filter() sets CTL_FRM_FILTER to "receive all control
> frames", so every PAUSE frame reaches the stack and is counted in
> rx_dropped. Leave it at 0, "drop", as the Allwinner BSP does; the MAC
> still obeys PAUSE.
>
> Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
> Tested on an Orange Pi Zero2 (H616), net/main, MAC loopback: TX still
> waits 32.6 ms per PAUSE; rx_dropped per 20 PAUSE frames 20 -> 0.
> Claude (AI) helped find the cause and write the patch; I reviewed and
> tested it.
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> index 2ece7ba9dd73..f669bf22b7dc 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> @@ -192,7 +192,6 @@ static const struct emac_variant emac_variant_h616_emac1 = {
>
> /* Used in EMAC_RX_FRM_FLT */
> #define EMAC_FRM_FLT_RXALL BIT(0)
> -#define EMAC_FRM_FLT_CTL BIT(13)
Even if it is not used, i would leave this in place. It acts as
documentation of what the bit does.
Andrew
Technical Details
Message-ID:
<befa099f-c18d-4eca-be4c-23883b30b111@lunn.ch>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-372224-linux-kernel-netdev=dewy.ruReferences:
<20261126-sun8i-emac-ctl-frames-v1-1-e90ac94bc8c7@gmail.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-372224-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: stmmac: dwmac-sun8i: Drop received MAC control frames Date: Thu, 26 Nov 2026 17:29:04 +0100 Organization: Usenet Network Message-ID: <befa099f-c18d-4eca-be4c-23883b30b111@lunn.ch> References: <20261126-sun8i-emac-ctl-frames-v1-1-e90ac94bc8c7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="507650"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:nYCRglpFCReofl4K6evSuhU5iLw= sha256:OPnXabcGIs8NQaoYBMDK1eRzevAeRAhb9ukieqi5LJY= sha1:72umECQPV/aCZ7kaDklcLXHAffM= sha256:4+sFb8j88yYwotPaR0zoY5xjLsKBDQlb4oMpmF4e3zI= Content-Disposition: inline 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 1BAB0125EEB; Thu, 26 Nov 2026 19:29:36 +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 (1024-bit key) header.d=lunn.ch 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 WlvUAd_WcU_g; Thu, 26 Nov 2026 19:29:32 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372224-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B3CE1125EE6; Thu, 26 Nov 2026 19:29:21 +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 BAC2535761; Thu, 26 Nov 2026 16:29:19 +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=1795710559; b=Ut6UEIi3Nx70z/xNGNP++zQCgRRY1RoCCmYpySLM6jMuBnYgbESSO8DXlaDAhCBgBaLU 11H1VXAeVSo7HM0mI+IgvvtNAKYANTnf7rjIuGawVR2SjONTefu8AvSrwBwaXa4ECeHGP cOBS0ZBxKLEwxeopTLtT0r0Iu2xwU+wbkBwtLTMc8BAkDZNB6YWGLJTz2x+G5osfPb+5e Ktws5UGhQcdZLgWYibEo2DbFv1y7UzY/yAolRhHtebVKjxEyXwHnKgXSrqv7LMUPtmZhs tH1LoQ5Uv/Km2K1nI5Hkv1LxmqcvDhfGsIgxK4K3k2JrMG2TjaE0aFWOuISIW6iQU4A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795710559; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=lfG40Px3f0wAIOWW8djRVGmO0yACnjIcUJ7Zj45snZo=; b=jKj2JHQDqt/m3ktZo7JuDm8dUDHlsPofEDuEsuUzaHAkuiMpLUiA93n2Omz+SKYIXDdI 2r86Nff6v0lblgYTlvJL935dljERsA6+AvRXBsZDlcUvHSwqEWb0+qh7PjVftrdiNcqSI tTgwMNfpf3NaW3pYGKi+K5qh+n8kxQEtyCJ/vRsfX5SfSfkdlLe59dxI4/oYG1Ci2Sop6 fEJmQdgyltMd5bhUo7CxbgfzRoJyWUYvb0bZf55ZibpaBRaNAteFtMmZQBgGa55/HXrr6 7QurMTAjDdZk4aXDJ5Av/cEReaPjAiuPEuUQuHVS6AuO9eRaT+KU5HXWwoy1Moky+fQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LYmfBdNO; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; 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 9388D606A32C; Thu, 26 Nov 2026 16:29:19 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LYmfBdNO X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795710558; b=FQgaMces8SsrPCidnLx/49a/48q6xLPJX7xfxaE0ibvFiV5Eg0JWI1CRx4wq4jUnQzez bZEViUxmbuXB0bIfg2pP7JBAGaaM9z1WrlKB6gYOIU0Qydr79kcyjYdmWzjIPZSSJLH0f 1I4h70UkkjFZKZtkJO8jie3SaKWZ0pY9zdPAoOGwqgol7yxBZT1xCfzE5Rgw8ilixNI1d cPth86IKDBkbTivTleAFDRrAH7bjH6oTUNLyfIxLio45DtBeEybn4ZwtepgjC/XmPh5Cl BcEzBoTnwkN31CVxZPVqqd4O3+qSGH/nrhuvD0YfNbrPfXyK8fi5HyqCHYJtiSIB7Uw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795710558; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=lfG40Px3f0wAIOWW8djRVGmO0yACnjIcUJ7Zj45snZo=; b=smAZplg3EHV+dZBeEHRysRgGRWudF/VcycQ/GcEMeeXUjWHgNWBFm1XDEpymjbc6lOK5 2JMI4trRYors6HiV4xQtVLvYC3vm0zB0Ddvc9EV1zdXvKTtz5dVdNK+nGySbDkMxo64Ei ME30U3jwFGtqQx06jx7hxCLh+4kvFA5YX0mjfNKsjw7BQtTAgtYyz4bFISOMLxFBX5/se cLD49i0/HBTafi8tb5DBg8GXi2sAYLnBiUDbT0VQlyacu3KHsJlog8YAL192aqGMu6Nmj 99Dbu44iH+UuhCMPwCmtjhS2kh2pc8n7HOByT+09nXLz0sAQUTr3H8FN4FUnsVSLeOg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LYmfBdNO; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43DF4606A323; Thu, 26 Nov 2026 16:29:18 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 43DF4606A323 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=lfG40Px3f0wAIOWW8djRVGmO0yACnjIcUJ7Zj45snZo=; b=LYmfBdNOXxbyCXJ1iJyh/XcZyc 8WuTgb4nu0D2J/ZCXrB1GXrksJILw8hOymhL4Yxm10LN8Gb7Tg3hHNyXwe0Unh8LAiAVBb7RzdX6c TCYZ56b/QkcjEIkvOOG0O5oyNXzL524ZyiqYb8mqJAHA2K1bshqYalBBVGDuhDgG+zc8=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xWcLI-001cI2-6A; Thu, 26 Nov 2026 17:29:04 +0100 X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.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>, 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>, LABBE Corentin <clabbe.montjoie@gmail.com>, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev 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-In-Reply-To: <20261126-sun8i-emac-ctl-frames-v1-1-e90ac94bc8c7@gmail.com>