]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agopimd: Convert to using a RB tree for the pim_ifp ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 16:44:20 +0000 (12:44 -0400)]
pimd: Convert to using a RB tree for the pim_ifp ifchannel_list

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>
7 years agopimd: Rename pim_ifp->pim_ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 14:41:12 +0000 (10:41 -0400)]
pimd: Rename pim_ifp->pim_ifchannel_list

Remove the redundant information in pim_ifp->pim_ifchannel_list
just call it pim_ifp->ifchannel_list

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove almost duplicate pim->ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 13:58:42 +0000 (09:58 -0400)]
pimd: Remove almost duplicate pim->ifchannel_list

The pim->ifchannel_list can be duplicated by iterating
over each vrf and then over each pim_ifp->pim_ifchannel_list
Since list handling is taking allot of time at scale
convert over to using this value.

Additionally clean up pim_cmd.c to have helper functions
to handle the actual encoding of data for output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: fix `show ip msdp...` NPD when vrf unknown
Quentin Young [Wed, 19 Jul 2017 19:02:35 +0000 (15:02 -0400)]
pimd: fix `show ip msdp...` NPD when vrf unknown

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: Fix msdp cleanup issues
Donald Sharp [Fri, 14 Jul 2017 17:16:45 +0000 (13:16 -0400)]
pimd: Fix msdp cleanup issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Allow the keepalive time to be per vrf.
Donald Sharp [Thu, 13 Jul 2017 01:16:00 +0000 (21:16 -0400)]
pimd: Allow the keepalive time to be per vrf.

Allow the keepalive period to be per vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Setup hash names appropriately
Donald Sharp [Tue, 25 Jul 2017 13:45:03 +0000 (09:45 -0400)]
pimd: Setup hash names appropriately

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: NHT upstream list is inefficient
Donald Sharp [Wed, 12 Jul 2017 22:17:31 +0000 (18:17 -0400)]
pimd: NHT upstream list is inefficient

The NHT upstream list at scale is horribly inefficient due to keeping
a sorted list of upstream entries.  The attempting to find
the upstream and the insertion of it into the upstream_list
was consuming a large amount of cpu cycles.

Convert to a hash, allow add/deletions to effectively become
O(1) events.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Clean PNC cache handling on shutdown
Donald Sharp [Fri, 14 Jul 2017 17:29:47 +0000 (13:29 -0400)]
pimd: Clean PNC cache handling on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Use JSON_STR
Donald Sharp [Tue, 25 Jul 2017 12:19:57 +0000 (08:19 -0400)]
pimd: Use JSON_STR

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Warn to stderr in failure case for test_igmpv3_join
Donald Sharp [Mon, 24 Jul 2017 17:57:51 +0000 (13:57 -0400)]
pimd: Warn to stderr in failure case for test_igmpv3_join

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup unused assignment
Donald Sharp [Wed, 12 Jul 2017 19:54:47 +0000 (15:54 -0400)]
pimd: Cleanup unused assignment

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix missing docstring in 'no debug pim trace detail'
Donald Sharp [Tue, 11 Jul 2017 19:17:34 +0000 (15:17 -0400)]
pimd: Fix missing docstring in 'no debug pim trace detail'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix linux build on older kernels
Donald Sharp [Tue, 11 Jul 2017 18:15:23 +0000 (14:15 -0400)]
pimd: Fix linux build on older kernels

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Stop looking when we find a matching nexthop
Donald Sharp [Tue, 11 Jul 2017 17:39:08 +0000 (13:39 -0400)]
pimd: Stop looking when we find a matching nexthop

When we receive a new ecmp path and the old nexthop is still
valid.  There existed some cases where we would continue looking
for a nexthop( and thus loose the fact that we had found it )
after found.

Ticket: CM-16983
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
7 years agopimd: Allow installation of NULL mroute in some situations
Donald Sharp [Mon, 10 Jul 2017 13:45:04 +0000 (09:45 -0400)]
pimd: Allow installation of NULL mroute in some situations

When we receive a S,G,RPT prune as part of a *,G tree, install
the NULL oil S,G mroute.  This will cause the traffic to stop
flowing for this particular S,G as we expect.

Ticket: CM-16978
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix 'show ip mroute vrf all count' crash
Donald Sharp [Fri, 7 Jul 2017 21:55:10 +0000 (17:55 -0400)]
pimd: Fix 'show ip mroute vrf all count' crash

