From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DC5AF606A322 for ; Sat, 5 Dec 2026 10:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EFH3l2TF; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lvkSEkfY DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=ryw6fYBNqO+itRUr/RKbK1BBXz96hbyVCggeEpVOupo=; b=EFH3l2TF2dcDUkup6mNKEhvTTb VWIVYtnSvXmk2rMwrpqz6wEK6saiMfNcFB6KR0YZF+RM84+afBTktNeJDbs05HpHCh6QiRVDZ8ZMr 27maq5NGqhk2QxDe1zd7Vln5PqIwUw5BFxzqxu1yd+vyU3CE3ZRqHB1Ooe8/VR3KRtM3oV0OJe3te uGQPFen4HaJX1J6OVK928VQ+dXuDu3H5k01Sx+f1HXYmuEup+MpxrRXccEKKpSzxGQl/Ojbw0Px5i RNIHXpMyNK+W1BxLCz8uijyVi/I5r2z2VOd9qg/1oENOPLs44U8GECLMoRxQGXPEJwDRaONEA+jPS Br9NdvCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZnMV-00000002KLa-174a; Sat, 05 Dec 2026 10:51:27 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZnMS-00000002KLT-34RT for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2026 10:51:25 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id DD72E6060C; Sat, 5 Dec 2026 10:51:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2D0F1F00936; Sat, 5 Dec 2026 10:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796467883; bh=ryw6fYBNqO+itRUr/RKbK1BBXz96hbyVCggeEpVOupo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=lvkSEkfYKx2n2gd5G4BZmZ39Lvuhl6qpAbR7pNQg2JXp14nbhBRiOOiVR3lJdqrik ox9T9oRA3Ev5Zby/e5L78jPLSpRFB8oZzyw/AfAsduWLUh8Ck8ZJk8qFEJuT2qZnBu /ZGAN/SSzA1dpB4/ZnDqtPbR0RdDT47y/3SqWRvYchb47pHBO290uc4o9OB2jOCMt+ PsayPHNl0P+d4mtl9tarG8aUkzMuqvL76Vwa4O2XfaLAm8IdKIR298CT6xyAf5/V24 UwdZmH0Jlepzg1nwbgIQnBSciRVdd50gPurQMDUYi7NoGJNLltviZstHodFE/47+9A myHE7IVXTizfA== Subject: Re: [PATCH net-next v14 2/5] net: stmmac: remove software VLAN tag stripping From: netdev-bot+sashiko@kernel.org To: lorenzo.bianconi@oss.qualcomm.com Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, Jose.Abreu@synopsys.com, boon.leong.ong@intel.com, horms@kernel.org, andrii@kernel.org, eddyz87@gmail.com, memxor@gmail.com, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev, matthew.gerlach@altera.com, boon.khai.ng@altera.com, linux@armlinux.org.uk, willemb@google.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org, nb@tipi-net.de Date: Sat, 05 Dec 2026 10:51:21 +0000 Message-ID: <179646788129.3146.10432733850677593398@kernel.org> In-Reply-To: <20261204-stmmac-rx-mb-v14-2-5506796fd39e@oss.qualcomm.com> References: <20261204-stmmac-rx-mb-v14-2-5506796fd39e@oss.qualcomm.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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] With this patch, the PHY is allowed to stop RXC in LPI on dwmac100/dwmac1000 and on DWXLGMAC builds that have no vlhash/vlins. -- net: stmmac: remove software VLAN tag stripping This removes the software VLAN stripping fallback in stmmac_rx_vlan(). stmmac_has_ip_ethertype() is reworked so it still recognises IPv4/IPv6 behind a single in-payload C-tag on RX. NETIF_F_HW_VLAN_CTAG_RX and NETIF_F_HW_VLAN_STAG_RX are now advertised only on cores that actually provide hardware RX VLAN offload. > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index b3524d46863da..c429cb9e1ccbe 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c [ ... ] > @@ -8282,15 +8255,15 @@ static int __stmmac_dvr_probe(struct device *device, > ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA; > ndev->watchdog_timeo = msecs_to_jiffies(watchdog); > #ifdef STMMAC_VLAN_TAG_USED > - /* Both mac100 and gmac support receive VLAN tag detection */ > - ndev->features |= NETIF_F_HW_VLAN_CTAG_RX; > - if (priv->plat->core_type == DWMAC_CORE_XGMAC) > - ndev->features |= NETIF_F_HW_VLAN_STAG_RX; > - > - if (dwmac_is_xmac(priv->plat->core_type)) { > + if (stmmac_rx_8021q_offload(priv)) { > + ndev->features |= NETIF_F_HW_VLAN_CTAG_RX; > ndev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX; > priv->hw->hw_vlan_en = true; > } > + > + if (stmmac_rx_8021ad_offload(priv)) > + ndev->features |= NETIF_F_HW_VLAN_STAG_RX; > + [Severity: Medium] Can this change let the PHY stop RXC in LPI on cores where it never could before, with CONFIG_VLAN_8021Q=y? Before this patch, NETIF_F_HW_VLAN_CTAG_RX was set on every core. Now dwmac100/dwmac1000 have no .vlan ops, and dwxlgmac2_vlan_ops has no .rx_hw_vlan. On those cores without vlhash/vlins, NETIF_F_VLAN_FEATURES is therefore empty by the time stmmac_phylink_setup() runs: stmmac_phylink_setup() { ... if (!(priv->plat->flags & STMMAC_FLAG_RX_CLK_RUNS_IN_LPI) && !(priv->dev->features & NETIF_F_VLAN_FEATURES)) config->eee_rx_clk_stop_enable = true; ... } Because of that, RX clock stop is now on by default for dwmac1000 with EEE and for DWXLGMAC without vlhash/vlins. stmmac_set_rx_mode() still writes the MAC address, hash and frame filter registers through stmmac_set_filter() with BH disabled. It does not call phylink_rx_clk_stop_block(): * FIXME: This may need RXC to be running, but it may be called with BH * disabled, which means we can't call phylink_rx_clk_stop*(). */ static void stmmac_set_rx_mode(struct net_device *dev) If a multicast join, unicast address change or promisc toggle arrives while the link is idle in LPI and RXC is stopped, can the hardware filter end up out of sync with the software lists? One example is a missed IPv6 solicited-node multicast address, which would break ND until the next set_rx_mode call. The commit message acknowledges this window and says a dedicated follow-up will fix it. That follow-up does not seem to be part of this series. At the last commit of the series ("net: stmmac: rework stmmac_rx to support XDP rx multi-buff"), stmmac_phylink_setup() still uses the same NETIF_F_VLAN_FEATURES gate. The patch also carries "Fixes: 534df0c1724b", so stable could pick it up without the decoupling change. Could eee_rx_clk_stop_enable be decoupled from NETIF_F_VLAN_FEATURES before this patch, or in the same series? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204-stmmac-rx-mb-v14-0-5506796fd39e%40oss.qualcomm.com