vpp.git
7 years agomake test: Use VXLAN built in scapy 2.3.3 94/4194/4
Matej Klotton [Fri, 9 Dec 2016 14:05:46 +0000 (15:05 +0100)]
make test: Use VXLAN built in scapy 2.3.3

- fix documentation issues.
- fix mpls test.

Change-Id: Ieef6b4b5e4aca99e89bd03e45a991be89d42adba
Signed-off-by: Matej Klotton <mklotton@cisco.com>
7 years agoUpdate CSIT tests 161204 -> 161211 11/4211/2
Jan Gelety [Mon, 12 Dec 2016 09:16:03 +0000 (10:16 +0100)]
Update CSIT tests 161204 -> 161211

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

Change-Id: I141dad311139d2b819352fab6038d440f76c7fc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agosnat: Hairpinning (VPP-444) 18/4218/2
Matus Fabian [Mon, 12 Dec 2016 12:30:39 +0000 (04:30 -0800)]
snat: Hairpinning (VPP-444)

Change-Id: I73881ef32d547852da96e77402a1758f37e812d5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agomake test: remove unneeded print 10/4210/2
Klement Sekera [Mon, 12 Dec 2016 01:55:06 +0000 (02:55 +0100)]
make test: remove unneeded print

Change-Id: I99242486371cea230e72974a7fc8768ffee9af62
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoip4: perf optimization in the ip4-input node 02/4202/6
Damjan Marion [Fri, 9 Dec 2016 11:21:27 +0000 (03:21 -0800)]
ip4: perf optimization in the ip4-input node

Change-Id: I9ddbbf8ce0d7307b9eb82ccd0c51f84e479ffd23
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoipsec: go straight to lookup after esp encrypt 14/4214/2
Sergio Gonzalez Monroy [Mon, 12 Dec 2016 10:37:49 +0000 (10:37 +0000)]
ipsec: go straight to lookup after esp encrypt

Currently, IPsec tunnel traffic goes to ip4-input/ip6-input after esp-encrypt.
It is not necessary to check that the new IP header is valid (if it is not
valid then we have otehr issues).

Instead, just send packets straight to ip4-lookup/ip6-lookup after esp-encrypt.

Change-Id: I5e35d500cb0f33f418f8554ed1f4390f02b6647d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoFix for PAPI async call registration 13/4213/2
Wojciech Dec [Mon, 12 Dec 2016 10:32:25 +0000 (11:32 +0100)]
Fix for PAPI async call registration

Introduce async API call registration

Change-Id: Iccc89eca1b6e7dcce96a8e7bc5da80d9abc363fc
Signed-off-by: Wojciech Dec <wdec@cisco.com>
7 years agoMPLS Nodes Dual Loop 05/4205/2
Neale Ranns [Sat, 10 Dec 2016 21:08:09 +0000 (21:08 +0000)]
MPLS Nodes Dual Loop

Change-Id: Ic54d4cb9dec8e91446b9b4d2b40ed69a14bd4355
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoVRF imported FIB entry should inherit the flags from the export entry. 06/4206/2
Neale Ranns [Sat, 10 Dec 2016 21:59:14 +0000 (21:59 +0000)]
VRF imported FIB entry should inherit the flags from the export entry.

Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoioam: trace plugin read api fix 04/4204/1
Sagar Srivastav [Sat, 10 Dec 2016 12:30:59 +0000 (04:30 -0800)]
ioam: trace plugin read api fix

-fix verify job failures

Change-Id: I0756f4b6577d58598702185ebe6f8ed9db23b0fa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
7 years agoip4: perf optimization in the ip4-rewrite node 01/4201/4
Damjan Marion [Fri, 9 Dec 2016 17:52:05 +0000 (18:52 +0100)]
ip4: perf optimization in the ip4-rewrite node

This change shows around 7% improvement in ip4 path
when ip4-output features are not used.

Change-Id: I81c1c4c38c99fff0ad8270d3c0df907acf1d8c58
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agopython api rpm packaging - json files are not executables 92/4192/2
Gabriel Ganne [Fri, 9 Dec 2016 09:38:58 +0000 (10:38 +0100)]
python api rpm packaging - json files are not executables

Change-Id: If8231aad2b95cf9e06cd8c95978e6a3128cdf084
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoioam: pot plugin - pot profile read API 25/4025/6
Sagar Srivastav [Wed, 30 Nov 2016 03:39:07 +0000 (19:39 -0800)]
ioam: pot plugin - pot profile read API

Addition of read API to ioam-pot plugin which returns the current
pot profile(s) configured

Change-Id: I188e53811391e053860009dde3719612a2446521
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
7 years agoioam:trace plugin - trace profile read API 83/3883/7
Sagar Srivastav [Mon, 21 Nov 2016 04:06:02 +0000 (20:06 -0800)]
ioam:trace plugin - trace profile read API

Addition of read API to ioam-trace plugin which returns the current
trace profile configured

Change-Id: Ibe2baf0f60fb2a74ddc140747b53128aba975aaa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
7 years agoAdd FIB unit test to 'make test' 84/4184/3
Neale Ranns [Thu, 8 Dec 2016 19:48:11 +0000 (19:48 +0000)]
Add FIB unit test to 'make test'

