[PATCH net-next v3 1/7] net: dsa: mt7530: always trap frames to active CPU port on MT7530

Vladimir Oltean olteanv at gmail.com
Thu Jan 25 01:31:03 PST 2024


On Mon, Jan 22, 2024 at 08:35:52AM +0300, Arınç ÜNAL via B4 Relay wrote:
> From: Arınç ÜNAL <arinc.unal at arinc9.com>
> 
> On the MT7530 switch, the CPU_PORT field indicates which CPU port to trap
> frames to, regardless of the affinity of the inbound user port.
> 
> When multiple CPU ports are in use, if the DSA conduit interface is down,
> trapped frames won't be passed to the conduit interface.
> 
> To make trapping frames work including this case, implement
> ds->ops->conduit_state_change() on this subdriver and set the CPU_PORT
> field to the numerically smallest CPU port whose conduit interface is up.
> Introduce the active_cpu_ports field to store the information of the active
> CPU ports. Correct the macros, CPU_PORT is bits 4 through 6 of the
> register.
> 
> Add a comment to explain frame trapping for this switch.
> 
> Currently, the driver doesn't support the use of multiple CPU ports so this
> is not necessarily a bug fix.
> 
> Suggested-by: Vladimir Oltean <olteanv at gmail.com>
> Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv at gmail.com>



More information about the linux-arm-kernel mailing list