vpp.git
7 years ago64 bit per-thread counters 62/5762/5
Neale Ranns [Wed, 15 Mar 2017 19:41:17 +0000 (15:41 -0400)]
64 bit per-thread counters

after:
TenGigabitEthernet5/0/1-output   active             107522        17375708               0          7.22e0          161.60
TenGigabitEthernet5/0/1-tx       active             107522        17375708               0          6.93e1          161.60
ip4-input-no-checksum            active             107522        17375708               0          2.52e1          161.60
ip4-lookup                       active             107522        17375708               0          3.10e1          161.60
ip4-rewrite                      active             107522        17375708               0          2.52e1          161.60

before
TenGigabitEthernet5/0/1-output   active             433575       110995200               0          6.95e0          256.00
TenGigabitEthernet5/0/1-tx       active             433575       110995200               0          7.14e1          256.00
ip4-input-no-checksum            active             433575       110995200               0          2.66e1          256.00
ip4-lookup                       active             433575       110995200               0          3.29e1          256.00
ip4-rewrite                      active             433575       110995200               0          2.59e1          256.00

Change-Id: I46405bd22189f48a39f06e3443bb7e13f410b539
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix IP feature ordering. 79/5779/4
Neale Ranns [Thu, 16 Mar 2017 19:49:09 +0000 (15:49 -0400)]
Fix IP feature ordering.

Drop comes before lookup when enabled. is_first_or_last is not required when setting a feature, the anchor is added in find_config_with_features().
Don't make the PG interfaces automatically L3 enabled, this way we can have tests that check the L3 protocol disbaled behaviour.

Change-Id: Icef22a920b27ff9cec6ab2da6b05f05c532cb60f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMPLS performance improvments. 75/5775/4
Neale Ranns [Thu, 16 Mar 2017 11:34:55 +0000 (07:34 -0400)]
MPLS performance improvments.

 1 - Quad loop lookup and label imposition.
 2 - optimise imposition for the 1 label case
 3 - input gets TTL from header directly (no byte swap)

Change-Id: I59204c9e5d134b0df75d7afa43e360f946d1ffe7
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAttached hosts 20/5720/6
Neale Ranns [Sat, 11 Mar 2017 13:55:21 +0000 (05:55 -0800)]
Attached hosts

allow this config to function:
  set int ip address loop0 169.254.1.1/32  (the default GW address for attached hosts)
  set int unnumbered af_packet0 use loop0  ('enable' IP on the host interface)
  ip route add 192.168.1.1/32 via af_packet0 (where to find the host)
repeat for each host and host interface.
Inter-host communication is throught the /32 routes.
To allow this:
 1 - attached host routes have the ATTACHED flag set, so the ARP code accepts then as legitimate sources
 2 - unnumbered interfaces inherit the source address from the IP interface

Change-Id: Ib66c5f0e848c528f79372813adc3a0c11b50717f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoPython API: Fix RPM packaging (again). 83/5783/2
Ole Troan [Fri, 17 Mar 2017 08:54:51 +0000 (09:54 +0100)]
Python API: Fix RPM packaging (again).

Change-Id: I5c510cde1227a131ddda58d090cd5dbf112ce1fb
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agovlib: fix potential crash in dispatch_node ELOG_DATA call 16/5516/2
Steven [Fri, 24 Feb 2017 18:03:22 +0000 (10:03 -0800)]
vlib: fix potential crash in dispatch_node ELOG_DATA call

dispatch_node may be invoked from vlib main or worker threads. The call to
ELOG_DATA in dispatch_node passes the parameter &vm->elog_main. It works fine
when dispatch_node is invoked from the main thread. It does bad thing when it
is invoked from the worker thread.

While we are at it, make two additional enhancements to the same area.
1. Use ELOG_TRACK_DATA instead of ELOG_DATA to enhance g2 viewer presentation.
2. Since ELOG_DATA is in the data path, it could get very chatty. Make the call
to ELOG_TRACK_DATA conditional compile.

