vpp.git
6 years agoPUNT socket: External control plane processes connected via UNIX domain sockets. 21/6721/15
Ole Troan [Tue, 16 May 2017 12:59:29 +0000 (14:59 +0200)]
PUNT socket: External control plane processes connected via UNIX domain sockets.

An external (to VPP) process can register (over the VPP binary API) to
receive control plane packets over a UNIX domain socket. The packets are
prepended with a packet descriptor containing meta-data (if_index of
interface, etc).

Currently only UDP is supported.

The socket supports sending of packets/frames as well.
The sent packet is prepended with a descriptor, telling VPP to
route the packet (via ip4-lookup, ip6-lookup) or as an pre-formed
Ethernet frame that is sent directly to interface-output.

The intended use case for this is for an external DHCP client or
a RIP implementation.

New configuration option:

punt { socket <socket path> }

To register use the punt_socket API message.

TODO:
  - Add support for pre-routing. I.e send L3 packet to given
    TX interface, but do ARP/ND (ip[46]-rewrite)
  - Add test scripts
  - Support for abstract names (starting with \0)
  - Add rate limiting (COP)
  - Support for other protocols, e.g. IPv6 ND

Change-Id: I4a0afc8020deebb3d9d74686dde694ee5bcb8d0f
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoLISP: re-fetch mapping before it expires 48/8048/4
Filip Tehlar [Mon, 14 Aug 2017 17:15:36 +0000 (19:15 +0200)]
LISP: re-fetch mapping before it expires

Change-Id: I0581a1bddad55d8d573c546ec84b0b2760abab3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agoImprove L2FIB PDR/NDR performance (VPP-963) 89/8289/2
John Lo [Sat, 2 Sep 2017 12:27:36 +0000 (08:27 -0400)]
Improve L2FIB PDR/NDR performance (VPP-963)

1. Limit MAC entry update per l2-learn call to reduce update burst
   when wall clock advance to the the next minute so all MAC time
   stamps are behind current time needing update.
2. Optimize l2-learn node fast path code sequence.
3. Invalidate cache_key when update MAC entry.
4. Change L2 learn hit counter to L2 learn hit-update counter.
5. Increase L2FIB table memory size to 512MB to fit 4M entries
6. Set MAC learn limit at 4M entries

Change-Id: I3075ee8fb59645a56850126bac2e3e6d341cef4d
Signed-off-by: John Lo <loj@cisco.com>
6 years agoThe build system still builds the DPDK plugin when the option 83/8283/2
Marco Varlese [Fri, 1 Sep 2017 12:47:53 +0000 (14:47 +0200)]
The build system still builds the DPDK plugin when the option
vpp_uses_dpdk is set to "no" in build-data/platforms/vpp.mk causing the
build to fail.

This patch addresses that issue.

Change-Id: Icc1aaa508e730c9b8715119e1259e4c82f974048
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoAdd fixed-size, preallocated pool support 37/8237/9
Dave Barach [Tue, 29 Aug 2017 15:43:37 +0000 (11:43 -0400)]
Add fixed-size, preallocated pool support

Simply call pool_init_fixed(...) before using the pool. Note that
fixed, preallocated pools live in individually-mmap'ed address
segments, except for the free element bitmap. A large fixed pool can
exceed 4gb.

Fix tcp buffer allocator leak, remove broken assert

Change-Id: I4421082e12a77c41c6e20f7747f3150dcd01fc26
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVPP-959: Python API require minimum CFFI version. 71/8271/2
Ole Troan [Thu, 31 Aug 2017 10:59:43 +0000 (12:59 +0200)]
VPP-959: Python API require minimum CFFI version.

Change-Id: I328689b7d4efe6017412de43630a5e9f3633dd71
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agodpdk/ipsec: update doc regarding startup.conf 73/8273/2
Sergio Gonzalez Monroy [Thu, 31 Aug 2017 14:12:00 +0000 (15:12 +0100)]
dpdk/ipsec: update doc regarding startup.conf

