vpp.git
7 years agoScheduler policy & priority config, few minor fixes (VPP-425) 63/3163/3
Pavel Kotucek [Fri, 23 Sep 2016 06:54:14 +0000 (08:54 +0200)]
Scheduler policy & priority config, few minor fixes (VPP-425)

- scheduler-prio -> scheduler-priority
- improve formatting of "show threads" output
- add description to "startup.conf"
- bail out of priority is set without rr or fifo policy

Change-Id: Idf897f7603d989d6c2d0093eea89c5d1653eaa8c
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoFix missing output in generated CLI/config 69/3169/2
Chris Luke [Mon, 26 Sep 2016 22:51:56 +0000 (15:51 -0700)]
Fix missing output in generated CLI/config

The templates were looking for the name of the CLI_COMMAND
and CONFIG_FUNCTION structures in the srong place.

Change-Id: I709d6716216173ba6a7ed41a260728238f96d2db
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoFIX sysctl configuration directory 56/3156/3
Miroslav Miklus [Tue, 27 Sep 2016 11:23:09 +0000 (13:23 +0200)]
FIX sysctl configuration directory

man sysctl.d:
...
Packages should install their configuration files in /usr/lib/. Files in
/etc/ are reserved for the local administrator, who may use this logic to
override the configuration files installed by vendor packages. All configuration
files are sorted by their filename in lexicographic order, regardless of which
of the directories they reside in. If multiple files specify the same option,
the entry in the file with the lexicographically latest name will take
precedence. It is recommended to prefix all filenames with a two-digit number
and a dash, to simplify the ordering of the files.

If the administrator wants to disable a configuration file supplied by
the vendor, the recommended way is to place a symlink to /dev/null in the
configuration directory in /etc/, with the same filename as the vendor
configuration file.
...

Change-Id: I24b8b7fddf64ec287282ae195e07c9592c494ebe
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
7 years agoVPP-448 Fix LISP APIs using binary data 57/3157/5
Filip Tehlar [Tue, 27 Sep 2016 11:28:01 +0000 (13:28 +0200)]
VPP-448 Fix LISP APIs using binary data

* use zero length array in LISP API to avoid confusion
* add missing LISP data structure definitions in API documentation
* fix wrong memory allocation in VAT

Change-Id: I9b5e656a071fc24cb698c164db953c09b66deeeb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoFix "show adj nbr" displaying IP4 address for IP6 neighbors 68/3168/1
John Lo [Tue, 27 Sep 2016 16:05:00 +0000 (12:05 -0400)]
Fix "show adj nbr" displaying IP4 address for IP6 neighbors

Change-Id: Ic453e68bbd3d5ae8d57b513da6781bb957fc84a4
Signed-off-by: John Lo <loj@cisco.com>
7 years agofix create sub-interface range cli 29/3129/2
Eyal Bari [Mon, 26 Sep 2016 06:24:09 +0000 (09:24 +0300)]
fix create sub-interface range cli

the create sub interface command was creating the interfaces with
the same outer_vlan value - causing an error

changed to use the interface id as outer_vlan in case of a range

Change-Id: I3808094d1c99a37adac61e3ece573a6687306461
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoVPP-425: Scheduler policy & priority configuration 02/3102/4
Pavel Kotucek [Fri, 23 Sep 2016 06:54:14 +0000 (08:54 +0200)]
VPP-425: Scheduler policy & priority configuration

Add ability to hadle scheduling policy and priority via config file.
CPU section contains new items to specify scheduling policy and
priority:

cpu {
scheduler-priority <num>
scheduler-policy [other | batch | idle | fifo | rr ]
}

Change-Id: Ie20765280e458e1d7deb4a8c66daaa69793f795e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoFix CLI for adding negative LISP fwd entries 50/3150/2
Florin Coras [Mon, 26 Sep 2016 15:59:44 +0000 (18:59 +0300)]
Fix CLI for adding negative LISP fwd entries

Change-Id: I9ee7b6ea2def16715f717f8483c86e0157628946
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoLISP Source/Dest control plane support, VPP-197 84/2884/9
Florin Coras [Wed, 14 Sep 2016 14:01:38 +0000 (16:01 +0200)]
LISP Source/Dest control plane support, VPP-197

Change-Id: If88e4161e0944b657e6183b7b44348f7f46ba0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoFix import line for setup.py 32/3132/3
Peter Ginchev [Mon, 26 Sep 2016 07:46:17 +0000 (10:46 +0300)]
Fix import line for setup.py

Build fails in case python-setuptools is not installed.

Change-Id: I1611f3560db82a4a48c51a9f614a813a9a540698
Signed-off-by: Peter Ginchev <pginchev@cisco.com>
7 years agoFix for potential use of uninitialized variables 26/3126/2
Igor Mikhailov (imichail) [Sun, 25 Sep 2016 22:11:53 +0000 (15:11 -0700)]
Fix for potential use of uninitialized variables

The code allowed for the command 'set interface unnumbered'
to be processed without specifying any parameters,
thus the set logic of the command would have been using uninitialized
variables 'unnumbered_sw_if_index' and 'inherit_from_sw_if_index'.

