622 Commits

Author SHA1 Message Date
Srivatsa Sangli
010972a95d Vagrantfile syntax error correction - requires string input instead of integer.
Change-Id: Ib291662c4ea2f5bef0f2c417b16d256f5c480d5c
Signed-off-by: Srivatsa Sangli<srivrama@cisco.com>
2016-06-21 12:58:19 -07:00
Andrej Kozemcak
8ebb2a1632 Check if LISP is enable
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-21 13:41:22 +00:00
Damjan Marion
0977e4baab Fix problem with DPDK vector PMDs not working in VPP
Linker was picking wrong, weakly linked function from
dpdk drivers, so detection of vector mode was always failing.

Change-Id: I11725c8ddbc4604dd04ecb89ebb7f02ee05e52c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-20 18:07:01 -07:00
Pierre Pfister
a026eb1a6d VPP-143: Correctly drop local l2tp packets when no session is found
When receiving a local ipv6 packet containing an l2tp packet not associated
with any session, l2tp node was handling the packet as if provided by an ipv6 feature,
hence crashing.

This patch fixes the issue by correctly dropping the packet instead.

This patch also fixes a typo from commit d65346098daf896.

Change-Id: I1b377fc5685568c16831920227671feffac64287
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-20 15:32:08 +00:00
Keith Burns (alagalah)
e0965d4e05 Using env.sh file for Vagrantfile inputs, but assume some defaults
Change-Id: Ia4b45d88be5943d413d61435ff38796d1b6a32a2
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-20 12:13:15 +00:00
Pierre Pfister
889178c02a VPP-152: mheap_alloc returns 0 when the requested heap size is too small
mheap_alloc allocates memory_size bytes of memory and returns
a page-aligned memory space prefixed with a word-aligned
header of type mheap_t.

This header includes the actual usable space size, but
when the requested size is too small, the computed size
was incorrect (infinite).

mheap_alloc now returns 0 in such cases.

With help from Yoann Desmouceaux.

Change-Id: I00af63d573d6939aca53dbe7ff612b726bd8f0df
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-19 13:31:59 +00:00
Chris Luke
f2868fcd2e Output interface MTU check ignored in double-loop
In the double loop of ip4-rewrite, when forwarding packets,
the outbound interface MTU check occurs too late in the
double-loop to be actioned.

Change-Id: Ifc44e65d6ddb832aa0161d0685b1a28378541905
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-19 13:30:36 +00:00
Florin Coras
2459e4c5f5 Fix use of lookup_next_index in LISP src/dst FIB
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-06-19 13:26:11 +00:00
Sachin
808b2db964 Improving cross_ldflags arguments for dpaa2 platform
- This helps in avoiding manual export of
   LD_LIBRARY_PATH for /usr/lib64/

Change-Id: I15fc9c9f961848411b093c891ca9517ef4e074a0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-19 13:25:05 +00:00
Keith Burns (alagalah)
e62c796b28 gitignore gtags
Change-Id: I0160cdfc8e749f875a232e07526d53a3a7c8395c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-19 00:48:01 +00:00
Sachin
693b7026a8 Enhanced RPM build process to make rpm for any given platform
- Currently default rpm.spec only look for  "install-vpp-native"

Change-Id: Iaa78c46ae62d2747bda6ffc1189cb8ac6d578bd8
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-18 15:28:08 +05:30
Damjan Marion
98897e26ce Fix node registration in ixge driver
Change-Id: Ia98ed873954feaa7bf1f13d8eb4054d0afba495e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-18 02:52:24 +00:00
Pierre Pfister
a18e413085 Give correct argument to ip_call_add_del_adjacency_callbacks
ip_call_add_del_adjacency_callbacks requires an adjacency index, not a
sw_if_index.

Change-Id: I4ae6a6bbbe0abee4791217463d353c56f9735ba3
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-18 02:50:44 +00:00
Dave Barach
b5adaeab2f Move pkt replication counter to the opaque2 cache line
Change-Id: I5e6edfd03ab41949be2c768dfe68aa824bbc1f38
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-18 01:01:36 +00:00
Keith Burns (alagalah)
f289ca6bc6 Updated Makefile so install-dep doesn't prompt
Change-Id: I8e5f4d120c9add636054e740f2a8aa3a0f8bb7d1
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-17 22:11:04 +00:00
Dave Barach
d65346098d Dynamically compute ip feature subgraph order
This change-set enables plugins to add themselves to the ip4/ip6
feature subgraphs without having to modify core vpp engine code
at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros
which express the required ordering constraints, and off you go.