'show ip mroute vrf all count' crashes currently

This commit fixes that issue

Ticket: CM-17052
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Convert get_stats to use new kernel interface
Donald Sharp [Wed, 5 Jul 2017 15:53:29 +0000 (11:53 -0400)]
zebra: Convert get_stats to use new kernel interface

Convert the XXX_get_stats functions to use the new
kernel interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add 'vrf all' commands where needed
Donald Sharp [Fri, 7 Jul 2017 15:29:53 +0000 (11:29 -0400)]
pimd: Add 'vrf all' commands where needed

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix unininitialized data usage found by clang
Donald Sharp [Thu, 6 Jul 2017 20:48:57 +0000 (16:48 -0400)]
pimd: Fix unininitialized data usage found by clang

clang 5.0 to the rescue!

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix pim not recognizing itself as an RP in some cases
Donald Sharp [Thu, 6 Jul 2017 17:44:18 +0000 (13:44 -0400)]
pimd: Fix pim not recognizing itself as an RP in some cases

During normal course of operations, zebra sends the ZEBRA_INTERFACE_VRF_UPDATE
call up into all connected zclients.  In the case of PIM the
zlookup was expecting a min length of 10, but ZEBRA_INTERFACE_VRF_UPDATE
was sending of size 6.  This min length check makes no sense,
so just remove.

Ticket: CM-16976
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agopimd: Fixup NHT debugging to be a bit more coherent
Donald Sharp [Thu, 6 Jul 2017 13:57:35 +0000 (09:57 -0400)]
pimd: Fixup NHT debugging to be a bit more coherent

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add `debug pim nht` command
Donald Sharp [Fri, 30 Jun 2017 14:43:21 +0000 (10:43 -0400)]
pimd: Add `debug pim nht` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Ensure that we properly shutdown threads on start failure
Donald Sharp [Thu, 29 Jun 2017 15:50:22 +0000 (11:50 -0400)]
pimd: Ensure that we properly shutdown threads on start failure

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Put 'struct pim_instance *' as the first function parameter
Donald Sharp [Thu, 29 Jun 2017 14:45:38 +0000 (10:45 -0400)]
pimd: Put 'struct pim_instance *' as the first function parameter

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix some small crashes in pim
Donald Sharp [Thu, 29 Jun 2017 13:20:42 +0000 (09:20 -0400)]
pimd: Fix some small crashes in pim

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix crash with ifchannel and upstream
Donald Sharp [Mon, 26 Jun 2017 17:14:47 +0000 (13:14 -0400)]
pimd: Fix crash with ifchannel and upstream

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Set sptbit when we send the register stop
Donald Sharp [Thu, 22 Jun 2017 16:58:02 +0000 (12:58 -0400)]
pimd: Set sptbit when we send the register stop

Ticket: CM-15512
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add 'show ip mroute vrf all [json]' command
Donald Sharp [Wed, 21 Jun 2017 23:44:20 +0000 (19:44 -0400)]
pimd: Add 'show ip mroute vrf all [json]' command

Add the ability to dump all the vrf's associated
with pim.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix code to not send joins when SGRPT Prune is received
Donald Sharp [Thu, 22 Jun 2017 15:05:03 +0000 (11:05 -0400)]
pimd: Fix code to not send joins when SGRPT Prune is received

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>
7 years agopimd: display down ports show ip pim interface
Chirag Shah [Thu, 22 Jun 2017 19:09:02 +0000 (12:09 -0700)]
pimd: display down ports show ip pim interface

In show ip pim interface and  show ip pim interface <intf>
display State "down" pim enabled interfaces.

Ticket:CM-16809
Reviewed By:CCR-6398
Testing Done:
show ip pim interface
Interface  State          Address  PIM Nbrs           PIM DR  FHR IfChannels
br1           up          2.0.1.1         0            local    0          0
lo            up          6.0.0.1         0            local    0          0
pimreg        up          0.0.0.0         0            local    0          0
swp1        down          6.0.1.1         0            local    0          0
swp2          up          6.0.2.1         1            local    0          0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agopimd: Add a check for needing spt bit in register_recv
Donald Sharp [Fri, 16 Jun 2017 19:23:49 +0000 (15:23 -0400)]
pimd: Add a check for needing spt bit in register_recv