Change-Id: I4de14fa1096527c5c48f74304db379f9953760a8
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
7 years agoUpdate CSIT tests 160919 -> 160925 40/3140/2
Jan [Mon, 26 Sep 2016 10:13:34 +0000 (12:13 +0200)]
Update CSIT tests 160919 -> 160925

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5daf02786185159cd2a156144f247d3b45369c33
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoFix jvpp-core dependencies 31/3131/5
Marek Gradzki [Mon, 26 Sep 2016 07:04:49 +0000 (09:04 +0200)]
Fix jvpp-core dependencies

Change-Id: I242d590c9d2fa733cc1411fa5d96bb3944d5b5fe
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoPacket-generator related fib 2.0 fixes 22/3122/1
Dave Barach [Sun, 25 Sep 2016 13:16:53 +0000 (09:16 -0400)]
Packet-generator related fib 2.0 fixes

Fix dpo0->dpo1 typo in ip4_local source RPF check.

Pass source RPF check on drop adjacencies. Add a bit of defensive driving
in ip4_icmp_error(...).

Change-Id: I0e444886953f5500766f9b9662fad79fef44a260
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoRmove duplicate register of unformat_l2_input_next_node 01/3101/2
Hongjun Ni [Fri, 23 Sep 2016 14:28:40 +0000 (22:28 +0800)]
Rmove duplicate register of unformat_l2_input_next_node

Change-Id: I38dc7c37b0debcea9aa1a366b516e86505dd096e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agoFix source RPF check in ip4_local 17/3117/1
Dave Barach [Fri, 23 Sep 2016 16:05:21 +0000 (12:05 -0400)]
Fix source RPF check in ip4_local

We need to accept src ip addresses which hit receive and clean
adjacencies.

Change-Id: I8cf07f622058203665ed09280452ed8412984bd5
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix eventfd leakage issue in vhost-user mode 96/3096/3
Steve Shin [Thu, 22 Sep 2016 19:08:55 +0000 (12:08 -0700)]
Fix eventfd leakage issue in vhost-user mode

The leakage happens on the file descriptors for kickfd and vring's callfd.
Those file descriptors should be closed when vhost-interface is disconnected.

Change-Id: I12453b0c3eac037a1dc040a001465059b8f672c2
Signed-off-by: Steve Shin <jonshin@cisco.com>
7 years agoPython API: Preparation for RPM/DEB packaging. 18/2918/10
Ole Troan [Mon, 12 Sep 2016 20:00:32 +0000 (22:00 +0200)]
Python API: Preparation for RPM/DEB packaging.

Recheck.

Repackage the Python API binding to include all
necessary modules in a single Python package.

Change-Id: I5e35141d413bfb1aad650217e1ca07d85646c349
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoVPP-424 fix lldp_main declaration 74/3074/2
Klement Sekera [Thu, 22 Sep 2016 09:50:48 +0000 (11:50 +0200)]
VPP-424 fix lldp_main declaration

Change-Id: I1f30977f0b315fa72d73a29a8585b1711d5044d8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoFix detection of packet output via BVI into a BD and SHG adjustment 98/3098/3
John Lo [Thu, 22 Sep 2016 22:24:13 +0000 (18:24 -0400)]
Fix detection of packet output via BVI into a BD and SHG adjustment

In BVI output node, set a signature value in packet buffer field
sw_if_index[VLIB_TX] so l2-input node can reliably check that
packet came into a BD through BVI so it can set the SHG of the
packet to 0 for a unicast packet.

Change-Id: I301aa2896677e11d0c964ca476dddcb5a8804fc2
Signed-off-by: John Lo <loj@cisco.com>
7 years agoEnable doc building on MacOS 99/3099/2
Chris Luke [Fri, 23 Sep 2016 00:52:26 +0000 (20:52 -0400)]
Enable doc building on MacOS

Simple tweak to the Makefiles to allow "make doxygen" to work
natively on Macs - assuming the appropriate things have been
installed first, which it tests for.

Change-Id: I1a3e72759d533270a0512de38595c3bc3f71dee0
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agol2_output: fix packet drop error reporting when mapping is in progress 93/3093/2
Damjan Marion [Thu, 22 Sep 2016 14:37:29 +0000 (16:37 +0200)]
l2_output: fix packet drop error reporting when mapping is in progress

Change-Id: I64aa4c28e87e82a742313e9b89409c957fa62101
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix lisp-cp table_id lookup for punted packets 94/3094/2
Florin Coras [Thu, 22 Sep 2016 16:02:17 +0000 (18:02 +0200)]
Fix lisp-cp table_id lookup for punted packets

Change-Id: Ibe6f8c6fadb2e467353bafebffde04bc6eb72af3
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoVPP-189: fix coverity issue in api_format.c 41/3041/3
Florin Coras [Wed, 21 Sep 2016 14:38:19 +0000 (16:38 +0200)]
VPP-189: fix coverity issue in api_format.c

Change-Id: I8cf3bb27bc699be3b8de781ea84db4c7fb3c7553
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agovhost-user: branchless SSE4.2 implementation of map_guest_mem() 74/2974/5
Damjan Marion [Tue, 20 Sep 2016 09:25:27 +0000 (11:25 +0200)]
vhost-user: branchless SSE4.2 implementation of map_guest_mem()

Change-Id: I64349830c1f7534a8d090572e9473c51c0818e51
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-426: Rename parameter in LISP remote mapping VAT command 92/3092/2
Filip Tehlar [Thu, 22 Sep 2016 13:30:01 +0000 (15:30 +0200)]
VPP-426: Rename parameter in LISP remote mapping VAT command

