summaryrefslogtreecommitdiff
path: root/pimd/pim_instance.h
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-02-06 09:30:36 -0800
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-02-14 09:18:30 -0800
commit05ca004b804b85343f450c99792b065254c5ccc3 (patch)
tree4d37c93a47c6ee36238b8c097a3e03c7aa625ea9 /pimd/pim_instance.h
parent0309c55d42ee70dbb0770990f525f8d6e16363d0 (diff)
pim: DF election for tunnel termination mroutes in an anycast-VTEP setup
1. Upstream entries associated with tunnel termination mroutes are synced to the MLAG peer via the local MLAG daemon. 2. These entries are installed in the peer switch (via an upstream ref flag). 3. DF (Designated Forwarder) election is run per-upstream entry by both the MLAG switches - a. The switch with the lowest RPF cost is the DF winner b. If both switches have the same RPF cost the MLAG role is used as a tie breaker with the MLAG primary becoming the DF winner. 4. The DF winner terminates the multicast traffic by adding the tunnel termination device to the OIL. The non-DF suppresses the termination device from the OIL. Note: Before the PIM-MLAG interface was available hidden config was used to test the EVPN-PIM functionality with MLAG. I have removed the code to persist that config to avoid confusion. The hidden commands are still available. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_instance.h')
-rw-r--r--pimd/pim_instance.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/pimd/pim_instance.h b/pimd/pim_instance.h
index da0c75decb..7b1fd2e172 100644
--- a/pimd/pim_instance.h
+++ b/pimd/pim_instance.h
@@ -48,6 +48,46 @@ enum pim_spt_switchover {
PIM_SPT_INFINITY,
};
+/* stats for updates rxed from the MLAG component during the life of a
+ * session
+ */
+struct pim_mlag_msg_stats {
+ uint32_t mroute_add_rx;
+ uint32_t mroute_add_tx;
+ uint32_t mroute_del_rx;
+ uint32_t mroute_del_tx;
+ uint32_t mlag_status_updates;
+ uint32_t pim_status_updates;
+ uint32_t vxlan_updates;
+ uint32_t peer_zebra_status_updates;
+};
+
+struct pim_mlag_stats {
+ /* message stats are reset when the connection to mlagd flaps */
+ struct pim_mlag_msg_stats msg;
+ uint32_t mlagd_session_downs;
+ uint32_t peer_session_downs;
+ uint32_t peer_zebra_downs;
+};
+
+enum pim_mlag_flags {
+ PIM_MLAGF_NONE = 0,
+ /* connection to the local MLAG daemon is up */
+ PIM_MLAGF_LOCAL_CONN_UP = (1 << 0),
+ /* connection to the MLAG daemon on the peer switch is up. note
+ * that there is no direct connection between FRR and the peer MLAG
+ * daemon. this is just a peer-session status provided by the local
+ * MLAG daemon.
+ */
+ PIM_MLAGF_PEER_CONN_UP = (1 << 1),
+ /* status update rxed from the local daemon */
+ PIM_MLAGF_STATUS_RXED = (1 << 2),
+ /* initial dump of data done post peerlink flap */
+ PIM_MLAGF_PEER_REPLAY_DONE = (1 << 3),
+ /* zebra is up on the peer */
+ PIM_MLAGF_PEER_ZEBRA_UP = (1 << 4)
+};
+
struct pim_router {
struct thread_master *master;
@@ -65,7 +105,7 @@ struct pim_router {
*/
vrf_id_t vrf_id;
- enum mlag_role role;
+ enum mlag_role mlag_role;
uint32_t pim_mlag_intf_cnt;
/* if true we have registered with MLAG */
bool mlag_process_register;
@@ -77,6 +117,12 @@ struct pim_router {
struct stream_fifo *mlag_fifo;
struct stream *mlag_stream;
struct thread *zpthread_mlag_write;
+ struct in_addr anycast_vtep_ip;
+ struct in_addr local_vtep_ip;
+ struct pim_mlag_stats mlag_stats;
+ enum pim_mlag_flags mlag_flags;
+ char peerlink_rif[INTERFACE_NAMSIZ];
+ struct interface *peerlink_rif_p;
};
/* Per VRF PIM DB */