vpp.git
8 years agoFixed vxlan link status. 43/443/2
Pavel Kotucek [Mon, 29 Feb 2016 14:03:08 +0000 (15:03 +0100)]
Fixed vxlan link status.

Vxlan interface link status corresponds to admin status.
When vxlan interfcae is set "admin-up" link status is "link-up" and if interface is set "admin-down" link status is "link-down" also.

Change-Id: Iaa85fa8dcd672519312cc7ee6a17df6f4498259d
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
8 years ago-O3 warnings be gone 44/444/1
Dave Barach [Mon, 29 Feb 2016 14:45:08 +0000 (09:45 -0500)]
-O3 warnings be gone

Note that compiling -O3 doesn't improve performance as of this
writing, might as well clean up warnings in any event.

Change-Id: Ic2f4982d12fbbf36f5324075183982731759dc94
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoInvert matching logic for *_uses_dpdk in build-data/packages/*.mk 40/440/1
Damjan Marion [Fri, 26 Feb 2016 23:12:55 +0000 (00:12 +0100)]
Invert matching logic for *_uses_dpdk in build-data/packages/*.mk

Change-Id: If07a74afd92196c035d720cedaac36493a09e400
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd packet tracing hint 18/418/2
Bud Grise [Fri, 19 Feb 2016 17:10:33 +0000 (12:10 -0500)]
Add packet tracing hint

This avoids checking the buffer flags bit if tracing is not enabled.

Change-Id: I32e1a90b5fd10318254c611344488bc2a441c71e
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoFixed issue with json output in vpp_api_test. 05/405/3
Pavel Kotucek [Wed, 24 Feb 2016 14:52:42 +0000 (15:52 +0100)]
Fixed issue with json output in vpp_api_test.

When it runs 'exec' command string "(nil)" is appended to the end of the
console output.

Change-Id: I7cdae78b2166829dd2160e92ed8181203eb491ed
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
8 years agoFix ENIC PMD not sending the first packet on TX. 39/439/2
John Lo [Fri, 26 Feb 2016 19:48:54 +0000 (14:48 -0500)]
Fix ENIC PMD not sending the first packet on TX.

Change-Id: I615e9ca6f445092baa211098eb64f9553dd4c407
Signed-off-by: John Lo <loj@cisco.com>
8 years agoFix link bonding PMD slave status polling path used by VIC ENIC driver. 38/438/2
John Lo [Fri, 26 Feb 2016 19:46:05 +0000 (14:46 -0500)]
Fix link bonding PMD slave status polling path used by VIC ENIC driver.

Change-Id: Ic9fc952b618477beb246974b33d753bf6fd47dde
Signed-off-by: John Lo <loj@cisco.com>
8 years agoUpdate PowerPC (qppc) platform to build with Ubuntu cross-tools 37/437/1
Damjan Marion [Fri, 26 Feb 2016 12:46:57 +0000 (13:46 +0100)]
Update PowerPC (qppc) platform to build with Ubuntu cross-tools

Standard Ubuntu PowerPC toolchain can be installed with:

  apt-get install crossbuild-essential-powerpc

And code can be built with:

  make PLATFORM=qppc TAG=qppc ...

Change-Id: I247355fc89fd61aedb8693156e84c454ca86eb75
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd support for native vpp_lite (non-dpdk) platform 34/434/1
Damjan Marion [Thu, 25 Feb 2016 22:17:38 +0000 (23:17 +0100)]
Add support for native vpp_lite (non-dpdk) platform

Change-Id: Icaa71957f67b923bc9795baa78c7495055615672
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoMove dpdk (un)format functions to separate c file 29/429/2
Damjan Marion [Thu, 25 Feb 2016 15:00:11 +0000 (16:00 +0100)]
Move dpdk (un)format functions to separate c file

Change-Id: Idb1b1bf6c1b3b3d66672cc715e45aec299fb7592
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd support of Ethernet link bonding utilizing DPDK link bonding 15/415/2
John Lo [Thu, 25 Feb 2016 16:17:55 +0000 (11:17 -0500)]
Add support of Ethernet link bonding utilizing DPDK link bonding
poll mode driver library. The bonded interfaces to be created on
VPP startup is specified in the dpdk section of startup.conf
or qn.conf, using DPDK EAL command. Following is an example of a
dpdk section white listing PCI addressses of 4 ethernet interfacess
to be under VPP control plus two bonded interface and the PCI addresses
of the slaves in each:
dpdk { socket-mem 1024,1024
dev 0000:0f:00.0 dev 0000:10:00.0 dev 0000:11:00.0 dev 0000:12:00.0
vdev eth_bond0,mode=2,slave=0000:0f:00.0,slave=0000:11:00.0,xmit_policy=l34
vdev  eth_bond1,mode=2,slave=0000:10:00.0,slave=0000:12:00.0,xmit_policy=l34
}
Note that only balance XOR (mode 2) is supported and "xmit_policy=l34"
specifies to use layer 3 SIP/DIP and layer 4 Sport/Dport for load
balance. Using "xmit_policy=l2" for SMAC/DMAC or "xmit_policy=l23" for
SMAC/DMAC and SIP/DIP should also work.

Change-Id: Iaf6438686fa20cce893cb5a823b76e2886b4360b
Signed-off-by: John Lo <loj@cisco.com>
8 years agoadd install-dep target to toplevel Makefile 13/413/2
Damjan Marion [Thu, 25 Feb 2016 15:26:01 +0000 (16:26 +0100)]
add install-dep target to toplevel Makefile

Change-Id: I9dbe6676086ef083729bec1774f544498d1ec3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix indexing error in init.c for vnet dpdk. 12/412/1
John Lo [Thu, 25 Feb 2016 15:17:30 +0000 (10:17 -0500)]
Fix indexing error in init.c for vnet dpdk.

Change-Id: I1bab9e8cf428b0d27edf98fa54ffc3edc32fd4f5
Signed-off-by: John Lo <loj@cisco.com>
8 years agoAdd live migration support to (non-dpdk) vhost-user driver 10/410/2
Yoann Desmouceaux [Wed, 24 Feb 2016 21:51:00 +0000 (22:51 +0100)]
Add live migration support to (non-dpdk) vhost-user driver

This patch adds live migration support to vhost interfaces, by supporting the VHOST_F_LOG_ALL feature. When qemu starts a migration, it will negotiate this feature, and provide a fd for a "dirty log" shared mem space. This log is a bitmap representing pages in the device memory.
Whenever we touch memory pointed by a "desc" vring, or modify a "used" vring, we log the corresponding page in the bitmap. This allows qemu to send the dirty page to the destination host.
See https://github.com/qemu/qemu/blob/master/docs/specs/vhost-user.txt, ยง "Live migration" for more details.
In addition to this, this code provides support for the VHOST_USER_F_PROTOCOL_FEATURES feature, and to VHOST_USER_{GET,SET}_PROTOCOL_FEATURES and VHOST_USER_SET_VRING_ENABLE messages, required for live migration.

Change-Id: I7577efce8bd67653218f4291af1d651de451e552
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
8 years agoLink the vpp application against libvnet.so, not libvnet.a 08/408/1
Dave Barach [Wed, 24 Feb 2016 16:29:06 +0000 (11:29 -0500)]
Link the vpp application against libvnet.so, not libvnet.a

Turn of srp, mainly as an example of how to restructure a featurette
for selective disablement.

Change-Id: Id3364c58a8711b103939f4434adfa67177380f67
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoEnable all vrings if PROTOCOL_FEATURES are not negotiated 00/400/2
Shesha Sreenivasamurthy [Tue, 23 Feb 2016 21:52:31 +0000 (13:52 -0800)]
Enable all vrings if PROTOCOL_FEATURES are not negotiated

Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoHandle dynamic enable/disable VHOST_USER interface 69/369/2
Shesha Sreenivasamurthy [Fri, 19 Feb 2016 21:36:53 +0000 (13:36 -0800)]
Handle dynamic enable/disable VHOST_USER interface

    If number of Qs enabled by the guest is less
    than number of Qs exported to guest, then all
    threads route packet to Q0 with the assumption
    that guest is not interested in performance.
    If all Qs are enabled, each thread queues packet
    in their own TX-Q of the VHOST_USER interface,
    boosting performance.

Change-Id: Ic24bb8c0505b11c7513aeecd21c9ec5da5f90138
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoFew improvements in toplevel Makefile 98/398/1
Damjan Marion [Tue, 23 Feb 2016 21:04:50 +0000 (22:04 +0100)]
Few improvements in toplevel Makefile

Change-Id: I896aed32499cd7159c4b6f3b165cab4e579f6153
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoEnable DPDK KNI code based on DPDK config 90/390/2
Damjan Marion [Tue, 23 Feb 2016 18:20:28 +0000 (19:20 +0100)]
Enable DPDK KNI code based on DPDK config

Change-Id: Iab579c4a7e615c723d10acf0532490cdaa6db05a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix warnings in vhost-user code with older version of DPDK 91/391/1
Damjan Marion [Tue, 23 Feb 2016 18:23:44 +0000 (19:23 +0100)]
Fix warnings in vhost-user code with older version of DPDK

Change-Id: If76ef977e3914b51da0d6bb5e4089acb0bd67baa
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agodpdk: fix enic pmd driver tx function 61/361/3
Yoann Desmouceaux [Fri, 19 Feb 2016 20:30:09 +0000 (21:30 +0100)]
dpdk: fix enic pmd driver tx function

Adding a patch to fix DPDK 2.2.0 enic PMD driver TX function.

The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.

Change-Id: Ic4f3be83865367306785a57e2694e0ccfa295c7b
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
8 years agoAdded MTU information to sw_interface_dump 38/338/5
Pavel [Wed, 17 Feb 2016 14:10:04 +0000 (15:10 +0100)]
Added MTU information to sw_interface_dump

Change-Id: Ie69837fd6903b715cb7b840b67c869a9b12c84a7
Signed-off-by: Pavel <pavel.kotucek@pantheon.tech>
8 years agoRebalance checkConnected() 23/323/4
Robert Varga [Sun, 14 Feb 2016 01:10:18 +0000 (02:10 +0100)]
Rebalance checkConnected()

AtomicBoolean forces the enclosed boolean to be cache-aligned,
needlessly hitting a cacheline. Since we only flip state only once,
when the connection is severed, we can turn this into a volatile
boolean.

Doing that is costing us a synchronized close(), but that is perfectly
acceptable, as that is called only once.

Change-Id: I76fda3d3f65a5f800e7d3970b0b8fe99fb3e8b6d
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoHandle dpdk packet_types properly 67/367/3
Damjan Marion [Fri, 19 Feb 2016 15:23:45 +0000 (16:23 +0100)]
Handle dpdk packet_types properly

Change-Id: Ie13f92a21ed8b81775b1e9cbbf2619e752ab6a04
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd custom mac address option to vhost interfaces. 62/362/3
Pierre Pfister [Fri, 19 Feb 2016 13:52:44 +0000 (13:52 +0000)]
Add custom mac address option to vhost interfaces.

Generating a new MAC address everytime vpp reboots can quickly
become cumbersome (e.g. in test scenarios).
This commit allows vhost mac addresses to be configured
manually.

Change-Id: Ic6d16a2d14cdf8e49dc29041bbafde39d9fc8370
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoSerialize and upload the data plane node graph 63/363/1
Dave Barach [Fri, 19 Feb 2016 14:06:23 +0000 (09:06 -0500)]
Serialize and upload the data plane node graph

Include node names and graph arcs. Prep work for uploading node
runtime data, so the latter can be reported in a comprehensible
manner.

Change-Id: I215b1f8cff244200c37c7e088f1f22229dc97eb6
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoPer-interface, per-address-family fast packet filter 44/344/2
Dave Barach [Wed, 17 Feb 2016 22:52:26 +0000 (17:52 -0500)]
Per-interface, per-address-family fast packet filter

Change-Id: I122aa8edfb16a433a8ccdfb72ee8463c48c56d6d
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agodpdk: fix enic pmd driver tx function 56/356/2
Yoann Desmouceaux [Fri, 19 Feb 2016 10:18:29 +0000 (11:18 +0100)]
dpdk: fix enic pmd driver tx function

Adding a patch to fix DPDK enic PMD driver TX function.

The enic PMD driver send function uses a constant offset instead of relying on the data_off in the mbuf to find the start of the packet.

Change-Id: I74dbcce949f08e39070a369d992a90586af140a6
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
8 years agoAdd GDB and GDB Server to bootstrap files 54/354/1
Keith Burns (alagalah) [Fri, 19 Feb 2016 05:18:46 +0000 (06:18 +0100)]
Add GDB and GDB Server to bootstrap files

Validated following images used do not contain gdb, gdbserver:
puppetlabs/centos-7.0-64-nocm
puppetlabs/ubuntu-14.04-64-nocm

Note that centos7 does not include emacs

Change-Id: I091a64a7c667e081574763537de724f9feaae0dc
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoAdd jumbo frames support to non-dpdk vhost interfaces. 01/301/4
Pierre Pfister [Fri, 12 Feb 2016 13:18:42 +0000 (13:18 +0000)]
Add jumbo frames support to non-dpdk vhost interfaces.

This code provided inter-VM (2 cores per VM) throughput of
22Gbps using iperf through VPP (1 core) with 9k frames.
With the same setup and pktgen running on both sides, it
reached 5Mpps with no packets drop (Equivalent to before the patch).
During the tests the average vector length was about 1, which
likely means that VPP is not the bottleneck.

The patch also includes some generic functions for vlib buffers
allowing for chained buffer construction whether or not DPDK is enabled.

Change-Id: Icfd1803e84b2b4578f305ab730576211f6242d6a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoIncrease number of per-cpu mheaps to 256 31/331/2
Damjan Marion [Sat, 6 Feb 2016 18:16:21 +0000 (19:16 +0100)]
Increase number of per-cpu mheaps to 256

It also includes check to ensure that number of
per-cpu mheaps is not lower than number of cpus.

Change-Id: Ibc68b34dda130f922243f9ea15b03e44bbcac269
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove vec_sort macro 32/332/1
Damjan Marion [Tue, 16 Feb 2016 16:32:34 +0000 (17:32 +0100)]
Remove vec_sort macro

vec_sort macro was using gcc proprietary nested functions that
require a executable stack and they are considered as unsafe.
Also, nested functions are not supported by other compilers.
vec_sort_with_function() should be used instead.

Change-Id: I05959da63d222ec71c090ba63420b427ce10c79b
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoShow DPDK EAL cmdline args in 'show version verbose' 30/330/1
Damjan Marion [Tue, 16 Feb 2016 11:29:57 +0000 (12:29 +0100)]
Show DPDK EAL cmdline args in 'show version verbose'

Change-Id: I88a8038a36e7e5060f354cd66a2532ef8c996b67
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoDisable for-us udp/tcp checksum validation by default 27/327/1
Dave Barach [Mon, 15 Feb 2016 16:34:13 +0000 (11:34 -0500)]
Disable for-us udp/tcp checksum validation by default

This patch alters behavior for dpdk rx packets. Depending on test
results, it may be necessary to extend the scheme to packets received
on non-dpdk paravirtualized interfaces, and packets originating in the
vpp stack itself.

Change-Id: I8444232a90ff176e7d6a688e36801174575251a1
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoImplement multiple TX queue sharing 19/319/2
Damjan Marion [Fri, 12 Feb 2016 17:00:23 +0000 (18:00 +0100)]
Implement multiple TX queue sharing

Maximum number of TX queues ca be defined by NIC driver
or configured manualy with 'dpdk { max-tx-queues X }'.
If system have more worker threads than TX queues they will
be shared between them. Before this change only one tx
queue was used in such cases.

Change-Id: Iab68170ab45fa6b9925fc4e79ccab9222f095e7e
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoIncrease VLIB_MAX_CPUS to 256 38/238/3
Damjan Marion [Sat, 6 Feb 2016 18:16:21 +0000 (19:16 +0100)]
Increase VLIB_MAX_CPUS to 256

Change-Id: Iac68b38dda1a0f9e2242f9eab5b03e44bbcac269
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoMake size of per-thread mini counter vector equal to number of threads 37/237/3
Damjan Marion [Fri, 5 Feb 2016 23:54:12 +0000 (00:54 +0100)]
Make size of per-thread mini counter vector equal to number of threads

Change-Id: Icfd91cca3cd686e5efa8a988f04483238605e1cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove duplicate vlib_call_init_function() for tuntap init 20/320/1
Oleg A. Arkhangelsky [Sat, 13 Feb 2016 17:32:12 +0000 (20:32 +0300)]
Remove duplicate vlib_call_init_function() for tuntap init

Change-Id: Ie642d15d2843f02a01448afe91aa7311e6131047
Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
8 years agoIncrease number of dpdk lcores to 256 36/236/2
Damjan Marion [Fri, 5 Feb 2016 14:44:54 +0000 (06:44 -0800)]
Increase number of dpdk lcores to 256

Change-Id: Ia0e228d02fd9f180ed9ca468074ab38d575e415e
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix ARP show exception when not ARP entries as found. 12/312/1
Keith Wiles [Fri, 12 Feb 2016 01:21:10 +0000 (19:21 -0600)]
Fix ARP show exception when not ARP entries as found.

The fix tests if the ARP table exist before attempting to
interate over the entries.

Change-Id: I22cad5ba3a01c3fba1feac33745a29ff1f7f8fe1
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
8 years agoPerformance tools, initial check-in 00/300/2
Dave Barach [Fri, 12 Feb 2016 00:28:19 +0000 (19:28 -0500)]
Performance tools, initial check-in

Change-Id: I9fb4f4babecbe02d171f38c4d089634e90141937
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoPull in some additional symbols that may be needed by plugins. 91/291/3
Josh Gahm [Wed, 10 Feb 2016 23:03:08 +0000 (18:03 -0500)]
Pull in some additional symbols that may be needed by plugins.

Ensure that some additional rte_* symbols (from the dpdk library) and
pulled into the vpp image so that they will be available to plugins.
Also, provide vlib's dpdk configuration function so that plugins that
need to make dpdk calls during initialization/configuration may ensure
that dpdk itself is initialized first.

Change-Id: Iff8b518c6fc23e9e2f24a85944e5b246c80e5f67
Signed-off-by: Josh Gahm <jgahm@cisco.com>
8 years agoUse vppinfra bitmap for dpdk coremask 35/235/2
Damjan Marion [Fri, 5 Feb 2016 22:33:21 +0000 (23:33 +0100)]
Use vppinfra bitmap for dpdk coremask

Change-Id: Iec5ebadf120f742f43a681c4d394aa97ad2ae1e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove strcasecmp(3) declaration 86/286/3
Robert Varga [Wed, 10 Feb 2016 14:57:23 +0000 (15:57 +0100)]
Remove strcasecmp(3) declaration

This should be coming from string.h.

Change-Id: Id88bb1d2a4681a9dcf6db9c7de2580a5219869d1
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoGetStringUTFChars() may fail 88/288/2
Robert Varga [Wed, 10 Feb 2016 15:01:58 +0000 (16:01 +0100)]
GetStringUTFChars() may fail

GetStringUTFChars() can fail, returning NULL. Make sure we do not trip
over it.

Change-Id: I2d6b9c72c353c2423042fd035087f0d57fdc08ca
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agonewIntArray() may fail 87/287/2
Robert Varga [Wed, 10 Feb 2016 15:00:16 +0000 (16:00 +0100)]
newIntArray() may fail

Allocation of the integer array may fail, guard against NPE.

Change-Id: I3e860153597638392c9b669a6ad586fd2e03a64d
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoCompile with -Werror, so Jenkins will catch warnings 85/285/1
Dave Barach [Wed, 10 Feb 2016 14:13:23 +0000 (09:13 -0500)]
Compile with -Werror, so Jenkins will catch warnings

Change-Id: I9255c75b6c6cbc638cdcc411632a924cb06f28c0
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoIndent vppjni.c to be consistent 84/284/3
Robert Varga [Wed, 10 Feb 2016 13:39:57 +0000 (14:39 +0100)]
Indent vppjni.c to be consistent

Pure cleanup of indentation and brace placement, so the file ends up
being consisteny.

Change-Id: Idd2f20deda486d16b455f3e13cacbc2f3baa50f1
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoReplace AC_PROG_LIBTOOL with LT_INIT 83/283/1
Dave Barach [Wed, 10 Feb 2016 13:42:59 +0000 (08:42 -0500)]
Replace AC_PROG_LIBTOOL with LT_INIT

Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoAdd Top-Level Wrapper Makefile 79/279/3
Damjan Marion [Tue, 9 Feb 2016 23:36:06 +0000 (00:36 +0100)]
Add Top-Level Wrapper Makefile

Change-Id: Ie3431986ddb42db8d331fcb3d34250a6ec9d9a02
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoVhost multi-q support 59/159/4
Shesha Sreenivasamurthy [Wed, 3 Feb 2016 17:38:36 +0000 (09:38 -0800)]
Vhost multi-q support

    Remove multi-q support patch for DPDK-2.1.0

Change-Id: I685f3886b3883803210221682fa80353670a6970
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoClean up gcc-5.2 warnings 82/282/1
Dave Barach [Wed, 10 Feb 2016 13:03:32 +0000 (08:03 -0500)]
Clean up gcc-5.2 warnings

Change-Id: I7b0aa42a61607d4d30fe3627032d3837b2838982
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoModify hand-coded JNI function names to match refactoring of 75/275/1
Dave Wallace [Wed, 10 Feb 2016 04:09:41 +0000 (23:09 -0500)]
Modify hand-coded JNI function names to match refactoring of
vppConn.java in commit #169

Change-Id: Id9feaebdce199f239741a10d31bf7aa473a62806
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 years agoMake cleanup_rx_thread static 71/271/2
Robert Varga [Tue, 9 Feb 2016 16:16:36 +0000 (17:16 +0100)]
Make cleanup_rx_thread static

The symbol is not referenced outside of the source file, hide it from
the world.

Change-Id: Id5db73efff0767657ebc5a0b25dcccd2b85e354d
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoDisable EAL message spew which can easily fill /var/log 68/268/2
Dave Barach [Tue, 9 Feb 2016 15:54:58 +0000 (10:54 -0500)]
Disable EAL message spew which can easily fill /var/log

Change-Id: I63da892d1c4148a54ea33c172986c854932beb01
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoMark internal implementation functions as hidden 69/269/1
Robert Varga [Tue, 9 Feb 2016 16:07:07 +0000 (17:07 +0100)]
Mark internal implementation functions as hidden

Adding hidden attribute results in compilation failure if the symbol is
not found when linking the .so. It should also lead to better
performance, as it side-steps GOT.

Change-Id: I7b6f39e663ca2b3e432669a3e2b36d7395f555b6
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoSFF NSH support VXLAN GPE 04/204/19
Keith Burns (alagalah) [Wed, 3 Feb 2016 05:45:02 +0000 (21:45 -0800)]
SFF NSH support VXLAN GPE

Change-Id: I23dae9e13f6c2ec7b3326710a40f28984ff6fe1f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoFixup symbol names in vpp-japi 62/262/1
Robert Varga [Tue, 9 Feb 2016 10:17:44 +0000 (11:17 +0100)]
Fixup symbol names in vpp-japi

There is skew between symbol names of vppjni_env.[ch], causing the
library to fail to load. This patch fixes that up.

Change-Id: I972e6d0ce72fd05ee3518e7161e20946ff3426ca
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoSet vnet_buffer(b0)->sw_if_index[VLIB_TX] 53/253/1
Dave Barach [Mon, 8 Feb 2016 21:57:13 +0000 (16:57 -0500)]
Set vnet_buffer(b0)->sw_if_index[VLIB_TX]

Change-Id: I3274c8d426113c71fbb900978b94caef85eabae1
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoCisco Discovery Protocol, initial working attempt 52/252/1
Dave Barach [Mon, 8 Feb 2016 20:57:35 +0000 (15:57 -0500)]
Cisco Discovery Protocol, initial working attempt

There are multiple enhancement opportunities...

Change-Id: I976772dc3802f8284e8c6457c001d68184831e25
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoClean up per-thread elog track nomenclature. 33/233/1
Dave Barach [Fri, 5 Feb 2016 21:29:53 +0000 (16:29 -0500)]
Clean up per-thread elog track nomenclature.

Change-Id: I4b65b29f9291b3fd47e05576d9a0789af8912982
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoDPDK patch: Add missing init of packet_type field. 32/232/1
Todd Foggoa [Fri, 5 Feb 2016 16:40:17 +0000 (11:40 -0500)]
DPDK patch: Add missing init of packet_type field.

This can cause packets to be mishandled in systems with more than
one type of driver in use.

Change-Id: I73ae91ff5d7a22fa542c3b39f6ccfe50437ec71b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoDPDK patch: Allow applications to override rte_delay_us() 31/231/1
Todd Foggoa [Fri, 5 Feb 2016 16:39:30 +0000 (11:39 -0500)]
DPDK patch: Allow applications to override rte_delay_us()

Some applications may wish to define their own implentation of
usec delay other than the existing blocking one. The default
behavior remains unchanged.

Change-Id: I699b2ed460763492502d22b7e8532514e0886ecd
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoDPDK patch: Fix a crash in igb_uio driver when the device is removed. 30/230/1
Todd Foggoa [Fri, 5 Feb 2016 16:38:25 +0000 (11:38 -0500)]
DPDK patch: Fix a crash in igb_uio driver when the device is removed.

Change-Id: I101166ebda1c06e20a3c89cd38786ce44b7ab5d5
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoCLI: If an error happens on the socket being polled, then the CLI 26/226/1
Ole Troan [Wed, 27 Jan 2016 21:37:58 +0000 (23:37 +0200)]
CLI: If an error happens on the socket being polled, then the CLI
does not close the socket. Resulting in the main thread being stuck
in a tight infinite loop polling on the erronous socket.

Change-Id: I630b84b97c059acce117d56e41cd201131db4cab
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoRemove redundant apt-get install of dkms and debhelper. 11/211/2
Dave Wallace [Thu, 4 Feb 2016 03:40:07 +0000 (22:40 -0500)]
Remove redundant apt-get install of dkms and debhelper.

Change-Id: Id2caea331f86a71f26990e1ae11288826157e737
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 years agoChange non-default route ethernet interfaces state to down so VPP will use them. 10/210/2
Dave Wallace [Thu, 4 Feb 2016 03:34:04 +0000 (22:34 -0500)]
Change non-default route ethernet interfaces state to down so VPP will use them.

Change-Id: Icdb1a8d35a97e01d5e1be13fdc89ce3f9ec62e1a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 years agodpdk_buffer.c: Honor clone_count even when there isn't a freelist handler 14/214/2
Kevin Paul Herbert [Wed, 16 Dec 2015 00:56:50 +0000 (16:56 -0800)]
dpdk_buffer.c: Honor clone_count even when there isn't a freelist handler

The DPDK glue did not support cloned packets which do not
have a freelist handler. Add support for this case.

Change-Id: I8f17cd4952df97989d90d3f3e39792bc3739705c
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agoip[46].h: Remove tcp reference 12/212/2
Kevin Paul Herbert [Thu, 4 Feb 2016 00:52:22 +0000 (16:52 -0800)]
ip[46].h: Remove tcp reference

This is not used. Remove it.

Change-Id: I63f705db6bc10137d6e28977aa75e60f4e13cfe8
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agop1.c: Remove log() symbol 13/213/1
Kevin Paul Herbert [Thu, 4 Feb 2016 05:04:17 +0000 (21:04 -0800)]
p1.c: Remove log() symbol

This symbol is defined in the math library, and is a compiler
built-in. Plug-ins that need it should link with -lm.

Change-Id: I967c87ccea0e762b68ca59cfaa460f3d6e534a59
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agoNeed to include symbolic links in the lib package: libXXX.so, libXXX.so.0 08/208/1
Dave Barach [Wed, 3 Feb 2016 17:59:38 +0000 (12:59 -0500)]
Need to include symbolic links in the lib package: libXXX.so, libXXX.so.0

Otherwise, autotools can't find libXXX, -lXXX doesn't work, etc.

Change-Id: I9c4c43f795ca872475f65bc0e4494674eaa00576
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoSwitched vagrant for ~/git/vpp to /vpp 01/201/2
Ed Warnicke [Wed, 3 Feb 2016 01:47:17 +0000 (17:47 -0800)]
Switched vagrant for ~/git/vpp to /vpp

build-root/vagrant/Vagrantfile

was always mounting the vpp into /vpp
Now rather than cloning it and building,
we just use it as mounted.

In order to let folks know what happened,
a README.moved is copied into the ~/git/vpp
so folks know what happened.

In addition to make it easier for folks
to do commits from withing the vagrant,
we install git-review, and copy in the
users .gitconfig and .gnupg directory.

A couple of notes about this. VMWare goes much
much faster in all cases.  Virtualbox is a
bit slower in the very first run (without ccache).

One of the benefits of using the mounted /vpp though
is that after your first vagrant up, you always
have access to the .ccache, as it lives
outside the vagrant, and so in steady state
everything is faster.

Change-Id: I2cd2c28181b3d7e664240dfe2249b5be3f1b9241
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoEnabled CCACHE_DIR to be set by ENV Variable 03/203/1
Ed Warnicke [Wed, 3 Feb 2016 03:28:59 +0000 (19:28 -0800)]
Enabled CCACHE_DIR to be set by ENV Variable

Change-Id: I0098f995b1f75bbad5c448d5a0d8facc43e6f5cb
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoAdd pciutils to the CentOS vagrant bootstrap; needed to install vpp rpms 99/199/1
Dave Barach [Tue, 2 Feb 2016 21:59:04 +0000 (16:59 -0500)]
Add pciutils to the CentOS vagrant bootstrap; needed to install vpp rpms

Change-Id: Ia0cbf88a509392c1bd75fb242985da07c8356739
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoEnable ganglia module integration build 90/190/2
Dave Barach [Tue, 2 Feb 2016 15:57:15 +0000 (10:57 -0500)]
Enable ganglia module integration build

Change-Id: Ia49e9f246e8318ba74195c3397472fb0c102389b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoTracing enhancements. 97/197/2
Bud Grise [Tue, 2 Feb 2016 19:23:29 +0000 (14:23 -0500)]
Tracing enhancements.

Limit buffer tracing to 50 in order to limit large output, unless
the user over rides the max "sh trace max <number>".

Add trace filtering, to be able to only trace packets that were
processed by a specific node or exclude packets processed by a node.
Example, only include packets processed by error-drop:
  # trace filter include error-drop 1
  # trace add dpdk-input 1000000
  <wait for packets, to come in>
  # show trace

Change-Id: I5d9e15d2268ea55e6ef87b2b8756049c49b2791b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoUse per-thread vlib_main 95/195/2
Shesha Sreenivasamurthy [Tue, 2 Feb 2016 18:06:07 +0000 (10:06 -0800)]
Use per-thread vlib_main

Change-Id: I8bee9f6661878a74a0375944ac01c9cb3a0acfbf
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoSet the thread name for the stats thread if a thread name prefix is given. 94/194/1
Todd Foggoa [Tue, 2 Feb 2016 17:47:46 +0000 (12:47 -0500)]
Set the thread name for the stats thread if a thread name prefix is given.

Change-Id: Ie66d29bfbf6d106e9c49fb4f3738b26798c3a63c
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoZero the interface template before using it. 92/192/1
Todd Foggoa [Tue, 2 Feb 2016 17:14:00 +0000 (12:14 -0500)]
Zero the interface template before using it.

Change-Id: Ib6ce325202657684adaa17c82f64c70298dae339
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoChange default dpdk version to 2.2 88/188/2
Damjan Marion [Tue, 2 Feb 2016 14:37:58 +0000 (15:37 +0100)]
Change default dpdk version to 2.2

Change-Id: Iea686ed26d37539d60e52ac1205517512091edab
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agop1.c: Add symbols useful to IP protocol modules 84/184/2
Kevin Paul Herbert [Mon, 1 Feb 2016 17:41:37 +0000 (09:41 -0800)]
p1.c: Add symbols useful to IP protocol modules

Add some symbols which are useful for clients of the IP layer.

Change-Id: I26599a67bb9f89c883ac4ea6e630111dfac5e2c5
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agoremove igb_uio static pci id table patch, use new_id for all NICs 83/183/2
Damjan Marion [Mon, 1 Feb 2016 22:22:25 +0000 (14:22 -0800)]
remove igb_uio static pci id table patch, use new_id for all NICs

Change-Id: I1db64d62c19c28b50f58f9d0b009e3e89e331f71
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoChanged key of NSH VXLAN tunnel. 82/182/1
Keith Burns (alagalah) [Mon, 1 Feb 2016 22:14:43 +0000 (14:14 -0800)]
Changed key of NSH VXLAN tunnel.

- simple patch before extending CLI for next encap tunnel lookup

Change-Id: I56060185599252a1ae83cc162963b5fd5bc1b324
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoFree the temporary vector 80/180/2
Robert Varga [Mon, 1 Feb 2016 17:33:38 +0000 (18:33 +0100)]
Free the temporary vector

vec_add1() seems to be allocating memory which we do not free. Correct
that.

Change-Id: I25dca1871121cdd11a218ff2289a3c51b42e843b
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoDo not copy data twice in swInterfaceDump() 79/179/2
Robert Varga [Mon, 1 Feb 2016 17:12:18 +0000 (18:12 +0100)]
Do not copy data twice in swInterfaceDump()

Instead of performing getting the elements, memcpy()ing them and the
releasing, use GetByteArrayRegion().

Change-Id: I20ef181df214ac4fdcaff5a64b89ef4f879078f8
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoAdd a vpp-dpdk-dev package, enable plugins to use dpdk APIs directly 77/177/1
Dave Barach [Mon, 1 Feb 2016 17:05:52 +0000 (12:05 -0500)]
Add a vpp-dpdk-dev package, enable plugins to use dpdk APIs directly

Change-Id: I69db06a0b5d5d556c2fd570ea0056bb59d7bc3d6
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoRefactor vpp-japi 69/169/6
Robert Varga [Sun, 31 Jan 2016 11:20:47 +0000 (12:20 +0100)]
Refactor vpp-japi

vlib does not allow concurrent connections, hence make sure the Java API
does not allow the user to instantiate them.

Also hide native methods from direct user invocation behind defensive
methods also detect if a particular connection has been terminated.
Disconnect is hidden befind standard close() method, as specified by
AutoCloseable.

Change-Id: Ib5079200ae4216cad84358a2174a41e90271a30b
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoChanges to Centos bootstrap to remove ~/git/vpp if it exists before attempting clone 75/175/2
Keith Burns (alagalah) [Sun, 31 Jan 2016 20:15:27 +0000 (21:15 +0100)]
Changes to Centos bootstrap to remove ~/git/vpp if it exists before attempting clone

- fixes issue with vagrant reload --provision not updating clone of clone

Change-Id: I506d4cbca90b30bf787c1be7e4ad39d748ea7f5b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoVagrantfile doesn't rm git/vpp and vagrant reload --provision 74/174/3
Keith Burns (alagalah) [Sun, 31 Jan 2016 19:53:46 +0000 (20:53 +0100)]
Vagrantfile doesn't rm git/vpp and vagrant reload --provision
result is not expected. ie don't get updates

- only applied ubuntu changes in this patch.

Change-Id: I194f5120734d63f1b815f86bb510f0c0981dd89b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoMake public fields final where possible 70/170/6
Robert Varga [Sun, 31 Jan 2016 11:25:45 +0000 (12:25 +0100)]
Make public fields final where possible

Class fields initialized via the constructor should be final.

Also mark leaking byte[] instances with a FIXME. API users consider them
immutable, but they are vulnerable to System.arrayCopy().

Also fixes constructor arguments so they do not use underscores, which
is prohibited by Java 9.

Change-Id: I393d55ed7234149cb3604bc92b2cb1d1207c55dc
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoAdd a copyright header 71/171/2
Robert Varga [Sun, 31 Jan 2016 12:39:19 +0000 (13:39 +0100)]
Add a copyright header

Change-Id: Ib543249b8de2b26b64de82c35f74422d10a5ee66
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoGit ignore additions 73/173/1
Keith Burns (alagalah) [Sun, 31 Jan 2016 19:38:54 +0000 (20:38 +0100)]
Git ignore additions

Change-Id: Iabf569e96d3a1ab50d737913ed997264a69762cc
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoCache jclass/jmethodID/jfieldID references 68/168/2
Robert Varga [Sat, 30 Jan 2016 17:30:36 +0000 (18:30 +0100)]
Cache jclass/jmethodID/jfieldID references

This patch introduces an initialization framework, which tracks required
references to Java classes and methods.

It works by declaring classes and their constructor signatures, which
are linked into a singly-linked list when the .so initializers are run.
Once JNI_OnLoad() is invoked, this list is walked and all classes and
their initializers are resolved. These are then used while the library
remains loaded. Once JNI_OnUnload() is called, global references are
released, so we can cleanly unload.

The class declaration results in static utility objects being emitted in
the scope of the declaration, hence to allocate an object or an array of
objects is done via simple calls.

Change-Id: I41984c13756339364dbcbf0144b947627e8e4fe1
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoAdd JAVA_HOME includes to vppjni build 67/167/1
Robert Varga [Sat, 30 Jan 2016 17:37:58 +0000 (18:37 +0100)]
Add JAVA_HOME includes to vppjni build

Failing to add these means that we rely on system headers, not the ones
provided in JAVA_HOME.

Change-Id: I612bd716590efbabec26e0ba83eb98f8e90b3255
Signed-off-by: Robert Varga <nite@hq.sk>
8 years agoRationalize metric names. 60/160/1
Dave Barach [Fri, 29 Jan 2016 16:00:00 +0000 (11:00 -0500)]
Rationalize metric names.

Change-Id: I3144e58f635ef94224387e8729bf8db6aa77a106
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoRemove unused tcp.h 58/158/1
Kevin Paul Herbert [Wed, 27 Jan 2016 02:32:24 +0000 (18:32 -0800)]
Remove unused tcp.h

This was left out of 8f9e7d43d8b8e5495477e3a587f78409a4cf8808
inadvertently. Remove it now.

Change-Id: I79625aeba400ccfdcfd972f454abd043c2537960
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agovpp metrics upload via gmond plugin 57/157/1
Dave Barach [Thu, 28 Jan 2016 14:36:05 +0000 (09:36 -0500)]
vpp metrics upload via gmond plugin

The gmond module (gmod) isn't built by default, pending CentOS
packaging work.

Change-Id: I78493a60f431cf9924a28d31ba29423a03aa79b3
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoEnable Chelsio T5 support 56/156/1
Damjan Marion [Wed, 27 Jan 2016 15:59:04 +0000 (16:59 +0100)]
Enable Chelsio T5 support

Change-Id: I4bb6ac36a8bc585677448f4b22bd1299630f95de
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove vestigal TCP implementation 47/147/3
Kevin Paul Herbert [Wed, 27 Jan 2016 02:32:24 +0000 (18:32 -0800)]
Remove vestigal TCP implementation

Eliot's TCP was never completed. Remove it.

Change-Id: I8456ed02b55f5b3f0b93547533f7467dd2229c07
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>
8 years agovnet: Add field for transmit time 46/146/2
Kevin Paul Herbert [Mon, 21 Dec 2015 23:16:59 +0000 (15:16 -0800)]
vnet: Add field for transmit time

Add a field in the buffer header for transmit time. High-level protocols
need a consistent way to do this.

Change-Id: Ifff60ee5e32eed7aa6f6ae8e6fb1dd9d7870e9ee
Signed-off-by: Kevin Paul Herbert <kph@cisco.com>