vpp.git
7 years agoAdd vxlan-bypass feature to IP6 forwarding path 51/4951/3
John Lo [Mon, 30 Jan 2017 18:12:10 +0000 (13:12 -0500)]
Add vxlan-bypass feature to IP6 forwarding path

Add vxlan-bypass feature which can be enabled on the IP6 underlay
interface which receive VXLAN packets to accelerate VXLAN decap
processing. The CLI to enable/disable it is:
    set interface ip6 vxlan-bypass <interface> [del]
The vxlan-bypass feature is already supported on the IP4 underlay
interface. The CLI to enable/disable it is:
    set interface ip vxlan-bypass <interface> [del]

Move vxlan-bypass API/CLI support code from decap.c to vxlan.c.
Also fixed two issues in the VXLAN decap path in the vxlan-input node:
1. Add verification of VXLAN packet FIB index with the encap-vrf-id
   of the VXLAN tunnel.
2. Fix checking of VXLANoIPv6 packet mcast DIP against that of the
   IP6 mcast VXLAN tunnel.

Change-Id: I2bad4074a468c48fbb8bb5ac64f6437190756ed2
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-621: ping: ICMP echo data size must be bounded by VLIB_BUFFER_DATA_SIZE minus... 21/4921/4
Andrew Yourtchenko [Sat, 28 Jan 2017 15:31:19 +0000 (15:31 +0000)]
VPP-621: ping: ICMP echo data size must be bounded by VLIB_BUFFER_DATA_SIZE minus headers.

Before the commit 878c6098 the VLIB_BUFFER_DATA_SIZE was different depending
on whether building "vpp" or "vpp_lite", resulting in an overrun in vpp_lite build.
Avoid the hardcoded value and make the upper bound for ICMP echo data size
dependent on the buffer size.

Change-Id: Id6c4d7fc73766a95af2610eb237881b5fe9ce9aa
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoThis patch fixes a bug in replaying MAC address to the hardware 50/4950/1
Steve Shin [Mon, 30 Jan 2017 17:32:00 +0000 (09:32 -0800)]
This patch fixes a bug in replaying MAC address to the hardware
in rte_eth_dev_config_restore() routine. Added default MAC replay as well.

Fixes: 4bdefaade6d1 ("ethdev: VMDQ enhancements")

Change-Id: I646799477e9a6f2fdeff7a52a76d216ef91115e9
Signed-off-by: Steve Shin <jonshin@cisco.com>
7 years agoFixed set int state up for ipsec interfaces 45/4945/1
Radu Nicolau [Mon, 30 Jan 2017 14:33:39 +0000 (14:33 +0000)]
Fixed set int state up for ipsec interfaces

Change-Id: I2330cb7c2ba0f5eaeb4e7a4c3de4f22283d3923d
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
7 years agoFix LISP Coverity warnings 25/4925/2
Florin Coras [Mon, 30 Jan 2017 00:42:20 +0000 (16:42 -0800)]
Fix LISP Coverity warnings

Change-Id: Iaca2ff453872e638ee83b11fc16472e44deb9a7e
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoadd vnet/util/radix.h to nobase_include_HEADERS list 36/4936/3
Gabriel Ganne [Mon, 30 Jan 2017 12:44:04 +0000 (13:44 +0100)]
add vnet/util/radix.h to nobase_include_HEADERS list

header is included by ip6.h and should therefore be made public

Change-Id: Ieb7d14bb082d821c2f77e9204ec09d884fb2cb09
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
7 years agoLISP: add dump calls for GPE entries API 10/4910/3
Filip Tehlar [Wed, 18 Jan 2017 11:57:37 +0000 (12:57 +0100)]
LISP: add dump calls for GPE entries API

Change-Id: Ie7f51643fd3522a0fa8df8d0309305481c211f5f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoAdd files to CLEANFILES for robust make clean. 18/4918/2
Burt Silverman [Fri, 27 Jan 2017 20:29:54 +0000 (15:29 -0500)]
Add files to CLEANFILES for robust make clean.

At the least, $(BUILT_SOURCES) should be added to CLEANFILES. Also
beneficial is $(api_DATA), and in the case of Java, *.files and *.h.
Also there is a vpp/app/version.h, and some grammar and lex files in
vppapigen.

Change-Id: Ic6d3f2d40ce65e1d9a8b88217fa1f36de393ebb4
Signed-off-by: Burt Silverman <burtms@gmail.com>
7 years agosh not show in the mfib flags commands 20/4920/1
Neale Ranns [Sat, 28 Jan 2017 10:37:08 +0000 (02:37 -0800)]
sh not show in the mfib flags commands

Change-Id: If10b878cb05d695eaed9416202fd19bed2e0b793
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoAPI refactoring : policer 63/4863/5
Pavel Kotucek [Wed, 25 Jan 2017 07:45:38 +0000 (08:45 +0100)]
API refactoring : policer

