vpp.git
8 years agoVPP-57 Add missing license headers in doc files 22/1122/2
Chris Luke [Sat, 14 May 2016 16:06:42 +0000 (12:06 -0400)]
VPP-57 Add missing license headers in doc files

Change-Id: Icd1f8952f66d3cee027c59f3148c67f1839de306
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoVPP-64: Fix top-level "make pkg-deb" which breaks if CDPATH is set in the user's 20/1120/3
Dave Wallace [Sat, 14 May 2016 02:49:36 +0000 (22:49 -0400)]
VPP-64: Fix top-level "make pkg-deb" which breaks if CDPATH is set in the user's
bash environment.

Change-Id: Ib13e6fdafa67175937e57fad4e75e553cb1e08a3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 years agoVPP-65: Fix top-level "make install-dep" to work behind a firewall / 13/1113/5
Dave Wallace [Fri, 13 May 2016 23:00:29 +0000 (19:00 -0400)]
VPP-65: Fix top-level "make install-dep" to work behind a firewall /
proxy-server on Ubuntu.

Change-Id: I3f662455728adb81ca5a079540d8a9c615a5b977
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 years agoONE-13: Add CLI/API for LISP static remote mappings 03/1103/3
Filip Tehlar [Fri, 13 May 2016 15:37:35 +0000 (17:37 +0200)]
ONE-13: Add CLI/API for LISP static remote mappings

Change-Id: Ic4c717af9629541bac0a0e6c65d0157619c8f578
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
8 years agoVPP-62 Add a doxy filter to enable vpe.api doc 23/1123/3
Chris Luke [Sat, 14 May 2016 16:17:12 +0000 (12:17 -0400)]
VPP-62 Add a doxy filter to enable vpe.api doc

This makes Doxygen think the API definitions are structs which is close
enough to be able to document the API methods.

It also has logic to create an indexed API page but that's disabled for
now because it duplicates the "brief" text twice in the struct doc.

Fixes a minor line numbering issue in filter_c.py.

Change-Id: If380160b73e7c10d999b35a76f55d0e27cbc91cc
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoVPP-63: clean up config scripts, remove specific hostnames 26/1126/1
Dave Barach [Sat, 14 May 2016 22:38:48 +0000 (18:38 -0400)]
VPP-63: clean up config scripts, remove specific hostnames

Change-Id: Ifb77256fa691b1a90045a10448835c09b764e74f
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-57 Add doxygen build dependencies 04/1104/2
Chris Luke [Fri, 13 May 2016 17:41:36 +0000 (13:41 -0400)]
VPP-57 Add doxygen build dependencies

Change-Id: I764d8a440c050d753e0380e139f489d3085f17f4
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoONE-7: Fix map-request encapsulation 01/1101/3
Florin Coras [Fri, 13 May 2016 16:09:56 +0000 (18:09 +0200)]
ONE-7: Fix map-request encapsulation

We now try to find the first map-resolver IP we have a route to and
decide the ip lookup node according to map-resolver IP.

Change-Id: I68fc12861dc1e9a203ebf6caefd4f053a741a785
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoWhitespace probe for CI 46/1046/3
Ed Warnicke [Mon, 9 May 2016 19:43:06 +0000 (14:43 -0500)]
Whitespace probe for CI

Change-Id: I3744ee19a21dcea2885aef2800244c93aa19763a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoVPP-57 Add Doxygen to VPP 79/979/13
Chris Luke [Tue, 3 May 2016 20:34:59 +0000 (16:34 -0400)]
VPP-57 Add Doxygen to VPP

- Configures Doxygen.
- Adds a source filter to do magic on our use of the preprocessor to do
  constructor stuff to make Doxygen grok it better.