Change-Id: I57126416f57649768f3601cd715c7f5f4b9b9fad
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoBFD: handle timing wheel prematurely firing events 98/4198/3
Klement Sekera [Thu, 8 Dec 2016 04:19:14 +0000 (05:19 +0100)]
BFD: handle timing wheel prematurely firing events

Improve handling of timeouts. Add a workaround for when timing wheel
fires an event a tiny amount of time before it should actually be
fired.  Don't delete unneeded events at all from timing wheel, instead
ignoring unexpected events. Enable the skipped BFD test, which passes
now.

Change-Id: I6ffd4fc0ba7a049ffe63bb0e5290641a7300dd6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAdd make test code coverage reporting using gcov 57/3857/3
Juraj Sloboda [Wed, 16 Nov 2016 18:50:24 +0000 (19:50 +0100)]
Add make test code coverage reporting using gcov

Change-Id: Ia8247841fdbe76e1d888aab49ae213b4216af273
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoCoding standards cleanup for vnet/vnet/ip, VPP-255 95/4195/3
Dave Barach [Fri, 9 Dec 2016 14:52:16 +0000 (09:52 -0500)]
Coding standards cleanup for vnet/vnet/ip, VPP-255

Change-Id: I12892fa571cc50e0541d6463a8b68e1b618edd9f
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVPP-547: Fix for co-existence of HbH and RH header in Segment routing: 50/2850/21
Shwetha [Tue, 13 Sep 2016 10:51:00 +0000 (11:51 +0100)]
VPP-547: Fix for co-existence of HbH and RH header in Segment routing:

1. sr-rewrite - SR insertion in v6 : SR RH is inserted immediately after v6 header
but if hbh header is present as per RFC2460 it should immediately follow
v6 header. This is fixed.
2. sr-local : v6 packet destined to a sr segment is received if hbh is present
it is not handed over to sr-local for processing. fixed ip6-local handling to
skip hbh as there is no register handler for hbh for now.
3. sr-replicate - update in dual of sr_rewrite to handle replicate, fixes in
sr-replicate to handle presence of hbh header

Change-Id: I034523a42d2fedf97134761f956ab534babb8b36
Signed-off-by: Shwetha <shwethab@cisco.com>
7 years agomake test: FIB add/update/delete - ip4 routes 51/4151/4
Matej Klotton [Wed, 7 Dec 2016 14:09:13 +0000 (15:09 +0100)]
make test: FIB add/update/delete - ip4 routes

- JIRA:CSIT-483

Change-Id: Idb4c5bd7a234bc975f3380ece58c0e8d4bfdafd9
Signed-off-by: Matej Klotton <mklotton@cisco.com>
7 years agoWhen waiting for an IPv6 response, filter non-ND packets 83/4183/3
Neale Ranns [Thu, 8 Dec 2016 20:05:33 +0000 (20:05 +0000)]
When waiting for an IPv6 response, filter non-ND packets

Change-Id: Ia5f5e00db84022bb7ee89a1b9d036fffa734295a
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoDPDK HQoS: enable vpp control plane thread connection to hqos thread 79/4179/2
Jasvinder Singh [Thu, 8 Dec 2016 13:52:47 +0000 (13:52 +0000)]
DPDK HQoS: enable vpp control plane thread connection to hqos thread

The vpp control plane thread generates different types of packets such as ARP,
DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated
with the output interfaces. Therefore, this patch enables vpp main thread
connection with the HQoS thread through dedicated SWQ.

Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
7 years agoBFD: fix timing in the main loop 81/4181/2
Klement Sekera [Thu, 8 Dec 2016 09:16:41 +0000 (10:16 +0100)]
BFD: fix timing in the main loop

Properly wakeup the main process loop only when necessary to avoid
missed events. Improve BFD unit test reliability and speed. Add
timestamps to logs and replace Queue with more efficient deque.

Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAdd extra validation for VXLAN packets and tunnels 85/4185/3
John Lo [Thu, 8 Dec 2016 21:10:02 +0000 (16:10 -0500)]
Add extra validation for VXLAN packets and tunnels

- On VXLAN packet decap, validate its DIP against VXLAN tunnel.
- Add extra logic to validate and handle creation of multicast
  VXLAN tunnels.

Change-Id: I6abdddd7be4cd9f1bcfc88d9970ba681fdd72f7c
Signed-off-by: John Lo <loj@cisco.com>
7 years agoVPP-470: Introduce VxLAN-GPE as transport for iOAM. 79/3379/11
Vengada Govindan [Wed, 12 Oct 2016 12:54:09 +0000 (05:54 -0700)]
VPP-470: Introduce VxLAN-GPE as transport for iOAM.

See Jira ticket for more details
- New plugins created to (a) Add VxLAN-GPE as transport (b) Provide export infra for
  VxLAN-GPE.

Change-Id: Ife50c7434f53d17a4783062310f73d063d53494c
Signed-off-by: Vengada Govindan <venggovi@cisco.com>
7 years agoacl: make MACIP ACL apply/unapply/delete logic more robust 82/4182/2
Andrew Yourtchenko [Thu, 8 Dec 2016 19:33:19 +0000 (20:33 +0100)]
acl: make MACIP ACL apply/unapply/delete logic more robust

