vpp.git
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>
7 years agoFix duplicate binary API registration messages / bugs 22/5622/1
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>
7 years agoExport session.api.h for out-of-tree builds 21/5621/2
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>
7 years agoDHCPv6 - Be consistent with the use of MFIB index as the RX FIB index for DHCPv6... 16/5616/2
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>
7 years agoCleanup URI code and TCP bugfixing 03/5603/7
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>
7 years agoEvolving SRv6 (Segment Routing for IPv6) 08/5608/10
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>
7 years agotiming wheel: avoid queueing expired timers and caching wrong earliest expiry value 76/4976/8
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>
7 years agoImplement a loopback instance allocation scheme. 72/5572/3
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>
7 years agoFixed PLUGIN_DISABLE bug 19/5619/1
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>
7 years agoClean up VXLAN api message handler registration issues 02/5602/3
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>
7 years agoVPP-651: Ensure sw_if_index to node mapping for L2 output path is only done via l2out... 09/5609/2
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>
7 years agoImprove api trace replay consistency checking 00/5600/2
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>
7 years agoIPv6 RA improvements 36/5536/4
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>
7 years agoChanging the IP table for an interface is an error if the interface already has an... 02/5402/6
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>
7 years agopython API: work towards python/vpp api separation 70/5570/4
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>
7 years agoVPP-608: fix coverity warning in vppapigen 89/5589/2
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>
7 years agoFix create_vlan_subif API using sw_if_index as hw_if_index 91/5591/2
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>
7 years agoClean up binary api message handler registration issues 96/5596/2
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>
7 years agobridge domain: fix members reordered when removing 84/5584/3
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>
7 years agoSNAT: user's dump and session dump of a certain snat user. 34/5534/4
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>