- Adds a convenience helper to the root Makefile.
- Adds a README.md to the root directory (and which Doxygem uses as its
  "mainpage".
- Add several other documentative files.
- Currently using SVG for call graphs, though this may have a
  load-time performance impact in browsers.

Change-Id: I25fc6fb5bf634319dcb36a7f0e32031921c125ac
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoVPP43 - NSH refactoring: Added nsh-map nodes 15/1015/22
Keith Burns (alagalah) [Fri, 6 May 2016 01:16:50 +0000 (18:16 -0700)]
VPP43 - NSH refactoring: Added nsh-map nodes

- removed vnet/vnet/nsh-gre
- removed all nsh from vnet/vnet/nsh_vxlan_gpe to
  vnet/vnet/nsh
- moved vnet/vnet/nsh_vxlan_gpe to vnet/vnet/vxlan_gpe
- added cli and binary api for VXLAN GPE tunnels
- plan to move vnet/vnet/nsh to new repo (sfc_nsh) and make plugin
- added cli for NSH (binary API will be done in sfc_nsh)
- vnet/vnet/gre will be extended in VPP-54

Change-Id: I1d27def916532321577ccd68cb982ae0d0a07e6f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoONE-11: Fix bugs in LISP API 84/1084/5
Andrej Kozemcak [Mon, 9 May 2016 08:52:16 +0000 (10:52 +0200)]
ONE-11: Fix bugs in LISP API

- check input variables
- in locator_set dump, add support for remote locator_set

Change-Id: Ib10028e83fead358f820ae45c71b6ca4dfbe2f1e
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
8 years agoVPP-53: clang build fails in API on SR tests 88/1088/4
Damjan Marion [Thu, 12 May 2016 17:08:24 +0000 (19:08 +0200)]
VPP-53: clang build fails in API on SR tests

Change-Id: Ib3117d7b5b6b8c97acfea17ad27c965f6ce2e829
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoGenerate jvpp sources in build-root 82/1082/3
Maros Marsalek [Thu, 12 May 2016 08:31:35 +0000 (10:31 +0200)]
Generate jvpp sources in build-root

+ Fail build when JVpp does not compile

Change-Id: I4ad3ffb5d7ff6edaad89de66a9f0bd79a14fb690
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
8 years agoRevert "Whitespace change for testing CI" 81/1081/1
Ed Warnicke [Thu, 12 May 2016 04:06:05 +0000 (04:06 +0000)]
Revert "Whitespace change for testing CI"

This reverts commit cf9b712f57e3e81662e0815bd19ce19583783650.

This reverts gerrit: https://gerrit.fd.io/r/#/c/1078/

Change-Id: I4cf8c238fd81b5dc8bd077bbdd00cf72aef796ed
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoWhitespace change for testing CI 78/1078/2
Ed Warnicke [Thu, 12 May 2016 02:46:19 +0000 (21:46 -0500)]
Whitespace change for testing CI

Change-Id: I52bf3c1c8ece08a4b52fce1f34704b944f9c1888
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoJVPP - null checks changed to Objects.requireNonNull usage 41/1041/4
Tibor Sirovatka [Mon, 9 May 2016 14:41:31 +0000 (16:41 +0200)]
JVPP - null checks changed to Objects.requireNonNull usage
Review changes incorporated

Change-Id: Ia04b62144a0d3643095b518db538c7eb5137c048
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
8 years agoONE-9: Fix clang build errors 65/1065/2
Florin Coras [Wed, 11 May 2016 10:13:47 +0000 (12:13 +0200)]
ONE-9: Fix clang build errors

Change-Id: Icbf3e269471ee0fc1d21f842b2ea220328a0f891
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoONE-8: Fix adj signature issues 59/1059/2
Florin Coras [Tue, 10 May 2016 18:01:44 +0000 (20:01 +0200)]
ONE-8: Fix adj signature issues

When inserting routes into ip4/6 fibs, we first added a dummy adjacency
and afterwards manually updated its rewrite header to enable src/dst
forwarding. The downside to this is that the adj signature is changed
and therefore when deleting a route the adjacency signature is not
removed from adj_index_by_signature hash resulting in crash if the same
adjacency is re-inserted.

This patch avoids the issue by enforcing the insertion of 'complete'
adjacencies thereby obviating the need to update the rewrite header.

Change-Id: Ib43bfe72a65e2cf9ef7685a99596eb1d7723e543
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoONE-6: dp is not programmed when re-enabling LISP 53/1053/2
Filip Tehlar [Tue, 10 May 2016 14:58:29 +0000 (16:58 +0200)]
ONE-6: dp is not programmed when re-enabling LISP

Change-Id: I4c0c5d44168da811a713943275430a378ff46929
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
8 years agoVPP-46 Fix cut-and-paste in the debug CLI 56/1056/2
Chris Luke [Tue, 10 May 2016 14:45:10 +0000 (10:45 -0400)]
VPP-46 Fix cut-and-paste in the debug CLI

Since the move to line-mode the debug CLI was eating everything in the
input_vector but only processing upto the first newline. Cut-and-paste
type operations generally send a large block of input with multiple
newlines and thus all but the very first line were simply ignored.

This patch fixes that and also cleans up the difference between
input_vector and current_command which in turn removes a lot of cruft
from the keystroke parser.

Previously current_command was just the character accumulator inside the
char-by-char keystroke parser; complete commands were copied back to
input_vector (overwriting anything already in there).

Now, in char-by-char mode:
- input_vector is the stream of incoming bytes yet to be processed
- current_command is the accumulated characters of the next command to
  be executed; once newline is found, it is the complete command to be
  executed.

In line mode:
- input_vector and current_command are the same thing.

Change-Id: I72d21f0f3508b413879071ab186a71cef1124a2b
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAvoid clobbering output_function by concurrent CLI sessions doing vlib_process_wait_f... 48/1048/4
Andrew Yourtchenko [Tue, 10 May 2016 10:51:34 +0000 (10:51 +0000)]
Avoid clobbering output_function by concurrent CLI sessions doing vlib_process_wait_for_event*.

A problem is easily reproducible by taking the test harness code from the commit,
and launching it in two terminals with some time overlap - the outputs will
be sent to the wrong session. This commit moves the output_function and argument
from a global structure into the process structure, thus the output_function
is not clobbered anymore and each session gets only its own output.

To ensure the callers can redirect the outputs to different destinations
(e.g. the API calls via shared memory, etc.) the existing logic
for vlib_cli_input() was retained.

To avoid the magic numbers usage in the logic that does the page-alignment
of the process stack, there are changes around the stack[] member
of vlib_process_t. Also added a compile-time assert to ensure that
the stack does indeed start on the page size multiple boundary.

Change-Id: I128680ac480735e5f214f81a884e414268e5d652
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
8 years agoONE-4: Add LISP enable/disable API/CLI 39/1039/3
Filip Tehlar [Mon, 9 May 2016 07:39:26 +0000 (09:39 +0200)]
ONE-4: Add LISP enable/disable API/CLI

This patch adds an enable/disable API/CLI for control plane
which calls similar functions for data plane. When re-enabling
it also re-populates dataplane with tunnels and interfaces.

Change-Id: Id8c3d6af90ecc0be331d502756914b1f62824046
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
8 years agoAdd af_packet API 17/1017/3
Matus Fabian [Fri, 6 May 2016 13:14:13 +0000 (15:14 +0200)]
Add af_packet API

Change-Id: I39409ae9e75fdb59d8cbbd940fa192b24eb79b6a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoONE-3: Delete dst route when src fib is empty 43/1043/2
Florin Coras [Mon, 9 May 2016 17:28:58 +0000 (19:28 +0200)]
ONE-3: Delete dst route when src fib is empty

Properly check that src fib is empty.

Change-Id: I4072169027a404cad66eaaa8450f7c18f1fa8073
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoVPP-44: iOAM service and path verification using shamir's secret sharing 85/985/4
Shwetha Bhandari [Wed, 4 May 2016 06:12:57 +0000 (08:12 +0200)]
VPP-44: iOAM service and path verification using shamir's secret sharing

Change-Id: I445ad13f8f93cb75cacc94192c4ae85c8ca14e35
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
8 years agoONE-5: Remove unused vnet_lisp_gpe_add_del_tunnel API 33/1033/2
Florin Coras [Fri, 6 May 2016 12:22:40 +0000 (14:22 +0200)]
ONE-5: Remove unused vnet_lisp_gpe_add_del_tunnel API

Change-Id: Ib22ec807d2b74b7c3cb37f66052cd07bc4d896db
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoVPP-20: Verify valid sw_if_index in ip_address_dump. 38/1038/1
Ole Troan [Mon, 9 May 2016 10:23:45 +0000 (12:23 +0200)]
VPP-20: Verify valid sw_if_index in ip_address_dump.
        (Also checked other API calls for same error without finding any.)

Change-Id: I1062ecf8eff004efb3fad4582a00c6b512c36999
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoSwitch to using -headless JDK 12/1012/3
Ed Warnicke [Thu, 5 May 2016 23:03:27 +0000 (18:03 -0500)]
Switch to using -headless JDK

By default, jdks bring a bunch of UI related things
we don't need, so switch to headeless.

Also, use default-jdk-headless for Ubuntu after 14.04.
Use openjdk-8-jdk-headless for Ubuntu 14.04.

Change-Id: I3cf14c39c9f59dc2f1beba8dfb19971f4b67f5a6
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoSwitch to using nexus.fd.io for dpdk tarball 08/1008/6
Ed Warnicke [Thu, 5 May 2016 20:19:49 +0000 (15:19 -0500)]
Switch to using nexus.fd.io for dpdk tarball

Change-Id: I9751cbb9137627491ee4bd03e0318429327c0bd8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoVPP-35 Add GRE tunnels to sw_interface_dump 19/1019/3
Chris Luke [Fri, 6 May 2016 14:12:30 +0000 (10:12 -0400)]
VPP-35 Add GRE tunnels to sw_interface_dump

GRE tunnels were missing from vpp_api_test's sw_interface_dump command.

$ sudo ./build-root/install-vpp_debug-native/vpp-api-test/bin/vpp_api_test json
vat# sw_interface_dump
[
...
  {
    "sw_if_index": 7,
    "sup_sw_if_index": 7,
    "l2_address_length": 0,
    "l2_address": [0, 0, 0, 0, 0, 0, 0, 0],
    "interface_name": "gre0",
    "admin_up_down": 1,
    "link_up_down": 0,
    "link_duplex": 0,
    "link_speed": 0,
    "mtu": 0,
    "sub_id": 0,
    "sub_dot1ad": 0,
    "sub_number_of_tags": 0,
    "sub_outer_vlan_id": 0,
    "sub_inner_vlan_id": 0,
    "sub_exact_match": 0,
    "sub_default": 0,
    "sub_outer_vlan_id_any": 0,
    "sub_inner_vlan_id_any": 0,
    "vtr_op": 0,
    "vtr_push_dot1q": 0,
    "vtr_tag1": 0,
    "vtr_tag2": 0
  }
]

Change-Id: I6f174f3c384eac464250b22f43b25be6a844aa66
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoVPP-45 Fix crash when GRE packet received on new i/f 21/1021/2
Chris Luke [Fri, 6 May 2016 15:51:54 +0000 (11:51 -0400)]
VPP-45 Fix crash when GRE packet received on new i/f

If a GRE tunnel is created, no other interface added and the GRE tunnel
is not set "up" then a crash occurs on the first packet for this tunnel
because fib_index_by_sw_if_index[] does not yet have a mapping to the fib
the new interface is in. The code to set this is missing from
gre/interface.c

Change-Id: I567ad74a2af3ea5afe4a40ed39a1d4395642f77c
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoSmall improvement to vagrant file 24/1024/2
Ed Warnicke [Fri, 6 May 2016 17:58:31 +0000 (12:58 -0500)]
Small improvement to vagrant file

Change-Id: Ia85ed0ef55cb5da118289667d7b217d8890d487e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoVPP-34 GRE traffic blackholes in encap direction 26/1026/1
Chris Luke [Fri, 6 May 2016 21:09:09 +0000 (17:09 -0400)]
VPP-34 GRE traffic blackholes in encap direction

The GRE code is missing the logic to indicate the "hardware" interface
is up. The fix is to listen for admin up/down events on the "software"
interface and reflect that into the hardware interface state.

Change-Id: If06e4f03989b2c52c32f50c11e1943e42bb2609f
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoCheck IP adj_index to make sure it is valid to prevent possible crash 14/1014/2
John Lo [Thu, 5 May 2016 23:55:13 +0000 (19:55 -0400)]
Check IP adj_index to make sure it is valid to prevent possible crash

Change-Id: I439aac05638fd40e314bec8756e42a32c436321c
Signed-off-by: John Lo <loj@cisco.com>
8 years agoFix vpp_lite build caused by missing definition of unlikely macro 09/1009/1
Damjan Marion [Thu, 5 May 2016 20:49:38 +0000 (22:49 +0200)]
Fix vpp_lite build caused by missing definition of unlikely macro

Change-Id: I11b34e171c1c7907dd3faec219866418b4e792f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoONE-2: Add new LISP dump API for lisp gpe 86/986/5
Andrej Kozemcak [Mon, 2 May 2016 10:14:33 +0000 (12:14 +0200)]
ONE-2: Add new LISP dump API for lisp gpe

API:
lisp_gpe_enable_disable_dump

Change-Id: I1c8e78f00f9a3f99c1f2f54884af565292e4ccf8
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
8 years agoVPP-39 - refactoring of NSH into own folder 95/995/6
Keith Burns (alagalah) [Wed, 4 May 2016 23:11:38 +0000 (16:11 -0700)]
VPP-39 - refactoring of NSH into own folder

- common header files and structs used in both GRE and VXLAN-GPE

Change-Id: I06d0b773e936fb011408817237059f24a4beb412
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoNETMAP: Some fixes 51/951/6
Mohsin Kazmi [Mon, 2 May 2016 12:04:57 +0000 (14:04 +0200)]
NETMAP: Some fixes

1) Correct the NIOCRXSYNC macro on receive side from NIOCTXSYNC.
2) Flush the pending messages in the tx rings.

