vpp.git
6 years agoacl-plugin: warning printed when acl_add_replace already applied ACLs (complete the... 14/8214/2
Andrew Yourtchenko [Fri, 18 Aug 2017 17:10:39 +0000 (19:10 +0200)]
acl-plugin: warning printed when acl_add_replace already applied ACLs (complete the fix for VPP-935)

The fix for VPP-935 missed the case that hash_acl_add() and hash_acl_delete() may be called
during the replacement of the existing applied ACL, as a result the "applied" logic needs
to be replicated for the hash acls separately, since it is a lower layer.

Change-Id: I7dcb2b120fcbdceb5e59acb5029f9eb77bd0f240
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit ce9714032d36d18abe72981552219dff871ff392)

6 years agotcp: retransmit and multi-buffer segment fixes and improvements 33/8133/10
Florin Coras [Sat, 19 Aug 2017 02:28:03 +0000 (19:28 -0700)]
tcp: retransmit and multi-buffer segment fixes and improvements

- set session state as closed on session manager delete
- enable retransmit as opposed to persist timer after persist timer completes
- properly discard buffer chain bytes when new data overlaps ooo
  segments
- don't use rxt bytes in snd space estimate used on tx path

Change-Id: Id9cab686e532e5fe70c775d5440260e8eb890a9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFixed the SUSE dependency on libnuma 13/8213/2
Marco Varlese [Fri, 25 Aug 2017 15:00:51 +0000 (17:00 +0200)]
Fixed the SUSE dependency on libnuma

Change-Id: I0de13c7fac91c7fc2fcbc9e765ae37720a583aaf
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoUse Quad-loop to improve gtpu-encap performance 91/8191/4
Hongjun Ni [Thu, 24 Aug 2017 14:53:42 +0000 (22:53 +0800)]
Use Quad-loop to improve gtpu-encap performance

Change-Id: I440fae09e77502392af5cde45dd9c532afa5d976
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agojvpp: introducing callback api and future api tests for all plugins (VPP-591) 38/7638/21
Matej Perina [Tue, 18 Jul 2017 11:59:41 +0000 (13:59 +0200)]
jvpp: introducing callback api and future api tests for all plugins (VPP-591)

test can be run with:
make test TEST=test_jvpp

memory_shared.c:
declaring and assigning variable in if statement
makes it usage outside statement impossible. Looks like memory
space assigned to variable declared in statement is freed when
statement ends
svm.c:
- fixed case when root path can have a "/" at beggining
- added option for test to operate over shared memory space
with /vpe-api name and not create new one with name consisting of
root path and region name which would require root permisions

Change-Id: Iff1170dc6a5c1be134c152f2757c7ab9b919a8ed
Signed-off-by: Matej Perina <mperina@cisco.com>
6 years agodpdk: required changes for 17.08 42/8142/6
Sergio Gonzalez Monroy [Thu, 24 Aug 2017 13:09:17 +0000 (14:09 +0100)]
dpdk: required changes for 17.08

DPDK 17.08 breaks ethdev and cryptodev APIs.

Address those changes while keeping backwards compatibility for
DPDK 17.02 and 17.05.

Change-Id: Idd6ac264d0d047fe586c41d4c4ca74e8fc778a54
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoFix crash when TCP client using VPP host stack connects first 00/8200/3
tjanciga [Thu, 24 Aug 2017 09:57:21 +0000 (11:57 +0200)]
Fix crash when TCP client using VPP host stack connects first

VPP is crashing without this fix if there is not any server
using VPP host stack and client attemts to connect.

Change-Id: I672977f78180bbc5ba9259116b2e165363463ccd
Signed-off-by: tjanciga <tomas.janciga@pantheon.tech>
6 years agovl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface 07/8207/1
Andrew Yourtchenko [Tue, 22 Aug 2017 11:10:01 +0000 (13:10 +0200)]
vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface

The handler was calling the routines with sw_if_index instead of hw_if_index,
fix that by an extra call to vnet_get_sw_interface, and check that the interface
type is VNET_SW_INTERFACE_TYPE_HARDWARE before proceeding.

Change-Id: I4a6f65f44e250ecdb2b72d2693c9d7db5a52b966
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 778df28c2a1520f58c293700c578bdd73e61cecf)

6 years agoMake VPP runtime directory configurable 90/7690/4
Damjan Marion [Thu, 20 Jul 2017 17:17:06 +0000 (19:17 +0200)]
Make VPP runtime directory configurable

New startup config command:

unix {
runtime-dir /run/vpp
}

Also, adds recursive mkdir funtion for use in deifferent places
like cli-config socket path and dpdk hugepage directory path.

Change-Id: I1446ceab9c220c25804e73a743a3ebb383450124
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix initialization bug in sock_test_client 65/8165/3
Dave Wallace [Wed, 23 Aug 2017 03:29:33 +0000 (23:29 -0400)]
Fix initialization bug in sock_test_client

Change-Id: Ieeae23a81f6f747b96c2a115bd8a62e8962428cd
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoNAT64: Fix error message typo (VPP-961) 99/8199/2
Matus Fabian [Thu, 24 Aug 2017 09:38:51 +0000 (02:38 -0700)]
NAT64: Fix error message typo (VPP-961)

