vpp.git
6 years agoVPP PAPI: Error in unserializer for non-array compound types. 49/9149/3
Ole Troan [Tue, 31 Oct 2017 13:50:13 +0000 (14:50 +0100)]
VPP PAPI: Error in unserializer for non-array compound types.

A bug in the decoder of messages when there was a non-array compound type.
The typical result was an error message from the struct library:
 "error:unpack_from requires a buffer of at least 4 bytes"

Change-Id: Ie30fec6fc39b9f4177b54fa4adc4fc69674f0e12
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoUpdate CSIT tests 171017 -> 171030 55/9155/2
Jan Gelety [Tue, 31 Oct 2017 15:07:44 +0000 (16:07 +0100)]
Update CSIT tests 171017 -> 171030

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

Change-Id: I818bb7f1778cd92716feeaeb9fc1af59c62bdbc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agoLISP: add P-ITR/P-ETR/xTR API handlers, ONE-24 94/8994/4
Filip Tehlar [Mon, 16 Oct 2017 12:48:23 +0000 (05:48 -0700)]
LISP: add P-ITR/P-ETR/xTR API handlers, ONE-24

Change-Id: I25937cd7470c826d1e833e65530ae959c39139d8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agol2fib: MAC: Fix uint64 to u8 byte array 90/9090/7
Mohsin Kazmi [Fri, 27 Oct 2017 19:28:07 +0000 (21:28 +0200)]
l2fib: MAC: Fix uint64 to u8 byte array

As per proposal on the mailing list, this patch fixes
the represntation of MAC address in VPP API calls for
   ·  L2fib_add_del
   ·  L2_fib_table_details

Change-Id: I31e17efd1a6314cded69666e693cb8fc33158d02
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoFix typo (double unlock) 40/9140/1
Dave Barach [Tue, 31 Oct 2017 12:45:52 +0000 (08:45 -0400)]
Fix typo (double unlock)

Change-Id: If4a128186a732266eb27b6aa3caf6f1feff449bf
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agophysmem: register region with IOMMU 27/9127/3
Damjan Marion [Mon, 30 Oct 2017 21:38:47 +0000 (22:38 +0100)]
physmem: register region with IOMMU

VFIO file descriptor is extracted in a hackish way, as DPDK doesn't
provide imethod to retrieve it.

This fixes issue with DPDK drivers not working correctly when IOMMU is
enabled and external buffer memory is used.

Change-Id: I5eaa8e78741c50504d87d44e706b5997c8189554
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoRefactor IP input checks for re-use at MPLS disposition 49/8949/4
Neale Ranns [Sat, 21 Oct 2017 16:37:55 +0000 (09:37 -0700)]
Refactor IP input checks for re-use at MPLS disposition

Change-Id: I7aafdecd6f370411138e6ab67b2ff72cda6e0666
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agolb plugin tests - wipe flowtable after each unit test 67/9067/5
Gabriel Ganne [Mon, 30 Oct 2017 14:44:31 +0000 (15:44 +0100)]
lb plugin tests - wipe flowtable after each unit test

Add new cli api: "test lb flowtable flush" which flushes everything.
Call this new cli function after the end of each lb unit test.

Change-Id: I71d04a7bfba398f7d4dd9cc3ed24bba786943663
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoMinor copyedit fixes to ACL Hash doc. 25/9125/1
Jon Loeliger [Mon, 30 Oct 2017 20:04:26 +0000 (15:04 -0500)]
Minor copyedit fixes to ACL Hash doc.

Change-Id: I7fe34e99f566dd2e0a36a9ba38f894973989ca8a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoAdd the bihash_vec8_8 variant 09/9109/2
Dave Barach [Mon, 30 Oct 2017 13:42:54 +0000 (09:42 -0400)]
Add the bihash_vec8_8 variant

This is an all-purpose octet-vector memory hash, intended as a
thread-safe replacement for hash_create_mem / hash_create_string.  All
u8 * key vectors are memorized by the hash table.

Change-Id: I22944daea8fda07dde8ba118a6529a6d382491f9
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoRemove old Python vppctl script 16/9116/2
Chris Luke [Mon, 30 Oct 2017 14:17:50 +0000 (10:17 -0400)]
Remove old Python vppctl script

- The binary API method for executing commands was superceded
  by the unix-socket CLI approach used by the C vppctl utility.
  The API call it makes will soon be deprecated.
- This Python vppctl script was still being copied to the install
  directory, and then later overwritten by the binary vppctl.

Change-Id: I0a4b09b7c733049d0545b4c83b9ac5ac499a7300
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agoLISP: improve updating the dataplne when locators change 79/9079/7
Filip Tehlar [Fri, 27 Oct 2017 06:57:09 +0000 (23:57 -0700)]
LISP: improve updating the dataplne when locators change

Change-Id: Ifc0296834e25ddbdd0ad8283c061f309801b053c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agojvpp: bugfix for deadlock in java future API (VPP-1037) 57/8957/9
Matej [Mon, 23 Oct 2017 10:55:11 +0000 (12:55 +0200)]
jvpp: bugfix for deadlock in java future API (VPP-1037)

- message sending method inside synchronization blocks causes
deadlock between sending and receiving part
- breaking atomicity of sending message and putting future with
corresponding id to map needs additional handling by writer and receiver,
regardless which part get access to sync block first will create
new future and second one will complete it and remove from map,
in case of dump calls where control ping reply is required
as confirmation that all information were send, if ping reply is
received before writer put future in map, reader will create
regular control ping future instead and writer needs to made association
between these two futures

