summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-08 18:02:45 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-04-09 13:17:56 -0400
commitca6cb21b60b6251f6d0bbe02eebfbee6b574de9a (patch)
tree02b6c110ede986d9f66aeb5144b242d47544560d
parentc8d8450442fbc9967a2e9cbbb5a963dc2ff3de00 (diff)
pimd: Only send triggered response after all of *,G message is read
pim was sending a triggered response on every S,G RPT prune information read. Suppose we had this in a *,G message: *,G S1, G RPT Prune S2, G RPT Prune We would send two triggered *,G messages upstream. This leads to over processing and quickly changing state if S1 or S2 were in different states. Modify the code to send just one Triggered *,G upstream after looking at all S,G state for a *,G. Ticket: CM-24531 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_ifchannel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index 0fe4110f60..980b4c1428 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -1330,10 +1330,12 @@ void pim_ifchannel_scan_forward_start(struct interface *new_ifp)
void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
uint8_t join)
{
+ bool send_upstream_starg = false;
struct pim_ifchannel *child;
struct listnode *ch_node, *nch_node;
struct pim_instance *pim =
((struct pim_interface *)ch->interface->info)->pim;
+ struct pim_upstream *starup = ch->upstream;
if (PIM_DEBUG_PIM_TRACE)
zlog_debug(
@@ -1368,7 +1370,6 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
if (child->ifjoin_state == PIM_IFJOIN_PRUNE_PENDING_TMP)
THREAD_OFF(child->t_ifjoin_prune_pending_timer);
THREAD_OFF(child->t_ifjoin_expiry_timer);
- struct pim_upstream *parent = child->upstream->parent;
PIM_IF_FLAG_UNSET_S_G_RPT(child->flags);
child->ifjoin_state = PIM_IFJOIN_NOINFO;
@@ -1383,14 +1384,15 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom,
&child->upstream->rpf, child->upstream,
true);
}
- if (parent)
- pim_jp_agg_single_upstream_send(&parent->rpf,
- parent, true);
+ send_upstream_starg = true;
delete_on_noinfo(child);
break;
}
}
+
+ if (send_upstream_starg)
+ pim_jp_agg_single_upstream_send(&starup->rpf, starup, true);
}
unsigned int pim_ifchannel_hash_key(void *arg)