summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/vxlan/vxlan.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-899/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-21Support multiple VXLAN tunnels with same mcast dstEyal Bari1-71/+108
Support multiple vni's with the same group(multicast) address. Implemented by sharing local adj. and rewrite among tunnels. Change-Id: I8ca036b87af65dd6a8f1aff7da1855f72b4c8f4b Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-12-09Add extra validation for VXLAN packets and tunnelsJohn Lo1-54/+87
- On VXLAN packet decap, validate its DIP against VXLAN tunnel. - Add extra logic to validate and handle creation of multicast VXLAN tunnels. Change-Id: I6abdddd7be4cd9f1bcfc88d9970ba681fdd72f7c Signed-off-by: John Lo <loj@cisco.com>
2016-12-02Augment Vxlan to support NSH-ProxyHongjun Ni1-6/+79
PatchSet 9: add range check for decap_next_index PatchSet 6: delete runtime range check Change-Id: I415e156d05d09d2ff34f6578924f0b243058f464 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-12-01Add vxlan-bypass feature to IP4 forwarding pathJohn Lo1-3/+15
Added vxlan-bypass feature which can be enabled on the underlay interface which receive VXLAN packets to accelerate VXLAN decap processing. The CLI to enable it is: set interface ip vxlan-bypass <interface> [del] With this feature enabled on an interface, there is an overhead for non-VXLAN packets at about 13 clocks per packet. The API is created to support vxlan-bypass for both VXLANoIPv4 and VXLANoIPv6. With this change, vxlan-bypass is only implemented for IPv4 forwarding path. Change-Id: Ica7239f642010b231eade7fd5009aa4b42c119d3 Signed-off-by: John Lo <loj@cisco.com>
2016-11-30VXLAN multicast dst (remote) address supportEyal Bari1-102/+117
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-10VXLAN tunnel encap forwarding optimization with FIB 2.0John Lo1-75/+168
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-10-27Fix potential L2 forwarding crash with stale L2FIB entry (VPP-516)John Lo1-13/+0
On moving interface between L2 and L3 forwarding modes, adjust the l2-output node next index for the sw_if_index of the interface so packet output via stale MAC entries in L2 FIB will be dropped. Change-Id: I25afd7a617edb4ae35ce296bac33e62683edad9a Signed-off-by: John Lo <loj@cisco.com>
2016-10-24Fix VXLAN tunnel delete crashJohn Lo1-2/+2
Change-Id: I610648f28b7504798da9e377ea099629aa7a5150 Signed-off-by: John Lo <loj@cisco.com>
2016-10-14FIB2.0: Adjacency complete pull model (VPP-487)Neale Ranns1-11/+1
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-09-21A Protocol Independent Hierarchical FIB (VPP-352)Neale Ranns1-4/+9
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-15VPP-306: Document changes for vnet/vnet/vxlanBilly McFall1-1/+52
Change-Id: I1ec4a80ee431758998716014e3fb6f80a5b9c168 Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-08-30VPP-361: Memory leak on delete of VXLAN over IPv6 tunnelJohn Lo1-1/+4
The key for VXLAN over IPv6 tunnel is allocated on create and should be freed on delete. Change-Id: I11bdd9465030fed57cc4bbd28dbccdf952633b34 Signed-off-by: John Lo <loj@cisco.com>
2016-06-13Explicity specify IP address type for format_ip46_address functionDamjan Marion1-2/+2
Change-Id: I3379517535a98a7a5fbd3173503f288a81378821 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07VPP-110: vxlan encap node should never touch a deleted tunnelJohn Lo1-31/+14
Remove usage of dummy encap string for output from BD to a tunnel which has been deleted. Instead, use a node l2-outpt-del-tunnel so that if there are stale entries in the L2FIB for any deleted tunnel sw_if_index, l2-output will send packets using this entry to the l2-output-tunnel-del node which just setup the proper drop reason before sending packets to the error-drop node to drop the packet. Change-Id: I590982ee25e924ab74e2855c55c58baf29a9fad4 Signed-off-by: John Lo <loj@cisco.com>
2016-06-01VPP-98 Dedicated storage for VXLAN over IPv6 hash keysChris Luke1-12/+25
When creating VXLAN over IPv6 the code was using storage for the hash key that could later be moved. Since the key is larger than the word size this was being referenced as a pointer; when the storage moves that breaks the hash. Instead allocate dedicated storage for the key. This patch also includes other minor cleanups, including using clib_memcpy in places it should be used and some whitespace fixes. Change-Id: I579f2cb515853ef56dedcca350fcad08aa6111a9 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-23VPP-81: Print interface name after creating an interface with CLIPierre Pfister1-1/+4
When the CLI is used to create an interface, and whend the operation succeeds, the newly created interface name is printed-out. The patch includes the following interfaces types: - AF_PACKET - Vhost User - Netmap - GRE - L2TP - MPLS-GRE - Loopback Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-04-28VXLAN over IPv6.Chris Luke1-32/+177
Refactors the VXLAN node to work with both IPv4 and IPv6 transports. There is a discussion thread for this change at https://lists.fd.io/pipermail/vpp-dev/2016-March/000279.html Note that this changes the binary configuration API to support both address families; each address uses the same memory for either address type and a flag to indicate which is in use. This also includes changes to the Java API to support both address families. The CLI and VAT syntax remains unchanged; the code detects whether an IPv4 or an IPv6 address was given. Configuration examples: IPv4 CLI: create vxlan tunnel src 192.168.1.1 dst 192.168.1.2 vni 10 encap-vrf-id 0 decap-next l2 IPv6 CLI: create vxlan tunnel src 2620:124:9000::1 dst 2620:124:9000::2 vni 16 encap-vrf-id 0 decap-next l2 IPv4 VAT: vxlan_add_del_tunnel src 192.168.1.1 dst 192.168.1.2 vni 10 encap-vrf-id 0 decap-next l2 IPv6 VAT: vxlan_add_del_tunnel src 2620:124:9000::1 dst 2620:124:9000::2 vni 16 encap-vrf-id 0 decap-next l2 TODO: The encap path is not as optimal as it could be. Change-Id: I87be8bf0501e0c9cd7e401be4542bb599f1b6e47 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-02-29Fixed vxlan link status.Pavel Kotucek1-0/+12
Vxlan interface link status corresponds to admin status. When vxlan interfcae is set "admin-up" link status is "link-up" and if interface is set "admin-down" link status is "link-down" also. Change-Id: Iaa85fa8dcd672519312cc7ee6a17df6f4498259d Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-01-19Enhance and fix packet trace for IP forwarding as follows:John Lo1-0/+3
1. Add fib index to IP6 forwarding trace. 2. Display adjacency index in IP forwarding trace. 3. Fix adjacency display for L3 to L2 forwarding such as BVI and VXLAN tunnel decap. 4. Setup VXLAN tunnel fib index properly for packet trace. Change-Id: I261fea5abf51e2550d24cdcee53887be2fdd08de Signed-off-by: John Lo <loj@cisco.com>
2015-12-17Add vpe-api message to get vxlan tunnel details.Dave Wallace1-0/+5
Change-Id: I3bfb84dfcb08c6ff5cb473f3ce05b91b222182a1 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+436
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>