Change-Id: Ia7d8b557bcdf45eb8e33bb3d297bc6f7ad321c72
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agodpdk: rework cryptodev ipsec build and setup 06/4806/12
Sergio Gonzalez Monroy [Fri, 20 Jan 2017 15:35:23 +0000 (15:35 +0000)]
dpdk: rework cryptodev ipsec build and setup

Build Cryptodev IPsec support by default when DPDK is enabled but only build
hardware Cryptodev PMDs.

To enable Cryptodev support, a new startup.conf option for dpdk has been
introduced 'enable-cryptodev'.

During VPP init, if Cryptodev support is not enabled or not enough cryptodev
resources are available then default to OpenSSL ipsec implementation.

Change-Id: I5aa7e0d5c2676bdb41d775ef40364536a081956d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoAPI refactoring : cop 62/4862/5
Pavel Kotucek [Wed, 25 Jan 2017 07:27:15 +0000 (08:27 +0100)]
API refactoring : cop

Change-Id: I1596d7a130fb6d3b170b8e01f2116b323cc10c0d
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agodpdk : incorrect rx filter being installed 21/4821/6
Pavel Kotucek [Mon, 23 Jan 2017 14:24:49 +0000 (15:24 +0100)]
dpdk : incorrect rx filter being installed

When mac address is set prior bringing interface up incorrect rx filter
being installed into the e1000 mac.

Change-Id: If59a2bf16f732e45221b3787d271307d369e54d3
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agojvpp: utilize per-message CRCs (VPP-544) 11/4911/2
Marek Gradzki [Fri, 27 Jan 2017 07:57:40 +0000 (08:57 +0100)]
jvpp: utilize per-message CRCs (VPP-544)

Since messages ids are no longer statically referenced,
fixes also VPP-611.

Change-Id: Ic8e6ee2b7f1142c185595347984d69350be25ac3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoIP Multicast FIB (mfib) 09/4709/9
Neale Ranns [Tue, 22 Nov 2016 17:07:28 +0000 (17:07 +0000)]
IP Multicast FIB (mfib)

 - IPv[46] mfib tables with support for (*,G/m), (*,G) and (S,G) exact and longest prefix match
 - Replication represented via a new replicate DPO.
 - RPF configuration and data-plane checking
 - data-plane signals sent to listening control planes.

The functions of multicast forwarding entries differ from their unicast conterparts, so we introduce a new mfib_table_t and mfib_entry_t objects. However, we re-use the fib_path_list to resolve and build the entry's output list. the fib_path_list provides the service to construct a replicate DPO for multicast.

'make tests' is added to with two new suites; TEST=mfib, this is invocation of the CLI command 'test mfib' which deals with many path add/remove, flag set/unset scenarios, TEST=ip-mcast, data-plane forwarding tests.

Updated applications to use the new MIFB functions;
  - IPv6 NS/RA.
  - DHCPv6
 unit tests for these are undated accordingly.

Change-Id: I49ec37b01f1b170335a5697541c8fd30e6d3a961
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix make test scapy python patch issue, VPP-615 96/4896/3
Dave Wallace [Fri, 27 Jan 2017 02:07:10 +0000 (21:07 -0500)]
Fix make test scapy python patch issue, VPP-615

Change-Id: I1e6798905f0049c793224a2c880f3b2cfadcf1e7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 years agomake-test: Add numbering to chapters' titles 09/4909/2
Tibor [Fri, 27 Jan 2017 11:59:02 +0000 (12:59 +0100)]
make-test: Add numbering to chapters' titles

Change-Id: I1e2aedba85caf903dd7a721841afe240a9791cac
Signed-off-by: Tibor <tifrank@cisco.com>
7 years agoCleanup some obfuscated code in next node handling. 06/4906/2
Vengada [Fri, 27 Jan 2017 09:57:46 +0000 (01:57 -0800)]
Cleanup some obfuscated code in next node handling.
The values of next node can be simply assigned by dereferencing the pointer instead of obfuscating the dereference.

Change-Id: I1f4a3d51b768960699010591410695473728d3a2
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agodrop-and-count snat out2in packets with no translations 04/4904/1
Dave Barach [Fri, 27 Jan 2017 09:04:35 +0000 (04:04 -0500)]
drop-and-count snat out2in packets with no translations

Send dhcp server-to-client packets to the ip stack, so we can acquire
snat outside interface addresses from a dhcp server

Change-Id: I7751356fa23d9f26b503c9796bd85f96275fe978
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoPython API: event_callback not initialised. 84/4884/2
Ole Troan [Thu, 26 Jan 2017 10:13:00 +0000 (11:13 +0100)]
Python API: event_callback not initialised.

Even when not requesting notification the VPP API
sends event notifications on certain calls. E.g.
creating interfaces.

