From a780a738968ffc077a81d108b906cf9a06f3ef4d Mon Sep 17 00:00:00 2001 From: Ameya Dharkar Date: Thu, 16 May 2019 14:43:41 -0700 Subject: Zebra: Handle RMAC add/delete operation and add fpm_mac_info_t - Define a hook "zebra_mac_update" which can be registered by multiple data plane components (e.g. FPM, dplane). DEFINE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni, bool delete, const char *reason), (rmac, zl3vni, delete, reason)) - While performing RMAC add/delete for an L3VNI, call "zebra_mac_update" hook. - This hook call triggers "zfpm_trigger_rmac_update". In this function, we do a lookup for the RMAC in fpm_mac_info_table. If already present, this node is updated with the latest RMAC info. Else, a new fpm_mac_info_t node is created and inserted in the queue and hash data structures. Signed-off-by: Ameya Dharkar --- zebra/zebra_vxlan_private.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'zebra/zebra_vxlan_private.h') diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h index 1dd42b7083..8e78042646 100644 --- a/zebra/zebra_vxlan_private.h +++ b/zebra/zebra_vxlan_private.h @@ -431,6 +431,12 @@ struct nh_walk_ctx { }; extern zebra_l3vni_t *zl3vni_from_vrf(vrf_id_t vrf_id); +extern struct interface *zl3vni_map_to_vxlan_if(zebra_l3vni_t *zl3vni); +extern struct interface *zl3vni_map_to_svi_if(zebra_l3vni_t *zl3vni); + +DECLARE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni, + bool delete, const char *reason), (rmac, zl3vni, delete, reason)) + #ifdef __cplusplus } -- cgit v1.2.3