Change-Id: Ieb81c5e157e342cbb532bd65f3b64059e5838691
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agojvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurred 92/8192/3
Marek Gradzki [Thu, 24 Aug 2017 06:57:43 +0000 (08:57 +0200)]
jvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurred

Change-Id: I6cca455ead986cb8a507c84957a97a40b733b16c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoNAT64: Fix CLI typo (VPP-961) 90/8190/1
Matus Fabian [Thu, 24 Aug 2017 05:08:22 +0000 (22:08 -0700)]
NAT64: Fix CLI typo (VPP-961)

Change-Id: I99e2766a118754387c9f238fc1b46057ee8a23e7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agotcp: add tcp.api.h to nobase include 88/8188/1
Florin Coras [Wed, 23 Aug 2017 18:24:02 +0000 (11:24 -0700)]
tcp: add tcp.api.h to nobase include

Change-Id: Idcd78a21f4f2b6c1223123b5cc50a470ccd57e83
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoRemove unused retval from gpe_native_fwd_rpath type definition 98/8098/3
Marek Gradzki [Fri, 18 Aug 2017 06:47:48 +0000 (08:47 +0200)]
Remove unused retval from gpe_native_fwd_rpath type definition

Change-Id: I89a10204454aeea07412289b153ba50d6a15498c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agogpe: add l2 lb counters 66/8166/2
Florin Coras [Wed, 23 Aug 2017 07:51:42 +0000 (00:51 -0700)]
gpe: add l2 lb counters

Change-Id: I81b3fc6266ad02239b6f1a216adc283efdcf0dce
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNAT: Rename snat plugin to nat (VPP-955) 46/8146/3
Matus Fabian [Mon, 21 Aug 2017 14:05:03 +0000 (07:05 -0700)]
NAT: Rename snat plugin to nat (VPP-955)

Change-Id: I30a7e3da7a4efc6038a91e27b48045d4b07e2764
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoFix vl_map_shmem() root_path dangling reference. 63/8163/4
Dave Wallace [Tue, 22 Aug 2017 22:32:34 +0000 (18:32 -0400)]
Fix vl_map_shmem() root_path dangling reference.

Change-Id: I90c9d8e151cacf50a99ce76b7a589079303196e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoEnabled gid vpp in startup.conf to allow non-root vppctl access 38/8138/2
Ed Warnicke [Mon, 21 Aug 2017 01:42:19 +0000 (18:42 -0700)]
Enabled gid vpp in startup.conf to allow non-root vppctl access

Change-Id: I1ca9736dbefc9c284f5176de176fcc3dd1bfcd82
Signed-off-by: Ed Warnicke <eaw@cisco.com>
6 years agoacl-plugin: Recreate the bihash_40_8.h in the proper place 37/7937/4
Andrew Yourtchenko [Tue, 8 Aug 2017 14:43:38 +0000 (16:43 +0200)]
acl-plugin: Recreate the bihash_40_8.h in the proper place

Change-Id: I30a3df53bc5fe5ab991a657918eb502bd2913440
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agodpdk: fix Cavium ThunderX support 57/8157/2
Damjan Marion [Tue, 22 Aug 2017 11:51:31 +0000 (13:51 +0200)]
dpdk: fix Cavium ThunderX support

Change-Id: Id5812448917ce52984d5a778d5b304c448a752e7
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoUpdate gitignore for DPDK files 61/8161/2
Keith Burns (alagalah) [Tue, 22 Aug 2017 13:55:31 +0000 (06:55 -0700)]
Update gitignore for DPDK files

Change-Id: I6c4e76d8a030ec5fafc8167873cc1471913a1e88
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoIncrease default MAC learn limit and check it in learn-update path 59/8159/2
John Lo [Tue, 22 Aug 2017 13:16:50 +0000 (09:16 -0400)]
Increase default MAC learn limit and check it in learn-update path

1. Increase default MAC learn limit from 1M to 8M entries.
2. Check MAC learn limit in MAC learning update path.
3. Allow disable of want_l2_macs_events to set MAC learn limit
4. Other minor cleanups

Change-Id: I62438440937b5fa455e16f4a2e4d910277753395
Signed-off-by: John Lo <loj@cisco.com>
6 years agopolicer: remove unused code 55/8155/2
Damjan Marion [Tue, 22 Aug 2017 08:49:24 +0000 (10:49 +0200)]
policer: remove unused code

This is causing compiler error with gcc 7.

Change-Id: Ia65ee9d80ab263c79e82ad805e5cc5a12af91f85
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoSRv6 tests 73/7273/16
Kris Michielsen [Thu, 22 Jun 2017 11:00:20 +0000 (13:00 +0200)]
SRv6 tests

Change-Id: Ib1d2fc5a83d9d007a0468591a73881675f1bec9b
Signed-off-by: Kris Michielsen <kmichiel@cisco.com>
6 years agodpdk: define MACHINE before it is used 49/8149/2
Damjan Marion [Mon, 21 Aug 2017 20:19:04 +0000 (22:19 +0200)]
dpdk: define MACHINE before it is used

This fixes build on non-x86 platforms like arm64.

Change-Id: I7ff5df92f89e34c27889d82f35924dc28cde8c39
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoping: remove unnecesary x86 intrinsics #include 51/8151/2
Damjan Marion [Mon, 21 Aug 2017 20:37:39 +0000 (22:37 +0200)]
ping: remove unnecesary x86 intrinsics #include

