diff options
author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-03-26 21:30:29 +0100 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-04-20 17:33:20 +0200 |
commit | 8a93734c484dfb55ad6c8d7ed313ec9b405dae5a (patch) | |
tree | ded2d5f6748b25153ff9b5464a976c4eb0542613 /zebra/zebra_vxlan_private.h | |
parent | lib: return listnode on add for subsequent efficent del (diff) | |
download | frr-8a93734c484dfb55ad6c8d7ed313ec9b405dae5a.tar.xz frr-8a93734c484dfb55ad6c8d7ed313ec9b405dae5a.zip |
zebra: maintain mcast tunnel origination and termination SG entries
Each multicast tunnel is associated with a -
1. Tunnel origination mroute that is used for forwarding the
VxLAN encapsulated flow -
S - local VTEP-IP
G - BUM mcast-group
2. And a tunnel termination entry -
S - * (any remote VTEP)
G - BUM mcast-group
Multiple L2 VNIs can share the same BUM mcast group (and local-VTEP-IP).
Zebra maintains an mcast (SG) hash table to pass this info to pimd for
subsequent MDT setup.
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan_private.h')
-rw-r--r-- | zebra/zebra_vxlan_private.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h index 40e7640cd..9f945442b 100644 --- a/zebra/zebra_vxlan_private.h +++ b/zebra/zebra_vxlan_private.h @@ -434,4 +434,26 @@ struct nh_walk_ctx { } #endif +/* + * Multicast hash table. + * + * This table contains - + * 1. The (S, G) entries used for encapsulating and forwarding BUM traffic. + * S is the local VTEP-IP and G is a BUM mcast group address. + * 2. The (X, G) entries used for terminating a BUM flow. + * Multiple L2-VNIs can share the same MDT hence the need to maintain + * an aggregated table that pimd can consume without much + * re-interpretation. + */ +typedef struct zebra_vxlan_sg_ { + struct zebra_vrf *zvrf; + + struct prefix_sg sg; + char sg_str[PREFIX_SG_STR_LEN]; + + /* For SG - num of L2 VNIs using this entry for sending BUM traffic */ + /* For XG - num of SG using this as parent */ + uint32_t ref_cnt; +} zebra_vxlan_sg_t; + #endif /* _ZEBRA_VXLAN_PRIVATE_H */ |