958 Commits

Author SHA1 Message Date
Chris Luke
3542514038 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>
2016-09-09 20:16:04 -04:00
Chris Luke
c87fa6dede 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>
2016-09-09 17:51:42 -04:00
Juraj Sloboda
24648ad088 Fix bugs in IPFIX code discovered by coverity
Change-Id: Ibe6ccb99c3c29c14efb34191f209a2f6a14293f7
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-09-07 00:06:01 -07:00
Vengada Govindan
7a35ee91a4 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>
2016-09-07 22:19:36 -07:00
Chris Luke
3b480933c8 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>
2016-09-07 21:20:43 +00:00
Florin Coras
fb28e9a80c VPP-388 Improve IP header lookup in ipsec_output
Change-Id: I5df0067c9ce56d7a15a991b82d4761924d91758b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-07 19:35:47 +00:00
Steve Shin
bf1fa7fa39 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>
2016-09-07 19:34:56 +00:00
Ed Warnicke
f5a0e73e53 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>
2016-09-07 18:42:03 +00:00
Matus Fabian
8fce3e3c51 VPP-382: Add ipsec tunnel interface to sw_interface_dump
Change-Id: I9e49c9b6deedb750269da04e3332a3b0742d382c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-07 17:21:01 +00:00
Matus Fabian
5539a077ef VPP-387: Fixed ipsec-input trace
Change-Id: I0a687c5d5f745a6c82a58c8e20b987180704a685
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-09-07 17:20:07 +00:00
Pierre Pfister
ba1d046414 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>
2016-09-07 17:19:11 +00:00
Damjan Marion
2470485158 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>
2016-09-07 15:50:36 +02:00
Juraj Sloboda
ffa652afd8 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>
2016-09-07 07:35:50 +00:00
Damjan Marion
d4798a394a 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>
2016-09-07 00:49:29 +00:00
Damjan Marion
5d447a9f64 Add support for input nodes in interrupt mode on the worker threads
Change-Id: Ice2e0e60c801bd6fb67f3a544e95e9ffaa22ca16
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-06 23:15:25 +00:00
Chris Luke
d4024f5862 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>
2016-09-06 20:35:28 +00:00
John Lo
7394b5b06b Add packet/byte count output tx stats to tunap interface
Change-Id: I167c49d2a64e7a36a176d57054ecd99b398a9cca
Signed-off-by: John Lo <loj@cisco.com>
2016-09-06 20:08:36 +00:00
Vengada Govindan
07d2f84907 Move iOAM Trace as a plugin
Change-Id: I78322e91485e5429871bd356f668b8ed90f4265a
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
2016-09-06 18:53:51 +00:00
Florin Coras
5a1c11b53f VPP-386 Fix map-server output in lisp-cp-lookup trace
Change-Id: I67dd7896932b8ea96062b9ff074959c172b51ba4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:49:35 +00:00
Florin Coras
ce98275ac3 VPP-381 Add LISP interfaces to sw_interface_dump
Change-Id: I62b65472e77a33b1fc94f7c4975b5e9cbf358f41
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:47:44 +00:00
Sergio Gonzalez Monroy
73c0110502 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>
2016-09-06 18:45:51 +00:00
Florin Coras
df9d3bc3c4 VPP-385: Fix ARP for indirect adjacencies
Change-Id: I48cffb8acbd9e6655d7ec661ee8f7e0689b12a2d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-09-06 18:10:34 +00:00
Jan
0c6a6750da 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>
2016-09-05 11:32:30 +02:00
John Lo
e016b5e3fb 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>
2016-09-03 20:35:10 +00:00
Ole Troan
c27213a30f 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>
2016-09-02 12:36:48 +00:00
Alex Popovsky
52901246e0 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>
2016-09-02 10:46:15 +00:00
Chris Luke
ee4743adf5 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>
2016-09-02 05:33:01 +00:00
Ed Warnicke
406ab9d365 VPP-374: getting jvppgen.py into rpm vpp-devel package
Change-Id: Ia2643f33170da92fde0f8228c8d8393f23e98d11
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-02 05:04:51 +00:00
Alex Popovsky
87a0d77c62 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>
2016-09-02 03:50:00 +00:00
Ed Warnicke
3ba4d36d92 VPP-373: stop building from /vpp mount
Change-Id: I7f8fe8fa6c24b4229b0cb45e6c83e7cb2828e2da
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-09-02 02:05:57 +00:00
Chris Luke
16bcf7d8dc VPP-346 A swathe of doc fixes
Fixes various Doxygen warnings and other structural defects.

