vpp.git
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>
8 years agoFix clang warnings in api code 94/894/2
Damjan Marion [Tue, 26 Apr 2016 17:30:36 +0000 (19:30 +0200)]
Fix clang warnings in api code

Change-Id: I7a4bc4678fea723c35bbeac1b893c5c52235aa67
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoMTU: set interface mtu tap 90/890/2
Mohsin Kazmi [Sun, 24 Apr 2016 16:53:42 +0000 (18:53 +0200)]
MTU: set interface mtu tap

This patch introduces standard command line 'set interface mtu' for setting the MTU
for tap devices. It allows user to set the mtu in between 68 to 65535 bytes
aligned to what linux kernel supports for tun/tap devices.

Right now tapcli set the same MTU size for each tap interface. But it should be set
and configure to per interface rather than per tap instance.

Change-Id: I81b7f3ad95ca56d585907ff8f51d9935a428e01b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
8 years agoFix compile errors reported by clang 87/887/3
Damjan Marion [Tue, 26 Apr 2016 12:54:57 +0000 (14:54 +0200)]
Fix compile errors reported by clang

For using clang as a compiler it is enough
to specify CC=clang in the make command line

Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoPort glean neighbor entry support to IPv6 59/859/3
Pierre Pfister [Mon, 25 Apr 2016 13:15:15 +0000 (14:15 +0100)]
Port glean neighbor entry support to IPv6

This patch is more or less a port of I71f3ba0c8192 to IPv6.
In practice it allows creating a route via a neighbor which is not resolved yet.
It also adds static flag to IPv6 neighbor entries.
And as Damjan suggested, it formalizes ip46_address_t by using
the IPv4 embedded IPv6 address format.

Change-Id: Ifa7328a03380ea4ff118b7ca4897b4ab23a3e57c
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
8 years agoFix decap's second-loop failure issue within nsh-vxlan-gpe 76/876/2
Hongjun Ni [Mon, 25 Apr 2016 18:15:53 +0000 (11:15 -0700)]
Fix decap's second-loop failure issue within nsh-vxlan-gpe

Change-Id: I7c5c93b6490baa05b9b203b6d065d9c31f36d531
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoBuild vpp w/ dpdk-16.04 by default 58/858/2
Dave Barach [Mon, 25 Apr 2016 12:51:21 +0000 (08:51 -0400)]
Build vpp w/ dpdk-16.04 by default

Change-Id: I82cdd82213517c51064eb439c44068d8977e5619
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoGernerate dpdk config out of target specific files 79/879/2
Damjan Marion [Tue, 26 Apr 2016 08:44:28 +0000 (10:44 +0200)]
Gernerate dpdk config out of target specific files

DPDK 16.04 introduced new config parameter RTE_ARCH_X86
which was missing in the dpdk/Makefile

That caused issues with virtio devices on older kernels
(observed on 3.13.0).

This patch changes the source of generated config so
it will also include all defines in config/defconfig_TARGET
file.

Change-Id: Idc6ccbef1d01da84235281ea1078c081846446de
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoPut back VMXNET3 driver init for DPDK 2.2.0 or older versions 64/864/2
John Lo [Mon, 25 Apr 2016 16:32:11 +0000 (12:32 -0400)]
Put back VMXNET3 driver init for DPDK 2.2.0 or older versions

Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af
Signed-off-by: John Lo <loj@cisco.com>
8 years agoDisable TSO/CSUM offloading 66/866/2
Shesha Sreenivasamurthy [Mon, 25 Apr 2016 17:34:53 +0000 (13:34 -0400)]
Disable TSO/CSUM offloading

  Enabling these features breaks L4 traffic when a VHOST
  interface is bridged with a hardware interface which
  does not support such offloading. (Eg: enic)

Change-Id: Ife3d292a8860eb60b82f1473e2d0dd7329e51d5e
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoFix vpp crash in DBG mode 68/868/1
Shesha Sreenivasamurthy [Mon, 25 Apr 2016 18:35:30 +0000 (14:35 -0400)]
Fix vpp crash in DBG mode

    virtio-vhost driver was specifying wrong prefetch
    size. This caused VPP to assert in DBG mode.

Change-Id: Icbe3d5574bd2463b98dfc618a001b16198ab82be
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
8 years agoBreak boostrap.sh into pieces 65/765/8
Ed Warnicke [Tue, 12 Apr 2016 22:34:48 +0000 (17:34 -0500)]
Break boostrap.sh into pieces

In order to make it easier for folks who have existing
Centos or Ubuntu boxes to utilize the same
'Getting started' scripting that is used in Vagrant,
as well as enable us to use that scripting in CI,
broke up bootstrap.sh into