This include file is present only on x86 so it breaks non-x86 builds.

Change-Id: I6406b0b36f207b684535961545e95dbba707d267
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: disable tun/tap PMD 50/8150/1
Damjan Marion [Mon, 21 Aug 2017 20:27:04 +0000 (22:27 +0200)]
dpdk: disable tun/tap PMD

Beside the fact that we don't need it, it fails to build on ARM64.

Change-Id: Iefae8bf234b588d8005df5e053b9152b6611929c
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoPPPoE usses a midchain adjacency stack on an interface-tx DPO 15/8015/8
Neale Ranns [Sat, 12 Aug 2017 09:12:00 +0000 (02:12 -0700)]
PPPoE usses a midchain adjacency stack on an interface-tx DPO

1) introduce an interface-tx DPO. This is a simple wrapper around a sw_if_index. enhance DPO stacking functions to allow per-instance next-nodes and hence allow children to stack onto the interface per-instance tx node and not on 'interface-output'.
2) update PPPoE code to use ta midchain stack on a interface-tx DPO of the encap-interface. This remove the need for pppoe_encap node (which is replaced by the adj-midchain-tx) and interface-output node is no longer used (see above). Since PPPoE encap node is no longer needed, the PPPoE seesion does not need to be retrieved in the data-path, hence the cahce misses are removed.

Change-Id: Id8b40f53daa14889a9c51d802e14fed7fba4399a
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFixed ip add bug for ip6 with review comments 34/8134/8
pragash [Fri, 18 Aug 2017 02:53:24 +0000 (22:53 -0400)]
Fixed ip add bug for ip6 with review comments

Change-Id: Ie1fba1a32020775444c7b1ed800e8559b54691ff
Signed-off-by: pragash <pxv3620@rit.edu>
6 years agosession: fix multi-buffer segments 97/8097/7
Florin Coras [Thu, 17 Aug 2017 23:59:22 +0000 (16:59 -0700)]
session: fix multi-buffer segments

Change-Id: I0e22c85ea570b934b9c78dc5e86d86d690bdae5e
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agogpe: fix sub-interface hash lookup 31/8131/2
Florin Coras [Thu, 17 Aug 2017 22:57:20 +0000 (15:57 -0700)]
gpe: fix sub-interface hash lookup

Change-Id: Ice6b3818ee24c7c248bf61e4d6c1ef2a85cb8fb1
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoPython API: Fix error message typo. 81/8081/4
Ole Troan [Thu, 17 Aug 2017 10:48:08 +0000 (12:48 +0200)]
Python API: Fix error message typo.

Change-Id: Icb67797a91a5929e57a08b79adeca226fee09de3
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoAPI: More gracefully fail when opening shared memory segment fails. 79/8079/3
Ole Troan [Thu, 17 Aug 2017 09:07:33 +0000 (11:07 +0200)]
API: More gracefully fail when opening shared memory segment fails.

API clients would fail with an ASSERT (and core dump) whenever
the API shared memory segment could not be opened.
This returns an error value to the client's connect instead.

Change-Id: Id122a3a090b24b139c382ae09f341bde61fd2540
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoIP4_FIB stats API not indexing after FIB changes - VPP-951 95/8095/2
Keith Burns (alagalah) [Thu, 17 Aug 2017 20:33:15 +0000 (13:33 -0700)]
IP4_FIB stats API not indexing after FIB changes - VPP-951

Change-Id: I9ec36ee82ddd8f2f7a551b458e19b2fbae4aa7e7
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoUpdate CSIT tests 170731 -> 170814 00/8100/2
Jan Gelety [Fri, 18 Aug 2017 07:53:24 +0000 (09:53 +0200)]
Update CSIT tests 170731 -> 170814

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

Change-Id: I09c8551e47dc78567e591ace1e552d3c534e5aab
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agofeature: exit on misconfigured features (VPP-915) 75/8075/4
Florin Coras [Thu, 17 Aug 2017 04:23:44 +0000 (21:23 -0700)]
feature: exit on misconfigured features (VPP-915)

Change-Id: Ifa11f356d727b69cb121a2bf4cfb9d87883f545d
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoUse correct msg ID in the sw-interface-event from TAP and VHOST 05/8105/2
Neale Ranns [Fri, 18 Aug 2017 09:34:28 +0000 (02:34 -0700)]
Use correct msg ID in the sw-interface-event from TAP and VHOST

Change-Id: I0124fa264f7f390fc7cd9722da59be03116831c5
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix vpp crash when adding macip acl 83/8083/2
Pavel Kotucek [Thu, 17 Aug 2017 12:18:00 +0000 (14:18 +0200)]
Fix vpp crash when adding macip acl

When adding at least two different types of MACIP acl vpp crash.

Change-Id: Ibbc76b94015311945be081fe0d8af71cf0672332
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
6 years agoFix small issues in ACL api 72/8072/2
Pavel Kotucek [Wed, 16 Aug 2017 13:45:37 +0000 (15:45 +0200)]
Fix small issues in ACL api

Enable IP address without prefix length, if not given use max (32/128)
Parse correctly type of acl (ipv4).