1. vnet_set_input_acl_intfc expects currently applied table ids to
   remove them properly, fixed that.
2. check if the interface has MACIP ACL applied before unapplying it
3. if applying MACIP ACL to interface that has one already applied,
   unapply that first.

These changes required also swapping the order of the add/del functions.

Change-Id: I179490371507b07e9dd8852000954156c318d98c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agovpp-python-api packaging - use easy_install to install the python api 31/4131/4
Gabriel Ganne [Tue, 6 Dec 2016 18:12:49 +0000 (19:12 +0100)]
vpp-python-api packaging - use easy_install to install the python api

adds python-setuptools as dependency

Change-Id: I186f5d4353ee7667377fb6b0486d16a1571bdf09
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoAdapt LuaJIT VPP library and a few examples to API with per-message CRC and JSON 74/4174/3
Andrew Yourtchenko [Thu, 8 Dec 2016 14:03:55 +0000 (14:03 +0000)]
Adapt LuaJIT VPP library and a few examples to API with per-message CRC and JSON

Change-Id: Ibb886e418d338588e61c7bb6cb57f2093c7c5062
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoFix incorrect creation of classifier entries for macip ACL 80/4180/2
Andrew Yourtchenko [Thu, 8 Dec 2016 15:43:01 +0000 (16:43 +0100)]
Fix incorrect creation of classifier entries for macip ACL

The is_ip6 flag was incorrectly set during classifier
table creation phase, which intermittently caused the mismatch
between the mask value and the match values, resulting
in dropped packets. Fix that.

Also get rid of the magic numbers in that part of the code.

Change-Id: I0606561e6b07e70a1aa733746b56ed0e91752c94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoBFD: improve ip header handling, fix assert 73/4173/4
Klement Sekera [Thu, 8 Dec 2016 04:03:32 +0000 (05:03 +0100)]
BFD: improve ip header handling, fix assert

Instead of storing a pointer, store an offset within vlib_buffer marking
the start of the ip header (similar to storing start of ethernet
header). Handle negative timeout in the bfd process main loop.

Change-Id: I05a1ff3ac41da5bdc3b2ac6f9e03b3241994688b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoFix bug in code for setting dpdk interface descriptors (VPP-552) 72/4172/1
Juraj Sloboda [Thu, 8 Dec 2016 10:51:53 +0000 (11:51 +0100)]
Fix bug in code for setting dpdk interface descriptors (VPP-552)

Change-Id: I6401b745eeb402ec980e86dc179b774d341c4764
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoioam: pot plugin - generate java bindings for ioam-pot plugin 84/3884/7
Sagar Srivastav [Mon, 21 Nov 2016 04:31:49 +0000 (20:31 -0800)]
ioam: pot plugin - generate java bindings for ioam-pot plugin

Change-Id: I078bbc9ea495b395ade499fe3ad7d98dd766f2be
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
7 years agodpdk: don't drop packets if l4 checksum is flagged as bad 64/4164/2
Damjan Marion [Thu, 8 Dec 2016 08:55:07 +0000 (09:55 +0100)]
dpdk: don't drop packets if l4 checksum is flagged as bad

Sometimes NICs are flagging checksum 0 as bad, which is not
always true.

Change-Id: Ibb0147c94f436966e6afa472025bdf92c41f201e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agol2fwd: fix isssue with setting mac age from api 63/4163/2
Damjan Marion [Thu, 8 Dec 2016 08:47:45 +0000 (09:47 +0100)]
l2fwd: fix isssue with setting mac age from api

Change-Id: Ib08b87ac91f78bebb539f544850b07dbf76f31f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovhost: fix coverity warning 62/4162/1
Pierre Pfister [Thu, 8 Dec 2016 07:58:47 +0000 (07:58 +0000)]
vhost: fix coverity warning

Change-Id: Ifb9f8d2528142ad9f11a2b6d5ac10ff9639dd5d6
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoAcl JVpp api generation (HONEYCOMB-305) 24/4124/6
Jan Srnicek [Wed, 7 Dec 2016 08:42:52 +0000 (09:42 +0100)]
Acl JVpp api generation (HONEYCOMB-305)

Includes simple test cases for acl management.

Change-Id: Ifff4f4baf9bfe84d73ebc46b591ecc46c85c94ad
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoBFD: basic asynchronous session up/down 57/4157/4
Klement Sekera [Thu, 29 Sep 2016 12:43:44 +0000 (14:43 +0200)]
BFD: basic asynchronous session up/down

This is a work-in-progress basic BFD session handling. Only
asynchronous mode is supported at the moment. Setting the session flags
doesn't work.

Change-Id: Idba27f721b5c35be5a66a6d202a63d23ff7ecf6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agol2fib: add mac aging support 08/4108/9
Damjan Marion [Mon, 5 Dec 2016 13:16:38 +0000 (14:16 +0100)]
l2fib: add mac aging support