Change-Id: Ie52243bd1654e3d0663b09bd1f21e8c15e93f07d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agovhost-user: remove dependency on dpdk code 05/3005/2
Damjan Marion [Tue, 20 Sep 2016 21:21:02 +0000 (23:21 +0200)]
vhost-user: remove dependency on dpdk code

Change-Id: I48908e0fa010570aefc43dd552ee81ee69fc2796
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoRefactor pre-Doxy siphon scripts; VPP-396 61/2861/6
Chris Luke [Mon, 12 Sep 2016 12:55:13 +0000 (08:55 -0400)]
Refactor pre-Doxy siphon scripts; VPP-396

- Modularize the code to make the Siphon process easier to
  maintain.
- Move much of the output rendering into Jinja2 templates.
- Add syscfg siphon type for startup config documentation.
- Add sample syscfg documentation.
- Add clicfg and syscfg preamble docs, adapted from their wiki pages.
- Fix sorting of CLI items across multiple directories.

Change-Id: Ib8288fe005adfea68ceed75a38ff8eba25d3cc79
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agovpp python api - fix vla pack generation 60/2960/2
Gabriel Ganne [Mon, 19 Sep 2016 12:05:15 +0000 (14:05 +0200)]
vpp python api - fix vla pack generation

This fixes commit 1732fc1ab851c454a74efda47a383f48691d545a.

Change-Id: I3d9f1384c20d2ca22eaf2aae553455789b934b6e
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoA Protocol Independent Hierarchical FIB (VPP-352) 02/2502/17
Neale Ranns [Thu, 25 Aug 2016 14:29:12 +0000 (15:29 +0100)]
A Protocol Independent Hierarchical FIB (VPP-352)

Main Enhancements:
 - Protocol Independent FIB API
 - Hierarchical FIB entries. Dynamic recursive route resolution.
 - Extranet Support.
 - Integration of IP and MPLS forwarding.
 - Separation of FIB and Adjacency databases.
 - Data-Plane Object forwarding model.

Change-Id: I52dc815c0d0aa8b493e3cf6b978568f3cc82296c
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMove doxytags file to html output directory 39/3039/2
Chris Luke [Wed, 21 Sep 2016 14:10:13 +0000 (10:10 -0400)]
Move doxytags file to html output directory

So that downstream projects can make use of the generated
Doxygen tags file, move it into the html directory that is
transferred to Nexus.

Change-Id: I04dc4777c9ea62f429f783f66ef4e2ecb2923131
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-414: Fixed IPSec transport mode in esp_encrypt.c 34/3034/2
Matus Fabian [Wed, 21 Sep 2016 12:13:01 +0000 (05:13 -0700)]
VPP-414: Fixed IPSec transport mode in esp_encrypt.c

Change-Id: I27accb0c87d6bf2fbbe90d8d1bc074697299e639
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoCopy the 16.09 release notes to master 37/3037/1
Chris Luke [Wed, 21 Sep 2016 13:35:01 +0000 (09:35 -0400)]
Copy the 16.09 release notes to master

- Copy the 16.09 release notes to master
- Add some notes for 16.06 (from the press release)
- Add some structure around notes for each release
- Add skeleton for next release

Change-Id: Id5a5d8bf02fce1bbaed303e6c6e4f8908c7e7d75
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agodpdk: fix wrong tx ring size calculations 47/2947/2
Damjan Marion [Mon, 19 Sep 2016 11:44:37 +0000 (13:44 +0200)]
dpdk: fix wrong tx ring size calculations

At many places code was using constant ring size od 4096
which was defined in macro DPDK_TX_RING_SIZE.

As we support differnet ring size and default value s now
1024, we need to remove DPDK_TX_RING_SIZE and use
value stored in device structure.

For that reason dpdk_device_t.nb_tx_desc is moved to
first cacheline.

Change-Id: I2c2ac11f0f5e8ae779d34f9a9104eaf2921ec34c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: move number of sub-interfaces to 2nd cacheline, introduce flag 46/2946/4
Damjan Marion [Mon, 19 Sep 2016 11:31:49 +0000 (13:31 +0200)]
dpdk: move number of sub-interfaces to 2nd cacheline, introduce flag

This saves 2 bytes from the 1st cacheline.

Change-Id: I691a3a0ee07ec2db4ae85b96b451ef53ad8c9458
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: use flags for identifying interface types 45/2945/4
Damjan Marion [Mon, 19 Sep 2016 11:18:09 +0000 (13:18 +0200)]
dpdk: use flags for identifying interface types

This will allow us to handle some more complex situations
like in case when hqos needs to be enabled only for some PMDs.

Change-Id: I5421a8d4cf29b8394b9e956cc4e39737dd07dbbb
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoUse SSE instructions for matching tagged frames by ethertype 38/2938/4
Damjan Marion [Mon, 19 Sep 2016 09:32:03 +0000 (11:32 +0200)]
Use SSE instructions for matching tagged frames by ethertype

This change improves performance in l2 scenarios for about 1-2%.

Change-Id: Ie35ed8ad70a3b95dd78c0d158c485a10dabaf0eb
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-419 add thread-safety to LLDP feature 92/2992/2
Klement Sekera [Tue, 20 Sep 2016 13:45:58 +0000 (15:45 +0200)]
VPP-419 add thread-safety to LLDP feature

Change-Id: I3b1153a64674c2caef71c968739ecca6512e9929
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agofd closed twice 63/2963/2
Eyal Bari [Mon, 19 Sep 2016 15:47:39 +0000 (18:47 +0300)]
fd closed twice