Change-Id: I3d5d6b45037c9e0f95d2d112ae584f006c6cb4d1
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
6 years agoacl-plugin: time out the sessions created by main thread too (VPP-948) 09/8109/1
Andrew Yourtchenko [Wed, 16 Aug 2017 10:06:15 +0000 (12:06 +0200)]
acl-plugin: time out the sessions created by main thread too (VPP-948)

In multithread setup the main thread may send packets,
which may pass through the node with permit+reflect action.
This creates the connection in lists for thread0,
however in multithread there are no interupt handlers there.

Ensure we are not spending too much time spinning in a
tight cycle by suspending the main cleaner thread
until the current iteration of interrupts is processed.

Change-Id: Idb7346737757ee9a67b5d3e549bc9ad9aab22e89
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit c1ff53f25d04ec1cc31844abd38014e91e398b5f)

6 years agomake test: fix broken passing of return value 74/8074/3
Klement Sekera [Wed, 16 Aug 2017 14:38:10 +0000 (16:38 +0200)]
make test: fix broken passing of return value

Change-Id: I2cb83caaf55ca9a29c06d71c6d20f8273ec062b3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoFix socket_test.sh to run iperf3 in docker. 94/8094/2
Dave Wallace [Thu, 17 Aug 2017 20:22:04 +0000 (16:22 -0400)]
Fix socket_test.sh to run iperf3 in docker.

Change-Id: I47018fee4283b7b257f16e21b82bf7e497a7d985
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoTCP source address automation 61/8061/6
Dave Barach [Tue, 15 Aug 2017 23:03:44 +0000 (19:03 -0400)]
TCP source address automation

- v6 support
- Non-default VRF ID collection
- Break up ip source address list into CLI + API-friendly functions
- Automate proxy arp / proxy nd configuration
- Automate local adjacency insertion
- Binary API support

Change-Id: Iede31184f65cc1ec8c414447d2d60a1334e3fe15
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agomake test: collect symlinks to failed tests 52/8052/5
Klement Sekera [Tue, 15 Aug 2017 05:09:02 +0000 (07:09 +0200)]
make test: collect symlinks to failed tests

Compress files in temporary directories of failed tests and symlink
the directories under /tmp/vpp-failed-unittests location - preparation
for jenkins archivation. Automatically cleanup the directory at start
of test run.

The compression is performed only when environment variable
COMPRESS_FAILED_TEST_LOGS is set to one of "yes", "y", "1".
This is set in verify target, but left unset by default, so when
invoking make test by hand, files won't be compressed.

Change-Id: I84c8f1c6aa79aa9c0b753357022b1f195f17a283
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoPython API: VPP-947 Empty chroot_prefix fails on encode() 78/8078/2
Ole Troan [Thu, 17 Aug 2017 08:34:32 +0000 (10:34 +0200)]
Python API: VPP-947 Empty chroot_prefix fails on encode()

Change-Id: Ide2cdc456f3ab3219930fb8e423b871810469cdc
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agojvpp: suppress unwritten fields warrning found in DTO's hashCode 71/8071/2
Marek Gradzki [Wed, 16 Aug 2017 13:12:40 +0000 (15:12 +0200)]
jvpp: suppress unwritten fields warrning found in DTO's hashCode

DTOs fields are initialized by generated JNI code, so
we can safely ignore FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD.

Coverity uses FindBugs to analyse Java code,
so it should be possible to suppress some of the
issues that are false positives or intentional.

Change-Id: I1375f6123e3eb44db44065d603d9d81726161acb
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoip4: cleanup ip local 62/8062/2
Florin Coras [Wed, 16 Aug 2017 05:47:22 +0000 (22:47 -0700)]
ip4: cleanup ip local

Change-Id: I4f751b0181f25ec6c4abd3a9c7b0386d80743b3a
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotcp: fix v6 sessions 59/8059/5
root [Tue, 15 Aug 2017 16:58:31 +0000 (12:58 -0400)]
tcp: fix v6 sessions

Change-Id: Ia6dd5e948b17b2f3866fe70838eabb09e35415e1
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoSNAT: Make proto optional in nat64_bib_dump (VPP-942) 70/8070/3
Matus Fabian [Wed, 16 Aug 2017 12:37:36 +0000 (05:37 -0700)]
SNAT: Make proto optional in nat64_bib_dump (VPP-942)

make proto optional in nat64_bib_dump and nat64_st_dump

Change-Id: Idd102ce2b1555d38783fd22c84e46b4c48570edc
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoNo context in SW interface event 65/8065/4
Neale Ranns [Tue, 15 Aug 2017 19:29:48 +0000 (12:29 -0700)]
No context in SW interface event

At this pointin the game, events do not have an associated context. they have the client_index and pid instead.

Change-Id: I5052cab78f710bba630a61d2390acbaa1b3813ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agotcp: improve builtin http server 49/8049/3
Florin Coras [Tue, 15 Aug 2017 05:33:41 +0000 (22:33 -0700)]
tcp: improve builtin http server

Additionally:
- remove opaques from stream_session_t
- ensure first segment manager is only used once per app.

Change-Id: I143d1fdb8effc88815ef969b78122ba3ac29e06e
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoAdd missing counters for P2P ethernet interfaces 51/8051/2
Pavel Kotucek [Tue, 15 Aug 2017 11:13:28 +0000 (13:13 +0200)]
Add missing counters for P2P ethernet interfaces