update.sh - Things like apt-get update
build.sh - Install any dependencies and build vpp
clearinterfaces.sh - Clean off any non-default gateway
                   interfaces.  Used by vagrant.
run.sh - Start vpp as a service on the box.

A user (or CI) just wanting to get going and build
on an existing Ubuntu or Centos image (ie, not via
vagrant) can simply run

build.sh

Change-Id: I8f19342f163cad07c6c05def943a5fb8e394b879
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoAdd native NETMAP driver 61/861/2
Damjan Marion [Wed, 20 Apr 2016 03:04:20 +0000 (05:04 +0200)]
Add native NETMAP driver

This is first drop of native NETMAP driver.
It is mainly tested with NETMAP pipes but also
support for native interfaces should work.

New CLI:
create netmap [<intf name>|valeXXX:YYY] [hw-addr <mac>] [pipe]
[master|slave]

Following example creates NETMAP pipe where VPP acts as master:

 create netmap name vale00:vpp1 pipe master

then NETMAP pkt-gen tool can be used to send traffic:

 pkt-gen -i vale00:vpp1}0  -f tx

Change-Id: Ie0ddaa5facc75285b78467420e8a9f9c8dfc39e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAllow the number of elements in a frame queue to be specified per thread. 99/699/2
Bud Grise [Fri, 12 Feb 2016 15:36:11 +0000 (10:36 -0500)]
Allow the number of elements in a frame queue to be specified per thread.

Change-Id: I026a61a943960dc52539565968a942fbd851da93
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
8 years agoAdd APIs to access dpdk information 55/755/3
Todd Foggoa (tfoggoa) [Thu, 17 Mar 2016 20:54:30 +0000 (16:54 -0400)]
Add APIs to access dpdk information

- Add an API to get the number of DPDK mbufs
- Add an API to detemrine if the io thread has been released
- Add an API to get the DPKD pmd type
- Add an API to get the cpu socket of a device

Change-Id: I926401891fb6053c676125c9d0621cc9ed1f80bb
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoChange ethernet's result within unformat_decap_next 22/822/2
Hongjun Ni [Tue, 19 Apr 2016 22:35:14 +0000 (15:35 -0700)]
Change ethernet's result within unformat_decap_next

Change-Id: Ib3f9d1a03930842063ebfbfcfeefca533a678416
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoConvert lisp-gpe encap to interface tx node 48/848/2
Florin Coras [Wed, 20 Apr 2016 22:45:40 +0000 (00:45 +0200)]
Convert lisp-gpe encap to interface tx node

With this change, one lisp-gpe interface is created per vrf/overlay
tenant and its tx node is used as encapsulator (or tunnel ingress). For
all intents and purposes, the tx node inherits all functions previously
performed by the lisp-gpe-encap node and it maintains said node's
position in lisp-gpe's data-path graph. Chiefly, this opens the
possibility to chain interface features, like IPSec, transparently with
LISP. Furthermore, it brings basic data plane support for vrfs and LISP
instance-ids (or virtual network instances as per RFC7364).

Other changes include improvements to lisp-gpe enable and disable
sequences and corresponding API/VAT fixes.

Change-Id: I085500450660a976b587b1a720e282f6e728d580
Signed-off-by: Florin Coras <fcoras@cisco.com>
8 years agoImprove mechanism for using loopback interface as BVI for BDs 51/851/2
John Lo [Sat, 23 Apr 2016 19:14:12 +0000 (15:14 -0400)]
Improve mechanism for using loopback interface as BVI for BDs

When loopback interface is configured as BVI, instead of changing its
output node from loopN-output to l2-input, the loopN-output node is now
kept while its next tx node is changed from ethernet-input to l2-input.
The packet setup previously done in bvi_to_l2 as part of l2-input is now
performed in the loop output node.

This change adds an extra node in the BVI output path but provides the
following improvements:
1. IP address/route created on loopback prior to it being configured as
   BVI will still work properly. The requirement to (re)configure IP/route
   on loopback after it is configured as BVI is removed.
2. The output stats for loopback interfaces are always provided irrespective
   of their BVI configuration.
3. The loopback-BVI output stats can be batch updated outside the packet
   loop in output node, instead of per packet update in l2-input node,
   making l2-input node more efficient for BVI packets.
4. Restore original node property as implemented in node.c function
   vlib_node_add_next_with_slot() where next node indices stored in next
   slots of each node will remain unique.
5. Packet trace for BVI output includes loopN output node which provides
   useful packet data.