fd close()ed after call to unix_file_del of same fd

Change-Id: Ia8bf77b72b6cea7c70e004199ce11a33b6260720
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoAdded volatile to local variables needed by setjmp 34/2934/3
Eyal Bari [Mon, 19 Sep 2016 07:23:39 +0000 (10:23 +0300)]
Added volatile to local variables needed by setjmp

Function vlib_main uses nonlocal control transfer (setjmp, longjmp),
local variables might be mapped to cpu registers which might be
different when longjmp'ing back to it. Added volatile to keep those
variables on the stack. to fix vpp crash when exiting via SIGTERM.

Change-Id: I03e836966c68a966a84d635bc1f7b3a3c252f3ea
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoVPP-282: Document changes for vnet/vnet/ethernet 94/2894/2
Billy McFall [Wed, 14 Sep 2016 01:47:55 +0000 (21:47 -0400)]
VPP-282: Document changes for vnet/vnet/ethernet

Change-Id: Ie75f43516fdd76ba3720f65f38d66f14749e3e2d
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoVPP-189: fix coverity issue in api_format.c 76/2976/3
Filip Tehlar [Tue, 20 Sep 2016 10:37:09 +0000 (12:37 +0200)]
VPP-189: fix coverity issue in api_format.c

Change-Id: Ib16fd69abe93c1afb2ee1d38144763f57888585c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoVPP-348 Return empty DumpReply instead of null 52/2952/3
Maros Marsalek [Mon, 19 Sep 2016 13:35:41 +0000 (15:35 +0200)]
VPP-348 Return empty DumpReply instead of null

Change-Id: If44f8d37649e5a9d5033ec2c0ab7452397e22691
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agoVPP-413 DTOs generated by JVpp improvements: 21/2921/4
Maros Marsalek [Fri, 16 Sep 2016 14:17:58 +0000 (16:17 +0200)]
VPP-413 DTOs generated by JVpp improvements:

- hashCode & equals
- toString

Change-Id: I5f8bc8868c216862a307dcc8f6b423f0ce29e7b5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
7 years agovhost-user: announce VIRTIO_F_VERSION_1 49/2949/3
Damjan Marion [Mon, 19 Sep 2016 12:31:34 +0000 (14:31 +0200)]
vhost-user: announce VIRTIO_F_VERSION_1

On some setups with QEMU 2.7.0 and xenial guests following
error message is reported in guest dmesg:

[    0.895944] virtio_net virtio3: virtio: device uses modern interface
but does not have VIRTIO_F_VERSION_1

Change-Id: I5a0b3beffe75c9b0344d377098d94923b2ad7ae9
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoUpdate CSIT tests 160912 -> 160919 43/2943/2
Jan [Mon, 19 Sep 2016 10:32:59 +0000 (12:32 +0200)]
Update CSIT tests 160912 -> 160919

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ibcc937f68311a9809cc31965633f2d21f111e2c7
Signed-off-by: Jan <jgelety@cisco.com>
7 years agoAdd structure to some of the documentation; VPP-223 95/2895/2
Chris Luke [Wed, 14 Sep 2016 16:42:54 +0000 (12:42 -0400)]
Add structure to some of the documentation; VPP-223

Moves the random .md files, when rendered by Doxygen,
into a config examples tree. We may later flesh this
out into a more complete user documentation section.

Change-Id: If423b82f1047f1c84f90876a786313054b5f7c77
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoAdd support for transparent ethernet bridging to GRE 66/2966/2
David Hotham [Mon, 19 Sep 2016 16:55:07 +0000 (09:55 -0700)]
Add support for transparent ethernet bridging to GRE

Change-Id: Iaa3cefe223eb48b128893029a17e092b72a5157c
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
7 years agoCloned buffer refcount was set to 0 77/2877/3
Christophe Fontaine [Wed, 14 Sep 2016 12:46:35 +0000 (14:46 +0200)]
Cloned buffer refcount was set to 0

The cloned buffer returned by rte_mempool_get_bulk had a refcount set to 0. This triggered an assert in drop-punt node.

Change-Id: I77f53abd72dcdbf5dd512a05e13fe6d3fd569843
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
7 years agoVPP-306: Document changes for vnet/vnet/vxlan 88/2888/2
Billy McFall [Wed, 14 Sep 2016 14:39:58 +0000 (10:39 -0400)]
VPP-306: Document changes for vnet/vnet/vxlan

Change-Id: I1ec4a80ee431758998716014e3fb6f80a5b9c168
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoVPP-407 fix coverity warning 82/2882/2
Klement Sekera [Wed, 14 Sep 2016 12:19:04 +0000 (14:19 +0200)]
VPP-407 fix coverity warning

Change-Id: Ic3e5df2d272c2b31fbe875e1c09db0edac4813b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoVPP-408: fix coverity warning in run_ping_ip46_address() 89/2889/1
Andrew Yourtchenko [Wed, 14 Sep 2016 15:51:16 +0000 (15:51 +0000)]
VPP-408: fix coverity warning in run_ping_ip46_address()