Change-Id: I9d172d70f645fea5005abced73ca2700e640263a
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
6 years agoNAT64: Fallback to 3-tuple key for non TCP/UDP sessions (VPP-884) 14/7514/3
Matus Fabian [Tue, 11 Jul 2017 10:55:02 +0000 (03:55 -0700)]
NAT64: Fallback to 3-tuple key for non TCP/UDP sessions (VPP-884)

Change-Id: I4cafc8291725feb499355092bd429433e649b5b2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoVCL: copy complete ip addr to/from vpe-api buf. 60/8060/2
Dave Wallace [Tue, 15 Aug 2017 20:56:29 +0000 (16:56 -0400)]
VCL: copy complete ip addr to/from vpe-api buf.

Change-Id: I951e051278e775a7ecdaa88af812f535727baa92
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agojvpp: move JVppReply's id out of synchronized block 50/8050/2
Marek Gradzki [Tue, 15 Aug 2017 10:25:24 +0000 (12:25 +0200)]
jvpp: move JVppReply's id out of synchronized block

Should make Coverity stop thinking we try to synchronize reply.context.

Change-Id: I97169e46b9c8f594836d6beb75b9f42dfc6e5bad
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoSupport proxy ARP on mirrored TAP interfaces 55/8055/2
Neale Ranns [Tue, 15 Aug 2017 12:33:11 +0000 (05:33 -0700)]
Support proxy ARP on mirrored TAP interfaces

When VPP has an interface whose address is also applied to a TAP
interface on the host, then VPP's TAP interface will be unnumbered
to the 'real' interface and do proxy ARP from the host.
the curious aspect of this setup is that ARP requests from the host
will come from the VPP's own address.

Change-Id: Ia238790e1034ba3cd3facdab29387b65a31525f2
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoacl-plugin: don't attempt to delete the ACLs on interface deletion if ACL plugin... 42/8042/2
Andrew Yourtchenko [Mon, 14 Aug 2017 18:49:23 +0000 (20:49 +0200)]
acl-plugin: don't attempt to delete the ACLs on interface deletion if ACL plugin heap is not initialized

With the addition of the own heap, the delete routines called from interface deletion
callback may attempt to initialize the ACL plugin heap. This is obviously not
a desirable condition - so, return early from the callback if the ACL plugin
heap has not been initialized yet - there is for sure nothing to clean up.

Change-Id: I08a6ae725294016ff5824189ade91c288e2c473b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoIPv6 local-address for P2P ethernet interfaces 54/8054/2
Pavel Kotucek [Tue, 15 Aug 2017 11:52:22 +0000 (13:52 +0200)]
IPv6 local-address for P2P ethernet interfaces

Change-Id: I87d3cb5754843f38593e92f60a39af2e5241d1cf
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
6 years agoVPP-939: Update CLI Helptext for rx-placement commands 01/8001/2
Billy McFall [Fri, 11 Aug 2017 18:05:11 +0000 (14:05 -0400)]
VPP-939: Update CLI Helptext for rx-placement commands

The CLI commands were change from 'set/show interface placement' to
'set/show interface rx-placement', but the associated help text was not
updated. On the 'set interface rx-placement', some of the parameters
were renamed, which was confusing when looking at the documentation for
help.

While in the file interface_cli.c, cleaned up several other CLI
commands. There are still other commands in the file that need
addressing.

Change-Id: Ifdc357c73ad9f3362133c495217b5a6b3a411eab
Signed-off-by: Billy McFall <bmcfall@redhat.com>
6 years agotcp: state machine improvements 45/8045/2
Florin Coras [Mon, 14 Aug 2017 18:25:25 +0000 (11:25 -0700)]
tcp: state machine improvements

- Add SYN_RCVD timeout
- Fix FIN_WAIT_1 to CLOSING transition

Change-Id: I42ca7fc087f6fdfae15bd7a6175dd3226ed341c7
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoPrevious version was still downloading, unpacking and building IPSEC / AES 36/8036/4
Marco Varlese [Mon, 14 Aug 2017 14:07:00 +0000 (16:07 +0200)]
Previous version was still downloading, unpacking and building IPSEC / AES
libraries.

This patch addresses the misbehaviour.

Change-Id: I41f1ece3ca21c5a8f2c95533ed3d77a535233ea6
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agocoverity: remove dependency on uint32_t in fib_test.c 46/8046/2
Marek Gradzki [Tue, 15 Aug 2017 05:38:26 +0000 (07:38 +0200)]
coverity: remove dependency on uint32_t in fib_test.c

Fixes make build-coverity

Change-Id: I5cf6992224f18b8e8770d365c42b3e759dc93f73
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoSNAT: fix overlapping address space test 47/8047/1
Matus Fabian [Tue, 15 Aug 2017 06:39:58 +0000 (23:39 -0700)]
SNAT: fix overlapping address space test

change address/network of the second interface within VRF 10

Change-Id: Iab9772a419fb3e8f1a193756bdaa68cd8cdbb121
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoFix VCL LD_PRELOAD lib location in socket_test.sh 44/8044/2
Dave Wallace [Mon, 14 Aug 2017 22:26:46 +0000 (18:26 -0400)]
Fix VCL LD_PRELOAD lib location in socket_test.sh

- Use VCL_LDPRELOAD_LIB_DIR env. var if set.
- Default to /usr/local/lib where it will be installed.
- Change library name to libvcl_ldpreload.so.0.0.0

