diff options
| author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-11-15 10:40:00 -0800 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-11-15 12:00:29 -0800 |
| commit | 69e3538cd89b070d3434192bb28b94d7b721ceeb (patch) | |
| tree | e3fdd4b4187869235bd3aed0900c9a48687e7b80 /pimd/pim_zebra.c | |
| parent | a155fed53cbc26c5569c64280549b7bf1f1e82c2 (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_zebra.c')
| -rw-r--r-- | pimd/pim_zebra.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index a0ca618b73..9b1261976d 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -289,7 +289,7 @@ void pim_zebra_upstream_rpf_changed(struct pim_instance *pim, * so install it. */ if (!up->channel_oil->installed) - pim_mroute_add(up->channel_oil, + pim_upstream_mroute_add(up->channel_oil, __PRETTY_FUNCTION__); /* @@ -325,7 +325,8 @@ void pim_zebra_upstream_rpf_changed(struct pim_instance *pim, } if (!up->channel_oil->installed) - pim_mroute_add(up->channel_oil, __PRETTY_FUNCTION__); + pim_upstream_mroute_add(up->channel_oil, + __PRETTY_FUNCTION__); } /* FIXME can join_desired actually be changed by pim_rpf_update() @@ -440,7 +441,7 @@ void pim_scan_individual_oil(struct channel_oil *c_oil, int in_vif_index) if (input_iface_vif_index == c_oil->oil.mfcc_parent) { if (!c_oil->installed) - pim_mroute_add(c_oil, __PRETTY_FUNCTION__); + pim_upstream_mroute_add(c_oil, __PRETTY_FUNCTION__); /* RPF unchanged */ return; @@ -490,7 +491,7 @@ void pim_scan_individual_oil(struct channel_oil *c_oil, int in_vif_index) /* update iif vif_index */ pim_channel_oil_change_iif(c_oil->pim, c_oil, input_iface_vif_index, __PRETTY_FUNCTION__); - pim_mroute_add(c_oil, __PRETTY_FUNCTION__); + pim_upstream_mroute_add(c_oil, __PRETTY_FUNCTION__); } void pim_scan_oil(struct pim_instance *pim) @@ -1008,7 +1009,7 @@ void pim_forward_stop(struct pim_ifchannel *ch, bool install_it) PIM_OIF_FLAG_PROTO_PIM, __func__); if (install_it && !up->channel_oil->installed) - pim_mroute_add(up->channel_oil, __PRETTY_FUNCTION__); + pim_upstream_mroute_add(up->channel_oil, __PRETTY_FUNCTION__); } void pim_zebra_zclient_update(struct vty *vty) |