Along the way, added an implementation of Warshall's algorithm to
vppinfra; to compute the positive transitive closure of a relation. In
this case, the relation is "feature A runs before feature B."

With that in hand, ip_feature_init_cast(...) computes a partial order
across the set of configured feature subgraph nodes.

In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out
vnet_buffer(b)->ip>current_config_index, which exists in main. So, we
fixed that by moving b->trace_index, adding b->current_config_index,
and removing the ip opaque union current_config_index.

Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17 16:24:16 +00:00
Shesha Sreenivasamurthy
378893a485 Support NAT across multiple interface pairs
Some of the commands require interface name as an
    additional parameter as we support multiple interfaces.
    Example:
    set vcgn map inside TenGigabitEthernete/0/0 10.1.0.1 - 10.1.0.1
    show vcgn inside-translation protocol tcp interface TenGigabitEthernete/0/0 inside-addr 1.0.0.2
    show vcgn outside-translation protocol tcp interface TenGigabitEthernet9/0/0 outside-addr 10.1.0.1

Change-Id: Id691ccd3f2c863c665a1568982c819b79dda007e
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-17 12:34:38 +00:00
Sachin
bd05e17d79 NXP DPAA2 Poll Mode Driver Support in DPDK
Upstreaming of DPAA2 driver changes is in progress.This patch will
 temporary add the support in VPP in built DPDK.

 Two types of changes:
     1. Driver specfic independent files. No impact on any other functionality.
     2. Changes in common EAL framework. These changes are done in compile time DPAA2
        specific flag, so no impact is expected on other existing features if not
	compiling for DPAA2.

Change-Id: I02abe7189313835b51ff654b4d7e566bc0fb8327
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17 12:33:43 +00:00
Shwetha
85b528e093 VPP-76:APIs for Proof of transit feature added to iOAM
Moved Proof of Transit utility as a plugin
Moved Proof of Transit option as a plugin

Change-Id: Idc9897205eb8ec80c5dea47b428e6209ac938c32
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-06-17 09:43:40 +00:00
Andrej Kozemcak
b6e4d3990e New LISP API map-request itr-rloc
API to constrain source locator when sending map-requests.
lisp map-request itr-rloc <locator-set name>

Change-Id: I19f3a1aa8a387ca8662ccf3a4ad774ea7d655f80
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-06-17 09:17:31 +00:00
Sachin
a29f200688 VNET: Initialization support for NXP DPAA2 poll mode driver
- NXP proposed a poll mode driver "rte_dpaa2_dpni" in DPDK upstream.
 - When using external DPDK with the given dpaa2 driver, VPP needs modification
   to initialize the PMD and to understand the DPAA2 N/W interfaces.

Change-Id: I00eb127fa88c71fb430d3def238d50ba68fd595f
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17 07:10:55 +00:00
Dave Barach
b84ccc614d vpp-83: fix double-unlock
Change-Id: I0b75b4f9bef62aba69e9cc163924f6b985a35455
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-17 07:09:44 +00:00
Ed Warnicke
45050f8781 Fix generate-deb-changelog to handle YY.MM release
generate-deb-changelog was only properly handling x.y.z
releases.  This patch fixes it to handle YY.MM.

Change-Id: Iaaee8ff747abd6754d021535c889f67ad2c9998f
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit 693f4358deef7db06b3d3cae0d881924dd9cf9fa)
2016-06-17 03:13:59 +00:00
Florin Coras
1c494840b1 Consolidate use of IP fib functions in LISP CP
Clean up, refactor and consolidate LISP CP functions that interact with
ip interfaces and fibs.

Change-Id: I214eaebbec8d43646118df0948d0f82f923a5b43
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-17 03:13:21 +00:00
Ole Troan
3b3688f9d3 6rd: Move to plugin
- Change toplevel plugins make target. Now builds all plugins under
  plugins/. (Apart from sample-plugin).