Change-Id: I4fc30b581c8406c5895f875d859aa44bb9ef19b5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoTCP: Update time_now once per burst 40/8040/3
Florin Coras [Mon, 14 Aug 2017 15:10:42 +0000 (08:10 -0700)]
TCP: Update time_now once per burst

Change-Id: I58089d7a9867ede9d8a36b2aea62edef04cb5b81
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFIB table add/delete API only 37/8037/2
Neale Ranns [Mon, 14 Aug 2017 14:18:42 +0000 (07:18 -0700)]
FIB table add/delete API only

commit only the addition of the .api definition and their invocation through VAT so CSIT can use it

Change-Id: Id510f14b1ce007fe5e92120507ea34100652fc64
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoTCP: update builtin server/client cli help 41/8041/2
Florin Coras [Mon, 14 Aug 2017 15:45:15 +0000 (08:45 -0700)]
TCP: update builtin server/client cli help

Change-Id: I224ef3ce1c4ac2ade5ba733a42c78b7ba5c0040e
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: properly handle ctrl-c 97/7997/5
Klement Sekera [Fri, 11 Aug 2017 08:06:15 +0000 (10:06 +0200)]
make test: properly handle ctrl-c

Change-Id: Iab88886ebc1582626813777ea45ce97fc8e36443
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agojvpp: ignore messages if callback method is missing (VPP-548) 79/7979/3
Marek Gradzki [Thu, 10 Aug 2017 12:57:42 +0000 (14:57 +0200)]
jvpp: ignore messages if callback method is missing (VPP-548)

Change-Id: I6a06dbcd8339bd6645a6b02ae70154aa0885dcf8
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agodpdk: force libdir for isa-l crypto library 24/8024/2
Sergio Gonzalez Monroy [Mon, 14 Aug 2017 08:26:44 +0000 (09:26 +0100)]
dpdk: force libdir for isa-l crypto library

Depending on the OS, the default libdir might change.

RHEL/Ubuntu:
libdir={exec_prefix}/lib

OpenSUSE:
libdir={exec_prefix}/lib64

Change-Id: I5f1672e5815ad821e6ac5fff95de5232ab735b67
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoAdded MD5SUM for DPDK 17.08 tarball as a first step towards migration 26/8026/2
Marco Varlese [Mon, 14 Aug 2017 08:53:28 +0000 (10:53 +0200)]
Added MD5SUM for DPDK 17.08 tarball as a first step towards migration

Change-Id: Ic73b857c4e3d5a3f695e93924de5a5bed0af5019
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agodpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw 25/8025/2
Sergio Gonzalez Monroy [Mon, 14 Aug 2017 08:46:19 +0000 (09:46 +0100)]
dpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw

Change-Id: I62939592bd3cb151e02c55a3f1ee6e7d1ce469cb
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agojvpp: make shm_prefix configurable (VPP-591) 15/5815/15
Jan Srnicek [Fri, 24 Mar 2017 09:18:11 +0000 (10:18 +0100)]
jvpp: make shm_prefix configurable (VPP-591)

svm.c - set default map region root path only if root path is not
already present
memory_shared.c - added option for tests to send memory region name
and root path in one variable, if so name and root path are
separated here and set to map region structure so find function
can find it properly
jvpp-registry.c - added parameters shmPrefix to be able pass +
removed sudo restriction
specific shared memory prefix that is used while starting
python tests(see framework.py)
JVppRegistyImpl - added option to specify shmPrefix
VppJNIConnection - added option to specify shmPrefix

Change-Id: I3f89f867fb9b20eef00fbd497cb0e41b25d6eab7
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Signed-off-by: Matej Perina <mperina@cisco.com>
6 years agodefault update adjacency function deos not return multicast adjacency 07/8007/4
Neale Ranns [Sat, 12 Aug 2017 19:52:54 +0000 (12:52 -0700)]
default update adjacency function deos not return multicast adjacency

by not returning a multicast adjacency type when requested, but instead returning a nbr type, the mcast adj was never correctly deleted. hence when reused the adjacency object was not realocated from the pool and when it was freed a second time a crash occured.

Change-Id: Ia74ae3e889db0dfba8ec3c6a0cccfef215587ff6
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoLISP: fix fid nsh address formatting 04/8004/2
Florin Coras [Sat, 12 Aug 2017 01:26:23 +0000 (18:26 -0700)]
LISP: fix fid nsh address formatting

Change-Id: I912fa53c02c720901c9fb253550790829107de39
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: fix broken DEBUG=gdb* options 96/7996/3
Klement Sekera [Fri, 11 Aug 2017 04:56:05 +0000 (06:56 +0200)]
make test: fix broken DEBUG=gdb* options

Change-Id: I5d80982eeab78a629760f567eda3b1539d96e3a8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoFix tcp multi buffer segments retransmission 71/7871/12
Florin Coras [Tue, 1 Aug 2017 23:56:58 +0000 (16:56 -0700)]
Fix tcp multi buffer segments retransmission

- Fix tcp/udp sw checksum computation
- Fix allocation of multi buffer tcp segments for retransmits
- Send FIN only if/when tx fifo is empty

Change-Id: I2e43a14b87a72c9e547b4339b9a51811cf5732c4
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFix IP fragment-id and offset issue in LB-GRE4 51/7751/3
Hongjun Ni [Tue, 25 Jul 2017 14:03:08 +0000 (22:03 +0800)]
Fix IP fragment-id and offset issue in LB-GRE4

