zebra: Convert to struct zebra_evpn as per our internal standard

We do not use typedef's to talk about structures as per our standard.
Fixing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2021-08-19 16:08:53 -04:00
parent c2ad0a0d40
commit f6371c343a
11 changed files with 302 additions and 300 deletions

View File

@ -68,7 +68,7 @@ static const struct message zvtep_flood_str[] = {
{0}
};
int advertise_gw_macip_enabled(zebra_evpn_t *zevpn)
int advertise_gw_macip_enabled(struct zebra_evpn *zevpn)
{
struct zebra_vrf *zvrf;
@ -82,7 +82,7 @@ int advertise_gw_macip_enabled(zebra_evpn_t *zevpn)
return 0;
}
int advertise_svi_macip_enabled(zebra_evpn_t *zevpn)
int advertise_svi_macip_enabled(struct zebra_evpn *zevpn)
{
struct zebra_vrf *zvrf;
@ -99,7 +99,7 @@ int advertise_svi_macip_enabled(zebra_evpn_t *zevpn)
/*
* Print a specific EVPN entry.
*/
void zebra_evpn_print(zebra_evpn_t *zevpn, void **ctxt)
void zebra_evpn_print(struct zebra_evpn *zevpn, void **ctxt)
{
struct vty *vty;
zebra_vtep_t *zvtep;
@ -217,7 +217,7 @@ void zebra_evpn_print(zebra_evpn_t *zevpn, void **ctxt)
void zebra_evpn_print_hash(struct hash_bucket *bucket, void *ctxt[])
{
struct vty *vty;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_vtep_t *zvtep;
uint32_t num_vteps = 0;
uint32_t num_macs = 0;
@ -231,7 +231,7 @@ void zebra_evpn_print_hash(struct hash_bucket *bucket, void *ctxt[])
vty = ctxt[0];
json = ctxt[1];
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
zvtep = zevpn->vteps;
while (zvtep) {
@ -283,7 +283,7 @@ void zebra_evpn_print_hash(struct hash_bucket *bucket, void *ctxt[])
void zebra_evpn_print_hash_detail(struct hash_bucket *bucket, void *data)
{
struct vty *vty;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
json_object *json_array = NULL;
bool use_json = false;
struct zebra_evpn_show *zes = data;
@ -292,7 +292,7 @@ void zebra_evpn_print_hash_detail(struct hash_bucket *bucket, void *data)
json_array = zes->json;
use_json = zes->use_json;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
zebra_vxlan_print_vni(vty, zes->zvrf, zevpn->vni, use_json, json_array);
@ -300,7 +300,8 @@ void zebra_evpn_print_hash_detail(struct hash_bucket *bucket, void *data)
vty_out(vty, "\n");
}
int zebra_evpn_del_macip_for_intf(struct interface *ifp, zebra_evpn_t *zevpn)
int zebra_evpn_del_macip_for_intf(struct interface *ifp,
struct zebra_evpn *zevpn)
{
struct listnode *cnode = NULL, *cnnode = NULL;
struct connected *c = NULL;
@ -333,7 +334,8 @@ int zebra_evpn_del_macip_for_intf(struct interface *ifp, zebra_evpn_t *zevpn)
return 0;
}
int zebra_evpn_add_macip_for_intf(struct interface *ifp, zebra_evpn_t *zevpn)
int zebra_evpn_add_macip_for_intf(struct interface *ifp,
struct zebra_evpn *zevpn)
{
struct listnode *cnode = NULL, *cnnode = NULL;
struct connected *c = NULL;
@ -397,7 +399,7 @@ static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p,
return zserv_send_message(client, s);
}
int zebra_evpn_advertise_subnet(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_advertise_subnet(struct zebra_evpn *zevpn, struct interface *ifp,
int advertise)
{
struct listnode *cnode = NULL, *cnnode = NULL;
@ -429,7 +431,7 @@ int zebra_evpn_advertise_subnet(zebra_evpn_t *zevpn, struct interface *ifp,
/*
* zebra_evpn_gw_macip_add_to_client
*/
int zebra_evpn_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_gw_macip_add(struct interface *ifp, struct zebra_evpn *zevpn,
struct ethaddr *macaddr, struct ipaddr *ip)
{
zebra_mac_t *mac = NULL;
@ -453,7 +455,7 @@ int zebra_evpn_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
/*
* zebra_evpn_gw_macip_del_from_client
*/
int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_gw_macip_del(struct interface *ifp, struct zebra_evpn *zevpn,
struct ipaddr *ip)
{
zebra_neigh_t *n = NULL;
@ -502,7 +504,7 @@ int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn,
void zebra_evpn_gw_macip_del_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan zl2_info;
struct interface *vlan_if = NULL;
@ -510,7 +512,7 @@ void zebra_evpn_gw_macip_del_for_evpn_hash(struct hash_bucket *bucket,
struct interface *ifp;
/* Add primary SVI MAC*/
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
/* Global (Zvrf) advertise-default-gw is disabled,
* but zevpn advertise-default-gw is enabled
@ -552,14 +554,14 @@ void zebra_evpn_gw_macip_del_for_evpn_hash(struct hash_bucket *bucket,
void zebra_evpn_gw_macip_add_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan zl2_info;
struct interface *vlan_if = NULL;
struct interface *vrr_if = NULL;
struct interface *ifp = NULL;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
ifp = zevpn->vxlan_if;
if (!ifp)
@ -594,14 +596,14 @@ void zebra_evpn_gw_macip_add_for_evpn_hash(struct hash_bucket *bucket,
void zebra_evpn_svi_macip_del_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan zl2_info;
struct interface *vlan_if = NULL;
struct interface *ifp;
/* Add primary SVI MAC*/
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
if (!zevpn)
return;
@ -644,8 +646,8 @@ static int zebra_evpn_map_vlan_ns(struct ns *ns,
struct zebra_ns *zns = ns->info;
struct route_node *rn;
struct interface *br_if;
zebra_evpn_t **p_zevpn = (zebra_evpn_t **)_p_zevpn;
zebra_evpn_t *zevpn;
struct zebra_evpn **p_zevpn = (struct zebra_evpn **)_p_zevpn;
struct zebra_evpn *zevpn;
struct interface *tmp_if = NULL;
struct zebra_if *zif;
struct zebra_l2info_vxlan *vxl = NULL;
@ -695,13 +697,13 @@ static int zebra_evpn_map_vlan_ns(struct ns *ns,
* Map port or (port, VLAN) to an EVPN. This is invoked upon getting MAC
* notifications, to see if they are of interest.
*/
zebra_evpn_t *zebra_evpn_map_vlan(struct interface *ifp,
struct interface *br_if, vlanid_t vid)
struct zebra_evpn *zebra_evpn_map_vlan(struct interface *ifp,
struct interface *br_if, vlanid_t vid)
{
struct zebra_if *zif;
struct zebra_l2info_bridge *br;
zebra_evpn_t **p_zevpn;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn **p_zevpn;
struct zebra_evpn *zevpn = NULL;
struct zebra_from_svi_param in_param;
/* Determine if bridge is VLAN-aware or not */
@ -727,8 +729,8 @@ static int zebra_evpn_from_svi_ns(struct ns *ns,
struct zebra_ns *zns = ns->info;
struct route_node *rn;
struct interface *br_if;
zebra_evpn_t **p_zevpn = (zebra_evpn_t **)_p_zevpn;
zebra_evpn_t *zevpn;
struct zebra_evpn **p_zevpn = (struct zebra_evpn **)_p_zevpn;
struct zebra_evpn *zevpn;
struct interface *tmp_if = NULL;
struct zebra_if *zif;
struct zebra_l2info_vxlan *vxl = NULL;
@ -777,12 +779,12 @@ static int zebra_evpn_from_svi_ns(struct ns *ns,
* Map SVI and associated bridge to an EVPN. This is invoked upon getting
* neighbor notifications, to see if they are of interest.
*/
zebra_evpn_t *zebra_evpn_from_svi(struct interface *ifp,
struct interface *br_if)
struct zebra_evpn *zebra_evpn_from_svi(struct interface *ifp,
struct interface *br_if)
{
struct zebra_l2info_bridge *br;
zebra_evpn_t *zevpn = NULL;
zebra_evpn_t **p_zevpn;
struct zebra_evpn *zevpn = NULL;
struct zebra_evpn **p_zevpn;
struct zebra_if *zif;
struct zebra_from_svi_param in_param;
@ -910,7 +912,7 @@ void zebra_evpn_install_mac_hash(struct hash_bucket *bucket, void *ctxt)
/*
* Read and populate local MACs and neighbors corresponding to this EVPN.
*/
void zebra_evpn_read_mac_neigh(zebra_evpn_t *zevpn, struct interface *ifp)
void zebra_evpn_read_mac_neigh(struct zebra_evpn *zevpn, struct interface *ifp)
{
struct zebra_ns *zns;
struct zebra_vrf *zvrf;
@ -959,7 +961,7 @@ void zebra_evpn_read_mac_neigh(zebra_evpn_t *zevpn, struct interface *ifp)
*/
unsigned int zebra_evpn_hash_keymake(const void *p)
{
const zebra_evpn_t *zevpn = p;
const struct zebra_evpn *zevpn = p;
return (jhash_1word(zevpn->vni, 0));
}
@ -969,16 +971,16 @@ unsigned int zebra_evpn_hash_keymake(const void *p)
*/
bool zebra_evpn_hash_cmp(const void *p1, const void *p2)
{
const zebra_evpn_t *zevpn1 = p1;
const zebra_evpn_t *zevpn2 = p2;
const struct zebra_evpn *zevpn1 = p1;
const struct zebra_evpn *zevpn2 = p2;
return (zevpn1->vni == zevpn2->vni);
}
int zebra_evpn_list_cmp(void *p1, void *p2)
{
const zebra_evpn_t *zevpn1 = p1;
const zebra_evpn_t *zevpn2 = p2;
const struct zebra_evpn *zevpn1 = p1;
const struct zebra_evpn *zevpn2 = p2;
if (zevpn1->vni == zevpn2->vni)
return 0;
@ -990,10 +992,10 @@ int zebra_evpn_list_cmp(void *p1, void *p2)
*/
void *zebra_evpn_alloc(void *p)
{
const zebra_evpn_t *tmp_vni = p;
zebra_evpn_t *zevpn;
const struct zebra_evpn *tmp_vni = p;
struct zebra_evpn *zevpn;
zevpn = XCALLOC(MTYPE_ZEVPN, sizeof(zebra_evpn_t));
zevpn = XCALLOC(MTYPE_ZEVPN, sizeof(struct zebra_evpn));
zevpn->vni = tmp_vni->vni;
return ((void *)zevpn);
}
@ -1001,15 +1003,15 @@ void *zebra_evpn_alloc(void *p)
/*
* Look up EVPN hash entry.
*/
zebra_evpn_t *zebra_evpn_lookup(vni_t vni)
struct zebra_evpn *zebra_evpn_lookup(vni_t vni)
{
struct zebra_vrf *zvrf;
zebra_evpn_t tmp_vni;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn tmp_vni;
struct zebra_evpn *zevpn = NULL;
zvrf = zebra_vrf_get_evpn();
assert(zvrf);
memset(&tmp_vni, 0, sizeof(zebra_evpn_t));
memset(&tmp_vni, 0, sizeof(struct zebra_evpn));
tmp_vni.vni = vni;
zevpn = hash_lookup(zvrf->evpn_table, &tmp_vni);
@ -1019,16 +1021,16 @@ zebra_evpn_t *zebra_evpn_lookup(vni_t vni)
/*
* Add EVPN hash entry.
*/
zebra_evpn_t *zebra_evpn_add(vni_t vni)
struct zebra_evpn *zebra_evpn_add(vni_t vni)
{
char buffer[80];
struct zebra_vrf *zvrf;
zebra_evpn_t tmp_zevpn;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn tmp_zevpn;
struct zebra_evpn *zevpn = NULL;
zvrf = zebra_vrf_get_evpn();
assert(zvrf);
memset(&tmp_zevpn, 0, sizeof(zebra_evpn_t));
memset(&tmp_zevpn, 0, sizeof(struct zebra_evpn));
tmp_zevpn.vni = vni;
zevpn = hash_get(zvrf->evpn_table, &tmp_zevpn, zebra_evpn_alloc);
assert(zevpn);
@ -1050,10 +1052,10 @@ zebra_evpn_t *zebra_evpn_add(vni_t vni)
/*
* Delete EVPN hash entry.
*/
int zebra_evpn_del(zebra_evpn_t *zevpn)
int zebra_evpn_del(struct zebra_evpn *zevpn)
{
struct zebra_vrf *zvrf;
zebra_evpn_t *tmp_zevpn;
struct zebra_evpn *tmp_zevpn;
zvrf = zebra_vrf_get_evpn();
assert(zvrf);
@ -1083,7 +1085,7 @@ int zebra_evpn_del(zebra_evpn_t *zevpn)
/*
* Inform BGP about local EVPN addition.
*/
int zebra_evpn_send_add_to_client(zebra_evpn_t *zevpn)
int zebra_evpn_send_add_to_client(struct zebra_evpn *zevpn)
{
struct zserv *client;
struct stream *s;
@ -1133,7 +1135,7 @@ int zebra_evpn_send_add_to_client(zebra_evpn_t *zevpn)
/*
* Inform BGP about local EVPN deletion.
*/
int zebra_evpn_send_del_to_client(zebra_evpn_t *zevpn)
int zebra_evpn_send_del_to_client(struct zebra_evpn *zevpn)
{
struct zserv *client;
struct stream *s;
@ -1177,7 +1179,8 @@ static int zebra_evpn_vtep_match(struct in_addr *vtep_ip, zebra_vtep_t *zvtep)
/*
* Locate remote VTEP in EVPN hash table.
*/
zebra_vtep_t *zebra_evpn_vtep_find(zebra_evpn_t *zevpn, struct in_addr *vtep_ip)
zebra_vtep_t *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
struct in_addr *vtep_ip)
{
zebra_vtep_t *zvtep;
@ -1195,8 +1198,8 @@ zebra_vtep_t *zebra_evpn_vtep_find(zebra_evpn_t *zevpn, struct in_addr *vtep_ip)
/*
* Add remote VTEP to EVPN hash table.
*/
zebra_vtep_t *zebra_evpn_vtep_add(zebra_evpn_t *zevpn, struct in_addr *vtep_ip,
int flood_control)
zebra_vtep_t *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
struct in_addr *vtep_ip, int flood_control)
{
zebra_vtep_t *zvtep;
@ -1217,7 +1220,7 @@ zebra_vtep_t *zebra_evpn_vtep_add(zebra_evpn_t *zevpn, struct in_addr *vtep_ip,
/*
* Remove remote VTEP from EVPN hash table.
*/
int zebra_evpn_vtep_del(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep)
int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep)
{
if (zvtep->next)
zvtep->next->prev = zvtep->prev;
@ -1236,7 +1239,7 @@ int zebra_evpn_vtep_del(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep)
* Delete all remote VTEPs for this EVPN (upon VNI delete). Also
* uninstall from kernel if asked to.
*/
int zebra_evpn_vtep_del_all(zebra_evpn_t *zevpn, int uninstall)
int zebra_evpn_vtep_del_all(struct zebra_evpn *zevpn, int uninstall)
{
zebra_vtep_t *zvtep, *zvtep_next;
@ -1257,7 +1260,7 @@ int zebra_evpn_vtep_del_all(zebra_evpn_t *zevpn, int uninstall)
* Install remote VTEP into the kernel if the remote VTEP has asked
* for head-end-replication.
*/
int zebra_evpn_vtep_install(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep)
int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep)
{
if (is_vxlan_flooding_head_end() &&
(zvtep->flood_control == VXLAN_FLOOD_HEAD_END_REPL)) {
@ -1273,7 +1276,7 @@ int zebra_evpn_vtep_install(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep)
/*
* Uninstall remote VTEP from the kernel.
*/
int zebra_evpn_vtep_uninstall(zebra_evpn_t *zevpn, struct in_addr *vtep_ip)
int zebra_evpn_vtep_uninstall(struct zebra_evpn *zevpn, struct in_addr *vtep_ip)
{
if (!zevpn->vxlan_if) {
zlog_debug("VNI %u hash %p couldn't be uninstalled - no intf",
@ -1295,10 +1298,10 @@ int zebra_evpn_vtep_uninstall(zebra_evpn_t *zevpn, struct in_addr *vtep_ip)
void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
void *zvrf)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_vtep_t *zvtep;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
if (!zevpn)
return;
@ -1315,9 +1318,9 @@ void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
*/
void zebra_evpn_cleanup_all(struct hash_bucket *bucket, void *arg)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
/* Free up all neighbors and MACs, if any. */
zebra_evpn_neigh_del_all(zevpn, 1, 0, DEL_ALL_NEIGH);
@ -1330,7 +1333,7 @@ void zebra_evpn_cleanup_all(struct hash_bucket *bucket, void *arg)
zebra_evpn_del(zevpn);
}
static void zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn,
static void zebra_evpn_process_sync_macip_add(struct zebra_evpn *zevpn,
const struct ethaddr *macaddr,
uint16_t ipa_len,
const struct ipaddr *ipaddr,
@ -1387,7 +1390,7 @@ void zebra_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
uint8_t flags, uint32_t seq,
struct in_addr vtep_ip, const esi_t *esi)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_vtep_t *zvtep;
zebra_mac_t *mac = NULL;
struct interface *ifp = NULL;
@ -1464,7 +1467,7 @@ void zebra_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
uint16_t ipa_len, const struct ipaddr *ipaddr,
struct in_addr vtep_ip)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_mac_t *mac = NULL;
zebra_neigh_t *n = NULL;
struct interface *ifp = NULL;
@ -1558,9 +1561,9 @@ void zebra_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
/************************** EVPN BGP config management ************************/
void zebra_evpn_cfg_cleanup(struct hash_bucket *bucket, void *ctxt)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
zevpn->advertise_gw_macip = 0;
zevpn->advertise_svi_macip = 0;
zevpn->advertise_subnet = 0;

View File

@ -38,7 +38,6 @@
extern "C" {
#endif
typedef struct zebra_evpn_t_ zebra_evpn_t;
typedef struct zebra_vtep_t_ zebra_vtep_t;
RB_HEAD(zebra_es_evi_rb_head, zebra_evpn_es_evi);
@ -78,7 +77,7 @@ struct zebra_vtep_t_ {
* Contains information pertaining to a VNI:
* - the list of remote VTEPs (with this VNI)
*/
struct zebra_evpn_t_ {
struct zebra_evpn {
/* VNI - key */
vni_t vni;
@ -137,7 +136,7 @@ struct zebra_from_svi_param {
struct interface *zvni_map_to_svi(vlanid_t vid, struct interface *br_if);
static inline struct interface *zevpn_map_to_svi(zebra_evpn_t *zevpn)
static inline struct interface *zevpn_map_to_svi(struct zebra_evpn *zevpn)
{
struct interface *ifp;
struct zebra_if *zif = NULL;
@ -157,18 +156,20 @@ static inline struct interface *zevpn_map_to_svi(zebra_evpn_t *zevpn)
return zvni_map_to_svi(zl2_info.access_vlan, zif->brslave_info.br_if);
}
int advertise_gw_macip_enabled(zebra_evpn_t *zevpn);
int advertise_svi_macip_enabled(zebra_evpn_t *zevpn);
void zebra_evpn_print(zebra_evpn_t *zevpn, void **ctxt);
int advertise_gw_macip_enabled(struct zebra_evpn *zevpn);
int advertise_svi_macip_enabled(struct zebra_evpn *zevpn);
void zebra_evpn_print(struct zebra_evpn *zevpn, void **ctxt);
void zebra_evpn_print_hash(struct hash_bucket *bucket, void *ctxt[]);
void zebra_evpn_print_hash_detail(struct hash_bucket *bucket, void *data);
int zebra_evpn_add_macip_for_intf(struct interface *ifp, zebra_evpn_t *zevpn);
int zebra_evpn_del_macip_for_intf(struct interface *ifp, zebra_evpn_t *zevpn);
int zebra_evpn_advertise_subnet(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_add_macip_for_intf(struct interface *ifp,
struct zebra_evpn *zevpn);
int zebra_evpn_del_macip_for_intf(struct interface *ifp,
struct zebra_evpn *zevpn);
int zebra_evpn_advertise_subnet(struct zebra_evpn *zevpn, struct interface *ifp,
int advertise);
int zebra_evpn_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_gw_macip_add(struct interface *ifp, struct zebra_evpn *zevpn,
struct ethaddr *macaddr, struct ipaddr *ip);
int zebra_evpn_gw_macip_del(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_gw_macip_del(struct interface *ifp, struct zebra_evpn *zevpn,
struct ipaddr *ip);
void zebra_evpn_gw_macip_del_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt);
@ -176,31 +177,32 @@ void zebra_evpn_gw_macip_add_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt);
void zebra_evpn_svi_macip_del_for_evpn_hash(struct hash_bucket *bucket,
void *ctxt);
zebra_evpn_t *zebra_evpn_map_vlan(struct interface *ifp,
struct interface *br_if, vlanid_t vid);
zebra_evpn_t *zebra_evpn_from_svi(struct interface *ifp,
struct interface *br_if);
struct zebra_evpn *zebra_evpn_map_vlan(struct interface *ifp,
struct interface *br_if, vlanid_t vid);
struct zebra_evpn *zebra_evpn_from_svi(struct interface *ifp,
struct interface *br_if);
struct interface *zebra_evpn_map_to_macvlan(struct interface *br_if,
struct interface *svi_if);
void zebra_evpn_install_mac_hash(struct hash_bucket *bucket, void *ctxt);
void zebra_evpn_read_mac_neigh(zebra_evpn_t *zevpn, struct interface *ifp);
void zebra_evpn_read_mac_neigh(struct zebra_evpn *zevpn, struct interface *ifp);
unsigned int zebra_evpn_hash_keymake(const void *p);
bool zebra_evpn_hash_cmp(const void *p1, const void *p2);
int zebra_evpn_list_cmp(void *p1, void *p2);
void *zebra_evpn_alloc(void *p);
zebra_evpn_t *zebra_evpn_lookup(vni_t vni);
zebra_evpn_t *zebra_evpn_add(vni_t vni);
int zebra_evpn_del(zebra_evpn_t *zevpn);
int zebra_evpn_send_add_to_client(zebra_evpn_t *zevpn);
int zebra_evpn_send_del_to_client(zebra_evpn_t *zevpn);
zebra_vtep_t *zebra_evpn_vtep_find(zebra_evpn_t *zevpn,
struct zebra_evpn *zebra_evpn_lookup(vni_t vni);
struct zebra_evpn *zebra_evpn_add(vni_t vni);
int zebra_evpn_del(struct zebra_evpn *zevpn);
int zebra_evpn_send_add_to_client(struct zebra_evpn *zevpn);
int zebra_evpn_send_del_to_client(struct zebra_evpn *zevpn);
zebra_vtep_t *zebra_evpn_vtep_find(struct zebra_evpn *zevpn,
struct in_addr *vtep_ip);
zebra_vtep_t *zebra_evpn_vtep_add(zebra_evpn_t *zevpn, struct in_addr *vtep_ip,
int flood_control);
int zebra_evpn_vtep_del(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep);
int zebra_evpn_vtep_del_all(zebra_evpn_t *zevpn, int uninstall);
int zebra_evpn_vtep_install(zebra_evpn_t *zevpn, zebra_vtep_t *zvtep);
int zebra_evpn_vtep_uninstall(zebra_evpn_t *zevpn, struct in_addr *vtep_ip);
zebra_vtep_t *zebra_evpn_vtep_add(struct zebra_evpn *zevpn,
struct in_addr *vtep_ip, int flood_control);
int zebra_evpn_vtep_del(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep);
int zebra_evpn_vtep_del_all(struct zebra_evpn *zevpn, int uninstall);
int zebra_evpn_vtep_install(struct zebra_evpn *zevpn, zebra_vtep_t *zvtep);
int zebra_evpn_vtep_uninstall(struct zebra_evpn *zevpn,
struct in_addr *vtep_ip);
void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
void *zvrf);
void zebra_evpn_cleanup_all(struct hash_bucket *bucket, void *arg);

View File

@ -47,7 +47,7 @@ DEFINE_MTYPE_STATIC(ZEBRA, MAC, "EVPN MAC");
* Return number of valid MACs in an EVPN's MAC hash table - all
* remote MACs and non-internal (auto) local MACs count.
*/
uint32_t num_valid_macs(zebra_evpn_t *zevpn)
uint32_t num_valid_macs(struct zebra_evpn *zevpn)
{
unsigned int i;
uint32_t num_macs = 0;
@ -71,7 +71,7 @@ uint32_t num_valid_macs(zebra_evpn_t *zevpn)
return num_macs;
}
uint32_t num_dup_detected_macs(zebra_evpn_t *zevpn)
uint32_t num_dup_detected_macs(struct zebra_evpn *zevpn)
{
unsigned int i;
uint32_t num_macs = 0;
@ -187,7 +187,7 @@ void zebra_evpn_mac_clear_fwd_info(zebra_mac_t *zmac)
/*
* Install remote MAC into the forwarding plane.
*/
int zebra_evpn_rem_mac_install(zebra_evpn_t *zevpn, zebra_mac_t *mac,
int zebra_evpn_rem_mac_install(struct zebra_evpn *zevpn, zebra_mac_t *mac,
bool was_static)
{
const struct zebra_if *zif, *br_zif;
@ -243,7 +243,7 @@ int zebra_evpn_rem_mac_install(zebra_evpn_t *zevpn, zebra_mac_t *mac,
/*
* Uninstall remote MAC from the forwarding plane.
*/
int zebra_evpn_rem_mac_uninstall(zebra_evpn_t *zevpn, zebra_mac_t *mac,
int zebra_evpn_rem_mac_uninstall(struct zebra_evpn *zevpn, zebra_mac_t *mac,
bool force)
{
const struct zebra_if *zif, *br_zif;
@ -296,7 +296,7 @@ int zebra_evpn_rem_mac_uninstall(zebra_evpn_t *zevpn, zebra_mac_t *mac,
* Decrement neighbor refcount of MAC; uninstall and free it if
* appropriate.
*/
void zebra_evpn_deref_ip2mac(zebra_evpn_t *zevpn, zebra_mac_t *mac)
void zebra_evpn_deref_ip2mac(struct zebra_evpn *zevpn, zebra_mac_t *mac)
{
if (!CHECK_FLAG(mac->flags, ZEBRA_MAC_AUTO))
return;
@ -380,7 +380,7 @@ static int zebra_evpn_dad_mac_auto_recovery_exp(struct thread *t)
{
struct zebra_vrf *zvrf = NULL;
zebra_mac_t *mac = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct listnode *node = NULL;
zebra_neigh_t *nbr = NULL;
@ -1096,7 +1096,7 @@ static void *zebra_evpn_mac_alloc(void *p)
/*
* Add MAC entry.
*/
zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevpn,
zebra_mac_t *zebra_evpn_mac_add(struct zebra_evpn *zevpn,
const struct ethaddr *macaddr)
{
zebra_mac_t tmp_mac;
@ -1128,7 +1128,7 @@ zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevpn,
/*
* Delete MAC entry.
*/
int zebra_evpn_mac_del(zebra_evpn_t *zevpn, zebra_mac_t *mac)
int zebra_evpn_mac_del(struct zebra_evpn *zevpn, zebra_mac_t *mac)
{
zebra_mac_t *tmp_mac;
@ -1236,8 +1236,8 @@ static void zebra_evpn_mac_del_hash_entry(struct hash_bucket *bucket, void *arg)
/*
* Delete all MAC entries for this EVPN.
*/
void zebra_evpn_mac_del_all(zebra_evpn_t *zevpn, int uninstall, int upd_client,
uint32_t flags)
void zebra_evpn_mac_del_all(struct zebra_evpn *zevpn, int uninstall,
int upd_client, uint32_t flags)
{
struct mac_walk_ctx wctx;
@ -1256,7 +1256,7 @@ void zebra_evpn_mac_del_all(zebra_evpn_t *zevpn, int uninstall, int upd_client,
/*
* Look up MAC hash entry.
*/
zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevpn,
zebra_mac_t *zebra_evpn_mac_lookup(struct zebra_evpn *zevpn,
const struct ethaddr *mac)
{
zebra_mac_t tmp;
@ -1336,7 +1336,7 @@ int zebra_evpn_sync_mac_dp_install(zebra_mac_t *mac, bool set_inactive,
struct interface *ifp;
bool sticky;
bool set_static;
zebra_evpn_t *zevpn = mac->zevpn;
struct zebra_evpn *zevpn = mac->zevpn;
vlanid_t vid;
struct zebra_if *zif;
struct interface *br_ifp;
@ -1563,7 +1563,7 @@ void zebra_evpn_sync_mac_del(zebra_mac_t *mac)
__func__);
}
static inline bool zebra_evpn_mac_is_bgp_seq_ok(zebra_evpn_t *zevpn,
static inline bool zebra_evpn_mac_is_bgp_seq_ok(struct zebra_evpn *zevpn,
zebra_mac_t *mac, uint32_t seq,
uint16_t ipa_len,
const struct ipaddr *ipaddr,
@ -1631,9 +1631,9 @@ static inline bool zebra_evpn_mac_is_bgp_seq_ok(zebra_evpn_t *zevpn,
}
zebra_mac_t *zebra_evpn_proc_sync_mac_update(
zebra_evpn_t *zevpn, const struct ethaddr *macaddr, uint16_t ipa_len,
const struct ipaddr *ipaddr, uint8_t flags, uint32_t seq,
const esi_t *esi, struct sync_mac_ip_ctx *ctx)
struct zebra_evpn *zevpn, const struct ethaddr *macaddr,
uint16_t ipa_len, const struct ipaddr *ipaddr, uint8_t flags,
uint32_t seq, const esi_t *esi, struct sync_mac_ip_ctx *ctx)
{
zebra_mac_t *mac;
bool inform_bgp = false;
@ -1894,7 +1894,7 @@ static void zebra_evpn_send_mac_hash_entry_to_client(struct hash_bucket *bucket,
}
/* Iterator to Notify Local MACs of a EVPN */
void zebra_evpn_send_mac_list_to_client(zebra_evpn_t *zevpn)
void zebra_evpn_send_mac_list_to_client(struct zebra_evpn *zevpn)
{
struct mac_walk_ctx wctx;
@ -1908,7 +1908,7 @@ void zebra_evpn_send_mac_list_to_client(zebra_evpn_t *zevpn)
&wctx);
}
void zebra_evpn_rem_mac_del(zebra_evpn_t *zevpn, zebra_mac_t *mac)
void zebra_evpn_rem_mac_del(struct zebra_evpn *zevpn, zebra_mac_t *mac)
{
zebra_evpn_process_neigh_on_remote_mac_del(zevpn, mac);
/* the remote sequence number in the auto mac entry
@ -1960,13 +1960,11 @@ void zebra_evpn_print_dad_mac_hash_detail(struct hash_bucket *bucket,
zebra_evpn_print_mac_hash_detail(bucket, ctxt);
}
int zebra_evpn_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
const struct ethaddr *macaddr,
uint16_t ipa_len,
const struct ipaddr *ipaddr,
zebra_mac_t **macp, struct in_addr vtep_ip,
uint8_t flags, uint32_t seq,
const esi_t *esi)
int zebra_evpn_mac_remote_macip_add(
struct zebra_evpn *zevpn, struct zebra_vrf *zvrf,
const struct ethaddr *macaddr, uint16_t ipa_len,
const struct ipaddr *ipaddr, zebra_mac_t **macp, struct in_addr vtep_ip,
uint8_t flags, uint32_t seq, const esi_t *esi)
{
char buf1[INET6_ADDRSTRLEN];
bool sticky;
@ -2129,7 +2127,8 @@ int zebra_evpn_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
return 0;
}
int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf, zebra_evpn_t *zevpn,
int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf,
struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ethaddr *macaddr, vlanid_t vid,
bool sticky, bool local_inactive,
@ -2374,7 +2373,7 @@ int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf, zebra_evpn_t *zevpn,
return 0;
}
int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
int zebra_evpn_del_local_mac(struct zebra_evpn *zevpn, zebra_mac_t *mac,
bool clear_static)
{
bool old_bgp_ready;
@ -2450,7 +2449,7 @@ int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
return 0;
}
int zebra_evpn_mac_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_mac_gw_macip_add(struct interface *ifp, struct zebra_evpn *zevpn,
const struct ipaddr *ip, zebra_mac_t **macp,
const struct ethaddr *macaddr, vlanid_t vlan_id,
bool def_gw)
@ -2489,7 +2488,7 @@ int zebra_evpn_mac_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
return 0;
}
void zebra_evpn_mac_svi_del(struct interface *ifp, zebra_evpn_t *zevpn)
void zebra_evpn_mac_svi_del(struct interface *ifp, struct zebra_evpn *zevpn)
{
zebra_mac_t *mac;
struct ethaddr macaddr;
@ -2512,7 +2511,7 @@ void zebra_evpn_mac_svi_del(struct interface *ifp, zebra_evpn_t *zevpn)
}
}
void zebra_evpn_mac_svi_add(struct interface *ifp, zebra_evpn_t *zevpn)
void zebra_evpn_mac_svi_add(struct interface *ifp, struct zebra_evpn *zevpn)
{
zebra_mac_t *mac = NULL;
struct ethaddr macaddr;

View File

@ -88,7 +88,7 @@ struct zebra_mac_t_ {
(ZEBRA_MAC_ES_PEER_PROXY | ZEBRA_MAC_ES_PEER_ACTIVE)
/* back pointer to zevpn */
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
/* Local or remote info.
* Note: fwd_info is only relevant if mac->es is NULL.
@ -152,7 +152,7 @@ struct zebra_mac_t_ {
* Context for MAC hash walk - used by callbacks.
*/
struct mac_walk_ctx {
zebra_evpn_t *zevpn; /* EVPN hash */
struct zebra_evpn *zevpn; /* EVPN hash */
struct zebra_vrf *zvrf; /* VRF - for client notification. */
int uninstall; /* uninstall from kernel? */
int upd_client; /* uninstall from client? */
@ -222,18 +222,18 @@ static inline bool zebra_evpn_mac_in_use(zebra_mac_t *mac)
}
struct hash *zebra_mac_db_create(const char *desc);
uint32_t num_valid_macs(zebra_evpn_t *zevi);
uint32_t num_dup_detected_macs(zebra_evpn_t *zevi);
int zebra_evpn_rem_mac_uninstall(zebra_evpn_t *zevi, zebra_mac_t *mac,
uint32_t num_valid_macs(struct zebra_evpn *zevi);
uint32_t num_dup_detected_macs(struct zebra_evpn *zevi);
int zebra_evpn_rem_mac_uninstall(struct zebra_evpn *zevi, zebra_mac_t *mac,
bool force);
int zebra_evpn_rem_mac_install(zebra_evpn_t *zevi, zebra_mac_t *mac,
int zebra_evpn_rem_mac_install(struct zebra_evpn *zevi, zebra_mac_t *mac,
bool was_static);
void zebra_evpn_deref_ip2mac(zebra_evpn_t *zevi, zebra_mac_t *mac);
zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevi,
void zebra_evpn_deref_ip2mac(struct zebra_evpn *zevi, zebra_mac_t *mac);
zebra_mac_t *zebra_evpn_mac_lookup(struct zebra_evpn *zevi,
const struct ethaddr *mac);
zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevi,
zebra_mac_t *zebra_evpn_mac_add(struct zebra_evpn *zevi,
const struct ethaddr *macaddr);
int zebra_evpn_mac_del(zebra_evpn_t *zevi, zebra_mac_t *mac);
int zebra_evpn_mac_del(struct zebra_evpn *zevi, zebra_mac_t *mac);
int zebra_evpn_macip_send_msg_to_client(uint32_t id,
const struct ethaddr *macaddr,
const struct ipaddr *ip, uint8_t flags,
@ -247,44 +247,43 @@ int zebra_evpn_sync_mac_dp_install(zebra_mac_t *mac, bool set_inactive,
void zebra_evpn_mac_send_add_del_to_client(zebra_mac_t *mac, bool old_bgp_ready,
bool new_bgp_ready);
void zebra_evpn_mac_del_all(zebra_evpn_t *zevi, int uninstall, int upd_client,
uint32_t flags);
void zebra_evpn_mac_del_all(struct zebra_evpn *zevi, int uninstall,
int upd_client, uint32_t flags);
int zebra_evpn_mac_send_add_to_client(vni_t vni, const struct ethaddr *macaddr,
uint32_t mac_flags, uint32_t seq,
struct zebra_evpn_es *es);
int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
uint32_t flags, bool force);
void zebra_evpn_send_mac_list_to_client(zebra_evpn_t *zevi);
void zebra_evpn_send_mac_list_to_client(struct zebra_evpn *zevi);
zebra_mac_t *zebra_evpn_proc_sync_mac_update(
zebra_evpn_t *zevi, const struct ethaddr *macaddr, uint16_t ipa_len,
const struct ipaddr *ipaddr, uint8_t flags, uint32_t seq,
const esi_t *esi, struct sync_mac_ip_ctx *ctx);
struct zebra_evpn *zevi, const struct ethaddr *macaddr,
uint16_t ipa_len, const struct ipaddr *ipaddr, uint8_t flags,
uint32_t seq, const esi_t *esi, struct sync_mac_ip_ctx *ctx);
void zebra_evpn_sync_mac_del(zebra_mac_t *mac);
void zebra_evpn_rem_mac_del(zebra_evpn_t *zevi, zebra_mac_t *mac);
void zebra_evpn_rem_mac_del(struct zebra_evpn *zevi, zebra_mac_t *mac);
void zebra_evpn_print_dad_mac_hash(struct hash_bucket *bucket, void *ctxt);
void zebra_evpn_print_dad_mac_hash_detail(struct hash_bucket *bucket,
void *ctxt);
int zebra_evpn_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
const struct ethaddr *macaddr,
uint16_t ipa_len,
const struct ipaddr *ipaddr,
zebra_mac_t **macp, struct in_addr vtep_ip,
uint8_t flags, uint32_t seq,
const esi_t *esi);
int zebra_evpn_mac_remote_macip_add(
struct zebra_evpn *zevpn, struct zebra_vrf *zvrf,
const struct ethaddr *macaddr, uint16_t ipa_len,
const struct ipaddr *ipaddr, zebra_mac_t **macp, struct in_addr vtep_ip,
uint8_t flags, uint32_t seq, const esi_t *esi);
int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf, zebra_evpn_t *zevpn,
int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf,
struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ethaddr *macaddr, vlanid_t vid,
bool sticky, bool local_inactive,
bool dp_static, zebra_mac_t *mac);
int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
int zebra_evpn_del_local_mac(struct zebra_evpn *zevpn, zebra_mac_t *mac,
bool clear_static);
int zebra_evpn_mac_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
int zebra_evpn_mac_gw_macip_add(struct interface *ifp, struct zebra_evpn *zevpn,
const struct ipaddr *ip, zebra_mac_t **macp,
const struct ethaddr *macaddr, vlanid_t vlan_id,
bool def_gw);
void zebra_evpn_mac_svi_add(struct interface *ifp, zebra_evpn_t *zevpn);
void zebra_evpn_mac_svi_del(struct interface *ifp, zebra_evpn_t *zevpn);
void zebra_evpn_mac_svi_add(struct interface *ifp, struct zebra_evpn *zevpn);
void zebra_evpn_mac_svi_del(struct interface *ifp, struct zebra_evpn *zevpn);
void zebra_evpn_mac_ifp_del(struct interface *ifp);
void zebra_evpn_mac_clear_fwd_info(zebra_mac_t *zmac);

View File

@ -60,7 +60,7 @@ DEFINE_MTYPE_STATIC(ZEBRA, L2_NH, "L2 nexthop");
static void zebra_evpn_es_get_one_base_evpn(void);
static int zebra_evpn_es_evi_send_to_client(struct zebra_evpn_es *es,
zebra_evpn_t *zevpn, bool add);
struct zebra_evpn *zevpn, bool add);
static void zebra_evpn_local_es_del(struct zebra_evpn_es **esp);
static int zebra_evpn_local_es_update(struct zebra_if *zif, esi_t *esi);
static bool zebra_evpn_es_br_port_dplane_update(struct zebra_evpn_es *es,
@ -76,7 +76,7 @@ esi_t zero_esi_buf, *zero_esi = &zero_esi_buf;
/*****************************************************************************/
/* Ethernet Segment to EVI association -
* 1. The ES-EVI entry is maintained as a RB tree per L2-VNI
* (zebra_evpn_t.es_evi_rb_tree).
* (struct zebra_evpn.es_evi_rb_tree).
* 2. Each local ES-EVI entry is sent to BGP which advertises it as an
* EAD-EVI (Type-1 EVPN) route
* 3. Local ES-EVI setup is re-evaluated on the following triggers -
@ -103,7 +103,7 @@ RB_GENERATE(zebra_es_evi_rb_head, zebra_evpn_es_evi,
* tables.
*/
static struct zebra_evpn_es_evi *zebra_evpn_es_evi_new(struct zebra_evpn_es *es,
zebra_evpn_t *zevpn)
struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi *es_evi;
@ -169,7 +169,7 @@ static void zebra_evpn_es_evi_re_eval_send_to_client(
static void zebra_evpn_es_evi_free(struct zebra_evpn_es_evi *es_evi)
{
struct zebra_evpn_es *es = es_evi->es;
zebra_evpn_t *zevpn = es_evi->zevpn;
struct zebra_evpn *zevpn = es_evi->zevpn;
if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
zlog_debug("es %s evi %d free",
@ -186,8 +186,8 @@ static void zebra_evpn_es_evi_free(struct zebra_evpn_es_evi *es_evi)
}
/* find the ES-EVI in the per-L2-VNI RB tree */
static struct zebra_evpn_es_evi *zebra_evpn_es_evi_find(
struct zebra_evpn_es *es, zebra_evpn_t *zevpn)
static struct zebra_evpn_es_evi *
zebra_evpn_es_evi_find(struct zebra_evpn_es *es, struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi es_evi;
@ -220,7 +220,7 @@ static void zebra_evpn_local_es_evi_do_del(struct zebra_evpn_es_evi *es_evi)
zebra_evpn_es_evi_free(es_evi);
}
static void zebra_evpn_local_es_evi_del(struct zebra_evpn_es *es,
zebra_evpn_t *zevpn)
struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi *es_evi;
@ -231,7 +231,7 @@ static void zebra_evpn_local_es_evi_del(struct zebra_evpn_es *es,
/* Create an ES-EVI if it doesn't already exist and tell BGP */
static void zebra_evpn_local_es_evi_add(struct zebra_evpn_es *es,
zebra_evpn_t *zevpn)
struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi *es_evi;
@ -334,7 +334,7 @@ zebra_evpn_es_evi_show_entry_detail(struct vty *vty,
}
}
static void zebra_evpn_es_evi_show_one_evpn(zebra_evpn_t *zevpn,
static void zebra_evpn_es_evi_show_one_evpn(struct zebra_evpn *zevpn,
struct vty *vty,
json_object *json_array, int detail)
{
@ -358,7 +358,7 @@ struct evpn_mh_show_ctx {
static void zebra_evpn_es_evi_show_one_evpn_hash_cb(struct hash_bucket *bucket,
void *ctxt)
{
zebra_evpn_t *zevpn = (zebra_evpn_t *)bucket->data;
struct zebra_evpn *zevpn = (struct zebra_evpn *)bucket->data;
struct evpn_mh_show_ctx *wctx = (struct evpn_mh_show_ctx *)ctxt;
zebra_evpn_es_evi_show_one_evpn(zevpn, wctx->vty,
@ -399,7 +399,7 @@ void zebra_evpn_es_evi_show(struct vty *vty, bool uj, int detail)
void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj, vni_t vni, int detail)
{
json_object *json_array = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zevpn = zebra_evpn_lookup(vni);
if (uj)
@ -425,7 +425,7 @@ void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj, vni_t vni, int detail)
}
/* Initialize the ES tables maintained per-L2_VNI */
void zebra_evpn_es_evi_init(zebra_evpn_t *zevpn)
void zebra_evpn_es_evi_init(struct zebra_evpn *zevpn)
{
/* Initialize the ES-EVI RB tree */
RB_INIT(zebra_es_evi_rb_head, &zevpn->es_evi_rb_tree);
@ -438,7 +438,7 @@ void zebra_evpn_es_evi_init(zebra_evpn_t *zevpn)
}
/* Cleanup the ES info maintained per- EVPN */
void zebra_evpn_es_evi_cleanup(zebra_evpn_t *zevpn)
void zebra_evpn_es_evi_cleanup(struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi *es_evi;
struct zebra_evpn_es_evi *es_evi_next;
@ -455,7 +455,7 @@ void zebra_evpn_es_evi_cleanup(zebra_evpn_t *zevpn)
/* called when the oper state or bridge membership changes for the
* vxlan device
*/
void zebra_evpn_update_all_es(zebra_evpn_t *zevpn)
void zebra_evpn_update_all_es(struct zebra_evpn *zevpn)
{
struct zebra_evpn_es_evi *es_evi;
struct listnode *node;
@ -664,7 +664,8 @@ void zebra_evpn_acc_bd_svi_mac_add(struct interface *vlan_if)
/* called when a EVPN-L2VNI is set or cleared against a BD */
static void zebra_evpn_acc_bd_evpn_set(struct zebra_evpn_access_bd *acc_bd,
zebra_evpn_t *zevpn, zebra_evpn_t *old_zevpn)
struct zebra_evpn *zevpn,
struct zebra_evpn *old_zevpn)
{
struct zebra_if *zif;
struct listnode *node;
@ -698,7 +699,7 @@ void zebra_evpn_vl_vxl_ref(uint16_t vid, struct zebra_if *vxlan_zif)
{
struct zebra_evpn_access_bd *acc_bd;
struct zebra_if *old_vxlan_zif;
zebra_evpn_t *old_zevpn;
struct zebra_evpn *old_zevpn;
if (!vid)
return;
@ -760,8 +761,8 @@ void zebra_evpn_vl_vxl_deref(uint16_t vid, struct zebra_if *vxlan_zif)
}
/* handle EVPN add/del */
void zebra_evpn_vxl_evpn_set(struct zebra_if *zif, zebra_evpn_t *zevpn,
bool set)
void zebra_evpn_vxl_evpn_set(struct zebra_if *zif, struct zebra_evpn *zevpn,
bool set)
{
struct zebra_l2info_vxlan *vxl;
struct zebra_evpn_access_bd *acc_bd;
@ -783,7 +784,7 @@ void zebra_evpn_vxl_evpn_set(struct zebra_if *zif, zebra_evpn_t *zevpn,
}
} else {
if (acc_bd->zevpn) {
zebra_evpn_t *old_zevpn = acc_bd->zevpn;
struct zebra_evpn *old_zevpn = acc_bd->zevpn;
acc_bd->zevpn = NULL;
zebra_evpn_acc_bd_evpn_set(acc_bd, NULL, old_zevpn);
}
@ -2561,7 +2562,7 @@ bool zebra_evpn_es_mac_ref(zebra_mac_t *mac, const esi_t *esi)
/* Inform BGP about local ES-EVI add or del */
static int zebra_evpn_es_evi_send_to_client(struct zebra_evpn_es *es,
zebra_evpn_t *zevpn, bool add)
struct zebra_evpn *zevpn, bool add)
{
struct zserv *client;
struct stream *s;
@ -3511,7 +3512,7 @@ void zebra_evpn_mh_print(struct vty *vty)
* necessary
*/
/* called when a new vni is added or becomes oper up or becomes a bridge port */
void zebra_evpn_es_set_base_evpn(zebra_evpn_t *zevpn)
void zebra_evpn_es_set_base_evpn(struct zebra_evpn *zevpn)
{
struct listnode *node;
struct zebra_evpn_es *es;
@ -3560,7 +3561,7 @@ void zebra_evpn_es_set_base_evpn(zebra_evpn_t *zevpn)
/* called when a vni is removed or becomes oper down or is removed from a
* bridge
*/
void zebra_evpn_es_clear_base_evpn(zebra_evpn_t *zevpn)
void zebra_evpn_es_clear_base_evpn(struct zebra_evpn *zevpn)
{
struct listnode *node;
struct zebra_evpn_es *es;
@ -3589,7 +3590,7 @@ void zebra_evpn_es_clear_base_evpn(zebra_evpn_t *zevpn)
/* Locate an "eligible" L2-VNI to follow */
static int zebra_evpn_es_get_one_base_evpn_cb(struct hash_bucket *b, void *data)
{
zebra_evpn_t *zevpn = b->data;
struct zebra_evpn *zevpn = b->data;
zebra_evpn_es_set_base_evpn(zevpn);

View File

@ -113,7 +113,7 @@ RB_PROTOTYPE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp);
*/
struct zebra_evpn_es_evi {
struct zebra_evpn_es *es;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
/* ES-EVI flags */
uint32_t flags;
@ -183,7 +183,7 @@ struct zebra_evpn_access_bd {
/* list of members associated with the BD i.e. (potential) ESs */
struct list *mbr_zifs;
/* presence of zevpn activates the EVI on all the ESs in mbr_zifs */
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
/* SVI associated with the VLAN */
struct zebra_if *vlan_zif;
};
@ -224,7 +224,7 @@ struct zebra_evpn_mh_info {
* XXX: once single vxlan device model becomes available this will
* not be necessary
*/
zebra_evpn_t *es_base_evpn;
struct zebra_evpn *es_base_evpn;
struct in_addr es_originator_ip;
/* L2 NH and NHG ids -
@ -267,7 +267,7 @@ struct zebra_evpn_mh_info {
};
/* returns TRUE if the EVPN is ready to be sent to BGP */
static inline bool zebra_evpn_send_to_client_ok(zebra_evpn_t *zevpn)
static inline bool zebra_evpn_send_to_client_ok(struct zebra_evpn *zevpn)
{
return !!(zevpn->flags & ZEVPN_READY_FOR_BGP);
}
@ -313,12 +313,12 @@ extern void zebra_evpn_mh_terminate(void);
extern bool zebra_evpn_is_if_es_capable(struct zebra_if *zif);
extern void zebra_evpn_if_init(struct zebra_if *zif);
extern void zebra_evpn_if_cleanup(struct zebra_if *zif);
extern void zebra_evpn_es_evi_init(zebra_evpn_t *zevpn);
extern void zebra_evpn_es_evi_cleanup(zebra_evpn_t *zevpn);
extern void zebra_evpn_vxl_evpn_set(struct zebra_if *zif, zebra_evpn_t *zevpn,
bool set);
extern void zebra_evpn_es_set_base_evpn(zebra_evpn_t *zevpn);
extern void zebra_evpn_es_clear_base_evpn(zebra_evpn_t *zevpn);
extern void zebra_evpn_es_evi_init(struct zebra_evpn *zevpn);
extern void zebra_evpn_es_evi_cleanup(struct zebra_evpn *zevpn);
extern void zebra_evpn_vxl_evpn_set(struct zebra_if *zif,
struct zebra_evpn *zevpn, bool set);
extern void zebra_evpn_es_set_base_evpn(struct zebra_evpn *zevpn);
extern void zebra_evpn_es_clear_base_evpn(struct zebra_evpn *zevpn);
extern void zebra_evpn_vl_vxl_ref(uint16_t vid, struct zebra_if *vxlan_zif);
extern void zebra_evpn_vl_vxl_deref(uint16_t vid, struct zebra_if *vxlan_zif);
extern void zebra_evpn_vl_mbr_ref(uint16_t vid, struct zebra_if *zif);
@ -328,7 +328,7 @@ extern void zebra_evpn_es_if_oper_state_change(struct zebra_if *zif, bool up);
extern void zebra_evpn_es_show(struct vty *vty, bool uj);
extern void zebra_evpn_es_show_detail(struct vty *vty, bool uj);
extern void zebra_evpn_es_show_esi(struct vty *vty, bool uj, esi_t *esi);
extern void zebra_evpn_update_all_es(zebra_evpn_t *zevpn);
extern void zebra_evpn_update_all_es(struct zebra_evpn *zevpn);
extern void zebra_evpn_proc_remote_es(ZAPI_HANDLER_ARGS);
int zebra_evpn_remote_es_add(const esi_t *esi, struct in_addr vtep_ip,
bool esr_rxed, uint8_t df_alg, uint16_t df_pref);

View File

@ -88,7 +88,7 @@ struct hash *zebra_neigh_db_create(const char *desc)
return hash_create_size(8, neigh_hash_keymake, neigh_cmp, desc);
}
uint32_t num_dup_detected_neighs(zebra_evpn_t *zevpn)
uint32_t num_dup_detected_neighs(struct zebra_evpn *zevpn)
{
unsigned int i;
uint32_t num_neighs = 0;
@ -150,7 +150,7 @@ int remote_neigh_count(zebra_mac_t *zmac)
/*
* Install remote neighbor into the kernel.
*/
int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n,
int zebra_evpn_rem_neigh_install(struct zebra_evpn *zevpn, zebra_neigh_t *n,
bool was_static)
{
struct interface *vlan_if;
@ -468,7 +468,7 @@ static void zebra_evpn_local_neigh_deref_mac(zebra_neigh_t *n,
bool send_mac_update)
{
zebra_mac_t *mac = n->mac;
zebra_evpn_t *zevpn = n->zevpn;
struct zebra_evpn *zevpn = n->zevpn;
bool old_static;
bool new_static;
@ -496,7 +496,7 @@ static void zebra_evpn_local_neigh_deref_mac(zebra_neigh_t *n,
zebra_evpn_deref_ip2mac(zevpn, mac);
}
bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
bool zebra_evpn_neigh_is_bgp_seq_ok(struct zebra_evpn *zevpn, zebra_neigh_t *n,
const struct ethaddr *macaddr, uint32_t seq,
bool sync)
{
@ -542,7 +542,7 @@ bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
/*
* Add neighbor entry.
*/
static zebra_neigh_t *zebra_evpn_neigh_add(zebra_evpn_t *zevpn,
static zebra_neigh_t *zebra_evpn_neigh_add(struct zebra_evpn *zevpn,
const struct ipaddr *ip,
const struct ethaddr *mac,
zebra_mac_t *zmac, uint32_t n_flags)
@ -572,7 +572,7 @@ static zebra_neigh_t *zebra_evpn_neigh_add(zebra_evpn_t *zevpn,
/*
* Delete neighbor entry.
*/
int zebra_evpn_neigh_del(zebra_evpn_t *zevpn, zebra_neigh_t *n)
int zebra_evpn_neigh_del(struct zebra_evpn *zevpn, zebra_neigh_t *n)
{
zebra_neigh_t *tmp_n;
@ -614,7 +614,7 @@ void zebra_evpn_sync_neigh_del(zebra_neigh_t *n)
}
zebra_neigh_t *
zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n,
zebra_evpn_proc_sync_neigh_update(struct zebra_evpn *zevpn, zebra_neigh_t *n,
uint16_t ipa_len, const struct ipaddr *ipaddr,
uint8_t flags, uint32_t seq, const esi_t *esi,
struct sync_mac_ip_ctx *ctx)
@ -816,7 +816,8 @@ zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n,
/*
* Uninstall remote neighbor from the kernel.
*/
static int zebra_evpn_neigh_uninstall(zebra_evpn_t *zevpn, zebra_neigh_t *n)
static int zebra_evpn_neigh_uninstall(struct zebra_evpn *zevpn,
zebra_neigh_t *n)
{
struct interface *vlan_if;
@ -874,7 +875,7 @@ static void zebra_evpn_neigh_del_hash_entry(struct hash_bucket *bucket,
/*
* Delete all neighbor entries for this EVPN.
*/
void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall,
void zebra_evpn_neigh_del_all(struct zebra_evpn *zevpn, int uninstall,
int upd_client, uint32_t flags)
{
struct neigh_walk_ctx wctx;
@ -895,7 +896,7 @@ void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall,
/*
* Look up neighbor hash entry.
*/
zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn,
zebra_neigh_t *zebra_evpn_neigh_lookup(struct zebra_evpn *zevpn,
const struct ipaddr *ip)
{
zebra_neigh_t tmp;
@ -912,7 +913,7 @@ zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn,
* Process all neighbors associated with a MAC upon the MAC being learnt
* locally or undergoing any other change (such as sequence number).
*/
void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_local_mac_change(struct zebra_evpn *zevpn,
zebra_mac_t *zmac,
bool seq_change,
bool es_change)
@ -956,7 +957,7 @@ void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn,
* Process all neighbors associated with a local MAC upon the MAC being
* deleted.
*/
void zebra_evpn_process_neigh_on_local_mac_del(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_local_mac_del(struct zebra_evpn *zevpn,
zebra_mac_t *zmac)
{
zebra_neigh_t *n = NULL;
@ -989,7 +990,7 @@ void zebra_evpn_process_neigh_on_local_mac_del(zebra_evpn_t *zevpn,
* Process all neighbors associated with a MAC upon the MAC being remotely
* learnt.
*/
void zebra_evpn_process_neigh_on_remote_mac_add(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_remote_mac_add(struct zebra_evpn *zevpn,
zebra_mac_t *zmac)
{
zebra_neigh_t *n = NULL;
@ -1019,7 +1020,7 @@ void zebra_evpn_process_neigh_on_remote_mac_add(zebra_evpn_t *zevpn,
* Process all neighbors associated with a remote MAC upon the MAC being
* deleted.
*/
void zebra_evpn_process_neigh_on_remote_mac_del(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_remote_mac_del(struct zebra_evpn *zevpn,
zebra_mac_t *zmac)
{
/* NOTE: Currently a NO-OP. */
@ -1094,7 +1095,7 @@ static int zebra_evpn_dad_ip_auto_recovery_exp(struct thread *t)
{
struct zebra_vrf *zvrf = NULL;
zebra_neigh_t *nbr = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
nbr = THREAD_ARG(t);
@ -1254,7 +1255,8 @@ zebra_evpn_dup_addr_detect_for_neigh(struct zebra_vrf *zvrf, zebra_neigh_t *nbr,
}
}
int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_local_neigh_update(struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ipaddr *ip,
const struct ethaddr *macaddr, bool is_router,
bool local_inactive, bool dp_static)
@ -1596,7 +1598,8 @@ int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
return 0;
}
int zebra_evpn_remote_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_remote_neigh_update(struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ipaddr *ip,
const struct ethaddr *macaddr,
uint16_t state)
@ -1664,7 +1667,7 @@ zebra_evpn_send_neigh_hash_entry_to_client(struct hash_bucket *bucket,
}
/* Iterator of a specific EVPN */
void zebra_evpn_send_neigh_to_client(zebra_evpn_t *zevpn)
void zebra_evpn_send_neigh_to_client(struct zebra_evpn *zevpn)
{
struct neigh_walk_ctx wctx;
@ -1679,7 +1682,7 @@ void zebra_evpn_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt)
{
struct neigh_walk_ctx *wctx = ctxt;
zebra_neigh_t *nbr;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
char buf[INET6_ADDRSTRLEN];
nbr = (zebra_neigh_t *)bucket->data;
@ -2048,7 +2051,7 @@ void zebra_evpn_print_dad_neigh_hash_detail(struct hash_bucket *bucket,
zebra_evpn_print_neigh_hash_detail(bucket, ctxt);
}
void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn,
void zebra_evpn_neigh_remote_macip_add(struct zebra_evpn *zevpn,
struct zebra_vrf *zvrf,
const struct ipaddr *ipaddr,
zebra_mac_t *mac, struct in_addr vtep_ip,
@ -2182,8 +2185,9 @@ void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn,
n->rem_seq = seq;
}
int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
struct ipaddr *ip, zebra_mac_t *mac)
int zebra_evpn_neigh_gw_macip_add(struct interface *ifp,
struct zebra_evpn *zevpn, struct ipaddr *ip,
zebra_mac_t *mac)
{
zebra_neigh_t *n;
@ -2241,7 +2245,7 @@ int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
return 0;
}
void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
void zebra_evpn_neigh_remote_uninstall(struct zebra_evpn *zevpn,
struct zebra_vrf *zvrf, zebra_neigh_t *n,
zebra_mac_t *mac,
const struct ipaddr *ipaddr)
@ -2277,7 +2281,7 @@ void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
}
}
int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, const struct ipaddr *ip)
int zebra_evpn_neigh_del_ip(struct zebra_evpn *zevpn, const struct ipaddr *ip)
{
zebra_neigh_t *n;
zebra_mac_t *zmac;

View File

@ -63,7 +63,7 @@ struct zebra_neigh_t_ {
/* Underlying interface. */
ifindex_t ifindex;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t flags;
#define ZEBRA_NEIGH_LOCAL 0x01
@ -123,7 +123,7 @@ struct zebra_neigh_t_ {
* Context for neighbor hash walk - used by callbacks.
*/
struct neigh_walk_ctx {
zebra_evpn_t *zevpn; /* VNI hash */
struct zebra_evpn *zevpn; /* VNI hash */
struct zebra_vrf *zvrf; /* VRF - for client notification. */
int uninstall; /* uninstall from kernel? */
int upd_client; /* uninstall from client? */
@ -211,10 +211,10 @@ int remote_neigh_count(zebra_mac_t *zmac);
int neigh_list_cmp(void *p1, void *p2);
struct hash *zebra_neigh_db_create(const char *desc);
uint32_t num_dup_detected_neighs(zebra_evpn_t *zevpn);
uint32_t num_dup_detected_neighs(struct zebra_evpn *zevpn);
void zebra_evpn_find_neigh_addr_width(struct hash_bucket *bucket, void *ctxt);
int remote_neigh_count(zebra_mac_t *zmac);
int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n,
int zebra_evpn_rem_neigh_install(struct zebra_evpn *zevpn, zebra_neigh_t *n,
bool was_static);
void zebra_evpn_install_neigh_hash(struct hash_bucket *bucket, void *ctxt);
int zebra_evpn_neigh_send_add_to_client(vni_t vni, const struct ipaddr *ip,
@ -224,42 +224,44 @@ int zebra_evpn_neigh_send_add_to_client(vni_t vni, const struct ipaddr *ip,
int zebra_evpn_neigh_send_del_to_client(vni_t vni, struct ipaddr *ip,
struct ethaddr *macaddr, uint32_t flags,
int state, bool force);
bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
bool zebra_evpn_neigh_is_bgp_seq_ok(struct zebra_evpn *zevpn, zebra_neigh_t *n,
const struct ethaddr *macaddr, uint32_t seq,
bool sync);
int zebra_evpn_neigh_del(zebra_evpn_t *zevpn, zebra_neigh_t *n);
int zebra_evpn_neigh_del(struct zebra_evpn *zevpn, zebra_neigh_t *n);
void zebra_evpn_sync_neigh_del(zebra_neigh_t *n);
zebra_neigh_t *
zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n,
zebra_evpn_proc_sync_neigh_update(struct zebra_evpn *zevpn, zebra_neigh_t *n,
uint16_t ipa_len, const struct ipaddr *ipaddr,
uint8_t flags, uint32_t seq, const esi_t *esi,
struct sync_mac_ip_ctx *ctx);
void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall,
void zebra_evpn_neigh_del_all(struct zebra_evpn *zevpn, int uninstall,
int upd_client, uint32_t flags);
zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn,
zebra_neigh_t *zebra_evpn_neigh_lookup(struct zebra_evpn *zevpn,
const struct ipaddr *ip);
int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n,
int zebra_evpn_rem_neigh_install(struct zebra_evpn *zevpn, zebra_neigh_t *n,
bool was_static);
void zebra_evpn_process_neigh_on_remote_mac_add(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_remote_mac_add(struct zebra_evpn *zevpn,
zebra_mac_t *zmac);
void zebra_evpn_process_neigh_on_local_mac_del(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_local_mac_del(struct zebra_evpn *zevpn,
zebra_mac_t *zmac);
void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_local_mac_change(struct zebra_evpn *zevpn,
zebra_mac_t *zmac,
bool seq_change,
bool es_change);
void zebra_evpn_process_neigh_on_remote_mac_del(zebra_evpn_t *zevpn,
void zebra_evpn_process_neigh_on_remote_mac_del(struct zebra_evpn *zevpn,
zebra_mac_t *zmac);
int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_local_neigh_update(struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ipaddr *ip,
const struct ethaddr *macaddr, bool is_router,
bool local_inactive, bool dp_static);
int zebra_evpn_remote_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
int zebra_evpn_remote_neigh_update(struct zebra_evpn *zevpn,
struct interface *ifp,
const struct ipaddr *ip,
const struct ethaddr *macaddr,
uint16_t state);
void zebra_evpn_send_neigh_to_client(zebra_evpn_t *zevpn);
void zebra_evpn_send_neigh_to_client(struct zebra_evpn *zevpn);
void zebra_evpn_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt);
void zebra_evpn_print_neigh(zebra_neigh_t *n, void *ctxt, json_object *json);
void zebra_evpn_print_neigh_hash(struct hash_bucket *bucket, void *ctxt);
@ -268,18 +270,19 @@ void zebra_evpn_print_neigh_hash_detail(struct hash_bucket *bucket, void *ctxt);
void zebra_evpn_print_dad_neigh_hash(struct hash_bucket *bucket, void *ctxt);
void zebra_evpn_print_dad_neigh_hash_detail(struct hash_bucket *bucket,
void *ctxt);
void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn,
void zebra_evpn_neigh_remote_macip_add(struct zebra_evpn *zevpn,
struct zebra_vrf *zvrf,
const struct ipaddr *ipaddr,
zebra_mac_t *mac, struct in_addr vtep_ip,
uint8_t flags, uint32_t seq);
int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
struct ipaddr *ip, zebra_mac_t *mac);
void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
int zebra_evpn_neigh_gw_macip_add(struct interface *ifp,
struct zebra_evpn *zevpn, struct ipaddr *ip,
zebra_mac_t *mac);
void zebra_evpn_neigh_remote_uninstall(struct zebra_evpn *zevpn,
struct zebra_vrf *zvrf, zebra_neigh_t *n,
zebra_mac_t *mac,
const struct ipaddr *ipaddr);
int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, const struct ipaddr *ip);
int zebra_evpn_neigh_del_ip(struct zebra_evpn *zevpn, const struct ipaddr *ip);
#ifdef __cplusplus

View File

@ -47,7 +47,7 @@ zebra_get_vrr_intf_for_svi(struct interface *ifp)
}
/* EVPN<=>vxlan_zif association */
static inline void zevpn_vxlan_if_set(zebra_evpn_t *zevpn,
static inline void zevpn_vxlan_if_set(struct zebra_evpn *zevpn,
struct interface *ifp, bool set)
{
struct zebra_if *zif;

View File

@ -200,7 +200,7 @@ static void zevpn_print_neigh_hash_all_evpn(struct hash_bucket *bucket,
{
struct vty *vty;
json_object *json = NULL, *json_evpn = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_neigh;
struct neigh_walk_ctx wctx;
char vni_str[VNI_STR_LEN];
@ -210,7 +210,7 @@ static void zevpn_print_neigh_hash_all_evpn(struct hash_bucket *bucket,
json = (json_object *)args[1];
print_dup = (uint32_t)(uintptr_t)args[2];
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
num_neigh = hashcount(zevpn->neigh_table);
@ -267,7 +267,7 @@ static void zevpn_print_neigh_hash_all_evpn_detail(struct hash_bucket *bucket,
{
struct vty *vty;
json_object *json = NULL, *json_evpn = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_neigh;
struct neigh_walk_ctx wctx;
char vni_str[VNI_STR_LEN];
@ -277,7 +277,7 @@ static void zevpn_print_neigh_hash_all_evpn_detail(struct hash_bucket *bucket,
json = (json_object *)args[1];
print_dup = (uint32_t)(uintptr_t)args[2];
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
if (!zevpn) {
if (json)
vty_out(vty, "{}\n");
@ -402,7 +402,7 @@ static void zevpn_print_mac_hash_all_evpn(struct hash_bucket *bucket, void *ctxt
struct vty *vty;
json_object *json = NULL, *json_evpn = NULL;
json_object *json_mac = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_macs;
struct mac_walk_ctx *wctx = ctxt;
char vni_str[VNI_STR_LEN];
@ -410,7 +410,7 @@ static void zevpn_print_mac_hash_all_evpn(struct hash_bucket *bucket, void *ctxt
vty = wctx->vty;
json = wctx->json;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
wctx->zevpn = zevpn;
/*We are iterating over a new VNI, set the count to 0*/
@ -477,7 +477,7 @@ static void zevpn_print_mac_hash_all_evpn_detail(struct hash_bucket *bucket,
struct vty *vty;
json_object *json = NULL, *json_evpn = NULL;
json_object *json_mac = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_macs;
struct mac_walk_ctx *wctx = ctxt;
char vni_str[VNI_STR_LEN];
@ -485,7 +485,7 @@ static void zevpn_print_mac_hash_all_evpn_detail(struct hash_bucket *bucket,
vty = wctx->vty;
json = wctx->json;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
if (!zevpn) {
if (json)
vty_out(vty, "{}\n");
@ -690,7 +690,7 @@ static void zl3vni_print(zebra_l3vni_t *zl3vni, void **ctx)
char buf[PREFIX_STRLEN];
struct vty *vty = NULL;
json_object *json = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
json_object *json_evpn_list = NULL;
struct listnode *node = NULL, *nnode = NULL;
@ -887,7 +887,7 @@ struct interface *zvni_map_to_svi(vlanid_t vid, struct interface *br_if)
return tmp_if;
}
static int zebra_evpn_vxlan_del(zebra_evpn_t *zevpn)
static int zebra_evpn_vxlan_del(struct zebra_evpn *zevpn)
{
zevpn_vxlan_if_set(zevpn, zevpn->vxlan_if, false /* set */);
@ -914,7 +914,7 @@ static int zevpn_build_hash_table_zns(struct ns *ns,
/* Walk VxLAN interfaces and create EVPN hash. */
for (rn = route_top(zns->if_table); rn; rn = route_next(rn)) {
vni_t vni;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
struct zebra_if *zif;
struct zebra_l2info_vxlan *vxl;
@ -1068,11 +1068,11 @@ static void zevpn_build_hash_table(void)
*/
static void zebra_evpn_vxlan_cleanup_all(struct hash_bucket *bucket, void *arg)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
struct zebra_vrf *zvrf = (struct zebra_vrf *)arg;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
/* remove from l3-vni list */
if (zvrf->l3vni)
@ -1862,7 +1862,7 @@ static zebra_l3vni_t *zl3vni_from_svi(struct interface *ifp,
vni_t vni_id_from_svi(struct interface *ifp, struct interface *br_if)
{
vni_t vni = 0;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* Check if an L3VNI belongs to this SVI interface.
@ -2004,7 +2004,7 @@ static void zebra_vxlan_process_l3vni_oper_down(zebra_l3vni_t *zl3vni)
static void zevpn_add_to_l3vni_list(struct hash_bucket *bucket, void *ctxt)
{
zebra_evpn_t *zevpn = (zebra_evpn_t *)bucket->data;
struct zebra_evpn *zevpn = (struct zebra_evpn *)bucket->data;
zebra_l3vni_t *zl3vni = (zebra_l3vni_t *)ctxt;
if (zevpn->vrf_id == zl3vni_vrf_id(zl3vni))
@ -2020,7 +2020,7 @@ static void zevpn_add_to_l3vni_list(struct hash_bucket *bucket, void *ctxt)
static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni,
int add)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
/* There is a possibility that VNI notification was already received
* from kernel and we programmed it as L2-VNI
@ -2565,7 +2565,7 @@ void zebra_vxlan_print_vrf_vni(struct vty *vty, struct zebra_vrf *zvrf,
void zebra_vxlan_print_neigh_vni(struct vty *vty, struct zebra_vrf *zvrf,
vni_t vni, bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_neigh;
struct neigh_walk_ctx wctx;
json_object *json = NULL;
@ -2683,7 +2683,7 @@ void zebra_vxlan_print_specific_neigh_vni(struct vty *vty,
struct zebra_vrf *zvrf, vni_t vni,
struct ipaddr *ip, bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_neigh_t *n;
json_object *json = NULL;
@ -2725,7 +2725,7 @@ void zebra_vxlan_print_neigh_vni_vtep(struct vty *vty, struct zebra_vrf *zvrf,
vni_t vni, struct in_addr vtep_ip,
bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_neigh;
struct neigh_walk_ctx wctx;
json_object *json = NULL;
@ -2774,7 +2774,7 @@ void zebra_vxlan_print_neigh_vni_dad(struct vty *vty,
vni_t vni,
bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_neigh;
struct neigh_walk_ctx wctx;
json_object *json = NULL;
@ -2837,7 +2837,7 @@ void zebra_vxlan_print_neigh_vni_dad(struct vty *vty,
void zebra_vxlan_print_macs_vni(struct vty *vty, struct zebra_vrf *zvrf,
vni_t vni, bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_macs;
struct mac_walk_ctx wctx;
json_object *json = NULL;
@ -2987,7 +2987,7 @@ void zebra_vxlan_print_specific_mac_vni(struct vty *vty, struct zebra_vrf *zvrf,
vni_t vni, struct ethaddr *macaddr,
bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_mac_t *mac;
json_object *json = NULL;
@ -3029,7 +3029,7 @@ void zebra_vxlan_print_macs_vni_dad(struct vty *vty,
struct zebra_vrf *zvrf,
vni_t vni, bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct mac_walk_ctx wctx;
uint32_t num_macs;
json_object *json = NULL;
@ -3086,7 +3086,7 @@ int zebra_vxlan_clear_dup_detect_vni_mac(struct zebra_vrf *zvrf, vni_t vni,
struct ethaddr *macaddr, char *errmsg,
size_t errmsg_len)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_mac_t *mac;
struct listnode *node = NULL;
zebra_neigh_t *nbr = NULL;
@ -3174,7 +3174,7 @@ int zebra_vxlan_clear_dup_detect_vni_ip(struct zebra_vrf *zvrf, vni_t vni,
struct ipaddr *ip, char *errmsg,
size_t errmsg_len)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_neigh_t *nbr;
zebra_mac_t *mac;
char buf[INET6_ADDRSTRLEN];
@ -3241,7 +3241,7 @@ static void zevpn_clear_dup_mac_hash(struct hash_bucket *bucket, void *ctxt)
{
struct mac_walk_ctx *wctx = ctxt;
zebra_mac_t *mac;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct listnode *node = NULL;
zebra_neigh_t *nbr = NULL;
@ -3296,12 +3296,12 @@ static void zevpn_clear_dup_mac_hash(struct hash_bucket *bucket, void *ctxt)
static void zevpn_clear_dup_detect_hash_vni_all(struct hash_bucket *bucket,
void **args)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct zebra_vrf *zvrf;
struct mac_walk_ctx m_wctx;
struct neigh_walk_ctx n_wctx;
zevpn = (zebra_evpn_t *)bucket->data;
zevpn = (struct zebra_evpn *)bucket->data;
if (!zevpn)
return;
@ -3342,7 +3342,7 @@ int zebra_vxlan_clear_dup_detect_vni_all(struct zebra_vrf *zvrf)
int zebra_vxlan_clear_dup_detect_vni(struct zebra_vrf *zvrf, vni_t vni)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct mac_walk_ctx m_wctx;
struct neigh_walk_ctx n_wctx;
@ -3380,7 +3380,7 @@ void zebra_vxlan_print_macs_vni_vtep(struct vty *vty, struct zebra_vrf *zvrf,
vni_t vni, struct in_addr vtep_ip,
bool use_json)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
uint32_t num_macs;
struct mac_walk_ctx wctx;
json_object *json = NULL;
@ -3438,7 +3438,7 @@ void zebra_vxlan_print_vni(struct vty *vty, struct zebra_vrf *zvrf, vni_t vni,
json_object *json = NULL;
void *args[2];
zebra_l3vni_t *zl3vni = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
if (!is_evpn_enabled())
return;
@ -3686,7 +3686,7 @@ int zebra_vxlan_handle_kernel_neigh_del(struct interface *ifp,
struct interface *link_if,
struct ipaddr *ip)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* check if this is a remote neigh entry corresponding to remote
@ -3737,7 +3737,7 @@ int zebra_vxlan_handle_kernel_neigh_update(struct interface *ifp,
bool is_router,
bool local_inactive, bool dp_static)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* check if this is a remote neigh entry corresponding to remote
@ -3937,7 +3937,7 @@ int zebra_vxlan_check_readd_vtep(struct interface *ifp,
struct zebra_vrf *zvrf = NULL;
struct zebra_l2info_vxlan *vxl;
vni_t vni;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_vtep_t *zvtep = NULL;
zif = ifp->info;
@ -3986,7 +3986,7 @@ static int zebra_vxlan_check_del_local_mac(struct interface *ifp,
struct zebra_if *zif;
struct zebra_l2info_vxlan *vxl;
vni_t vni;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_mac_t *mac;
zif = ifp->info;
@ -4082,7 +4082,7 @@ int zebra_vxlan_dp_network_mac_del(struct interface *ifp,
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
vni_t vni;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
zebra_mac_t *mac = NULL;
@ -4138,7 +4138,7 @@ int zebra_vxlan_dp_network_mac_del(struct interface *ifp,
int zebra_vxlan_local_mac_del(struct interface *ifp, struct interface *br_if,
struct ethaddr *macaddr, vlanid_t vid)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_mac_t *mac;
/* We are interested in MACs only on ports or (port, VLAN) that
@ -4175,7 +4175,7 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
bool sticky, bool local_inactive,
bool dp_static)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct zebra_vrf *zvrf;
assert(ifp);
@ -4270,7 +4270,7 @@ stream_failure:
void zebra_vxlan_remote_vtep_del(vrf_id_t vrf_id, vni_t vni,
struct in_addr vtep_ip)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_vtep_t *zvtep;
struct interface *ifp;
struct zebra_if *zif;
@ -4334,7 +4334,7 @@ void zebra_vxlan_remote_vtep_del(vrf_id_t vrf_id, vni_t vni,
void zebra_vxlan_remote_vtep_add(vrf_id_t vrf_id, vni_t vni,
struct in_addr vtep_ip, int flood_control)
{
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
struct interface *ifp;
struct zebra_if *zif;
zebra_vtep_t *zvtep;
@ -4468,7 +4468,7 @@ int zebra_vxlan_add_del_gw_macip(struct interface *ifp, const struct prefix *p,
{
struct ipaddr ip;
struct ethaddr macaddr;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
memset(&ip, 0, sizeof(struct ipaddr));
memset(&macaddr, 0, sizeof(struct ethaddr));
@ -4603,7 +4603,7 @@ int zebra_vxlan_svi_down(struct interface *ifp, struct interface *link_if)
/* remove association with svi-if */
zl3vni->svi_if = NULL;
} else {
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
/* Unlink the SVI from the access VLAN */
zebra_evpn_acc_bd_svi_set(ifp->info, link_if->info, false);
@ -4635,7 +4635,7 @@ int zebra_vxlan_svi_down(struct interface *ifp, struct interface *link_if)
*/
int zebra_vxlan_svi_up(struct interface *ifp, struct interface *link_if)
{
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
zl3vni = zl3vni_from_svi(ifp, link_if);
@ -4769,7 +4769,7 @@ int zebra_vxlan_if_down(struct interface *ifp)
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
zebra_l3vni_t *zl3vni = NULL;
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
/* Check if EVPN is enabled. */
if (!is_evpn_enabled())
@ -4831,7 +4831,7 @@ int zebra_vxlan_if_up(struct interface *ifp)
vni_t vni;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* Check if EVPN is enabled. */
@ -4908,7 +4908,7 @@ int zebra_vxlan_if_del(struct interface *ifp)
vni_t vni;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* Check if EVPN is enabled. */
@ -4982,7 +4982,7 @@ int zebra_vxlan_if_update(struct interface *ifp, uint16_t chgflags)
vni_t vni;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
struct interface *vlan_if = NULL;
@ -5159,7 +5159,7 @@ int zebra_vxlan_if_add(struct interface *ifp)
vni_t vni;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan *vxl = NULL;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
zebra_l3vni_t *zl3vni = NULL;
/* Check if EVPN is enabled. */
@ -5235,24 +5235,15 @@ int zebra_vxlan_if_add(struct interface *ifp)
listnode_add_sort_nodup(zl3vni->l2vnis, zevpn);
}
if (IS_ZEBRA_DEBUG_VXLAN) {
char addr_buf1[INET_ADDRSTRLEN];
char addr_buf2[INET_ADDRSTRLEN];
inet_ntop(AF_INET, &vxl->vtep_ip,
addr_buf1, INET_ADDRSTRLEN);
inet_ntop(AF_INET, &vxl->mcast_grp,
addr_buf2, INET_ADDRSTRLEN);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
"Add L2-VNI %u VRF %s intf %s(%u) VLAN %u local IP %s mcast_grp %s master %u",
"Add L2-VNI %u VRF %s intf %s(%u) VLAN %u local IP %pI4 mcast_grp %pI4 master %u",
vni,
vlan_if ? vrf_id_to_name(vlan_if->vrf_id)
: VRF_DEFAULT_NAME,
ifp->name, ifp->ifindex, vxl->access_vlan,
addr_buf1, addr_buf2,
&vxl->vtep_ip, &vxl->mcast_grp,
zif->brslave_info.bridge_ifindex);
}
/* If down or not mapped to a bridge, we're done. */
if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
@ -5488,7 +5479,7 @@ void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS)
struct stream *s;
int advertise;
vni_t vni = 0;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct interface *ifp = NULL;
if (!EVPN_ENABLED(zvrf)) {
@ -5588,7 +5579,7 @@ void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS)
struct stream *s;
int advertise;
vni_t vni = 0;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct interface *ifp = NULL;
struct zebra_if *zif = NULL;
struct zebra_l2info_vxlan zl2_info;
@ -5654,7 +5645,7 @@ void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS)
struct stream *s;
int advertise;
vni_t vni = 0;
zebra_evpn_t *zevpn = NULL;
struct zebra_evpn *zevpn = NULL;
struct interface *ifp = NULL;
if (!EVPN_ENABLED(zvrf)) {

View File

@ -208,7 +208,7 @@ static inline void zl3vni_get_svi_rmac(zebra_l3vni_t *zl3vni,
/* context for neigh hash walk - update l3vni and rmac */
struct neigh_l3info_walk_ctx {
zebra_evpn_t *zevpn;
struct zebra_evpn *zevpn;
zebra_l3vni_t *zl3vni;
int add;
};
@ -256,7 +256,7 @@ typedef struct zebra_vxlan_sg_ {
uint32_t ref_cnt;
} zebra_vxlan_sg_t;
extern zebra_evpn_t *zevpn_lookup(vni_t vni);
extern struct zebra_evpn *zevpn_lookup(vni_t vni);
extern void zebra_vxlan_sync_mac_dp_install(zebra_mac_t *mac, bool set_inactive,
bool force_clear_static, const char *caller);
extern bool zebra_evpn_do_dup_addr_detect(struct zebra_vrf *zvrf);