diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-05-08 16:41:43 -0700 | 
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-10-26 10:32:49 -0700 | 
| commit | 1103c5c6cd2a2219a2c6b116229a3b96540ed80d (patch) | |
| tree | 704e997ffe864c97f557101e73dc7bf22b018b27 /zebra/zebra_evpn_mh.h | |
| parent | 74e2bd891d85d68250ce368cb538fb5404867238 (diff) | |
zebra: changes to run DF election
1. DF preference is configurable per-ES
!
interface hostbond1
 evpn mh es-df-pref 100 >>>>>>>>>>>
 evpn mh es-id 1
 evpn mh es-sys-mac 00:00:00:00:01:11
!
2. This parameter is sent to BGP and advertised via the ESR.
3. The peer-ESs' DF params are sent to zebra (by BGP) and used
for running the DF election.
4. If the local VTEP becomes non-DF on an ES a block filter is
programmed in the dataplane to drop de-capsulated BUM packets
destined to that ES.
Sample output
=============
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh evpn es
Type: L local, R remote, N non-DF
ESI                            Type ES-IF                 VTEPs
03:00:00:00:00:01:11:00:00:01  LRN  hostbond1             27.0.0.16
03:00:00:00:00:01:22:00:00:02  LR   hostbond2             27.0.0.16
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
torm-11# sh evpn es 03:00:00:00:00:01:11:00:00:01
ESI: 03:00:00:00:00:01:11:00:00:01
 Type: Local,Remote
 Interface: hostbond1
 State: up
 Ready for BGP: yes
 VNI Count: 10
 MAC Count: 2
 DF: status: non-df preference: 100 >>>>>>>>
 Nexthop group: 0x2000001
 VTEPs:
     27.0.0.16 df_alg: preference df_pref: 32767 nh: 0x100000d >>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_evpn_mh.h')
| -rw-r--r-- | zebra/zebra_evpn_mh.h | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h index 72b7f9b675..a3ed09209d 100644 --- a/zebra/zebra_evpn_mh.h +++ b/zebra/zebra_evpn_mh.h @@ -51,6 +51,10 @@ struct zebra_evpn_es {  #define ZEBRA_EVPNES_OPER_UP       (1 << 2) /* es->ifp is oper-up */  #define ZEBRA_EVPNES_READY_FOR_BGP (1 << 3) /* ready to be sent to BGP */  #define ZEBRA_EVPNES_NHG_ACTIVE    (1 << 4) /* NHG has been installed */ +/* This flag is only applicable to local ESs and signifies that this + * VTEP is not the DF + */ +#define ZEBRA_EVPNES_NON_DF (1 << 5)  	/* memory used for adding the es to zmh_info->es_rb_tree */  	RB_ENTRY(zebra_evpn_es) rb_node; @@ -74,6 +78,11 @@ struct zebra_evpn_es {  	/* Nexthop group id */  	uint32_t nhg_id; + +	/* Preference config for BUM-DF election. Sent to BGP and +	 * advertised via the ESR +	 */ +	uint16_t df_pref;  };  RB_HEAD(zebra_es_rb_head, zebra_evpn_es);  RB_PROTOTYPE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp); @@ -115,12 +124,20 @@ struct zebra_evpn_es_vtep {  	struct zebra_evpn_es *es; /* parent ES */  	struct in_addr vtep_ip; +	uint32_t flags; +	/* Rxed Type-4 route from this VTEP */ +#define ZEBRA_EVPNES_VTEP_RXED_ESR (1 << 0) +  	/* memory used for adding the entry to es->es_vtep_list */  	struct listnode es_listnode;  	/* MAC nexthop */  	uint32_t nh_id; +	/* Parameters for DF election */ +	uint8_t df_alg; +	uint32_t df_pref; +  	/* XXX - maintain a backpointer to zebra_vtep_t */  };  | 
