summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/tests
diff options
context:
space:
mode:
authorPetr Machata <petrm@nvidia.com>2023-07-19 13:01:28 +0200
committerDavid S. Miller <davem@davemloft.net>2023-07-21 08:54:05 +0100
commit49c3a615d382c984a373690b8c4aa783f58e8089 (patch)
tree04e1393e52e9f7882782cb999efe7b6eafd0025f /scripts/coccinelle/tests
parentcfc01a92eaffdb9ac635f3aedc00ad5a6a2f437a (diff)
mlxsw: spectrum_router: Replay MACVLANs when RIF is made
If IP address is added to a MACVLAN netdevice, the effect is of configuring VRRP on the RIF for the netdevice linked to the MACVLAN. Because the MACVLAN offload is tied to existence of a RIF at the linked netdevice, adding a MACVLAN is currently not allowed until a RIF is present. If this requirement stays, it will never be possible to attach a first port into a topology that involves a MACVLAN. Thus topologies would need to be built in a certain order, which is impractical. Additionally, IP address removal, which leads to disappearance of the RIF that the MACVLAN depends on, cannot be vetoed. Thus even as things stand now it is possible to get to a state where a MACVLAN netdevice exists without a RIF, despite having mlxsw lowers. And once the MACVLAN is un-offloaded due to RIF getting destroyed, recreating the RIF does not bring it back. In this patch, accept that MACVLAN can be created out of order and support that use case. One option would seem to be to simply recognize MACVLAN netdevices as "interesting", and let the existing replay mechanisms take care of the offload. However, that does not address the necessity to reoffload MACVLAN once a RIF is created. Thus add a new replay hook, symmetrical to mlxsw_sp_rif_macvlan_flush(), called mlxsw_sp_rif_macvlan_replay(), which instead of unwinding the existing offloads, applies the configuration as if the netdevice were created just now. Additionally, remove all vetoes and warning messages that checked for presence of a RIF at the linked device. 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 'scripts/coccinelle/tests')
0 files changed, 0 insertions, 0 deletions