]> git.proxmox.com Git - mirror_frr.git/commit - pimd/pim_mroute.c
pimd: decide between SPT based and RPT based forwarding
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 15 Nov 2019 18:40:00 +0000 (10:40 -0800)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 15 Nov 2019 20:00:29 +0000 (12:00 -0800)
commit69e3538cd89b070d3434192bb28b94d7b721ceeb
treee3fdd4b4187869235bd3aed0900c9a48687e7b80
parenta155fed53cbc26c5569c64280549b7bf1f1e82c2
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>
pimd/pim_mroute.c
pimd/pim_mroute.h
pimd/pim_oil.c
pimd/pim_static.c
pimd/pim_upstream.c
pimd/pim_upstream.h
pimd/pim_vxlan.c
pimd/pim_zebra.c