• Ido Schimmel's avatar
    vxlan: Add MDB data path support · 0f83e69f
    Ido Schimmel authored
    Integrate MDB support into the Tx path of the VXLAN driver, allowing it
    to selectively forward IP multicast traffic according to the matched MDB
    entry.
    
    If MDB entries are configured (i.e., 'VXLAN_F_MDB' is set) and the
    packet is an IP multicast packet, perform up to three different lookups
    according to the following priority:
    
    1. For an (S, G) entry, using {Source VNI, Source IP, Destination IP}.
    2. For a (*, G) entry, using {Source VNI, Destination IP}.
    3. For the catchall MDB entry (0.0.0.0 or ::), using the source VNI.
    
    The catchall MDB entry is similar to the catchall FDB entry
    (00:00:00:00:00:00) that is currently used to transmit BUM (broadcast,
    unknown unicast and multicast) traffic. However, unlike the catchall FDB
    entry, this entry is only used to transmit unregistered IP multicast
    traffic that is not link-local. Therefore, when configured, the catchall
    FDB entry will only transmit BULL (broadcast, unknown unicast,
    link-local multicast) traffic.
    
    The catchall MDB entry is useful in deployments where inter-subnet
    multicast forwarding is used and not all the VTEPs in a tenant domain
    are members in all the broadcast domains. In such deployments it is
    advantageous to transmit BULL (broadcast, unknown unicast and link-local
    multicast) and unregistered IP multicast traffic on different tunnels.
    If the same tunnel was used, a VTEP only interested in IP multicast
    traffic would also pull all the BULL traffic and drop it as it is not a
    member in the originating broadcast domain [1].
    
    If the packet did not match an MDB entry (or if the packet is not an IP
    multicast packet), return it to the Tx path, allowing it to be forwarded
    according to the FDB.
    
    If the packet did match an MDB entry, forward it to the associated
    remote VTEPs. However, if the entry is a (*, G) entry and the associated
    remote is in INCLUDE mode, then skip over it as the source IP is not in
    its source list (otherwise the packet would have matched on an (S, G)
    entry). Similarly, if the associated remote is marked as BLOCKED (can
    only be set on (S, G) entries), then skip over it as well as the remote
    is in EXCLUDE mode and the source IP is in its source list.
    
    [1] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast#section-2.6Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0f83e69f
vxlan_mdb.c 36.7 KB