When we receive a register message for an existing S,G
and the SPT bit is not set, then do a quick check against
the S,G to see if we have counters updated.  This is added
because the existing S,G wheel_timer only updates every
31 seconds and it is possible for a Null Register to
have come in before that first 30 second timer pops.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove unnecessary debug.
Donald Sharp [Wed, 21 Jun 2017 16:43:41 +0000 (12:43 -0400)]
pimd: Remove unnecessary debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Ensure that (S,G) output is consistent
Donald Sharp [Wed, 21 Jun 2017 16:26:23 +0000 (12:26 -0400)]
pimd: Ensure that (S,G) output is consistent

Ensure that displayed (S,G) output in logs is
consistent for all debugs.  This will make it
easier to grep for interesting data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoRevert "pimd: Modify wait time for response from Null Register"
Donald Sharp [Wed, 21 Jun 2017 13:33:48 +0000 (09:33 -0400)]
Revert "pimd: Modify wait time for response from Null Register"

This reverts commit 70989c7c20b4b2ed5d826ba875fbced0384ddafd.

7 years agopimd: Fixup PIM to handle vrf autocompletion
Donald Sharp [Tue, 20 Jun 2017 17:47:59 +0000 (13:47 -0400)]
pimd: Fixup PIM to handle vrf autocompletion

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Only add a igmp socket if the address is ipv4
Donald Sharp [Tue, 20 Jun 2017 13:25:36 +0000 (09:25 -0400)]
pimd: Only add a igmp socket if the address is ipv4

When the secondary addresses got expanded to allow
v6 on the list, we needed to limit the igmp sockets
to just v4 currently.

Ticket: CM-16858
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: Fix ambiguous command
Donald Sharp [Fri, 16 Jun 2017 15:31:36 +0000 (11:31 -0400)]
pimd: Fix ambiguous command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Convert code to handle vrf autocompletion
Donald Sharp [Thu, 15 Jun 2017 17:55:28 +0000 (13:55 -0400)]
pimd: Convert code to handle vrf autocompletion

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: When we get nexthops back we may not have configured pim on all intfs
Donald Sharp [Thu, 15 Jun 2017 17:53:04 +0000 (13:53 -0400)]
pimd: When we get nexthops back we may not have configured pim on all intfs

Be aware that we may not have pim configured on all interfaces when
we have a failure situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Prevent Lockup when waiting for response from zebra
Donald Sharp [Thu, 15 Jun 2017 00:02:38 +0000 (20:02 -0400)]
pimd: Prevent Lockup when waiting for response from zebra

When we have vrf config that we have not fully setup yet,
(ie zebra knows nothing about it yet), when attempting to
do a nexthop_lookup, zebra will just drop the request
if it doesn't know about the vrf.

In this case, we need to safely not ask for the information

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Wisely delay startup of msdp listen/connect when vrf is not fully up
Donald Sharp [Wed, 14 Jun 2017 23:59:02 +0000 (19:59 -0400)]
pimd: Wisely delay startup of msdp listen/connect when vrf is not fully up

When we do not really have the vrf up, wisely do not attempt
to dereference the ifp looked up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix crash when looking up incoming interface
Donald Sharp [Wed, 14 Jun 2017 22:45:47 +0000 (18:45 -0400)]
pimd: Fix crash when looking up incoming interface

It is possible that the incoming interface lookup
will fail because we are in transition from one vrf
to another.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: We need to trace removal of non v4 addresses too
Donald Sharp [Wed, 14 Jun 2017 18:24:39 +0000 (14:24 -0400)]
pimd: We need to trace removal of non v4 addresses too

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Allow pim to work in vrf's without explicitly configuring the vrf device
Donald Sharp [Wed, 14 Jun 2017 17:11:35 +0000 (13:11 -0400)]
pimd: Allow pim to work in vrf's without explicitly configuring the vrf device

Under vrf's pim needs to have a socket listening for pim packets on the vrf
device so that we can actually get the packets.  As such when we configure
up a vrf interface, configure just enough to allow it to listen on the
device and to do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: When we are initializing a pim socket limit hellos
Donald Sharp [Wed, 14 Jun 2017 14:54:41 +0000 (10:54 -0400)]
pimd: When we are initializing a pim socket limit hellos

When we are initializing a pim socket for vrf or loopback
interfaces do not schedule a hello to go out at all.

I'm currently leaving the check on is a vrf / loopback
device on the actual send as that we have several paths
to get there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove knowledge of HAVE_TCP_ZEBRA from pim
Donald Sharp [Wed, 14 Jun 2017 00:11:06 +0000 (20:11 -0400)]
pimd: Remove knowledge of HAVE_TCP_ZEBRA from pim

pim was the only routing daemon to have any knowledge
of how zebra connects to each daemon.  There is no
need for this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Ensure packet received on vrf interface is configured for pim
Donald Sharp [Tue, 13 Jun 2017 17:49:38 +0000 (13:49 -0400)]
pimd: Ensure packet received on vrf interface is configured for pim

In a vrf configuration, when we receive a pim packet we lookup
the correct incoming interface.  There exists a chance that
the correct incoming interface has not been configured to use
pim yet.  gracefully bow out and do nothing with the packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib, pimd, zebra: Allow pim to set pimregX into appropriate vrf
Donald Sharp [Tue, 13 Jun 2017 12:59:32 +0000 (08:59 -0400)]
lib, pimd, zebra: Allow pim to set pimregX into appropriate vrf

The pimregX devices when created by the kernel are put into
the default vrf.  When pim gets the callback that the device
exists, check to see if it is a pimregX device and if so
move it into the appropriate vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Bind msdp listen socket to vrf
Donald Sharp [Sat, 10 Jun 2017 19:05:31 +0000 (15:05 -0400)]
pimd: Bind msdp listen socket to vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup shutdown of vrf
Donald Sharp [Sat, 10 Jun 2017 19:03:03 +0000 (15:03 -0400)]
pimd: Cleanup shutdown of vrf

When shutting down the vrf don't kill the default vrf
when attempting to cleanup something else.

Also move the terminate to the right spot.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix msdp show command
Donald Sharp [Thu, 8 Jun 2017 12:37:02 +0000 (08:37 -0400)]
pimd: Fix msdp show command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: For non-default vrf's bind the msdp socket to the vrf
Donald Sharp [Wed, 7 Jun 2017 20:24:07 +0000 (16:24 -0400)]
pimd: For non-default vrf's bind the msdp socket to the vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix 'show ip pim state...' vrf changes
Donald Sharp [Tue, 6 Jun 2017 19:09:51 +0000 (15:09 -0400)]
pimd: Fix 'show ip pim state...' vrf changes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow S,G lookup to use RTNL_FAMILY_IPMR
Donald Sharp [Tue, 6 Jun 2017 14:18:17 +0000 (10:18 -0400)]
zebra: Allow S,G lookup to use RTNL_FAMILY_IPMR

This current implementation unfortunately must
ask the kernel for all mroutes because vrf's
do not have the ability to request a single
mroute at this time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: debug guard error message
Donald Sharp [Tue, 6 Jun 2017 14:17:45 +0000 (10:17 -0400)]
pimd: debug guard error message

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Remove strcpy from fast path
Donald Sharp [Tue, 6 Jun 2017 14:17:06 +0000 (10:17 -0400)]
zebra: Remove strcpy from fast path

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup some join debug messages
Donald Sharp [Mon, 5 Jun 2017 17:44:15 +0000 (13:44 -0400)]
pimd: Cleanup some join debug messages

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix help string
Donald Sharp [Mon, 5 Jun 2017 17:39:08 +0000 (13:39 -0400)]
pimd: Fix help string

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add 'debug pim trace detail' command
Donald Sharp [Mon, 5 Jun 2017 17:15:47 +0000 (13:15 -0400)]
pimd: Add 'debug pim trace detail' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Reschedule the correct interface for incoming packets
Donald Sharp [Mon, 5 Jun 2017 16:10:31 +0000 (12:10 -0400)]
pimd: Reschedule the correct interface for incoming packets

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Trust the recvfromto ifindex information
Donald Sharp [Sat, 3 Jun 2017 00:22:39 +0000 (20:22 -0400)]
pimd: Trust the recvfromto ifindex information

The vrf interface is receiving the pim packet
instead of the slave interface that is bound.

Lookup the ifindex ifp pointer from that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Don't send hello's out vrf interface
Donald Sharp [Fri, 2 Jun 2017 22:23:11 +0000 (18:23 -0400)]
pimd: Don't send hello's out vrf interface

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: We may receive a igmp packet in on unconfiged intf
Donald Sharp [Fri, 2 Jun 2017 21:17:44 +0000 (17:17 -0400)]
pimd: We may receive a igmp packet in on unconfiged intf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix dropped(?) telling of the kernel to recv cmsg data
Donald Sharp [Fri, 2 Jun 2017 17:30:48 +0000 (13:30 -0400)]
pimd: Fix dropped(?) telling of the kernel to recv cmsg data

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix mixup in addition to vrf node
Donald Sharp [Fri, 2 Jun 2017 12:16:13 +0000 (08:16 -0400)]
pimd: Fix mixup in addition to vrf node

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Bind pim kernel fd to appropriate vrf
Donald Sharp [Thu, 1 Jun 2017 22:59:43 +0000 (18:59 -0400)]
pimd: Bind pim kernel fd to appropriate vrf

Bind the pim kernel fd to the appropriate vrf, modify
the callback up into pim with the IGMP report to
retrieve the incoming interface and use that to
lookup the correct interface to use.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Push 'struct pim_instance *' a bit further
Donald Sharp [Fri, 26 May 2017 14:30:31 +0000 (10:30 -0400)]
pimd: Push 'struct pim_instance *' a bit further

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix crash when attempting to use channel_oil->pim before it is assigned
Donald Sharp [Fri, 26 May 2017 13:07:16 +0000 (09:07 -0400)]
pimd: Fix crash when attempting to use channel_oil->pim before it is assigned

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup some basic crashes from mistakes made converting to vrf
Donald Sharp [Wed, 24 May 2017 14:37:23 +0000 (10:37 -0400)]
pimd: Cleanup some basic crashes from mistakes made converting to vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix crash in 'show ip multicast vrf..'
Donald Sharp [Wed, 24 May 2017 11:45:18 +0000 (07:45 -0400)]
pimd: Fix crash in 'show ip multicast vrf..'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Convert pim_cmd.c to use correct pim instance
Donald Sharp [Tue, 23 May 2017 12:57:11 +0000 (08:57 -0400)]
pimd: Convert pim_cmd.c to use correct pim instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix instance startup to separate data structure setup from use
Donald Sharp [Tue, 23 May 2017 11:43:47 +0000 (07:43 -0400)]
pimd: Fix instance startup to separate data structure setup from use

Fix the instance startup to allow separation between the data structure
setup for pim instances from actual attempt to use.  More than
likely there will be other issues that need to be fixed but
this gets us 'working' again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add vrf help strings to some commands
Donald Sharp [Tue, 23 May 2017 11:34:19 +0000 (07:34 -0400)]
pimd: Add vrf help strings to some commands

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Start 'show ip pim [vrf NAME] ...' conversions
Donald Sharp [Tue, 23 May 2017 11:25:30 +0000 (07:25 -0400)]
pimd: Start 'show ip pim [vrf NAME] ...' conversions

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add some vrf knowledge to some debugging statements
Donald Sharp [Tue, 23 May 2017 11:24:52 +0000 (07:24 -0400)]
pimd: Add some vrf knowledge to some debugging statements

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add vrf ability to msdp show commands
Donald Sharp [Mon, 22 May 2017 22:14:43 +0000 (18:14 -0400)]
pimd: Add vrf ability to msdp show commands

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: All CONFIG_NODE commands are now available in VRF_NODE
Donald Sharp [Mon, 22 May 2017 20:32:14 +0000 (16:32 -0400)]
pimd: All CONFIG_NODE commands are now available in VRF_NODE

Note -> Some commands storage needs to be moved into pim_instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Create macro to get appropriate pim instance
Donald Sharp [Mon, 22 May 2017 20:12:41 +0000 (16:12 -0400)]
pimd: Create macro to get appropriate pim instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup the rest of the global config to be vrf aware for spacing
Donald Sharp [Mon, 22 May 2017 19:49:01 +0000 (15:49 -0400)]
pimd: Cleanup the rest of the global config to be vrf aware for spacing

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add code to write spaces or not before 'ip pim rp'
Donald Sharp [Mon, 22 May 2017 19:35:42 +0000 (15:35 -0400)]
pimd: Add code to write spaces or not before 'ip pim rp'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Get show run to display vrf sub mode
Donald Sharp [Mon, 22 May 2017 19:13:13 +0000 (15:13 -0400)]
pimd: Get show run to display vrf sub mode

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix intentional pass of NULL
Donald Sharp [Mon, 22 May 2017 18:52:18 +0000 (14:52 -0400)]
pimd: Fix intentional pass of NULL

pim_msdp_pkt_sa_gen is intentionally passed mp as NULL
in some cases, so we need to pass through the pim instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix startup of pim instance a bit
Donald Sharp [Mon, 22 May 2017 17:02:48 +0000 (13:02 -0400)]
pimd: Fix startup of pim instance a bit

We will need to refine the difference between create and enable
of a pim instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix crash associated with pim_ifp not actually being created yet
Donald Sharp [Mon, 22 May 2017 17:02:17 +0000 (13:02 -0400)]
pimd: Fix crash associated with pim_ifp not actually being created yet

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup pim_msg.c to use correct pim instance
Donald Sharp [Mon, 22 May 2017 15:18:22 +0000 (11:18 -0400)]
pimd: Cleanup pim_msg.c to use correct pim instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Make pim_ssmpingd.c 'struct pim_instance' aware
Donald Sharp [Mon, 22 May 2017 15:09:13 +0000 (11:09 -0400)]
pimd: Make pim_ssmpingd.c 'struct pim_instance' aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Make msdp `struct pim_instance *` aware
Donald Sharp [Mon, 22 May 2017 14:35:08 +0000 (10:35 -0400)]
pimd: Make msdp `struct pim_instance *` aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Make pim MSDP pim instance aware to some extent
Donald Sharp [Mon, 22 May 2017 13:12:08 +0000 (09:12 -0400)]
pimd: Make pim MSDP pim instance aware to some extent

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Get the default pim code ready to write into vrf's or not
Donald Sharp [Fri, 14 Jul 2017 13:19:13 +0000 (09:19 -0400)]
pimd: Get the default pim code ready to write into vrf's or not

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Allow PIM to start writing vrf information if it has it
Donald Sharp [Mon, 22 May 2017 12:27:24 +0000 (08:27 -0400)]
pimd: Allow PIM to start writing vrf information if it has it

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup pim_pim use of pimg
Donald Sharp [Sun, 21 May 2017 16:18:59 +0000 (12:18 -0400)]
pimd: Cleanup pim_pim use of pimg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup pimg from pim_igmpv3.c
Donald Sharp [Sun, 21 May 2017 16:16:15 +0000 (12:16 -0400)]
pimd: Cleanup pimg from pim_igmpv3.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Lookup loopback based upon vrf correctly.
Donald Sharp [Sun, 21 May 2017 16:12:30 +0000 (12:12 -0400)]
pimd: Lookup loopback based upon vrf correctly.

The vrf loopback ip address should be associated with the
vrf device for vrf's, else use the loopback.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup pim_ssm.c to use 'struct pim_instance *'
Donald Sharp [Sun, 21 May 2017 13:30:02 +0000 (09:30 -0400)]
pimd: Cleanup pim_ssm.c to use 'struct pim_instance *'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Finish up pimg -> pim conversion in pim_rpf.c
Donald Sharp [Sun, 21 May 2017 13:20:37 +0000 (09:20 -0400)]
pimd: Finish up pimg -> pim conversion in pim_rpf.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup missed pimg
Donald Sharp [Sun, 21 May 2017 13:18:09 +0000 (09:18 -0400)]
pimd: Cleanup missed pimg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Finish up pim_mroute.c 'struct pim_instance' awareness
Donald Sharp [Sun, 21 May 2017 13:16:49 +0000 (09:16 -0400)]
pimd: Finish up pim_mroute.c 'struct pim_instance' awareness

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Make pim_hello choose correct vrf
Donald Sharp [Sun, 21 May 2017 13:14:39 +0000 (09:14 -0400)]
pimd: Make pim_hello choose correct vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup pimg from pim_upstream.c
Donald Sharp [Sun, 21 May 2017 13:10:17 +0000 (09:10 -0400)]
pimd: Cleanup pimg from pim_upstream.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>