History

vxlan: mdb: Add MDB control path support

Implement MDB control path support, enabling the creation, deletion, replacement and dumping of MDB entries in a similar fashion to the bridge driver. Unlike the bridge driver, each entry stores a list of remote VTEPs to which matched packets need to be replicated to and not a list of bridge ports. The motivating use case is the installation of MDB entries by a user space control plane in response to received EVPN routes. As such, only allow permanent MDB entries to be installed and do not implement snooping functionality, avoiding a lot of unnecessary complexity. Since entries can only be modified by user space under RTNL, use RTNL as the write lock. Use RCU to ensure that MDB entries and remotes are not freed while being accessed from the data path during transmission. In terms of uAPI, reuse the existing MDB netlink interface, but add a few new attributes to request and response messages: * IP address of the destination VXLAN tunnel endpoint where the multicast receivers reside. * UDP destination port number to use to connect to the remote VXLAN tunnel endpoint. * VXLAN VNI Network Identifier to use to connect to the remote VXLAN tunnel endpoint. Required when Ingress Replication (IR) is used and the remote VTEP is not a member of originating broadcast domain (VLAN/VNI) [1]. * Source VNI Network Identifier the MDB entry belongs to. Used only when the VXLAN device is in external mode. * Interface index of the outgoing interface to reach the remote VXLAN tunnel endpoint. This is required when the underlay destination IP is multicast (P2MP), as the multicast routing tables are not consulted. All the new attributes are added under the 'MDBA_SET_ENTRY_ATTRS' nest which is strictly validated by the bridge driver, thereby automatically rejecting the new attributes. [1] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast#section-3.2.2

Ido Schimmel committed 3 years ago

Commit a3a48de1 parent 6ab271a6 files · +1396 −1Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/linux/if_bridge.h+10−0
@@ -633,6 +633,11 @@ enum { · 632 unmodified lines
633 MDBA_MDB_EATTR_GROUP_MODE,633 MDBA_MDB_EATTR_GROUP_MODE,
634 MDBA_MDB_EATTR_SOURCE,634 MDBA_MDB_EATTR_SOURCE,
635 MDBA_MDB_EATTR_RTPROT,635 MDBA_MDB_EATTR_RTPROT,
636 MDBA_MDB_EATTR_DST,
637 MDBA_MDB_EATTR_DST_PORT,
638 MDBA_MDB_EATTR_VNI,
639 MDBA_MDB_EATTR_IFINDEX,
640 MDBA_MDB_EATTR_SRC_VNI,
636 __MDBA_MDB_EATTR_MAX641 __MDBA_MDB_EATTR_MAX
637};642};
638#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)643#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
@@ -728,6 +733,11 @@ enum { · 89 unmodified lines
728 MDBE_ATTR_SRC_LIST,733 MDBE_ATTR_SRC_LIST,
729 MDBE_ATTR_GROUP_MODE,734 MDBE_ATTR_GROUP_MODE,
730 MDBE_ATTR_RTPROT,735 MDBE_ATTR_RTPROT,
736 MDBE_ATTR_DST,
737 MDBE_ATTR_DST_PORT,
738 MDBE_ATTR_VNI,
739 MDBE_ATTR_IFINDEX,
740 MDBE_ATTR_SRC_VNI,
731 __MDBE_ATTR_MAX,741 __MDBE_ATTR_MAX,
732};742};
733#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)743#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t