622 Commits

Author SHA1 Message Date
Keith Burns (alagalah)
3d5916dee6 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>
2016-05-02 18:55:52 +00:00
Mohsin Kazmi
50038d1909 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>
2016-05-02 18:55:20 +00:00
Keith Burns (alagalah)
f86abbb936 VPP-33 Removing javah from Makefile. Merged as fix for Gerrit 884
Change-Id: I2d9d6a607ffa1a8788c1ce79770db8b2b9bae6fb
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-05-02 10:20:53 -07:00
Maros Marsalek
45a42b5d7f 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>
2016-05-02 08:46:21 -05:00
Keith Burns (alagalah)
52fc44d61b 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>
2016-04-30 16:38:09 +00:00
Chris Luke
6de2ff28fe 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>
2016-04-29 22:37:08 +00:00
Florin Coras
7ef6d5bb68 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>
2016-04-29 21:29:27 +00:00
John Lo
816a924fd3 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>
2016-04-29 14:47:46 -04:00
Damjan Marion
aca64c9de1 Add indirect next hop support
Change-Id: I0626c2650eba7961a15b1e87a664b57bef5503a2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29 17:22:16 +00:00
Florin Coras
7deadac47e Remove unused variable in lisp decap
Change-Id: I6aef98252e6134fd2f1a30a8407086ab98285a53
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29 17:04:50 +02:00
Chris Luke
27fe48f699 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>
2016-04-29 14:32:58 +00:00
Florin Coras
210bfc8eaa Fix ip-udp encap checksum for ip6
Thanks to Chris Luke for reporting.

Change-Id: I4f2ac5bb0eb565738755ddb00e8c918134ff67b6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-29 14:31:59 +00:00
Damjan Marion
1a64ab900f Fix ip4 address formatting in the show ip fib ouptut
Change-Id: I3ffb2e3cef63cbc9f2abc81bbdedabb34b9b3408
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-29 13:29:27 +00:00
Chris Luke
9444c0673c 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>
2016-04-29 09:07:00 -04:00
Shesha Sreenivasamurthy
6caec3d8b4 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>
2016-04-29 12:44:12 +00:00
Hongjun Ni
daf141946d Add TX statistics for nsh-gre tunnel
Change-Id: I20e4abcc82c00e43dd441f1882cb6be531b6876e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29 12:41:23 +00:00
Hongjun Ni
329e7d5905 Add RX statistics for nsh-gre tunnel
Change-Id: I045bb9d51c9a82ccba6e792485b9418bd78b8520
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29 12:41:15 +00:00
Hongjun Ni
6337ab720b Fix decap-next for ethernet format in nsh-vxlan-gpe
Change-Id: I9f5efef4c2b821e4c7d76ed6e2c4f52c2495e512
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-29 12:37:46 +00:00
Chris Luke
1aed76feed 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>
2016-04-29 12:37:02 +00:00
Filip Tehlar
beceab9052 Add support for LCAF Instance ID
Change-Id: Ifce3f2bdcba099157a42d0b694f3161b9f700ed2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-04-29 14:16:53 +02:00
Florin Coras
02655bd425 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>
2016-04-29 12:01:15 +00:00
Dave Barach
848191d3e1 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>
2016-04-29 11:36:09 +00:00
Ed Warnicke
7226b84d74 Fix for java8 releated breakage in make install-dep
Change-Id: I17ae3c7031a820746a3785a35b440e17430d0ac5
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-04-28 22:44:26 +00:00
Andrej Kozemcak
499929d54c LISP IPv6 control support, create IPv6 header
Change-Id: I50d2946df8f5de0142b76f4023d8bd60ee6d2f0d
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-04-28 20:27:30 +00:00
Chris Luke
99cb335ac1 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>
2016-04-28 15:13:01 -04:00
Bud Grise
1589576c57 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>
2016-04-28 16:34:59 +00:00
Christian Dechamplain (cdechamp)
07aecbb46f Add ability to set l2_mode_noprot
Change-Id: I3767a1bbe55452600863e145cbc12b114d6d1024
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-04-28 16:34:32 +00:00
Marek Gradzki
60c63c7b53 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>
2016-04-28 16:23:35 +00:00
Bud Grise
e0ef46b7c0 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>
2016-04-28 14:04:15 +00:00
Ole Troan
e6749e4f6b Python API: Fix mistaken removal of '_' in field names.
Change-Id: I1e39970bc6ded9e6da64385b2289321ba43bebfd
Signed-off-by: Ole Troan <ot@cisco.com>
2016-04-28 11:41:21 +00:00
Chris Luke
194ebc58b6 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>
2016-04-28 11:37:30 +00:00
Thomas F Herbert
473bf23be8 Update Makefile to add debuginfo RPMs for gdb
Change-Id: I29d8cc839565999e2fabe09d29c40e09aa1ea784
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2016-04-28 10:59:26 +00:00
Florin Coras
81d381c35b Fix Bug VPP-22
Change-Id: Iaac12e63e4a5ee026276638afd5d5ba3b9503a40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-04-28 10:58:12 +00:00
Chris Luke
1c9f6ce744 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>
2016-04-27 22:28:50 +00:00
John Lo
acc22d7c45 ENIC driver updates for DPDK 16.04 and 2.2.0
Change-Id: I896925ea2208d318d353d486707b97f295c78426
Signed-off-by: John Lo <loj@cisco.com>
2016-04-27 21:11:12 +00:00
Dave Barach
2a00d171a0 Remove historical artifacts from vnet/buffer.h
Change-Id: I7f50074a4ed5b62bef4584190eb849d90e90e592
Signed-off-by: Dave Barach <dave@barachs.net>
2016-04-27 18:35:30 +00:00
Ole Troan
ae65f5b6a8 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>
2016-04-27 18:23:40 +00:00
John Lo
644ec43b5e Fix pcap trace capture crash for packets > 512 bytes
Change-Id: I9397ac756290953a14e3adfe5b7c980ecf92bac2
Signed-off-by: John Lo <loj@cisco.com>
2016-04-27 09:56:36 -04:00
Chris Luke
7afda3aee5 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>
2016-04-27 13:32:49 +00:00
Chris Luke
6b90fe3231 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>
2016-04-27 13:32:48 +00:00
Chris Luke
572d81213a 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>
2016-04-27 13:32:48 +00:00
Chris Luke
0aca5eb1b8 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>
2016-04-27 13:32:48 +00:00
Maros Marsalek
b3656ea0b8 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>
2016-04-27 12:51:55 +00:00
Shesha Sreenivasamurthy
0666dc47d9 Live VM migration support for vhost-user
Change-Id: I79bef6dc94b3ad688564a409d14d63ca3125a305
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-27 09:14:06 +00:00
Damjan Marion
6b1d7c55d6 Make automake silent rules default
Change-Id: Ia504ccdac1deac20f20cf7fb76f78b2d8c505474
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26 19:36:59 +00:00
Damjan Marion
fa6935594d Fix clang warnings in api code
Change-Id: I7a4bc4678fea723c35bbeac1b893c5c52235aa67
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-26 19:35:12 +00:00
Mohsin Kazmi
f2ba9aadbb 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>
2016-04-26 16:43:30 +00:00
Damjan Marion
e39a7b8347 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>
2016-04-26 16:16:44 +00:00
Pierre Pfister
1dabaafceb 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>
2016-04-26 14:09:00 +00:00
Hongjun Ni
0371807f7b Fix decap's second-loop failure issue within nsh-vxlan-gpe
Change-Id: I7c5c93b6490baa05b9b203b6d065d9c31f36d531
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-04-26 12:32:04 +00:00