Change-Id: Ib617ae0f76320d596cc6c4b384da76c91d701a24
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoMake jvpp connection fail if control ping fails 36/4136/2
Marek Gradzki [Wed, 7 Dec 2016 07:37:25 +0000 (08:37 +0100)]
Make jvpp connection fail if control ping fails

Change-Id: Ib57cf97514fb6831f41930d9492e92ad11a3730d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoPrevent re-entrant walks on an adjacency. 54/4154/3
Neale Ranns [Wed, 7 Dec 2016 15:38:14 +0000 (15:38 +0000)]
Prevent re-entrant walks on an adjacency.

The re-entrant walks were caused when the walk from an IP adj updated a fib_netry with an MPLS adj which in turn triggers a walk of the IP adj. Re-entrant walks do unnecessary work.
also fixed a walk merge issue where the encountered walk should only be checked for equivalence woth the most recent alk, not any in the list. Otherwise an UO,DOWN,UP beceoms (2*)UP,DOWN

Change-Id: Ib8b27f055dc6c1366d33740276d1c26cd314220a
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoLISP mapping timers 28/4028/6
Filip Tehlar [Mon, 28 Nov 2016 09:23:31 +0000 (10:23 +0100)]
LISP mapping timers

Change-Id: I4cd600189e936b07b628371df2f7fe2e2dc3e63d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoRefactor tap binary APIs, VPP-550 52/4152/2
Dave Barach [Wed, 7 Dec 2016 14:15:58 +0000 (09:15 -0500)]
Refactor tap binary APIs, VPP-550

Change-Id: I1599b3659411b5f4451c364cc5ada63cfa8e0a6b
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoepoll_input: don't sleep if we expect event in less than 1 ms 50/4150/2
Damjan Marion [Wed, 7 Dec 2016 13:07:54 +0000 (14:07 +0100)]
epoll_input: don't sleep if we expect event in less than 1 ms

Change-Id: I81652fb04608d805497a600c7dc8041911bbf39a
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agomake test: add S-NAT plugin tests 47/4147/2
Matus Fabian [Wed, 7 Dec 2016 11:38:19 +0000 (03:38 -0800)]
make test: add S-NAT plugin tests

Change-Id: I7859f63c5b28480be1ae587fc923d15212769e66
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoFix coverity CIDs 157344, 157343, 157341, 157340, 157339, 157336 49/4149/1
Andrew Yourtchenko [Wed, 7 Dec 2016 12:20:07 +0000 (12:20 +0000)]
Fix coverity CIDs 157344, 157343, 157341, 157340, 157339, 157336

The macros used to verify the validity of sw_if_index passed in
the API calls have puzzled coverity.

Even though the issues are false positives, the checks are rather
simple, so edited them to avoid using the preprocessor macros,
it makes the code easier to follow.

Added the null check for 157336.

Change-Id: I24651346851215b236e53e682261e1f91219b381
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoMake table chain deletion optional in classifier API (VPP-206) 32/4132/3
Juraj Sloboda [Tue, 6 Dec 2016 20:25:19 +0000 (21:25 +0100)]
Make table chain deletion optional in classifier API (VPP-206)

Change-Id: If30c0f6d5de34943bc399b3412c2d10847538c3c
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoEnable Span Jvpp api generation 34/4134/1
Jan Srnicek [Wed, 7 Dec 2016 06:36:37 +0000 (07:36 +0100)]
Enable Span Jvpp api generation

Change-Id: Ia8c0e8255f9ac5bb7ef1a174ffd933d46b017767
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
7 years agoSPAN API: Fix various errors making SPAN break make tests. 33/4133/2
Ole Troan [Tue, 6 Dec 2016 22:00:38 +0000 (23:00 +0100)]
SPAN API: Fix various errors making SPAN break make tests.

- s/l2/span in span_api.c in foreach macro
- Not installing .json from Makefile.am

Change-Id: I2469fe01138d62e044b8262cdb5a6e3b009bb43e
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoAPI: Adapt make test to Python API changes. 94/4094/7
Ole Troan [Mon, 5 Dec 2016 09:27:09 +0000 (10:27 +0100)]
API: Adapt make test to Python API changes.

Change the test wrapper script for the updated Python API.
All tests but the L2BD multi instance runs fine.
That is currently skipped.

I see intermittent failures when an MLD message is received
before the ND NA in MPLS and IPV6 FIB tests.

Change-Id: If809877c9abdf596dbb0a419ce5429552f63d212
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoRefactor binary APIs for IP, VPP-549 30/4130/3
Dave Barach [Tue, 6 Dec 2016 17:04:42 +0000 (12:04 -0500)]
Refactor binary APIs for IP, VPP-549

Change-Id: Ieff6b22e2432600a231f74e75716e000d488a78f
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoAdd binary API for reading interface/vrf assignment (VPP-439) 28/4128/3
Juraj Sloboda [Mon, 5 Dec 2016 12:20:37 +0000 (13:20 +0100)]
Add binary API for reading interface/vrf assignment (VPP-439)

