summaryrefslogtreecommitdiffstats
path: root/pimd/pimd.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: Make frr able to be built by gcc 10Tomas Korbar2020-02-201-5/+5
| | | | | | | | | | | | - Add extern modifier to some declarations in header file and move qpim_all_pim_routers_addr definition to pimd/pimd.c `GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors.` Taken from https://gcc.gnu.org/gcc-10/changes.html Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
* pimd : Add support for MLAG Register & Un-registerSatheesh Kumar K2019-11-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when ever a FRR Client wants to send any data to another node using MLAG Channel, uses below mechanisam. 1. sends a MLAG Registration to zebra with interested messages that it is intended to receive from peer. 2. In response to this request, Zebra opens communication channel with MLAG. and also in Rx. diretion zebra forwards only those messages which client shown interest during registration 3. when client is no-longer interested in communicating with MLAG, client posts De-register to Zebra 4. if this is the last client which is interested for MLAG Communication, zebra closes the channel. why PIM Needs MLAG Communication ================================ 1. In general on LAN Networks elecetd DR will send the Join towards Multicast RP in case of a LHR and Register in case of FHR. 2. But in case DR Goes down, traffic will be re-converged only after the New DR is elected, but this can take time based on Hold Timer to detect the DR down. 3. this can be optimised by using MLAG Mecganisam. 4. and also Traffic can be forwarded more efficiently by knowing the cost towards RP using MLAG Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
* Revert "Merge pull request #4885 from satheeshkarra/pim_mlag"Quentin Young2019-10-141-4/+0
| | | | | This reverts commit d563896dada99f3474d428f928786cbfde936fee, reversing changes made to 09ea1a40386f02a13cdb0462cc55af0d03f0c277.
* pimd : Add support for MLAG Register & Un-registerSatheesh Kumar K2019-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when ever a FRR Client wants to send any data to another node using MLAG Channel, uses below mechanisam. 1. sends a MLAG Registration to zebra with interested messages that it is intended to receive from peer. 2. In response to this request, Zebra opens communication channel with MLAG. and also in Rx. diretion zebra forwards only those messages which client shown interest during registration 3. when client is no-longer interested in communicating with MLAG, client posts De-register to Zebra 4. if this is the last client which is interested for MLAG Communication, zebra closes the channel. why PIM Needs MLAG Communication ================================ 1. In general on LAN Networks elecetd DR will send the Join towards Multicast RP in case of a LHR and Register in case of FHR. 2. But in case DR Goes down, traffic will be re-converged only after the New DR is elected, but this can take time based on Hold Timer to detect the DR down. 3. this can be optimised by using MLAG Mecganisam. 4. and also Traffic can be forwarded more efficiently by knowing the cost towards RP using MLAG Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
* pimd: sh config is showing detail debug, though not configuredSatheesh Kumar K2019-08-271-0/+3
| | | | | | | | | | | | | | Original Idea is to display normal & detailed debugs when detailed debug alone is configured. because of this "sh debugs" are showing wrong Information, because same macro is used to disply the configured debugs. that means even if Normal debug is configured, detailed macro returns TRUE. To avoid this ambiguity check whetehr detailed debug is configured or not during dumping configured debugs. In all other places using old macro. Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
* pimd: debug pim XXX detail now include the non detail data as wellDonald Sharp2019-06-071-5/+8
| | | | | | | If you have turned on a pim debug XXX detail, also include the base form as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: PIM BSM Processing datastructure definition/initialization/deinitsaravanank2019-05-151-1/+5
| | | | | | | Apart from datastructure, bsm scope initialization and deinitialiation routines called during pim instance init and deinit. Also makefile changes. Signed-off-by: Saravanan K <saravanank@vmware.com>
* pimd: initial infrastructure to maintain VxLAN SG databaseAnuradha Karuppiah2019-04-201-0/+4
| | | | | | | | | | These entries will be used over the subsequent commits for 1. vxlan-tunnel-termination handling - setup MDT to rx VxLAN encapsulated BUM traffic. 2. vxlan-tunnel-origination handling - register local-vtep-ip as a multicast source. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* pimd: reject inconsistent address/mask "ip pim rp command"Sarita Patra2019-02-081-10/+11
| | | | | | | | | | | | | | Issue: Configure "ip pim rp x.x.x.x 225.0.0.0/4". Show running config shows "ip pim rp x.x.x.x 224.0.0.0/4" This is mis-leading. Root-cause: Internally 225.0.0.0/4 is getting converted to 224.0.0.0/4 group mask, since the prefix length is 4. Fix: Restrict the user to configure inconsistent group address mask by throughing a cli error "Inconsistent address and mask". Signed-off-by: Sarita Patra <saritap@vmware.com>
* pimd: Move register_probe_time to pim_routerDonald Sharp2019-01-041-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move packet_process variable to pim_routerDonald Sharp2019-01-041-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move register_suppress_time into struct pim routerDonald Sharp2019-01-041-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert rpf_cache_refresh_delay_msec into pim_router structDonald Sharp2019-01-041-1/+0
| | | | | | | Move the rpf_cache_refresh_delay_msec into the pim_router since it should own the data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move the infinite_assert_metric global to pim_routerDonald Sharp2019-01-041-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert qpim_t_periodic into the `struct pim_router` structureDonald Sharp2019-01-041-2/+1
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move debugs into pim_router structureDonald Sharp2019-01-041-81/+99
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Create a `struct pim_router` and move thread master into itDonald Sharp2019-01-041-1/+4
| | | | | | | | Create a `struct pim_router` and move the thread master into it. Future commits will further move global varaibles into the pim_router structure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: ALLOC calls cannot failDonald Sharp2018-08-111-1/+0
| | | | | | | | There is no need to check for failure of a ALLOC call as that any failure to do so will result in a assert happening. So we can safely remove all of this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move some data tracking variables per VRFDonald Sharp2018-03-181-6/+0
| | | | | | | There were a few more global variables that needed to be per vrf. So move them over. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Make the rpf scan per vrf.Donald Sharp2018-03-181-1/+0
| | | | | | | | | We know the vrf that we are in when we need to initiate a rescan of the rpf cache. So pass it in and use that information. This should help the rescan at scale with several vrf's cutting out a lot of unnecessary work. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Multicast traceroute client and routerMladen Sablic2018-02-191-0/+4
| | | | | | | | This commit is the implementation of weak multicast traceroute. It consists of IGMP module dealing with mtrace type IGMP messages and client program mtrace/mtracebis for initiating mtrace queries. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
* pimd: Add new 'debug pim nht rp' commandDonald Sharp2017-09-141-0/+5
| | | | | | | | | | All the rp debugs were a mish-mash of TRACE or ZEBRA, but the reality they were all focused on handling NHT issues associated with the RP's. So let's create a new debug 'debug pim nht rp' if you are having issues with RP's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: non-recursive pimdDavid Lamparter2017-09-071-0/+2
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Allow the keepalive time to be per vrf.Donald Sharp2017-07-281-2/+0
| | | | | | Allow the keepalive period to be per vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add `debug pim nht` commandDonald Sharp2017-07-241-0/+6
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add 'debug pim trace detail' commandDonald Sharp2017-07-241-0/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Make pim_ssmpingd.c 'struct pim_instance' awareDonald Sharp2017-07-241-2/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Refactore qpim_static_route_list into pim->static_routesDonald Sharp2017-07-241-1/+0
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Refactor code to be in better spotsDonald Sharp2017-07-241-37/+1
| | | | | | | | 1) Create pim_instance.[ch] to allow us to handle the instance information there 2) Refactor some pim_rpf_ and some pim_rp commands into appropriate files and appropriate includes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Create the pimreg per vrfDonald Sharp2017-07-241-0/+2
|
* pimd: Create pim_get_pim_instanceDonald Sharp2017-07-241-0/+2
| | | | | | Create function to get the pim instance from the vrf_id Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move thread read to struct pim_instanceDonald Sharp2017-07-241-0/+1
| | | | | | | | | When we are handling the thread read/writes for a pim mroute socket, make it so that it can be appropriately handled by the 'struct pim_instance' instead of defaulting to the default VRF's Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Save pim instance on vrf pointerDonald Sharp2017-07-241-1/+1
| | | | | | | | | | | | | This commit does these things: 1) Saves the pim instance created on the vrf pointer 2) Moves some initialization to the proper spot. 3) Remove vrf_id from 'struct pim_ssm' it is not needed 4) Removes some checks to prevent non-default vrf's from being created. 5) When creating the pim instance, save default vrf in pimg to allow backwards compatibility Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start conversion of socket and counters for VRFDonald Sharp2017-07-241-6/+7
| | | | | | | | Convert the socket fd to be owned by the pimg pointer as well as the counters associated with the fd. This will allow us to future proof our code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-50/+47
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Remove qpim_inaddr_anyDonald Sharp2017-06-021-1/+0
| | | | | | | | In prep for switching over to having PIM understand VRF remove the qpim_inaddr_any global variable and just use INADDR_ANY directly. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-18/+17
| | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'origin/stable/3.0'Donald Sharp2017-05-021-1/+4
|\
| * Merge branch 'stable/3.0' into pim_dev_3_0Jafar Al-Gharaibeh2017-04-281-1/+4
| |\
| | * pimd: Add prefix list handling to spt-switchoverDonald Sharp2017-04-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To the 'ip pim spt-switchover infinity-and-beyond' command add 'prefix-list <PLIST>'. To the command. Use this as the basis to deny (Not immediate switchover) or permit (Immediate switchover), based upon matching the group address and the prefix-list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | pimd: Pim Nexthop Tracking support with ECMPChirag Shah2017-04-251-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com> (cherry picked from commit cba444817883b8b3b22a7ed9958dc9ed77f76230)
* | Merge pull request #345 from chiragshah6/pim_devRenato Westphal2017-04-241-0/+3
|\ \ | | | | | | pimd: Pim ECMP changes along with nexthop tracking using cached DB
| * | pimd: Pim Nexthop Tracking support with ECMPChirag Shah2017-04-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | Merge pull request #304 from donaldsharp/pim_5549Jafar Al-Gharaibeh2017-04-101-0/+3
|\ \ \ | |_|/ |/| | Pim 5549 Additions
| * | Merge branch 'master' into pim_5549Donald Sharp2017-04-011-0/+6
| |\|
| * | pimd: Add code to allow backwards compatibilityDonald Sharp2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code change adds the ability to specify that we should be able to work with older versions of PIM. In future commits we will actually use this data. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | pimd: Add the ability to never SPT switchoverDonald Sharp2017-04-051-0/+8
| |/ |/| | | | | | | | | | | Add the ability to allow pim to determine if we should allow spt-switchover or not on the LHR. Signed-off-by: Donald Sharp
* | pimd: Allow SSM groups to co-exist with ASM groups.anuradhak2017-03-231-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSM groups (232/8 or user configured SSM range) can exist in the same multicast network as ASM groups. For such groups all RPT related state machine operations have to be skipped as defined by section 4.8 of RFC4601 - 1. Source registration is skipped for SSM groups. For SSM groups mroute is setup on the FHR when a new multicast flow is rxed; however source registration (i.e. pimreg join) is skipped. This will let the ASIC black hole the traffic till a valid OIL is added to the mroute. 2. (*,G) IGMP registrations are ignored for SSM groups. Sample output: ============= fhr# sh ip pim group-type SSM group range : 232.0.0.0/8 fhr# sh ip pim group-type 232.1.1.1 Group type: SSM fhr# sh ip pim group-type 239.1.1.1 Group type: ASM fhr# Sample config: ============= fhr(config)# ip pim ssm prefix-list ssm-ranges fhr(config)# Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-15344 Testing Done: 1. SSM/ASM source-registration/igmp-joins. 2. On the fly multicast group type changes. 3. pim-smoke.
* pimd: Nexthop tracking supportChirag Shah2017-03-161-0/+13
| | | | | | | | | | | | | Add pim Nexthop tracking feature 1st part where, specific RP or Source address (unicast address) register with Zebra. Once nexthop update received from Zebra for a given address, scan RP or upstream entries impacted by the change in nexthop. Reviewed By: CCR-5761, Donald Sharp <sharpd@cumulusnetworks.com> Testing Done: Tested with multiple RPs and multiple *,G entries at LHR. Add new Nexthop or remove one of the link towards RP and verify RP and upstream nexthop update. similar test done at RP with multiple S,G entries to reach source. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: Hide 'ip multicast-routing' commandDonald Sharp2017-03-021-3/+0
| | | | | | | | | Automatically turn on pim if the daemon is turned on. Hide the 'ip multicast-routing' command Disable the 'no ip multicast-routing' command Do not display the 'ip multicast-routing' command. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>