Note: This does not attempt to improve the content of the
documentation; only to improve the syntax and structure of it
and in some cases the consistency.

Change-Id: Ib1915f33edbdbc4558c85565de80dce323193906
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-09-01 14:31:46 -04:00
Shwetha
f074eef040 VPP-341: iOAM plugin documentation
Change-Id: I0042ce8b8a70bb709765037c3636be667ad88aa2
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-09-01 07:29:19 +01:00
Shwetha
5c377a1b7f Fix for vl_client_get_first_plugin_msg_id:266: plugin 'export_eb694f98' not registered
Change-Id: Iad6d8513e55a5f4609c7edb5505067d1136e84ea
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-09-01 01:53:58 +00:00
Dave Barach
b84a3e56e1 VPP-369 Add an L2 output classification feature
Change-Id: If03162d328c1ea179249e734537ebb01bade3331
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-31 21:53:01 +00:00
John Lo
1edfba9a63 VPP-358: Add IPv6 ND Event Notification and Termination
Add IPv6 equivalent of IPv4 ARP event notification which covers address
resolution for L3 and MAC/IP binding in L2 BD and ARP termination in BD.
For IPv6, ICMP6 neighbor solicitation and advertisement packets are
utilized instead of ARP request and response packets for IPv4.

Change-Id: I0088fa173e4480de297c8053ea2fcd0821322815
Signed-off-by: John Lo <loj@cisco.com>
2016-08-31 21:05:06 +00:00
Keith Burns (alagalah)
7214cf11e9 VPP-303 - Documentation changes for vnet/vnet/sr
Change-Id: If8b76959d7c29c216bf03609483a2c9e1d034f46
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-31 17:12:52 +00:00
Calvin
16649375fe VPP-210: Add "sh api status"
Change-Id: I164761bc2b242b6be527d057108dd09b99653ff5
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-08-31 17:11:56 +00:00
Chris Luke
e0d802bc53 VPP-221 Loosen Doxygen CLI command struct parser
Make the struct parser slighty slightly more accomodating of
whitespace in places it has no business being.

Also add missing OS_ID thing to Doxygen makefile.

Change-Id: Id3d198fd926f7a6c2ed40bc2d08907aad5d5ac33
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 10:07:45 -04:00
Chris Luke
5cdaf63582 VPP-189 Tweak hash_foreach_pair to avoid static warning
Coverity doesn't like when an incrementing pointer is taken from
the address of a singleton; it cries that this is a potential
buffer overrun.

Since the cases of this in hash_foreach_pair are based on items
from a simple union used just to have different types point to
the same location it's a simple matter of using the pointer to
that location directly. Since we then aren't using the members
of the union, we can change that to an opaque pointer (void *).

This accounts for >60 issues in Coverity.

Whilst here, convert some useful existing comments into a docblock.

Change-Id: I114183ab7d7948d4a6a703451417f79fa37634eb
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 12:57:33 +00:00
Chris Luke
54ccf2261c VPP-221 CLI auto-documentation infrastructure
As a step before Doxygen, extract CLI-related struct initializers
from the code and parse that into a summary of the CLI commands
available with the provided help text, such as it is. At the moment
this only renders this into an indexed Markdown file that Doxygen
then picks up but later we can use this information to enrich the
existing VLIB_CLI_COMMAND macro documentor as well as provide
runtime documentation to VPP that is stored on disk outside the
binary image.

Additionally support a comment block immediately prior to
VLIB_CLI_COMMAND CLI command definitions in the form /*? ... ?*/
that can be used to include long-form documentation without having
it compiled into VPP.