Change-Id: I9b7cb90127e464fea520bb1b0a3e93c05a0e9e8e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agospan: add tx functionality and support for multiple mirror ports 49/4049/11
Pavel Kotucek [Tue, 6 Dec 2016 09:10:10 +0000 (10:10 +0100)]
span: add tx functionality and support for multiple mirror ports

Change-Id: Ib6dd290085e6f9a434499af8d19f346220dc8428
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agodpdk: fix rte_delay_us callback issue 29/4129/2
Damjan Marion [Tue, 6 Dec 2016 15:50:42 +0000 (16:50 +0100)]
dpdk: fix rte_delay_us callback issue

Introduced by recent commit. It causes initalization failure on many
NICs.

Change-Id: I409ebb8ca5ae29eb9d43438017a0d1ddddb472fc
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovhost: Improve data path 26/4026/8
Pierre Pfister [Tue, 29 Nov 2016 15:36:14 +0000 (15:36 +0000)]
vhost: Improve data path

This patch significantly improves vhost Tx and Rx
performance (20% Mpps improvement in PVP scenario).

Most significant change consists in the split of
virtio ring parsing and memory copies.
Other minor changes mostly consist in getting
rid of unnecessary variables.

Change-Id: Ia94e12ab9a6c114e3f7fef376a9343823d051209
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoFix length in LCAF header 01/4101/2
Filip Tehlar [Mon, 5 Dec 2016 11:37:15 +0000 (12:37 +0100)]
Fix length in LCAF header

Change-Id: I56461c5d892ce223d1160fb57313ca1c51db9a23
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agosnat: remove duplicate makefile var definition 16/4116/3
Gabriel Ganne [Mon, 5 Dec 2016 08:00:36 +0000 (09:00 +0100)]
snat: remove duplicate makefile var definition

Change-Id: Id910f033c693be882ef5da6adca4a9b46de057e4
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoMAP: Split MAP API out of vpe.api. 23/4123/3
Ole Troan [Tue, 6 Dec 2016 11:50:08 +0000 (12:50 +0100)]
MAP: Split MAP API out of vpe.api.

Change-Id: I91a612a00ea85a9ddd4233d9aa19a6a4332d9701
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agovhost: Code cleaning 16/3916/4
Pierre Pfister [Tue, 22 Nov 2016 10:33:34 +0000 (10:33 +0000)]
vhost: Code cleaning

After a bug was found, I decided to review old vhost code.
This change cleans some of it by:
- Use unix file private data rather than hash table
- Use vnet interface lookups rather than hash table
- Keep track of unix_fd index rather than fd value
- Change some indent
- Store interfaces in a clib pool rather than hand-made pool

The overall change reduces the number of lines as well as
the amount of state kept in vhost structures.

Change-Id: I6b9b670b9c7e1fb85981bcf2099f7140b0251fe0
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoAdd "vpp-api-install" to plugins_configure_depend in build-data/packages/plugins.mk 64/3964/2
Andrew Yourtchenko [Fri, 25 Nov 2016 12:54:04 +0000 (12:54 +0000)]
Add "vpp-api-install" to plugins_configure_depend in build-data/packages/plugins.mk

As per Ole Troan mail https://lists.fd.io/pipermail/vpp-dev/2016-November/003296.html
(message id <D3FB63FB-D144-4CBA-B4AB-CDE46B83D838@cisco.com>):

Change-Id: I7f9d13c079505257bc8b37eecd8318cd360a56c3
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agotest: l2xc instances multi-context test (CSIT-491) 11/4111/2
Jan [Mon, 5 Dec 2016 15:22:41 +0000 (16:22 +0100)]
test: l2xc instances multi-context test (CSIT-491)

- add/delete L2XC instances and verify results by traffic

Change-Id: Ib538a98e499ae3c9c9601a22afcabb1afb84c881
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agodpdk: add rte_delay_us_callback 71/3971/5
Pavel Kotucek [Mon, 28 Nov 2016 08:02:23 +0000 (09:02 +0100)]
dpdk: add rte_delay_us_callback

Converted DPDK16.07 "Allow-applications-to-override-rte_delay_us" patch
to of callback in DPDK16.11

Change-Id: I6c802e3ea8f817e5df591166b1e0a42f5f835a71
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoadd missing import to mpls test 20/4120/2
Gabriel Ganne [Tue, 6 Dec 2016 09:25:34 +0000 (10:25 +0100)]
add missing import to mpls test

Change-Id: If53a7c8066ec9713645a009218e264384afe93e4
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
7 years agoapi: set jvpp version to 17.01 21/4121/2
Marek Gradzki [Tue, 6 Dec 2016 09:58:56 +0000 (10:58 +0100)]
api: set jvpp version to 17.01

Change-Id: Ib22a3a24f9b290465dc80fc683d903d58ba3804c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoapi: missing support for dumping of neighbours (VPP-333) 90/4090/3
Pavel Kotucek [Mon, 5 Dec 2016 07:27:37 +0000 (08:27 +0100)]
api: missing support for dumping of neighbours (VPP-333)

added API to dump ipv4/ipv6 neighboors (added by ip_neighbor_add_del).