Change-Id: I7f5bc72ef953a367363a179088210596881f9e73
Signed-off-by: John Lo <loj@cisco.com>
8 years agoPython-API: Python 2 support. 57/857/1
Ole Troan [Mon, 25 Apr 2016 11:11:19 +0000 (13:11 +0200)]
Python-API: Python 2 support.

Change-Id: I6bc656caf22e284233e27f9e003f11502f306c11
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoPython-API: Support for zero-length arrays from caller to VPP. (Previously only VPP... 55/855/1
Ole Troan [Mon, 25 Apr 2016 10:36:02 +0000 (12:36 +0200)]
Python-API: Support for zero-length arrays from caller to VPP. (Previously only VPP to caller was supported.)

Change-Id: Id660caeb780f3b26cc091467291463980f485178
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agoUpdated .gitignore for Python API generated file 53/853/1
Keith Burns (alagalah) [Sun, 24 Apr 2016 18:13:49 +0000 (11:13 -0700)]
Updated .gitignore for Python API generated file

Change-Id: I7c08b52124b44feb36e04a7fd417fe14b367cb44
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoAdd clib_memcpy macro based on DPDK rte_memcpy implementation 46/846/3
Damjan Marion [Sun, 13 Mar 2016 01:22:06 +0000 (02:22 +0100)]
Add clib_memcpy macro based on DPDK rte_memcpy implementation

Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd a vpp_restart command 45/845/1
Dave Barach [Fri, 22 Apr 2016 13:54:22 +0000 (09:54 -0400)]
Add a vpp_restart command

vpp_restart solves the problem of restarting vpp and not exiting until
the new vpp instance is sufficiently established to allow immediate
binary API connections. The point is to avoid using arbitrary "sleep
N" commands e.g. in CSIT shell scripts.

We send SIGTERM to the current vpp process, and expect / depend on the
process-monitor du jour to remove the vpp-api shared-memory segment.

vpp_restart exits w/ status 0 if all is well, non-zero upon failure.

In trying to make vpp_restart reliable, we discovered a
recently-introduced heap corruption bug in .../dpdk/init.c, which
caused vpp to crash on startup once every 20 times on a particular
rig.

If possible, we should check /var/log/syslog for evidence of
unexpected multiple restarts during regression-testing.

Change-Id: Ic48c74b1a94a4368066ba2e326d4b12d51192088
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoFix duplicate free 41/841/2
Dave Barach [Fri, 22 Apr 2016 11:54:02 +0000 (07:54 -0400)]
Fix duplicate free

Change-Id: Ifda07e476c74da9bfd7e21f02aa09160a0212e24
Signed-off-by: Dave Barach <dbarach@cisco.com>
8 years agoUse memory from other CPU sockets if there is no local 39/839/2
Damjan Marion [Thu, 21 Apr 2016 19:42:40 +0000 (21:42 +0200)]
Use memory from other CPU sockets if there is no local

This fixes crash when local socket memory is not available
so rx/tx queue setup fails. Here we simply retry operation
without being so picky about memory location.

Change-Id: I5bae47defe3c0fe120853378ed13141893284a5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemoving dpdk socket-mem from startup.conf 38/838/2
Damjan Marion [Thu, 21 Apr 2016 18:55:18 +0000 (20:55 +0200)]
Removing dpdk socket-mem from startup.conf

We allocate 512M of memory on each available cpu socket
by default so this is not needed anymore in startup.conf

Change-Id: Ib28b25df8d6722777a006aaddd1d56f21ab7b58a
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoFix warning in vppapigen 30/830/2
Damjan Marion [Thu, 21 Apr 2016 07:24:17 +0000 (09:24 +0200)]
Fix warning in vppapigen

Change-Id: I6301ece0d772fd5a6271edd07765b05ef0b63f21
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd Broadwell-EP/EX to the uarch list 05/805/2
Damjan Marion [Mon, 18 Apr 2016 10:45:15 +0000 (12:45 +0200)]
Add Broadwell-EP/EX to the uarch list

Change-Id: I2ab84846ac88d3170b8c847914749e2a728dfa2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoRemove execute flags from some dpdk patch files 29/829/2
Damjan Marion [Wed, 20 Apr 2016 19:31:30 +0000 (21:31 +0200)]
Remove execute flags from some dpdk patch files

Change-Id: I972b784082de45480baf1d1f07845743afddea40
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoubuntu 16.04 build support. Supporting systemd with vpp.service files. 96/796/3
Srivatsa Sangli [Fri, 15 Apr 2016 20:59:00 +0000 (13:59 -0700)]
ubuntu 16.04 build support. Supporting systemd with vpp.service files.

Incorporating review comments : modified debian/control dependencies

Change-Id: Ib2fe85d81eb7f1803ef8f54294c7c18cd07c61ba
Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
8 years agoAllow L3 forwarded jumbo packets on Bonded Interfaces 20/820/2
John Lo [Tue, 19 Apr 2016 20:54:20 +0000 (16:54 -0400)]
Allow L3 forwarded jumbo packets on Bonded Interfaces

Set max L3 packet size allowed to the lowest value of the slave links.
Also cleanup FIXME's for VMXNET3 driver.

Change-Id: Ia5cf742f2ab13b8cdc8ea6286f56464ee4f8c51d
Signed-off-by: John Lo <loj@cisco.com>
8 years agoPython-API: Inital commit of Python bindings for the VPP API. 19/719/9
Ole Troan [Sat, 9 Apr 2016 01:16:30 +0000 (03:16 +0200)]
Python-API: Inital commit of Python bindings for the VPP API.
See: https://wiki.fd.io/view/VPP/Python_API

Change-Id: If135fc32208c7031787e1935b399d930e0e1ea1f
Signed-off-by: Ole Troan <ot@cisco.com>
8 years agodelete loopback interface cli 57/757/2
Alpesh S. Patel [Tue, 12 Apr 2016 16:58:56 +0000 (09:58 -0700)]
delete loopback interface cli
(to be consistent with other delete interface commands)

Change-Id: I41f63cc5b11d9fa9489edc54b17a4d857b711b66
Signed-off-by: Alpesh S. Patel <apatel9191@hotmail.com>
8 years agoCleaned up formatting in device.c - no functionality changes. 17/817/2
Keith Burns (alagalah) [Tue, 19 Apr 2016 19:54:12 +0000 (12:54 -0700)]
Cleaned up formatting in device.c - no functionality changes.

Change-Id: Ia7d83784d50b3651117201b876464528d015edea
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
8 years agoChange from nsh-encap to nsh-vxlan-gpe within nsh vxlan tunnel's short_help 12/812/3
Hongjun Ni [Mon, 18 Apr 2016 18:53:59 +0000 (02:53 +0800)]
Change from nsh-encap to nsh-vxlan-gpe within nsh vxlan tunnel's short_help

Change-Id: Ifeba2e9857a112139b7be6436b59f05858f1abf9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
8 years agoMove "ethernet" debug cli commands to "set interface" 94/794/2
Damjan Marion [Fri, 15 Apr 2016 12:26:00 +0000 (14:26 +0200)]
Move "ethernet" debug cli commands to "set interface"

Following two commands are changed:

ethernet mtu -> set interface mtu
ethernet promiscuous -> set inteface promiscuous

Change-Id: I5037e021933156c06044fb723a05ad330f8162b7
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoAdd TAG=vpp_gcov which compiles vpp to produce .gcda files 10/810/2
Dave Barach [Mon, 18 Apr 2016 21:10:18 +0000 (17:10 -0400)]
Add TAG=vpp_gcov which compiles vpp to produce .gcda files

Change-Id: Ib6a0940e08f9e0983f3ec70f9e8488c2185ca4da
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoVPP-6: set epoll wait-time to zero when binary API messages are waiting 15/815/1
Dave Barach [Tue, 19 Apr 2016 13:38:35 +0000 (09:38 -0400)]
VPP-6: set epoll wait-time to zero when binary API messages are waiting

Change-Id: I629ef98ecd3b729d2564b3a1ba8c6039f854f86c
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoAdd API to get the dpdk interface stats delta. 23/623/3
Sean Hope [Mon, 28 Mar 2016 17:11:31 +0000 (13:11 -0400)]
Add API to get the dpdk interface stats delta.

Internally change the clearing and displaying of the dpdk stats to be
based on deltas.

Change-Id: I76605ac67492a374ff5522ff44d4a0190cf94e18
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
8 years agoAdd support for AArch32 99/799/3
Christophe Fontaine [Sat, 9 Apr 2016 03:38:49 +0000 (12:38 +0900)]
Add support for AArch32

gcc version 4.9.2 (Raspbian 4.9.2-10)
Tested on Linux raspberrypi 4.4.6-v7+ #875 SMP Tue Apr 12 16:33:02 BST 2016 armv7l GNU/Linux

CPUs may be little or big endian, detect with gcc flags, not the processor architecture
Add a new flag $(PLATFORM)_uses_openssl which allows to disable the link with openssl lib.

vlib/vlib/threads.c:
startup.conf must:
- specify the heapsize as we don't have hugepages on raspbian

cpu {
  main-core 3
}
heapsize 64M

Corrects in various files the assumption uword == u64 and replaces 'u64' cast with 'pointer_to_uword' and 'uword_to_pointer' where appropriate.
256 CPUs may create an OOM when testing with small memory footprint ( heapsize 64M ), allows the number of VLIB_MAX_CPUS to be set in platforms/*.mk

vppinfra/vppinfra/longjmp.S:
ARM - copy r1 (1st parameter of the setjmp call) to r0 (return value)

vppinfra/vppinfra/time.h:
On ARMv7 in AArch32 mode, we can access to a 64bit register to retreive the cycles count.
gcc on rpi only declare ARM_ARCH 6. Override this info, and check if it is possible to use 'mrrc'.
/!\ the time function will NOT work without allowing the user mode access to the PMU.
You may download the source of the kmod here:
https://github.com/christophefontaine/arm_rdtsc

Change-Id: I8142606436d9671a184133b935398427f08a8bd2
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
8 years agodpdk socket-mem handling optimizations 95/795/3
Damjan Marion [Fri, 15 Apr 2016 18:24:55 +0000 (20:24 +0200)]
dpdk socket-mem handling optimizations

 - introduces default socket-mem size of 512 MB per socket
 - default socket-mem value is applied to all discovered CPU sockets
 - fixes bug when < 1024 socket-mem parameter is specified
 - for socket-mem < 1024 code prefers 2 MB pages
 - improves handling of manualy specified socket-mem values

Change-Id: I9ef848108d7dd1228fbd82a5be49eb5277a93683
Signed-off-by: Damjan Marion <damarion@cisco.com>
8 years agoUsing classifier/ACL from now on. Changes pertaining to that. 90/790/3
rangan [Fri, 15 Apr 2016 12:01:46 +0000 (17:31 +0530)]
Using classifier/ACL from now on. Changes pertaining to that.

Change-Id: I682b9a361c7308d6d0abb9d7d0320215f0d91e50
Signed-off-by: rangan <rangan@cisco.com>
8 years agoENIC driver patch to fix rx miss or drop counters 98/798/1
John Lo [Sat, 16 Apr 2016 04:00:17 +0000 (00:00 -0400)]
ENIC driver patch to fix rx miss or drop counters

Change-Id: Ic05d182a5659417e91b85c0ae20b6822a5445945
Signed-off-by: John Lo <loj@cisco.com>
8 years agoaf_packet: clear bitmap entries when processing input 88/788/2
Peter Lei [Thu, 10 Mar 2016 09:03:36 +0000 (04:03 -0500)]
af_packet: clear bitmap entries when processing input

Need to clear the bitmap entry when processing each input file
descriptor.

This becomes an issue on interface deletion. A crash occurs due
to assertion in a debug image

https://gerrit.fd.io/r/#/c/615/ - removed the code when this was set
again, but the bitmap needs to be cleared

Change-Id: I7cccb9bf8b9b2eb5a7f60ecda7530784a9512116
Signed-off-by: Peter Lei <peterlei@cisco.com>
8 years agoRemove historical netconf message switch APIs 92/792/1
Dave Barach [Fri, 15 Apr 2016 12:25:08 +0000 (08:25 -0400)]
Remove historical netconf message switch APIs

The scheme is unused, and never to be used again; it was a bad idea in
the first place.

Change-Id: I1479a1fa9191e0374e00f7326545d216c3a11e32
Signed-off-by: Dave Barach <dave@barachs.net>
8 years agoTook care of code review comments. Extended the fix to other files. 81/781/4
rangan [Fri, 15 Apr 2016 05:32:32 +0000 (11:02 +0530)]
Took care of code review comments. Extended the fix to other files.

Change-Id: I24e688884cd5896b317efb53e1d193f7d363715a
Signed-off-by: rangan <rangan@cisco.com>
8 years agoAdd LISP API 89/789/1
Andrej Kozemcak [Thu, 31 Mar 2016 11:51:42 +0000 (13:51 +0200)]
Add LISP API

SET API:
lisp_add_del_locator_set
lisp_add_del_locator
lisp_add_del_local_eid
lisp_gpe_add_del_fwd_entry
lisp_add_del_map_resolver
lisp_gpe_add_del_iface

SHOW API:
lisp_locator_set_dump
lisp_local_eid_table_dump
lisp_gpe_tunnel_dump
lisp_map_resolver_dump

Change-Id: Ie7f521e7e64ad2736b8417852b38454bfdef3728
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>