summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/lisp-gpe/lisp_gpe.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-03L2 over LISP and GRE (VPP-457)Neale Ranns1-583/+10
Change-Id: I0d7f9c7f41a9f9e0acb0950adedb90d45df08c2a Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-27Fix CLI for adding negative LISP fwd entriesFlorin Coras1-0/+1
Change-Id: I9ee7b6ea2def16715f717f8483c86e0157628946 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-21A Protocol Independent Hierarchical FIB (VPP-352)Neale Ranns1-555/+300
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>
2016-09-13VPP-292 Document vnet/vnet/lisp-gpeFlorin Coras1-4/+132
Change-Id: I5b282964330f4c14f7991453ee02c455a8d367ea Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-17VPP-261 Coding standards cleanup - vnet/vnet/lisp-gpeFlorin Coras1-343/+376
Change-Id: I1bc2098e79ce753f3d72f05f2fcac9ab00d0d052 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-11VPP-196 LISP L2/L3 tunnel multihomingFlorin Coras1-45/+185
Change-Id: If96d9ff23a7aacdb684494f854d4029f55837065 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-08VPP-239 Tag packets that hit LISP negative adjacenciesFlorin Coras1-3/+3
Change-Id: I88eaf23791d0a148513cc32262cd79a7f4e25d1f Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-04LISP multihoming API changes and cleanupFlorin Coras1-114/+115
Change-Id: I106352a6da0fad2b91dc8593f8d6d664af3113a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-31Initial L2 LISP supportFlorin Coras1-63/+211
This introduces support for layer 2 overlays with LISP. Similarly to L3, all tenant packets to be encapsulated are captured by an interface, but the mapping (layer binding) instead of being between an L3 VRF and a LISP VNI, it is between and an L2 bridge domain and a VNI. At a high level, this results in two important properties: 1) the source and destinations of all packets flooded in the bridge-domain are mapped via the LISP control plane and the replies are converted into data-plane tunnels tracked via a LISP specific source/dest L2 FIB 2) All packets reaching the interface and matching a source/dest L2 LISP FIB entry are L3 (IP4/6) encapsulated. This is solely a unicast feature, therefore at this time ARPs are not handled in any special way. Change-Id: I0b7badcd7c6d5166db07d4acd2cc4ae7fba3e18e Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-21Fix CLI for adding LISP fwd entriesFlorin Coras1-37/+95
Change-Id: Ib707d252e624e3c1c4ac261fd3cef17b097633e5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-23Use lisp_gpeX iface counters to store decap statsFlorin Coras1-2/+2
The patch switches to using LISP interface counters for storing the number of decapsulated packets instead of using per decap node stats. It also removes the encap node (iface tx node) stats since the iface output node already keeps track of the number of encapsulated packets. Change-Id: I636702a824264c173792f2f0c7fec0b0f4c6a9f7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-23LISP EID virtualization supportFilip Tehlar1-0/+7
Change-Id: I892c001cfdff9d8d93e646641d96520beb3c6265 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-23More LISP SD FIB and forwarding fixesFlorin Coras1-12/+19
o) Avoid using explicit_fib_index in the dst (main) FIBs. It's used in the IP6 lookup o) use if_address_index instead of rewrite_header.node_index to store tunnel indexes. This ensures the tunnel index is used in the signature computation and thus avoids all complications/hacks needed to make src adjacencies unique. o) Fixed negative fwd entry route insertion Change-Id: Ie56356f165b96dfa929da5672a3a429996366460 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-21Check if LISP is enableAndrej Kozemcak1-1/+14
Lisp enable flag is enforced. DP API should not be call if the dp is disable. Change-Id: I265cf3ea0460987f3fd5fd84b43127dd3b1c43c3 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-19Fix use of lookup_next_index in LISP src/dst FIBFlorin Coras1-2/+7
Adjacencies in LISP src/dst FIB store the index of the LISP output interface (next node after lookup) in the lookup_next_index. Since the values of interface node indexes are not constrained, they can collide with the 'special' adjacencies IP_LOOKUP_NEXT_LOCAL and IP_LOOKUP_NEXT_DROP. As a result, at allocation time, LISP ajacencies may be automatically shared with the previous two, predefined adjacencies and all LISP specific state stored in the rewrite area is lost. This fixes the problem by 'hijacking' the explicit_fib_index instead of the lookup_next_index field. Change-Id: I3c59121dcf0851decf5c08004143d1201dbd1ece Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-23Add LISP RTR supportFilip Tehlar1-2/+29
Change-Id: I8a3770f8f1cd1fde6765b81d35aacaaf4ff98b82 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-15ONE-13: Add CLI/API for LISP static remote mappingsFilip Tehlar1-0/+1
Change-Id: Ic4c717af9629541bac0a0e6c65d0157619c8f578 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-11ONE-9: Fix clang build errorsFlorin Coras1-2/+2
Change-Id: Icbf3e269471ee0fc1d21f842b2ea220328a0f891 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-10ONE-4: Add LISP enable/disable API/CLIFilip Tehlar1-0/+7
This patch adds an enable/disable API/CLI for control plane which calls similar functions for data plane. When re-enabling it also re-populates dataplane with tunnels and interfaces. Change-Id: Id8c3d6af90ecc0be331d502756914b1f62824046 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-09ONE-5: Remove unused vnet_lisp_gpe_add_del_tunnel APIFlorin Coras1-23/+9
Change-Id: Ib22ec807d2b74b7c3cb37f66052cd07bc4d896db Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-05-05ONE-2: Add new LISP dump API for lisp gpeAndrej Kozemcak1-0/+11
API: lisp_gpe_enable_disable_dump Change-Id: I1c8e78f00f9a3f99c1f2f54884af565292e4ccf8 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-02Small fixes to lisp-gpe header and decapFlorin Coras1-5/+10
- enforce lisp-gpe router mode (set P bit) - fix selection of ip6 decap node - fix dual-dual lool error index init Change-Id: I1a9623c0eb7e81a2cfb60efaa88dc44ee65e664d Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29Add support for LCAF Instance IDFilip Tehlar1-1/+1
Change-Id: Ifce3f2bdcba099157a42d0b694f3161b9f700ed2 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-04-29Add lisp-gpe ip6 data-plane supportFlorin Coras1-582/+84
The implementation mimics that of the ip4 data-plane. Therefore, a new lgpe-ip6-lookup lookup node is introduced for ip6 source lookups, a lisp-gpe-ip6-input node for decapsulating ip6 encapsulated packets and the tx function of the lisp-gpe interface is updated to support any mix of v4 and v6 in underlay and overlay. Change-Id: Ib3a6e339b8cd7618a940acf0dd8e61c042fd83dd Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-26Fix compile errors reported by clangDamjan Marion1-1/+1
For using clang as a compiler it is enough to specify CC=clang in the make command line Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-25Convert lisp-gpe encap to interface tx nodeFlorin Coras1-258/+167
With this change, one lisp-gpe interface is created per vrf/overlay tenant and its tx node is used as encapsulator (or tunnel ingress). For all intents and purposes, the tx node inherits all functions previously performed by the lisp-gpe-encap node and it maintains said node's position in lisp-gpe's data-path graph. Chiefly, this opens the possibility to chain interface features, like IPSec, transparently with LISP. Furthermore, it brings basic data plane support for vrfs and LISP instance-ids (or virtual network instances as per RFC7364). Other changes include improvements to lisp-gpe enable and disable sequences and corresponding API/VAT fixes. Change-Id: I085500450660a976b587b1a720e282f6e728d580 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-02LISP GPE: initial CP commit and DP improvementsFlorin Coras1-317/+985
Control Plane ------------- In essence, this introduces basic support for map-request/reply processing, the logic to generate and consume such messages, including SMRs, a control-plane backend, consisting of an eid-table, locator and locator-set tables, and CLI to interact with it. Naturally, we can now serialize/deserialize LISP specific types: addresses, locators, mappings, messages. An important caveat is that IPv6 support is not complete, both for EIDs and RLOCs. Functionally, the DP forwards all packets it can't handle to the CP (lisp_cp_lookup node) which takes care of obtaining a mapping for the packet's destination from a pre-configured map-resolver using the LISP protocol. The CP then caches this information and programs the DP such that all new packets with the same destination (or within the covering prefix) are encapsulated to one of the locators retrieved in the mapping. Ingress traffic-engineering is not yet supported. Data Plane ---------- First of all, to enable punting to the CP, when LISP GPE is turned on a default route that points to lisp_cp_lookup is now inserted. The DP also exposes an API the CP can use to program forwarding for a given mapping. This mainly consists in allocating a tunnel and programming the FIB such that all packets destined to the mapping's prefix are forwarded to a lisp-gpe encapsulating node. Another important change done for lisp forwarding is that both source and destination IP addresses are considered when encapsulating a packet. To this end, a new FIB/mtrie is introduced as a second stage, src lookup, post dst lookup. The latter is still done in the IP FIB but for source-dest entries, in the dest adjacency the lookup_next_index points to a lisp lookup node and the rewrite_header.sw_if_index points to the src FIB. This is read by the lisp lookup node which then walks the src mtrie, finds the associated adjacency, marks the buffer with the index and forwards the packet to the appropriate next node (typically, lisp-gpe-encap). Change-Id: Ibdf52fdc1f89311854621403ccdd66f90e2522fd Signed-off-by: Florin Coras <fcoras@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+498
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>