Traceback (most recent call last):
  File "/vpp/ipfix/src/vpp-api/python/vpp_papi/vpp_papi.py", line 447, in msg_handler_sync
    if self.event_callback:
AttributeError: VPP instance has no attribute 'event_callback'

Change-Id: I4ca30c49df298655dc8948c5ebd68de0b3d6a592
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agomake test: improve documentation generation 91/4891/3
Klement Sekera [Thu, 26 Jan 2017 13:54:47 +0000 (14:54 +0100)]
make test: improve documentation generation

Refactor the text to work around sphinx bug to show a proper
table of contents.

Change-Id: I546656ef77a95637ad7c6bf239f26262a4f306dc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAdd multi-vpp support back into pythonic vppctl 25/4825/4
Ed Warnicke [Mon, 23 Jan 2017 22:11:47 +0000 (22:11 +0000)]
Add multi-vpp support back into pythonic vppctl

Back when vppctl was a shell script, you could
use -p or --prefix to set the chroot prefix to
drive multiple vpp instances.  This patch adds
that capability back.

Change-Id: Iaa70a20eff13e8d7e206fcceadb7e5d06afa3fc5
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
7 years agoAdd sphinx read the doc theme. 85/4885/2
Tibor [Thu, 26 Jan 2017 12:21:12 +0000 (13:21 +0100)]
Add sphinx read the doc theme.

Change-Id: Iade7c42081378bf211b81ad29b2898518442d2ff
Signed-off-by: Tibor <tifrank@cisco.com>
7 years agoipv4 vrf test doc cleaning 92/4892/2
Jan Gelety [Thu, 26 Jan 2017 14:46:19 +0000 (15:46 +0100)]
ipv4 vrf test doc cleaning

Change-Id: I0d3b47ce3c029d2ea01f9ff88a541affcbfd70db
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoAPI refactoring : l2 (add) 64/4864/5
Pavel Kotucek [Wed, 25 Jan 2017 07:50:53 +0000 (08:50 +0100)]
API refactoring : l2 (add)

Change-Id: I693a73ba9a5e3b0cb5d2a6c5d363f671e19c1f24
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agopackage only the vpp binaries (rpm) 94/4894/3
Gabriel Ganne [Thu, 26 Jan 2017 14:42:39 +0000 (15:42 +0100)]
package only the vpp binaries (rpm)

The first install regexp of the vpp.spec file was too permissive and
included dpdk binaries.

Should fix rpm packaging error: Installed (but unpackaged) file(s) found:
/usr/bin/dpdk-pdump
/usr/bin/dpdk-pmdinfo
/usr/bin/dpdk-procinfo
/usr/bin/testpmd

Change-Id: Ic905307cf07b9eeadf8125aaa3e1922dcc6269b3
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
7 years agoDHCPv[46] proxy tests 82/4682/6
Neale Ranns [Fri, 13 Jan 2017 15:57:46 +0000 (07:57 -0800)]
DHCPv[46] proxy tests

Change-Id: I6aaf9c602cd515ed9d4416d286f9191d048c1a87
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoChange automake python macro to get python path 50/4850/3
Tomofumi Hayashi [Wed, 25 Jan 2017 04:53:26 +0000 (13:53 +0900)]
Change automake python macro to get python path

Previously install path for python binding is fixed, as
lib/python2.7/site-packages and other version/enironement is not
supported. This change introduces automake's python macro and gets
the install path from environment dynamically.

Change-Id: I6535107d4bde61976fbdf5392d460beb1049658e
Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
7 years agoAPI refactoring : dhcp 61/4861/5
Pavel Kotucek [Wed, 25 Jan 2017 06:25:32 +0000 (07:25 +0100)]
API refactoring : dhcp

Change-Id: I3829835ed2126e51e96690c907deac623dc77151
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoAdd option to use LISP Proxy-ETR 54/4854/3
Florin Coras [Tue, 24 Jan 2017 19:38:18 +0000 (11:38 -0800)]
Add option to use LISP Proxy-ETR

When enabled, destinations with negative mappings or those not reachable
via underlay have their traffic forwarded to the PETR.

Change-Id: I1056b0959736144f27fcca7b79263f921e7a8bd9
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoRepair plugin binary API message numbering 79/4879/1
Dave Barach [Wed, 25 Jan 2017 21:32:08 +0000 (16:32 -0500)]
Repair plugin binary API message numbering

Change-Id: I422a3f168bd483e011cfaf54af022cb79b78db02
Signed-off-by: Dave Barach <dave@barachs.net>
7 years ago[re]Enable per-Adjacency/neighbour counters 45/4845/4
Neale Ranns [Tue, 24 Jan 2017 09:34:25 +0000 (01:34 -0800)]
[re]Enable per-Adjacency/neighbour counters

