Thread (44 messages) flat view 44 messages, 4 authors, 2019-10-21

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

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2019-10-21 02:52:12
Also in: lkml


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 <redacted>
---
[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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help