Examples of documenting CLI commands can be found in
vlib/vlib/unix/cli.c which, whilst not perfect, should provide a
starting point. Screen captures of sample output can be seen at
https://chrisy.flirble.org/vpp/doxy-cli-example.png and
https://chrisy.flirble.org/vpp/doxy-cli-index.png .

Next, shift the Doxygen root makefile targets to their own Makefile.
The primary reason for this is that the siphon targets do dependency
tracking which means it needs to generate those dependencies whenever
make is run; that is pointless if we're not going to generate any
documentation. This includes the package dependencies since they since
they sometimes unnecessarily interfere with the code build in some cases
at the moment; later we will look to building a Python venv to host the
Python modules we use.

One final remark: In future we may consider deprecating .long_help
in the VLIB_CLI_COMMAND structure entirely but add perhaps .usage_help.
.short_help would be reserved for a summary of the command function
and .usage_help provide the syntax of that command. These changes would
provide great semantic value to the automaticly generated CLI
documentation. I could also see having .long_help replaced by a
mechanism that reads it from disk at runtime with a rudimentary
Markdown/Doxygen filter so that we can use the same text that is used in
the published documentation.

Change-Id: I80d6fe349b47dce649fa77d21ffec0ddb45c7bbf
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-08-31 12:56:56 +00:00
Pavel Kotucek
d85590a004 VPP-240: delete subinterface
Added new CLI and API command to delete subinterface.

Change-Id: Ia92a8facc6ad84634bdec430093e6add02ee674e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-08-31 10:02:15 +00:00
Ed Warnicke
f53db2a6c2 Fix for vppctl to suppress "load_one_plugin:63: Loaded plugin:" msgs
Change-Id: I06fcb024036b48a6401d2865a2181b122cb32108
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-08-30 18:09:24 -07:00
Filip Tehlar
5a4e2dde94 VPP-365: Fix sending of bd_index in lisp_eid_table_add_del_map
Change-Id: I1f8fd65fa33b0bc7ee07aa0eeb5f794a7ede9537
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-30 19:28:37 +00:00
Florin Coras
459f4d61a8 VPP-364 Add vpp-api/python/build to gitignore
Change-Id: I16a594ad75c085b8d0b74cf2f472f88a655253c0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-30 13:41:13 +00:00
John Lo
cb9f3d7120 VPP-361: Memory leak on delete of VXLAN over IPv6 tunnel
The key for VXLAN over IPv6 tunnel is allocated on create and should
be freed on delete.

Change-Id: I11bdd9465030fed57cc4bbd28dbccdf952633b34
Signed-off-by: John Lo <loj@cisco.com>
2016-08-30 10:52:34 +00:00
Filip Tehlar
c00617b13c VPP-353: Fully support LISP negative mappings in API
Change-Id: I71943fb4ae2a2f71bcf1ad73512812edf96c06da
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-08-30 10:30:59 +00:00
Dave Barach
ed47b4cd4e VPP-360 Allow L2 classify to use dynamic graph arcs
Simple change so we can program L2 classifier per-session next-indices
and per-table miss-next-indices using dynamically-created graph arcs.

Change-Id: I9d4a3c82b83e94557075d56a6842d7075ed58905
Signed-off-by: Dave Barach <dave@barachs.net>
2016-08-29 16:32:00 -04:00
Ole Troan
d575e69177 VPP-310 Mapping algorithm compute wrong ea-bits
Mapping of IPv4 prefixes ended up writing past IPv6 prefix + EA bits
length.
(Added some unit testing code).

Change-Id: I59893b44eea5cebf00a23afc405832741f84cf4f
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-29 11:57:31 +00:00
Keith Burns (alagalah)
d46cca1743 VPP-307: Documentation for vnet/vnet/vxlan-gpe
Change-Id: Iaab6f4b63ed0d986be1ac0636c692b46098ad54d
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-08-29 11:53:04 +00:00
Florin Coras
35f9daa267 VPP-357 Fix vni for LISP fwd entry removals
Change-Id: I5d20c1939f7a5a142bf696b34143f7ebca6afbcb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-08-26 16:20:50 +02:00