diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-07-05 15:03:14 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-08 10:28:51 -0400 |
| commit | b6938a74e5f73a2f29df12efb46e7121e79d3b86 (patch) | |
| tree | d63cb21ae9fc8e3bd5e441a653bf89c1a083ca44 /zebra/zebra_vxlan_private.h | |
| parent | 640751c7acc8ea2236a0d46d9663849573e56e3f (diff) | |
zebra: Provide neigh-mac tie-in in zebra
Currently, FRR does not do any linking between local MACs and neighbors.
We found this necessary when dealing with centralized GW. A neigh is considered local only when the mac is learnt locally as well.
Ticket: CM-16544
Review: CCR-6388
Unit-test: Manual/Evpn-Smoke
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan_private.h')
| -rw-r--r-- | zebra/zebra_vxlan_private.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h index 2bf00291e7..8539311eab 100644 --- a/zebra/zebra_vxlan_private.h +++ b/zebra/zebra_vxlan_private.h @@ -115,6 +115,9 @@ struct zebra_mac_t_ { } fwd_info; u_int32_t neigh_refcnt; + + /* List of neigh associated with this mac */ + struct list *neigh_list; }; /* @@ -140,6 +143,16 @@ struct mac_walk_ctx { struct json_object *json; /* Used for JSON Output */ }; +enum zebra_neigh_state { ZEBRA_NEIGH_INACTIVE = 0, ZEBRA_NEIGH_ACTIVE = 1 }; + +#define IS_ZEBRA_NEIGH_ACTIVE(n) n->state == ZEBRA_NEIGH_ACTIVE + +#define IS_ZEBRA_NEIGH_INACTIVE(n) n->state == ZEBRA_NEIGH_INACTIVE + +#define ZEBRA_NEIGH_SET_ACTIVE(n) n->state = ZEBRA_NEIGH_ACTIVE + +#define ZEBRA_NEIGH_SET_INACTIVE(n) n->state = ZEBRA_NEIGH_INACTIVE + /* * Neighbor hash table. * @@ -162,8 +175,10 @@ struct zebra_neigh_t_ { ifindex_t ifindex; u_int32_t flags; -#define ZEBRA_NEIGH_LOCAL 0x01 -#define ZEBRA_NEIGH_REMOTE 0x02 +#define ZEBRA_NEIGH_LOCAL 0x01 +#define ZEBRA_NEIGH_REMOTE 0x02 + + enum zebra_neigh_state state; /* Remote VTEP IP - applicable only for remote neighbors. */ struct in_addr r_vtep_ip; |