Change-Id: Id29a19be7a5319291a5e07cf931080610178f00c
Signed-off-by: Matej <matej.perina@pantheon.tech>
6 years agolibmemif: perf optimization 98/9098/2
Jakub Grajciar [Mon, 30 Oct 2017 09:34:54 +0000 (10:34 +0100)]
libmemif: perf optimization

Change-Id: Ie3bd75e0e98c7ecb4c66dba701131363e5ec89a2
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agovcl: fix compiling on newer systems 93/9093/4
Damjan Marion [Sun, 29 Oct 2017 18:28:31 +0000 (19:28 +0100)]
vcl: fix compiling on newer systems

Build fails on ubuntu 17.10...

Change-Id: I98dfffa3f8f5f9bca2ba97a856709714fbeec49c
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodevices: Add binary API for set interface <interface> rx-mode 94/9094/1
Steven [Mon, 30 Oct 2017 05:10:46 +0000 (22:10 -0700)]
devices: Add binary API for set interface <interface> rx-mode

Also add vat test code to test the subject API. The format is

sw_interface_set_rx_mode sw_if_index <index> [queue <id>]
<polling|nterrupt|adaptive>

Change-Id: Ib810d85d430077865bead8cc08a070f8ae478225
Signed-off-by: Steven <sluong@cisco.com>
6 years agosession: fix coverity warnings 92/9092/1
Florin Coras [Sun, 29 Oct 2017 17:56:15 +0000 (10:56 -0700)]
session: fix coverity warnings

Change-Id: Ib87eccb853cafceea5f5513f6bb51c2364449afa
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: rules tables 65/8865/21
Florin Coras [Tue, 17 Oct 2017 07:03:13 +0000 (00:03 -0700)]
session: rules tables

This introduces 5-tuple lookup tables that may be used to implement
custom session layer actions at connection establishment time (session
layer perspective).

The rules table build mask-match-action lookup trees that for a given
5-tuple key return the action for the first longest match. If rules
overlap, ordering is established by tuple longest match with the
following descending priority: remote ip, local ip, remote port, local
port.

At this time, the only match action supported is to forward packets to
the application identified by the action.

Change-Id: Icbade6fac720fa3979820d50cd7d6137f8b635c3
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFix for vppctl and interactive commands (VPP-1038) 62/9062/2
Chris Luke [Thu, 26 Oct 2017 14:44:43 +0000 (10:44 -0400)]
Fix for vppctl and interactive commands (VPP-1038)

- Interactive commands like "ping" read extra input from the
  input stream.
- In the case of "ping" it is simply a signal to cease the current
  operation.
- "vppctl", in non-interactive mode, will issue a "quit" immediately
  after the requested command to queue up closing of the session.
- This resulted in "ping" thinking a keypress was seen and returning
  control to the CLI; the "quit" command however is consumed by the
  keypress event handler and thus the session does not close.

- This patch reworks vppctl slightly to only issue "quit" after the
  command has completed. In particular it uses the fact that VPP issues
  NUL bytes as a surrogate prompt between output of commands to signal
  acknowledgement that the command has completed; vppctl now flags
  that the quit should be issued after the next such acknowledgement.
- Since input it still accepted, the user can still terminate the
  "ping" early, if desired.

Change-Id: I7e3dbe767f32f8e364ccb5f81799759b311585df
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agoVCL-LDPRELOAD: Fix CID 178271 87/9087/3
Dave Wallace [Fri, 27 Oct 2017 17:42:05 +0000 (13:42 -0400)]
VCL-LDPRELOAD: Fix CID 178271

- Pointer to local outside scope

Change-Id: I84a7958e10dbc9369ffa5172cbad5dbade9b2bc9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: instantiate appns lookup table only once 70/9070/2
Florin Coras [Thu, 26 Oct 2017 21:25:12 +0000 (14:25 -0700)]
session: instantiate appns lookup table only once

Change-Id: I39d634b7691a524e5221c28997a737102298c281
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoLDPRELOAD: Fix out-of-scope variable coverity error 86/9086/2
Steven [Fri, 27 Oct 2017 16:34:57 +0000 (09:34 -0700)]
LDPRELOAD: Fix out-of-scope variable coverity error

>>>    CID 178271:  Memory - illegal accesses  (RETURN_LOCAL)
>>>    Using "ep", which points to an out-of-scope variable "_ep".

Change-Id: Icf21e602bc2718bfedd9480e9da41aff8693048e
Signed-off-by: Steven <sluong@cisco.com>
6 years agoacl-plugin: increase the amount of memory for classifier tables used by MACIP ACLs 85/9085/1
Andrew Yourtchenko [Fri, 27 Oct 2017 15:03:34 +0000 (15:03 +0000)]
acl-plugin: increase the amount of memory for classifier tables used by MACIP ACLs

The classifier tables upper bound of memory was just big enough
to cause the unittests pass most of the time but not always.
Increase the amount of space and run several hundred iterations
of unittests to ensure they always pass.

Change-Id: Ieb7876c6ebdde1f8c5273dbb9b090f12f2c38915
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoVCL: refactor session close / disconnect. 33/9033/2
Dave Wallace [Thu, 26 Oct 2017 06:51:07 +0000 (02:51 -0400)]
VCL: refactor session close / disconnect.

Change-Id: Ib0797faaa3f21c7577330bb8d0e801d43e01110e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: Fix more coverity warnings 69/9069/2
Dave Wallace [Thu, 26 Oct 2017 20:12:04 +0000 (16:12 -0400)]
VCL-LDPRELOAD: Fix more coverity warnings

