vpp.git
7 years agoVPP-363: add ability to change mac address of the interface 48/2548/8
Pavel Kotucek [Mon, 26 Sep 2016 08:40:02 +0000 (10:40 +0200)]
VPP-363: add ability to change mac address of the interface

Added ability to change interface address.
Added new CLI and API functions.

Change-Id: Ia336bc75ad8c5858c26f39af851485c4c6f19f58
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoFix double-free crash 25/3225/1
David Hotham [Fri, 30 Sep 2016 15:32:18 +0000 (16:32 +0100)]
Fix double-free crash

loop0 interfaces were transmitting the same packets multiple times,
eventually causing them to be freed multiple times

Change-Id: I32fcf5cfa10e58bb9e9bbbbc1b9312518d00ee9f
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
7 years agoRemove RPM package dependency on vpp-devel 20/3220/2
John DeNisco [Fri, 30 Sep 2016 12:33:40 +0000 (08:33 -0400)]
Remove RPM package dependency on vpp-devel

Change-Id: Ie6e1b3c8c2e0cf64f06aafe13a693686fd4b486a
Signed-off-by: John DeNisco <jdenisco@cisco.com>
7 years agoVPP-454 Fix LISP GID dictionary issue 16/3216/2
Filip Tehlar [Fri, 30 Sep 2016 10:47:59 +0000 (12:47 +0200)]
VPP-454 Fix LISP GID dictionary issue

GID dictionary IP prefix entries are rewritten with more narrow one
which is not desirable. This patch does exact matching instead of
longest prefix matching.

Change-Id: I0191e23229a69ffe86f82ea4d71e4a5534dbb5b0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agovat: add pg interfaces to sw_interface_dump (VPP-451) 15/3215/2
Damjan Marion [Fri, 30 Sep 2016 08:53:30 +0000 (10:53 +0200)]
vat: add pg interfaces to sw_interface_dump (VPP-451)

Change-Id: I976a44dcfb32b1132c14363174239333315b2c6f
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-450 Fix adding LISP adjacencies via CLI 84/3184/4
Filip Tehlar [Wed, 28 Sep 2016 12:27:59 +0000 (14:27 +0200)]
VPP-450 Fix adding LISP adjacencies via CLI

Change-Id: If90c9c630629e727fffc5d450516045a04433661
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoVPP-120: include custom types to Python representation of vpe.api 98/3198/3
Marek Gradzki [Thu, 29 Sep 2016 11:20:52 +0000 (13:20 +0200)]
VPP-120: include custom types to Python representation of vpe.api

Change-Id: Ide97a8bf55d3baf41a1e86af2c67c6b7b26b657a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoVPP-378: rename jvpp package to the same as groupId of deployed jars 78/3178/3
Marek Gradzki [Wed, 28 Sep 2016 08:12:04 +0000 (10:12 +0200)]
VPP-378: rename jvpp package to the same as groupId of deployed jars

Related changes:
- NSH: https://gerrit.fd.io/r/#/c/3181/
- Honeycomb: https://gerrit.fd.io/r/#/c/3182

Change-Id: Ifdd6b8b575916fdf99794618dbe604c2e17e8e82
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoDPDK HQoS: Enable Hierarchical Scheduler in VPP 48/2048/10
Jasvinder Singh [Thu, 21 Jul 2016 16:02:19 +0000 (17:02 +0100)]
DPDK HQoS: Enable Hierarchical Scheduler in VPP

This commit extends the vpp framework with new thread type "hqos-threads" that
runs the Hierarchical Quality of Service (HQoS) scheduler associted with output
interface.  HQoS Scheduler prioritize the packets from different users and
ensures sufficient bandwidth to pass the more important traffic.

At high level, HQoS scheduler is a buffer that can temporarily store a
large number of packets. In otherwords, it is a collection of large number
of queues organized into hierarchy of 5 levels; the port (i.e. the physical
interface) is at the root of the hierarchy followed by the subport (a set
of users), the pipes (individual users), the traffic classes (each with a
strict priority) and at the leaves, the queues.