CID 147141: Security best practices violations (DC.WEAK_CRYPTO)
/vnet/vnet/ip/ping.c: 496 in run_ping_ip46_address()
490 ping_main_t *pm = &ping_main;
491 uword curr_proc = vlib_current_process (vm);
492 u32 n_replies = 0;
493 u32 n_requests = 0;
494 ping_run_t *pr = 0;
495 u32 ping_run_index = 0;
CID 147141: Security best practices violations (DC.WEAK_CRYPTO)
"rand" should not be used for security related applications, as linear congruential algorithms are too easy to break.
496 u16 icmp_id = rand ();
497 while (hash_get (pm->ping_run_by_icmp_id, icmp_id))
498 { 499 vlib_cli_output (vm, "ICMP ID collision at %d, incrementing", icmp_id); 500 icmp_id++; 501 }

Change-Id: I822350c03afce0b2dd35f37e27f55df82ca3443f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoAdd vlan-strip-offload help into startup.conf 66/2866/2
Alex Popovsky [Wed, 14 Sep 2016 01:02:53 +0000 (18:02 -0700)]
Add vlan-strip-offload help into startup.conf

Change-Id: Icb240ce9c62e9a2e2ff18107729cffb8e4884a0c
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
7 years agoVPP-404: IKEv2 profile auth rsa-sig cert-file fixed 70/2870/1
Matus Fabian [Wed, 14 Sep 2016 06:15:56 +0000 (23:15 -0700)]
VPP-404: IKEv2 profile auth rsa-sig cert-file fixed

Change-Id: Iaeca4a86eb96096d6840d38c16d60641e9179662
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agol2_output: reset bit after mapping is created 56/2856/2
Damjan Marion [Tue, 13 Sep 2016 15:00:41 +0000 (17:00 +0200)]
l2_output: reset bit after mapping is created

Change-Id: I894d71b397e7451d4e596b10258933287b7e965f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-344 Add LLDP feature 52/2852/3
Klement Sekera [Tue, 13 Sep 2016 10:27:08 +0000 (12:27 +0200)]
VPP-344 Add LLDP feature

Change-Id: Iac96773e7f9028c0f09c3388893e69f67177439d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoImplement IPv6/IPv4 ping. 56/956/5
Andrew Yourtchenko [Thu, 4 Aug 2016 13:39:35 +0000 (13:39 +0000)]
Implement IPv6/IPv4 ping.

Change-Id: Id53797c795c17fbacce3659c945f5126dc9dee86
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoAdd some help into startup.conf 45/2845/2
Damjan Marion [Tue, 13 Sep 2016 08:47:35 +0000 (10:47 +0200)]
Add some help into startup.conf

Change-Id: I84e9d7c3ccd32814c3eebf1cef0a4887c75812a8
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-292 Document vnet/vnet/lisp-gpe 38/2738/3
Florin Coras [Mon, 5 Sep 2016 17:30:35 +0000 (19:30 +0200)]
VPP-292 Document vnet/vnet/lisp-gpe

Change-Id: I5b282964330f4c14f7991453ee02c455a8d367ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoVPP-376: Refactor LISP dump API + VAT 23/2623/8
Filip Tehlar [Fri, 2 Sep 2016 10:14:31 +0000 (12:14 +0200)]
VPP-376: Refactor LISP dump API + VAT

- refactor VAT so it won't cache data
- remove unused filter flag from locator dump API call
- json structure changed for locator and EID table dump calls
- remote mapping VAT cli now accepts string for negative mapping action

Change-Id: I776fb50659aaa7e98ad93715d282a83f78287344
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoVPP-288: Documentation changes via doxygen for vnet/vnet/l2. 27/2827/4
Billy McFall [Fri, 9 Sep 2016 12:46:40 +0000 (08:46 -0400)]
VPP-288: Documentation changes via doxygen for vnet/vnet/l2.

Change-Id: I55b552fd054610c993d14078ce048c8c4b676104
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoPython API: Re-adding rudimentary variable length array pack support. 57/2557/3
Ole Troan [Tue, 30 Aug 2016 19:03:51 +0000 (21:03 +0200)]
Python API: Re-adding rudimentary variable length array pack support.

Fixed bug in message-id mapping with non-consequtive APIs.

Change-Id: Icd6073e4655f7ce5432816861ae58915e5b336af
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoUse the correct thread stack alignment constraint, VPP-401 33/2833/3
Dave Barach [Mon, 12 Sep 2016 20:44:08 +0000 (16:44 -0400)]
Use the correct thread stack alignment constraint, VPP-401

Change-Id: Ia7837dfaa9ed200145aeea19177fe549ab4bd087
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoUpdate CSIT tests 160904 -> 160912 30/2830/2
Jan [Mon, 12 Sep 2016 20:34:29 +0000 (22:34 +0200)]
Update CSIT tests 160904 -> 160912

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I7a8024378dee33c89b58835af1b7de020fac3e5e
Signed-off-by: Jan <jgelety@cisco.com>
7 years agoProvide vpp-plugins rpm packaging 31/2831/1
Ed Warnicke [Mon, 12 Sep 2016 20:40:24 +0000 (20:40 +0000)]
Provide vpp-plugins rpm packaging

Change-Id: Ifbd99818ead5f38c5f8ad3ecdb36b24a9fa59798
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoMAP: Doxyfying CLI macros - VPP-165 10/2810/2
Ole Troan [Mon, 12 Sep 2016 10:25:30 +0000 (12:25 +0200)]
MAP: Doxyfying CLI macros - VPP-165