Change-Id: I581040d03b1633a3d6fb22fa1fb285bcb7975afb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
8 years agoVPP-42: VPP crashes in IPsec code when running multithreaded 88/988/2
Matthew Smith [Sun, 1 May 2016 19:52:08 +0000 (14:52 -0500)]
VPP-42: VPP crashes in IPsec code when running multithreaded

Change-Id: Ib231642cfead5f5e8e45508361a11c87aad83b51
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
8 years agoHONEYCOMB-10: fix issues with FindClass in multithreaded environments 76/976/6
Marek Gradzki [Tue, 3 May 2016 15:05:27 +0000 (17:05 +0200)]
HONEYCOMB-10: fix issues with FindClass in multithreaded environments

Added jclass reference caching and updated JNI version to 1.8

Change-Id: Ie8dbbd4b91b90bf9e4e9a6148313e46056b0d67e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
8 years agoVPP-12: only remove vpp-related files from /dev/shm 89/989/1
Dave Barach [Wed, 4 May 2016 13:42:07 +0000 (09:42 -0400)]
VPP-12: only remove vpp-related files from /dev/shm

Change-Id: I1b6983a6d23d3d2635814cdd307efa25cd5c8b7b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoENIC driver patch to set PKT_RX_VLAN_PKT only if pkt passed has VLAN tag 81/981/2
John Lo [Tue, 3 May 2016 21:47:48 +0000 (17:47 -0400)]
ENIC driver patch to set PKT_RX_VLAN_PKT only if pkt passed has VLAN tag

Change-Id: I72475bfe50e42886ffa8fb6e58eb8192892fa381
Signed-off-by: John Lo <loj@cisco.com>
8 years agoFix for unattended in Makefile 80/980/3
Ed Warnicke [Tue, 3 May 2016 21:47:50 +0000 (16:47 -0500)]
Fix for unattended in Makefile

Also works around verify

Change-Id: I79ac470ec3fa9943c3a0913ebfaaf91176eb9a81
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoHONEYCOMB-10: Copy context identifier from request to reply 75/975/2
Marek Gradzki [Tue, 3 May 2016 14:34:13 +0000 (16:34 +0200)]
HONEYCOMB-10: Copy context identifier from request to reply

Some of the send_*_details methods did not copy context
identifier from dump request message to details response.
The context identifier is used for request<->reply matching.

Change-Id: I8a744f3817bef94d7fa8ecb7bec6ea942c1a8793
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
8 years agoVPP-15 Add decap-next for nsh-gre tunnel short_help 66/966/3
Hongjun Ni [Mon, 2 May 2016 17:43:44 +0000 (10:43 -0700)]
VPP-15 Add decap-next for nsh-gre tunnel short_help

Change-Id: I1965e9852f62aaf8c1576b72446a43b5878eb452
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoVPP-15 Add ethernet support for nsh-gre's decap-next 67/967/2
Hongjun Ni [Mon, 2 May 2016 17:56:48 +0000 (10:56 -0700)]
VPP-15 Add ethernet support for nsh-gre's decap-next

Change-Id: Icf3424671b4aa0f619983a3eb61785b533fdc11d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoSmall fixes to lisp-gpe header and decap 60/960/3
Florin Coras [Mon, 2 May 2016 16:26:26 +0000 (18:26 +0200)]
Small fixes to lisp-gpe header and decap

- enforce lisp-gpe router mode (set P bit)
- fix selection of ip6 decap node
- fix dual-dual lool error index init

Change-Id: I1a9623c0eb7e81a2cfb60efaa88dc44ee65e664d
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoVPP-31 Fix linker issue with new sr-replicate 46/946/6
Chris Luke [Mon, 2 May 2016 20:00:43 +0000 (16:00 -0400)]
VPP-31 Fix linker issue with new sr-replicate

Changes in gnu ld in Ubuntu 16.04 tickles an issue with the
declaration pattern used for vlib_node_registration when,
as is the case in sr_replicate.c, the forward declaration is
seen by the linker in a module before the real declaration.

This patch uses the "extern" keyword in the forward declaration
to avoid this issue and removes extra forward declarations.

Change-Id: I075b0cd9932404e1360c7f9aec7114003d110f60
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoHONEYCOMB-10: JVpp documentation 86/886/10
Maros Marsalek [Tue, 26 Apr 2016 13:03:26 +0000 (15:03 +0200)]
HONEYCOMB-10: JVpp documentation

Change-Id: Ibca8fc8c1962ca36d91898c1523afb2df6dfdc49
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
8 years agoHONEYCOMB-10: Add specific methods for each request to Future facade 07/907/11
Maros Marsalek [Thu, 28 Apr 2016 07:38:15 +0000 (09:38 +0200)]
HONEYCOMB-10: Add specific methods for each request to Future facade

These specific methods remove the need for casting on client
side code while using generic send method

Change-Id: Ic0240359333831b676a7d205f63ac1c3f3f8af4c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
8 years agoVPP-30 sr_replicate requires DPDK 61/961/2
Keith Burns (alagalah) [Mon, 2 May 2016 20:13:46 +0000 (13:13 -0700)]
VPP-30 sr_replicate requires DPDK

- added fix to disable functionality when no DPDK
- may extend to support non-DPDK case in future.

Change-Id: Ic8ad4eeb91c4866f3f102dd4a718898eb0419dee
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoHONEYCOMB-10: jVpp - the new java API. C code and jar file generation 85/885/16
Marek Gradzki [Tue, 26 Apr 2016 10:09:05 +0000 (12:09 +0200)]
HONEYCOMB-10: jVpp - the new java API. C code and jar file generation

Added comments generation for C and Java files.

Change-Id: Ifb670a5592eb871bfe68804f0a8d8f9b5b14f00a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoRe-do java-8 handling, add unattended switch to toplevel Makefile 59/959/4
Damjan Marion [Mon, 2 May 2016 17:40:27 +0000 (19:40 +0200)]
Re-do java-8 handling, add unattended switch to toplevel Makefile

Change-Id: Ifaea353be5b42bb6edbcfa0506d02b721c00e392
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoBreak out install.sh from build.sh 47/947/4
Ed Warnicke [Mon, 2 May 2016 01:33:53 +0000 (20:33 -0500)]
Break out install.sh from build.sh

This is necessary because we are now using
build.sh for CI... and we shouldn't
install packages on CI boxes.

Change-Id: I68f7880dfc75bbc4aa278ab0765a43e3fb899f3d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoVPP-32 Increase # cpus to 2, leave RAM at 4G for virtualbox vagrant users 44/944/3
Keith Burns (alagalah) [Sun, 1 May 2016 16:12:18 +0000 (09:12 -0700)]
VPP-32 Increase # cpus to 2, leave RAM at 4G for virtualbox vagrant users

Change-Id: Ifb40316db96e019d6c14ff6a6e9653579009d4c3
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoNetmap: typo correct 50/950/2
Mohsin Kazmi [Mon, 25 Apr 2016 14:43:46 +0000 (16:43 +0200)]
Netmap: typo correct

There is  a typo mistake in netmap. This patch corrects it.

Change-Id: Id358e0de74555ac7858c93fa1335f02abd5624b5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
8 years agoVPP-33 Removing javah from Makefile. Merged as fix for Gerrit 884 58/958/1
Keith Burns (alagalah) [Mon, 2 May 2016 17:20:53 +0000 (10:20 -0700)]
VPP-33 Removing javah from Makefile. Merged as fix for Gerrit 884

Change-Id: I2d9d6a607ffa1a8788c1ce79770db8b2b9bae6fb
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoHONEYCOMB-10: jVpp - the new java API. Java code generation 84/884/12
Maros Marsalek [Thu, 28 Apr 2016 10:29:33 +0000 (12:29 +0200)]
HONEYCOMB-10: jVpp - the new java API. Java code generation

The old japi has two main drawbacks:

* it is not fully generated (requres manual coding for
every new api call that returns data other thanstatus code)

* it is not asynchronous from Java perspective (requires
active wait loops - big overhead due to JNI boundary being
crossed lots of times).

The new api is lightweight (fully generated except for connect,
disconenct and ping) and truly asynchronous (uses callbacks,
utilities that offer java.util.concurrent.Future interface
are also provided).

Change-Id: I531080ef651e8a74f19210490c71d161221ab600
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoIP6 SR multicast replicator 12/612/47
Keith Burns (alagalah) [Fri, 25 Mar 2016 16:38:50 +0000 (09:38 -0700)]
IP6 SR multicast replicator

- adds ability to name tunnel
- creates policy as a collection of tunnel names
- map ip6 multicast address to policy and replicate packet
- adds zero memcpy for invariant portion of packet

Change-Id: Icd2fe6a2cf65c09906e82ed1afbb0eae8df79452
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoVPP-26 Iterate through empty command line in cli history 35/935/2
Chris Luke [Fri, 29 Apr 2016 12:53:46 +0000 (08:53 -0400)]
VPP-26 Iterate through empty command line in cli history

When cursoring through the command history in the CLI, when you reach
the end of the history (ie, back at "where you started") most CLI's
typically show a blank line. This is a visual cue that you are back
where you started.

Change-Id: I5733dbd0dcdc6deac6a0a856cfadbdb987456ec0
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoFix use of vni throughout lisp code 40/940/2
Florin Coras [Fri, 29 Apr 2016 13:36:29 +0000 (15:36 +0200)]
Fix use of vni throughout lisp code

This leverages the vni LCAF support introduced in a previous patch.

Change-Id: I0a1b6b9dfc8095d62ad3f4e800b9f2d04c475521
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoRevert ixgbe driver vRX removal of packet type recognition 41/941/1
John Lo [Fri, 29 Apr 2016 18:47:46 +0000 (14:47 -0400)]
Revert ixgbe driver vRX removal of packet type recognition

VPP still needs to use packet type recognition in vRX path of the
ixgbe driver so ip packet can bypass ethernet-input node processing
for better performance. The shortcoming of packet type recognition
in the vRX path does not affect VPP.

Change-Id: Ibc96021c50402a75a8bc4f80125c664714276cef
Signed-off-by: John Lo <loj@cisco.com>
8 years agoAdd indirect next hop support 39/939/2
Damjan Marion [Wed, 13 Apr 2016 07:48:56 +0000 (09:48 +0200)]
Add indirect next hop support

Change-Id: I0626c2650eba7961a15b1e87a664b57bef5503a2
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove unused variable in lisp decap 38/938/1
Florin Coras [Fri, 29 Apr 2016 15:04:50 +0000 (17:04 +0200)]
Remove unused variable in lisp decap

Change-Id: I6aef98252e6134fd2f1a30a8407086ab98285a53
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoVPP-25 Add API for GRE tunnel create/delete/show. 21/921/4
Chris Luke [Thu, 28 Apr 2016 17:44:38 +0000 (13:44 -0400)]
VPP-25 Add API for GRE tunnel create/delete/show.

Add API methods to create, delete and show GRE tunnels.

Also add missing CLI functionality for deleting and listing
configured tunnels.

Change-Id: I7565966037d94ade07938e4ff0d9333419716857
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoFix ip-udp encap checksum for ip6 37/937/2
Florin Coras [Fri, 29 Apr 2016 14:04:33 +0000 (16:04 +0200)]
Fix ip-udp encap checksum for ip6

Thanks to Chris Luke for reporting.

Change-Id: I4f2ac5bb0eb565738755ddb00e8c918134ff67b6
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoFix ip4 address formatting in the show ip fib ouptut 33/933/2
Damjan Marion [Fri, 29 Apr 2016 12:51:57 +0000 (14:51 +0200)]
Fix ip4 address formatting in the show ip fib ouptut

Change-Id: I3ffb2e3cef63cbc9f2abc81bbdedabb34b9b3408
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix use of format_ip46_address in custom_format 34/934/1
Chris Luke [Fri, 29 Apr 2016 13:04:55 +0000 (09:04 -0400)]
Fix use of format_ip46_address in custom_format

format_ip46_address() does not take a 2nd argument indicating the
address family. Harmless since the extra argument is simply not
consumed.

(noticed while adding gre to this module)

Change-Id: I692883872eedb4a8e3c0be7680d03b4b257ba6f9
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoImprove performance of dpdk-vhost driver 23/923/2
Shesha Sreenivasamurthy [Fri, 29 Apr 2016 05:32:42 +0000 (01:32 -0400)]
Improve performance of dpdk-vhost driver

  By setting the flag in used table, guest is
  prevented from kicking the host when it adds
  buffers. This results in 100% performance improvement
  when tested throughput using iperf3.

Change-Id: Iefaf5b97d1444c216bb373998732a437d333d521
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoAdd TX statistics for nsh-gre tunnel 25/925/2
Hongjun Ni [Fri, 29 Apr 2016 00:02:52 +0000 (17:02 -0700)]
Add TX statistics for nsh-gre tunnel

Change-Id: I20e4abcc82c00e43dd441f1882cb6be531b6876e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoAdd RX statistics for nsh-gre tunnel 24/924/2
Hongjun Ni [Thu, 28 Apr 2016 23:50:11 +0000 (16:50 -0700)]
Add RX statistics for nsh-gre tunnel

Change-Id: I045bb9d51c9a82ccba6e792485b9418bd78b8520
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoFix decap-next for ethernet format in nsh-vxlan-gpe 22/922/2
Hongjun Ni [Thu, 28 Apr 2016 22:07:47 +0000 (15:07 -0700)]
Fix decap-next for ethernet format in nsh-vxlan-gpe

Change-Id: I9f5efef4c2b821e4c7d76ed6e2c4f52c2495e512
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoVPP-27 Extend telnet protocol buffer guard 32/932/2
Chris Luke [Fri, 29 Apr 2016 12:14:38 +0000 (08:14 -0400)]
VPP-27 Extend telnet protocol buffer guard

With Telnet protocol overhead, the string "xterm-256color", which is the
norm when the terminal is iTerm on a Mac, is longer than the 16 byte
lookahead overflow guard in the Telnet protocol processor.

This extends it to 24 bytes.

This guard is designed to encourage the protocol processor to quit
waiting for bytes indefinitely if those already in the buffer do not
form a complete message. Whilst this is unlikely, extending the guard
length would mean more bytes need to be received before it gives up.

Change-Id: Ibaa3d35b78bfd298fe0e4f4c6e508440f122e916
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAdd support for LCAF Instance ID 81/881/4
Filip Tehlar [Wed, 20 Apr 2016 15:21:55 +0000 (17:21 +0200)]
Add support for LCAF Instance ID

Change-Id: Ifce3f2bdcba099157a42d0b694f3161b9f700ed2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
8 years agoAdd lisp-gpe ip6 data-plane support 27/927/2
Florin Coras [Mon, 25 Apr 2016 22:17:24 +0000 (00:17 +0200)]
Add lisp-gpe ip6 data-plane support

The implementation mimics that of the ip4 data-plane. Therefore, a new
lgpe-ip6-lookup lookup node is introduced for ip6 source lookups, a
lisp-gpe-ip6-input node for decapsulating ip6 encapsulated packets and
the tx function of the lisp-gpe interface is updated to support any mix
of v4 and v6 in underlay and overlay.

Change-Id: Ib3a6e339b8cd7618a940acf0dd8e61c042fd83dd
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoClean up per-thread mheap setup. 18/918/2
Dave Barach [Thu, 28 Apr 2016 20:24:15 +0000 (16:24 -0400)]
Clean up per-thread mheap setup.

The stats thread was sharing the main mheap when we started at least
one worker or I/O thread, but ran on its own mheap when we started 0
worker + io threads.

Net of this change; if a VLIB_REGISTER_THREAD instance specifies a
per-thread mheap, a per-thread mheap will be provided. Otherwise,
threads share the main heap.

The stats thread now uses the main heap. Simpler is better.

Change-Id: I1fff0dd66ae8f7dfe44923f702734e2832b55b09
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoFix for java8 releated breakage in make install-dep 20/920/2
Ed Warnicke [Thu, 28 Apr 2016 22:23:43 +0000 (18:23 -0400)]
Fix for java8 releated breakage in make install-dep

Change-Id: I17ae3c7031a820746a3785a35b440e17430d0ac5
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoLISP IPv6 control support, create IPv6 header 12/912/2
Andrej Kozemcak [Tue, 26 Apr 2016 06:18:33 +0000 (08:18 +0200)]
LISP IPv6 control support, create IPv6 header

Change-Id: I50d2946df8f5de0142b76f4023d8bd60ee6d2f0d
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
8 years agoVXLAN over IPv6. 74/874/10
Chris Luke [Tue, 26 Apr 2016 14:49:53 +0000 (10:49 -0400)]
VXLAN over IPv6.

Refactors the VXLAN node to work with both IPv4 and IPv6 transports.

There is a discussion thread for this change at
https://lists.fd.io/pipermail/vpp-dev/2016-March/000279.html

Note that this changes the binary configuration API to support both
address families; each address uses the same memory for either address
type and a flag to indicate which is in use. This also includes changes
to the Java API to support both address families.

The CLI and VAT syntax remains unchanged; the code detects whether an
IPv4 or an IPv6 address was given.

Configuration examples:

IPv4 CLI: create vxlan tunnel src 192.168.1.1 dst 192.168.1.2
                vni 10 encap-vrf-id 0 decap-next l2
IPv6 CLI: create vxlan tunnel src 2620:124:9000::1 dst 2620:124:9000::2
                vni 16 encap-vrf-id 0 decap-next l2

IPv4 VAT: vxlan_add_del_tunnel src 192.168.1.1 dst 192.168.1.2
                vni 10 encap-vrf-id 0 decap-next l2
IPv6 VAT: vxlan_add_del_tunnel src 2620:124:9000::1 dst 2620:124:9000::2
                vni 16 encap-vrf-id 0 decap-next l2

TODO: The encap path is not as optimal as it could be.

Change-Id: I87be8bf0501e0c9cd7e401be4542bb599f1b6e47
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoFix bug that prevented packet trace from working on multicore 98/698/3
Bud Grise [Wed, 30 Mar 2016 21:00:24 +0000 (17:00 -0400)]
Fix bug that prevented packet trace from working on multicore

The vlib_node_runtime can change after the thread starts up.

Change-Id: Id5bc248c009ef9be26213b36a0115938b61cb8c4
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoAdd ability to set l2_mode_noprot 14/914/4
Christian Dechamplain (cdechamp) [Tue, 5 Apr 2016 14:40:38 +0000 (10:40 -0400)]
Add ability to set l2_mode_noprot

Change-Id: I3767a1bbe55452600863e145cbc12b114d6d1024
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoVPP-8: Set java-8 for JNI 67/867/9
Marek Gradzki [Tue, 26 Apr 2016 06:01:31 +0000 (08:01 +0200)]
VPP-8: Set java-8 for JNI

Change-Id: Ia81713a72e3c48b1d97bbf3f20a908bbc4ebd3b1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
8 years agoAdd histogram to frame queue tracing 97/697/2
Bud Grise [Wed, 30 Mar 2016 19:54:58 +0000 (15:54 -0400)]
Add histogram to frame queue tracing

Display it via "show frame histogram" CLI.

Change-Id: I436a2125f391af85d1743cf8765e5f27fa0ca809
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoPython API: Fix mistaken removal of '_' in field names. 09/909/2
Ole Troan [Thu, 28 Apr 2016 10:50:20 +0000 (12:50 +0200)]
Python API: Fix mistaken removal of '_' in field names.

Change-Id: I1e39970bc6ded9e6da64385b2289321ba43bebfd
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoTrack number of ethernet vlans in a frame 73/873/8
Chris Luke [Mon, 25 Apr 2016 18:26:55 +0000 (14:26 -0400)]
Track number of ethernet vlans in a frame

Adds flags to the packet buffer to track the number of VLANs in
the current Ethernet frame. We use two bits to signify 0, 1 or
2 VLANs. The value 3 signififies an unknown quantity of VLANs,
which includes "three or more" which is not widely supported.
We place the bits in the vlib_buffer section; that is not the
opaque section, so that all subordinate nodes can use it.

For background, see the discussion thread at
https://lists.fd.io/pipermail/vpp-dev/2016-March/000354.html

The helper macro ethernet_buffer_header_size(buffer) uses
these bits stored in "buffer" to calculate the Ethernet header
size.

The macro ethernet_buffer_set_vlan_count(buffer, count) sets the
appropriate bit values based on the number in "count".

By current frame we are referring to the case where a packet
that arrives from the wire is carrying an encapsulated Ethernet
packet. Once decapsulated that inner packet becomes the current
frame.

There are two places where this value is set; For most Ethernet
frames this will be in the "ethernet-input" node when that node
parses the Ethernet header. The second place is whenever
vnet_update_l2_len() is used to update the layer 2 opaque data.
Typically this function is used by nodes just before they send
a packet into l2-input.

These bits are zeroed in vlib_buffer_init_for_free_list()
meaning that wherever the buffer comes from they have a reasonable
value (eg, if ip4/ip6 generates the packet.)

Primarily this VLAN counter is used by nodes below "ethernet-
input" and "l2-input" to determine where the start of the
current Ethernet header is. There is opaque data set by
"ethernet-input" storing the offset of the current Ethernet
header but, since this is opaque, it's not usable by downstream
nodes. Previously several nodes have made assumptions regarding
the location of the Ethernet header, including that it is always
at the start of the packet buffer (incorrect when we have
encapsulated packets) or that it is exactly
sizeof(ethernet_header_t) away (incorrect when we have VLAN tags.)

One notable case where this functionality is required is in
ip6_neighbor when it generates a response to a received neighbor
soliciation request; it reuses the incoming Ethernet header
in-situ and thus needs to reliably know where that header begins.

Also, at the suggestion of Dave Barach, this patch removes
definition of HGSHM bits in the buffer flags since they are
unused and unlikely to ever be.

Change-Id: I00e4b9ced5ef814a776020c395d1774aba6185b3
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoUpdate Makefile to add debuginfo RPMs for gdb 03/903/2
Thomas F Herbert [Wed, 27 Apr 2016 20:19:03 +0000 (16:19 -0400)]
Update Makefile to add debuginfo RPMs for gdb

Change-Id: I29d8cc839565999e2fabe09d29c40e09aa1ea784
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
8 years agoFix Bug VPP-22 05/905/2
Florin Coras [Wed, 27 Apr 2016 20:59:09 +0000 (22:59 +0200)]
Fix Bug VPP-22

Change-Id: Iaac12e63e4a5ee026276638afd5d5ba3b9503a40
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoIncrease the trace bufffer size 88/888/2
Chris Luke [Tue, 26 Apr 2016 14:55:52 +0000 (10:55 -0400)]
Increase the trace bufffer size

In some cases, the packet header size with IPv6 and a tunnel can
overflow the buffer used for packet tracing. This patch increases
this buffer a little to avoid truncated header information in the
trace.

Change-Id: Ib800e3b908ebe7e80bae4428a94541a803b40b8c
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoENIC driver updates for DPDK 16.04 and 2.2.0 04/904/2
John Lo [Wed, 27 Apr 2016 20:43:44 +0000 (16:43 -0400)]
ENIC driver updates for DPDK 16.04 and 2.2.0

Change-Id: I896925ea2208d318d353d486707b97f295c78426
Signed-off-by: John Lo <loj@cisco.com>
8 years agoRemove historical artifacts from vnet/buffer.h 02/902/2
Dave Barach [Wed, 27 Apr 2016 18:13:25 +0000 (14:13 -0400)]
Remove historical artifacts from vnet/buffer.h

Change-Id: I7f50074a4ed5b62bef4584190eb849d90e90e592
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-18: Creating tap interface through API broken. Fixed and removed duplicate code... 99/899/2
Ole Troan [Wed, 27 Apr 2016 12:15:48 +0000 (14:15 +0200)]
VPP-18: Creating tap interface through API broken. Fixed and removed duplicate code by CLI to create TAPs.

Change-Id: Ib6b30e3dc20ddad7c78d2038955df7af020f0671
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoFix pcap trace capture crash for packets > 512 bytes 00/900/1
John Lo [Wed, 27 Apr 2016 13:56:36 +0000 (09:56 -0400)]
Fix pcap trace capture crash for packets > 512 bytes

Change-Id: I9397ac756290953a14e3adfe5b7c980ecf92bac2
Signed-off-by: John Lo <loj@cisco.com>
8 years agoCLI output pager 72/872/4
Chris Luke [Mon, 25 Apr 2016 17:49:22 +0000 (13:49 -0400)]
CLI output pager

Buffers output from CLI commands as it arrives and allows the terminal to
view this buffer one page at a time.

- View of the buffer is moved with space/enter/up/down/page-up/page-down/
  home/end.
- At the end of the CLI command if less than one page of output was
  generated then the pager is not engaged.
- 'q' to quit the pager, or scroll off the bottom.
- Pager prompt displays the current view aperture line numbers and total
  number of lines buffered.
- Can be disabled at runtime with "no-cli-pager" in the unix configuration.
- The number of lines that will be stored in the buffer is limited to
  prevent excessive memory use; this limit is configurable with
  "cli-pager-buffer-limit" in the unix configuration.
- Both these options can also be set in the console with "set terminal
  pager [on|off] [limit <lines>]".

Limitations:
- Does not yet implement a search function.
- Whilst the terminal size is detected and tracked, changing the terminal
  size when the pager is being used will not cause a redraw of the page.
- Lines that wrap the right most column are not yet handled gracefully.

Change-Id: I69548c1464eff79c53e122668f25758266daf1c2
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAdd "history" CLI command 71/871/3
Chris Luke [Mon, 25 Apr 2016 17:49:15 +0000 (13:49 -0400)]
Add "history" CLI command

- Remove the '?' mechanism that previously only worked on telnet
  connections in favor of a more shell-like "history" command.
  The '?' approach had strange side-effects, like executing what
  was already in the command buffer.

Change-Id: I043086b7f400c66c332a32dbd06ef580ecb18ee8
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAdd a (small) banner to the Debug and Telnet CLI 70/870/3
Chris Luke [Mon, 25 Apr 2016 17:49:07 +0000 (13:49 -0400)]
Add a (small) banner to the Debug and Telnet CLI

    _______    _        _   _____  ___
 __/ __/ _ \  (_)__    | | / / _ \/ _ \
 _/ _// // / / / _ \   | |/ / ___/ ___/
 /_/ /____(_)_/\___/   |___/_/  /_/

- For terminals that look like they support ANSI output the FD.io
  part is colored red.
- This is only shown at the start of a debug CLI or a telnet CLI
  session.
- This banner can be disabled with "cli-no-banner" in the "unix"
  section of the startup config file.

Change-Id: I085b3780dcca3eae546859dbde6c1c34c8258b9f
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoDebug/Telnet CLI enhancements 69/869/3
Chris Luke [Mon, 25 Apr 2016 17:48:54 +0000 (13:48 -0400)]
Debug/Telnet CLI enhancements

A fairly comprehensive re-work of the built-in debug and telnet CLI
to add various command line editing features and to add command history
to the debug CLI.

This may seem like a large change but a good amount of it is merely
reworking the existing CLI code (which changed its indent level).

The features this patch enables include:

- Enable history in the debug CLI.
- Put both stdin and telnet connections in char-by-char mode.
- Echo from the server, not the client, for more control.
- Add a mostly no-op but fairly complete Telnet protocol processor.
- Perform control code parsing on the input byte stream to match strings
  of both control codes and ANSI/VT100 escape sequences.
- Up/down keys scroll through the history (like ^P/^N).
- Do CRLF output cooking (\n -> \r\n) for connections that need it.
- Left/right cursor movements, insert/erase at cursor.
- Home/end cursor jumps.
- Jump left/right word at a time (Ctrl-left/right).
- Negotiate the terminal type from Telnet clients. (well, the code doesn’t
  really negotiate, it demands it, but the client is led to believe it
  was a negotiation)
- Read terminal type from TERM variable for the local debug CLI.
- Delete from cursor to end of line (^K). Delete char-right (^D/Del).
- Clear screen (^L) and repaint prompt/current command (on non-ANSI
  terminals it just newlines and repaints the line).

Change-Id: Id274b56ccfd4cc8c19ddc0f478890f21f284262a
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoHONEYCOMB-10: Add missing context parameter to *details structs 33/833/11
Maros Marsalek [Fri, 22 Apr 2016 07:25:12 +0000 (09:25 +0200)]
HONEYCOMB-10: Add missing context parameter to *details structs

Some of the *details structures defined in vpe.api did
not have the context parameter that is used for request<->reply
matching. Without the context, it is difficult for upper
layers (users of vpp binary apis) to identify which reply
or details message belongs to which request

Tested manually using vat

Change-Id: I5fda54a891b68349f80c87fae06009791a028147
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
8 years agoLive VM migration support for vhost-user 09/609/4
Shesha Sreenivasamurthy [Mon, 18 Apr 2016 20:38:20 +0000 (16:38 -0400)]
Live VM migration support for vhost-user

Change-Id: I79bef6dc94b3ad688564a409d14d63ca3125a305
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoMake automake silent rules default 89/889/2
Damjan Marion [Tue, 26 Apr 2016 16:19:47 +0000 (18:19 +0200)]
Make automake silent rules default

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