Article View: linux.kernel.netdev
Article #26930Re: [PATCH net v4 2/4] net: ethernet: ti: cpsw_ale: serialize ALE table accesses
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 12:47
Date: Fri, 04 Dec 2026 12:47
59 lines
10529 bytes
10529 bytes
Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The changelog of "net: ethernet: ti: cpsw_ale: serialize ALE table accesses" refers to other patches by their position in the⦠-- net: ethernet: ti: cpsw_ale: serialize ALE table accesses This adds a spinlock to struct cpsw_ale and takes it with spin_lock_bh() in all exported cpsw_ale functions that access the ALE table. Without it, ndo_set_rx_mode() running without RTNL on one am65-cpsw/netcp port can interleave its index and data register accesses with a VLAN or address operation on another port. cpsw_ale_add_vlan() is split into a locked wrapper and an unlocked __cpsw_ale_add_vlan() helper, which cpsw_ale_vlan_add_modify() calls with the lock held. > The lock is taken with spin_lock_bh(). ndo_set_rx_mode() already runs > with bottom halves disabled, and no caller runs in hard interrupt > context, so hard interrupts stay enabled while the table is scanned. > netcp was the only caller that took the lock with interrupts disabled > (netcp_rx_add_vid() and netcp_rx_kill_vid()); the previous patch > changed that. [ ... ] > are not missing serialization: with the lock held, a table read can > still return a wrong entry, which patch 4 handles. These numbers are > from v1 (spin_lock_bh()) and v2 (spin_lock_irqsave()) of this patch. > This version was run with the whole series on net v7.4-rc3: 60 runs > of 120 seconds passed and lockdep stayed silent. [Severity: Low] This isn't a bug, but once this is merged, nothing in git identifies "the previous patch" or "patch 4". Could the changelog name these patches by subject instead? From the series, they look like "net: netcp: do not disable interrupts in the VLAN callbacks" and "net: ethernet: ti: cpsw_ale: verify ALE table reads". The changelog says 2 of 19 runs on net and 1 of 29 runs on 6.18 still lost the VID 0 entry. A stable backporter reading only this commit can't tell which commit fixes those failures. The netcp prerequisite does name this patch by subject and says the two must be backported together, so the dependency is only recorded in one direction. The "verify ALE table reads" follow-up has no Cc: stable tag. It only has a Fixes: tag for 1dd3841033b3. Should it be tagged for stable as well? Also, could the v1/v2 revision history move below the --- line? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203-cpsw-ale-lock-v4-0-4ecfbc4bb042%40amperfied.com
Technical Details
Message-ID:
<179638845089.3146.9429239253121285604@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!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-377361-linux-kernel-netdev=dewy.ruReferences:
<20261203-cpsw-ale-lock-v4-2-4ecfbc4bb042@amperfied.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!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-377361-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v4 2/4] net: ethernet: ti: cpsw_ale: serialize ALE table accesses Date: Fri, 04 Dec 2026 12:47:30 +0000 Organization: Usenet Network Message-ID: <179638845089.3146.9429239253121285604@kernel.org> References: <20261203-cpsw-ale-lock-v4-2-4ecfbc4bb042@amperfied.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2765060"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:iqfVhXVHg9JG/KTJMbVaawBS674= sha256:KDRAttiGlRSf/rNVe3zCeBXsyv+kUgw3yp4SOISrUZY= sha1:Zp0wY2E9UHG/D7pW7Er+t2yBuiY= sha256:LpfvYFow7vxOyf+Q2L7EhSmyAzMC8Ns1ydTfyBahOt4= 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 26F5D117BE6; Fri, 4 Dec 2026 15:47:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.541 X-Spam-Status: No, score=-3.541 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 XAodcz89pTGR; Fri, 4 Dec 2026 15:47:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-377361-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id D5AF0117BBC; Fri, 4 Dec 2026 15:47:35 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id D2FD22EA21; Fri, 4 Dec 2026 12:47:33 +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=1796388453; b=jdpaZ2sQ5UwK//7lZHN2523kbJow8c+wHuqVPuK/a6ync1Qv5XO96lDx7nWTpiheyYra F4prj1f7ajdhZKQ8R+AQ/Q9QFw+R9MV6yK4Jq7QE2dYFwMN6dheUv6aGNeyYFCot9/YWs vMwhoFZrrUZgMEGT1alPMbkYZOaDHAM0RcoPp/QCOnwAYJ77BsKfsFEyk7/dWLdsI/lqz lqbrkUX+HKEXBaVEG3IlATx8dBC1qKMgLFFde6jJkbU8VmYAIUmOk7CF13t9NPWOx95WT YtTe5eVvTtG87BpUELmA0m8XT/tbpC63CjrJvymGWe9R1ziqQAPm2mkMRO/9hmHXtbQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388453; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=MPkiftDd04oVsaDCLb7DpnkOGpR3RWOO+FB+Q8Ryoog=; b=JJXyPdhet6z/nShp7VB5COb0Cnis5tRjkCwqqeXLdC2aXlScn3OnI5h+TWADfArJjYVd V28mIs9DqET1eu4JUToU/RmC+WBRBioVizNMbBiJnIWdfCdbtTJONUYyaVXROyHaINwXv ii95HzKlxhfrFVr567b+SzOiFOZJjbzf+YxjTNxt/0CZcr9Uz1fERCsAKVPiXYl7OI8NT zXDcpXvUP5+DhrncEgEFl1rvyYukcZjWmz359RzAU5xQ6eXRW5PN11TL4Hp7A7Zh9k2T4 M+9tuaETFkEdODdmzUCJRqWDCEdxHv4fRwMJlMdx5gDLhl2AOHrBQgaTz0SOGFyJsWA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="RM/mDqhT"; 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 426FA606A322; Fri, 4 Dec 2026 12:47:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RM/mDqhT X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388452; b=N3etGnZdxKIFIWt62vHrh6j+UaiymqQRHayp5ybtCx3qIeN+YoK4n7e1Z8A4ueW1sied iljdVrNyuMDibC1eQik0RsyxDFFWDhPjG7XifTW6A1ZkNcbIn7wVz82gv0fhgodXacrjv PkmBBFNYRDQxYya2MTUz2iZx31Y/p44JgS5RQzg1m64mrEuLprRnuhVQl0hMsOh7OpkCL y7jJNfzc4XEREuw5JDgiZsraPenwbMS80OKVnZKOnFcdB+Zxv0StUQ7mhW9eWFzCJu1p1 B4wxzZEwAEMZ480aP9ngZ+zYt/JBQ2o3LFy2VyUDnqQ2gCd2jJCt01zy+DV+KXgbDPg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388452; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=MPkiftDd04oVsaDCLb7DpnkOGpR3RWOO+FB+Q8Ryoog=; b=nHF4nq9lL/QtQvo2BrTaiWaTBsgp1mzHnDAQZKvs8o99tOfnqBxF+Eld8J/2xKwwhbgL BZuQu19QB+XYsrWnnzyPYoU2/Rx66XsBGcGPgtdxEDrnQljkq4ak7U6TYEZfcqWpSj6/c aGOAV7ZPPpRj6Zk84/TNGiIpBTcBIF335sFBzGnTxv8gue4tP376QlUgRp6kZTOj2a8Sy 1ghOOloNwfPFEX1CGo8f22uawFxUsseFbhJgRftTSQVOsaVGsR/sUts8de0uKJJ/E7nFV hPGp0h9x977dCNU5NnNz+/aAugbaS9huAj0D0GNo6Fn0z9o6gWyowGYCzfru1V/21jg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="RM/mDqhT"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (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 62968606A333; Fri, 4 Dec 2026 12:47:32 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 579041F00897; Fri, 4 Dec 2026 12:47:31 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796388451; bh=MPkiftDd04oVsaDCLb7DpnkOGpR3RWOO+FB+Q8Ryoog=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=RM/mDqhTgqGQwsb+1q79CnkY6ueI//WpG6H6e2/Jk3nJ0Gw+25ZXYZGx7/DRfMjmn vkzFXYj2gnfbeUfcmUYki9L/3I9it+H07Ln9s1+pVTsbiO5aENKkvzFDbueqsuNoKZ rUGm2xceb2UjMCiYCjViVyTbDaqDsffxA13Bekd25tsxF7/d2bCBoDMnScIn+J1Dbl zqdwE5DMyIJ3/YM6ELuCckuRJChbwYil1Xm0iUX935BJ4uQyi+K52drXJ8yc4w4dhi 42kksgcTU2vZ9Et01cF5hgCDBxBgrbm9nJ7ePTxKwiwWsZ+XC0pta1R/nYCZv/uA8e 0zDHv6aOznSZA== X-Cc: s-vadapalli@ti.com, rogerq@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, vigneshr@ti.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, kuniyu@google.com X-In-Reply-To: <20261203-cpsw-ale-lock-v4-2-4ecfbc4bb042@amperfied.com> X-sashiko-severity: Low 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