Change-Id: Iee203bf24e8c68e1367d12f297bf31019cc44c5c
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoaf_packet: allocate per-worker list of free buffers 95/2695/3
Damjan Marion [Wed, 7 Sep 2016 09:54:22 +0000 (11:54 +0200)]
af_packet: allocate per-worker list of free buffers

Change-Id: I7850f04787fa7ce10c0ae8adefa166c91420f02d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoDPDK virtio patch: Enable indirect descriptor features 32/2732/2
Pierre Pfister [Thu, 8 Sep 2016 13:36:27 +0000 (14:36 +0100)]
DPDK virtio patch: Enable indirect descriptor features

http://dpdk.org/dev/patchwork/patch/15610/

This change only includes patch for DPDK 16.07 as
DPDK 16.04 doesn't seem to compile for me.

Change-Id: I18d84456ef6a15aa308d5e14673a24cb4a7b6909
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoVPP-392 properly pass flags from vnet_hw_interface_set_flags_helper to 34/2734/2
Klement Sekera [Thu, 8 Sep 2016 15:53:13 +0000 (17:53 +0200)]
VPP-392 properly pass flags from vnet_hw_interface_set_flags_helper to
vnet_main->hw_interface_link_up_down_functions

Change-Id: I7aacaebade695e8fec8306426f693f287b605ed8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoMove CLI examples from wiki to code - VPP-165 94/2794/2
Keith Burns (alagalah) [Sat, 10 Sep 2016 21:55:04 +0000 (14:55 -0700)]
Move CLI examples from wiki to code - VPP-165

Change-Id: I50ad0d79a6ffaf0a51848abf2c5ed57e83c8640f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
7 years agoVPP-367: Peg vpp and vpp-plugins to depend on specific versions 96/2796/1
Ed Warnicke [Sat, 10 Sep 2016 23:13:36 +0000 (16:13 -0700)]
VPP-367: Peg vpp and vpp-plugins to depend on specific versions

vpp now depends on the version of vpp-lib it was built with
vpp-plugins now depends on the version of vpp it was built with

Change-Id: Idf706f94d3a35bdf51930badf61cac288855873d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoCheck for zero-sized Graphvix config file on Ubuntu; VPP-396 88/2788/1
Chris Luke [Sat, 10 Sep 2016 00:16:04 +0000 (20:16 -0400)]
Check for zero-sized Graphvix config file on Ubuntu; VPP-396

- The previous change only accounted for a missing Graphviz config
  file; apparently it can be zero-sized too.

Change-Id: Ic6957d10cdc7cb7b9da72d2b2a0f8913100870c5
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoOn Ubuntu check for graphviz system config 85/2785/1
Chris Luke [Fri, 9 Sep 2016 21:51:42 +0000 (17:51 -0400)]
On Ubuntu check for graphviz system config

- Sometimes it seems Ubuntu doesn't always set up the Graphviz
  handler config. If it's missing, generate it.

Change-Id: I2c1e566817de8415f8b360c6f967cd76307a2a52
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoFix bugs in IPFIX code discovered by coverity 03/2703/4
Juraj Sloboda [Tue, 6 Sep 2016 11:43:52 +0000 (04:43 -0700)]
Fix bugs in IPFIX code discovered by coverity

Change-Id: Ibe6ccb99c3c29c14efb34191f209a2f6a14293f7
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoFix Coverity issue in trace_util.c (REVERSE_INULL), thanks to Damjan for highlighting... 22/2722/1
Vengada Govindan [Thu, 8 Sep 2016 05:19:36 +0000 (22:19 -0700)]
Fix Coverity issue in trace_util.c (REVERSE_INULL), thanks to Damjan for highlighting this.

Change-Id: I22b1dc800624042e043e7632179f6281a6ccaafc
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
7 years agoVPP-346 Improve Doxygen include path mechanism 09/2709/2
Chris Luke [Wed, 7 Sep 2016 17:28:59 +0000 (13:28 -0400)]
VPP-346 Improve Doxygen include path mechanism

- If present, include the directories where API header files
  are generated into.
- Improve extraction of include paths from CPP
- Generalize the file/directory exclusion

This reduces some of the "warning" chatter from Doxygen.

Change-Id: I7ac02bff1639fe63f11263176020b0f040255017
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-388 Improve IP header lookup in ipsec_output 82/2682/5
Florin Coras [Tue, 6 Sep 2016 13:18:21 +0000 (15:18 +0200)]
VPP-388 Improve IP header lookup in ipsec_output

Change-Id: I5df0067c9ce56d7a15a991b82d4761924d91758b
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoFix MTU size for the bonded interface 06/2706/3
Steve Shin [Wed, 7 Sep 2016 15:25:04 +0000 (08:25 -0700)]
Fix MTU size for the bonded interface

Configure the MTU/L3 packet size of the bonded interface
as the lowest value of the slave intefaces

Change-Id: I34fb4c2156e8ad3d9bf45efe332405d53f72867c
Signed-off-by: Steve Shin <jonshin@cisco.com>
7 years agoVPP-390: include *.so symlinks in vpp-lib 08/2708/2
Ed Warnicke [Wed, 7 Sep 2016 17:12:52 +0000 (17:12 +0000)]
VPP-390: include *.so symlinks in vpp-lib

Currently, vpp-lib rpm includes symlinks for

*.so.0 -> *.so.0.0.0

but not

*.so -> *.so.0.0.0

This causes linker issues in cases where vpp-lib and vpp-devel rpms
are installed and sources are built that rely on libraries in vpp-lib.

Example:

