Commit 3167378
staging: dpaa2-switch: prevent joining a bridge while VLAN uppers are present
Each time a switch port joins a bridge, it will start to use a FDB table
common with all the other switch ports that are under the same bridge.
This means that any VLAN added prior to a bridge join, will retain its
previous FDB table destination. With this patch, I choose to restrict
when a switch port can change it's upper device (either join or leave)
so that the driver does not have to delete all the previously installed
VLANs from the previous FDB and add them into the new one.
Thus, in the PRECHANGEUPPER notification we check if there are any VLAN
type upper devices and if that's true, deny the CHANGEUPPER.
This way, the user is not restricted in the topology but rather in the
order in which the setup is done: it must first create the bridging
domain layout and after that add the necessary VLAN devices if
necessary. The teardown is similar, the VLAN devices will need to be
destroyed prior to a change in the bridging layout.
Signed-off-by: Ioana Ciornei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 53011af commit 3167378
1 file changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1590 | 1590 | | |
1591 | 1591 | | |
1592 | 1592 | | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
1593 | 1608 | | |
1594 | 1609 | | |
1595 | 1610 | | |
| |||
1607 | 1622 | | |
1608 | 1623 | | |
1609 | 1624 | | |
1610 | | - | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1611 | 1629 | | |
1612 | 1630 | | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1613 | 1639 | | |
| 1640 | + | |
1614 | 1641 | | |
1615 | 1642 | | |
1616 | 1643 | | |
| |||
1623 | 1650 | | |
1624 | 1651 | | |
1625 | 1652 | | |
| 1653 | + | |
1626 | 1654 | | |
1627 | 1655 | | |
1628 | 1656 | | |
| |||
0 commit comments