vcom.c:
  CID 178227: Logically dead code in vcom.c

vcom_socket.c:
  CID 178254: Dereference after null check
  CID 178250: Out-of-bounds access

vppcom.c:
  CID 178252: Unused value
  Suppress vppcom_session_attr() debug output.

Change-Id: I1d47bafb84fc0ad00c642392ae3cb6761fd3fb17
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: Fix CID 178251 & CID 178253 68/9068/3
Dave Wallace [Thu, 26 Oct 2017 18:47:06 +0000 (14:47 -0400)]
VCL-LDPRELOAD: Fix CID 178251 & CID 178253

- CID 178251 Dereference after null check in vcom_socket.c
- CID 178253 Logically dead code in vppcom.c

Change-Id: I2a24cd53727fec76cf1a6d60f90414ff92567818
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoConsolidate short_help for classify table with memory-size 06/9006/3
Hongjun Ni [Wed, 25 Oct 2017 12:47:56 +0000 (20:47 +0800)]
Consolidate short_help for classify table with memory-size

When creating 32K classify sessions, VPP crashes.
Default heap size is 2MB.
Need to configure it when requiring large number sessions.

Change-Id: I16678ee4a9e0ba61cbd2d3b38c43d10c59325968
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoNAT: delete session API/CLI (VPP-1041) 50/9050/2
Matus Fabian [Thu, 26 Oct 2017 10:37:38 +0000 (03:37 -0700)]
NAT: delete session API/CLI (VPP-1041)

Administratively delete NAT44 session for specific inside/outside addresses and port pair.

Change-Id: If5ab500ac3592c7153d6d8f2cc0297df7309fbc3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoacl-plugin: refactor the "show acl-plugin" CLI, use vlib_cli_output() vs. format() 61/9061/2
Andrew Yourtchenko [Thu, 26 Oct 2017 14:26:18 +0000 (14:26 +0000)]
acl-plugin: refactor the "show acl-plugin" CLI, use vlib_cli_output() vs. format()

The vppctl was getting upset with large chunks of info generated
by repeated format() functions, so convert to use vlib_cli_output instead.
Also, refactor the show functionality into smaller functions,
separate from the input handling.

Change-Id: I5d0db5ac45ce4c1b59cd41526b837412e06b1ce0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agosession: swap appns secret to host byte order 64/9064/2
Florin Coras [Thu, 26 Oct 2017 15:16:59 +0000 (08:16 -0700)]
session: swap appns secret to host byte order

Change-Id: I355433e0f07b328c441ed642705b31ca5157fabe
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agofib test - fix undefined behavior warning found by clang 43/9043/2
Gabriel Ganne [Thu, 26 Oct 2017 08:35:28 +0000 (10:35 +0200)]
fib test - fix undefined behavior warning found by clang

warning: passing an object that undergoes default argument promotion
to 'va_start' has undefined behavior [-Wvarargs]

Change-Id: Ic9cfd61e38983bd67f30bf92f605e6c87d103ca5
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years ago17.10 Release Notes 34/9034/2
Florin Coras [Mon, 23 Oct 2017 07:04:53 +0000 (00:04 -0700)]
17.10 Release Notes

Change-Id: I0c2a8412c9946e4d18b37db907735ac0b2ea2f6e
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL: add session namespace support. 35/9035/2
Dave Wallace [Thu, 26 Oct 2017 07:29:30 +0000 (03:29 -0400)]
VCL: add session namespace support.

Change-Id: I04f1b63e66260d99c0dd180b0295a55a9b750df7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAllow IPsec interface to have SAs reset 94/8794/5
Matthew Smith [Thu, 12 Oct 2017 17:06:59 +0000 (12:06 -0500)]
Allow IPsec interface to have SAs reset

Make it easier to integrate with external IKE daemon.
IPsec interfaces can have one or both SAs replaced after
creation. This allows for the possibility of setting a
new child SA on an interface when rekeying occurs. It also
allows for the possibility of creating an interface ahead
of time and updating the SA when parameters that are
negotiated during IKE exchange become known.

Change-Id: I0a31afdcc2bdff7098a924a51abbc58bdab2bd08
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoopensuse support: reworked SUSE DEPS variables 96/8996/2
Marco Varlese [Tue, 24 Oct 2017 15:02:04 +0000 (17:02 +0200)]
opensuse support: reworked SUSE DEPS variables

Change-Id: I782541719db59daf02f0a7bd2842384dfe42c32a
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoVCL: Return data for recvfrom(MSG_PEEK) 27/9027/4
Steven [Wed, 25 Oct 2017 19:33:12 +0000 (12:33 -0700)]
VCL: Return data for recvfrom(MSG_PEEK)

Implement recvfrom(MSG_PEEK) by returning data in the provided buffer
without moving the read pointer

Change-Id: Idc1b22632d78e8a499cce7d48c15e8bab0b0bf88
Signed-off-by: Steven <sluong@cisco.com>
6 years agolldp: protection code to check a valid interface index 26/9026/2
Steve Shin [Wed, 25 Oct 2017 18:16:45 +0000 (11:16 -0700)]
lldp: protection code to check a valid interface index

When lldp interface is set, it's better to check valid interface index.

Change-Id: I0db0ab6483ad73d28c69893576aa9b719c3b087c
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agoVCL-LDPRELOAD: statically link VPP objects into libvcl_ldpreload.so 23/9023/2
Dave Wallace [Wed, 25 Oct 2017 16:30:37 +0000 (12:30 -0400)]
VCL-LDPRELOAD: statically link VPP objects into libvcl_ldpreload.so

