summaryrefslogtreecommitdiff
path: root/zebra/zebra_vxlan_private.h
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-03-27 17:14:45 -0700
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-08-05 06:46:12 -0700
commitce5160c08141db3002060189d624398409bd6317 (patch)
treedf19f2619fa3d2db3a186720f1cb341fee9550be /zebra/zebra_vxlan_private.h
parent506efd379b4ed72454650a32049028a7f5b4c5c8 (diff)
zebra: Ethernet segment management and support for MAC-ECMP
1. Local ethernet segments are configured in zebra by attaching a local-es-id and sys-mac to a access interface - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ! interface hostbond1 evpn mh es-id 1 evpn mh es-sys-mac 00:00:00:00:01:11 ! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This info is then sent to BGP and used for the generation of EAD-per-ES routes. 2. Access VLANs associated with an (ES) access port are translated into ES-EVI objects and sent to BGP. This is used by BGP for the generation of EAD-EVI routes. 3. Remote ESs are imported by BGP and sent to zebra. A list of VTEPs is maintained per-remote ES in zebra. This list is used for the creation of the L2-NHG that is used for forwarding traffic. 4. MAC entries with a non-zero ESI destination use the L2-NHG associated with the ESI for forwarding traffic over the VxLAN overlay. Please see zebra_evpn_mh.h for the datastruct organization details. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan_private.h')
-rw-r--r--zebra/zebra_vxlan_private.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h
index 806611c50e..a9f62fde10 100644
--- a/zebra/zebra_vxlan_private.h
+++ b/zebra/zebra_vxlan_private.h
@@ -62,6 +62,9 @@ struct zebra_vtep_t_ {
struct zebra_vtep_t_ *prev;
};
+RB_HEAD(zebra_es_evi_rb_head, zebra_evpn_es_evi);
+RB_PROTOTYPE(zebra_es_evi_rb_head, zebra_evpn_es_evi, rb_node,
+ zebra_es_evi_rb_cmp);
/*
* VNI hash table
@@ -73,6 +76,10 @@ struct zebra_vni_t_ {
/* VNI - key */
vni_t vni;
+ /* ES flags */
+ uint32_t flags;
+#define ZVNI_READY_FOR_BGP (1 << 0) /* ready to be sent to BGP */
+
/* Flag for advertising gw macip */
uint8_t advertise_gw_macip;
@@ -102,6 +109,12 @@ struct zebra_vni_t_ {
/* List of local or remote neighbors (MAC+IP) */
struct hash *neigh_table;
+
+ /* RB tree of ES-EVIs */
+ struct zebra_es_evi_rb_head es_evi_rb_tree;
+
+ /* List of local ESs */
+ struct list *local_es_evi_list;
};
/* L3 VNI hash table */
@@ -316,6 +329,9 @@ struct zebra_mac_t_ {
struct in_addr r_vtep_ip;
} fwd_info;
+ /* Local or remote ES */
+ struct zebra_evpn_es *es;
+
/* Mobility sequence numbers associated with this entry. */
uint32_t rem_seq;
uint32_t loc_seq;
@@ -391,6 +407,9 @@ struct zebra_neigh_t_ {
/* MAC address. */
struct ethaddr emac;
+ /* Back pointer to MAC. Only applicable to hosts in a L2-VNI. */
+ zebra_mac_t *mac;
+
/* Underlying interface. */
ifindex_t ifindex;
@@ -507,4 +526,6 @@ typedef struct zebra_vxlan_sg_ {
uint32_t ref_cnt;
} zebra_vxlan_sg_t;
+extern zebra_vni_t *zvni_lookup(vni_t vni);
+
#endif /* _ZEBRA_VXLAN_PRIVATE_H */