Klement Sekera [Thu, 9 Mar 2017 07:20:13 +0000 (08:20 +0100)]
make test: automatic sanity check
Check if vpp_papi is importable before running the tests to avoid
confusing python crashes.
Change-Id: I6adf406e353bf381d590f2ef988a1ea79b95cf37
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Thu, 9 Mar 2017 07:01:52 +0000 (08:01 +0100)]
make test: add make test-shell[-debug] targets
This starts a bash with the same environment as the test framework
uses, allowing easy debugging.
Change-Id: I956deda913b73dae5b1e1976417834ae4731f88a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Dave Barach [Thu, 9 Mar 2017 00:08:56 +0000 (19:08 -0500)]
vlib_mains == 0 special cases be gone
Clean up spurious binary API client link dependency on libvlib.so,
which managed to hide behind vlib_mains == 0 checks reached by
VLIB_xxx_FUNCTION macros.
Change-Id: I5df1f8ab07dca1944250e643ccf06e60a8462325
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Wed, 8 Mar 2017 13:17:22 +0000 (05:17 -0800)]
IMplementation for option to not create a FIB table entry when adding a neighbor entry
Change-Id: I952039e101031ee6a06e63f4c73d8eb359423e1a
Signed-off-by: Neale Ranns <nranns@cisco.com>
Neale Ranns [Tue, 21 Feb 2017 02:23:41 +0000 (18:23 -0800)]
MAP pre-resolve - use FIB to track pre-resolved next-hop
Change-Id: I9ea16881caf7aee57f0daf4ac2e8b82c672f87e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
Neale Ranns [Wed, 22 Feb 2017 01:30:26 +0000 (17:30 -0800)]
Tests to target holes in adjacency and DPO test coverage
Change-Id: Ic6ac7e441a7b75baa02f03c1585d1ae00903a399
Signed-off-by: Neale Ranns <nranns@cisco.com>
Gabriel Ganne [Tue, 7 Mar 2017 16:04:02 +0000 (17:04 +0100)]
include rte_config header before any other dpdk include
Change-Id: Idd28931756a53663512efe85b896eeffcc8cadcb
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Damjan Marion [Wed, 8 Mar 2017 21:16:00 +0000 (22:16 +0100)]
dpdk: remove unnecesary CFLAGS modification
Change-Id: Ie9945462d529fea6f237a521138ade76bd02e0d9
Signed-off-by: Damjan Marion <damarion@cisco.com>
Martin [Wed, 8 Mar 2017 13:53:20 +0000 (05:53 -0800)]
SNAT: deterministic map dump
Change-Id: Iead6dc6a0fe15a0b8e148e780c3aeadd0b378824
Signed-off-by: Martin <magalik@cisco.com>
Matus Fabian [Wed, 8 Mar 2017 12:47:49 +0000 (04:47 -0800)]
SNAT: fix coverity warnings (VPP-608)
Change-Id: Id7879a6a8014fe57c3515a13e7597fb0e3c906ad
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Damjan Marion [Thu, 2 Mar 2017 11:33:48 +0000 (12:33 +0100)]
vlib: add process restart cli
Change-Id: I8b81e53ebea573b4edb17aca7e1c284f3984e399
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Tue, 7 Mar 2017 10:39:27 +0000 (11:39 +0100)]
make test: split into basic and extended tests
Implement plumbing to allow decorating tests as extended, e.g.:
@unittest.skipUnless(running_extended_tests(), "part of extended tests")
both methods and classes can be decorated this way.
Change make test and make test-debug to run only non-extended tests.
Introduce make test-all and make test-all-debug to run the full suite.
Run full suite as part of make verify.
Decorate most BFD tests as extended.
Change-Id: I3bc64f59e9fe238f7f767d7e043dc165d03e9dfa
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Neale Ranns [Wed, 8 Mar 2017 09:12:54 +0000 (01:12 -0800)]
ARP resilience in the absence of IP config on input and output interfaces
Change-Id: Ia9c6790436f8f6337b5351e3017ef5e441a8a4e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit
5e323329ed6ded6f6944c56069329207ad9069c0)
Damjan Marion [Mon, 6 Mar 2017 20:51:00 +0000 (21:51 +0100)]
dpdk: dpdk-input optimizations and fixes
- fix issue caused by assumption that ethertype starts at 0
- intoduce buffer templates to speed-up vlib_buffer_t metadata
initialization
- avoid check for multiseg buffers inside loop if multiseg is disabled
- interleave prefetches to reduce load on L1 cache
Change-Id: I3b76e6d3e1e15ed28f01625edb7fbe9f38112e03
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Wed, 8 Mar 2017 16:56:58 +0000 (08:56 -0800)]
API change (only) to not create a FIB table entry when adding a neighbor entry
Change-Id: I1a8edaf1e0fca89e5d24d57dbb186ee46801f661
Signed-off-by: Neale Ranns <nranns@cisco.com>
Steven [Wed, 8 Mar 2017 08:23:13 +0000 (00:23 -0800)]
vhost: binary API changes for interrupt mode
Add operation_mode for create_vhost_user_if, modify_vhost_user_if,
and sw_interface_vhost_user_details. Only polling mode is supported
for these APIs. Other mode is rejected and gets
VNET_API_ERROR_UNIMPLEMENTED error.
Change-Id: I0596f4e2c087aa2b6f78eb3e0b63910b1859641e
Signed-off-by: Steven <sluong@cisco.com>
Dave Barach [Wed, 8 Mar 2017 15:41:47 +0000 (10:41 -0500)]
Change dpdk input node fixed-sleep units to usec
Change-Id: I94e8737cad9222d24602db4ad03bf43c12c62b79
Signed-off-by: Dave Barach <dave@barachs.net>
Ole Troan [Wed, 8 Mar 2017 12:05:49 +0000 (13:05 +0100)]
FLOWPERPKT: New API definition in preparation for stateful flows.
Change-Id: If9c4a5da06daf78000ea8637b95048f19b5019d0
Signed-off-by: Ole Troan <ot@cisco.com>
Radu Nicolau [Wed, 8 Mar 2017 12:53:19 +0000 (12:53 +0000)]
dpdk: Fixed QAT devices binding, bind the VFs only
Change-Id: I9ff64b6c583e1c513f91f90798298b55d0793f06
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Filip Tehlar [Tue, 7 Mar 2017 09:23:01 +0000 (10:23 +0100)]
LISP: fix gpe sub-interface lookup
Change-Id: I080b90a4bc53c2595ade696c592e86790c7ca939
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Neale Ranns [Wed, 8 Mar 2017 12:20:11 +0000 (04:20 -0800)]
BUG: multiple registrations of 'vl_api_ip6nd_proxy_details_t_handler
Change-Id: I70e32b2196bfc8712d270f9a4365daca2504d52d
Signed-off-by: Neale Ranns <nranns@cisco.com>
Martin [Wed, 8 Mar 2017 11:31:02 +0000 (03:31 -0800)]
SNAT: user_session_dump is_ip4 and vat unformating added
Change-Id: I0ffab147c3218a75b7c3bb829983f538c7b637ee
Signed-off-by: Martin <magalik@cisco.com>
Neale Ranns [Sat, 18 Feb 2017 08:03:54 +0000 (00:03 -0800)]
Proxy ND (RFC4389 - or a sub-set thereof). This allows the 'emulation' of bridging. That is hosts in one sub-net reachable via differenet interfaces.
Introducate a new API command:
ip6 nd proxy <host-address> <interface>
this indicates 2 things;
1) that host <host-address> is reachable out of interface <interface>. VPP will thus install that route.
2) NS requests sent to <host-address> will be responeded to (i.e. proxied).
Change-Id: I863f967fdb5097ab3b574769c70afdbfc8d5478a
Signed-off-by: Neale Ranns <nranns@cisco.com>
Filip Tehlar [Wed, 8 Mar 2017 07:46:51 +0000 (08:46 +0100)]
LISP: add stats API/CLI
Change-Id: I5c5b4d680359cf3635c2d7b0088ea2ba6a428f93
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Matus Fabian [Tue, 7 Mar 2017 16:04:32 +0000 (08:04 -0800)]
CGN: fix outside port calculation and set buffer error (VPP-623)
Change-Id: I5143328b2da62ce4d6bb2915e2a51855696d87fc
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Florin Coras [Tue, 7 Mar 2017 09:20:52 +0000 (01:20 -0800)]
Register TCP with IP only if session is enabled
Change-Id: I73154179e78aeae5f879125237bce593d0978fae
Signed-off-by: Florin Coras <fcoras@cisco.com>
Gabriel Ganne [Mon, 6 Mar 2017 14:19:40 +0000 (15:19 +0100)]
fix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same expression as the destination
warning translates as an invalid write :
sizeof(u8* b_dmac) == 8 != sizeof(eth_hdr->dst_address) == 6
~/vpp/build-data/../src/vnet/l2/l2_vtr.c: In function 'l2pbb_get':
~/vpp/build-data/../src/vnet/l2/l2_vtr.c:734:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination;
did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
~/vpp/build-data/../src/vnet/l2/l2_vtr.c:736:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination;
did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
update l2pbb_get to take an ethernet header instead of two u8* pointers
for source and dest mac addresses.
Change-Id: Ifcf1319a9e22614d57682f940e10f0420dc6fb8c
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Dave Barach [Tue, 7 Mar 2017 17:52:31 +0000 (12:52 -0500)]
Missing plugin binary API command fns found after brief search
Create hash tables before loading plugins. Previous init sequence
wiped out most if not all of them.
Change-Id: I5dd628895f68f740d525951511a9fef1822d39da
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Thu, 16 Feb 2017 15:45:03 +0000 (07:45 -0800)]
DHCP Multiple Servers (VPP-602, VPP-605)
Multiple DHCP (4 and/or 6) servers can be added and removed through multiple calls to the 'set dhcp server' API.
All 4/6/ discover/solicit messages will then be replicated to all servers in the list. The expectation is that the servers/system is configured in such a way that this is viable.
If VSS information is providied for the clinet VRF which also has multiple servers configured, then the same VSS information is sent to each server. Likewise the source address of packets sent to from VPP to each server is the same.
Change-Id: I3287cb084c84b3f612b78bc69cfcb5b9c1f8934d
Signed-off-by: Neale Ranns <nranns@cisco.com>
Wojciech Dec [Tue, 7 Mar 2017 18:30:39 +0000 (19:30 +0100)]
Fix endian issue in ARP Event Reply
ARP Event reply sw_if_index was getting passed in host byte order.
Change-Id: Ifae8673906ac2c4233f146786a3d02c38280809b
Signed-off-by: Wojciech Dec <wdec@cisco.com>
Eyal Bari [Mon, 6 Mar 2017 09:47:50 +0000 (11:47 +0200)]
CLI: hide deleted interfaces
Added a new interface flag - HIDDEN
Indicates that the interface does not appear in CLI/API.
Added three new interface functions:
vnet_sw_interface_is_api_visible - indicates if the sw_if_index should be displayed
vnet_swif_is_api_visible - variant for sw_interface
vnet_sw_interface_is_api_valid - tests if the given if_index exists and is visible
for future use by api functions
Changed the unformat function to only accept visible interfaces
Changed vxlan to add the HIDDEN flag to deleted interfaces
This is the first part in a series to hide deleted interfaces from the API
Change-Id: Ib43cc5cf1c450856560faf4e84126eb3671038e2
Signed-off-by: Eyal Bari <ebari@cisco.com>
AkshayaNadahalli [Mon, 23 Jan 2017 16:35:35 +0000 (22:05 +0530)]
In-band OAM active probe (VPP-471)
Change-Id: Icf0ddf76ba1c8b588c79387284cd0349ebc6e45f
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Matus Fabian [Fri, 10 Feb 2017 11:48:01 +0000 (03:48 -0800)]
CGN: Deterministic NAT (VPP-623)
Inside user is statically mapped to a set of outside ports. Support endpoint
dependent mapping to deal with overloading of the outside ports.
Change-Id: I8014438744597a976f8ae459283e8b91f63b7f72
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Juraj Sloboda [Tue, 7 Mar 2017 03:55:21 +0000 (19:55 -0800)]
Add setting of tenant VRF id for SNAT addresses (VPP-641)
Change-Id: I9c0bb35ba16e04206ac481495f6638d3763754a1
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Gabriel Ganne [Mon, 6 Mar 2017 14:31:18 +0000 (15:31 +0100)]
fix uninitialized ip6 keys within session.c
fix for functions:
- stream_session_lookup_listener6
- stream_session_lookup6
- stream_session_lookup_transport6
- stream_session_connect_notify
eg.
~/vpp/build-data/../src/vnet/session/session.c: In function 'stream_session_lookup_listener6':
~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[3]' is used uninitialized in this function [-Werror=uninitialized]
session_kv6_t kv6;
^
~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[2]' is used uninitialized in this function [-Werror=uninitialized]
~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[5]' is used uninitialized in this function [-Werror=uninitialized]
~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[4]' is used uninitialized in this function [-Werror=uninitialized]
Change-Id: I221cafbaf4effa43662ffcc7bf5f9581e28f9db9
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Gabriel Ganne [Mon, 6 Mar 2017 15:08:52 +0000 (16:08 +0100)]
silence -Wmaybe-uninitialized warning
It does not look like it actually can be used uninitialized ... but gcc
complains, so with Werror this prevents from compiling.
sample warning output:
In file included from /home/gannega/export/vpp/build-data/../src/vnet/handoff.h:21:0,
from /home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c:19:
/home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c: In function 'snat_in2out_node_fn_inline':
/home/gannega/export/vpp/build-data/../src/vnet/ip/ip4_packet.h:244:15: error: 'inner_ip0' may be used uninitialized in this function [-Werror=maybe-uninitialized]
i->checksum = 0;
^
/home/gannega/export/vpp/build-data/../src/plugins/snat/in2out.c:433:17: note: 'inner_ip0' was declared here
ip4_header_t *inner_ip0;
Change-Id: If7c35dfb528861fd4ec6374aa1343b48f0f93057
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Ole Troan [Mon, 6 Mar 2017 22:51:57 +0000 (23:51 +0100)]
Python API: Synchronous mode.
Change-Id: Ic8f186dbb35bb4e2e191d311cab51315a88a2d81
Signed-off-by: Ole Troan <ot@cisco.com>
Neale Ranns [Tue, 21 Feb 2017 13:33:14 +0000 (05:33 -0800)]
make per-adj counters configurable
Change-Id: Ifdd2b204ecf7d855f1269c11224b9c825311904d
Signed-off-by: Neale Ranns <nranns@cisco.com>
AkshayaNadahalli [Mon, 6 Mar 2017 18:22:29 +0000 (18:22 +0000)]
Fixing loadbalancing over ECMP for recursive routes
Change-Id: Ibe1734aeb94bc17cd8d8bc6f35ca7b780aaa9599
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Shwetha Bhandari [Wed, 18 Jan 2017 07:13:54 +0000 (12:43 +0530)]
ioam: manycast using iOAM and SR (VPP-628)
Change-Id: I6d2afda991d771fb4a89fc3f6544f8e940a9b9f0
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
Klement Sekera [Tue, 28 Feb 2017 10:56:48 +0000 (11:56 +0100)]
BFD: documentation
Change-Id: I06a23d24340c5527f3848177d2178bf3e55f7614
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Neale Ranns [Tue, 21 Feb 2017 11:37:27 +0000 (03:37 -0800)]
Remove unused multicast fields from vnet_buffer_t
Change-Id: I8db55443c0beb33a89520ab3167f703f8646ec9e
Signed-off-by: Neale Ranns <nranns@cisco.com>
Damjan Marion [Mon, 6 Mar 2017 11:02:50 +0000 (12:02 +0100)]
features: take device-input buffer advance value directly
Change-Id: Ifac7d9134d03d79164ce6f06ae9413279bbaadb3
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Fri, 3 Mar 2017 07:51:08 +0000 (08:51 +0100)]
BFD: drop rpc call if packet doesn't match session
In a very unlikely scenario, during which a session is removed
and replaced with a different session sharing the same session
index, while a packet is in-flight during RPC call, drop that packet.
Change-Id: If1c4a77fc2ab460bae2435db066a133185b98747
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Mon, 6 Mar 2017 02:27:05 +0000 (03:27 +0100)]
BFD: remove unneeded code
Change-Id: I0371e8e3c94bb793e3c64d5f51aaebf19dddc4b4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Thu, 2 Mar 2017 10:29:19 +0000 (11:29 +0100)]
make test: reset object registry if vpp dies
Change-Id: If0e30837e07a21f3912676f5147cb242d3d2b235
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Thu, 2 Mar 2017 10:27:11 +0000 (11:27 +0100)]
make test: tell vpp to set coredump size
Unless overridden by COREDUMP_SIZE env variable, tell VPP to set
coredump size to unlimited, otherwise use $COREDUMP_SIZE as
the argument.
Change-Id: Ia2a6508207c66a171b33d272c820b1deb4a83e82
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Klement Sekera [Thu, 2 Mar 2017 10:13:30 +0000 (11:13 +0100)]
Add support for unix { coredump-size <size> }.
Use setrlimit to set the core size limit if the argument is passed to
vpp.
Change-Id: Ie76c082b2af81337310fcb1925af915a42067f15
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Pavel Kotucek [Tue, 24 Jan 2017 07:33:38 +0000 (08:33 +0100)]
span: wrong destination interface in tracing
Change-Id: I9bea397e50fff4211c6e1e31503829e4dd16be42
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Damjan Marion [Mon, 6 Mar 2017 10:53:10 +0000 (11:53 +0100)]
Quad loop interface-output node
Change-Id: I0c24d9af90241083ae56b1d52239d2d55e70b65e
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Mon, 6 Mar 2017 11:06:29 +0000 (12:06 +0100)]
dpdk: init.c should be under device/
Change-Id: I80831cee062a38a0f5ab1f1e56c2dc6dcd512b9d
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Thu, 2 Mar 2017 07:16:20 +0000 (08:16 +0100)]
make test: don't run if other vpp process runs
Check if there are existing vpp processes before running the test suite
and refuse to run if there are. This prevents the removal of other test
suite temporary files and also makes sure that if the machine is loaded
by (zombie) vpp processes, interactive tests (like bfd) won't fail.
Change-Id: I88a74098188cb3f51966de5db19d7f80f39e51e2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Martin [Fri, 3 Mar 2017 13:35:41 +0000 (05:35 -0800)]
SNAT: session dump last heard type fix
Change-Id: I3323f7d4bb5da4bc2b19637964e5467ac92680cd
Signed-off-by: Martin <magalik@cisco.com>
Dave Barach [Sat, 4 Mar 2017 13:35:48 +0000 (08:35 -0500)]
Fix duplicate binary API registration messages / bugs
Changed vat_api_hookup(...) to <plugin-name>_api_hookup, change to
static functions. Fixed the related emacs-lisp plugin skeleton.
Change-Id: Id14f8fc3138751f469d48fecb26175e938f5f028
Signed-off-by: Dave Barach <dave@barachs.net>
Alexander Popovsky (apopovsk) [Sat, 4 Mar 2017 00:06:26 +0000 (16:06 -0800)]
Export session.api.h for out-of-tree builds
session.api.h is included in src/vnet/vnet_all_api_h.h
since
68b0fb0c620, as such it should be added to the 'devel' package
and installed for out-of-tree builds which use binary VPP API
Change-Id: Ie8ad03d8df2a96cbc6913f767500d5ff34dcc915
Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
Neale Ranns [Mon, 20 Feb 2017 17:42:36 +0000 (09:42 -0800)]
DHCPv6 - Be consistent with the use of MFIB index as the RX FIB index for DHCPv6. For the same table ID, the unicast-FIB index is not necessarily the same value as the multicast-FIB index, since features (like LISP, SR) can create unicast-tables, and thus affect only the index of the unicast FIBs
Change-Id: Ibfa334d7eda822f742c241b7ce69a6271b4753a9
Signed-off-by: Neale Ranns <nranns@cisco.com>
Florin Coras [Wed, 1 Mar 2017 16:17:34 +0000 (08:17 -0800)]
Cleanup URI code and TCP bugfixing
- Add CLI/API to enable session layer, by default it's disabled
- Improve rcv wnd computation
- Improvements to tx path
- URI code cleanup
- Builtin test tcp server
- Improve src port allocation
Change-Id: I2ace498e76a0771d4c31a8075cc14fe33d7dfa38
Signed-off-by: Florin Coras <fcoras@cisco.com>
Pablo Camarillo [Wed, 7 Dec 2016 17:34:18 +0000 (18:34 +0100)]
Evolving SRv6 (Segment Routing for IPv6)
Implements:
1.- SR Policies with several (weighted) SID lists
2.- Binding SID
3.- SR LocalSIDs with support for the following functions
- End
- End.X
- End.DX6
- End.DX4
- End.DX2
- End.DT6
- End.DT2
- End.B6
- End.B6.Encaps
4.- SR Steering policies (to steer a traffic through an SR Policy)
- Support for IPv6 traffic (IPv6 Encapsulation / SRH insertion)
- Support for IPv4 traffic (IPv6 Encapsulation)
- Support for L2 traffic
(T.Insert / T.Encaps)
5.- Doxygen documentation
6.- Framework (APIs) to allow the definition of new SR LocalSID behaviors by means of plugins
7.- Sample SRv6 LocalSID plugin
Change-Id: I2de3d126699d4f11f54c0f7f3b71420ea41fd389
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
Andrew Yourtchenko [Wed, 1 Feb 2017 14:08:21 +0000 (14:08 +0000)]
timing wheel: avoid queueing expired timers and caching wrong earliest expiry value
This commit addresses two issues:
1) Avoid refilling the timing wheel with stale timers in rare circumstances.
The timing_wheel_advance() may call advance_cpu_time_base() to update the cpu_time_base,
which is used as a starting point for 32-bit offsets of events on the timer wheel.
If the timing_wheel_advance() is not called for a longer period of time,
then advance_cpu_time_base() is called multiple times in a loop.
advance_cpu_time_base() has two parts - the first part adjusting
the base for the existing event, and the second part trying to fill
with the new events from the overflow queue, which now fit into
the 32-bit-sized time window off the new cpu_time_base.
In doing so this second part incorrectly considers the timers which
have just expired (have the time index == w->current_time_index)
to still be unexpired and places them onto the wheel instead of returning
them as expired.
For quick successive executions of timing_wheel_advance() these events
result in a relatively benign late expiry - the newly placed events expire
during the next call to timing_wheel_advance().
If the successive executions of timing_wheel_advance() result in multiple
invocations of advance_cpu_time_base(), the Nth iteration of it may place a stale
event on the timer wheel if the event time index equals to the current time index
(which has been previously purged), while the N+1th iteration of it will trigger
an assert violation on this stale event, resulting in a reboot.
As part of the testing, two test runs were done before and after the change.
Each of the test runs consisted of the following command:
for i in `seq 1 300`; do ./test_timing_wheel validate events 10000 synthetic-time verbose seed $i iter 10000 wait-time 2 max-time 300; done
The test runs completed identically, however they uncovered the following assert failure:
vpp/src/vppinfra/test_timing_wheel.c:225 (test_timing_wheel_main) assertion `min_next_time[0] <= tm->events[i]' fails
This assert is the second issue covered by this commit:
2) Inserting a new element may result in incorrect cached expiry value
The w->cached_min_cpu_time_on_wheel is being updated within timing_wheel_advance() every time
the elements are expired.
However, it is not touched if the new elements are inserted. Assuming current time is "T"
and the cached min cpu time is "T+X", if a new element is being inserted whose expiry time is "T+Y",
and Y is such that Y < X, then the value w->cached_min_cpu_time_on_wheel becomes incorrect
until the next expiry event, during which it is updated. The test catches this transient condition
which results in the asserts seen in the runs above.
The solution is to update the w->cached_min_cpu_time_on_wheel within timing_wheel_insert_helper()
as necessary.
Change-Id: I56a65a9a11cc2a1e0b36937a9c6d5ad10233a731
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Jon Loeliger [Thu, 23 Feb 2017 19:57:35 +0000 (13:57 -0600)]
Implement a loopback instance allocation scheme.
To support creating loopback interfaces with a specific
instance number, a new CREATE_LOOPBACK_INSTANCE API call
with flag is_specified and value user_instance is introduced.
Presumably the existing CREATE_LOOPBACK API message will be
obsoleted and revmoved.
The VAT cli commands can now mention and format
the new field as 'instance %d' data. If no instance
number is named, the old call CREATE_LOOPBACK is used
to maintain backward compatibility. However, if the
instance is named, the new CREATE_LOOPBACK_INSTANCE
message will be used.
Both the dynamically allocated and user-requested instance
number are tracked in a bitvector. If is_specified is 0,
the next free instance will be used.. A request for a specific
instance number will be granted if it is available. On error,
the value ~0 is returned.
Change-Id: I849815563a5da736dcd6bccd262ef49b963f6643
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Pablo Camarillo [Fri, 3 Mar 2017 19:47:55 +0000 (20:47 +0100)]
Fixed PLUGIN_DISABLE bug
Change-Id: I7a0ff25a8f74e6eda3a44f2cd7d2e022683accd9
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
John Lo [Fri, 3 Mar 2017 00:21:36 +0000 (19:21 -0500)]
Clean up VXLAN api message handler registration issues
Remove the duplcate VXLAN related API handlers from api.c and keep
the proper ones in ./src/vnet/vxlan/vxlan_api.c.
Change-Id: I3b17e17d735bb453d080243bfa2783ce0de64885
Signed-off-by: John Lo <loj@cisco.com>
Andrew Yourtchenko [Fri, 3 Mar 2017 13:11:30 +0000 (13:11 +0000)]
VPP-651: Ensure sw_if_index to node mapping for L2 output path is only done via l2output_main.next_nodes
Before this commit, several output features that happen to be the
last in the list of features to be executed, send the packets directly
to <interfaceName>-output. To do this, they use l2_output_dispatch,
which builds a list of sw_if_index to next index mappings.
When interfaces are deleted and the new interfaces are created,
these mappings become stale, and cause the packets being sent to wrong
interface output nodes.
This patch (thanks John Lo for the brilliant idea!) adds a feature node "output",
whose sole purpose is dispatching the packets to the correct interface output
nodes. To do that, it uses the l2output_main.next_nodes, which is already
taken care of for the case of the sw_if_index reuse, so this makes the dependent
features all work correctly.
Since this changes the packet path, for the features that were always the last ones
it has triggered a side problem of the output feat_next_node_index not being properly
initalized. These two users are l2-output-classify node and the output nodes belonging
to the acl-plugin.
For the first one the less invasive fix is just to initialize that field.
For the acl-plugin nodes, rewrite the affected part of the code to use
feat_bitmap_get_next_node_index since this is essentially what the conditional
in l2_output_dispatch does, and fix the compiler warnings generated.
This fix was first made in stable/1701 under commit
e7dcee4027854b0ad076101471afdfff67eb9011.
Change-Id: I32e876ab1e1d498cf0854c19c6318dcf59a93805
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Dave Barach [Thu, 2 Mar 2017 23:24:10 +0000 (18:24 -0500)]
Improve api trace replay consistency checking
Change-Id: I2c4b9646d53e4c008ccbe6d09c6a683c776c1f60
Signed-off-by: Dave Barach <dave@barachs.net>
Neale Ranns [Sat, 18 Feb 2017 16:16:41 +0000 (08:16 -0800)]
IPv6 RA improvements
1) tests for RA options
2) memleaks deleteing a ip6_radv_info_t
3) MLD prefix code refactoring
Change-Id: I34db103994bd8fbdbbec50b202d72770dd145681
Signed-off-by: Neale Ranns <nranns@cisco.com>
Neale Ranns [Tue, 14 Feb 2017 07:20:04 +0000 (23:20 -0800)]
Changing the IP table for an interface is an error if the interface already has an address configured (VPP-601)
Change-Id: I311fc264f73dd3b2b3ce9d7d1c33cd0515b36c4a
Signed-off-by: Neale Ranns <nranns@cisco.com>
Klement Sekera [Wed, 1 Mar 2017 08:53:19 +0000 (09:53 +0100)]
python API: work towards python/vpp api separation
This change improves vpp_papi behaviour by introducing alternate way of
calling vpp APIs.
The common code is the same:
vpp = VPP(...)
vpp.connect(...)
Calling VPP API is different, instead of deprecated:
vpp.show_version() # deprecated
one should write
vpp.api.show_version()
this allows VPP messages like "connect" and "disconnect" to be used,
once the old API is dropped (in 17.07). Also part of this patch is a
check for name conflict, to prevent VPP object overwriting its own
functionality with generated code based on json files.
Change-Id: I22e573b6a45f8b2a1f0340c5c2597c194fe42ca4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Dave Barach [Thu, 2 Mar 2017 12:38:52 +0000 (07:38 -0500)]
VPP-608: fix coverity warning in vppapigen
Change-Id: Ic26216bb03d941c1625a61c1c3340d2d70d84bd0
Signed-off-by: Dave Barach <dave@barachs.net>
John Lo [Thu, 2 Mar 2017 17:51:45 +0000 (12:51 -0500)]
Fix create_vlan_subif API using sw_if_index as hw_if_index
Also added check for bounded interface.
Change-Id: I44b981d5b6fbe360e0b95c326f3f8b0e6c715468
Signed-off-by: John Lo <loj@cisco.com>
Dave Barach [Thu, 2 Mar 2017 18:13:23 +0000 (13:13 -0500)]
Clean up binary api message handler registration issues
Removed a fair number of "BUG" message handlers, due to conflicts with
actual message handlers in api_format.c. Vpp itself had no business
receiving certain messages, up to the point where we started building
in relevant code from vpp_api_test.
Eliminated all but one duplicate registration complaint. That one
needs attention from the vxlan team since the duplicated handlers have
diverged.
Change-Id: Iafce5429d2f906270643b4ea5f0130e20beb4d1d
Signed-off-by: Dave Barach <dave@barachs.net>
Eyal Bari [Thu, 2 Mar 2017 08:43:19 +0000 (10:43 +0200)]
bridge domain: fix members reordered when removing
since adding support for multicast vxlan flooding (flood class tunnel master)
correct flood functionality depends on the order of the memebers vector
solved by using vec_delete instead of vec_del1 which swaps members before deleting the last element
Change-Id: I234f218d49172b4142c567db9699a5cb274e4a66
Signed-off-by: Eyal Bari <ebari@cisco.com>
magalik [Thu, 9 Feb 2017 07:25:45 +0000 (23:25 -0800)]
SNAT: user's dump and session dump of a certain snat user.
Change-Id: If75a35dbdcb43c1ce0128b8649f2ca3970d3fff5
Signed-off-by: Martin <magalik@cisco.com>
Neale Ranns [Sat, 25 Feb 2017 12:20:00 +0000 (04:20 -0800)]
Remove the unused VRF ID parameter from the IP neighbour Add/Del API
Change-Id: Icf0d72f6af1f98c86f78e586c354515ac69804aa
Signed-off-by: Neale Ranns <nranns@cisco.com>
John Lo [Tue, 28 Feb 2017 21:34:35 +0000 (16:34 -0500)]
Determine pkt type in dpdk-input node using ethertype only (VPP-647)
Remove reliance on DPDK driver provided mbuf packet type in dpdk-input
node as some NIC driver provide misleading information. Now using
ethertype from the packet itself to determine packet type for next node.
Change-Id: Ie7b514a984f9382c29f1a1e3eb423d68f817c064
Signed-off-by: John Lo <loj@cisco.com>
Jan Gelety [Thu, 2 Mar 2017 08:51:27 +0000 (09:51 +0100)]
Update CSIT tests 170220 -> 170302
- update of CSIT operational branch to be used for VPP-patch test
Change-Id: Ia8078ae23e0e6fb701e141fd0701fb82987743d7
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Florin Coras [Tue, 28 Feb 2017 12:13:21 +0000 (04:13 -0800)]
Fix LISP Coverity warning
Change-Id: Id1c3832609859ed004bacba0ced0d07dafd6c409
Signed-off-by: Florin Coras <fcoras@cisco.com>
Billy McFall [Wed, 1 Mar 2017 22:01:06 +0000 (17:01 -0500)]
VPP-648: CLI Memory leak with invalid parameter
After VPP-635 was merged, did one more pass. While the code was waiting
to be merged, a few changes were merged to master with the same issue.
This is a few additional changes addressing the same issue. See VPP-635.
Change-Id: I7abeac5c260c1e2e9d9d318fd1aae24cd6932efc
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Klement Sekera [Thu, 23 Feb 2017 08:26:30 +0000 (09:26 +0100)]
BFD: command line interface
Implement command line interface to the BFD binary APIs. Add
corresponding unit tests.
Change-Id: Ia0542d0bc4c8d78e6f7b777a08fd94ebfe4d524f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Damjan Marion [Tue, 28 Feb 2017 18:22:22 +0000 (19:22 +0100)]
dpdk: be a plugin
Change-Id: I238258cdeb77035adc5e88903d824593d0a1da90
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Wed, 1 Mar 2017 19:53:59 +0000 (20:53 +0100)]
vppinfra: fix issue when copying 16 bytes with clib_memcpy
Current code wos copying same data twice when length is 16.
Change-Id: I8d935b32f61672aaea9789c097a5083ae8f78cdd
Signed-off-by: Damjan Marion <damarion@cisco.com>
Ole Troan [Wed, 1 Mar 2017 18:27:24 +0000 (19:27 +0100)]
Initial Release notes for 17.04.
Change-Id: I91a38fe02646438a0cdad92cbb66342a437e8ff9
Signed-off-by: Ole Troan <ot@cisco.com>
Damjan Marion [Fri, 17 Feb 2017 16:11:35 +0000 (17:11 +0100)]
Add MAINTAINERS file
Change-Id: I67819c72a5b3de7bcc7d55ab34f0c95f947578e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Barach [Tue, 28 Feb 2017 20:15:56 +0000 (15:15 -0500)]
VPP-598: tcp stack initial commit
Change-Id: I49e5ce0aae6e4ff634024387ceaf7dbc432a0351
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Dave Barach [Wed, 1 Mar 2017 16:38:02 +0000 (11:38 -0500)]
Fix buffer template copy
Change-Id: If451c9cb68719fc816999b0330b9be3a0169176a
Signed-off-by: Dave Barach <dave@barachs.net>
Damjan Marion [Tue, 28 Feb 2017 20:55:28 +0000 (21:55 +0100)]
devices: vnet_get_aggregate_rx_packets should not be dpdk specific
Change-Id: I1152db4b7d1602653d7d8b2c6cb28cf5c526c4ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Tue, 28 Feb 2017 22:26:30 +0000 (23:26 +0100)]
dpdk: retire support for dpdk 16.07
Change-Id: I8585552c026415340fe9fd0458cb8450da3c4ae2
Signed-off-by: Damjan Marion <damarion@cisco.com>
John Lo [Tue, 28 Feb 2017 18:10:52 +0000 (13:10 -0500)]
Clear L2 output config on interface mode change to L3 (VPP-651)
With VPP-651, the L2 output config with L2-tag rewrite was not
cleared when a sub-interface is deleted. Subsequently, when the
same sw_if_index was reused for another interface, the L2 output
config with L2-tag rewrite remained on the new interface.
On deleting a (sub-)interface which is in L2 mode, it will be
changed to L3 mode first to clear any L2 config. The L2 to L3 mode
change path did address L2 input config cleanup. It is now fixed
to also clear L2 output config.
Change-Id: I3352a89d92e1b27340a5adcf75bbaa01a5050c29
Signed-off-by: John Lo <loj@cisco.com>
Damjan Marion [Wed, 25 Jan 2017 13:18:03 +0000 (14:18 +0100)]
vlib: add buffer cloning support
Change-Id: I50070611af15b2b4cc29664a8bee4f821ac3c835
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dave Barach [Mon, 27 Feb 2017 14:25:39 +0000 (09:25 -0500)]
Fix warning in generated code
Change-Id: Ie56fca84a8a0ed77ee480e8078e6e9b3f4cef105
Signed-off-by: Dave Barach <dave@barachs.net>
Dave Barach [Mon, 27 Feb 2017 18:10:27 +0000 (13:10 -0500)]
Trace plugin binary API message range allocation
Change-Id: I544a5d2906548607b69f999567b92f802fddddbb
Signed-off-by: Dave Barach <dave@barachs.net>
Klement Sekera [Mon, 27 Feb 2017 11:49:27 +0000 (12:49 +0100)]
BFD: disable debug prints
Change-Id: I356581f4bdf47b9610b9e50f4f8db9a1510872a7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Damjan Marion [Mon, 27 Feb 2017 10:29:20 +0000 (11:29 +0100)]
vlib: add VLIB_BUFFER_EXT_HDR_VALID flag
Change-Id: If56c66dd12eded1cc997087de5fd1b975766c4e2
Signed-off-by: Damjan Marion <damarion@cisco.com>
Neale Ranns [Fri, 17 Feb 2017 05:57:05 +0000 (21:57 -0800)]
[Proxy] ARP tests
Change-Id: I40d6d763b55a26cdee0afef85d1acdd19dd10dd6
Signed-off-by: Neale Ranns <nranns@cisco.com>
Filip Tehlar [Tue, 21 Feb 2017 17:28:34 +0000 (18:28 +0100)]
Add GPE CLI/API for setting encap mode
Change-Id: Id89e23fb5d275572b2356c073dfa0f55719e1a76
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Eyal Bari [Sun, 26 Feb 2017 13:27:27 +0000 (15:27 +0200)]
fix:vxlan mcast adj - added as ucast dpo adj
Change-Id: Ic2447313075cd46f265202dffaaac894f48ddf6d
Signed-off-by: Eyal Bari <ebari@cisco.com>
Dave Barach [Sat, 25 Feb 2017 21:38:12 +0000 (16:38 -0500)]
Load plugins in alphabetical order
API traces contain absolute message numbers. Loading plugins in
directory (vs. alphabetical) order makes trace replay fragile.
Change-Id: I46b3a3b6a9843a383d42269fca0cf5a789486eaf
Signed-off-by: Dave Barach <dave@barachs.net>
Klement Sekera [Thu, 16 Feb 2017 09:53:53 +0000 (10:53 +0100)]
BFD: echo function
Change-Id: Ib1e301d62b687d4e42434239e7cd412065c28da0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Florin Coras [Thu, 23 Feb 2017 07:38:08 +0000 (23:38 -0800)]
Add NSH to GPE decap path
Change-Id: I97681322fa9ca81736100b4d32eab84868886c7b
Signed-off-by: Florin Coras <fcoras@cisco.com>
Neale Ranns [Fri, 24 Feb 2017 16:29:22 +0000 (08:29 -0800)]
MFIB: changes to improve route add/delete performance
Change-Id: I063d85200d12b09545ae1c373c7fc69112ae3b34
Signed-off-by: Neale Ranns <nranns@cisco.com>
Jan Gelety [Thu, 23 Feb 2017 14:01:29 +0000 (15:01 +0100)]
Enable tests with VRF reset
- needed to filter out ICMPv6 Neighbor Discovery - Neighbor
Advertisement packets
- needed to reset routes of reset VRFs learned from ICMPv6
Neighbor Discovery - Neighbor Advertisement packets after
run_verify_test()
Change-Id: I8238d8f73428d511ab68ab7765d99ce7dc3a6633
Signed-off-by: Jan Gelety <jgelety@cisco.com>