Change-Id: If8fb5484b64a5b1c04e34573490fedcf63feabc9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: Fix vcl test scripts to check vcl.am instead of uri.am 02/9002/2
Dave Wallace [Tue, 24 Oct 2017 19:39:44 +0000 (15:39 -0400)]
VCL: Fix vcl test scripts to check vcl.am instead of uri.am

Change-Id: I34ab79ddf0a612be1f2a4223e46811516e5b317e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agovlib: add support for multiple buffer pools 82/8782/6
Damjan Marion [Thu, 12 Oct 2017 11:09:26 +0000 (13:09 +0200)]
vlib: add support for multiple buffer pools

Change-Id: Icaf7d7ad47284aea7a56e8006b69f45874d64202
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoDo not include x86intrin.h if unavailable 52/8952/2
Gabriel Ganne [Mon, 23 Oct 2017 06:54:50 +0000 (08:54 +0200)]
Do not include x86intrin.h if unavailable

This fixes compilations on arm platforms.

The call to the function itself was protected, and used clib_xxhash instead.
Only the header protection was missing.

Change-Id: I9fac252a5732e1a9808cf7de93fa3d5f07bcebe6
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoVPP-1033: Python API support arbitrary sized input parameters. 36/8936/6
Ole Troan [Fri, 20 Oct 2017 11:28:20 +0000 (13:28 +0200)]
VPP-1033: Python API support arbitrary sized input parameters.

Dynamically calculate the required buffer size to pack into based on
message definition. Also add input parameter length checking.

Change-Id: I7633bec596e4833bb328fbf63a65b866c7985de5
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoL3 proxy FIB source for container networking 67/8967/3
Andrew Yourtchenko [Wed, 25 Oct 2017 12:50:37 +0000 (05:50 -0700)]
L3 proxy FIB source for container networking

Change-Id: I4164c4c19c8dbfd73e6ddf94a12056325cc093b9
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoOne armed NAT (VPP-1035) 88/8988/2
Matus Fabian [Tue, 24 Oct 2017 11:13:49 +0000 (04:13 -0700)]
One armed NAT (VPP-1035)

Use a single physical interface in order to accomplish NAT44/NAT64.

Change-Id: I0c8138953a7a4075df306172e125abad771315e4
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoVCL/LDPRELOAD: Add support for getsockopt, sendto, and recvfrom 04/9004/3
Steven [Tue, 24 Oct 2017 23:03:58 +0000 (16:03 -0700)]
VCL/LDPRELOAD: Add support for getsockopt, sendto, and recvfrom

Add support for getsockopt, sendto, and recvfrom. Not all options
for the system calls are supported yet. Only the options used by
curl and wget are supported for now.

Change-Id: I2e0ed7349a0273616b3831c201e7c117725ca287
Signed-off-by: Steven <sluong@cisco.com>
6 years agoVCL-LDPRELOAD: Fix coverity warnings. 05/9005/1
Dave Wallace [Wed, 25 Oct 2017 00:47:45 +0000 (20:47 -0400)]
VCL-LDPRELOAD: Fix coverity warnings.

- CID 178225: Constant expression result
- CID 178220: Logically dead code
- CID 178222: Logically dead code
- CID 178227: Logically dead code
- CID 178223: Same on both sides
- CID 178226: Same on both sides

Change-Id: Ie0c80edb41390cf2308e54938be85d865e292138
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.so 79/8979/7
Dave Wallace [Tue, 24 Oct 2017 08:12:18 +0000 (04:12 -0400)]
VCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.so

- Move VCL & VCL-LDPRELOAD source into src/vcl
- Statically link vppcom into libvcl-ldpreload.so

Change-Id: I778300b37e8b06640d9dbc01caf297edf7a6edb7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoUpdate L2 header offset after VLAN tag rewrite 93/8993/2
Neale Ranns [Tue, 24 Oct 2017 14:55:53 +0000 (07:55 -0700)]
Update L2 header offset after VLAN tag rewrite

Change-Id: I5c1df59bce7c9654101672a12981e5bd62e9adc4
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agofix test_lb_ip4_gre6() cleanup 92/8992/1
Gabriel Ganne [Tue, 24 Oct 2017 13:18:57 +0000 (15:18 +0200)]
fix test_lb_ip4_gre6() cleanup

missing "del" keyword, and as a result, we were trying to add the as
twice.

Change-Id: If78ce03f0c71591c05ff6f4748fd9c929d0f861f
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoAdd extern to *_main global variable declarations in header files. 72/8972/1
Dave Wallace [Tue, 24 Oct 2017 05:32:41 +0000 (01:32 -0400)]
Add extern to *_main global variable declarations in header files.

- Global variables declared in header files without
  the use of the 'extern' keword will result in multiple
  instances of the variable to be created by the compiler
  -- one for each different source file in which the
  the header file is included.  This results in wasted
  memory allocated in the BSS segments as well as
  potentially introducing bugs in the application.

Change-Id: I6ef1790b60a0bd9dd3994f8510723decf258b0cc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoaf_packet: invalid TCP/UDP offload checksum on RX node recalculation 38/8938/4
Jakub Grajciar [Fri, 20 Oct 2017 11:37:28 +0000 (13:37 +0200)]
af_packet: invalid TCP/UDP offload checksum on RX node recalculation

Change-Id: I1075e5d2a1b6dfe3a443b40b41b8458a30505680
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
Signed-off-by: Jakub.Grajciar@pantheon.tech <Jakub.Grajciar@pantheon.tech>
6 years agoVXLAN:small refactor to vxlan input 17/8917/6
Eyal Bari [Thu, 19 Oct 2017 12:27:51 +0000 (15:27 +0300)]
VXLAN:small refactor to vxlan input