libtool: link: gcc -shared -fPIC -DPIC jvpp/.libs/libjvpp_nsh_la-jvpp_nsh.o -lvlibmemoryclient -lvlibapi -lsvm -lvppinfra -lpthread -lm -lrt -ljvpp_common -L/usr/lib64 -O2 -Wl,-soname -Wl,libjvpp_nsh.so.0 -o .libs/libjvpp_nsh.so.0.0.0
/usr/bin/ld: cannot find -lvlibmemoryclient
/usr/bin/ld: cannot find -lvlibapi
/usr/bin/ld: cannot find -lsvm
/usr/bin/ld: cannot find -lvppinfra
collect2: error: ld returned 1 exit status

Change-Id: Ic8eebc696f973ea348be0b43e7cfb289efbe44fe
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoVPP-382: Add ipsec tunnel interface to sw_interface_dump 87/2687/2
Matus Fabian [Wed, 7 Sep 2016 06:19:43 +0000 (23:19 -0700)]
VPP-382: Add ipsec tunnel interface to sw_interface_dump

Change-Id: I9e49c9b6deedb750269da04e3332a3b0742d382c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVPP-387: Fixed ipsec-input trace 99/2699/2
Matus Fabian [Wed, 7 Sep 2016 12:57:09 +0000 (05:57 -0700)]
VPP-387: Fixed ipsec-input trace

Change-Id: I0a687c5d5f745a6c82a58c8e20b987180704a685
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVhost-User: Implement Indirect Descriptors 06/2106/7
Pierre Pfister [Wed, 27 Jul 2016 15:38:20 +0000 (16:38 +0100)]
Vhost-User: Implement Indirect Descriptors

One of the main issue with virtio is the small queue size.
VPP can quickly fill the queue before Linux could empty it,
resulting in packet losses.
Virtio indirect descriptors double the number of packet
which may fit in the virtio queue (From 128 to 256 with standard qemu
which hardcodes queue size to 256).

Linux will not use such descriptors if the virtio MRG feature is
enabled. You may add mrg_rxbuff=off option to qemu commandline
when starting the VM such as to disable this feature. This way,
Linux will use indirect buffers to receive packets.

But it seems that Linux never uses indirect buffers to send packets.

This patch also includes some optimization modifications.

Change-Id: I26940d41ce6b7e3a08d5516018a8c46c5316ce1c
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agocheckstyle: improve speed by checking only recently changed files 97/2697/3
Damjan Marion [Wed, 7 Sep 2016 11:10:50 +0000 (13:10 +0200)]
checkstyle: improve speed by checking only recently changed files

This change makes checkstyle much faster by checking only recently
changed files. It only checks files changed in last commit and files
which are localy modified. Old behavior is preserved by specifying
argument "--full" when invoking script.

In addition "make checkstyle" and "make "fixstyle" actions are added
to the top-level Makefile.

Change-Id: I7d86225bd282f32ee508e7f52692a3778ac8dcda
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-204 Rework and finish IPFIX implementation 61/2261/7
Juraj Sloboda [Mon, 8 Aug 2016 06:43:42 +0000 (23:43 -0700)]
VPP-204 Rework and finish IPFIX implementation

Rework flow report registration system - add streams
Add support for IPv6 and src and dst ports for TCP and UDP protocols
Implement binary API for IPFIX classifier module

Change-Id: Id05cc0127a7b95ceaeebf9c79a32c6936449bd63
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoAvoid use of node index 0 by registering null-node 79/2679/3
Damjan Marion [Tue, 6 Sep 2016 20:26:03 +0000 (22:26 +0200)]
Avoid use of node index 0 by registering null-node

In some cases it is convenient to use 0 as an invalid node index
so here we make sure that index 0 is not used.

Change-Id: I5af6bef6769d56086ceb343423185f22843732bd
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd support for input nodes in interrupt mode on the worker threads 80/2680/2
Damjan Marion [Tue, 6 Sep 2016 20:30:16 +0000 (22:30 +0200)]
Add support for input nodes in interrupt mode on the worker threads

Change-Id: Ice2e0e60c801bd6fb67f3a544e95e9ffaa22ca16
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-346 More VPP doc fixes 76/2676/2
Chris Luke [Tue, 6 Sep 2016 13:32:36 +0000 (09:32 -0400)]
VPP-346 More VPP doc fixes

- Fix issue in Doxy dependency check when nothing needs to be installed.
  'set -e' and plain '[]' logic don't mix well.
- Fix Makefile snafu when building Doxy output for a single file.
- Include only one of vnet/vnet/buffer.c/dpdk_buffer.c in docs depending on
  DPDKness. This could do with some improvement in future, eg to properly
  align the pre-doxy steps with what Doxy does.
- Fix rendering of 'inline' tag in Doxygen by having it interpret
  always_inline as "inline static".
- Bunch of duplicate CLI command structure names that confused docs and may
  one day have caused debugging issues.
- Several other Doxygen syntax issues fixed, like documenting non-existant
  parameters (usually just the wrong parameter name, typos, etc)

Change-Id: Ia8cca545e5de9f8750602bffa3c4548acc8971aa
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoAdd packet/byte count output tx stats to tunap interface 21/2621/3
John Lo [Sun, 4 Sep 2016 12:55:34 +0000 (08:55 -0400)]
Add packet/byte count output tx stats to tunap interface

