> - [Medium] The new spinlock is always taken with spin_lock_irqsave() and
> held across one or more full scans of the ALE table.
Agreed, that is a regression for am65-cpsw: the table scans now run
with hard interrupts off, and an unprivileged multicast join is enough
to trigger them.
irqsave was only there because netcp_rx_add_vid() and
netcp_rx_kill_vid() call into the ALE with netcp->lock held and
interrupts disabled. netcp->lock is otherwise only taken in
netcp_set_rx_mode() with a plain spin_lock() under
netif_addr_lock_bh(), so it is never taken from hard interrupt context
and does not need irqsave in the VLAN callbacks either.
v3 will therefore:
- add a patch that takes netcp->lock with spin_lock_bh() in
netcp_rx_add_vid() and netcp_rx_kill_vid(),
- take ale->lock with spin_lock_bh() everywhere.
Hard interrupts then stay enabled during the scans. They run with
bottom halves disabled, which the rx_mode path already does today
under netif_addr_lock_bh(). The changelog will say so. netcp remains
compile-tested only, I have no Keystone hardware.
> - [Low] The patch fixes two races but the Fixes: tag covers only one.
Right. The lost update in cpsw_ale_control_set() does not depend on
1767bb2d47b7: the ageout timer and the phylink link callbacks never
ran under RTNL. v3 moves the cpsw_ale_control_set() change into its
own patch with its own Fixes: tag.
> - [Low] The new field comment in struct cpsw_ale (cpsw_ale.h:99, '/*
> serializes access to the ALE table registers */') describes less than...
Will be extended in v3 to name the table registers, the control
registers written through cpsw_ale_control_set(), the VLAN mask mux
registers and p0_untag_vid_mask.
pw-bot: cr