summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/fib
AgeCommit message (Collapse)AuthorFilesLines
2016-12-20Decouple dependencies/assumptions in MAC changeNeale Ranns1-2/+0
Change-Id: Ic38d0e468da1ad5b56eefda471a5961146a1c372 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11VRF imported FIB entry should inherit the flags from the export entry.Neale Ranns2-7/+11
Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09Add FIB unit test to 'make test'Neale Ranns1-22/+44
Change-Id: I57126416f57649768f3601cd715c7f5f4b9b9fad Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-07Prevent re-entrant walks on an adjacency.Neale Ranns1-40/+57
The re-entrant walks were caused when the walk from an IP adj updated a fib_netry with an MPLS adj which in turn triggers a walk of the IP adj. Re-entrant walks do unnecessary work. also fixed a walk merge issue where the encountered walk should only be checked for equivalence woth the most recent alk, not any in the list. Otherwise an UO,DOWN,UP beceoms (2*)UP,DOWN Change-Id: Ib8b27f055dc6c1366d33740276d1c26cd314220a Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-06Refactor binary APIs for IP, VPP-549Dave Barach1-0/+54
Change-Id: Ieff6b22e2432600a231f74e75716e000d488a78f Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-05All mcast and All class E have /4 not /8 subnet masksNeale Ranns1-4/+4
Change-Id: I29e54014f43f0b0ce087380b2318fe623d879204 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-05Locally generated packet go through lookup/load-balance - locally-generated ↵Neale Ranns1-3/+11
is an attribute of the packet and checked where necessary Add a flag to the vnet_buffer to indicate a packet is locally originated. Then in the rewrite nodes we can check this flag and not perform the TTL decrement. The switch path cost is expected to be fractions of a clock - the flags will be hot in the cache. The cehcks are necessary to due the requirements that VPP must be able to emit an IP packet with TTL=255. Change-Id: Ieb9cf06e34df54fd5c950293de8b665016295c51 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-02remove CLIB_DEBUG conditional in fib_protocol_tNeale Ranns1-4/+0
Change-Id: I179941fe615935e63c6f4eacf1193c6bfab6631d Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-02MPLS infrastructure improvmentsNeale Ranns26-969/+1326
- deprecate MPLSoEth and MPLSoGRE; replace with generic MPLS tunnel. - deprecates CLI 'mpls encap ..'; replace with addition of MPLS out label to a route/tunnel. - support for MPLS 'routes', e.g. MPLS x-connects. - deprecates CLI 'mpls decap ..'; replace with 'mpls route .. ' Change-Id: Ibda46544912f880d0200f22bf9ff9b52828fcc2f Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-30VXLAN multicast dst (remote) address supportEyal Bari3-4/+8
Added support for multicast vxlan tunnels which are used for bridge domain flooding instead of flooding the all unicast tunnels in the bridge domain. features added: * conditional flooding to some of the BD members - based on existance of multicast tunnel member * added local multicast adjacency - multicast packets are handled as the same as unicast - based on src (unicast) address * refactored some of vxlan tunnel creation code - to unify ip4/6 handling Change-Id: I60cca4124265a8dd4f6b2d6ea8701e52e7c1baa4 Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-11-21Convergence ImprovementsNeale Ranns5-11/+163
addressing convergence times when interface is shut. 1) prioritise the registered callback handlers. Add FIB convergence handler as high priority 2) hook the FIB convergence call-back into HW link down. 3) don't schedule a walk of a FIB node if it has no children 4) Checks at fib_path_t to prevent unnecessary walks, that it prevent the same information propagting the graph multiple times. Change-Id: I406966b50f31d77c221821b8649776d66655194c Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-17Fixup Path weights of 0Neale Ranns2-244/+629
A path wight of 0 is a meaningless value. We can either reject it and thus expect CLI/API clients to always write a non-zero value, or we can accept it and assume the intent was a weight of 1 - this fix does the latter. Change-Id: Ide736dbbb8376f85441f5a67388d5e3acad4d34e Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-15Dump routes (VPP-500)Steven5-2/+67
Change-Id: I86e7382395a8b6471a0deaf57163718d41b71b83 Signed-off-by: Steven <sluong@cisco.com>
2016-11-12pseudo atomic adjacency updatesNeale Ranns6-41/+110
When an adjacency changes from incomplete to complete (arp to rewrite) and vice-versa, that update must produce valid behavour w.r.t. the packets that continue to encounter it. Change-Id: Icc2709aff9807c5d24f91ef7649268991ad9a45d Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-10VXLAN tunnel encap forwarding optimization with FIB 2.0John Lo1-0/+2
Optimize VXLAN encap node so that vxlan4-encap node is used for IP4 and vxlan6-encap node is used for IP6 underlay. Also stack the VXLAN encap nodes to the appropriate FIB IP4 or IP6 load-balance node instead of ip4/ip6-lookup node to save IP lookup operation. For VXLAN decap node, check VXLAN header FLAGS field for each packet and remove the code to support decap-next for IP4 or IP6. These decap- next values were intended for experimentation purposes and not needed any more since VXLAN-GPE tunnel is supported. The decap-next field is still kept in API for backward compatibility and its value has no effect. Decap next for both vxlan4-decap and vxlan6-decap nodes is always l2-input node. Change-Id: I8ac95774946549ec403ab691f999df0c006b460f Signed-off-by: John Lo <loj@cisco.com>
2016-11-09Fix Compile errors from clang in FIB2.0 codeNeale Ranns8-11/+11
Change-Id: Ief769c966888094944b7a6b7f26527e7eff6103f Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-07use STATIC_ASSERT macro instead of calling _Static_assert directlyDamjan Marion3-8/+8
Change-Id: Iccae655334b6219d22c325108b0e7f37d1dd68cf Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-03Crash when adding duplicate pathsNeale Ranns2-8/+66
Change-Id: Icd29c9013ae70f5444eb940aff4f08589e755f48 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-01Fix recursion loop - recurse through coverNeale Ranns2-2/+72
Change-Id: I07870122f90e41fbb216b2f426bccbfd94049cd6 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-01MPLS Exp-null TestsNeale Ranns2-18/+3
Add some 'make test' unit tests for MPLS explicit NULL label handling. Fix the stacking of the MPLS load-balance result form the lookup onto the IPx lookup object. Change-Id: I890d1221b8e3dea99bcc714ed9d0154a5f602c52 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-25Support IETF routing Yang models (VPP-503).Neale Ranns11-62/+192
Add support for special routes to send ICMP unreachable or admin prohibited. Change-Id: Ia1ac65b0e5e925c0f9ebc7824141833b4e18f05e Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-21Fix Coverity Errors in FIB. This is mainly consolidating the vnet_link_t and ↵Neale Ranns6-79/+47
fib_link_t enums into just vnet_link_t. Change-Id: Id2147afec1a28e95fec86dfd524088cd56563f63 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-18Deprecate MPLSoGRE tunnels (VPP-502)Neale Ranns4-8/+77
Add shared memory APIs for MPLS routes and MPLS to IP prefix bindings. Change-Id: I85b074a4dadc8249c410fdabd8ea019d20479cf8 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2016-10-17VPP-491: Update CLI Command documentation for "show ip fib" and "show ip6 fib".Billy McFall2-68/+193
Change-Id: I9d1d02ffbb3cdbe8c4a3f335ece40f3dcbd848a7 Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-15VPP-488: Fix build errors, which uncovered IPv6 load balance lookup bug.Billy McFall1-1/+16
Change-Id: Id17fcb9154c5337908f29b7ce3a282b6a4b72d64 Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-14FIB2.0: Adjacency complete pull model (VPP-487)Neale Ranns4-43/+58
Change the adjacency completion model to pull not push. A complete adjacency has a rewirte string, an incomplete one does not. the re-write string for a peer comes either from a discovery protocol (i.e. ARP/ND) or can be directly derived from the link type (i.e. GRE tunnels). Which method it is, is interface type specific. For each packet type sent on a link to a peer there is a corresponding adjacency. For example, if there is a peer 10.0.0.1 on Eth0 and we need to send to it IPv4 and MPLS packets, there will be two adjacencies; one for the IPv4 and one for the MPLS packets. The adjacencies are thus distinguished by the packets the carry, this is known as the adjacency's 'link-type'. It is not an L3 packet type, since the adjacency can have a link type of Ethernet (for L2 over GRE). The discovery protocols are not aware of all the link types required - only the FIB is. the FIB will create adjacencies as and when they are required, and it is thus then desirable to 'pull' from the discovery protocol the re-write required. The alternative (that we have now) is that the discovery protocol pushes (i.e. creates) adjacencies for each link type - this creates more adjacencies than we need. To pull, FIB now requests from the interface-type to 'complete' the adjacency. The interface can then delegate to the discovery protocol (on ethernet links) or directly build the re-write (i.e on GRE). Change-Id: I61451789ae03f26b1012d8d6524007b769b6c6ee Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-13VPP-286: Add CLI Command documentation via doxygen comments for vnet/vnet/ip.Billy McFall2-24/+107
Change-Id: Ie1be9dc057d07c250852952ea159ed3c44c25f5f Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-12Coverity warnings in new FIB code (VPP-484)Neale Ranns6-6/+15
Change-Id: Ie221e246dd8c6a1b3c76e7aa85924762d4397782 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-10FIB2.0: memory leaks during load-balance update (VPP-475)Neale Ranns8-282/+593
some other fixes and enhancemets to address failures in the IPv6 Scale testing: - The rate at which VPP sends ARP/ND requests, 1 per-millisecond, is too high. This is reduced to 1 every 10 ms. probably still too high. - If an ARP/ND response is received that does not contain a change to the known MAC address, no further processing is done. - Added stats to get info about the async FIB walks. - When walking FIB entries and performing a load-balance update, it is not necessary to re-insert the LB in the forwarding table. Change-Id: Ifd47e4bdbce94495f44aaf1b78e7d1395ed870d1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-07unicast RPF for FIB2.0Neale Ranns12-71/+880
In a heirarchical FIB performing a unicast RPF check would require the traversal of the data-plane graph to seek out all the adjacency objects and then read those to find their interface. This is not efficient. Instead, for each path-list we construct a list of unique input interfaces and link this uRPF-list against the entry in the prefix table. In the data-plane the uRPF list can be retrieved from the load-balance lookup result and the RPF check is a simple and efficient walk across the minimal interface list. The uRPF-list is maintained as the routing heirarchy changes, in a similar way to the data-plane object graph. We also provide a knob to allow an arbitrary prefix to pass the loose check. Change-Id: Ie7c0ae3c4483ef467cfd5b136ee0315ff98ec15b Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03FIB Memory Usage DiagnosticsNeale Ranns8-24/+158
add two new CLI commands: show fib memory show dpo memory to display the memory usage of the FIB and DPO object types respectively. Change-Id: I759e149a0b6fbb58d59c139362221dc33531cffa Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03L2 over LISP and GRE (VPP-457)Neale Ranns7-22/+91
Change-Id: I0d7f9c7f41a9f9e0acb0950adedb90d45df08c2a Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-03(VPP-455) arp doesn't work when ip4 classifier configured with fib 2.0Neale Ranns3-3/+49
Change-Id: I046de0c00db75d25ed90e33e9910c9dd0ff95580 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-30VPP-363: add ability to change mac address of the interfacePavel Kotucek1-0/+2
Added ability to change interface address. Added new CLI and API functions. Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-21A Protocol Independent Hierarchical FIB (VPP-352)Neale Ranns43-0/+22529
Main Enhancements: - Protocol Independent FIB API - Hierarchical FIB entries. Dynamic recursive route resolution. - Extranet Support. - Integration of IP and MPLS forwarding. - Separation of FIB and Adjacency databases. - Data-Plane Object forwarding model. Change-Id: I52dc815c0d0aa8b493e3cf6b978568f3cc82296c Signed-off-by: Neale Ranns <nranns@cisco.com>