• Ido Schimmel's avatar
    mlxsw: spectrum: Edit RIF properties based on netdev events · 6e095fd4
    Ido Schimmel authored
    We are just about to introduce router interfaces (RIFs), but before that
    we need to be able update the device with the correct RIF attributes
    whenever they change for the netdev the RIF is backing. Two such
    attributes are MTU and MAC.
    
    The MAC is used both to set the source MAC of packets egressing from the
    RIF and also to program an FDB rule that will direct packets to the
    router block.
    
    Use the existing netdevice notification block and respond to CHANGEADDR
    and CHANGEMTU accordingly. Store both attributes in the RIF struct
    in case we need to revert to old attributes following a failed update.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6e095fd4
spectrum_switchdev.c 41.2 KB