Change-Id: I167c49d2a64e7a36a176d57054ecd99b398a9cca
Signed-off-by: John Lo <loj@cisco.com>
7 years agoMove iOAM Trace as a plugin 68/2468/8
Vengada Govindan [Thu, 25 Aug 2016 17:34:34 +0000 (10:34 -0700)]
Move iOAM Trace as a plugin

Change-Id: I78322e91485e5429871bd356f668b8ed90f4265a
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
7 years agoVPP-386 Fix map-server output in lisp-cp-lookup trace 72/2672/2
Florin Coras [Tue, 6 Sep 2016 14:29:34 +0000 (16:29 +0200)]
VPP-386 Fix map-server output in lisp-cp-lookup trace

Change-Id: I67dd7896932b8ea96062b9ff074959c172b51ba4
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoVPP-381 Add LISP interfaces to sw_interface_dump 58/2658/3
Florin Coras [Tue, 6 Sep 2016 11:36:11 +0000 (13:36 +0200)]
VPP-381 Add LISP interfaces to sw_interface_dump

Change-Id: I62b65472e77a33b1fc94f7c4975b5e9cbf358f41
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoIPsec speculative enqueue in exception path, fixes VPP-384 63/2663/2
Sergio Gonzalez Monroy [Tue, 6 Sep 2016 13:06:06 +0000 (14:06 +0100)]
IPsec speculative enqueue in exception path, fixes VPP-384

Enqueue buffers into next frame before validating them.

Change-Id: I466518bc6f304678136a2c3d37f136ce878eef05
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoVPP-385: Fix ARP for indirect adjacencies 49/2649/3
Florin Coras [Mon, 5 Sep 2016 17:54:17 +0000 (19:54 +0200)]
VPP-385: Fix ARP for indirect adjacencies

Change-Id: I48cffb8acbd9e6655d7ec661ee8f7e0689b12a2d
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoUpdate CSIT tests 160821 -> 160904 32/2632/1
Jan [Mon, 5 Sep 2016 09:32:30 +0000 (11:32 +0200)]
Update CSIT tests 160821 -> 160904

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5159d0a320305fd3a8ca927fa742ddd4df87b271
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoVPP-358: Add IPv6 ND Event Notification and Termination 94/2594/3
John Lo [Fri, 2 Sep 2016 04:13:41 +0000 (00:13 -0400)]
VPP-358: Add IPv6 ND Event Notification and Termination

Additional fix to vpp_api_test to show which kind of arp/ip6-nd
event is received, whether it is address resolution or mac/ip binding.

Change-Id: Ic65b895cd1bfbe2f34d1b68891a1a580852fbcdb
Signed-off-by: John Lo <loj@cisco.com>
7 years agoAdd in-message cli_request/cli_reply API 75/2575/6
Ole Troan [Wed, 31 Aug 2016 12:50:49 +0000 (14:50 +0200)]
Add in-message cli_request/cli_reply API

This new CLI API is meant to replace the
cli_request/cli_reply that uses shared memory.

PS: checkstyle -- *hate*

Change-Id: I6318f8f6b9be2c2398b49dac9e2193c1998ea724
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoFix for invalid check of SPARSE_VEC_INVALID_INDEX 99/2599/2
Alex Popovsky [Fri, 2 Sep 2016 03:57:45 +0000 (20:57 -0700)]
Fix for invalid check of SPARSE_VEC_INVALID_INDEX

When looking up a UDP port / GRE protocol in the sparse vectors
next_by_dst_port / next_by_protocol a data from the vector was
tested for SPARSE_VEC_INVALID_INDEX instead of sparse index itself.

This doesn’t matter for most cases since V[0] = 0 is true for all
sparse vectors. This however could cause an issue when a valid
sparse entry e.g. V[1234] = 0, with data (0) mistakenly passing
the test for SPARSE_VEC_INVALID_INDEX, while the index itself (1234)
is a valid index.

Change-Id: I04818cc43efeae047a4dae79078157d48b8c359c
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>
7 years agoVPP-221 Improve doxygen dependency check 85/2585/2
Chris Luke [Thu, 1 Sep 2016 13:04:01 +0000 (09:04 -0400)]
VPP-221 Improve doxygen dependency check

Only try to install packages if they're not installed.
Saves a trip through sudo which is useful when you have a
non-privileged account generating the docs.

Change-Id: I3709aceb15516a45ea2f9510d91c6d2e42c8c349
Signed-off-by: Chris Luke <chrisy@flirble.org>
7 years agoVPP-374: getting jvppgen.py into rpm vpp-devel package 83/2583/6
Ed Warnicke [Thu, 1 Sep 2016 01:48:47 +0000 (18:48 -0700)]
VPP-374: getting jvppgen.py into rpm vpp-devel package

Change-Id: Ia2643f33170da92fde0f8228c8d8393f23e98d11
Signed-off-by: Ed Warnicke <eaw@cisco.com>
7 years agoClean-up unused context arrays in UDP and GRE nodes 93/2593/2
Alex Popovsky [Fri, 2 Sep 2016 00:38:09 +0000 (17:38 -0700)]
Clean-up unused context arrays in UDP and GRE nodes

Removed unused sparse_index_by_next_index vector in local context
of UDP and GRE nodes. Most probably copy paste leftovers from PPP
implementation where it is realy used

Change-Id: I97e81035e2fd451c6f5a7bc31df96db9e6d2cebf
Signed-off-by: Alex Popovsky <apopovsk@cisco.com>