• Ido Schimmel's avatar
    mlxsw: spectrum_router: Direct macvlans' MACs to router · 2db99378
    Ido Schimmel authored
    An IP packet received on a netdev with a macvlan upper whose MAC matches
    the packet's destination MAC will be re-injected to the Rx path as if it
    was received by the macvlan, and perform an L3 lookup.
    
    Reflect this functionality to the ASIC by programming FDB entries that
    will direct MACs of macvlan uppers to the router.
    
    In a similar fashion to router interfaces (RIFs) that are programmed
    upon the addition of the first IP address on an interface and destroyed
    upon the removal of the last IP address, the FDB entries for the macvlan
    are added and destroyed based on the addition of the first and removal
    of the last IP address on the macvlan.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2db99378
spectrum.h 25.7 KB