summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2023-07-13 19:15:29 +0300
committerDavid S. Miller <davem@davemloft.net>2023-07-14 12:20:15 +0300
commita5b52692e69338e4fc6abe0609679db3bade0d22 (patch)
treedc641945250cf6fb5bfe6aaa585398e5d9bf0fd8 /tools
parent3430f2cf91a4b0ee4d639644c75f7c7b4b0bf1cf (diff)
downloadlinux-a5b52692e69338e4fc6abe0609679db3bade0d22.tar.xz
mlxsw: spectrum_switchdev: Manage RIFs on PVID change
Currently, mlxsw has several shortcomings with regards to RIF handling due to PVID changes: - In order to cause RIF for a bridge device to be created, the user is expected first to set PVID, then to add an IP address. The reverse ordering is disallowed, which is not very user-friendly. - When such bridge gets a VLAN upper whose VID was the same as the existing PVID, and this VLAN netdevice gets an IP address, a RIF is created for this netdevice. The new RIF is then assigned to the 802.1Q FID for the given VID. This results in a working configuration. However, then, when the VLAN netdevice is removed again, the RIF for the bridge itself is never reassociated to the VLAN. - PVID cannot be changed once the bridge has uppers. Presumably this is because the driver does not manage RIFs properly in face of PVID changes. However, as the previous point shows, it is still possible to get into invalid configurations. In this patch, add the logic necessary for creation of a RIF as a result of PVID change. Moreover, when a VLAN upper is created whose VID matches lower PVID, do not create RIF for this netdevice. These changes obviate the need for ordering of IP address additions and PVID configuration, so stop forbidding addition of an IP address to a PVID-less bridge. Instead, bail out quietly. Also stop preventing PVID changes when the bridge has uppers. Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Danielle Ratson <danieller@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions