summaryrefslogtreecommitdiff
path: root/pimd/pim_ifchannel.h
AgeCommit message (Collapse)Author
2023-03-24*: Rename `struct thread` to `struct event`Donald Sharp
Effectively a massive search and replace of `struct thread` to `struct event`. Using the term `thread` gives people the thought that this event system is a pthread when it is not Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-02-14pim6d: IPv6-adjust pim_ifchannel_*David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-12pimd: `prefix_sg` => `pim_sgaddr`David Lamparter
Mostly just 2 sed calls: - `sed -e 's%struct prefix_sg%pim_sgaddr%g'` - `sed -e 's%memset(&sg, 0, sizeof(pim_sgaddr));%memset(\&sg, 0, sizeof(sg));%g'` Plus a bunch of fixing whatever that broke. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-01-10pimd: Modifying in_addr to pim_addr in struct pim_ifchannel for IPv6.Mobashshera Rasool
Changed struct in_addr ifassert_winner to pim_addr which will be used in both IPv4 and IPv6(Both MLD and IGMP). Reviewed-by: Sarita Patra <saritap@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-11-25pimd: removing no caller functionsSai Gomathi
Removing the no caller function declarations and definitions in pimd directory. Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-08-27pimd: de-circularize includesDavid Lamparter
pimd's include files are very interdependent. Let's chop that down a bit to gain some flexibility. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-11-02pimd: (*,G) Prune processing doesn't remove SGRpt ifchannelvdhingra
problem : ========= When (*,G) prune received where we have SGRpt state, ifchannel goes to NO_INFO state and doesn't get removed. Root cause : ============ During the processing of (*,G) prune, we are not removing the ifchannel on PruneTmp or PrunePendingTmp state. Fix : ===== In that scenario, stop joinExpiry timer and delete the ifchannel. issue #7347 Co-authored-by: Saravanan K <saravanank@vmware.com> Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-03-16pimd: fix OIL not removed after IGMP pruneSarita Patra
Issue: Client1------LHR-----(int-1)RP(int-2)------client2 Client2 send IGMP join for group G. Client1 send IGMP join for group G. verify show ip mroute in RP, will have 2 OIL. Client2 send IGMP leave. Verify show ip mroute in RP, will still have 2. Root cause: When RP receives IGMP join from client2, it creates a (s,g) channel oil and add the interface int-2 into oil list and set the flag PIM_OIF_FLAG_PROTO_IGMP to int-2 Client1 send IGMP join, LHR will send a (*,G) join to RP. RP will add the interface int-1 into the oil list of (s,g) channel_oil and will set the flag PIM_OIF_FLAG_PROTO_IGMP and PIM_OIF_FLAG_PROTO_PIM to the int-1 and set PIM_OIF_FLAG_PROTO_PIM to int-2 as well. It is happening because of the pim_upstream_inherited_olist_decide() and forward_on() get all the oil and update the flag wrongly. So now when client 2 sends IGMP prune, RP will not remove the int-2 from oil list since both PIM_OIF_FLAG_PROTO_PIM & PIM_OIF_FLAG_PROTO_IGMP are set, it just unset the flag PIM_OIF_FLAG_PROTO_IGMP. Fix: Introduced new flags in if_channel, PIM_IF_FLAG_MASK_PROTO_PIM & PIM_IF_FLAG_MASK_PROTO_IGMP. If a if_channel is created because of pim join or pim (s,g,rpt) prune received, then set the flag PIM_IF_FLAG_MASK_PROTO_PIM. If a if_channel is created becuase of IGMP join received, then set the flag PIM_IF_FLAG_MASK_PROTO_IGMP. When an interface needs to be added into the oil list check if PIM_IF_FLAG_MASK_PROTO_PIM or PIM_IF_FLAG_MASK_PROTO_IGMP is set, then update oil flag accordingly. Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-02-14pimd: stop overloading SRC_IGMP upstream for vxlan local membershipAnuradha Karuppiah
A local membership is created on the vxlan termination device ipmr-lo. This is done to - 1. Pull multicast vxlan tunnel traffic to the VTEP for termination by triggering JoinDesired on the BUM multicast group. 2. Include the OIF in the mroute to signal to the dataplane component that flow needs to be vxlan terminated. Earlier we were overloading the PIM_UPSTREAM_FLAG_MASK_SRC_IGMP for this local membership creation but that is creating confusion both in the state machine and in the show outputs. To avoid that we use the more apparent PIM_UPSTREAM_FLAG_MASK_SRC_VXLAN_TERM. With this change - 1. We get LHR functionality for VXLAN_TERM mroutes 2. OIF is populated with PIM_OIF_FLAG_PROTO_PIM only Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-05-14lib: hashing functions should take const argumentsQuentin Young
It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-11pimd: Cleanup ifchannel deletionDonald Sharp
When we are being told to go away, cleanup ifchannel deletion a bit better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2017-08-24pimd: Cleanup S,GRPt prune handling on Mroute LossDonald Sharp
1) Clean up display of S,GRPt prune state to be more meaningful 2) Upon receipt of a S,GRPt prune make sure we transition to the correct state 3) Upon loss of a S,GRPt prune make sure we transition to the correct state as well as immediately send a *,G join upstream to propagate the loss of the prune. 4) Removal of a weird S,G state being installed upon loss of a S,G RPt prune. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-02pimd: Convert to using a RB tree for the pim_ifp ifchannel_listDonald Sharp
This patch does two things: 1) Converts the pim_ifp->ifchannel_list to a pim_ifp->ifchannel_rb 2) Removes the hashing to use the RB RB_FIND instead. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24pimd: Fix code to not send joins when SGRPT Prune is receivedDonald Sharp
When we receive a SGRPT Prune we were switching the upstream to JOINED and immediately sending a join. This was not the right thing to do. This was happening because we were making decisions about the new ifchannel before it was fully formed. Rework ifchannel startup to provide enough information to the pim upstream data structure to make the right decisions Ticket: CM-16425 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-06Merge branch 'stable/3.0'David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18pimd: Fix to Tx S,G Join when SGRpt->Join stateChirag Shah
-Upon Rx (*,G) Join w/o SGRpt at RP, trigger (S,G) Join towards FHR, unset SGRpt flag from channel, add (*,G) oif to (S,G) entry. -Add I am not RP check to triger SGRpt on *,G path otherwise, send S,G Prune on SPT path from RP to FHR upon receving *,G Prune. -Upon Rx SGRpt receive, remove OIF(downstream where Prune received) from specific S,G. Testing Done: pim-smoke Ran 95 tests in 11790.552s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
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>
2017-04-25pimd: Fix WG/SGRpt & WG J/P processingChirag Shah
During processing of Join/Prune, for a S,G entry, current state is SGRpt, when only *,G is received, need to clear SGRpt and add/inherit the *,G OIF to S,G so it can forward traffic to downstream where *,G is received. Upon receiving SGRpt prune remove the inherited *,G OIF. Testing Done: Trigger SPT switchover, *,G path received SGRpt later data traffic stopped S,G ages out from LHR, sends only *,G join to upstream, verified S,G entry inherit the OIF. Upon receiving SGRpt deletes inherited oif and retains in SGRpt state. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-03-17pimd: Add display of SGRpt state for ifchannelDonald Sharp
When we get a SGrpt Prune embedded in the *,G Join, Display the created ifchannel as being SGRpt state. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24pimd: Make ifchannel lookup a hash lookupDonald Sharp
When we are at scale, it is possible that we have a very large number of ifchannels per interface. So make lookup for that situation to be a hash lookup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24pimd: Narrow inheritance search down to interface we are interested in.Donald Sharp
When we are only looking at one ifchannel, for inheritance, narrow the search down to only the interface/ifchannel we are interested in Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30pimd: Use correct flag to add an oifDonald Sharp
When we are creating the igmp ifchannel we were creating it with both a P and a I flag. This was causing it to not be cleaned up properly when the interface was shut down. Subsuquently when the interface came back up we would attempt to add it back in but it would fail. Ticket: CM-14586 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19pimd: Cleanup the headers.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp
2016-12-21pimd: Allow storing of sg in string formatDonald Sharp
Debugs are extremely expensive currently. Let's store 'struct prefix_sg sg' string format in the ifchannel, upstream and msdp_sa structures. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add Handler for Receive (*,G) join for (S,G,rpt)Donald Sharp
According to Figure 5( Downstream per-interface (S,G,rpt) state when we receive a (*,G) we need to move (S,G,rpt) children of the (*,G) into different states. This implements that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add ability to know if ifchannel is (S,G,rpt)Donald Sharp
Add ability to track (S,G,rpt) ifchannel prunes. Add ability to display this data in json. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Add ability for ifchannel *,G to know their S,G'sDonald Sharp
Add the ability for pim ifchannels *,G's to know their corresponding S,G's. This will facilitate handling S,G,rpt state information better. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Start (S,G,rpt) codingDonald Sharp
Start putting some infrastructure for (S,G,rpt) handling Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Clean up the interface deletionDonald Sharp
When cleaning up the interface, actually clean up data associated with that interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Further work to fix rpf lookups and nbrsDonald Sharp
When we do a RPF lookup return a path that we have neighbors for in those cases where we need to have a neighbor to pass along the SG state via a pim join/prune message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Turn on forwarding for a late added interface.Donald Sharp
If we receive a join for a upstream interface that hasn't yet been added to pim for working under it, we never go back and add the forwarding on when we get the interface added to pim. Ticket: CM-11800 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21lib, pimd: Fix borked up prefix codeDonald Sharp
Fix the struct prefix to be an actual struct prefix_sg. This cleans up a bunch of code to make it look nicer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove Wrong PIMREG ifchannel stateDonald Sharp
The PIMREG ifchannel state is an evolutionary dead-end. I should not have introduced this code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Allow ifchannel S,G's to know their *,G parentDonald Sharp
Given a S,G ifchannel, create a parent pointer for any *,G state for that interface. When removing a *,G remove S,G pointers. We need to think about the case where their is a *,G but no S,G for a interface when we are determing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove unnecessary QuaggaIdDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert pim_ifchannel_local_membership_del to struct prefix *sgDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: convert pim_ifchannel_local_membership_add to use struct prefix sgDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert pim_ifchannel_prune to use struct prefix *sgDonald Sharp
Convert the pim_ifchannel_prune function to use a struct prefix *sg for the source group. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert pim_ifchannel_join_add to struct prefix *sgDonald Sharp
Convert the pim_ifchannel_join_add to use a struct prefix *sg instead of struct in_addr's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: more source,group conversion to prefix sgDonald Sharp
Convert more of the code to pass around a 'struct prefix sg' instead of individual struct addr's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Convert ifchannel to using a prefix to store (s,g)Donald Sharp
Convert ifchannel to use a prefix to store (s,g) information. Additionally create pim_str_sg_dump function to output data when using debugs. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: First Schwag at pim_register_stopDonald Sharp
Implement the pim_register_stop state machine. There are still a few bugs still but this is enough to get us rolling a bit more. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-20build: remove $Format tagsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-05-25pimd: merge pimd as of 2015-01-19David Lamparter
Welcome pimd to the Quagga daemon zoo! This is a merge of commit 77ae369 ("pimd: Log ifindex found for an interface when zebra lib reports a new connected address."), with the intermediate "reconnect" changes removed (c9adf00...d274381). d274381 is replaced with b162ab7, which includes some changes. In addition, 4 reconnect-related changes and 1 cosmetic one have been bumped out. The rebase command used to produce the branch that is merged here is: git rebase --onto b162ab7 c9adf00 77ae369 Note that 3 patches had their author rewritten from "Anonymous SR#108542 <>" (which is not a valid git author ID) to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address listed in the associated Savannah ticket) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>