vpp.git
8 years agoPython-API: Support for zero-length arrays from caller to VPP. (Previously only VPP... 55/855/1
Ole Troan [Mon, 25 Apr 2016 10:36:02 +0000 (12:36 +0200)]
Python-API: Support for zero-length arrays from caller to VPP. (Previously only VPP to caller was supported.)

Change-Id: Id660caeb780f3b26cc091467291463980f485178
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoUpdated .gitignore for Python API generated file 53/853/1
Keith Burns (alagalah) [Sun, 24 Apr 2016 18:13:49 +0000 (11:13 -0700)]
Updated .gitignore for Python API generated file

Change-Id: I7c08b52124b44feb36e04a7fd417fe14b367cb44
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoAdd clib_memcpy macro based on DPDK rte_memcpy implementation 46/846/3
Damjan Marion [Sun, 13 Mar 2016 01:22:06 +0000 (02:22 +0100)]
Add clib_memcpy macro based on DPDK rte_memcpy implementation

Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd a vpp_restart command 45/845/1
Dave Barach [Fri, 22 Apr 2016 13:54:22 +0000 (09:54 -0400)]
Add a vpp_restart command

vpp_restart solves the problem of restarting vpp and not exiting until
the new vpp instance is sufficiently established to allow immediate
binary API connections. The point is to avoid using arbitrary "sleep
N" commands e.g. in CSIT shell scripts.

We send SIGTERM to the current vpp process, and expect / depend on the
process-monitor du jour to remove the vpp-api shared-memory segment.

vpp_restart exits w/ status 0 if all is well, non-zero upon failure.

In trying to make vpp_restart reliable, we discovered a
recently-introduced heap corruption bug in .../dpdk/init.c, which
caused vpp to crash on startup once every 20 times on a particular
rig.

If possible, we should check /var/log/syslog for evidence of
unexpected multiple restarts during regression-testing.

Change-Id: Ic48c74b1a94a4368066ba2e326d4b12d51192088
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoFix duplicate free 41/841/2
Dave Barach [Fri, 22 Apr 2016 11:54:02 +0000 (07:54 -0400)]
Fix duplicate free

Change-Id: Ifda07e476c74da9bfd7e21f02aa09160a0212e24
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoUse memory from other CPU sockets if there is no local 39/839/2
Damjan Marion [Thu, 21 Apr 2016 19:42:40 +0000 (21:42 +0200)]
Use memory from other CPU sockets if there is no local

This fixes crash when local socket memory is not available
so rx/tx queue setup fails. Here we simply retry operation
without being so picky about memory location.

Change-Id: I5bae47defe3c0fe120853378ed13141893284a5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemoving dpdk socket-mem from startup.conf 38/838/2
Damjan Marion [Thu, 21 Apr 2016 18:55:18 +0000 (20:55 +0200)]
Removing dpdk socket-mem from startup.conf

We allocate 512M of memory on each available cpu socket
by default so this is not needed anymore in startup.conf

Change-Id: Ib28b25df8d6722777a006aaddd1d56f21ab7b58a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix warning in vppapigen 30/830/2
Damjan Marion [Thu, 21 Apr 2016 07:24:17 +0000 (09:24 +0200)]
Fix warning in vppapigen

Change-Id: I6301ece0d772fd5a6271edd07765b05ef0b63f21
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd Broadwell-EP/EX to the uarch list 05/805/2
Damjan Marion [Mon, 18 Apr 2016 10:45:15 +0000 (12:45 +0200)]
Add Broadwell-EP/EX to the uarch list

Change-Id: I2ab84846ac88d3170b8c847914749e2a728dfa2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove execute flags from some dpdk patch files 29/829/2
Damjan Marion [Wed, 20 Apr 2016 19:31:30 +0000 (21:31 +0200)]
Remove execute flags from some dpdk patch files

Change-Id: I972b784082de45480baf1d1f07845743afddea40
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoubuntu 16.04 build support. Supporting systemd with vpp.service files. 96/796/3
Srivatsa Sangli [Fri, 15 Apr 2016 20:59:00 +0000 (13:59 -0700)]
ubuntu 16.04 build support. Supporting systemd with vpp.service files.

Incorporating review comments : modified debian/control dependencies

Change-Id: Ib2fe85d81eb7f1803ef8f54294c7c18cd07c61ba
Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
8 years agoAllow L3 forwarded jumbo packets on Bonded Interfaces 20/820/2
John Lo [Tue, 19 Apr 2016 20:54:20 +0000 (16:54 -0400)]
Allow L3 forwarded jumbo packets on Bonded Interfaces

Set max L3 packet size allowed to the lowest value of the slave links.
Also cleanup FIXME's for VMXNET3 driver.

Change-Id: Ia5cf742f2ab13b8cdc8ea6286f56464ee4f8c51d
Signed-off-by: John Lo <loj@cisco.com>
8 years agoPython-API: Inital commit of Python bindings for the VPP API. 19/719/9
Ole Troan [Sat, 9 Apr 2016 01:16:30 +0000 (03:16 +0200)]
Python-API: Inital commit of Python bindings for the VPP API.
See: https://wiki.fd.io/view/VPP/Python_API

Change-Id: If135fc32208c7031787e1935b399d930e0e1ea1f
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agodelete loopback interface cli 57/757/2
Alpesh S. Patel [Tue, 12 Apr 2016 16:58:56 +0000 (09:58 -0700)]
delete loopback interface cli
(to be consistent with other delete interface commands)

Change-Id: I41f63cc5b11d9fa9489edc54b17a4d857b711b66
Signed-off-by: Alpesh S. Patel <apatel9191@hotmail.com>
8 years agoCleaned up formatting in device.c - no functionality changes. 17/817/2
Keith Burns (alagalah) [Tue, 19 Apr 2016 19:54:12 +0000 (12:54 -0700)]
Cleaned up formatting in device.c - no functionality changes.

Change-Id: Ia7d83784d50b3651117201b876464528d015edea
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoChange from nsh-encap to nsh-vxlan-gpe within nsh vxlan tunnel's short_help 12/812/3
Hongjun Ni [Mon, 18 Apr 2016 18:53:59 +0000 (02:53 +0800)]
Change from nsh-encap to nsh-vxlan-gpe within nsh vxlan tunnel's short_help

Change-Id: Ifeba2e9857a112139b7be6436b59f05858f1abf9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoMove "ethernet" debug cli commands to "set interface" 94/794/2
Damjan Marion [Fri, 15 Apr 2016 12:26:00 +0000 (14:26 +0200)]
Move "ethernet" debug cli commands to "set interface"

Following two commands are changed:

ethernet mtu -> set interface mtu
ethernet promiscuous -> set inteface promiscuous

Change-Id: I5037e021933156c06044fb723a05ad330f8162b7
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd TAG=vpp_gcov which compiles vpp to produce .gcda files 10/810/2
Dave Barach [Mon, 18 Apr 2016 21:10:18 +0000 (17:10 -0400)]
Add TAG=vpp_gcov which compiles vpp to produce .gcda files

Change-Id: Ib6a0940e08f9e0983f3ec70f9e8488c2185ca4da
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-6: set epoll wait-time to zero when binary API messages are waiting 15/815/1
Dave Barach [Tue, 19 Apr 2016 13:38:35 +0000 (09:38 -0400)]
VPP-6: set epoll wait-time to zero when binary API messages are waiting

Change-Id: I629ef98ecd3b729d2564b3a1ba8c6039f854f86c
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoAdd API to get the dpdk interface stats delta. 23/623/3
Sean Hope [Mon, 28 Mar 2016 17:11:31 +0000 (13:11 -0400)]
Add API to get the dpdk interface stats delta.

Internally change the clearing and displaying of the dpdk stats to be
based on deltas.

Change-Id: I76605ac67492a374ff5522ff44d4a0190cf94e18
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoAdd support for AArch32 99/799/3
Christophe Fontaine [Sat, 9 Apr 2016 03:38:49 +0000 (12:38 +0900)]
Add support for AArch32

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>
8 years agodpdk socket-mem handling optimizations 95/795/3
Damjan Marion [Fri, 15 Apr 2016 18:24:55 +0000 (20:24 +0200)]
dpdk socket-mem handling optimizations

 - introduces default socket-mem size of 512 MB per socket
 - default socket-mem value is applied to all discovered CPU sockets
 - fixes bug when < 1024 socket-mem parameter is specified
 - for socket-mem < 1024 code prefers 2 MB pages
 - improves handling of manualy specified socket-mem values

Change-Id: I9ef848108d7dd1228fbd82a5be49eb5277a93683
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoUsing classifier/ACL from now on. Changes pertaining to that. 90/790/3
rangan [Fri, 15 Apr 2016 12:01:46 +0000 (17:31 +0530)]
Using classifier/ACL from now on. Changes pertaining to that.

Change-Id: I682b9a361c7308d6d0abb9d7d0320215f0d91e50
Signed-off-by: rangan <rangan@cisco.com>
8 years agoENIC driver patch to fix rx miss or drop counters 98/798/1
John Lo [Sat, 16 Apr 2016 04:00:17 +0000 (00:00 -0400)]
ENIC driver patch to fix rx miss or drop counters

Change-Id: Ic05d182a5659417e91b85c0ae20b6822a5445945
Signed-off-by: John Lo <loj@cisco.com>
8 years agoaf_packet: clear bitmap entries when processing input 88/788/2
Peter Lei [Thu, 10 Mar 2016 09:03:36 +0000 (04:03 -0500)]
af_packet: clear bitmap entries when processing input

Need to clear the bitmap entry when processing each input file
descriptor.

This becomes an issue on interface deletion. A crash occurs due
to assertion in a debug image

https://gerrit.fd.io/r/#/c/615/ - removed the code when this was set
again, but the bitmap needs to be cleared

Change-Id: I7cccb9bf8b9b2eb5a7f60ecda7530784a9512116
Signed-off-by: Peter Lei <peterlei@cisco.com>
8 years agoRemove historical netconf message switch APIs 92/792/1
Dave Barach [Fri, 15 Apr 2016 12:25:08 +0000 (08:25 -0400)]
Remove historical netconf message switch APIs

The scheme is unused, and never to be used again; it was a bad idea in
the first place.

Change-Id: I1479a1fa9191e0374e00f7326545d216c3a11e32
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoTook care of code review comments. Extended the fix to other files. 81/781/4
rangan [Fri, 15 Apr 2016 05:32:32 +0000 (11:02 +0530)]
Took care of code review comments. Extended the fix to other files.

Change-Id: I24e688884cd5896b317efb53e1d193f7d363715a
Signed-off-by: rangan <rangan@cisco.com>
8 years agoAdd LISP API 89/789/1
Andrej Kozemcak [Thu, 31 Mar 2016 11:51:42 +0000 (13:51 +0200)]
Add LISP API

SET API:
lisp_add_del_locator_set
lisp_add_del_locator
lisp_add_del_local_eid
lisp_gpe_add_del_fwd_entry
lisp_add_del_map_resolver
lisp_gpe_add_del_iface

SHOW API:
lisp_locator_set_dump
lisp_local_eid_table_dump
lisp_gpe_tunnel_dump
lisp_map_resolver_dump

Change-Id: Ie7f521e7e64ad2736b8417852b38454bfdef3728
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
8 years agoFix dependency install on Ubuntu 16.04 38/738/3
Damjan Marion [Mon, 11 Apr 2016 17:29:39 +0000 (19:29 +0200)]
Fix dependency install on Ubuntu 16.04

Change-Id: I2a915a64c65ee78658ee782c0f16963024b8b2eb
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRework of DPDK PCI device uio driver binding process 80/780/6
Damjan Marion [Wed, 13 Apr 2016 16:03:20 +0000 (18:03 +0200)]
Rework of DPDK PCI device uio driver binding process

This is complete rework of DPDK PCI initialization. It drops
previous scheme where lspci/route/awk/sed are used and instead
sysfs is solely used for discovering Ethernet PCI devices. Criteria
for blacklisting device is changed from exsiting routing table entry
to simple interface state obtained by SIOCGIFFLAGS ioctl().
It checks for IFF_UP flag, so as long as interface is declared
up and even when carrier is down interface will be blacklisted.

Change-Id: I59961ddcf1c19c728934e7fe746f343983741bf1
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoInit rte_mbuf length fields in af_packet driver 41/741/2
Damjan Marion [Tue, 12 Apr 2016 03:33:06 +0000 (05:33 +0200)]
Init rte_mbuf length fields in af_packet driver

Change-Id: I30cdad9585c1457c0d8ceecb3e5110ad40740021
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoChange ARP and IP6-ND nodes to use interface-output node for output 66/766/2
John Lo [Tue, 12 Apr 2016 22:20:39 +0000 (18:20 -0400)]
Change ARP and IP6-ND nodes to use interface-output node for output

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>
8 years agoFix vppinfra unit tests 62/762/2
Florin Coras [Tue, 12 Apr 2016 22:05:27 +0000 (00:05 +0200)]
Fix vppinfra unit tests

"make check" in build-root/build-$tag-$arch/vppinfra should now work on a
machine with 3G of spare memory

Change-Id: Ie6a22e8496b56b93aa90fdc81e3e0c10dc7514fb
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoMove autogenerated vnet files to config folder 68/768/3
Florin Coras [Tue, 12 Apr 2016 22:47:14 +0000 (00:47 +0200)]
Move autogenerated vnet files to config folder

This cleans up vnet folder however it doesn't clean the existing
autogenerated files. I'm not aware of any automated solution to achieve
this without involving git.

Change-Id: Ib29869e08e1d3bd87b7b54bc414f88bd9c632372
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoOpaque index is not populated when ACL is configured. Fixed it. 75/775/2
rangan [Wed, 13 Apr 2016 11:38:11 +0000 (17:08 +0530)]
Opaque index is not populated when ACL is configured. Fixed it.
This is inline with ip6_classify.c

Change-Id: Ib6e1f6fa3e4669e0a94e4ae2da48eacb240d192b
Signed-off-by: rangan <rangan@cisco.com>
8 years agoVHOST counters reversed 43/743/2
Shesha Sreenivasamurthy [Tue, 12 Apr 2016 05:52:48 +0000 (22:52 -0700)]
VHOST counters reversed

    VHOST counters are reversed. RX packet count
    are shown as TX and vise-versa in "show hardware"
    statistics.

Change-Id: Ie1d41f1f0845edf495cdf34ca65466fc307940c6
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoCreate macro for next_nodes used in lookup family of nodes 71/771/2
Damjan Marion [Wed, 13 Apr 2016 09:21:07 +0000 (11:21 +0200)]
Create macro for next_nodes used in lookup family of nodes

This should help when adding new adjacency types

Change-Id: I1832c6b7a80b6bc69ed83423a60511b7932f336f
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdded a LICENSE file 69/769/1
Ed Warnicke [Wed, 13 Apr 2016 00:40:14 +0000 (19:40 -0500)]
Added a LICENSE file

Change-Id: Iba5dbd74baf18e07a986d30ee67fcff334f5f206
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoPorting 2 dpdk patches to dpdk 16.04 patches 59/759/2
Todd Foggoa [Tue, 12 Apr 2016 18:33:55 +0000 (14:33 -0400)]
Porting 2 dpdk patches to dpdk 16.04 patches

Change-Id: If298d0ba4941b3c8ccec3b407080661b4a06ac5b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoCreating a new CLI to create loopback interfaces to make the interface 15/715/2
Alpesh Patel [Fri, 8 Apr 2016 14:27:37 +0000 (07:27 -0700)]
Creating a new CLI to create loopback interfaces to make the interface
creation cli consistent

Change-Id: I72f074bb8c771511cb5203af6905adccefbb4197
Signed-off-by: Alpesh Patel <apatel9191@hotmail.com>
8 years agoIP6 FIB: Micro optimization in lookup 18/718/3
Pierre Pfister [Fri, 8 Apr 2016 16:49:48 +0000 (17:49 +0100)]
IP6 FIB: Micro optimization in lookup

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>
8 years agoAdd support for DPDK 16.04 release, rebase some of 2.2.0 patches 40/740/2
Damjan Marion [Tue, 12 Apr 2016 03:10:25 +0000 (05:10 +0200)]
Add support for DPDK 16.04 release, rebase some of 2.2.0 patches

Change-Id: I08292ba39dc6012c2edbcdaed0b02a8ebe07aec4
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd unit test infrastructure for LISP protocol 07/707/4
Filip Tehlar [Thu, 7 Apr 2016 08:04:34 +0000 (10:04 +0200)]
Add unit test infrastructure for LISP protocol

Change-Id: I802700ad832de1dc6f4a1981e8985aa6e926c8ad
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
8 years agoAdd counter for the number of barrier syncs performed. 00/700/3
Bud Grise [Wed, 16 Mar 2016 17:09:46 +0000 (13:09 -0400)]
Add counter for the number of barrier syncs performed.

Change-Id: I42b26c8f95c17577006f13e3419b8ccc9ef7c4f3
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoAdd a configurable "significant error" metric 57/657/2
Dave Barach [Thu, 31 Mar 2016 19:32:54 +0000 (15:32 -0400)]
Add a configurable "significant error" metric

Change-Id: Idda59272a029ffcbc029f9bb167508d7bd5e6e21
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agovagrant: libvirt configuration. 84/684/2
Jeff Shaw [Tue, 5 Apr 2016 17:23:17 +0000 (10:23 -0700)]
vagrant: libvirt configuration.

Configure the proxy, vcpu, and memory parameters for the libvirt provider.

Change-Id: Id662e60f76b4b424d3a5d98929a44ef2587ef258
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
8 years agoAdd a counter for unknown IPv6 hop-by-hop options. 35/735/1
Yoann Desmouceaux [Mon, 11 Apr 2016 15:04:29 +0000 (17:04 +0200)]
Add a counter for unknown IPv6 hop-by-hop options.

Change-Id: I3db82b71ae5e32e0f2230662497a05e57ddb6755
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
8 years agoFix possible infinite loop in IPv6 hop-by-hop header parsing 32/732/2
Yoann Desmouceaux [Mon, 11 Apr 2016 08:38:23 +0000 (10:38 +0200)]
Fix possible infinite loop in IPv6 hop-by-hop header parsing

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>
8 years agoPropagate the VLIB_FRAME_NO_FREE_AFTER_DISPATCH flag to cloned next_frames 01/701/2
Bud Grise [Tue, 5 Apr 2016 00:17:36 +0000 (20:17 -0400)]
Propagate the VLIB_FRAME_NO_FREE_AFTER_DISPATCH flag to cloned next_frames

Without this, frames can be double-freed to nodes like "error-punt",
leading to buffer leaks and other problems.

Change-Id: Ie28a4f504254ee439f720dbaac7f12206cea753b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoAdd vnet_rename_interface API 02/702/2
Sean Hope [Wed, 9 Mar 2016 05:35:21 +0000 (00:35 -0500)]
Add vnet_rename_interface API

Change-Id: I9a8e1ed310aa9a72644540856426c77f61f4b4bb
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoBump DPDK 16.04 to RC4 33/733/2
Damjan Marion [Mon, 11 Apr 2016 10:51:00 +0000 (12:51 +0200)]
Bump DPDK 16.04 to RC4

Change-Id: Ia9affeee54e860b6039d7ee0f411bd022b1dc76c
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd configure option to enable building unit tests 34/734/2
Damjan Marion [Mon, 11 Apr 2016 11:34:36 +0000 (13:34 +0200)]
Add configure option to enable building unit tests

Same template should be used for other libs...

Change-Id: Icc771cb6b243d215f30fb51c0dbc028e497a74c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd option to delete af_packet (host) interfaces 16/716/4
Peter Lei [Fri, 8 Apr 2016 15:16:31 +0000 (08:16 -0700)]
Add option to delete af_packet (host) interfaces

Change-Id: Iab76951758ae9b9a99d679a223941a4b8c683078
Signed-off-by: Alpesh S. Patel <apatel9191@hotmail.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agofix uninitialized vars warnings with -Os 20/720/1
Benoît Ganne [Sat, 9 Apr 2016 05:25:05 +0000 (22:25 -0700)]
fix uninitialized vars warnings with -Os

Change-Id: I15a16ba9751b6b612bac61a160b5da394ed2e15c
Signed-off-by: Benoît Ganne <bganne@kalrayinc.com>
8 years agoMigrate bootstrap.ubuntu.sh to using top level Makefile 96/696/3
Ed Warnicke [Wed, 6 Apr 2016 19:21:03 +0000 (12:21 -0700)]
Migrate bootstrap.ubuntu.sh to using top level Makefile

This script moves to using the top level Makefile
in vagrant.

The reason for not merging yet is to make sure that we
don't put the training at risk.  The patch should
be fine (its been tested), but better safe than sorry.

Change-Id: Ic57cfe1f26867c820784e5511d418e68f24b5fcd
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoAdd IKEv2 APIs 14/714/2
Matus Fabian [Fri, 8 Apr 2016 09:18:08 +0000 (11:18 +0200)]
Add IKEv2 APIs

Change-Id: I5936b05aa927b67c707b5858ffee45fc7a5d2043
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoAdd Rx and Tx statistics within nsh-vxlan-gpe node 03/703/4
Hongjun Ni [Wed, 6 Apr 2016 23:20:22 +0000 (16:20 -0700)]
Add Rx and Tx statistics within nsh-vxlan-gpe node

PatchSet2: Modify the code according to review comments.

PatchSet3: modify sw_if_index1 in encap.c.

Change-Id: Ic4d3ee19a0ba0fa10568e570a79a3cb85cfbc9ab
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoChange encap-fib-id and decap-fib-id within create_nsh_vxlan_gpe_tunnel_command 08/708/2
Hongjun Ni [Thu, 7 Apr 2016 00:54:39 +0000 (17:54 -0700)]
Change encap-fib-id and decap-fib-id within create_nsh_vxlan_gpe_tunnel_command

Change-Id: Ied5275fcea21ae2e0b346931f9e2f520a73afd67
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoAdd key.pad=0 within vnet_nsh_vxlan_gpe_add_del_tunnel 05/705/2
Hongjun Ni [Thu, 7 Apr 2016 00:18:39 +0000 (17:18 -0700)]
Add key.pad=0 within vnet_nsh_vxlan_gpe_add_del_tunnel

Change-Id: Ieed704ed0c3d747afc9836671f2ea9cc396ee09d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoChange key.src=a->dst.as_u32 within vnet_nsh_vxlan_gpe_add_del_tunnel 06/706/2
Hongjun Ni [Thu, 7 Apr 2016 00:47:08 +0000 (17:47 -0700)]
Change key.src=a->dst.as_u32 within vnet_nsh_vxlan_gpe_add_del_tunnel

Change-Id: Ica062e532d116cc1806d73f2fa85db89402928a4
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoEnhance CLI/API Support for Bonded Interface 86/686/2
John Lo [Tue, 5 Apr 2016 19:47:43 +0000 (15:47 -0400)]
Enhance CLI/API Support for Bonded Interface

For interfaces which are slave links to a bounded interface, do not
allow sub-interface creation nor interface state to be changed.
Change "show interface" to display interface state as "bond-slave"
for slave links to a bonded interface.
Change "show hardware" to support a "bond" keyword and display slave
links to a bonded interface.

Change-Id: I4db3cae6985bcb1489ab16a07c72c5ee9b2f2dd3
Signed-off-by: John Lo <loj@cisco.com>
8 years agoClassify node should pay attention to dynamically-added arcs 09/709/1
Dave Barach [Thu, 7 Apr 2016 14:16:33 +0000 (10:16 -0400)]
Classify node should pay attention to dynamically-added arcs

Change-Id: I65bc03dbb5fedfc75f4ce7153eae116fe599730c
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoDo not listen unless configured with cli-listen. 66/666/2
Ed Warnicke [Sat, 2 Apr 2016 03:43:37 +0000 (22:43 -0500)]
Do not listen unless configured with cli-listen.

I noticed while mucking about with lsof that vpp
was listening on port 5000.

telnet 0 5000 revealed that it was listening for
the cli on that port.

Digging into the code, it turns out that if you
do not configure cli-listen (Example:

unix {
     cli-listen localhost:5002
}
)

Then vpp is listening on the first available port
starting at port 5000 anyway.  This is a simple
patch to *not* listen unless configured to do so.

Change-Id: Id7f6f4d69e0a1642d2767849a90b21f38f21ecaa
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoFix ip4 udp encap length type 93/693/1
Florin Coras [Wed, 6 Apr 2016 15:05:17 +0000 (08:05 -0700)]
Fix ip4 udp encap length type

Change-Id: If666cda99a5fd92e904898ced40bcf2b5ac2d3a5
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoFix DPDK patch files so git am works smoothly 91/691/1
Todd Foggoa [Wed, 6 Apr 2016 13:57:01 +0000 (09:57 -0400)]
Fix DPDK patch files so git am works smoothly

Change-Id: Ic2a6e6f1ceea81f2e34f3db370682569327b44ad
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agohost-interface admin down/up does not bring the interface up 85/685/1
Alpesh Patel [Tue, 5 Apr 2016 19:49:30 +0000 (12:49 -0700)]
host-interface admin down/up does not bring the interface up

Change-Id: I4c9ae5d88e885ccbc85b64cadc052563529c762d
Signed-off-by: Alpesh Patel <apatel9191@hotmail.com>
8 years agoFix vppctl for multivpp 79/679/1
Ed Warnicke [Mon, 4 Apr 2016 21:37:21 +0000 (14:37 -0700)]
Fix vppctl for multivpp

Change-Id: If028aca042dbba653cc0f51a0149b36bed5c7853
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoFix DPDK check in udp.h 68/668/2
Florin Coras [Sat, 2 Apr 2016 18:30:39 +0000 (20:30 +0200)]
Fix DPDK check in udp.h

Change-Id: I4734b248f512e223703d234d28542257af1a8074
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoLISP GPE: initial CP commit and DP improvements 54/654/5
Florin Coras [Thu, 18 Feb 2016 21:20:01 +0000 (22:20 +0100)]
LISP GPE: initial CP commit and DP improvements

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>
8 years agoAdd options to link with external DPDK tree 61/661/2
Damjan Marion [Fri, 1 Apr 2016 10:35:17 +0000 (12:35 +0200)]
Add options to link with external DPDK tree

By uncommenting following lines in the build-data/platforms/vpp.mk
VPP links nicely with packaged DPDK 2.2 distributed with
Ubuntu 16.04 LTS.

vpp_uses_external_dpdk = yes
vpp_dpdk_inc_dir = /usr/include/dpdk
vpp_dpdk_lib_dir = /usr/lib
vpp_dpdk_shared_lib = yes

Change-Id: Id5b7d95bac6aa60341933b92e86d949a9abf1a5d
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd option to link DPDK dynamically 59/659/3
Damjan Marion [Fri, 1 Apr 2016 10:34:24 +0000 (12:34 +0200)]
Add option to link DPDK dynamically

Change-Id: Ie2b47f9020c8260b199d141103318a0261e16832
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd support for installing ipv4 routes via unresolved next hop 35/635/4
Damjan Marion [Tue, 29 Mar 2016 11:18:17 +0000 (13:18 +0200)]
Add support for installing ipv4 routes via unresolved next hop

Change-Id: I71f3ba0c8192fe0ac3b5b81fb1275b64ec02876a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoEnable af_packet interfaces in the API test apps 56/656/1
Damjan Marion [Thu, 31 Mar 2016 15:44:25 +0000 (17:44 +0200)]
Enable af_packet interfaces in the API test apps

Change-Id: Ic1247a712614df2762c95142122ff122076fd0ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove historical tags, fix the debug tag 49/649/1
Dave Barach [Wed, 30 Mar 2016 14:24:41 +0000 (10:24 -0400)]
Remove historical tags, fix the debug tag

Change-Id: I013784aeef5ae6b5ba4a30c7759e9daff3c2c576
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoAdd DPDK 16.04-rc2 support 44/644/2
Damjan Marion [Tue, 29 Mar 2016 20:37:02 +0000 (22:37 +0200)]
Add DPDK 16.04-rc2 support

Can be used by specifying DPDK_VERSION=16.04-rc2 in the make command line

Change-Id: I657b44d7ca22f1ef57756e7703088020fab12bc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoUpdate ENIC driver patches for DPDK 2.2.0 43/643/1
John Lo [Tue, 29 Mar 2016 20:14:35 +0000 (16:14 -0400)]
Update ENIC driver patches for DPDK 2.2.0

This includes all patches in ENIC driver which are up-streamed to DPDK
to improve RX performance, fix buffer/error handling and interoperation
with link bonding PMD library.

Change-Id: Id4c71a350d5234834951f9261c69db5476ba396b
Signed-off-by: John Lo <loj@cisco.com>
8 years agoSupport per-interface packet rx redirection 40/640/1
Dave Barach [Tue, 29 Mar 2016 15:56:41 +0000 (11:56 -0400)]
Support per-interface packet rx redirection

Change-Id: I8bb6124efa5665053620b48d11c8160472103c29
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoAdd abbility to specify dpdk tarball download base url 38/638/2
Damjan Marion [Tue, 29 Mar 2016 14:43:58 +0000 (16:43 +0200)]
Add abbility to specify dpdk tarball download base url

Change-Id: Ieceb0b1f4ab69609961d8946f627dd9311963da5
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix to centos vagrant file 37/637/1
Ed Warnicke [Tue, 29 Mar 2016 13:26:29 +0000 (08:26 -0500)]
Fix to centos vagrant file

Change-Id: I5ceae4354c029cb92527b2eeb1a71b76dc2b0311
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoMove classify_table_index under the union 32/632/4
Damjan Marion [Tue, 29 Mar 2016 11:06:36 +0000 (13:06 +0200)]
Move classify_table_index under the union

Fields needed only by specific adj type should
be shared.

Change-Id: I59ee15a29d2f5f527f46910a1a63866b291734c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdjacency allocator 30/630/1
Dave Barach [Wed, 23 Mar 2016 12:56:01 +0000 (08:56 -0400)]
Adjacency allocator

Change-Id: Ieacbfa4dbbfd13b38eaa2d37f618f212cef4e492
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix epl-release in make install-dep for rpm 21/621/2
Ed Warnicke [Mon, 28 Mar 2016 19:53:19 +0000 (14:53 -0500)]
Fix epl-release in make install-dep for rpm

Change-Id: I01a7421dc58ee6683eb84482bb92dd6a519a21e8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoIncrement MRU if hardware supports CRC stripping 26/626/2
Jurek Matuszewski [Mon, 28 Mar 2016 19:15:15 +0000 (15:15 -0400)]
Increment MRU if hardware supports CRC stripping

Change-Id: I46bd007c3c75e5fb872c1beba557e6140fa8d715
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoAllow vlans to be programmed on 40GE VF interfaces 24/624/2
Todd Foggoa (tfoggoa) [Mon, 28 Mar 2016 17:52:32 +0000 (13:52 -0400)]
Allow vlans to be programmed on 40GE VF interfaces

Change-Id: Ia3a1bf7cb482f0aa98628b23d88de01cf60c46a9
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoMark some show commands as mp safe 22/622/2
Todd Foggoa (tfoggoa) [Thu, 24 Mar 2016 15:51:24 +0000 (11:51 -0400)]
Mark some show commands as mp safe

Change-Id: I92cd378370feeddf27832acde06f186fbdf64908
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoevent logger skeletons, improve debug CLI 27/627/1
Dave Barach [Mon, 28 Mar 2016 21:12:19 +0000 (17:12 -0400)]
event logger skeletons, improve debug CLI

Change-Id: Ieb2e4043fc7bc3b4a5436a7a6aa35f573d8d4506
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoImprove main-loop event-logs 19/619/1
Dave Barach [Sat, 26 Mar 2016 22:45:42 +0000 (18:45 -0400)]
Improve main-loop event-logs

Change-Id: I984debeffe0dce36c9e7ab963f25d862cc7550cc
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoiOAM trace configuration APIs 11/611/4
Shwetha [Fri, 25 Mar 2016 10:55:01 +0000 (10:55 +0000)]
iOAM trace configuration APIs

Change-Id: I6d31f0ddb812d148ad065e27775440d09f402def
Signed-off-by: Shwetha <shwethab@cisco.com>
8 years agoUse rte_mempool private data for storing vlib_buffer_t 10/610/3
Damjan Marion [Thu, 24 Mar 2016 16:17:47 +0000 (17:17 +0100)]
Use rte_mempool private data for storing vlib_buffer_t

Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix distclean to correctly handle Centos 92/592/3
Ed Warnicke [Tue, 22 Mar 2016 17:52:22 +0000 (12:52 -0500)]
Fix distclean to correctly handle Centos

Change-Id: I3f930306e9f384011687d2ce88052639df0d966b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoFix vagrant centos flavor to work with top level make file 94/594/3
Ed Warnicke [Tue, 22 Mar 2016 21:10:07 +0000 (16:10 -0500)]
Fix vagrant centos flavor to work with top level make file

Change-Id: I89044ed27130a036536ed33aba847034ed15ad7d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agovpp-api-test and sample-plugin should depend on dpdk conditionally 17/617/2
Damjan Marion [Fri, 25 Mar 2016 20:20:03 +0000 (21:20 +0100)]
vpp-api-test and sample-plugin should depend on dpdk conditionally

Change-Id: Ie26340141fdbd3256e305ab37f4baa817081bf46
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd build-root/*.rpm to .gitignore 93/593/3
Ed Warnicke [Tue, 22 Mar 2016 21:09:29 +0000 (16:09 -0500)]
Add build-root/*.rpm to .gitignore

Change-Id: I88398b5e538271efa4657851bf53c9b76a56b432
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoRemove unnecesary clib_bitmap_set from af_packet input node 15/615/1
Damjan Marion [Fri, 25 Mar 2016 19:06:39 +0000 (20:06 +0100)]
Remove unnecesary clib_bitmap_set from af_packet input node

Change-Id: I856fefd52efdfc0a3b8be8bafa3f3106267dfcf1
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agol2-rw: Packet rewrite feature for L2 bridges 85/585/2
Pierre Pfister [Mon, 21 Mar 2016 16:17:52 +0000 (16:17 +0000)]
l2-rw: Packet rewrite feature for L2 bridges

This patch defines a new l2input feature: l2-rw
It makes use of vnet_classify in order to match
packets and applies mask/value changes depending
on the matched classify entry.

Change-Id: Ia98c128931e59195bf3ecb66721e155ff9049a2e
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoReduce number of parallel gcc invocations from 4 to 2 per cpu 08/608/1
Damjan Marion [Thu, 24 Mar 2016 16:19:27 +0000 (17:19 +0100)]
Reduce number of parallel gcc invocations from 4 to 2 per cpu

Some build hosts can run out of memory during compilation.
This should reduce memory demand without affecting build time.

Change-Id: I11bd2884a1f8885a8a332bbbf0a63324a3079c3b
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix L2 flood packet replication interaction with VXLAN-tunnel 02/602/1
John Lo [Wed, 23 Mar 2016 23:44:39 +0000 (19:44 -0400)]
Fix L2 flood packet replication interaction with VXLAN-tunnel

The check for input sw_if_index against output sw_if_index is not correct
for the interface on the replication order after VXLAN tunnel because the
encap code overwrite packet sw_if_index[VLIB_RX] with that of the VXLAN
tunnel sw_if_index. The check should be done using sw_if_index[VLIB_RX]
saved in the packet context.

Change-Id: I175717221409977e80576e84dfe5362d1f6aed2f
Signed-off-by: John Lo <loj@cisco.com>
8 years agoAdd dpdk vmxnet3 driver patch and init.c change to allow jumbo packets 01/601/1
John Lo [Wed, 23 Mar 2016 20:42:33 +0000 (16:42 -0400)]
Add dpdk vmxnet3 driver patch and init.c change to allow jumbo packets

Change-Id: I9d7f8b9a0543d885ed10908b859d52a80bf89f56
Signed-off-by: John Lo <loj@cisco.com>
8 years agotapcli: Receive vector of packets and memory leak fix 76/576/3
Pierre Pfister [Mon, 21 Mar 2016 12:21:30 +0000 (12:21 +0000)]
tapcli: Receive vector of packets and memory leak fix

tapcli interfaces were creating single-packet frames.
It now calls readv until the frame is full, or
readv returns error EAGAIN.
This is usefull when a significant amount of traffic
flows through tap interfaces.
This patch also fixes a memory leak by correctly
initializing b->clone_count to zero.

Change-Id: I15e435ba76d542be2f263274e76297425cd10243
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoUnbreak build on gcc-5 79/579/1
Damjan Marion [Mon, 21 Mar 2016 18:09:09 +0000 (19:09 +0100)]
Unbreak build on gcc-5

Change-Id: I0dc5f48ade786b60b34441c30f3de5b9f373d714
Signed-off-by: Damjan Marion <damarion@cisco.com>