Change-Id: I80ca0eea10bc1e5d0d5549f9844dd9a34dbb65a2
Signed-off-by: Steven <sluong@cisco.com>
7 years agoCache a 'has-features' flag on the adjacency for faster access. Reclaim the node_inde... 61/5761/4
Neale Ranns [Wed, 15 Mar 2017 16:34:25 +0000 (12:34 -0400)]
Cache a 'has-features' flag on the adjacency for faster access. Reclaim the node_index memeber from the rewrite for space - this is only used for formtting

before:
  ip4-rewrite * * * *  2.66e1  256.00
after:
  ip4-rewrite * * * *  2.40e1  256.00

Change-Id: Ic397150727cad38811564777419ad6bd26b8a3a6
Signed-off-by: Neale Ranns <nranns@wasa-ucs-11.cisco.com>
7 years agoUse the feature anchor in the MPLS input arc - it performs much better 80/5780/2
Neale Ranns [Thu, 16 Mar 2017 20:12:57 +0000 (16:12 -0400)]
Use the feature anchor in the MPLS input arc - it performs much better

Change-Id: I3d64ddb248478accd4d9b3124f018c9aab63a60f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAdjacency refinement; check the cover's interface against the adjacency's 16/5716/2
Neale Ranns [Fri, 10 Mar 2017 19:53:27 +0000 (11:53 -0800)]
Adjacency refinement; check the cover's interface against the adjacency's

Change-Id: I3fa2f35056b74e479288bb956f2713f727a81c72
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAdd epel-rpm-macros for CentOS/RHEL install-dep 81/5781/1
Alexander Popovsky (apopovsk) [Fri, 17 Mar 2017 01:21:14 +0000 (18:21 -0700)]
Add epel-rpm-macros for CentOS/RHEL install-dep

%py2_install is required by vpp-api-python and is not available on
bare CentOS/RHEL install, causing 'fg: no job control' error.
Added 'epel-rpm-macros' to the list of EPEL dependencies

Change-Id: I1e09d7d825d9d8db06e7385d2b8d5579c8ce748b
Signed-off-by: Alexander Popovsky (apopovsk) <apopovsk@cisco.com>
7 years agovlib: additional runtime_data checks 78/5778/2
Damjan Marion [Thu, 16 Mar 2017 16:46:41 +0000 (17:46 +0100)]
vlib: additional runtime_data checks

Change-Id: I9b6ed9741fae89bdefa6f601398eb63a21155069
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoping: Fix coverity error 163907 70/5770/2
Andrew Yourtchenko [Thu, 16 Mar 2017 12:24:24 +0000 (12:24 +0000)]
ping: Fix coverity error 163907

Return an error if the ip6_interface_first_address decides to return NULL.

Change-Id: Iea0184382b8fbe2af81a781c3671687a1fbb5b32
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoAPI:replaced all REPLY_MACRO's with api_helper_macros.h 65/5765/2
Eyal Bari [Thu, 16 Mar 2017 08:02:57 +0000 (10:02 +0200)]
API:replaced all REPLY_MACRO's with api_helper_macros.h

Change-Id: I08ab1fd0abdd1db4aff11a38c9c0134b01368e11
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agovhost: wrong value return for VHOST_USER_VRING_GET_BASE 00/5700/4
Steven [Fri, 10 Mar 2017 07:49:32 +0000 (23:49 -0800)]
vhost: wrong value return for VHOST_USER_VRING_GET_BASE

When the VM is migrated, the driver sends VHOST_USER_VRING_GET_BASE
message to the device to get the vring offset. The device is
supposed to shut down the vring, and return the current vring offset.
What the code did was to shutdown the vring, initialize the vring,
and return 0 to the driver.

The fix is to first store last_avail_idx in the message and then close
the vring.

Change-Id: I432e9f50f36d89fe53a45e050edcf5e1218caf7a
Signed-off-by: Steven <sluong@cisco.com>
7 years agovlib: make runtime_data thread-local 46/5746/9
Damjan Marion [Thu, 16 Mar 2017 10:32:09 +0000 (11:32 +0100)]
vlib: make runtime_data thread-local

Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoPython API: Change from cPython to CFFI. 66/5666/14
Ole Troan [Wed, 8 Mar 2017 11:02:24 +0000 (12:02 +0100)]
Python API: Change from cPython to CFFI.