Change-Id: I33209a3d06beba64d68465c0892a9f4c65657334
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agoImplement LISP control plane messages 44/3744/11
Filip Tehlar [Wed, 26 Oct 2016 12:31:24 +0000 (14:31 +0200)]
Implement LISP control plane messages

* Map-register
* Map-notify
* RLOC probing

Change-Id: I7f6295376b21cd67805446dfd1c1033acead2d4b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoacl: The ACL plugin. 23/3423/3
Andrew Yourtchenko [Mon, 5 Dec 2016 16:25:28 +0000 (16:25 +0000)]
acl: The ACL plugin.

This is the commit from the accumulated work in the github ACL branch,
to move it to gerrit.

Change-Id: I85a6b0df0d3dd3c3c7588e92a1e22c553e4b6ef7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agotest: l2bd instance multi-context correction 12/4112/1
Jan [Mon, 5 Dec 2016 22:29:17 +0000 (23:29 +0100)]
test: l2bd instance multi-context correction

- small correction of docstrings
- fix of create_pg_interface

Change-Id: I1958bd5ddaddaa2f7e6cbb18b0076e59e86d1e68
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agoUpdate CSIT tests 161128 -> 161204 07/4107/2
Jan [Mon, 5 Dec 2016 15:25:39 +0000 (16:25 +0100)]
Update CSIT tests 161128 -> 161204

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

Change-Id: I84bfb828403a32087de3341f27c3e9a04292ca8b
Signed-off-by: Jan <jgelety@cisco.com>
7 years agomake test: fix missing log/packet messages 71/3871/5
Klement Sekera [Fri, 18 Nov 2016 06:38:42 +0000 (07:38 +0100)]
make test: fix missing log/packet messages

Change-Id: Idb3119792943664748c4abc3829ad723f4156dfe
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAll mcast and All class E have /4 not /8 subnet masks 54/4054/2
Neale Ranns [Thu, 1 Dec 2016 17:03:25 +0000 (17:03 +0000)]
All mcast and All class E have /4 not /8 subnet masks

Change-Id: I29e54014f43f0b0ce087380b2318fe623d879204
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMove interface APIs to vnet/vnet/{interface.api,interface_api.c} 03/4103/2
Dave Barach [Mon, 5 Dec 2016 14:50:05 +0000 (09:50 -0500)]
Move interface APIs to vnet/vnet/{interface.api,interface_api.c}

Change-Id: If3f0f73ad1c1d54ac69122052c977eb83a9e16eb
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix l2.api patch in jvpp Makefile 02/4102/2
Marek Gradzki [Mon, 5 Dec 2016 12:36:01 +0000 (13:36 +0100)]
Fix l2.api patch in jvpp Makefile

Change-Id: Ic9a494725afde2e3507dda5b42c69680c20f090a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoapi: set interface MTU API (VPP-442) 93/4093/3
Matus Fabian [Mon, 5 Dec 2016 09:05:35 +0000 (01:05 -0800)]
api: set interface MTU API (VPP-442)

Change-Id: I67178f2703febb8ad3eb011606cb8a86fab5ee94
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoFix crash in debug mode when call ethernet_register_l3_redirect() 91/4091/3
jerryian [Mon, 5 Dec 2016 09:13:00 +0000 (17:13 +0800)]
Fix crash in debug mode when call ethernet_register_l3_redirect()

Change-Id: I1c2a13663ec75460cd28ea8593aa8de3f27e47b9
Signed-off-by: jerryian <gu.jian1@zte.com.cn>
7 years agoapi: enable Java API generation for l2.api (VPP-438) 95/4095/3
Marek Gradzki [Mon, 5 Dec 2016 10:25:30 +0000 (11:25 +0100)]
api: enable Java API generation for l2.api (VPP-438)

Change-Id: I867c2f90d812007b874502d2aa60f09e40650941
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoLocally generated packet go through lookup/load-balance - locally-generated is an... 89/3989/6
Neale Ranns [Tue, 29 Nov 2016 14:51:37 +0000 (06:51 -0800)]
Locally generated packet go through lookup/load-balance - locally-generated is an attribute of the packet and checked where necessary

Add a flag to the vnet_buffer to indicate a packet is locally originated. Then in the rewrite nodes we can check this flag and not perform the TTL decrement. The switch path cost is expected to be fractions of a clock - the flags will be hot in the cache.
The cehcks are necessary to due the requirements that VPP must be able to emit an IP packet with TTL=255.

Change-Id: Ieb9cf06e34df54fd5c950293de8b665016295c51
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoVariable-message-length tracing support, VPP-370 82/4082/3
Dave Barach [Fri, 2 Dec 2016 18:31:25 +0000 (13:31 -0500)]
Variable-message-length tracing support, VPP-370

Clean up several message handlers which spuriously depended on having
a vlib_main_t * pointer passed as a second argument. That definitely
doesn't happen when replaying an api trace...

Change-Id: Id4cf9745f770933566cb13698ee779333ee35d79
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoFix vpp crash when generating jumbo packets 75/4075/3
Juraj Sloboda [Fri, 2 Dec 2016 13:37:16 +0000 (14:37 +0100)]
Fix vpp crash when generating jumbo packets

Change-Id: Ie1832f2b5df9f9f7ba2f0f406116e11014d3ac21
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
7 years agoFix ICMP echo reply punt path 86/4086/2
Alexander Popovsky [Sun, 4 Dec 2016 10:39:38 +0000 (02:39 -0800)]
Fix ICMP echo reply punt path

Add ICMP echo reply punt logic in ip[46]-icmp-echo-reply (ping) nodes.
ICMP echo reply packets corresponding to the locally (VPP) originated
ICMP echo requests are still dropped as before. Rest of the (unknown)
ICMP echo reply packets are pushed to the “error-punt” node.

Also added ICMP echo packet (id/seq) trace information

Change-Id: I998198430dedc9b4d771b6aff2a97f18598663f9
Signed-off-by: Alexander Popovsky <apopovsk@cisco.com>
7 years agoFix crash whith bonded ethernet / DPDK 16.11 89/4089/2
Alexander Popovsky [Sun, 4 Dec 2016 23:26:58 +0000 (15:26 -0800)]
Fix crash whith bonded ethernet / DPDK 16.11

In DPDK 16.11 bonded PMD is still using old naming ‘rte_bond_pmd’.
See: dpdk-16.11/drivers/net/bonding/rte_eth_bond_api.c
Fixed crash when VPP is generating a name for ‘unknown’ non-PCI interface

Change-Id: I59e15f009e1a11949a19abf5234d09425a81c6ce
Signed-off-by: Alexander Popovsky <apopovsk@cisco.com>
7 years agotest: l2bd instances multi-context test (CSIT-479) 79/4079/3
Jan [Tue, 29 Nov 2016 09:04:53 +0000 (10:04 +0100)]
test: l2bd instances multi-context test (CSIT-479)

- add/update/delete L2BD instances and verify results by API
  command bridge_domain_dump and by traffic where applicable

Change-Id: Ic9d7f7b5f6f10e5df7053f27cbc87f653704dab1
Signed-off-by: Jan <jgelety@cisco.com>
7 years agoCoverity errors in MPLS code 77/4077/2
Neale Ranns [Fri, 2 Dec 2016 15:41:03 +0000 (15:41 +0000)]
Coverity errors in MPLS code

Change-Id: I3f98e3c30e29198cb8701bfb846ce194b7250ed7
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoremove CLIB_DEBUG conditional in fib_protocol_t 81/4081/2
Neale Ranns [Fri, 2 Dec 2016 18:15:48 +0000 (18:15 +0000)]
remove CLIB_DEBUG conditional in fib_protocol_t

Change-Id: I179941fe615935e63c6f4eacf1193c6bfab6631d
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoapi: L2 XConnect API (VPP-438) 76/4076/2
Matus Fabian [Fri, 2 Dec 2016 14:00:53 +0000 (06:00 -0800)]
api: L2 XConnect API (VPP-438)

Change-Id: I0a86184391723675488a5eb517c375f67940f5b5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agointerfaces: make no_flatten variant of inteface_ouptut fn default 74/4074/2
Damjan Marion [Fri, 2 Dec 2016 07:09:45 +0000 (08:09 +0100)]
interfaces: make no_flatten variant of inteface_ouptut fn default

Flatten variant was used only by old native drivers.

Change-Id: If206c6c8b4f10843d60f908c3acb4e8db83ce03d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoCoverity warning be gone, VPP-486 73/4073/2
Dave Barach [Fri, 2 Dec 2016 13:43:40 +0000 (08:43 -0500)]
Coverity warning be gone, VPP-486

Change-Id: I72dc2eca558b4a28ade75f0a6d91840b48630543
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agosnat: fix 1:1 NAT with multiple workers 46/4046/3
Matus Fabian [Thu, 1 Dec 2016 09:32:03 +0000 (01:32 -0800)]
snat: fix 1:1 NAT with multiple workers

Assign worker when static mapping is created.

Change-Id: I204e486e2ba5d1ef8e357759c35ba92a25a9a097
Signed-off-by: Matus Fabian <matfabia@cisco.com>
7 years agoInitialize the UDP checksum, or no supper 71/4071/2
Dave Barach [Fri, 2 Dec 2016 12:55:49 +0000 (07:55 -0500)]
Initialize the UDP checksum, or no supper

Change-Id: I542fbe9ccdf83ee220080b2506b38016359e0ce5
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agomake test: handle exceptions from VppPapiProvider.__init__ 72/4072/2
Klement Sekera [Fri, 2 Dec 2016 06:05:24 +0000 (07:05 +0100)]
make test: handle exceptions from VppPapiProvider.__init__

Change-Id: I3c0372d5d09d554ad4ebe0adfa97c111571f628a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoAugment Vxlan to support NSH-Proxy 44/3944/15
Hongjun Ni [Thu, 24 Nov 2016 16:03:46 +0000 (00:03 +0800)]
Augment Vxlan to support NSH-Proxy

PatchSet 9: add range check for decap_next_index
PatchSet 6: delete runtime range check

Change-Id: I415e156d05d09d2ff34f6578924f0b243058f464
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
7 years agobuffers: fix vlib_buffer_copy 48/4048/2
Damjan Marion [Thu, 1 Dec 2016 10:59:33 +0000 (11:59 +0100)]
buffers: fix vlib_buffer_copy

memcpy should happen after current_data is set.

Change-Id: I838f61b54d15a8bb55d54f770f47fb4d58d071cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agofeature: add interface-output arc 22/4022/5
Damjan Marion [Tue, 29 Nov 2016 13:55:43 +0000 (14:55 +0100)]
feature: add interface-output arc

Change-Id: Ifea275a312e0f2474cdc3a336ac51ea83e403c74
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoPython API: Support for per message CRC and API split. 69/4069/2
Ole Troan [Fri, 2 Dec 2016 11:53:55 +0000 (12:53 +0100)]
Python API: Support for per message CRC and API split.

These changes are incompatible with Python VPP API 1.2

There is now a new VPP Class and it can be used like:

from vpp_papi import VPP
jsonfiles = []
for root, dirnames, filenames in os.walk('../../../build-root/'):
    if root.find('install-') == -1: continue
    for filename in fnmatch.filter(filenames, '*.api.json'):
        jsonfiles.append(os.path.join(root, filename))

vpp = VPP(jsonfiles)
rv = vpp.show_version()
print('RV', rv.program.decode().rstrip('\0x00'))
vpp.disconnect()

Change-Id: Ic92d226de2cf3626e750404012247e7fc24fb7fc
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoFix dpdk_validate_rte-mbuf for chained buffers 68/4068/2
Pierre Pfister [Fri, 2 Dec 2016 10:55:13 +0000 (10:55 +0000)]
Fix dpdk_validate_rte-mbuf for chained buffers

Change I4ad40f398f7b5cf introduced a bug with chained buffers.
This patch should fix it.

Change-Id: Ia409d5eb90fcd6d7ff3c7da0836edfd2eb25998b
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
7 years agoapi: fix inconsistent behaviour when adding l2fib filter entry (VPP-147) 66/4066/3
Pavel Kotucek [Fri, 2 Dec 2016 07:18:55 +0000 (08:18 +0100)]
api: fix inconsistent behaviour when adding l2fib filter entry (VPP-147)

Inconsistency when adding L2 fib entry using CLI and API (doesn't work)

Change-Id: I6b58d8a4c444d2712d1a4c225cea5eb5189c355f
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
7 years agofeature: introduce feature arc end nodes 81/3981/6
Damjan Marion [Mon, 28 Nov 2016 17:21:59 +0000 (18:21 +0100)]
feature: introduce feature arc end nodes

This change allows us to keep feature path disabled
until 1st feature is enabled. Enabling 1st feature also means
that end feature node is enabled helping feature arc tenants
to reach the end.

Change-Id: Idbd64e681bd2b42e7c67612074649e5ae51f46e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoMPLS infrastructure improvments 69/3669/14
Neale Ranns [Wed, 2 Nov 2016 14:20:04 +0000 (14:20 +0000)]
MPLS infrastructure improvments

- deprecate MPLSoEth and MPLSoGRE; replace with generic MPLS tunnel.
- deprecates CLI 'mpls encap ..'; replace with addition of MPLS out label to a route/tunnel.
- support for MPLS 'routes', e.g. MPLS x-connects.
 - deprecates CLI 'mpls decap ..'; replace with 'mpls route .. '

Change-Id: Ibda46544912f880d0200f22bf9ff9b52828fcc2f
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix wrong indentation in vppctl script 45/4045/3
Andrew Li [Thu, 1 Dec 2016 09:05:37 +0000 (17:05 +0800)]
Fix wrong indentation in vppctl script

Change-Id: I6c67df0cef53f93161e3d6b697c4d0fdc1fee8a7
Signed-off-by: Andrew Li <zhaoxili@cisco.com>
7 years agoAPI: Packaging of JSON files. 57/4057/4
Ole Troan [Thu, 1 Dec 2016 20:49:03 +0000 (21:49 +0100)]
API: Packaging of JSON files.

Change-Id: If041b6faf1a091d4758b514f0a8cd800ee0e6a89
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <otroan@ot-vpp.cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoAdd a 64-byte interface "tag" for vhost and tap interfaces 80/3980/7
Dave Barach [Mon, 28 Nov 2016 16:41:35 +0000 (11:41 -0500)]
Add a 64-byte interface "tag" for vhost and tap interfaces

This patch should dispose of spurious objections around interface tag
requirements, currently in use as excuses not to support the vpp ML2
plugin.

Add "u8 tag[64];" to the sw_interface_details message sent by vpp to
control-plane clients. Add u8 tag[64] to the create_vhost_user_if and
tap_connect APIs.

Added debug CLI to set/show/clear the interface tag on any vnet sw
interface. Added the sw_interface_tag_add_del API to set/clear
tags on any vnet sw interface.

There can be no expectation of "tag atomicity" with respect to
physical hardware. Vpp discovers devices before establishing a
control-plane connection.

This patch upload verifies using the csit oper-161128 branch

Change-Id: If8520119e7a586c5ccf0fdda82484ac205622855
Signed-off-by: Dave Barach <dave@barachs.net>