forked from Mirror/frr
pimd: Send up to 10 NULL registers on vxlan startup
When doing pim vxlan multicast bum handling, setup the register to send up to 10 null registers on immediate startup. If the null register packet gets dropped this delays the formation of the S,G tree from the RP towards the FHR. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
22b439090c
commit
22ef3fb3ed
|
@ -32,6 +32,30 @@ static void pim_vxlan_work_timer_setup(bool start);
|
|||
static void pim_vxlan_set_peerlink_rif(struct pim_instance *pim,
|
||||
struct interface *ifp);
|
||||
|
||||
#define PIM_VXLAN_STARTUP_NULL_REGISTERS 10
|
||||
|
||||
static void pim_vxlan_rp_send_null_register_startup(struct event *e)
|
||||
{
|
||||
struct pim_vxlan_sg *vxlan_sg = EVENT_ARG(e);
|
||||
|
||||
vxlan_sg->null_register_sent++;
|
||||
|
||||
if (vxlan_sg->null_register_sent > PIM_VXLAN_STARTUP_NULL_REGISTERS) {
|
||||
if (PIM_DEBUG_VXLAN)
|
||||
zlog_debug("Null registering stopping for %s",
|
||||
vxlan_sg->sg_str);
|
||||
return;
|
||||
}
|
||||
|
||||
pim_null_register_send(vxlan_sg->up);
|
||||
|
||||
if (PIM_DEBUG_VXLAN)
|
||||
zlog_debug("Sent null register for %s", vxlan_sg->sg_str);
|
||||
|
||||
event_add_timer(router->master, pim_vxlan_rp_send_null_register_startup,
|
||||
vxlan_sg, PIM_VXLAN_WORK_TIME, &vxlan_sg->null_register);
|
||||
}
|
||||
|
||||
/*
|
||||
* The rp info has gone from no path to having a
|
||||
* path. Let's immediately send out the null pim register
|
||||
|
@ -61,8 +85,13 @@ void pim_vxlan_rp_info_is_alive(struct pim_instance *pim,
|
|||
* If the rp is the same we should send
|
||||
*/
|
||||
if (rpg == rpg_changed) {
|
||||
zlog_debug("VXLAN RP INFO is alive sending");
|
||||
pim_null_register_send(vxlan_sg->up);
|
||||
if (PIM_DEBUG_VXLAN)
|
||||
zlog_debug("VXLAN RP info for %s alive sending",
|
||||
vxlan_sg->sg_str);
|
||||
vxlan_sg->null_register_sent = 0;
|
||||
event_add_event(router->master,
|
||||
pim_vxlan_rp_send_null_register_startup,
|
||||
vxlan_sg, 0, &vxlan_sg->null_register);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -201,8 +230,18 @@ void pim_vxlan_update_sg_reg_state(struct pim_instance *pim,
|
|||
*/
|
||||
if (reg_join)
|
||||
pim_vxlan_add_work(vxlan_sg);
|
||||
else
|
||||
else {
|
||||
/*
|
||||
* Stop the event that is sending NULL Registers on startup
|
||||
* there is no need to keep spamming it
|
||||
*/
|
||||
if (PIM_DEBUG_VXLAN)
|
||||
zlog_debug("Received Register stop for %s",
|
||||
vxlan_sg->sg_str);
|
||||
|
||||
EVENT_OFF(vxlan_sg->null_register);
|
||||
pim_vxlan_del_work(vxlan_sg);
|
||||
}
|
||||
}
|
||||
|
||||
static void pim_vxlan_work_timer_cb(struct event *t)
|
||||
|
@ -804,6 +843,7 @@ static void pim_vxlan_sg_del_item(struct pim_vxlan_sg *vxlan_sg)
|
|||
{
|
||||
vxlan_sg->flags |= PIM_VXLAN_SGF_DEL_IN_PROG;
|
||||
|
||||
EVENT_OFF(vxlan_sg->null_register);
|
||||
pim_vxlan_del_work(vxlan_sg);
|
||||
|
||||
if (pim_vxlan_is_orig_mroute(vxlan_sg))
|
||||
|
|
|
@ -49,6 +49,9 @@ struct pim_vxlan_sg {
|
|||
struct interface *iif;
|
||||
/* on a MLAG setup the peerlink is added as a static OIF */
|
||||
struct interface *orig_oif;
|
||||
|
||||
struct event *null_register;
|
||||
uint32_t null_register_sent;
|
||||
};
|
||||
|
||||
enum pim_vxlan_mlag_flags {
|
||||
|
|
Loading…
Reference in a new issue