Change-Id: I03e52466fb3f909ae52b8fba601168f3eadbd972
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoNo vector allocation during buffer copy 52/5752/3
Neale Ranns [Wed, 15 Mar 2017 08:28:31 +0000 (01:28 -0700)]
No vector allocation during buffer copy

Change-Id: I7e8556af833ca0e00fadc96dcd2077ff1104541b
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAPI: define optional base_id for REPLY_MACRO's 54/5754/2
Eyal Bari [Wed, 15 Mar 2017 12:54:19 +0000 (14:54 +0200)]
API: define optional base_id for REPLY_MACRO's

this enables sharing the api_helper_macros.h implementation

Change-Id: Ie3fc89f3b4b5a47fcfd4b5776db90e249c55dbc3
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoFix binary-api cmd/arg split logic 55/5755/1
Dave Barach [Wed, 15 Mar 2017 13:52:19 +0000 (09:52 -0400)]
Fix binary-api cmd/arg split logic

Change-Id: If3dbce830684b5eab8944519424074b03cc7d703
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVXLAN:add hidden multicast interface check 49/5749/3
Eyal Bari [Wed, 15 Mar 2017 06:23:42 +0000 (08:23 +0200)]
VXLAN:add hidden multicast interface check

and some refactoring

Change-Id: I99e3c5e782ce65cb9779ccc3a9a3151ef1429e07
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoVPP changes to support iOAM over NSH-MD2. Separate trace data 98/5698/4
Vengada [Fri, 10 Mar 2017 06:05:02 +0000 (22:05 -0800)]
VPP changes to support iOAM over NSH-MD2. Separate trace data
structure definitions into two files to share code with NSH
plugin (iOAM)

Change-Id: I0192551f71678e4f814bc6a7d25200a1580f3033
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agoFix packet trace output: dpdk_rx_trace must decode the actual ethertype 45/5745/3
Dave Barach [Tue, 14 Mar 2017 16:23:30 +0000 (12:23 -0400)]
Fix packet trace output: dpdk_rx_trace must decode the actual ethertype

As opposed to rubbish (typically) 14 octets past the ethertype.
Also fix buffer error code setup in dpdk-input node single loop.

Change-Id: Ide7c4097d3bb91e62749ed4e1d69a7b4b90225de
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: John Lo <loj@cisco.com>
7 years agoAPI:support hidden sw interfaces 41/5741/3
Eyal Bari [Tue, 14 Mar 2017 12:39:51 +0000 (14:39 +0200)]
API:support hidden sw interfaces

validate interfaces - added check for hidden interfaces
interface dump - dont send hidden interfaces
set_unnumbered - test for hidden

vl_api_create_vlan_subif_t_handler, vl_api_create_subif_t_handler - fixed potential memory leak

some other minor refactors to make code clearer and shorter

Change-Id: Icce6b724336b7d1536fbd07a74bf7abe4916d2c0
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoTry again: __COVERITY__ vs __COVERITY 43/5743/2
Dave Barach [Tue, 14 Mar 2017 13:44:11 +0000 (09:44 -0400)]
Try again: __COVERITY__ vs __COVERITY

Hate it when that happens...

Change-Id: I725c8539d6349755e9d75ae05f2703c83ea704be
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoClean up dead API client reaper callack scheme 42/5742/1
Dave Barach [Tue, 14 Mar 2017 13:10:56 +0000 (09:10 -0400)]
Clean up dead API client reaper callack scheme

Change-Id: Iec3df234ca9f717d87787cefc76b73ed9ad42332
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoNasm > 2.11.06 required for sw_crypto. 23/5723/2
Thomas F Herbert [Sat, 11 Mar 2017 20:26:36 +0000 (15:26 -0500)]
Nasm > 2.11.06 required for sw_crypto.

Change-Id: I7583d3074478579a841c7827a12a4a8fc74d9d61
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoioam: ip6 hop by hop ext header and SR header co-existence 90/5690/3
shwethab [Thu, 9 Mar 2017 16:58:26 +0000 (16:58 +0000)]
ioam: ip6 hop by hop ext header and SR header co-existence