Change-Id: I953b3888bbc6d8a5f53f684a5edc8742b382f323
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMove LISP cp cli to separate file 53/4853/2
Florin Coras [Tue, 24 Jan 2017 11:13:43 +0000 (03:13 -0800)]
Move LISP cp cli to separate file

Change-Id: I24355c71606c047e474b2541bb274e3d183fee85
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoAPI refactoring : flow 60/4860/4
Pavel Kotucek [Tue, 24 Jan 2017 12:40:26 +0000 (13:40 +0100)]
API refactoring : flow

Change-Id: I99e913b954f8b02f347bfeff093856a1c5e96781
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoUpdate CSIT tests 170108 -> 170122 32/4832/2
Jan Gelety [Tue, 24 Jan 2017 11:16:40 +0000 (12:16 +0100)]
Update CSIT tests 170108 -> 170122

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

Change-Id: I5abf9026318a7a8b4cd56c0044b7f0061ff41f58
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agospan: tx functionality 26/4826/2
Pavel Kotucek [Tue, 24 Jan 2017 07:26:31 +0000 (08:26 +0100)]
span: tx functionality

span-output (tx) was enabled on wrong arc_name

Change-Id: Ic21dfaec35c975de79abec66421b353637ac9394
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agomake test: elegantly handle expected API failures 75/4875/3
Klement Sekera [Wed, 25 Jan 2017 07:00:40 +0000 (08:00 +0100)]
make test: elegantly handle expected API failures

Allow writing simple code to expect API failure when needed:

with self.vapi.expect_negative_api_retval():
    do_api_call()  # expected to return negative retval in response

Change-Id: Id58d91d9ce38d20ad6ff7a43a6897e79ffbd23bf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAPI refactoring : classify 59/4859/3
Pavel Kotucek [Tue, 24 Jan 2017 09:58:12 +0000 (10:58 +0100)]
API refactoring : classify

Change-Id: Ib75197ef8e5057e7f0d9361a10705c3743d05333
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agotest adding and removing shared mcast dst tunnels 95/4695/6
Eyal Bari [Mon, 16 Jan 2017 10:02:46 +0000 (12:02 +0200)]
test adding and removing shared mcast dst tunnels

Adds and delete 2000 multicast vxlan tunnels sharing group address
to test mcast tunnel ref count code as part of the stability stage (before starting traffic tests)

Change-Id: Ic50cedf80471e14431feb493104eff5ea7d5d429
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoSNAT: static mappings for dhcp addressed interfaces (VPP-590) 28/4828/2
Matus Fabian [Tue, 24 Jan 2017 07:42:28 +0000 (23:42 -0800)]
SNAT: static mappings for dhcp addressed interfaces (VPP-590)

updated API
added test

Change-Id: I3f6017ecf09b924cb320c1b5f323cd33f7a37447
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoFix coverity defect. 55/4855/1
Vengada [Wed, 25 Jan 2017 07:38:41 +0000 (23:38 -0800)]
Fix coverity defect.
Typo resulted in passing next0[1] instead of next1[0]. Corrected it

Change-Id: I6e863c7c23c8c014ef0fef9ea1368fbaf3bc9809
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agoping: fix double-free crash under VMWare hypervisor 44/4844/2
Andrew Yourtchenko [Tue, 24 Jan 2017 14:47:27 +0000 (15:47 +0100)]
ping: fix double-free crash under VMWare hypervisor

bi0 retrieval from the ping reply events vector was incorrectly done
always from the first element.

For TBD reason the sending of the ping requests under VMWare was batched,
as a result the replies arrive close enough to make the events arrive as
an array, which exposed this bug. KVM never exhibited this behavior, which
explains not seeing this issue there.

Change-Id: I485d6f983571e25baa9407c21ef604937586d8bd
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agofix OS_ID test in root Makefile 19/4819/3
Gabriel Ganne [Mon, 23 Jan 2017 11:08:58 +0000 (12:08 +0100)]
fix OS_ID test in root Makefile

fixup for 2ce7f9834ab55728520bff0dd15f8d82c10b95a0

redhat, centos -> rpm
debian, ubuntu -> deb

Change-Id: I0a07d3689b2bb5656d1bc688677680f83ac2e0bb
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoFix PAPI async response 40/4840/1
Wojciech Dec [Tue, 24 Jan 2017 13:18:12 +0000 (14:18 +0100)]
Fix PAPI async response

Previous changes forgot to return the decoded result

Change-Id: I4eb27802eb2672532d856d9b9671ef806374bcd0
Signed-off-by: Wojciech Dec <wdec@cisco.com>
7 years agoLISP: add RLOC and map-notify counters 83/4783/6
Filip Tehlar [Mon, 16 Jan 2017 09:30:03 +0000 (10:30 +0100)]
LISP: add RLOC and map-notify counters