Change-Id: Ie449072ab1efec081235b508f1def60a1287ff5f
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agovhost: Disallow interrupt mode config if driver opts out interrupt support 44/7844/3
Steven [Sat, 29 Jul 2017 15:56:08 +0000 (08:56 -0700)]
vhost: Disallow interrupt mode config if driver opts out interrupt support

According to the spec, supporting interrupt mode from the driver is optional,
not a must. When interrupt mode is configured on the interface, we should
check to make sure that the driver didn't opt out for the kickfd support and
reject the configuration if it did.

Change-Id: I7d3dbaddde65458e1a6a802754a3768ae8685a0e
Signed-off-by: Steven <sluong@cisco.com>
6 years agoAdd explicit check for Fedora. 75/8275/1
Thomas F Herbert [Thu, 31 Aug 2017 14:22:57 +0000 (10:22 -0400)]
Add explicit check for Fedora.

Change-Id: I0a5aece190ccc82f0f840e3bc75e1d27433f5b47
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
6 years agoDo arithemtric comparison in Makefile without using bc 69/8269/2
Damjan Marion [Thu, 31 Aug 2017 09:33:34 +0000 (11:33 +0200)]
Do arithemtric comparison in Makefile without using bc

Change-Id: I245f56814ba3911b832e7450d42c58f235bc6dc2
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoRevert "add bc to dependency list" 68/8268/2
Damjan Marion [Thu, 31 Aug 2017 09:23:10 +0000 (11:23 +0200)]
Revert "add bc to dependency list"

Adding new dependency is not right solution to this problem.

This reverts commit e58c93b2764eb306d286531a2b920c6de080cb77.

Change-Id: I08f2af5cf9c26c4302b0dbaccebbb52f0614f80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix BIHASH_KVP_CACHE_SIZE == 0 case 70/8270/2
Dave Barach [Thu, 31 Aug 2017 09:58:22 +0000 (05:58 -0400)]
Fix BIHASH_KVP_CACHE_SIZE == 0 case

Setting the bucket-level LRU cache size to zero removes the
bucket-level LRU cache code.

Change-Id: Idf2e63d0d508675e957366515863766f79a3479c
Signed-off-by: Dave Barach <dbarach@cisco.com>
6 years agoNative arm64 build: dpdk/Makefile change 28/8228/5
Brian Brooks [Mon, 28 Aug 2017 18:05:26 +0000 (13:05 -0500)]
Native arm64 build: dpdk/Makefile change

