summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/gre
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion9-2243/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-21API refactoring : grePavel Kotucek2-0/+261
Change-Id: Idea10d6ba4139fdcb4f16300a06c2b30ef339b3c Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-02MPLS infrastructure improvmentsNeale Ranns1-0/+4
- 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-22GRE tests and fixesNeale Ranns4-57/+135
Change-Id: I234240e9bdd4b69ad64a17b1449ae1e81c0edaca 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 Ranns1-1/+1
fib_link_t enums into just vnet_link_t. Change-Id: Id2147afec1a28e95fec86dfd524088cd56563f63 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-17Support MPLSoGRE with the new FIB 2.0John Lo1-113/+12
Note that the new way to provision MPLSoGRE is using the "normal" GRE tunnel such as in the following example: create gre tunnel src 10.0.3.1 dst 10.0.3.3 set in state gre0 up set int ip addr gre0 10.0.4.1/30 set int mpls gre0 enable ip route table 4 6.0.0.0/24 via 10.0.4.2 gre0 out-label 30 mpls local-label add 30 eos ip4-lookup-in-table 4 The previous CLIs/APIs used to configure MPLSoGRE tunnel such as "create mpls gre tunnel...", "mpls encap|decap add label .." and "show mpls tunnel", etc. can not be used. They will be deprecated in a later update to the VPP code base. Change-Id: I244916841924dc2b87d2143691cd8476716c06b1 Signed-off-by: John Lo <loj@cisco.com>
2016-10-14FIB2.0: Adjacency complete pull model (VPP-487)Neale Ranns3-353/+188
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-07unicast RPF for FIB2.0Neale Ranns1-0/+5
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-03L2 over LISP and GRE (VPP-457)Neale Ranns3-81/+246
Change-Id: I0d7f9c7f41a9f9e0acb0950adedb90d45df08c2a Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-09-21A Protocol Independent Hierarchical FIB (VPP-352)Neale Ranns4-287/+638
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-19Add support for transparent ethernet bridging to GREDavid Hotham5-26/+88
Change-Id: Iaa3cefe223eb48b128893029a17e092b72a5157c Signed-off-by: David Hotham <david.hotham@metaswitch.com>
2016-09-02Fix for invalid check of SPARSE_VEC_INVALID_INDEXAlex Popovsky1-3/+3
When looking up a UDP port / GRE protocol in the sparse vectors next_by_dst_port / next_by_protocol a data from the vector was tested for SPARSE_VEC_INVALID_INDEX instead of sparse index itself. This doesn’t matter for most cases since V[0] = 0 is true for all sparse vectors. This however could cause an issue when a valid sparse entry e.g. V[1234] = 0, with data (0) mistakenly passing the test for SPARSE_VEC_INVALID_INDEX, while the index itself (1234) is a valid index. Change-Id: I04818cc43efeae047a4dae79078157d48b8c359c Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-09-02Clean-up unused context arrays in UDP and GRE nodesAlex Popovsky1-18/+1
Removed unused sparse_index_by_next_index vector in local context of UDP and GRE nodes. Most probably copy paste leftovers from PPP implementation where it is realy used Change-Id: I97e81035e2fd451c6f5a7bc31df96db9e6d2cebf Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
2016-07-22HONEYCOMB-83: Add Gre FeatureHongjun Ni2-3/+3
PatchSet 3: use clib_memcpy for copy. PatchSet 2: use clib_memcpy() to copy IP address. PatchSet 1: Support IPv6 interface for GRE API. Change-Id: I80ee4b61df15da7fd851b682a97d5d49f89568b7 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-15Fix name confusion for gre interface index.Hongjun Ni2-6/+6
Change from free_vxlan_tunnel_hw_if_indices to free_gre_tunnel_hw_if_indices. Change-Id: I32f04f2b6b28fcf80d2fc0c37c67e343317dce7c Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-23VPP-81: Print interface name after creating an interface with CLIPierre Pfister1-1/+3
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-05-19Add support for multiple microarchitectures in single binaryDamjan Marion2-0/+5
* compiler -march= parameter is changed from native to corei7 so code is always genereted with instructions which are available on the Nehalem microarchitecture (up to SSE4.2) * compiler -mtune= parameter is added so code is optimized for corei7-avx which equals to Sandy Bridge microarchitecture * set of macros is added which allows run-time detection of available cpu instructions (e.g. clib_cpu_supports_avx()) * set of macros is added which allows us to clone graph node funcitons where cloned function is optmized for different microarchitecture Those macros are using following attributes: __attribute__((flatten)) __attribute__((target("arch=core-avx2))) I.e. If applied to foo_node_fn() macro will generate cloned functions foo_node_fn_avx2() and foo_node_fn_avx512() (future) It will also generate function void * foo_node_fn_multiarch_select() which detects available instruction set and returns pointer to the best matching function clone. Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-16VPP-61 Patch2/2 Removing NSH from VPP for move to NSH_SFCKeith Burns (alagalah)1-2/+1
Change-Id: I76359b621b2edc599cf2e9ee845d97293a5d46f7 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-13VPP43 - NSH refactoring: Added nsh-map nodesKeith Burns (alagalah)1-1/+2
- removed vnet/vnet/nsh-gre - removed all nsh from vnet/vnet/nsh_vxlan_gpe to vnet/vnet/nsh - moved vnet/vnet/nsh_vxlan_gpe to vnet/vnet/vxlan_gpe - added cli and binary api for VXLAN GPE tunnels - plan to move vnet/vnet/nsh to new repo (sfc_nsh) and make plugin - added cli for NSH (binary API will be done in sfc_nsh) - vnet/vnet/gre will be extended in VPP-54 Change-Id: I1d27def916532321577ccd68cb982ae0d0a07e6f Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-07VPP-45 Fix crash when GRE packet received on new i/fChris Luke1-0/+3
If a GRE tunnel is created, no other interface added and the GRE tunnel is not set "up" then a crash occurs on the first packet for this tunnel because fib_index_by_sw_if_index[] does not yet have a mapping to the fib the new interface is in. The code to set this is missing from gre/interface.c Change-Id: I567ad74a2af3ea5afe4a40ed39a1d4395642f77c Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-06VPP-34 GRE traffic blackholes in encap directionChris Luke1-1/+12
The GRE code is missing the logic to indicate the "hardware" interface is up. The fix is to listen for admin up/down events on the "software" interface and reflect that into the hardware interface state. Change-Id: If06e4f03989b2c52c32f50c11e1943e42bb2609f Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-29VPP-25 Add API for GRE tunnel create/delete/show.Chris Luke2-47/+159
Add API methods to create, delete and show GRE tunnels. Also add missing CLI functionality for deleting and listing configured tunnels. Change-Id: I7565966037d94ade07938e4ff0d9333419716857 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion2-3/+3
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14Declare node, hw_interface_class and device_class instances as externalDamjan Marion1-2/+2
This fixes issue observed on Ubuntu 16.04 where dynamic loader is not finding correct instance of specific structure. Change-Id: I618d0933c7e171b8a9b40495b36894785af7790a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14fix declaration of symbol of different sizeJean-Mickael Guerin1-1/+1
I got many warnings at the link step with gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2): /usr/bin/ld: Warning: size of symbol `cop_input_node' changed from 112 in vnet/cop/.libs/cop.o to 168 in vnet/cop/.libs/node1.o /usr/bin/ld: Warning: size of symbol `ethernet_input_node' changed from 112 in vnet/.libs/interface.o to 136 in vnet/ethernet/.libs/node.o /usr/bin/ld: Warning: size of symbol `l2output_node' changed from 112 in vnet/l2/.libs/l2_efp_filter.o to 120 in vnet/l2/.libs/l2_output.o /usr/bin/ld: Warning: size of symbol `srp_input_node' changed from 112 in vnet/srp/.libs/format.o to 136 in vnet/srp/.libs/node.o /usr/bin/ld: Warning: size of symbol `vxlan_encap_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 128 in vnet/vxlan/.libs/encap.o /usr/bin/ld: Warning: size of symbol `vxlan_input_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 144 in vnet/vxlan/.libs/decap.o ... Looking at vlib_node_registration_t, I think the reason is that the char * next_nodes[] could be bigger where the variable is defined in .c file. We should mark global variables as external in header files. Some of them can be made static. Change-Id: Ieb6961fd08180c9a69e1d884852703f3eb23f23f Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-03Change default L3 MTU to allow jumbo packets for non-DPDK interfaces.John Lo1-1/+1
Note that L3 MTU for DPDK interfaces is derived from DPDK port_conf in vnet/devices/dpdk/init.c. Change-Id: I9633a1887347a18d05598435baceb6a62cd7b19a Signed-off-by: John Lo <loj@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke7-0/+1467
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>