Change-Id: Ie6dd9521507cd4731f1bad99c50238310238914f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agobinary-api debug CLI works with plugins 13/4813/4
Dave Barach [Sat, 21 Jan 2017 00:50:09 +0000 (19:50 -0500)]
binary-api debug CLI works with plugins

Change-Id: I81f33f5153d5afac94b66b5a8cb91da77463af79
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoSNAT: Multiple inside interfaces (VPP-447) 51/4751/4
Matus Fabian [Wed, 18 Jan 2017 09:46:01 +0000 (01:46 -0800)]
SNAT: Multiple inside interfaces (VPP-447)

NAT only packets aimed at outside interface and in case of hairpinning

Change-Id: Ida371380fce664b9434ca5ddd2369c980ff26beb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoAdd static mapping support for dhcp client interfaces 06/4706/3
Dave Barach [Mon, 16 Jan 2017 15:54:02 +0000 (10:54 -0500)]
Add static mapping support for dhcp client interfaces

Change-Id: I0412f95b71b9768d41c9c398a24adb1555bde20b
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix cosmetic issue in dpdk/Makefile 11/4811/2
Damjan Marion [Fri, 20 Jan 2017 22:59:28 +0000 (23:59 +0100)]
Fix cosmetic issue in dpdk/Makefile

Change-Id: I95684396e3dad53ddf7479467a36a5b68e5703cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix issue in rpm versioning for release builds 12/4812/1
Damjan Marion [Fri, 20 Jan 2017 23:04:30 +0000 (00:04 +0100)]
Fix issue in rpm versioning for release builds

Change-Id: I562f93017ee90b0828d36624dca694c04e332a74
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd dpdk development packaging 13/4613/19
Damjan Marion [Mon, 9 Jan 2017 19:24:50 +0000 (20:24 +0100)]
Add dpdk development packaging

Change-Id: I6aa2a6709241d99ce734c29e47487eb456907351
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix coverity warning, VPP-608 02/4802/2
Dave Barach [Fri, 20 Jan 2017 13:34:15 +0000 (08:34 -0500)]
Fix coverity warning, VPP-608

Change-Id: I1086debdf90a51205af17c35e93cd9aeff598135
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVXLAN - Add IPv6 tunnels src ref count 82/4782/4
Eyal Bari [Thu, 19 Jan 2017 15:01:09 +0000 (17:01 +0200)]
VXLAN - Add IPv6 tunnels src ref count

and refactored hash table mem keys access
hash_set_key_dup - same as hash_set_mem but duplicates the key
hash_unset_key_free - same as hash_unset_mem but frees the key

Change-Id: I18cdcf7e41c57faa615d6337acaf8d1ad058a4c1
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoPython API: Missing locking of results data structure. 73/4773/9
Ole Troan [Thu, 19 Jan 2017 08:44:44 +0000 (09:44 +0100)]
Python API: Missing locking of results data structure.

The wrong assumption that the GIL combined with CPython's "mostly"
thread safe assurance does not hold. The combination of a slow
event handler for notification and calling the API at the same
time let to contention on the results data structure.

Added suitable locking.

Also added an atexit() to attempt a VPP disconnect on shutdown.

Also: lots more comments, docstrings, duplicated code removed.
Some of the problem here was a disagreement between caller
and author as to how the API should be used; the comments should
help.

Change-Id: I0cb7d0026db660ec141425c5ad474f14bacea36e
Signed-off-by: Ole Troan <ot@cisco.com>
Co-Authored-By: Ian Wells <iawells@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoaf_packet: multithreading support 59/4759/3
Mohsin KAZMI [Wed, 18 Jan 2017 10:59:45 +0000 (11:59 +0100)]
af_packet: multithreading support

This patch adds multithreading support for af_packet interfaces.

Change-Id: Ief5d1117e7ffeaa59dbc2831e583d5d8e8d4fa7a
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
7 years agojvpp: include libjvpp_common in rpm packages 54/4754/2
Marek Gradzki [Wed, 18 Jan 2017 13:16:13 +0000 (14:16 +0100)]
jvpp: include libjvpp_common in rpm packages

Change-Id: Idef5f036c9dc679b062931f38fcc311d00fc0017
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoFix coverity warnings, VPP-608 58/4758/2
Dave Barach [Wed, 18 Jan 2017 15:23:22 +0000 (10:23 -0500)]
Fix coverity warnings, VPP-608

Change-Id: Ib0144ba3a9a09971d3946c932e8fed6d5c1ad278
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix crash on deleting activated vhost-user - VPP-603 38/4738/2
Wojciech Dec [Tue, 17 Jan 2017 20:45:11 +0000 (21:45 +0100)]
Fix crash on deleting activated vhost-user - VPP-603

Vhost-user pool getting freed prematurely

