summaryrefslogtreecommitdiff
path: root/pimd/pim_mroute.h
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-11-15 10:40:00 -0800
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2019-11-15 12:00:29 -0800
commit69e3538cd89b070d3434192bb28b94d7b721ceeb (patch)
treee3fdd4b4187869235bd3aed0900c9a48687e7b80 /pimd/pim_mroute.h
parenta155fed53cbc26c5569c64280549b7bf1f1e82c2 (diff)
pimd: decide between SPT based and RPT based forwarding
An (S,G) mroute can be created as a result of rpt prune. However that entry needs to stay on the parent (*,G)'s tree (IIF) till a decision is made to switch the source to the SPT. The decision to stay on the RPT is made based on the SPTbit setting according to - RFC7761, Section 4.2 “Data Packet Forwarding Rules” However those rules are hard to achieve when hw acceleration i.e. control and data planes are separate. So instead of relying on data we make the decision of using SPT if we have decided to join the SPT - Use_RPT(S,G) { if (Joined(S,G) == TRUE // we have decided to join the SPT OR Directly_Connected(S) == TRUE // source is directly connected OR I_am_RP(G) == TRUE) // RP //use_spt return FALSE; //use_rpt return TRUE; } To make that change some re-org was needed - 1. pim static mroutes and dynamic (upstream mroutes) top level APIs have been separated. This is to limit the state machine to dynamic mroutes. 2. c_oil->oil.mfcc_parent is re-evaluated based on if we decided to use the SPT or stay on the RPT. 3. upstream mroute re-eval is done when any of the criteria involved in Use_RPT changes. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_mroute.h')
-rw-r--r--pimd/pim_mroute.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/pimd/pim_mroute.h b/pimd/pim_mroute.h
index bd71acbf82..3f54681432 100644
--- a/pimd/pim_mroute.h
+++ b/pimd/pim_mroute.h
@@ -174,7 +174,8 @@ int pim_mroute_add_vif(struct interface *ifp, struct in_addr ifaddr,
unsigned char flags);
int pim_mroute_del_vif(struct interface *ifp);
-int pim_mroute_add(struct channel_oil *c_oil, const char *name);
+int pim_upstream_mroute_add(struct channel_oil *c_oil, const char *name);
+int pim_static_mroute_add(struct channel_oil *c_oil, const char *name);
int pim_mroute_del(struct channel_oil *c_oil, const char *name);
void pim_mroute_update_counters(struct channel_oil *c_oil);