Change-Id: I2e7e08e1de20ab57e3f899b080b90a3082219ae5
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agotest bfd - DPO_PROTO_IP6 is part of DpoProto 21/8921/2
Gabriel Ganne [Thu, 19 Oct 2017 07:54:46 +0000 (09:54 +0200)]
test bfd - DPO_PROTO_IP6 is part of DpoProto

Change-Id: I63d336a1ba366a60a2a8f1124e3f37f742cccb65
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoThread_index for thread0 in vlib_global_main not initialised 48/8948/1
Keith Burns (alagalah) [Fri, 20 Oct 2017 20:55:18 +0000 (13:55 -0700)]
Thread_index for thread0 in vlib_global_main not initialised

Change-Id: Ie49ee865b197e8fe7bba170c115a4ccbf1013e5f
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoVCL: Fix converity warning CID 177864 46/8946/2
Dave Wallace [Fri, 20 Oct 2017 17:23:40 +0000 (13:23 -0400)]
VCL: Fix converity warning CID 177864

Change-Id: Id8578321381d14f9de827767ef0acf627f1535e4
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: Refactor vcom_socket* and fix crash in vppcom_select 43/8943/3
Dave Wallace [Fri, 20 Oct 2017 16:30:38 +0000 (12:30 -0400)]
VCL-LDPRELOAD: Refactor vcom_socket* and fix crash in vppcom_select

- filter verbose debug output with VCOM_DEBUG > 2
- clean up nomenclature, renaming vppcom_*() functions to
  vcom_session_*()
- fix vppcom_select crash with NULL maps.

Change-Id: I6e416a096d6fd800aa26991c2439e24e8fc38cc5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAdd reverse DNS (ip to name) resolution 42/8942/1
Dave Barach [Fri, 20 Oct 2017 13:21:35 +0000 (09:21 -0400)]
Add reverse DNS (ip to name) resolution

Change-Id: Ic531d820b1846ff7363e5c396ac0b1176e87b401
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agonull-terminate some formatted string 22/8922/5
Gabriel Ganne [Thu, 19 Oct 2017 13:10:46 +0000 (15:10 +0200)]
null-terminate some formatted string

Any u8* variable created by format() is NOT null-terminated.
Add the null terminating byte with vec_terminate_c_string().

If that variable is used by (at least) hash_get_mem(), then it needs to
be null-terminated, as it will go through string_key_sum() which makes a
call to strlen.

Change-Id: I4e51e1b6668f557e53af3bb897cd281598eedbc0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoadd cuckoo hash 20/5920/10
Klement Sekera [Wed, 8 Mar 2017 04:21:24 +0000 (05:21 +0100)]
add cuckoo hash

Change-Id: I78215041588014e9e5c3599c60471ced610735bb
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoLD_PRELOAD poll implementation 27/8827/6
shrinivasan ganapathy [Sun, 15 Oct 2017 22:46:09 +0000 (15:46 -0700)]
LD_PRELOAD poll implementation

- add poll implementation
- implementation based on vppcom_poll
- implementation based on vppcom_select
- currently vppcom_select implementation is picked

Change-Id: If6c2862ae72e9969335aca5b8085957c98287dc0
Signed-off-by: shrinivasan ganapathy <shrinivasanganapathy@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: cleanup misc. issues in vppcom 02/8902/2
Dave Wallace [Thu, 19 Oct 2017 07:53:57 +0000 (03:53 -0400)]
VCL: cleanup misc. issues in vppcom

- Fix vppcom_select crash when n_bits == 0
- Enhance debug output
- Remove port byte-swapping during accept

Change-Id: I6ccd1040ceb82908d924220f558df803ab5eea30
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agovcl-ldpreload: test script enhancements 01/8901/2
Dave Wallace [Thu, 19 Oct 2017 07:47:42 +0000 (03:47 -0400)]
vcl-ldpreload: test script enhancements

Change-Id: Iff302a35cd5d35bf0671a63e8ba81a0c60a231eb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agomake test: control sanity via SANITY=yes|no option 57/8857/2
Klement Sekera [Tue, 17 Oct 2017 05:59:31 +0000 (07:59 +0200)]
make test: control sanity via SANITY=yes|no option

Allow skipping sanity when using DEBUG=gdb/gdbserver options to speed
up development process by supplying SANITY=no option to make test.

Change-Id: I6e619229f6866b22bdeb75654b4e750232ae22bd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoAdd GENEVE tunnel maintainer. 98/8898/3
Marco Varlese [Thu, 19 Oct 2017 06:42:02 +0000 (08:42 +0200)]
Add GENEVE tunnel maintainer.

Change-Id: I30bbba4119accee2c157fb5b8202da3c87c59805
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoRemove unused 'not_last' parameter from ip_add_del_route 26/8826/4
Marek Gradzki [Fri, 13 Oct 2017 08:22:59 +0000 (10:22 +0200)]
Remove unused 'not_last' parameter from ip_add_del_route

Vat supports setting value for the parameter, but
'not_last' is ignored by ip_add_del_route handler,
so can be removed.

This patch
- updates ip.api,
- removes vat handlers
- updates vpp_papi_provider.py
  (also mpls_route_add_del with unused not_last)

Change-Id: Ife15de123db4bc8247103a29b90bce1988e46534
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoVPP-1024: rewrite buffer trajectory tracer 88/8888/2
Dave Barach [Wed, 18 Oct 2017 22:48:11 +0000 (18:48 -0400)]
VPP-1024: rewrite buffer trajectory tracer