In each HQoS scheduler, three operations are performed; classification
(setting HQoS port, subport, pipe, traffic class and queue within traffic
class from packet fields), enqueue (selecting HQoS queue for the packet,
and to drop the packet if the queue is full) and dequeue (schedule the
packet based on its length and available credits, and handover the scheduled
packet to the output interface).

In vpp, the number of hqos threads will be equal to cpu cores specified in
corelist-hqos-threads parameter cpu section of the vpp configuration file.
One hqos thread can run HQoS for multiple output interfaces. A particular HQoS
instance is initialised with default parameters required to configure hqos port,
subport, pipe and queues. Some of them can be re-configured in run-time
through CLI commands as well binary APIs.

Following illustrates the sample startup configuration file with 4x worker
threads feeding 2x hqos threads that handle each HQoS for 1x output interface.
For more details on HQoS configuration please refer to DPDK Programmer's Guide.

dpdk {
socket-mem 16384,16384

dev 0000:02:00.0 {
num-rx-queues 2
hqos
}
dev 0000:06:00.0 {
num-rx-queues 2
hqos
}

num-mbufs 1000000
}

cpu {
  main-core 0
  corelist-workers  1, 2, 3, 4
  corelist-hqos-threads  5, 6
}

Change-Id: I635c3395a7c4ddf0a239ef77b0b0a31a6dfc4767
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
7 years agoFix packet trace for IP4/IP6 lookup/forwarding nodes 72/3172/2
John Lo [Tue, 27 Sep 2016 21:44:02 +0000 (17:44 -0400)]
Fix packet trace for IP4/IP6 lookup/forwarding nodes

Change-Id: Ibf3d2e69dbac28fbef77d8ba20d7f5a60eea0198
Signed-off-by: John Lo <loj@cisco.com>
7 years agoclassify: fix issue with output classify node using wrong sw_if_index 73/2873/3
Christophe Fontaine [Fri, 9 Sep 2016 14:18:43 +0000 (16:18 +0200)]
classify: fix issue with output classify node using wrong sw_if_index

Output classify node should use sw_if_index[VLIB_TX]
Like in l2_output.c, we have to use sw_if_index[VLIB_TX]
to get the appropriate configuration.

Change-Id: I96b1a03ddf5c9e9c45fa3f5df3ea88895ed4345e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
7 years agoarp: handle ARP proxy after tunnelling 81/2981/4
David Hotham [Tue, 20 Sep 2016 13:34:00 +0000 (13:34 +0000)]
arp: handle ARP proxy after tunnelling

Only rewind the buffer back to the start of the ethernet header,
rather than all the way.  We don't want to undo earlier
decapsulation.

Change-Id: I5f4b183eb3e8df690695ce3a97e55f3b0579a266
Signed-off-by: David Hotham <david.hotham@metaswitch.com>
7 years agoFix RPM packaging dependencies 71/3171/2
John DeNisco [Tue, 27 Sep 2016 20:43:04 +0000 (16:43 -0400)]
Fix RPM packaging dependencies

Change-Id: Ife1523e11b7225ea0fd41c06c3b802bb171e91f4
Signed-off-by: John DeNisco <jdenisco@cisco.com>
7 years agoVPP-308: Added workaround for failed vnet build. For some reason 83/2383/2
Thomas F Herbert [Mon, 1 Aug 2016 22:33:48 +0000 (18:33 -0400)]
VPP-308: Added workaround for failed vnet build. For some reason
the clock slew is greater with Vagrant 1.8.5 which causes Makefile.am to be
timestamped as newer which causes builds to fail.

Change-Id: Id0d35c41ac66a2841c5aae20dd678f4bc125e41b
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoFix hugepage detection issue 67/3167/2
Damjan Marion [Tue, 27 Sep 2016 15:51:13 +0000 (17:51 +0200)]
Fix hugepage detection issue

Per-numa free hugepages number was not read correctly due
to wrong sysfs path.

Change-Id: I889111027d7f93c42e2e4673d8d4e8f75ae065b6
Signed-off-by: Damjan Marion <damarion@cisco.com>
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>