1. Fix finding sr extension header
2. Fix for assert checks for space for sr header in packet headroom
3. ioam build warnings
4. Fix for SR header removal in presence of hbh ext header
   clib_memcpy with overlapping src/dst was failing

Change-Id: I8576204eb571d1d4725a4e6976e18fe61cd1cd35
Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
7 years agovlib: poll pre_input nodes only on main thread 38/5738/2
Damjan Marion [Tue, 14 Mar 2017 10:10:00 +0000 (11:10 +0100)]
vlib: poll pre_input nodes only on main thread

Change-Id: I61464fd1610a9754693f31edd72f9fa1b6926511
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoioam: fix warnings 39/5739/2
Damjan Marion [Tue, 14 Mar 2017 10:53:15 +0000 (11:53 +0100)]
ioam: fix warnings

Change-Id: I0148f82cee56eaf0f6485294c8c70793266f1ed6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoIOAM Coverity fix 14/5714/7
AkshayaNadahalli [Fri, 10 Mar 2017 18:38:13 +0000 (18:38 +0000)]
IOAM Coverity fix

Coverity IDs - 163911, 163910, 163909, 163908, 163905, 163904, 163896, 161957, 161955

Change-Id: Ida822fa45c6936240f61282e2280541d7e6427b3
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoUpdate CSIT tests 170302 -> 170313 27/5727/2
Jan Gelety [Mon, 13 Mar 2017 08:16:32 +0000 (09:16 +0100)]
Update CSIT tests 170302 -> 170313

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

Change-Id: I1a312a4a3085930c0019ec6832cb9f482174eea3
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoVPP-659 Improve tcp/session debugging and testing 25/5725/7
Florin Coras [Tue, 7 Mar 2017 18:06:24 +0000 (10:06 -0800)]
VPP-659 Improve tcp/session debugging and testing

- event-logging support for tcp and session layer
- improvements to uri test code
- builtin_server on port 1234
- use the CLOSEWAIT timer when we rx FIN in FIN_WAIT_2 state

Change-Id: Ibc445f164b2086b20323bf89c77cffd3059f570f
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-279: Document changes for vnet/vnet/devices 15/5715/2
Billy McFall [Fri, 10 Mar 2017 19:49:15 +0000 (14:49 -0500)]
VPP-279: Document changes for vnet/vnet/devices

Add doxygen documentation for DPDK crypto CLI command.

The move of DPDK to a plugin invalidated the local dir.dox. So moved
dpdk/dir.dox to dpdk/device/dir.dox to fix.

Change-Id: I229e2921c4b0cdd380021adb520cd2089a376afa
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoAdd MAC address check in ethernet-input node if interface in L3 mode 18/5718/10
John Lo [Fri, 10 Mar 2017 22:15:22 +0000 (17:15 -0500)]
Add MAC address check in ethernet-input node if interface in L3 mode

Interface can be in promiscuous mode if more than one of its sub-
interface is in L2 mode. In promiscuous mode, L3 interface need to
verify DMAC of packet to match that of the interface and drop if not.
This check was done on sub-interface only and now also added to main
interface path.

Fix incorrect MAC addresses in the flow-per-pkt plugin test, which
caused it to fail.

Fix MAC address usage in BFD tests.

Change-Id: I12a17ec05c7ab298ad10d400c90d082c97eca521
Signed-off-by: John Lo <loj@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoACL plugin rejects ICMP messages (VPP-624) 58/5058/15
Pavel Kotucek [Thu, 2 Mar 2017 14:22:47 +0000 (15:22 +0100)]
ACL plugin rejects ICMP messages (VPP-624)

Change-Id: I95113a277b94cce5ff332fcf9f57ec6f385acec0
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoRefactor SNAT ICMP code 89/5689/3
Juraj Sloboda [Wed, 22 Feb 2017 13:16:06 +0000 (05:16 -0800)]
Refactor SNAT ICMP code

Change-Id: I07de08ef111011694638a8ebe7a13c240714ce7e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoRetire vpp_lite 91/5691/8
Damjan Marion [Thu, 9 Mar 2017 19:38:15 +0000 (20:38 +0100)]
Retire vpp_lite

vpp_lite platform is not needed anymore as same efect can be
achieved with following startup.conf config:

plugins {
plugin dpdk_plugin.so { disable }
}

Change-Id: I690ea8ceb1c6e1fe32e01e7da54e9958019a93bf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovlib: deduplicatee code in main and worker main loop 86/5686/3
Damjan Marion [Thu, 9 Mar 2017 14:42:26 +0000 (15:42 +0100)]
vlib: deduplicatee code in main and worker main loop

Change-Id: Id18d59c9442602633a6310b2001a95bce8b6b232
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVPP-659 TCP improvements 24/5624/14
Florin Coras [Sat, 4 Mar 2017 13:37:52 +0000 (05:37 -0800)]
VPP-659 TCP improvements

- builtin test echo server
- fix SYN-ACK retransmit canceling
- avoid sending spurious ACK if in LAST_ACK
- improved client dummy test app
- renamed tx fifo dequeuing and sending functions to avoid confusion
- improved RST handling

Change-Id: Ia14aad3df319540dcf6e6a4e18a9f8d423a4b83b
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agogmon: fix code commented out by mistake 93/5693/5
Damjan Marion [Thu, 9 Mar 2017 19:54:43 +0000 (20:54 +0100)]
gmon: fix code commented out by mistake

Change-Id: If540787e2443330673ad6721094c4765c32ef59b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoLISP: fix Proxy-ETR show command, VPP-660 05/5705/2
Filip Tehlar [Fri, 10 Mar 2017 12:18:02 +0000 (13:18 +0100)]
LISP: fix Proxy-ETR show command, VPP-660

Change-Id: I8b7dc3bf631bd228db23679534e04b8af7ac4ec7
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoFix vat_api_hookup name collision 07/5707/2
Dave Barach [Fri, 10 Mar 2017 13:37:41 +0000 (08:37 -0500)]
Fix vat_api_hookup name collision

Change-Id: I6a93fdc3f669fa1892d1e1cd5a9685700d6d2683
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-608: warnings be gone 96/5696/2
Dave Barach [Thu, 9 Mar 2017 22:10:25 +0000 (17:10 -0500)]
VPP-608: warnings be gone

Change-Id: I6d30c6a8d1a425c531e7206e46143d528980c48e
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix MAP-E UT. Add functionality in MAP code to delete the pre-resolved next-hops... 03/5703/2
Neale Ranns [Fri, 10 Mar 2017 11:04:12 +0000 (03:04 -0800)]
Fix MAP-E UT. Add functionality in MAP code to delete the pre-resolved next-hops. UT checks for no-leftover-state now pass

Change-Id: I9e980ee117c0b6aebc6c7a0fcc153a7c0eaf0c72
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix coverity CIDs 161048, 163895 02/5702/2
Pavel Kotucek [Fri, 10 Mar 2017 09:03:59 +0000 (10:03 +0100)]
Fix coverity CIDs 161048, 163895

Change-Id: Ic206601413bb366e2a920daf00524e92a47287ef
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoVPP-608 Fix LISP warning 01/5701/2
Florin Coras [Thu, 9 Mar 2017 22:39:54 +0000 (14:39 -0800)]
VPP-608 Fix LISP warning

Change-Id: Iaa4fb2bc2230c1a99c518a37039cd91648dc19c0
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agomake test: temporary disable MAP-E test 97/5697/1
Damjan Marion [Thu, 9 Mar 2017 22:30:42 +0000 (23:30 +0100)]
make test: temporary disable MAP-E test