Change-Id: I952821ec85efa68923d09a643c70b6b309ea2574
Signed-off-by: Wojciech Dec <wdec@cisco.com>
7 years agomake test: fix text output when non-interactive 36/4736/2
Klement Sekera [Tue, 17 Jan 2017 12:42:48 +0000 (13:42 +0100)]
make test: fix text output when non-interactive

Output everything to stdout instead of mixing stdout and stderr.

Change-Id: I3146760e068fda7f1ffaaf36683d5153dcda4561
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoBFD: IPv6 support 37/4737/2
Klement Sekera [Mon, 2 Jan 2017 07:22:23 +0000 (08:22 +0100)]
BFD: IPv6 support

Change-Id: Iaa9538c7cca500c04cf2704e5bf87480543cfcdf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agosample-plugin: fix build 41/4741/2
Damjan Marion [Tue, 17 Jan 2017 21:38:58 +0000 (22:38 +0100)]
sample-plugin: fix build

Change-Id: I8a2c91c4148981db31317ef9d2c5c2c28942daa9
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: remove duplicate code in buffers.c 26/4726/4
Damjan Marion [Tue, 17 Jan 2017 13:12:42 +0000 (14:12 +0100)]
dpdk: remove duplicate code in buffers.c

Change-Id: Idc17b4a32d40012556d5d8550942db0372ebf23d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agomake test: add checkstyle target 34/4734/2
Klement Sekera [Tue, 17 Jan 2017 09:37:05 +0000 (10:37 +0100)]
make test: add checkstyle target

Change-Id: I59d3c3bc77474c96e1d6fa51811c1b13fb9a6c5b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agovagrant: stop rsync from wiping changes from /vpp 29/4729/2
Padraig Connolly [Tue, 17 Jan 2017 14:13:03 +0000 (14:13 +0000)]
vagrant: stop rsync from wiping changes from /vpp

*Fixes issue where any changes to the vpp directory withing vagrant
 are wiped if user reboots the vagrant vm
*Rsync will now only run if provisioning hasn't occured before