- Move sixrd code to plugins directory and make necessary changes to
  make it a plugin
- Remove 6rd hooks from IP lookup code

Change-Id: I447e92e3bee240cd8de01d0abac2e1708e8c27d1
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-15 16:10:08 +02:00
Ole Troan
f0f852251c VPP-19: Split the lookup.h IP_LOOKUP_NEXT enum.
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-16 18:05:51 +00:00
Shesha Sreenivasamurthy
81f7092d34 Fix hugepage leak on VM termination
When VM is terminated, the hugepages mapped
    should be unmapped so that the system does not
    run out of hugepage resources. Therefore, mapped
    pages are unmapped when VPP notices a disconnect.

Change-Id: I7398fb20028036738ab87db0b0e79609e95d69a4
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-16 15:11:51 +00:00
Hongjun Ni
c0959c9c47 Fix vxlan-gpe interface state dump failure
Correspond to HONEYCOMB-84 VxLAN GPE - Wrong operational data.

Change-Id: Ia1b3c3b85e4b5435b0c690a4ce9ff93c65bfee5c
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-16 20:18:15 +08:00
Ranganathan T.S
445d6658d0 README file for vcgn
Change-Id: I6bd851e4b26f0b8d6f5826a19bded3af930cbc0e
Signed-off-by: Ranganathan T.S <rangan@cisco.com>
2016-06-15 23:06:55 +00:00
Hongjun Ni
7deb139eac Delete useless field decap_next in tunnel
Field decap_next in vxlan-gpe tunnel is not needed.

Change-Id: I83cc42ca82274587a57e3c65711cf18ee8d692d3
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-15 19:40:33 +00:00
Florin Coras
c2c9008444 Fix LISP locator pair selection
Make sure when selecting the local and remote locator pair for a
data-plane tunnel that the local locator has a route, in the FIB,
to the remote one.

Change-Id: Idbc8a28a8ede786c11ef98cb18eba4a78c4a228e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-15 19:25:13 +00:00
Florin Coras
c86f3e5d2d Fix remote mapping CLI for unset v6 local eid
If when configuring a remote v6 mapping the local eid is not set,
configuration fails because the code expects local (default v4) and
remote eids to have the same AFI.

Change-Id: If791d2e8a104ea36603576f8b2797cc07bc2654b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-06-15 16:44:07 +00:00
Neale
2a34b9e1a6 VPP-137: VPP sends ARP with wrong requested IP
Change-Id: I01802f3dab04c940e65236ba6e680f1e504a0a5f
Signed-off-by: Neale <nranns@cisco.com>
2016-06-15 09:18:26 +00:00
Srivatsa Sangli
820e363a8d Add dpdk per-interface startup config parameter to support rss-flag
New parameter allows specifying rss-flag - one or more of following
ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other ipv4
ipv6-tcp-ex ipv6-udp-ex ipv6-frag ipv6-tcp ipv6-udp
ipv6-sctp ipv6-other l2-payload ipv6-ex ipv6

Sample config:

dpdk {
    dev 0000:86:00.0 {
        rss {
            ipv4
            ipv4-tcp
            ipv4-udp
        }
    }
}

Change-Id: I33c047d69ef8710b8ba3c7e1a1964d5d54f6e880
Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
2016-06-14 16:44:36 -07:00
Damjan Marion
0b14072b69 Add dpdk per-interface startup config parameter to specify worker threads
New parameter allows specifying which worker threads will process rx
queues. Parameter arguments is list of cores and number of worker specified
must be equal to the number of rx queues configured (num-rx-queues). If
num-rx-queues is not specified, it will be automatically set to
number of workers.

Sample config:

dpdk {
  dev 0000:86:00.0 {
    workers 2,3
    num-rx-queues 2
  }
}

Change-Id: I88bc381e0e542eb02def09a726c6f04de3e1ae17
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 18:15:43 +00:00
Damjan Marion
d61b439358 Reset new indirect adjacdncy template before using it
Change-Id: Ia69ba39364d4dfa1403c8fbb77b7990226bbcb85
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 17:38:33 +00:00
Ole Troan
964f93e59f Fix node siblings
Siblings did not work at all. Fixed by generating sibling relationships
earlier in vlib_node_main_init(). Also adding a node dynamically before
nodes were initialised failed for sibling nodes.

