Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: manuel.janocha@amperfied.com
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
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	[thread overview]
Message-ID: <179638845089.3146.9429239253121285604@kernel.org> (raw)
In-Reply-To: <20261203-cpsw-ale-lock-v4-2-4ecfbc4bb042@amperfied.com>

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

  reply	other threads:[~2026-12-04 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 12:14 [PATCH net v4 0/4] net: ethernet: ti: cpsw_ale: fix lost ALE entries Manuel Janocha via B4 Relay
2026-12-03 12:14 ` [PATCH net v4 1/4] net: netcp: do not disable interrupts in the VLAN callbacks Manuel Janocha via B4 Relay
2026-12-03 12:14 ` [PATCH net v4 2/4] net: ethernet: ti: cpsw_ale: serialize ALE table accesses Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko [this message]
2026-12-03 12:14 ` [PATCH net v4 3/4] net: ethernet: ti: cpsw_ale: serialize control register updates Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko
2026-12-04 13:18     ` Janocha, Manuel
2026-12-03 12:14 ` [PATCH net v4 4/4] net: ethernet: ti: cpsw_ale: verify ALE table reads Manuel Janocha via B4 Relay
2026-12-04 12:47   ` netdev-bot+sashiko
2026-12-04 13:18     ` Janocha, Manuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179638845089.3146.9429239253121285604@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manuel.janocha@amperfied.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox