vpp.git
7 years agoAdd LISP RTR support 11/1211/2
Filip Tehlar [Thu, 19 May 2016 12:25:44 +0000 (14:25 +0200)]
Add LISP RTR support

Change-Id: I8a3770f8f1cd1fde6765b81d35aacaaf4ff98b82
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoChanged JVPP interface for construction and connectivity 93/1093/6
Tibor Sirovatka [Fri, 13 May 2016 08:17:51 +0000 (10:17 +0200)]
Changed JVPP interface for construction and connectivity

Simplified construction, autoconnected; possible connect/close
See updated sample test cases with changed interface usage

Change-Id: Ib53e855880bc414868aa2b9bb8f5df086917e375
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
8 years agoAdd per-thread, per-node runtime stats serialization 02/1102/6
Dave Barach [Fri, 13 May 2016 16:55:01 +0000 (12:55 -0400)]
Add per-thread, per-node runtime stats serialization

Change-Id: Ic4009cdbac67b7cd53c88079439496b9d9dfaa35
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-80: netmap binary API message element name collision 18/1218/1
Dave Barach [Fri, 20 May 2016 18:43:57 +0000 (14:43 -0400)]
VPP-80: netmap binary API message element name collision

if_name collides w/ ietf-interfaces.yang member name, causing a build-break
in an existing yang-model-based app. Rename to "netmap_if_name".

Change-Id: Id386eacd77343dd15a868c28dacd2b0e4523bc9b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-79: fix cross-compilation build break 16/1216/2
Dave Barach [Fri, 20 May 2016 16:56:41 +0000 (12:56 -0400)]
VPP-79: fix cross-compilation build break

.../packages/dpdk.mk must not set $(TARGET). The Makefile fragment
really only needed to use a temporary variable to control the
dpdk Makefile. Simple fix: set $(DPDK_PLATFORM_TARGET) instead.

Change-Id: Ieb61b603bc36ed708a1b1237dc6bc503e90a0b7b
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-77 Creating VXLAN over IPv6 via API fails 15/1215/1
Chris Luke [Fri, 20 May 2016 16:13:02 +0000 (12:13 -0400)]
VPP-77 Creating VXLAN over IPv6 via API fails

Tunnel dst is incorrectly being set to the requested src address.

Change-Id: I44e2ee475f0572e78d148951c5d4684e85e08ce7
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoAdd policer dump API 90/1190/2
Matus Fabian [Thu, 19 May 2016 06:40:37 +0000 (23:40 -0700)]
Add policer dump API

JIRA: VPP-67

Change-Id: I8fced60a884f1585b1f51002832d47631eea9571
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoVPP-74 Fix signedness issue when terminal resizes 04/1204/1
Chris Luke [Thu, 19 May 2016 18:23:25 +0000 (14:23 -0400)]
VPP-74 Fix signedness issue when terminal resizes

When re-locating our current viewport into the pager buffer we need to
verify that the new viewport is within the boundaries of the index.
This condition is considered very rare, but nontheless the check is needed.

Unfortunately I assumed the variable was signed; it is not, and the
subtraction can in some cases cause the value to be negative. This is
therefore a bonafide semantic error that may cause problems.

This patch reworks the logic to avoid having to change it to be signed.

Change-Id: I26f0747d38dcc43dd9c092d50f2489b122009e7b
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoRemove unused PCI code 03/1203/2
Damjan Marion [Thu, 19 May 2016 17:19:41 +0000 (19:19 +0200)]
Remove unused PCI code

Change-Id: I1d91c9982823758059f9d6aa699982253930e7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd support for multiple microarchitectures in single binary 75/1075/6
Damjan Marion [Wed, 11 May 2016 21:07:18 +0000 (23:07 +0200)]
Add support for multiple microarchitectures in single binary

 * compiler -march= parameter is changed from native to corei7
   so code is always genereted with instructions which are available
   on the Nehalem microarchitecture (up to SSE4.2)

 * compiler -mtune= parameter is added so code is optimized for
   corei7-avx which equals to Sandy Bridge microarchitecture

 * set of macros is added which allows run-time detection of available
   cpu instructions (e.g. clib_cpu_supports_avx())

 * set of macros is added which allows us to clone graph node funcitons
   where cloned function is optmized for different microarchitecture
   Those macros are using following attributes:
     __attribute__((flatten))
     __attribute__((target("arch=core-avx2)))

   I.e. If applied to foo_node_fn() macro will generate cloned
   functions foo_node_fn_avx2() and foo_node_fn_avx512() (future)
   It will also generate function void * foo_node_fn_multiarch_select()
   which detects available instruction set and returns pointer to the
   best matching function clone.

Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd netmap API 66/1066/5
Matus Fabian [Wed, 11 May 2016 11:49:46 +0000 (04:49 -0700)]
Add netmap API

JIRA: VPP-66

Change-Id: I421529fa8eafe5268745a34a4fcd40156defcdf8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoRework of the old PCI code 78/1178/2
Damjan Marion [Thu, 12 May 2016 20:11:03 +0000 (22:11 +0200)]
Rework of the old PCI code

 * adds support for VPP native PCI drivers using
   standard uio_pci_generic kernel driver
 * adds generic PCI interrupt callback
 * splits code to generic PCI handling and linux specific
 * adds new debug cli 'show pci [all]'

Change-Id: I447c2285e319e9725d70688c1b70c9dedda51fdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoSet java artifact versions to 16.09 for master 75/1175/2
Ed Warnicke [Tue, 17 May 2016 15:54:10 +0000 (10:54 -0500)]
Set java artifact versions to 16.09 for master

The nature of Java artifact versioning is different
that rpm/apt versioning in that artifacts are
traditionally numbered:

${NEXT_RELEASE_NUMBER)-SNAPSHOT

This patch sets ${NEXT_RELEASE_NUMBER) correctly for master.

Change-Id: Iab34c26c7440d5e04d6d05f46598832e9adf6920
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agodpdk/Makefile - Allow dpdk target to be set according to the platform 17/1117/3
Christophe Fontaine [Wed, 11 May 2016 08:40:33 +0000 (08:40 +0000)]
dpdk/Makefile - Allow dpdk target to be set according to the platform

Allows DPDK parameters to be overriden from the platform
definition.

$(PLATFORM)_dpdk_arch = "armv7a"
$(PLATFORM)_dpdk_target = "arm-armv7a-linuxapp-gcc"
$(PLATFORM)_dpdk_make_extra_args = "CONFIG_RTE_EAL_IGB_UIO=y"

Change-Id: I8c0f233942744cb82ca3ed2d65e33acee845cb4e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
8 years agodpdk/build - 32bits compilation 18/1118/3
Christophe Fontaine [Wed, 11 May 2016 08:36:24 +0000 (08:36 +0000)]
dpdk/build - 32bits compilation

In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of
merging them into 1 u64.

Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
8 years agodpdk/init - Add compatibility to non numa architecture 16/1116/3
Christophe Fontaine [Fri, 13 May 2016 07:14:08 +0000 (07:14 +0000)]
dpdk/init - Add compatibility to non numa architecture

On non numa aware platforms, the path "/sys/devices/system/node/node%u"
does not exist: the "free_hugepages" count is available in "/sys/kernel/mm/".

Change-Id: Id62018a2bd0937d267663699c620e89d02c26a72
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
8 years agoFix output feature issue where opque field is already used by previous node 69/1169/2
Damjan Marion [Tue, 17 May 2016 10:02:07 +0000 (12:02 +0200)]
Fix output feature issue where opque field is already used by previous node

Change-Id: I1470993668fa8c740229149bbb227bd1e410d5ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agovppinfra - ARM: cycle count 64bits register is only available on ARMv8 15/1115/2
Christophe Fontaine [Fri, 13 May 2016 07:07:28 +0000 (07:07 +0000)]
vppinfra - ARM: cycle count 64bits register is only available on ARMv8

Change-Id: I7d622e591020a482af68667f4d1ed2056258d2c8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
8 years agoVPP-23 Re-work pager line collation 54/1154/6
Chris Luke [Sat, 14 May 2016 14:13:34 +0000 (10:13 -0400)]
VPP-23 Re-work pager line collation

To better handle lines longer than the terminal width, re-work how
the pager collates lines. We still store each output line in a vector
or lines; additionally we index the start and end of displayable lines.

The index then becomes the data to work out what to display.

If the terminal is resized this index is rebuilt and the current page
redisplayed and an attempt made to keep the current top-of-screen line
in place.

Change-Id: Icc6f4f72dabad89682cd82be88adb03eadb7811d
Signed-off-by: Chris Luke <chrisy@flirble.org>
8 years agoVPP-61 Patch2/2 Removing NSH from VPP for move to NSH_SFC 52/1152/3
Keith Burns (alagalah) [Mon, 16 May 2016 16:53:13 +0000 (09:53 -0700)]
VPP-61 Patch2/2 Removing NSH from VPP for move to NSH_SFC

Change-Id: I76359b621b2edc599cf2e9ee845d97293a5d46f7
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoVPP-61 Patch1/2 - Remove NSH from VPP 48/1148/8
Keith Burns (alagalah) [Mon, 16 May 2016 14:47:14 +0000 (07:47 -0700)]
VPP-61 Patch1/2 - Remove NSH from VPP

- Had issues with original patch and CSIT, breaking into
-- Makefile and API changes
-- Follow up patch removing NSH directory

Change-Id: I6c2f49a74d59b97ce4ea43799cc6f01f5cb1d5a2
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoVPP-58: Fix build on AMD Opteron 49/1149/1
Damjan Marion [Mon, 16 May 2016 14:52:55 +0000 (16:52 +0200)]
VPP-58: Fix build on AMD Opteron

Change-Id: Ib3e10fd4c27dde4f90b8d156f0c8547787ad46e2
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd build number to VPP version if BUILD_NUMBER var is set 45/1145/3
Damjan Marion [Mon, 16 May 2016 13:55:36 +0000 (15:55 +0200)]
Add build number to VPP version if BUILD_NUMBER var is set

Change-Id: I73ecc12224fdfb08b7aa6118761b368577ce33d5
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd configure policer API 99/1099/3
Matus Fabian [Fri, 13 May 2016 12:44:48 +0000 (05:44 -0700)]
Add configure policer API

JIRA: VPP-67

Change-Id: I04560d78e2eb131cd6cc31472b70b3d3e8fdd79a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 years agoVPP-68: L2 Rewrite: Support for chained classify tables 91/1091/3
Pierre Pfister [Fri, 13 May 2016 06:47:06 +0000 (07:47 +0100)]
VPP-68: L2 Rewrite: Support for chained classify tables

The classifying capabilities are pretty limited if only a single table can be used.
This patch adds support for chained classify tables to L2 Rewrite feature.

Change-Id: Ib678fe2028f17b441adb75d85bf3e31185e42c59
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoVPP-69: Create fib or bridge domain with arbitrary ID 55/1055/3
Pierre Pfister [Tue, 10 May 2016 16:11:22 +0000 (17:11 +0100)]
VPP-69: Create fib or bridge domain with arbitrary ID

It appeared to me that it might be usefull
to allow users to create fibs or bridge domains without
a complete knowledge of the current used IDs.

These changes define fib and bridge domain constructors
when the provided ID is ~0. In such a case, an unused ID is
used to create a new fib or bridge domain.

Change-Id: Iaba69a023296e6d17bdde45980f9db84832a3995
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
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>