Change-Id: I2fb73eb33a6f5ee216f566074e18ed495e20634d
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-14 17:10:53 +00:00
Keith Burns (alagalah)
07929f2612 gitignore change due to DPDK download suffix change
Change-Id: Idc86d3435e742f3cb96cb9eb1d85b0fdc6a40fc5
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-14 16:58:58 +00:00
Damjan Marion
bf74147701 Retire io threads and main-thread-io mode
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 16:36:27 +00:00
Damjan Marion
6c56a3c6f0 Fix double-enqueued packet in interface-output dual-loop, fixes VPP-116
When speculative enqueue fails and a buffer needs to be moved to a new
node queue the original buffer is not correctly removed from the
original queue so buffer get send for transmit and encryption at the
same time. This issue will only be hit with the double loop so low
throughput traffic like pings will not hit the issue. This code path is
also only hit when the feature flag is enabled so will not be hit by
normal traffic

Patch also reorgnizes code to reduce number of branches in the interface
output node loop.

Change-Id: I3653400e58bdfd833e6c42823bab51586128b54b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 16:34:02 +00:00
Damjan Marion
1aa310fe3f Cleanup /dev/shm before starting VPP from top-level Makefile
Change-Id: I3a8b85ad033707552b9df7d0d08548517a8571ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-14 13:35:58 +00:00
Keith Burns (alagalah)
802255c908 Add sw_if_index to af_packet_create and various clean ups
Change-Id: I4c2972b55d5d99f3aa7a05885791eef47351c734
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-06-14 11:45:54 +00:00
Hongjun Ni
24612b3fb8 Fix name confusion for gre interface index.
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-06-15 01:22:22 +08:00
Dave Barach
5a9c9b8bb5 Fix NULL-pointer crash in handoff_init(...)
Change-Id: If403f83b4e918e81e7b2e90dfca14960ad2c6aa6
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-13 18:17:23 -04:00
Damjan Marion
0247b46002 Add worker-handoff node
worker-handoff node is universal node which taakes packets
from the input node and hands them over to worker threads.
Currently it supports flow hashing based on ipv4, ipv6 and
mpls headers.

New cli:

set interface handoff <intrerface-name> workers <list>

e.g.

set interface handoff TenGigabitEthernet2/0/0 workers 3-6,9-10

Change-Id: Iaf0df83e69bb0e84969865e0e1cdb000b0864cf5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13 20:39:58 +00:00
Hongjun Ni
c424879b4c Add vxlan-gpe tunnel to sw_interface_dump
Patchset 2: rebuild

Change-Id: I3375d6c9c7e18ab46896552614369b9d77ee6004
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-13 19:06:48 +00:00
Damjan Marion
86be48773c Explicity specify IP address type for format_ip46_address function
Change-Id: I3379517535a98a7a5fbd3173503f288a81378821
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-13 19:04:12 +02:00
Pierre Pfister
a38c3df5fd VPP-117: Fix ip4 and ip6 lookup and rewrite traces
Previous patch was printing wrong data since rewrite node traces
an ethernet packet while other ip nodes trace an IP packet.

This patch introduces different tracing functions for:
- lookup node (where the fib index is valid)
- rewrite node (where an ethernet frame is available)
- other ip nodes (only the ip header is traced)

Change-Id: I5971a2e89ae8668f5aed4a410565a5f27e01fc22
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
(cherry picked from commit 584b99a0120778108bd019b697639fbf3c1505d1)
2016-06-13 14:33:22 +00:00
Hongjun Ni
51e332ab83 Fix next-protocol issue configured from Honeycomb
PatchSet 2: rebuild.

Change-Id: I18ee050629129871b44271f92a1e63b661d55c05
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-12 03:02:32 +00:00
Dave Barach
b3ca6589eb Return 0 if no tap interfaces are ready
Otherwise, if tapcli-rx manages to make it into polled-mode, it will
never leave polled mode. This has been wrong since day 1, sometime in
early 2013.

Change-Id: I124e01a48db5abbc4eb5240c8d59f76dc562e9f2
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-10 18:32:08 -04:00