summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip/ip6_neighbor.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-4088/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-20Decouple dependencies/assumptions in MAC changeNeale Ranns1-1/+1
Change-Id: Ic38d0e468da1ad5b56eefda471a5961146a1c372 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09Coding standards cleanup for vnet/vnet/ip, VPP-255Dave Barach1-1686/+1919
Change-Id: I12892fa571cc50e0541d6463a8b68e1b618edd9f Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-07Prevent re-entrant walks on an adjacency.Neale Ranns1-7/+7
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-06api: missing support for dumping of neighbours (VPP-333)Pavel Kotucek1-24/+23
added API to dump ipv4/ipv6 neighboors (added by ip_neighbor_add_del). Change-Id: I33209a3d06beba64d68465c0892a9f4c65657334 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-05Locally generated packet go through lookup/load-balance - locally-generated ↵Neale Ranns1-5/+7
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-02MPLS infrastructure improvmentsNeale Ranns1-1/+1
- 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-23dpdk: remove rte_mbuf modifications at many places in the codeDamjan Marion1-12/+0
It is sole responsibility of dpdk tx function to fill/update rte_mbuf prior to sending packet do PMD. Change-Id: I8ca1dba3e7bef41034d36e3525831849f7ac4ac0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-22GRE tests and fixesNeale Ranns1-2/+0
Change-Id: I234240e9bdd4b69ad64a17b1449ae1e81c0edaca Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-11-12Clean up coverity warnings, VPP-486Dave Barach1-5/+4
Change-Id: I709e7cf0bb52d8e6cdc9ddb3b7648660204aa3bd Signed-off-by: Dave Barach <dave@barachs.net>
2016-11-09Fix a batch of coverity warnings, VPP-486Dave Barach1-1/+2
Change-Id: I0379844824b4c2eb42588d0fb8e1a7eb441e923f Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-21Fix Coverity Errors in FIB. This is mainly consolidating the vnet_link_t and ↵Neale Ranns1-3/+3
fib_link_t enums into just vnet_link_t. Change-Id: Id2147afec1a28e95fec86dfd524088cd56563f63 Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-10-14VPP-490: vpp crash in show ip6 neighborBilly McFall1-8/+11
Change-Id: I003f95db85ce5085045c607f0b1daaefa792c910 Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-14FIB2.0: Adjacency complete pull model (VPP-487)Neale Ranns1-89/+218
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 McFall1-8/+237
Change-Id: Ie1be9dc057d07c250852952ea159ed3c44c25f5f Signed-off-by: Billy McFall <bmcfall@redhat.com>
2016-10-12Fix coverity warnings, VPP-486Dave Barach1-1/+1
Change-Id: I7a14d9a28514cdb49f65fab1b120b53239fed7e3 Signed-off-by: Dave Barach <dave@barachs.net>
2016-10-10FIB2.0: memory leaks during load-balance update (VPP-475)Neale Ranns1-0/+11
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-06Fix IP6 ND solicitation termination to allow link-local source IPJohn Lo1-2/+3
Move check for link-local source IP address for MAC/IP notification only. Allow generation of response to IP6 ND solicitation request if a match is found for target IP irrespective of source IP type. Change-Id: Ib79d4b75fb4fe8aece625fd8cd26c8b9fc75ea47 Signed-off-by: John Lo <loj@cisco.com>
2016-10-03(VPP-455) arp doesn't work when ip4 classifier configured with fib 2.0Neale Ranns1-1/+2
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/+20
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 Ranns1-301/+178
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-08-31VPP-358: Add IPv6 ND Event Notification and TerminationJohn Lo1-15/+236
Add IPv6 equivalent of IPv4 ARP event notification which covers address resolution for L3 and MAC/IP binding in L2 BD and ARP termination in BD. For IPv6, ICMP6 neighbor solicitation and advertisement packets are utilized instead of ARP request and response packets for IPv4. Change-Id: I0088fa173e4480de297c8053ea2fcd0821322815 Signed-off-by: John Lo <loj@cisco.com>
2016-08-08VPP-189 Clean up more coverity warningsDave Barach1-4/+4
Change-Id: If66713d79c545c762c385faf08cc809347741152 Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-05VPP-189 Clean up more coverity warningsDave Barach1-1/+7
Change-Id: I1b971ab326dc334a4743fd7d4184cef106b0523d Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-30VPP-163 "show ip6 interface" ignores many addressesChris Luke1-24/+56
The output of the CLI command "show ip6 interface" shows only the first link-local address and any globally-scoped addresses. It ignores all other valid address scopes. This patch reworks that routine to cover the three main address scopes ("link-local", "global" and "local") and anything else it finds is grouped under "other"). Rationale for this final grouping is that these other addresses fall under ranges currently either "reserved" or "multicast" in scope. Whilst it's good to show if these are present, they are not normally found as link addresses. DBGvpp# sh ip6 int tap-0 tap-0 is admin down Link-local address(es): fe80::e857:7fff:fe77:c1a9/64 Local unicast address(es): fd50:7389:246b:4321::2/64 Joined group address(es): ff02::1 ff02::2 ff02::16 ff02::1:ff77:c1a9 ff02::1:ff00:2 ... Change-Id: I1d750b3b39c54aa4eb75632d53089640601bcba5 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-29Fix the spelling of the word "suppress".Chris Luke1-10/+12
The spelling mistake where "suppress" is written as "surpress" was sufficiently common and annoyed me enough to fix it. For backwards compatibility, the CLI and API test tool both still accept the erroneous spelling. Change-Id: I82104ae9d8c2c9d6e3396ba0d72cb1dc133081d1 Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-16VPP-19: Split the lookup.h IP_LOOKUP_NEXT enum.Ole Troan1-1/+1
IP4 and IP6 nodes currently shares the adj->lookup_next_index. That has some issues, e.g. that one has to add non-functional nodes like ip4-hop-by-hop and that anyone dynamically adding nodes to any of the IP4/IP6 lookup nodes must ensure they add themselves to all relevant nodes to ensure next index consistency. This patch splits the IP_LOOKUP_NEXT into separate enums for IP4 and IP6 with a common part for next-nodes used by both. It sets up other IP nodes as siblings to avoid inconsistencies. This allows IP4 and IP6 lookup next nodes to evolve independently. The adj->lookup_next_index is still shared, assuming that an IP4 adjacency isn't used by an IP6 graph node. Change-Id: I589b8364fe54e7a10c059b7ef9d6707eb0a345cc Signed-off-by: Ole Troan <ot@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-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-26Port glean neighbor entry support to IPv6Pierre Pfister1-44/+231
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 Marion1-18/+18
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@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-02-26Add support for native vpp_lite (non-dpdk) platformDamjan Marion1-1/+3
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-14Warnings be goneDave Barach1-0/+1
Change-Id: Id1dcb9d50c3cc516bd2f74bb815eab1c7c55cdb3 Signed-off-by: Dave Barach <dave@barachs.net>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+3146
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>