• Amit Cohen's avatar
    vxlan: vxlan_core: Support FDB flushing by destination IP · 2dcd2202
    Amit Cohen authored
    Add support for flush VXLAN FDB entries by destination IP. FDB entry is
    stored as {MAC, SRC_VNI} + remote. The destination IP is an attribute of
    the remote. For multicast entries, the VXLAN driver stores a linked list
    of remotes for a given key.
    
    In user space, each remote is represented as a separate entry, so when
    flush is sent with filter of 'destination IP', flush only the match
    remotes. In case that there are no additional remotes, destroy the entry.
    
    For example, the following are stored as one entry with several remotes:
    $ bridge fdb show dev vx10
    00:00:00:00:00:00 dst 192.1.1.3 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 self permanent
    00:00:00:00:00:00 dst 192.1.1.2 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 vni 1000 self permanent
    
    When user flush by destination IP x, only the relevant remotes will be
    flushed:
    $ bridge fdb flush dev vx10 dst 192.1.1.1
    
    $ bridge fdb show dev vx10
    00:00:00:00:00:00 dst 192.1.1.3 self permanent
    00:00:00:00:00:00 dst 192.1.1.2 self permanent
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2dcd2202
vxlan_core.c 126 KB