With this change, the status of `make build':

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - success
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - compiler ICEs
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Before:

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - fail
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - fail
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Change-Id: I49db34a33f9ca0725c7511d4f796706892b5b2da
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
6 years agoFix vent_data memory leak in function run_ping_ip46_address (VPP-966) 66/8266/3
dongjuan [Thu, 31 Aug 2017 06:57:54 +0000 (14:57 +0800)]
Fix vent_data memory leak in function run_ping_ip46_address (VPP-966)

Change-Id: I05d0c8310aa86480a3d283f45e115284c4b4ebd5
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
6 years agoSet runtime_path properly when running non-root 56/8256/3
Damjan Marion [Wed, 30 Aug 2017 15:12:25 +0000 (17:12 +0200)]
Set runtime_path properly when running non-root

non-root users should use /run/user/$PID/...

Change-Id: I1ca136df7a339eff193ed9c9a396d6965b192d0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFree memory the 'rpaths' pointers, that may incur memory leaks(VPP-965). 65/8265/1
ShenJibiao [Thu, 31 Aug 2017 05:57:48 +0000 (13:57 +0800)]
Free memory the 'rpaths' pointers, that may incur memory leaks(VPP-965).

Change-Id: I2732c02b97f4602162638bbcf3ab46521c2782da
Signed-off-by: ShenJibiao <shen.jibiao@zte.com.cn>
6 years agoImprovements to socket_test.sh script 62/8262/2
Keith Burns (alagalah) [Wed, 30 Aug 2017 21:06:52 +0000 (14:06 -0700)]
Improvements to socket_test.sh script

Change-Id: I10c59dc32edb7336a56722b1de8cca1d0ae31c60
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoadd bc to dependency list 60/8260/1
Gabriel Ganne [Wed, 30 Aug 2017 17:44:56 +0000 (19:44 +0200)]
add bc to dependency list

replace $(echo "..." | bc) by `echo ... | bc` as they do not seem to
behave the same way.

Change-Id: Ib8f13f0c8213aaae89d65559427e01bc40f4e8d1
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoThread safe internal buffer manager, take two 32/8232/4
Damjan Marion [Mon, 28 Aug 2017 22:15:35 +0000 (00:15 +0200)]
Thread safe internal buffer manager, take two

First attempt to make internal buffer manager thread safe was not
succesfull, so trying again. This time with more testing.

Change-Id: I01b8385a9c26d233934a3339255ea4bd31c865ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agotcp: re-enable persist timer if no data available to send 41/8241/2
Florin Coras [Tue, 29 Aug 2017 21:50:13 +0000 (14:50 -0700)]
tcp: re-enable persist timer if no data available to send

Additionally, flush rx fifos for closed sessions.

Change-Id: If2cc563fbda0451e7572650e98b15f0a694a0ff9
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoOffload prep calls needed for IP and UDP checksum offload pkts 45/8245/1
Dave Barach [Wed, 30 Aug 2017 12:14:03 +0000 (08:14 -0400)]
Offload prep calls needed for IP and UDP checksum offload pkts

Change-Id: I9b29bcff348bddfb49b1c38b1d409249e37bb075
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agovhost: Cache qsz_mask instead of qsz in vhost_user_vring_t 38/8238/3
Steven [Tue, 29 Aug 2017 16:23:26 +0000 (09:23 -0700)]
vhost: Cache qsz_mask instead of qsz in vhost_user_vring_t

In the data path, we grab qsz from vhost_user_vring_t to compute
qsz_mask and store it in a stack variable to use on many occasions.
We never use qsz for any meaningful purpose. It is more useful to
cache qsz_mask in vhost_user_vring_t to avoid the needless computation
in the data path.

Change-Id: Idf4d94a9754d5c75c899f1f4f59602275b9904a6
Signed-off-by: Steven <sluong@cisco.com>
6 years agoFix static mapping lookup issue for NAT plugin 31/8231/4
Hongjun Ni [Tue, 29 Aug 2017 16:55:59 +0000 (00:55 +0800)]
Fix static mapping lookup issue for NAT plugin

Change-Id: Ic99d1db5360f69126b23bb2b78f29d6404cbbae9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoFix some issue of comment and help for nat feature 30/8230/3
Hongjun Ni [Tue, 29 Aug 2017 12:39:42 +0000 (20:39 +0800)]
Fix some issue of comment and help for nat feature

Change-Id: I9233e427b5f8874492fefb2bfe7c1ab329e366b2
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoAdd .pybuild to gitignore 40/8240/2
Keith Burns (alagalah) [Tue, 29 Aug 2017 18:16:32 +0000 (11:16 -0700)]
Add .pybuild to gitignore

Change-Id: I4467a30ec1beff67a0517619296f1a27589ff55b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agosession: segment manager improvements 92/8092/9
Florin Coras [Thu, 17 Aug 2017 02:55:49 +0000 (19:55 -0700)]
session: segment manager improvements

- cleanup connects segment manager even if first
- fix segment manager allocation for listen sessions
- improve handling of process private segments (mheaps/main heap)
- added segment manager cli

Change-Id: Ic2ca97c3622ab2286d5fb5772aeb57680e64f769
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosilence makefile warning on ubuntu 36/8236/1
Gabriel Ganne [Tue, 29 Aug 2017 09:29:38 +0000 (11:29 +0200)]
silence makefile warning on ubuntu

shell error on ubuntu when OS_VERSION_ID == 16.04:
/bin/sh: 1: [: Illegal number: 16.04

Change-Id: I8db55f751ad7fb677a6565cbbce93a9bc08060b7
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFix for bootstrap crash when VPP compiled with gcc-7 35/8235/3
Marco Varlese [Tue, 29 Aug 2017 12:04:06 +0000 (14:04 +0200)]
Fix for bootstrap crash when VPP compiled with gcc-7

See issue VPP-964

Change-Id: I2aed5abdc02e47e7bb5b0ce78cb6589a1ce7302f
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoFlowprobe: Fix flow start time and hash computation 51/7951/4
Pierre Pfister [Wed, 9 Aug 2017 08:42:06 +0000 (10:42 +0200)]
Flowprobe: Fix flow start time and hash computation

Upon hash collision, the flow start time was not reset.
The hash computation techniques (crc32 or xxhash) also both
had bugs which are now fixed.

Change-Id: I94d72997f34018d1699324264f7dded2a5cbd776
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
6 years agovhost: Remove operation mode in the API 26/8226/1
Steven [Mon, 28 Aug 2017 18:34:47 +0000 (11:34 -0700)]
vhost: Remove operation mode in the API

create/delete/modify vhost_user APIs no longer support the operation mode
(polling/interrupt/adaptive). They are now done via the generic interface.

Change-Id: I9e9bd503f9b56c953ecd2b271b3e2007da20c72a
Signed-off-by: Steven <sluong@cisco.com>
6 years agoAdd Build Requirements from Makefile to spec file. 17/8117/4
Thomas F Herbert [Thu, 3 Aug 2017 15:04:24 +0000 (11:04 -0400)]
Add Build Requirements from Makefile to spec file.

JIRA: VPP-498

Changes to build to help with downstream distro builds
for Fedora, Centos and RHEL distros.
Add nasm, automake, libtool, byacc, bison and flex.
Remove libconfuse and dependencies.
Remove epel-release rpm and dependencies.
Add conditionals to work around Python 2 packaging
inconsistency in Fed 25.
Add numactl to rpm requirements.

Change-Id: Ia39f8b931dc87e42df56414d38662eb33c7a4ca7
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
6 years agojvpp: adding debug usage into test documentation 71/8171/3
Matej Perina [Wed, 23 Aug 2017 10:48:46 +0000 (12:48 +0200)]
jvpp: adding debug usage into test documentation

added debug version commands to Readme files for example tests

Change-Id: Icc5d5cdd33efb6d7c7512c7a78e22d9dc3d31fdc
Signed-off-by: Matej Perina <mperina@cisco.com>
6 years agoTCP horizontal scaling 62/8162/3
Dave Barach [Tue, 22 Aug 2017 21:56:46 +0000 (17:56 -0400)]
TCP horizontal scaling

- Remove frame handoff support machinery. We haven't used it in a long
  time.
- Configuration support for the local endpoints bihash table
- Drop lookup failure packets in tcp46_syn_sent

Change-Id: Icd51e6785f74661c741e76fac23d21c4cc998d17
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agodpdk: bump to dpdk 17.08, remove support for dpdk 17.02 16/8216/3
Damjan Marion [Fri, 25 Aug 2017 17:10:57 +0000 (19:10 +0200)]
dpdk: bump to dpdk 17.08, remove support for dpdk 17.02

Change-Id: I674fb1212e48693939045523df085326a4dd1809
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomake test: separate test discovery code 89/8089/3
Klement Sekera [Thu, 17 Aug 2017 05:38:42 +0000 (07:38 +0200)]
make test: separate test discovery code

Separating test discovery code to it's own script file has the
advantage of easily doing e.g. listing of all existing tests.

Change-Id: I80dc280263cc7e33e7e13cb0d48b39bf08ece24d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
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>