Change-Id: Iee0302a7a4856712f27f97f9cc953b2e9e71698c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agomake test: automatic sanity check 85/5685/4
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>
7 years agomake test: add make test-shell[-debug] targets 87/5687/2
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>
7 years agovlib_mains == 0 special cases be gone 81/5681/4
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>
7 years agoIMplementation for option to not create a FIB table entry when adding a neighbor... 82/5682/2
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>
7 years agoMAP pre-resolve - use FIB to track pre-resolved next-hop 23/5623/4
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>
7 years agoTests to target holes in adjacency and DPO test coverage 61/5661/4
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>
7 years agoinclude rte_config header before any other dpdk include 51/5651/3
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>
7 years agodpdk: remove unnecesary CFLAGS modification 78/5678/2
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>
7 years agoSNAT: deterministic map dump 72/5672/2
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>
7 years agoSNAT: fix coverity warnings (VPP-608) 70/5670/2
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>
7 years agovlib: add process restart cli 87/5587/2
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>
7 years agomake test: split into basic and extended tests 56/5656/2
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>
7 years agoARP resilience in the absence of IP config on input and output interfaces 77/5677/2
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)

7 years agodpdk: dpdk-input optimizations and fixes 39/5639/5
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>
7 years agoAPI change (only) to not create a FIB table entry when adding a neighbor entry 75/5675/2
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>
7 years agovhost: binary API changes for interrupt mode 64/5664/2
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>
7 years agoChange dpdk input node fixed-sleep units to usec 74/5674/2
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>
7 years agoFLOWPERPKT: New API definition in preparation for stateful flows. 67/5667/3
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>
7 years agodpdk: Fixed QAT devices binding, bind the VFs only 71/5671/2
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>
7 years agoLISP: fix gpe sub-interface lookup 46/5646/3
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>
7 years agoBUG: multiple registrations of 'vl_api_ip6nd_proxy_details_t_handler 68/5668/2
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>
7 years agoSNAT: user_session_dump is_ip4 and vat unformating added 69/5669/2
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>
7 years agoProxy ND (RFC4389 - or a sub-set thereof). This allows the 'emulation' of bridging... 24/5524/7
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>
7 years agoLISP: add stats API/CLI 63/5663/2
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>
7 years agoCGN: fix outside port calculation and set buffer error (VPP-623) 52/5652/2
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>
7 years agoRegister TCP with IP only if session is enabled 59/5659/4
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>
7 years agofix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same expression... 36/5636/3
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>
7 years agoMissing plugin binary API command fns found after brief search 57/5657/2
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>
7 years agoDHCP Multiple Servers (VPP-602, VPP-605) 15/5515/4
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>
7 years agoFix endian issue in ARP Event Reply 58/5658/3
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>
7 years agoCLI: hide deleted interfaces 33/5633/4
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>
7 years agoIn-band OAM active probe (VPP-471) 24/4924/11
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>
7 years agoCGN: Deterministic NAT (VPP-623) 99/5099/26
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>
7 years agoAdd setting of tenant VRF id for SNAT addresses (VPP-641) 42/5642/4
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>
7 years agofix uninitialized ip6 keys within session.c 37/5637/2
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>
7 years agosilence -Wmaybe-uninitialized warning 38/5638/3
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>
7 years agoPython API: Synchronous mode. 48/5648/2
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>
7 years agomake per-adj counters configurable 45/5645/3
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>
7 years agoFixing loadbalancing over ECMP for recursive routes 41/5641/2
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>
7 years agoioam: manycast using iOAM and SR (VPP-628) 46/4746/16
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>
7 years agoBFD: documentation 29/5629/4
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>
7 years agoRemove unused multicast fields from vnet_buffer_t 40/5640/2
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>
7 years agofeatures: take device-input buffer advance value directly 31/5631/4
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>
7 years agoBFD: drop rpc call if packet doesn't match session 28/5628/3
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>
7 years agoBFD: remove unneeded code 27/5627/3
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>
7 years agomake test: reset object registry if vpp dies 95/5595/4
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>
7 years agomake test: tell vpp to set coredump size 94/5594/4
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>
7 years agoAdd support for unix { coredump-size <size> }. 93/5593/4
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>
7 years agospan: wrong destination interface in tracing 27/4827/5
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>
7 years agoQuad loop interface-output node 30/5630/2
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>
7 years agodpdk: init.c should be under device/ 32/5632/2
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>
7 years agomake test: don't run if other vpp process runs 92/5592/3
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>
7 years agoSNAT: session dump last heard type fix 14/5614/2
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>