aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip
AgeCommit message (Collapse)AuthorFilesLines
2016-05-16VPP-69: Create fib or bridge domain with arbitrary IDPierre Pfister4-0/+61
It appeared to me that it might be usefull to allow users to create fibs or bridge domains without a complete knowledge of the current used IDs. These changes define fib and bridge domain constructors when the provided ID is ~0. In such a case, an unused ID is used to create a new fib or bridge domain. Change-Id: Iaba69a023296e6d17bdde45980f9db84832a3995 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-05-09VPP-44: iOAM service and path verification using shamir's secret sharingShwetha Bhandari3-12/+194
Change-Id: I445ad13f8f93cb75cacc94192c4ae85c8ca14e35 Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2016-05-06Check IP adj_index to make sure it is valid to prevent possible crashJohn Lo2-2/+6
Change-Id: I439aac05638fd40e314bec8756e42a32c436321c Signed-off-by: John Lo <loj@cisco.com>
2016-04-30IP6 SR multicast replicatorKeith Burns (alagalah)1-0/+4
- adds ability to name tunnel - creates policy as a collection of tunnel names - map ip6 multicast address to policy and replicate packet - adds zero memcpy for invariant portion of packet Change-Id: Icd2fe6a2cf65c09906e82ed1afbb0eae8df79452 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-04-29Add indirect next hop supportDamjan Marion4-40/+156
Change-Id: I0626c2650eba7961a15b1e87a664b57bef5503a2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29Fix ip-udp encap checksum for ip6Florin Coras1-0/+20
Thanks to Chris Luke for reporting. Change-Id: I4f2ac5bb0eb565738755ddb00e8c918134ff67b6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29Fix ip4 address formatting in the show ip fib ouptutDamjan Marion2-3/+6
Change-Id: I3ffb2e3cef63cbc9f2abc81bbdedabb34b9b3408 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29Add lisp-gpe ip6 data-plane supportFlorin Coras1-66/+115
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-28VXLAN over IPv6.Chris Luke1-0/+1
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-04-28Track number of ethernet vlans in a frameChris Luke1-1/+1
Adds flags to the packet buffer to track the number of VLANs in the current Ethernet frame. We use two bits to signify 0, 1 or 2 VLANs. The value 3 signififies an unknown quantity of VLANs, which includes "three or more" which is not widely supported. We place the bits in the vlib_buffer section; that is not the opaque section, so that all subordinate nodes can use it. For background, see the discussion thread at https://lists.fd.io/pipermail/vpp-dev/2016-March/000354.html The helper macro ethernet_buffer_header_size(buffer) uses these bits stored in "buffer" to calculate the Ethernet header size. The macro ethernet_buffer_set_vlan_count(buffer, count) sets the appropriate bit values based on the number in "count". By current frame we are referring to the case where a packet that arrives from the wire is carrying an encapsulated Ethernet packet. Once decapsulated that inner packet becomes the current frame. There are two places where this value is set; For most Ethernet frames this will be in the "ethernet-input" node when that node parses the Ethernet header. The second place is whenever vnet_update_l2_len() is used to update the layer 2 opaque data. Typically this function is used by nodes just before they send a packet into l2-input. These bits are zeroed in vlib_buffer_init_for_free_list() meaning that wherever the buffer comes from they have a reasonable value (eg, if ip4/ip6 generates the packet.) Primarily this VLAN counter is used by nodes below "ethernet- input" and "l2-input" to determine where the start of the current Ethernet header is. There is opaque data set by "ethernet-input" storing the offset of the current Ethernet header but, since this is opaque, it's not usable by downstream nodes. Previously several nodes have made assumptions regarding the location of the Ethernet header, including that it is always at the start of the packet buffer (incorrect when we have encapsulated packets) or that it is exactly sizeof(ethernet_header_t) away (incorrect when we have VLAN tags.) One notable case where this functionality is required is in ip6_neighbor when it generates a response to a received neighbor soliciation request; it reuses the incoming Ethernet header in-situ and thus needs to reliably know where that header begins. Also, at the suggestion of Dave Barach, this patch removes definition of HGSHM bits in the buffer flags since they are unused and unlikely to ever be. Change-Id: I00e4b9ced5ef814a776020c395d1774aba6185b3 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-28Fix Bug VPP-22Florin Coras1-1/+1
Change-Id: Iaac12e63e4a5ee026276638afd5d5ba3b9503a40 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-27Increase the trace bufffer sizeChris Luke1-1/+1
In some cases, the packet header size with IPv6 and a tunnel can overflow the buffer used for packet tracing. This patch increases this buffer a little to avoid truncated header information in the trace. Change-Id: Ib800e3b908ebe7e80bae4428a94541a803b40b8c Signed-off-by: Chris Luke <chrisy@flirble.org>
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-26Port glean neighbor entry support to IPv6Pierre Pfister10-68/+336
This patch is more or less a port of I71f3ba0c8192 to IPv6. In practice it allows creating a route via a neighbor which is not resolved yet. It also adds static flag to IPv6 neighbor entries. And as Damjan suggested, it formalizes ip46_address_t by using the IPv4 embedded IPv6 address format. Change-Id: Ifa7328a03380ea4ff118b7ca4897b4ab23a3e57c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion9-65/+55
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-18Add support for AArch32Christophe Fontaine1-2/+2
gcc version 4.9.2 (Raspbian 4.9.2-10) Tested on Linux raspberrypi 4.4.6-v7+ #875 SMP Tue Apr 12 16:33:02 BST 2016 armv7l GNU/Linux CPUs may be little or big endian, detect with gcc flags, not the processor architecture Add a new flag $(PLATFORM)_uses_openssl which allows to disable the link with openssl lib. vlib/vlib/threads.c: startup.conf must: - specify the heapsize as we don't have hugepages on raspbian cpu { main-core 3 } heapsize 64M Corrects in various files the assumption uword == u64 and replaces 'u64' cast with 'pointer_to_uword' and 'uword_to_pointer' where appropriate. 256 CPUs may create an OOM when testing with small memory footprint ( heapsize 64M ), allows the number of VLIB_MAX_CPUS to be set in platforms/*.mk vppinfra/vppinfra/longjmp.S: ARM - copy r1 (1st parameter of the setjmp call) to r0 (return value) vppinfra/vppinfra/time.h: On ARMv7 in AArch32 mode, we can access to a 64bit register to retreive the cycles count. gcc on rpi only declare ARM_ARCH 6. Override this info, and check if it is possible to use 'mrrc'. /!\ the time function will NOT work without allowing the user mode access to the PMU. You may download the source of the kmod here: https://github.com/christophefontaine/arm_rdtsc Change-Id: I8142606436d9671a184133b935398427f08a8bd2 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-04-16Using classifier/ACL from now on. Changes pertaining to that.rangan1-21/+52
Change-Id: I682b9a361c7308d6d0abb9d7d0320215f0d91e50 Signed-off-by: rangan <rangan@cisco.com>
2016-04-14Change ARP and IP6-ND nodes to use interface-output node for outputJohn Lo2-29/+3
The current mechanism for setting up arp-input and ip6-discover-neighbor output nodes for interfaces using their interface link up/down callback function is inefficient and has potential timing issue, as observed for bonded interface. Now both nodes will setup output interface sw_if_index in the the sw_if_index[VLIB_TX] field of current packet buffer and then use the interface-ouput node to tx the packet. One side effect is that vlib_node_add_next_with_slot() needs to be modified to allow the same output node-id to be put at the specified slot, even if another slot contain that same node-id already exist. This requirement is caused by BVI support where all loopback interfaces set up as BVIs will have the same output node-id being l2-input while, for output-interface node, the output slot must match the hw_if_index of the interface. Change-Id: I18bd1d4fe9bea047018796f7b8a4d4c20ee31d6e Signed-off-by: John Lo <loj@cisco.com>
2016-04-14Opaque index is not populated when ACL is configured. Fixed it.rangan1-1/+6
This is inline with ip6_classify.c Change-Id: Ib6e1f6fa3e4669e0a94e4ae2da48eacb240d192b Signed-off-by: rangan <rangan@cisco.com>
2016-04-13Create macro for next_nodes used in lookup family of nodesDamjan Marion5-138/+42
This should help when adding new adjacency types Change-Id: I1832c6b7a80b6bc69ed83423a60511b7932f336f Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-12IP6 FIB: Micro optimization in lookupPierre Pfister1-4/+9
The mask is increasingly small. This saves a few cycles and becomes significant when there are many prefix lengths. Change-Id: Ibd0c9331f675697bb4e90e8ad617994f83edec9c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-04-11Add a counter for unknown IPv6 hop-by-hop options.Yoann Desmouceaux1-2/+9
Change-Id: I3db82b71ae5e32e0f2230662497a05e57ddb6755 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-04-11Fix possible infinite loop in IPv6 hop-by-hop header parsingYoann Desmouceaux1-0/+6
Unknown hop-by-hop options are currently not processed, which triggers an infinite loop due to the pointer not advancing further in the header. Change-Id: Idf9176090e042b17aac1baa25a6cb4beb8c199d8 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-04-08fix uninitialized vars warnings with -OsBenoît Ganne1-2/+2
Change-Id: I15a16ba9751b6b612bac61a160b5da394ed2e15c Signed-off-by: Benoît Ganne <bganne@kalrayinc.com>
2016-04-06Fix ip4 udp encap length typeFlorin Coras1-2/+2
Change-Id: If666cda99a5fd92e904898ced40bcf2b5ac2d3a5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-02Fix DPDK check in udp.hFlorin Coras1-2/+2
Change-Id: I4734b248f512e223703d234d28542257af1a8074 Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-02LISP GPE: initial CP commit and DP improvementsFlorin Coras1-1/+98
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>
2016-04-01Add support for installing ipv4 routes via unresolved next hopDamjan Marion4-145/+210
Change-Id: I71f3ba0c8192fe0ac3b5b81fb1275b64ec02876a Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29Move classify_table_index under the unionDamjan Marion4-7/+12
Fields needed only by specific adj type should be shared. Change-Id: I59ee15a29d2f5f527f46910a1a63866b291734c7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29Adjacency allocatorDave Barach6-601/+342
Change-Id: Ieacbfa4dbbfd13b38eaa2d37f618f212cef4e492 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25iOAM trace configuration APIsShwetha2-5/+11
Change-Id: I6d31f0ddb812d148ad065e27775440d09f402def Signed-off-by: Shwetha <shwethab@cisco.com>
2016-03-25Use rte_mempool private data for storing vlib_buffer_tDamjan Marion2-2/+2
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-21Unbreak build on gcc-5Damjan Marion1-1/+1
Change-Id: I0dc5f48ade786b60b34441c30f3de5b9f373d714 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-20vnet classifier debug CLI enhancementsDave Barach2-3/+9
Extensible next-index and opaque unformat function scheme. Added next-index-by-node-name and sw_if_index->opaque functions. Allow dynamic graph arcs to be added to ip4/6-inacl. Change-Id: Ie434335399a0708772eb82563a154df19c63b622 Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-19* Added support to configure trace type as arangan3-60/+497
configuration parameter. This can be any combination of nodeid, interface indices, timestamp and appdata. This configuration is passed through packet header by encap node to all other nodes. Rewrite buffer is resized accordingly. Trace function modified accordingly. * Added CLI 'show ioam summary' command to display various configuration. * Added CLI 'clear ioam rewrite' Change-Id: Ide4c85f8b22561303df48519c5ea59668a300188 Signed-off-by: rangan <rangan@cisco.com>
2016-03-18Make adjacencies shareableDave Barach4-11/+233
Change-Id: I620871ca715b751d2e487f37341b7118797c9176 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-04Modified ioam CLI syntax to conform with other CLIsrangan1-10/+10
Change-Id: I384d7b2cdbb63b5ca904db5a11c8b8748f7197b9 Signed-off-by: rangan <rangan@cisco.com>
2016-03-03Fix UDP length check for local IP/UDP lookup and error handling.John Lo1-10/+21
Change-Id: If6695e19e5a1e5471e56099e2cf31794c73f3303 Signed-off-by: John Lo <loj@cisco.com>
2016-02-26Add support for native vpp_lite (non-dpdk) platformDamjan Marion1-1/+3
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-04ip[46].h: Remove tcp referenceKevin Paul Herbert2-8/+0
This is not used. Remove it. Change-Id: I63f705db6bc10137d6e28977aa75e60f4e13cfe8 Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-01-28Remove unused tcp.hKevin Paul Herbert2-398/+0
This was left out of 8f9e7d43d8b8e5495477e3a587f78409a4cf8808 inadvertently. Remove it now. Change-Id: I79625aeba400ccfdcfd972f454abd043c2537960 Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-01-27Remove vestigal TCP implementationKevin Paul Herbert11-3431/+2
Eliot's TCP was never completed. Remove it. Change-Id: I8456ed02b55f5b3f0b93547533f7467dd2229c07 Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-01-27ip_checksum.c: Fixes for ip_csum_and_memcpy() alignment issuesKevin Paul Herbert2-53/+69
Add explicit support for incremental operations which may be on byte boundaries and misaligned. Since this is a memcpy() like function, it needs to be robust in all byte operations. Add code to perform the checksum 16 bits at a time when the destination buffer pointer is not naturally aligned. The previous code did support misaligned source data (via clib_mem_unaligned()), but didn't properly align the destination pointer. It would be possible to further optimize this by adding an optimzed move operation where the source is aligned on natural boundaries. Look at this as we optimize this function. At this point, I am concentrating on correctness. Change-Id: I2b0fd4795ec5c0ca294a733159c7355b54177690 Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
2016-01-20Rename vpe binary name to avoid collision with latexDamjan Marion1-1/+1
Change-Id: I34a46b9ebbc0e36486fbef528b34ea1c3be2e8be Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-01-19Enhance and fix packet trace for IP forwarding as follows:John Lo2-4/+12
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>
2016-01-14Dual loop decrement TTL.Ole Troan4-15/+40
Outer fragmentation. ICMP PMTUD. Add DF ignore knob. Change-Id: Icfd7b5c5d9629db3b8130ba15dc6c9a5e709d23b Signed-off-by: Ole Troan <ot@cisco.com>
2016-01-14Added ICMP4 error node.Ole Troan4-143/+203
Change-Id: I911c1c5a57f0513886fa2ee3422ebea069403cb9 Signed-off-by: Ole Troan <ot@cisco.com>
2016-01-07- ICMP6: Add generic ICMP6 error node. Caller sets code/type fields.Ole Troan3-37/+85
- MAP: Added knob to send unreachable ICMP6 on unmatched binding. Change-Id: I314547cc1157d8a73887e7518ebfe3e68d331650 Signed-off-by: Ole Troan <ot@cisco.com>
2015-12-18Fix warnings/errors reported by clangDamjan Marion4-4/+3
Change-Id: Ifb2de64347526e3218e22067452f249ff878fd32 Signed-off-by: Damjan Marion <damarion@cisco.com>