• Amit Cohen's avatar
    vxlan: vxlan_core: Support FDB flushing by destination port · ac0db4dd
    Amit Cohen authored
    
    
    Add support for flush VXLAN FDB entries by destination port. FDB entry
    is stored as {MAC, SRC_VNI} + remote. The destination port 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 port', 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.1 port 1111 vni 2000 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 port 1111 vni 3000 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 port 2222 vni 2000 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 vni 3000 self permanent
    
    When user flush by port x, only the relevant remotes will be flushed:
    $ bridge fdb flush dev vx10 port 1111
    
    $ bridge fdb show dev vx10
    00:00:00:00:00:00 dst 192.1.1.1 port 2222 vni 2000 self permanent
    00:00:00:00:00:00 dst 192.1.1.1 vni 3000 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>
    ac0db4dd
vxlan_core.c 126 KB