Change-Id: Ic29eb1321fba33e82df4075e7a95c96fa2e6739f
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
7 years agofix rpm warnings for defattr directory of lua/* 21/4721/1
Gabriel Ganne [Tue, 17 Jan 2017 09:00:54 +0000 (10:00 +0100)]
fix rpm warnings for defattr directory of lua/*

eg.
Processing files: vpp-api-lua-17.04-rc0~119_g3bd11d78.x86_64
warning: %defattr doesn't define directory mode so file mode defined in %defattr is used for directory: ...

Change-Id: Ifd205b6effce6160cf6f7bdbd959e484099ff619
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoDHCPv6 Proxy; fix crash when DHCPv6 prxy is not configured and client packet is received 14/4714/2
Neale Ranns [Mon, 16 Jan 2017 17:09:40 +0000 (18:09 +0100)]
DHCPv6 Proxy; fix crash when DHCPv6 prxy is not configured and client packet is received

Change-Id: I0250acdee803545b8923549e2099863a95544691
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
7 years agoAdd --without-libssl configure parameter 13/4713/3
Damjan Marion [Mon, 16 Jan 2017 21:06:10 +0000 (22:06 +0100)]
Add --without-libssl configure parameter

This replaces --without-ipsec and --without-ipv6sr
and allows other parts of the code to be disabled if
libssl is not available.

Change-Id: Id97ff3685a7924d7f86622952e0405d94ceb5957
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agodpdk: add 'show dpdk version' cli 12/4712/3
Damjan Marion [Mon, 16 Jan 2017 20:36:28 +0000 (21:36 +0100)]
dpdk: add 'show dpdk version' cli

Change-Id: Iaecebae25ee4b8df8ca919992a0433e92e82e90c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix LISP coverity warning 10/4710/3
Florin Coras [Mon, 16 Jan 2017 08:57:02 +0000 (00:57 -0800)]
Fix LISP coverity warning

- uninitialized field in locator pair

Change-Id: I6832eaf5217eaad8f0fa8da1801aa31465c1f37d
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agodpdk: register rte_delay_us callback from vnet 11/4711/1
Damjan Marion [Mon, 16 Jan 2017 20:29:39 +0000 (21:29 +0100)]
dpdk: register rte_delay_us callback from vnet

Change-Id: Ibf7fc9a54d3fbee431b4814fa8abc5ba29ed9eef
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoLISP: Enhance IPx offset computing 47/4647/8
Filip Tehlar [Mon, 2 Jan 2017 09:22:56 +0000 (10:22 +0100)]
LISP: Enhance IPx offset computing

Change-Id: I0ccb0db73bcf4e2a282cabd4ebbe49599fa8ee7c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoDefine more dependencies between libs 97/4697/3
Damjan Marion [Mon, 16 Jan 2017 13:00:03 +0000 (14:00 +0100)]
Define more dependencies between libs

Change-Id: Ia74699bad15c1c583571944458fc8a5c3ded574b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd 'make test' to verify job 05/4705/2
Damjan Marion [Mon, 16 Jan 2017 15:19:38 +0000 (16:19 +0100)]
Add 'make test' to verify job

Change-Id: Iaab9c1a1c691a613d25ea28a22ac5db5943d8892
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoToplevel Makefile cleanup 89/4689/2
Damjan Marion [Sun, 15 Jan 2017 20:30:50 +0000 (21:30 +0100)]
Toplevel Makefile cleanup

Change-Id: I2f4cb267dbb4d6e6fc6bef908c4bb548c5f37b35
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix linker warnings for jvpp shared libs 00/4700/1
Marek Gradzki [Mon, 16 Jan 2017 13:00:56 +0000 (14:00 +0100)]
Fix linker warnings for jvpp shared libs

Change-Id: I02d01ce210d5bbe11ad2ee70f7703647f9147416
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoProvision linux stack ip4 and ip6 addresses for tap interfaces 88/4688/1
Dave Barach [Sat, 14 Jan 2017 15:30:50 +0000 (10:30 -0500)]
Provision linux stack ip4 and ip6 addresses for tap interfaces

To simplify system configuration. Converted existing code to use an
argument structure, instead of [one or two too many] discrete
parameters.

Change-Id: I3eddfa74eeed918c1b04a6285fba494651594332
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agovlib: add buffer and thread callbacks 92/4592/9
Damjan Marion [Wed, 4 Jan 2017 12:19:27 +0000 (13:19 +0100)]
vlib: add buffer and thread callbacks

Change-Id: I8e2e8f94a884ab2f9909d0c83ba00edd38cdab77
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoSNAT: IPFIX logging (VPP-445) 72/4672/2
Matus Fabian [Fri, 13 Jan 2017 12:15:54 +0000 (04:15 -0800)]
SNAT: IPFIX logging (VPP-445)

Change-Id: I8450217dd43a1cd9f510e40dfb22274ffc33a4c6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVPP-279: Document changes for vnet/vnet/devices 44/4644/4
Billy McFall [Wed, 11 Jan 2017 13:44:52 +0000 (08:44 -0500)]
VPP-279: Document changes for vnet/vnet/devices

Add doxygen documentation for netmap CLI commands.

Change-Id: I8d3ce12b1cfa5af30ddcd31cb476ca4652cfc2f3
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agoFix remove-rpath script, take 2 86/4686/1
Damjan Marion [Fri, 13 Jan 2017 21:11:56 +0000 (22:11 +0100)]
Fix remove-rpath script, take 2

Change-Id: If0fc5adb495b243dc9d7bfb8112ffee79ca1335e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix remove-rpath script 85/4685/2
Damjan Marion [Fri, 13 Jan 2017 19:58:19 +0000 (20:58 +0100)]
Fix remove-rpath script

Change-Id: Ieb9ca2c5ac64dbb73de1b3dd701bb794c91aeae5
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovppctl: new bash completion for vppctl commands 48/4648/6
Padraig Connolly [Tue, 10 Jan 2017 17:10:39 +0000 (17:10 +0000)]
vppctl: new bash completion for vppctl commands

Bash completion for vppctl
*vppctl_completion uses generated list vppctl-cmd-list to provide bash completion
*List of commands generated using grep, then moved by vpp packaging
*Once vpp package installed restart bash to use

Change-Id: I3b25e55a432c395af421231cf7c37c2e243fee61
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
7 years agoLISP: Fix gpe API 75/4675/3
Filip Tehlar [Fri, 13 Jan 2017 13:13:09 +0000 (14:13 +0100)]
LISP: Fix gpe API

Change-Id: Iba076fc13e3f870c49fc5ca971dc7b8799188a27
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoSNAT: fixed crash - interface without IP address (VPP-599) 78/4678/2
Matus Fabian [Fri, 13 Jan 2017 13:35:34 +0000 (05:35 -0800)]
SNAT: fixed crash - interface without IP address (VPP-599)

Change-Id: I7f4d0cbde3d3c4ed6537e6351d5487546daea058
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoVPP-580: Host Interface created via Command Line Arg is misnamed 77/4577/2
Billy McFall [Thu, 5 Jan 2017 18:23:39 +0000 (13:23 -0500)]
VPP-580: Host Interface created via Command Line Arg is misnamed

Host interfaces created via the command-line arguments are missed named
(i.e. - UnknownEthernet0 instead of af_packet0). In DPDK 16.11, they
changed the driver names from eth_xxx to net_xxx. However, looks like
the AF_PACKET driver still returns "AF_PACKET PMD" as the driver name
in the rte_eth_dev_info_get(..) call. I modified the driver name look
table in vnet/devices/dpdk/dpdk.h to revert the name back.

Change-Id: I2b0a9f6b4d5245b76548027891d40f81a56b230d
Signed-off-by: Billy McFall <bmcfall@redhat.com>
7 years agomake test: improve test results printing 77/4677/1
Klement Sekera [Fri, 13 Jan 2017 06:25:25 +0000 (07:25 +0100)]
make test: improve test results printing

Accomodate longer test descriptions by increasing the headings
size.

Change-Id: I51c90b8d91feaa83b78972d0802d3054f8510f36
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoSNAT: add API and test for NAT pool address from interface 56/4656/2
Matus Fabian [Thu, 12 Jan 2017 12:24:35 +0000 (04:24 -0800)]
SNAT: add API and test for NAT pool address from interface

Change-Id: I2a868f736fae8d37b438c604a9284653ea415541
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agomake test: fix capture handling special-case 57/4657/2
Klement Sekera [Thu, 12 Jan 2017 06:17:01 +0000 (07:17 +0100)]
make test: fix capture handling special-case

Change-Id: I4fc5dce832f9a6162181967c5290e6d0daa4f9f0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAccount for pool realloc when importing FIB entries during VRF export 60/4660/1
Neale Ranns [Tue, 10 Jan 2017 17:13:41 +0000 (18:13 +0100)]
Account for pool realloc when importing FIB entries during VRF export

Change-Id: I8ec6d53fa9c0790f85802663f70a6b3630239f8d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
7 years agomake test: fix typo 53/4653/2
Klement Sekera [Thu, 12 Jan 2017 02:39:42 +0000 (03:39 +0100)]
make test: fix typo

Change-Id: I70b4123129aab5770a45ccde4cef4452d06386b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoFix ARP on unnumbered interfaces (VPP-583) 54/4654/2
Neale Ranns [Mon, 9 Jan 2017 13:33:38 +0000 (14:33 +0100)]
Fix ARP on unnumbered interfaces (VPP-583)

Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
7 years agojvpp: include jvpp_common in vpp packages 51/4651/1
Marek Gradzki [Thu, 12 Jan 2017 08:16:23 +0000 (09:16 +0100)]
jvpp: include jvpp_common in vpp packages

Change-Id: Idcf37fc4a031c1c95362aeadf11768103e40d0fd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agomake test: improve documentation and PEP8 compliance 53/4553/7
Klement Sekera [Wed, 4 Jan 2017 11:58:53 +0000 (12:58 +0100)]
make test: improve documentation and PEP8 compliance

Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoRemove unnecessary build macro to fix slow builds. 50/4650/1
Thomas F Herbert [Wed, 11 Jan 2017 13:55:31 +0000 (08:55 -0500)]
Remove unnecessary build macro to fix slow builds.

JIRA: VPP-588

Change-Id: I05bcba3158edb4aee12ead82a30c611fddd29352
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoBFD: fix bfd_udp_add API 46/4646/2
Klement Sekera [Wed, 11 Jan 2017 07:16:53 +0000 (08:16 +0100)]
BFD: fix bfd_udp_add API

Fix reporting of bs_index in the return message. Enhance test suite
to cover this case.

Change-Id: I37d35b850818bc1a05abe67ca919c22aeac978b6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAcquire SNAT pool addresses from specific interfaces 49/4649/1
Dave Barach [Wed, 11 Jan 2017 18:01:14 +0000 (13:01 -0500)]
Acquire SNAT pool addresses from specific interfaces

Pick up addresses added by DHCP client, or by static configuration
Needs to have binary API support added

Change-Id: I962ef89e6e5f36cdc5457b92e165c498b08b25a9
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agojvpp: add missing dependencies on various libs 32/4632/4
Marek Gradzki [Tue, 10 Jan 2017 18:58:43 +0000 (19:58 +0100)]
jvpp: add missing dependencies on various libs

Change-Id: Ifa6845458f7249d2179a20b954fcdd49d6c68aa1
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agovxlan unit test - minor fixes 38/4638/3
Eyal Bari [Wed, 11 Jan 2017 11:39:54 +0000 (13:39 +0200)]
vxlan unit test - minor fixes

moved ip4_range and ip4n_range to util
added n_ucast_tunnels

Change-Id: I9140c4e54a0636d90a97db03da842f5183319af5
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoMakefile.am cleanup 37/4637/3
Damjan Marion [Wed, 11 Jan 2017 10:11:00 +0000 (11:11 +0100)]
Makefile.am cleanup

 - remove unused stuff
 - add --quiet flag to libtool
 - avoid building some tests programs when tests are not enabled

Change-Id: Ie34aeec1a598ad811256a00354f66cfddae9d0b9
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoRemove vcgn plugin 27/4627/3
Damjan Marion [Tue, 10 Jan 2017 16:07:38 +0000 (17:07 +0100)]
Remove vcgn plugin

Change-Id: I79f18ec386dedd91a8dcea2ca5726208b7b3c67c
Signed-off-by: Damjan Marion <damarion@cisco.com>