Change-Id: Ic1c440b2594c3ec4cdc75730069f16432cdb9587
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoLISP: fix wrong reply message in map_register_fallback_threshold call 30/7930/3
Filip Tehlar [Tue, 8 Aug 2017 11:11:22 +0000 (13:11 +0200)]
LISP: fix wrong reply message in map_register_fallback_threshold call

Change-Id: I0011c211908db6067f918fbaaa7d6863191d5bd3
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agoDedicated SW Interface Event 25/7925/5
Neale Ranns [Mon, 7 Aug 2017 14:53:49 +0000 (07:53 -0700)]
Dedicated SW Interface Event

Change-Id: I06a10a4291e61aec3f1396d2514ed6fe3901897a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agothe automatic addition of IP address to the magic TAP interface should only happen... 89/7989/2
Neale Ranns [Thu, 10 Aug 2017 18:34:12 +0000 (11:34 -0700)]
the automatic addition of IP address to the magic TAP interface should only happen for one table

Change-Id: I99d3e9227c33ee42b90e4842080960fcc6c03913
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoAdd VPP Communications Library (VCL) 89/7889/10
Dave Wallace [Thu, 3 Aug 2017 06:11:34 +0000 (02:11 -0400)]
Add VPP Communications Library (VCL)

- VCL library
- client/server test application
- test script (make test integration tbd)
- gdb command file templates
- vppcom test config file

Change-Id: I21eab7aa09b4e5dc3412acf5c2eab07415c2fc0f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoacl-plugin: add the debug CLI to show macip ACLs and where they are applied (VPP... 92/7992/2
Andrew Yourtchenko [Thu, 10 Aug 2017 14:00:20 +0000 (16:00 +0200)]
acl-plugin: add the debug CLI to show macip ACLs and where they are applied (VPP-936)

When looking at resource utilisation, it is useful to understand
the interactions between the acl-plugin and the rest of VPP.
MACIP ACLs till now could only be dumped via API,
which is tricky when debugging. Add the CLIs to see
the MACIP ACLs and where they are applied.

Change-Id: I3211901589e3dcff751697831c1cd0e19dcab1da
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit f2cfcf676e67a7ea80ce20a69826210eb97acba5)

6 years agoFix memory leaks found in policer code. 47/7947/4
Chaoyu Jin [Tue, 8 Aug 2017 20:36:23 +0000 (13:36 -0700)]
Fix memory leaks found in policer code.
2nd commit is to fix style failures.
3rd commit is to remove unneccesary change based on review comment.

Change-Id: I4d54d25c27e037b9d0438f8af416cf113763dc6d
Signed-off-by: Chaoyu Jin <chjin@cisco.com>
6 years agoAdd tcp, session-layer MAINTAINERS file entries 91/7991/1
Dave Barach [Thu, 10 Aug 2017 18:57:43 +0000 (14:57 -0400)]
Add tcp, session-layer MAINTAINERS file entries

Change-Id: I6c89383738624b8b18645b6c93c3025604ac538e
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoFix LISP cp buffer leakage 72/7972/3
Florin Coras [Thu, 10 Aug 2017 00:50:09 +0000 (17:50 -0700)]
Fix LISP cp buffer leakage

Change-Id: Id7e0f967cc510f0b45f043f74493854083ac67ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoacl-plugin: add MAINTAINERS entry 86/7986/2
Andrew Yourtchenko [Thu, 10 Aug 2017 16:19:30 +0000 (18:19 +0200)]
acl-plugin: add MAINTAINERS entry

Change-Id: I681eca4897f8dba7e85fdbcbb7e03d1d9ef29224
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoacl-plugin: hash lookup bitmask not cleared when ACL is unapplied from interface... 87/7987/1
Andrew Yourtchenko [Thu, 10 Aug 2017 12:19:58 +0000 (14:19 +0200)]
acl-plugin: hash lookup bitmask not cleared when ACL is unapplied from interface (VPP-935)

The logic in hash ACL bitmask update was using the vector
of ACLs applied to the interface to rebuild the hash lookup mask.
However, in transient cases (like doing group manipulation with
hash ACLs), that will not hold true. Thus, make
a local copy of for which ACL indices the hash_acl_apply
was called previously, and maintain that one local
to the hash_lookup.c file logic.

Change-Id: I30187d68febce8bba2ab6ffbb1eee13b5c96a44b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1de7d7044434196610190011ebb431f054701259)

6 years agoImprove the svm fifo allocator 85/7885/5
Dave Barach [Wed, 2 Aug 2017 17:56:13 +0000 (13:56 -0400)]
Improve the svm fifo allocator

- Round up requested fifo size to the next power of two
- Maintain per-segment power-of-two freelists
- Allocate fifos in chunks, to amortize alignment overhead
- Detach builtin test client application after each run
  so we can use different fifo sizes each time
- Be more suspicious of session / application indices

Useful prep work for dynamically resizing fifos. As far as the svm
fifo code is concerned, it's OK to set fifo->nitems anywhere in the
interval: [0, 1<<(fifo->freelist_index) + FIFO_SEGMENT_MIN_FIFO_SIZE]

It's unlikely that setting nitems below the path MTU will work out
very well...