Use a proper u16 * vector to capture node indices, since vpp w/
plugins now exceeds 255 graph nodes

Change-Id: Ic48cad676fa3a6116413ddf08c083dd9660783f1
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVCL-LDPRELOAD: fix iperf3 socket_test.sh 89/8889/2
Dave Wallace [Thu, 19 Oct 2017 01:15:48 +0000 (21:15 -0400)]
VCL-LDPRELOAD: fix iperf3 socket_test.sh

Change-Id: Ib6b52917af717d3341429163fb9ecc903cf717fb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoTEST,SPAN:add broadcast+QiniQ tests 30/8830/5
Eyal Bari [Mon, 16 Oct 2017 10:38:21 +0000 (13:38 +0300)]
TEST,SPAN:add broadcast+QiniQ tests

Change-Id: I89c6923370af97bbd09db81a33b6d17f9424a049
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agoLISP: fix crash when sending NSH map-request message, ONE-32 79/8879/2
Filip Tehlar [Wed, 18 Oct 2017 14:10:25 +0000 (07:10 -0700)]
LISP: fix crash when sending NSH map-request message, ONE-32

Change-Id: Ief8c3d3bec116e9f884981fb52af528f98b5f6ff
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agoPlugin for IP-Address to Interface Punting 64/8564/4
Pierre Pfister [Wed, 27 Sep 2017 14:17:31 +0000 (16:17 +0200)]
Plugin for IP-Address to Interface Punting

This plugin provides per-ip address to interface punting.

When at least one rule is defined, the plugin receives all packets
which destination is one of VPP's address but which was not processed
by VPP (e.g., a TCP packet on a port that is not open, or a packet
for a protocol which is not attached).

Based on the set of configured rules, the destination address of each
packet is used to send the packet on the associated interface.

This plugin allows multiple containers to use
VPP's TCP stack (or other features provided by VPP) while still
being able to receive additional packets.

Change-Id: I3e69bb7d98183bf5163cb9ecb564cb482de252ce
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
6 years agoVPP-930: add missing ntohl to send_ip6_fib_details(...) 81/8881/1
Dave Barach [Wed, 18 Oct 2017 14:54:12 +0000 (10:54 -0400)]
VPP-930: add missing ntohl to send_ip6_fib_details(...)

Change-Id: I0c1671f3eaf2dad084e3ac9fb124c9ed78273f50
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoipsec: use boolean or vs. bitwise or to avoid compiler error 70/8870/2
Andrew Yourtchenko [Wed, 18 Oct 2017 10:21:34 +0000 (12:21 +0200)]
ipsec: use boolean or vs. bitwise or to avoid compiler error

Ubuntu 17.04, gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2),
"make build" fails with the few of the errors below:

error: suggest parentheses around comparison in operand of ‘|’
[-Werror=parentheses]
        is_aead = (sa0->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128 |

Solution: use the logical rather than the bitwise or.

Change-Id: Iffcc1ed2e68b14b248159cb117593d32c623c553
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoCSIT-844: fix binary api rx pthread heap push/pop 62/8862/2
Dave Barach [Tue, 17 Oct 2017 15:48:29 +0000 (11:48 -0400)]
CSIT-844: fix binary api rx pthread heap push/pop

We need to push/pop the rx pthread's heap without affecting other
thread(s).

Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main
thread heap pointer in that slot, and set __os_thread_index
appropriately.

Miscellaneous cleanups. Print exec_inband results as a vector, instead
of as a format string. Don't bail out of vpp_api_test with results
pending, e.g. at the end of a vpp_api_test script. Even though vpp
will eventuallly garbage-collect them, We don't want to leave
allocated reply messages lurking in the api message allocation
rings...

Change-Id: I0e8a25d1ff0d3700249dc330d079db16c2fcbc55
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agosession: fix connect corner case crash. 64/8864/2
Dave Wallace [Tue, 17 Oct 2017 20:19:41 +0000 (16:19 -0400)]
session: fix connect corner case crash.

Change-Id: I54ced42749432335183ee3085a9ccc5f95a87ae9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVPP-1032: fix coverity warnings 63/8863/1
Dave Barach [Tue, 17 Oct 2017 17:13:42 +0000 (13:13 -0400)]
VPP-1032: fix coverity warnings

Change-Id: Ic3a0c51e5408921051deaf2e50372d9654574b27
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoInitial commit for phase 2, Add some simple validation. 61/8861/2
John DeNisco [Tue, 17 Oct 2017 15:07:22 +0000 (11:07 -0400)]
Initial commit for phase 2, Add some simple validation.

Change-Id: I5b1d5600cdef4b05cc7c2f1cddb60aed2cc49ac2
Signed-off-by: John DeNisco <jdenisco@cisco.com>
6 years agoTEST,SPAN: add rx+tx span test 18/8818/3
Eyal Bari [Sun, 15 Oct 2017 13:55:11 +0000 (16:55 +0300)]
TEST,SPAN: add rx+tx span test

also refactored verify function

Change-Id: Ib93c99c833dd7c75e416374530c631f954957d98
Signed-off-by: Eyal Bari <ebari@cisco.com>
6 years agoVCL_LDPRELOAD: Add unit test scripts. 51/8851/2
Dave Wallace [Tue, 17 Oct 2017 08:00:50 +0000 (04:00 -0400)]
VCL_LDPRELOAD: Add unit test scripts.

Change-Id: I5fbb3339a6dbd7b40fecf66bfda3fd3249b4a90c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: refactor VCL_LDPRELOAD env vars. 46/8846/3
Dave Wallace [Mon, 16 Oct 2017 20:44:37 +0000 (16:44 -0400)]
VCL: refactor VCL_LDPRELOAD env vars.

- Update vcl-ldpreload references to use $WS_ROOT.

Change-Id: I8e79f7c5e330eda6548a2baf84613b0a4d360811
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAdd API versioning to GENEVE tunnel implementation. 52/8852/1
Marco Varlese [Tue, 17 Oct 2017 08:33:07 +0000 (10:33 +0200)]
Add API versioning to GENEVE tunnel implementation.

Change-Id: I5974e5545d74af53c27938c8cdbae12745c38a54
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agosession: return local transport endpoint in connect reply 17/8817/7
Florin Coras [Sun, 15 Oct 2017 01:56:41 +0000 (18:56 -0700)]
session: return local transport endpoint in connect reply

Change-Id: I7794d5a0774017da4c1c15f45783a18754994ac8
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoUpdate CSIT tests 171002 -> 171017 50/8850/2
Jan Gelety [Tue, 17 Oct 2017 07:22:54 +0000 (09:22 +0200)]
Update CSIT tests 171002 -> 171017

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

Change-Id: Ib098170bbcdbbb01c25ef197d9181cfd826d2854
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agosession: fix build when debugging is on 48/8848/1
Florin Coras [Tue, 17 Oct 2017 03:47:56 +0000 (20:47 -0700)]
session: fix build when debugging is on

Change-Id: I193832a0cd0557fffc034a1223f67fa64a4d45ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoudp: refactor udp code 30/8730/19
Florin Coras [Mon, 2 Oct 2017 07:18:51 +0000 (00:18 -0700)]
udp: refactor udp code

Change-Id: I44d5c9df7c49b8d4d5677c6d319033b2da3e6b80
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoDNS name resolver improvements 45/8845/2
Dave Barach [Mon, 16 Oct 2017 18:39:52 +0000 (14:39 -0400)]
DNS name resolver improvements

- Cache intermediate CNAME records
- Bug fixes

Change-Id: I06dcb558212fc5e9434281493c872577cf9b83e1
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoLDPRELOAD: Remove hack code in getpeername 44/8844/1
Steven [Mon, 16 Oct 2017 18:03:51 +0000 (11:03 -0700)]
LDPRELOAD: Remove hack code in getpeername

Now the real implementation of getpeername is there, we
remove the hack version of getpeername in LDPRELOAD.

Change-Id: I8fa2ba93d346f78d04129a87ee17a834cba537da
Signed-off-by: Steven <sluong@cisco.com>
6 years agoLISP: fix map-request counters, ONE-25 42/8842/2
Filip Tehlar [Mon, 16 Oct 2017 13:51:11 +0000 (06:51 -0700)]
LISP: fix map-request counters, ONE-25

Change-Id: I198f58a84c4692408f9205052af24ee22df7aeaa
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agojvpp: stop plugin intialization on first mismatch 31/8831/2
Marek Gradzki [Mon, 16 Oct 2017 10:33:12 +0000 (12:33 +0200)]
jvpp: stop plugin intialization on first mismatch

Java bindings use get_message_id from jvpp-common
to detect if messages known at compile time
are avaliable at runtime.

In case of missing entry, Java exception is propagated
via JNI using (*env)->ThrowNew.

But this function does not end code execution so,
in order to prevent unexpected behaviour
(e.g. calling vl_msg_api_set_handlers with id == 0),
get_message_id caller should do it manually.

Change-Id: I2edb5013fd3658dcdd77a867b5cdf62e559ee071
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agolb plugin - fix format() type mismatches 55/8755/2
Gabriel Ganne [Wed, 11 Oct 2017 12:35:55 +0000 (14:35 +0200)]
lb plugin - fix format() type mismatches

* (vip - lbm->vips) is u64; change format from [%u] to [%lu]
* vip->plen is u8, but format looks for u32; add exlicit cast
  (this cast was done implicitely)

On ARM platforms, these prevent a loop in the second call to
format_white_space() which would get an invalid (huge) indent value;
the result *looked like* an infinite loop.

Change-Id: I675ef2f98e4ba3d9e8aef12022d38b1d22981da8
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoVCL/LDPRELOAD: getpeername and getsockname 24/8824/1
Steven [Mon, 16 Oct 2017 03:18:47 +0000 (20:18 -0700)]
VCL/LDPRELOAD: getpeername and getsockname

Add support for getpeername and getsockname system calls

Change-Id: Ie22787b967bb2a5fead0f5fcffd779e4f39b3302
Signed-off-by: Steven <sluong@cisco.com>
6 years agoFix minor issues in clib_spinlock_unlock() 21/8821/2
Dave Barach [Sun, 15 Oct 2017 21:20:40 +0000 (17:20 -0400)]
Fix minor issues in clib_spinlock_unlock()

Change-Id: I20ce799c9dd57332c06003b466ee7c36169bce98
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoip: avoid arp assert if out of buffers (VPP-1030) 15/8815/3
Florin Coras [Sat, 14 Oct 2017 18:02:37 +0000 (11:02 -0700)]
ip: avoid arp assert if out of buffers (VPP-1030)

Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoRevert "Enforce FIB table creation before use" 20/8820/2
Florin Coras [Sun, 15 Oct 2017 17:41:21 +0000 (17:41 +0000)]
Revert "Enforce FIB table creation before use"

This reverts commit f9342023c19887da656133e2688a90d70383b0c5.

Reverting to unblock master. No idea why jjb +1ed this patch! On closer inspection it looks like it -1ed it and subsequently changed opinion. CSIT tests should be fixed before re-merging.

Change-Id: I26608912a962c52083073e16c7c9d2cc44a3cc8d
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNAT: fix delete of sessions for 1:1 NAT if 1 worker (VPP-1023) 84/8784/2
Matus Fabian [Thu, 12 Oct 2017 11:17:45 +0000 (04:17 -0700)]
NAT: fix delete of sessions for 1:1 NAT if 1 worker (VPP-1023)

Change-Id: I2446c646de7f227f9438dd7ef93a455ba5af0102
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agochange format_get_indent() to use u32 instead of uword 76/8776/4
Gabriel Ganne [Thu, 12 Oct 2017 08:53:31 +0000 (10:53 +0200)]
change format_get_indent() to use u32 instead of uword

This follows commit d3c008d108aa2187d1a2afe2833b4de25ca2c2ab by
Christophe Fontaine.

Change-Id: I0c4df40df44be2ac0ab25817fa050a1f619eca4d
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFix bug with temporary directory when building rpms. 91/8791/2
Thomas F Herbert [Mon, 9 Oct 2017 18:50:08 +0000 (14:50 -0400)]
Fix bug with temporary directory when building rpms.

Fixes bug introduced in commit 5349f94d.

JIRA: VPP-1014

Change-Id: Ia18f4c6f5f1124306cce790a36f6de970d186687
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
(cherry picked from commit 8c5bfbcc09f44f3ed2b87b0b5c257fbb7b735f97)

6 years agoDeps added to Makefile must also be in spec file. 93/8793/2
Thomas F Herbert [Mon, 9 Oct 2017 19:03:55 +0000 (15:03 -0400)]
Deps added to Makefile must also be in spec file.

Deps are required for Fedora too.

This patch is merged in version stable/17.10.
It should also be merged in master because it
fixes breaking rpm builds in some circumstances.

JIRA: VPP-1015

Cherry-picked from stable/1710

Change-Id: I10807069742cdd6b09a0f34d9d05e9cae4146ec3
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
6 years agoAdd API call to set keys on IPsec tunnel intf 64/8764/2
Matthew Smith [Fri, 6 Oct 2017 00:03:05 +0000 (19:03 -0500)]
Add API call to set keys on IPsec tunnel intf

There was already a CLI command and a libvnet function
to set the keys on an existing IPsec tunnel interface.
Expose this via the API.

Change-Id: I226a9616f680fc022f04447177a2e8232690657f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoSource Lookup progammable via API 11/8811/2
Neale Ranns [Fri, 13 Oct 2017 12:15:07 +0000 (05:15 -0700)]
Source Lookup progammable via API

Change-Id: I5d5d4f22b6369d504455a644f73076d772fbcfb4
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agovhost: crash under heavy traffic condition due to memory corruption (VPP-1016) 92/7092/21
Steven [Sat, 10 Jun 2017 01:49:17 +0000 (18:49 -0700)]
vhost: crash under heavy traffic condition due to memory corruption (VPP-1016)

With heavy traffic, tx code path may crash due to memory corruption

Thread 5 "vpp_wk_2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3995c700 (LWP 2505)]
0x00007ffff73675e8 in vhost_user_if_input (vm=0x7fffb5f5bf9c,
    vum=0x7ffff7882a40 <vhost_user_main>, vui=0x7fffb65570c4, qid=0,
    node=0x7fffb6577dac, mode=VNET_HW_INTERFACE_RX_MODE_POLLING)
    at /home/sluong/vpp-master/vpp/build-data/../src/vnet/devices/virtio/vhost-user.c:1610
1610   bi_current = (vum->cpus[thread_index].rx_buffers)
                       [vum->cpus[thread_index].rx_buffers_len];
(gdb) p vum->cpus[thread_index].rx_buffers_len
$2 = 793212607
(gdb)

Apparently, some code accidentally wrote the bad value in rx_buffers_len.
rx_buffers_len should never be greater than 1024 since that is how many buffers
we request each time.

After debugging many hours, I discovered that the memory corruption happens
in the tx code path right here on line 2176.

  {
    vhost_copy_t *cpy = &vum->cpus[thread_index].copy[copy_len];
    copy_len++;
    cpy->len = bytes_left;
    cpy->len = (cpy->len > buffer_len) ? buffer_len : cpy->len;
    cpy->dst = buffer_map_addr;
    cpy->src = (uword) vlib_buffer_get_current (current_b0) +
      current_b0->current_length - bytes_left;

(gdb) p cpy
$3 = (vhost_copy_t *) 0x7fffb554077c
(gdb) p copy_len
$4 = 1025
(gdb) p &vum->cpus[3].rx_buffers_len
$8 = (u32 *) 0x7fffb5540784

copy_len is picking up the index entry 1024 before it was incremented. copy array has only
1024 members (0 - 1023 are valid).
The assignment here in cpy surely causes memory corruption. It is only discovered later
when the memory location that it corrupted is used.

The condition for the crash is to transmit jumbo frames under heavy volume. Since ring
size is 1024, with one packet taking up one index for frame size (less 2048), it does
not cause overflow. With jumbo frames, it requires multiple indices for one packet,
it can cause the overflow under heavy traffic.

The fix is to do copy out when we have 1000 entries in the array to avoid
overflow.

Change-Id: Iefbc739b8e80470f1cf13123113f8331ffcd0eb2
Signed-off-by: Steven <sluong@cisco.com>