mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 11:18:59 +00:00
pimd: register with MLAG on the first VxLAN SG
Channel with the MLAG daemon is setup on the first VxLAN BUM MDT or pim-mlag AA SVI. This channel is used for - 1. rxing MLAG status status updates (peer state, role etc.) 2. for syncing active-active upstream entries with the peer MLAG switch. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
ef011a4287
commit
0309c55d42
@ -660,6 +660,14 @@ static struct pim_vxlan_sg *pim_vxlan_sg_new(struct pim_instance *pim,
|
||||
|
||||
vxlan_sg = hash_get(pim->vxlan.sg_hash, vxlan_sg, hash_alloc_intern);
|
||||
|
||||
/* we register with the MLAG daemon in the first VxLAN SG and never
|
||||
* de-register during that life of the pimd
|
||||
*/
|
||||
if (pim->vxlan.sg_hash->count == 1) {
|
||||
vxlan_mlag.flags |= PIM_VXLAN_MLAGF_DO_REG;
|
||||
pim_mlag_register();
|
||||
}
|
||||
|
||||
return vxlan_sg;
|
||||
}
|
||||
|
||||
@ -717,6 +725,11 @@ void pim_vxlan_sg_del(struct pim_instance *pim, struct prefix_sg *sg)
|
||||
}
|
||||
|
||||
/******************************* MLAG handling *******************************/
|
||||
bool pim_vxlan_do_mlag_reg(void)
|
||||
{
|
||||
return (vxlan_mlag.flags & PIM_VXLAN_MLAGF_DO_REG);
|
||||
}
|
||||
|
||||
/* The peerlink sub-interface is added as an OIF to the origination-mroute.
|
||||
* This is done to send a copy of the multicast-vxlan encapsulated traffic
|
||||
* to the MLAG peer which may mroute it over the underlay if there are any
|
||||
|
@ -66,7 +66,8 @@ struct pim_vxlan_sg {
|
||||
|
||||
enum pim_vxlan_mlag_flags {
|
||||
PIM_VXLAN_MLAGF_NONE = 0,
|
||||
PIM_VXLAN_MLAGF_ENABLED = (1 << 0)
|
||||
PIM_VXLAN_MLAGF_ENABLED = (1 << 0),
|
||||
PIM_VXLAN_MLAGF_DO_REG = (1 << 1)
|
||||
};
|
||||
|
||||
enum pim_vxlan_mlag_role {
|
||||
@ -142,5 +143,6 @@ extern void pim_vxlan_mlag_update(bool enable, bool peer_state, uint32_t role,
|
||||
struct interface *peerlink_rif,
|
||||
struct in_addr *reg_addr);
|
||||
extern void pim_vxlan_config_write(struct vty *vty, char *spaces, int *writes);
|
||||
extern bool pim_vxlan_do_mlag_reg(void);
|
||||
|
||||
#endif /* PIM_VXLAN_H */
|
||||
|
Loading…
Reference in New Issue
Block a user