Change-Id: Idad73a027dfb7412056cb02988b77e300fa7e8a7
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoacl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic... 75/7975/2
Andrew Yourtchenko [Tue, 8 Aug 2017 18:10:12 +0000 (20:10 +0200)]
acl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic (VPP-910/VPP-929)

The commit fixing the VPP-910 and separating the memory operations
into separate heaps has missed setting the MHEAP_FLAG_THREAD_SAFE,
which quite obviously caused the issues in the multithread setup.
Fix that.

Also, add the debug CLIs
"set acl-plugin heap {main|hash} {validate|trace} {1|0}"
to toggle the memory instrumentation, in case we ever need it
in the future.

Change-Id: I8bd4f7978613f5ea75a030cfb90674dac34ae7bf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e6423bef32ca2ffcfcd7a092eb4673badd53ea4c)

6 years agomake test: bump default test timeout to 10 minutes 78/7978/1
Klement Sekera [Thu, 10 Aug 2017 04:50:27 +0000 (06:50 +0200)]
make test: bump default test timeout to 10 minutes

Change-Id: I25d88966376d712ff61f29227a45880a59e8ecf2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoMPLS tunnel - multiple labels on the CLI - fix cut and paste robot errors 62/7962/3
Neale Ranns [Wed, 9 Aug 2017 12:43:35 +0000 (05:43 -0700)]
MPLS tunnel - multiple labels on the CLI - fix cut and paste robot errors

Change-Id: I675af62d9c0c9cf2e340bf19e902695861d4e4b5
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVPP-933 VPP crashes when deleting an ARP entry 71/7971/1
Matthew Smith [Wed, 9 Aug 2017 21:30:43 +0000 (16:30 -0500)]
VPP-933 VPP crashes when deleting an ARP entry

When attempting to delete an ARP entry on an interface
that hasn't had any ARP entries added yet, VPP was
retrieving an array element at an index that was out of
bounds and trying to dereference it.

Change-Id: Id141d3bfd8378dd8dd63f43b0b4b41461c285a4f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agomake test: detect hung tests 59/7959/4
Klement Sekera [Tue, 8 Aug 2017 02:33:53 +0000 (04:33 +0200)]
make test: detect hung tests

Run tests in a forked process with a set of pipes to communicate
keep-alives and overall result. This allows us to detect when e.g.
vpp dies mid-API call causing the test to hang waiting for response
(which will never come since vpp died).

Support setting a (per test case) TIMEOUT make test option to set timeout,
with a default timeout of 120 seconds.

Example - fail the test suite if any test-case fails to finish within
300s:

make TIMEOUT=300 test

Change-Id: I0d04f26a7232968f4bf043adf5d5b508f5018717
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoTCP proxy prototype 27/7927/8
Dave Barach [Mon, 7 Aug 2017 13:35:25 +0000 (09:35 -0400)]
TCP proxy prototype

- Clean up internal API client registration
- Add proxy server
- Add a reference count to the svm fifo

Change-Id: I5ace1c85497062ed412d26ae76a9e6741af1e984
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoacl-plugin: all TCP sessions treated as transient (VPP-932) 63/7963/3
Andrew Yourtchenko [Wed, 9 Aug 2017 09:28:02 +0000 (11:28 +0200)]
acl-plugin: all TCP sessions treated as transient (VPP-932)

The packet that was creating the session was not tracked,
consequently the TCP flags seen within the session record
never got the value for the session to get treated as
being in the established state.

Test-escape, so add the TCP tests which test the
three phases of the TCP session life and make them all pass.

Change-Id: Ib048bc30c809a7f03be2de7e8361c2c281270348
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 754370f1b55d4102d21dd94676f2bda3170c7df0)

6 years agodpdk: only build SW crypto for x86_64 platforms 83/7883/2
Sergio Gonzalez Monroy [Wed, 19 Jul 2017 15:22:28 +0000 (16:22 +0100)]
dpdk: only build SW crypto for x86_64 platforms

Change-Id: If559747ad59c82c81d15734f27e15548eca0962b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoPPPoE: use DPO protos in FIB entry path add/remove 61/7961/1
Neale Ranns [Wed, 9 Aug 2017 12:35:02 +0000 (05:35 -0700)]
PPPoE: use DPO protos in FIB entry path add/remove

Change-Id: I6ac10ec0adf179b86f97269bbce2a7fd8796e72a
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoAdd PPPoE Plugin 07/7407/24
Hongjun Ni [Tue, 4 Jul 2017 12:11:57 +0000 (20:11 +0800)]
Add PPPoE Plugin

Supports 64K PPPoE sessions

This plugin adds three graph nodes:
1) pppoe-input for PPPoE decapsulation
2) pppoe-encap for PPPoE encapsulation
3) pppoe-tap-dispatch for control plane process

Below is the configuration to make PPPoE CP and DP work:
vim /etc/vpp/startup.conf
tuntap {
  enable
  ethernet
  name newtap
}

create pppoe tap tap-if-index 1

//Configure it after a subscriber's PPPoE discovery and PPP link establishment succeeds:
create pppoe session client-ip 100.1.2.1 session-id 1 client-mac 00:11:01:00:00:01

show pppoe fib
show pppoe session

Change-Id: I73e724b6bf7c3e4181a9914c5752da1fa72d7e60
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>