Re: [PATCH net-next 13/16] net: dsa: mv88e6xxx: use ports list to map bridge

Florian Fainelli
2019-10-21T02:52:12Z

On 10/19/2019 8:19 PM, Vivien Didelot wrote:
> Instead of digging into the other dsa_switch structures of the fabric
> and relying too much on the dsa_to_port helper, use the new list
> of switch fabric ports to remap the Port VLAN Map of local bridge
> group members or remap the Port VLAN Table entry of external bridge
> group members.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> ---

[snip]

> - for (port = 0; port < ds->num_ports; ++port) {
> - if (dsa_to_port(ds, port)->bridge_dev == br) {
> - err = mv88e6xxx_pvt_map(chip, dev, port);
> + list_for_each_entry(dp, &dst->ports, list) {
> + /* Remap the Port VLAN Map of local bridge group members and
> + * remap the PVT entry of external bridge group members.
> + */

If you do a v2, I would tend to put these comments under the appropriate
branches taken below for clarify although the code is actually clearer
this want than it was before IMHO, so up to you :)

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian