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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>