vpp.git
6 years agotapv2: add option to set host-side default gw 55/10155/3
Damjan Marion [Thu, 18 Jan 2018 12:35:11 +0000 (13:35 +0100)]
tapv2: add option to set host-side default gw

Change-Id: I76fd655ecd9445299b94b3b5af10e7b1588584e4
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVPP-1119: PPPoE's destination MAC was overwritten 62/10062/2
Hongjun Ni [Mon, 8 Jan 2018 22:52:19 +0000 (06:52 +0800)]
VPP-1119: PPPoE's destination MAC was overwritten

Change-Id: I6ae99c00e76058654f2c5e71377e9fd1bd13b47b
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit c287cd550b91be7a93bae76d0086db87f575e3d3)

6 years agoEvent log entries for VCL 50/10150/2
Keith Burns (alagalah) [Wed, 17 Jan 2018 23:16:32 +0000 (15:16 -0800)]
Event log entries for VCL

Change-Id: I288ecd7f39422ed900a5c6fbaf9c939ab5c06880
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoFIB Inherited Srouce 77/9477/6
Neale Ranns [Thu, 6 Apr 2017 11:41:02 +0000 (04:41 -0700)]
FIB Inherited Srouce

forwarding provided by the source is pushed to all other entries
it covers in the sub-tree

Change-Id: I2a45222ef653358f55c2436de3e3c6353cfadba2
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agodpdk plugin depends on numactl-libs 52/10152/1
Gabriel Ganne [Thu, 18 Jan 2018 10:00:17 +0000 (11:00 +0100)]
dpdk plugin depends on numactl-libs

dpdk_plugin.so depends on libnuma.so.1

Change-Id: Ia1fd3b5cec043b294cc14cd947908675b451deac
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoVPP-1122 dpdk/ipsec: fix transport mode pkt len 21/10121/5
Radu Nicolau [Tue, 16 Jan 2018 15:33:31 +0000 (15:33 +0000)]
VPP-1122 dpdk/ipsec: fix transport mode pkt len

Change-Id: I6eef2ca258ff5b4aa9b21b98543d814633e295af
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agoLD_PRELOAD: stateless LDP 39/9939/13
Dave Wallace [Thu, 4 Jan 2018 03:24:41 +0000 (22:24 -0500)]
LD_PRELOAD: stateless LDP

- Refactor LDP to be stateless.
- Use upper bit of fd to identify
  tag as VCL session.
- Clean up debug output.
- Add VCOM config env vars for
  app name and sid bit.
- Add VCL get/set attributes
- Add VCL poll implementation.

Change-Id: I4603ae88254c460a024fdb79fe91c6d1ef9bc7b9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agossvm: reuse clib mem infra for memfd segments 34/10134/2
Florin Coras [Tue, 16 Jan 2018 10:40:18 +0000 (02:40 -0800)]
ssvm: reuse clib mem infra for memfd segments

Change-Id: I67648dbed3c7ed291b3e1ce617d83a776d3623bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agostats: Fix per interface stats 60/9560/6
Mohsin Kazmi [Wed, 15 Nov 2017 13:21:59 +0000 (14:21 +0100)]
stats: Fix per interface stats

Change-Id: I94618933719abb6ada1272bcf76f4f5304043873
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agostn: add vat support 10/10110/2
Florin Coras [Mon, 15 Jan 2018 12:43:02 +0000 (04:43 -0800)]
stn: add vat support

Change-Id: Ifba0a4a297b6c01d75b86bc211a32740af5e48ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFix api test_client.c compilation 02/10102/3
Pierre Pfister [Mon, 15 Jan 2018 14:30:16 +0000 (15:30 +0100)]
Fix api test_client.c compilation

c42fc05bfbb26fd11fe92ac9d11587660a817ac1 removed
mr_create_table_if_needed parameter in FIB API calls.
This commit fixes the API test program, which was not compiling
anymore.

Change-Id: Id6899c860235363bef9ba35cd8f24033a55cd5e6
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
6 years agoFix checksum offload sssue caused by overwriten lX_hdr_offset 04/10104/3
Damjan Marion [Mon, 15 Jan 2018 16:57:00 +0000 (17:57 +0100)]
Fix checksum offload sssue caused by overwriten lX_hdr_offset

This happens when 2 packets belonging to 2 different interfaces hit
dual loop in the ethernet-input. Packets go to slow path which doesn't
set l2 hdr offset correctly for l3 packets.

Change-Id: I61d87c079db0b2e21f8af6f6b600bff14030535d
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoELOG additions for VCL 27/10127/2
Keith Burns (alagalah) [Tue, 16 Jan 2018 22:20:34 +0000 (14:20 -0800)]
ELOG additions for VCL

Change-Id: I61557f9ad9ca2a033ba01bd25a7a8cd4d5ce092e
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoacl-plugin: multicore: use pool_init_fixed for per-worker preallocated pools 20/10120/2
Andrew Yourtchenko [Tue, 16 Jan 2018 15:33:28 +0000 (16:33 +0100)]
acl-plugin: multicore: use pool_init_fixed for per-worker preallocated pools

One worker thread may be processing the packets
for session owned by another worker thread.
During session access the validity of the pool
index is checked - however, the free bitmap pointer
might change just at that moment, potentially resulting
in a crash.

Thus, use the pool_init_fixed() when initializing the per-worker pools,
so that the free bitmaps are as well staying in their place.

Change-Id: I5796e6b62fdc1efd4299124a388b84a7c0dc19cd
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoTolerate missing nodes during feature arc initialisation 51/10051/2
Neale Ranns [Wed, 10 Jan 2018 11:49:29 +0000 (03:49 -0800)]
Tolerate missing nodes during feature arc initialisation

Change-Id: Ib0d0b663bf71ce52ead2f81140c710f31f040f89
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoapi: fix api_format.c soft link to vat 25/10125/4
Florin Coras [Tue, 16 Jan 2018 10:50:12 +0000 (02:50 -0800)]
api: fix api_format.c soft link to vat

Commit 6c4dae27e75fc66 broke api_format.c soft link between vat at vpp
api. Probably a make fixstyle issue. Thanks to John Lo for catching
this.

Change-Id: I0567b49fb5c70314d7d6e72f8c9f0f1575948702
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotapv2: deleting tap interface may leak buffers (VPP-1124) 22/10122/1
Steven [Tue, 9 Jan 2018 19:13:29 +0000 (11:13 -0800)]
tapv2: deleting tap interface may leak buffers (VPP-1124)

Buffers may be allocated for indirect descriptors by tx thread and
they are freed when tx thread is invoked in the next invocation.
This is to allow the recipient (kernel) to have a chance to process
them. But if the tap interface is deleted, the tx thread may not yet
be called to clean up the indirect descriptors' buffers. In that case,
we need to remove them without waiting for the tx thread to be called.
Failure to do so may cause buffers leak when the tap interface is deleted.

For the RX ring, leakage also exists for vring->buffers when the interface
is removed.

Change-Id: I3df313a0e60334776b19daf51a9f5bf20dfdc489
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit d8a998e74b815dd3725dfcd80080e4e540940236)

6 years agoUpdate CSIT tests 171218 -> 180115 15/10115/1
Jan Gelety [Tue, 16 Jan 2018 07:37:50 +0000 (08:37 +0100)]
Update CSIT tests 171218 -> 180115

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

Change-Id: I25a69cf3c9a93754e0cbfc0c1bc62f10883d3027
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agobfd: fix bfd_auth_keys_dump 08/10108/2
Florin Coras [Mon, 15 Jan 2018 09:17:29 +0000 (01:17 -0800)]
bfd: fix bfd_auth_keys_dump

Change-Id: I58598f18b9af70e580be4d28a0c40ec0ffcd5dca
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosvm: refactor memfd and remove ssvm_eth 96/10096/3
Florin Coras [Sun, 14 Jan 2018 20:25:50 +0000 (12:25 -0800)]
svm: refactor memfd and remove ssvm_eth

Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agofix udp_ping api naming error 76/10076/3
Gabriel Ganne [Thu, 11 Jan 2018 14:09:38 +0000 (15:09 +0100)]
fix udp_ping api naming error

Error messages:
ERROR:VAPI CPP GEN:Cannot find reply to message `udp_ping_add_del_req'
ERROR:VAPI CPP GEN:Cannot find reply to message `udp_ping_export_req'
ERROR:VAPI C GEN:Cannot find reply to message `udp_ping_add_del_req'
ERROR:VAPI C GEN:Cannot find reply to message `udp_ping_export_req'

Api was *_req/*_resp, but when explicitely declared, the reply should
then have been *_req_reply.
Both api response are empty, so I propose to remove them, and use
autoreply

API changes:
rename udp_ping_add_del_req -> udp_ping_add_del
rename udp_ping_export_req -> udp_ping_export
delete udp_ping_add_del_reply (empty response)
delete udp_ping_export_reply (empty response)
vl_api_version 1.0.0 ->2.0.0

Change-Id: Id3456c8101a7689fbc56dc2d9076625c2b3af0ad
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoMarvell device plugin 07/9907/11
Damjan Marion [Tue, 26 Dec 2017 13:40:13 +0000 (13:40 +0000)]
Marvell device plugin

Depends in musdk 17.10 [1], tested on MACCHIATObin [2] board.
currently only coves PP2.

musdk must be compiled with:
./configure --enable-bpool-dma=64

[1] https://github.com/MarvellEmbeddedProcessors/musdk-marvell
[2] http://macchiatobin.net

Change-Id: I0247a6b860b0a067c54190eae0bd3fe08de234ad
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovabits - subtract from the 'end' address instead of from 'bits'. 75/10075/2
Gabriel Ganne [Thu, 11 Jan 2018 14:04:19 +0000 (15:04 +0100)]
vabits - subtract from the 'end' address instead of from 'bits'.

This is a fixup for the commits on
calc base address on AArch64 based on autodetected VA space size

As reported by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Change-Id: Id1bd7b7d7e5c188d8547c46134082bd4563b92db

6 years agoImprove "show xxx tunnel" and "show int addr" output 94/10094/3
John Lo [Fri, 12 Jan 2018 22:15:25 +0000 (17:15 -0500)]
Improve "show xxx tunnel" and "show int addr" output

Improve "show xxx tunnel" output functions format_xxx_tunnel() for
GRE, VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels to make their output
more consistent and provide better information.
Improved the output of "show int addr" to make its info more
consistent with tunnels and provide fib-index info.

Change-Id: Icd4b5b85a5bec417f8ee19afea336c770ad3b4c5
Signed-off-by: John Lo <loj@cisco.com>
6 years agoapi: fix handlers that explicitly depend on svm queue 61/10061/2
Florin Coras [Wed, 10 Jan 2018 16:17:03 +0000 (08:17 -0800)]
api: fix handlers that explicitly depend on svm queue

Fixes the remainig apis that explicitly check svm queue length.

Change-Id: I6055c7c50050affee3098e162e15fb12c205e5db
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotcp: make proxy server uri cli configurable 79/10079/3
Florin Coras [Thu, 11 Jan 2018 10:23:35 +0000 (02:23 -0800)]
tcp: make proxy server uri cli configurable

Change-Id: I94c7315558ccc9f3d4bcdefd09a696234bc56227
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoapi: remove transport specific code from handlers 38/10038/9
Florin Coras [Tue, 9 Jan 2018 14:39:23 +0000 (06:39 -0800)]
api: remove transport specific code from handlers

This does not update api client code. In other words, if the client
assumes the transport is shmem based, this patch does not change that.
Furthermore, code that checks queue size, for tail dropping, is not
updated.

Done for the following apis:
Plugins
- acl
- gtpu
- memif
- nat
- pppoe
VNET
- bfd
- bier
- tapv2
- vhost user
- dhcp
- flow
- geneve
- ip
- punt
- ipsec/ipsec-gre
- l2
- l2tp
- lisp-cp/one-cp
- lisp-gpe
- map
- mpls
- policer
- session
- span
- udp
- tap
- vxlan/vxlan-gpe
- interface
VPP
- api/api.c
OAM
- oam_api.c
Stats
- stats.c

Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoRemove vpp_api_test interface name filter catalog 77/10077/2
Dave Barach [Thu, 11 Jan 2018 15:25:07 +0000 (10:25 -0500)]
Remove vpp_api_test interface name filter catalog

If I remember correctly, I added the interface name filter catalog to
avoid cluttering up the vat interface table with [unused] packet
generator interfaces. Since we no longer create pg interfaces we're
not planning to use, the filter catalog does more harm than
good. Every new interface name prefix would have had to be added to
the list, and folks wouldn't likely know they should do that...

Change-Id: I4067f8ba70ad13c8dc5ebaf21a23759a2cf2675e
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoHandle a mix of CNAME, A/AAAA records 60/10060/2
Dave Barach [Wed, 10 Jan 2018 23:18:59 +0000 (18:18 -0500)]
Handle a mix of CNAME, A/AAAA records

Poster-child: 8.8.8.8 resolving mag.ncep.noaa.gov

Change-Id: I600cd0274b9017e9c91817511d3d3366f0bd02b9
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVPP-1131: doxygen: Documentation for Debug CLI stops at src/plugin/l2e 74/10074/2
Billy McFall [Wed, 10 Jan 2018 21:48:59 +0000 (16:48 -0500)]
VPP-1131: doxygen: Documentation for Debug CLI stops at src/plugin/l2e

Change-Id: I3ce014da7b514aa766a90cacddd76cd2247406a8
Signed-off-by: Billy McFall <bmcfall@redhat.com>
(cherry picked from commit bbdfeaebf25525a55d9a87ba4c0f789c176cc7bf)

6 years agoNAT44: asymmetrical load balancing static mapping rule (VPP-1132) 73/10073/1
Matus Fabian [Thu, 11 Jan 2018 12:09:17 +0000 (04:09 -0800)]
NAT44: asymmetrical load balancing static mapping rule (VPP-1132)

Add option to NAT44 load balancing static mapping API/CLI to make rule asymmetrical (rule match only in out2in direction).

Change-Id: I325ecef5591e4bf44ce4469a24d44fe56c3bb2e9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoAdd support for MAP-T CE (VPP-1058) 04/10004/2
Juraj Sloboda [Tue, 19 Dec 2017 19:57:48 +0000 (20:57 +0100)]
Add support for MAP-T CE (VPP-1058)

Change-Id: Ib99058323c50f20fcdb44185aee027c5c6ef8c91
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoAdd basic support for DS-Lite CE (VPP-1059) 50/10050/4
Juraj Sloboda [Tue, 9 Jan 2018 15:08:32 +0000 (16:08 +0100)]
Add basic support for DS-Lite CE (VPP-1059)

Change-Id: Ifcca60da3f77c0a4959f98b3365c846badbdc2d0
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agosvm: calc base address on AArch64 based on autodetected VA space size 49/10049/2
Gabriel Ganne [Wed, 10 Jan 2018 10:40:50 +0000 (11:40 +0100)]
svm: calc base address on AArch64 based on autodetected VA space size

fix proposal for aec8f8984771cabc79a8ed64f56afcf61465d00a

* fix 0/1 bit count
* fix memory leak

Change-Id: I488229917c463be10b8a5a1b0a3d7723f05061d0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agomakefile set CXXFLAGS so they are propageted to sub-builds 57/10057/1
Neale Ranns [Wed, 10 Jan 2018 15:27:17 +0000 (07:27 -0800)]
makefile set CXXFLAGS so they are propageted to sub-builds

Change-Id: I55d9953851062f7106c66701d46bcd9073cf1ee4
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoFix stn rules dump api (VPP-1123) 31/10031/3
Florin Coras [Tue, 9 Jan 2018 09:51:43 +0000 (01:51 -0800)]
Fix stn rules dump api (VPP-1123)

Change-Id: If9e9e4fc348d20396713d9017100dda63a107edb
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFunctional improvements, bug fixes 37/10037/2
Dave Barach [Tue, 9 Jan 2018 22:00:00 +0000 (17:00 -0500)]
Functional improvements, bug fixes

At least when testing against "known good" DNS servers: it turns out
that sending 2x requests - one for an A-record and another for a
AAAA-record - seems to work better than sending a single DNS_TYPE_ALL
request.

Fix c-string vs. u8 vector mistakes. Fix server failover.

Change-Id: I26554f0a9c1744376f21372506ebec8658e351e2
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agosvm: calc base address on AArch64 based on autodetected VA space size 99/9999/3
Damjan Marion [Mon, 8 Jan 2018 15:35:35 +0000 (16:35 +0100)]
svm: calc base address on AArch64 based on autodetected VA space size

Change-Id: I7487eb74b8deebff849d662b55a6708566ccd9ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVPP-1113 SR MPLS path.frp_label_stack 21/10021/3
Pablo Camarillo [Mon, 8 Jan 2018 14:53:20 +0000 (15:53 +0100)]
VPP-1113 SR MPLS path.frp_label_stack

provide one label stack per fib_table_entry_path_add2 call. otherwise multiple mheap releases take place.

Change-Id: I475ca1b801fc85dddda0b540c69ad628a274df7f
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
6 years agoVCL eventlog - track create/delete 75/9975/8
Keith Burns (alagalah) [Fri, 5 Jan 2018 22:39:59 +0000 (14:39 -0800)]
VCL eventlog - track create/delete

Change-Id: I972b7d264e612ab04eb4671253f3654a76578e1c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoVPP-1120 SRv6 bug with SID list containing only one SID and no srh 20/10020/4
Pablo Camarillo [Mon, 8 Jan 2018 13:25:55 +0000 (14:25 +0100)]
VPP-1120 SRv6 bug with SID list containing only one SID and no srh

Packets with a SR policy of one SID list create a malformed packet.
Outer IPv6 header points to a routing extension header that does not
exist since the SID list contains only one SID.

Change-Id: I1effee0457453bab95706a8a24fdabfbd843d5b7
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
6 years agophysmem: fix physmem allocation on kernels without NUMA support 35/9935/2
Damjan Marion [Wed, 3 Jan 2018 15:48:34 +0000 (15:48 +0000)]
physmem: fix physmem allocation on kernels without NUMA support

Change-Id: I056598a1818a39c2da73e252600c14585e5aae83
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoPatch ENA PMD to skip setting tx flags in rx path 78/9878/3
Matthew Smith [Mon, 18 Dec 2017 20:19:07 +0000 (14:19 -0600)]
Patch ENA PMD to skip setting tx flags in rx path

On rx, the ENA PMD sets tx offload flags based on the
received packet's l4 protocol. This means you need
to turn off those offloads for every packet if you
encapsulate packets arriving on an interface using
that PMD. Disable this behavior.

Change-Id: Icae9f32e3d292d767da440ae5c1280902bdaa083
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agomemif: fix coverity divide by zero 01/10001/2
Steven [Mon, 8 Jan 2018 17:24:04 +0000 (09:24 -0800)]
memif: fix coverity divide by zero

Coverity complains about divide by zero if tx_queues gets the value of 0
from the macro vec_len(). While we don't anticipate such condition to
happen, programming errors may exist. To defend against divide by zero,
crash and burn if tx_queues gets a value of 0.

Change-Id: I65e014c07e9d4adfe119d5b373b5dc24cb818a03
Signed-off-by: Steven <sluong@cisco.com>
6 years agoRevert "VOM: fix cflags" 35/10035/2
Dave Wallace [Tue, 9 Jan 2018 19:42:56 +0000 (19:42 +0000)]
Revert "VOM: fix cflags"

This reverts commit 4363ad6c96b5641fca1b16c5a6ec22e2364adcfd.

Change-Id: Ie71ee265659e06ada37f40cfceed4c20b1cbf6e5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoapi: refactor vlibmemory 76/9976/21
Florin Coras [Fri, 5 Jan 2018 11:20:25 +0000 (03:20 -0800)]
api: refactor vlibmemory

- separate client/server code for both memory and socket apis
- separate memory api code from generic vlib api code
- move unix_shared_memory_fifo to svm and rename to svm_fifo_t
- overall declutter

Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVOM: fix cflags 88/9988/3
Neale Ranns [Mon, 8 Jan 2018 12:07:38 +0000 (04:07 -0800)]
VOM: fix cflags

override the default CXXFLAGS (which provides a -O2) with the
system set CFLAGS (providing -O0/-O2 for debug/release builds)

Change-Id: Ic84e51baafdc22d37139303566d705d759e36721
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoGRE tunnel key should use fib_index instead of fib_id (VPP-1118) 23/10023/2
John Lo [Tue, 9 Jan 2018 04:19:18 +0000 (23:19 -0500)]
GRE tunnel key should use fib_index instead of fib_id (VPP-1118)

Follow up fix - vl_api_gre_add_del_tunnel_t_handler should pass
outer_fib_id from API message to vnet_gre_add_del_tunnel() and
not convert it to fib_index, since vnet_gre_add_del_tunnel()
already perform the lookup to get fib_index from fib_id.

Change-Id: I24967a97f82ce018ddef596e556bd3eb1706cb63
Signed-off-by: John Lo <loj@cisco.com>
6 years agoDVR: run L3 output features 31/9931/7
Neale Ranns [Wed, 3 Jan 2018 12:18:48 +0000 (04:18 -0800)]
DVR: run L3 output features

- rename l2_bridged to is_dvr. Including on the ip.api
    this was new in the 18.01 release so no compatability issues.
- steal the free space in vnet_buffer_opaque_t for use with flags.
- run the ipX-output feature arc from the DVR DPO

Change-Id: I040e5976d1dbe076fcdda3a40a7804f56337ce3f
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoBIER: crash in show command when no tables are present 81/9981/3
Neale Ranns [Sun, 7 Jan 2018 19:23:04 +0000 (11:23 -0800)]
BIER: crash in show command when no tables are present

Change-Id: Ie291468ea9d05c47cefe39c4ff7fea3e016bacf2
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoBIER: missing endian swap for imposition object in API return 16/10016/2
Neale Ranns [Tue, 9 Jan 2018 12:11:28 +0000 (04:11 -0800)]
BIER: missing endian swap for imposition object in API return

Change-Id: Iddd754d00ace3d042336e5c2c40431566275051a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agotest: consolidate the multiple versions of send_and_* 90/9990/2
Neale Ranns [Mon, 8 Jan 2018 12:41:42 +0000 (04:41 -0800)]
test: consolidate the multiple versions of send_and_*

Change-Id: I7fa7d0ebf73dab8264a2e5ddbd412600d78ead05
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix missing dereference 03/10003/1
Juraj Sloboda [Mon, 8 Jan 2018 18:54:36 +0000 (19:54 +0100)]
Fix missing dereference

Change-Id: I123259c131f1bd16c70990bf7f48d9a275c53ce2
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoNAT64: IPFix (VPP-1106) 51/9951/2
Matus Fabian [Thu, 4 Jan 2018 12:03:14 +0000 (04:03 -0800)]
NAT64: IPFix (VPP-1106)

Change-Id: Ib90dc5613c9fdac0344b3bd7f163e2f7163c64d8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoNAT: fixed get_worker_out2in bug (VPP-1116) 82/9982/1
Matus Fabian [Fri, 5 Jan 2018 13:03:35 +0000 (05:03 -0800)]
NAT: fixed get_worker_out2in bug (VPP-1116)

Change-Id: I5e080d69f28661cc0b1846885d5001526b54fbd9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoFix Debian Packaging on AARCH64 04/9904/2
Nitin Saxena [Wed, 27 Dec 2017 10:31:41 +0000 (10:31 +0000)]
Fix Debian Packaging on AARCH64

Error msg:
pkg-shlibdeps: error: couldn't find library libvppinfra.so.0 needed by
debian/vpp/usr/bin/vpp_json_test (ELF format: 'elf64-littleaarch64'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libvppinfra.so.0 needed by
debian/vpp/usr/bin/svmdbtool (ELF format: 'elf64-littleaarch64'; RPATH: '')
...

Changes to create architecture specific folder in /usr/lib/

Change-Id: Id0e42b175348e32e2c72b404ff60eb87c9146968
Signed-off-by: Nitin Saxena <nsaxena@cavium.com>
6 years agoaarch64 - show cpu microarchitecture 29/9929/6
Gabriel Ganne [Wed, 3 Jan 2018 08:18:47 +0000 (09:18 +0100)]
aarch64 - show cpu microarchitecture

Combine implementer, part, variant, and revision into one cpu
description line.
For example : ARM (Cortex-A57 PASS 1.2)

* get infos from /proc/cpuinfo
* only recognize armv8 processors
* add all given cavium processors
* Cavium starts counting variants from 1 instead of 0

Change-Id: I4f3820fb13a6bd2a0dc59e28fbe6f48a5b0ceb25
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoInitial structure for VCL event logging. 74/9974/2
Keith Burns (alagalah) [Fri, 5 Jan 2018 20:16:22 +0000 (12:16 -0800)]
Initial structure for VCL event logging.

- WIP: taking a LARGE patch and breaking into smaller chunks
- large LDP/VCL refactor in progress. This minimizes rebase.
- LARGE patch removed clib_warning()s erroneously
- VPPCOM_DEBUG checks duplicated deliberately as clib_warning()
  usage will be refactored.

Change-Id: I5905ed074187fe22c9f1320fd07ffcaab3a0f63c
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoGRE tunnel key should use fib_index instead of fib_id (VPP-1118) 78/9978/2
John Lo [Sat, 6 Jan 2018 05:22:54 +0000 (00:22 -0500)]
GRE tunnel key should use fib_index instead of fib_id (VPP-1118)

The code path in src/vnet/gre/interface.c uses fib_id as a
component to generate hash key for GRE tunnel. This should be
fib_index as the GRE rx/decap data path will be using fib_index
to generate the hash key to lookup the GRE tunnel.

Change-Id: Ia7f0892d84f9dac79223a6e016775892b61eb5fb
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 72247c803250894834d15952a6fddcd8f4a39a9c)

6 years agoVPP-1110 BVI reply ARP that doesn't request BVI loacl IP. 02/9902/5
zhaoqingling [Sat, 23 Dec 2017 07:20:59 +0000 (15:20 +0800)]
VPP-1110 BVI reply ARP that doesn't request BVI loacl IP.

Change-Id: I66ae618edaa12c2b4e4afe276da689673b02c9cd
Signed-off-by: zhaoqingling <zhao.qingling@zte.com.cn>
6 years agosock api: add first msg id retrieval function 54/9954/6
Florin Coras [Thu, 4 Jan 2018 20:17:10 +0000 (12:17 -0800)]
sock api: add first msg id retrieval function

Change-Id: I2032b5fc8e1904005b8eb871b9be06d025ed9b71
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosock api: add infra for bootstrapping shm clients 93/9893/10
Florin Coras [Tue, 19 Dec 2017 12:50:01 +0000 (04:50 -0800)]
sock api: add infra for bootstrapping shm clients

- add function to sock client that bootstraps shm api
- allow sock clients to request custom shm ring configs

Change-Id: Iabc1dd4f0dc8bbf8ba24de37f4966339fcf86107
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoUnify and cleanup usage of hash_set/unset_mem by various tunnels 53/9953/3
John Lo [Thu, 4 Jan 2018 21:39:42 +0000 (16:39 -0500)]
Unify and cleanup usage of hash_set/unset_mem by various tunnels

Move the functions hash_set_key_copy() and hash_unset_key_free()
which are dupilicated in various tunnel support code modules to
hash.h as hash_set_mem_alloc() and hash_unset_mem_free() to be
used by all.

Change-Id: I40723cabe29072ab7feb1804c221f28606d8e4fe
Signed-off-by: John Lo <loj@cisco.com>
6 years agoAdd support for 464XLAT NAT44 mode (VPP-1045) 26/9626/5
Juraj Sloboda [Tue, 19 Dec 2017 01:09:32 +0000 (02:09 +0100)]
Add support for 464XLAT NAT44 mode (VPP-1045)

Change-Id: I24e7a26972bbbfcea100292b212b29ae7a349335
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoMAP: Add RFC6052 mapping to MAP-T 81/9281/8
Ole Troan [Wed, 8 Nov 2017 10:10:54 +0000 (11:10 +0100)]
MAP: Add RFC6052 mapping to MAP-T

Change-Id: I2e311f8b7f50133678b9172e8d071826af491609
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoVPP-1115 Fix a debug log mistake when create AF_PACKET socket 55/9955/1
zhaoqingling [Fri, 5 Jan 2018 05:33:37 +0000 (13:33 +0800)]
VPP-1115 Fix a debug log mistake when create AF_PACKET socket

Change-Id: Id6607adbe5da8ae8472dde8bb442ca5f68f6d84f
Signed-off-by: zhaoqingling <zhao.qingling@zte.com.cn>
6 years agoVOM: NAT coverity found bugs 45/9945/1
Neale Ranns [Thu, 4 Jan 2018 09:11:44 +0000 (01:11 -0800)]
VOM: NAT coverity found bugs

Change-Id: Ic55ad2e0a1435f552ce84ed1a9b1981191bc178b
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoUpdate package version 38/9938/1
Dave Wallace [Wed, 3 Jan 2018 22:09:05 +0000 (17:09 -0500)]
Update package version

Change-Id: If16943e564b11ff7ac456b16896c62db1152d6dd
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoNAT64: free port when dynamic BIB deleted (VPP-1107) 72/9872/2 v18.04-rc0
Matus Fabian [Tue, 19 Dec 2017 11:43:07 +0000 (03:43 -0800)]
NAT64: free port when dynamic BIB deleted (VPP-1107)

Change-Id: Id897ed61a26a4069678ed4ddac1ba28bf32809c3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoVOM: NAT updates 20/9920/1
Neale Ranns [Wed, 20 Dec 2017 16:49:51 +0000 (08:49 -0800)]
VOM: NAT updates

Change-Id: I112afaa1f2ccd2ee62a436c73802afaea9b44779
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agotcp: add builtin server/client transfer test 61/9861/9
Florin Coras [Thu, 14 Dec 2017 19:30:48 +0000 (11:30 -0800)]
tcp: add builtin server/client transfer test

Change-Id: Iab0baabf2f27bc7ad7fbf2d2789a493752b07d8a
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomaintainers: update email 97/9897/1
Sergio Gonzalez Monroy [Fri, 22 Dec 2017 09:36:21 +0000 (09:36 +0000)]
maintainers: update email

Change-Id: Ie915f7b0153bed2e603eedc642df852b85c8ad5c
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agofib: make deag entries urpf extempt 60/9860/4
Florin Coras [Sat, 16 Dec 2017 16:31:06 +0000 (08:31 -0800)]
fib: make deag entries urpf extempt

Change-Id: Ie8f6bb4fcd3e4fa269e86a77d2f21c87f372b783
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVPP-1109 Fix loop for some CLI (code review) 94/9894/1
Swarup Nayak [Thu, 21 Dec 2017 06:05:33 +0000 (11:35 +0530)]
VPP-1109 Fix loop for some CLI (code review)

Change-Id: I518387ab479bee4778d45a33c95f7b0f72aa1b72
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agoL2 emulation: remove usued ip-table-id from API 88/9888/1
Neale Ranns [Wed, 20 Dec 2017 16:54:52 +0000 (08:54 -0800)]
L2 emulation: remove usued ip-table-id from API

IP table mapping is set using 'set int ip table X Y"

Change-Id: I2adec40015f9281c9b00c55506000b322f42d91a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoacl-plugin: add a debug CLI to print 5-tuple structure in human readable format from... 86/9886/2
Andrew Yourtchenko [Wed, 20 Dec 2017 15:08:03 +0000 (16:08 +0100)]
acl-plugin: add a debug CLI to print 5-tuple structure in human readable format from hex representation

Even though the trace now prints the hex as well as human readable format for acl plugin,
it can be handy to have a separate function which allows to decode the hex. So add this debug CLI.

Change-Id: I1db133a043374817ea9e94ae3736b8a98630669d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoL2 Emulation 59/9759/8
Neale Ranns [Sat, 21 Oct 2017 13:34:22 +0000 (06:34 -0700)]
L2 Emulation

L2 Emulation is a feautre that is applied to L2 ports to 'extract'
IP packets from the L2 path and inject them into the L3 path (i.e.
into the appropriate ip[4|6]_input node).
L3 routes in the table_id for that interface should then be configured
as DVR routes, therefore the forwarded packet has the L2 header
preserved and togehter the L3 routed system behaves like an L2 bridge.

Change-Id: I8effd7e2f4c67ee277b73c7bc79aa3e5a3e34d03
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agofix kubeproxy some tests 80/9880/2
Gabriel Ganne [Tue, 19 Dec 2017 15:13:44 +0000 (16:13 +0100)]
fix kubeproxy some tests

* NAT46: fix test cleanup, missing del keyword
* NAT66: fix kube-proxy vip, is ipv6
* add some missing kp_put_writer_lock
* wipe flowtable after each unit test
  * Add new cli api: "test kube-proxy flowtable flush" to flushes everything
  * Call this new cli function after the end of each kube-proxy unit test.
  * same as commit b3d1b203579226ca5136b9d6a2744577d07cfcc6 for the lb plugin

Change-Id: I4146f44841328ec96eb66729e3bae3d40f33e4aa
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoTranslate matching packets using NAT (VPP-1069) 59/9559/8
Juraj Sloboda [Thu, 23 Nov 2017 12:20:48 +0000 (13:20 +0100)]
Translate matching packets using NAT (VPP-1069)

Add API function which enables forwarding of packets not matching
existing translation or static mapping instead of dropping them.

When forwarding is enabled matching packets will be translated
while non-matching packets will be forwarded without translation.

Change-Id: Ic13040cbad16d3a1ecdc3e02a497171bef6aa413
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoFix MPLS local-label CLI help string 73/9873/3
Marek Gradzki [Tue, 19 Dec 2017 12:15:39 +0000 (13:15 +0100)]
Fix MPLS local-label CLI help string

CLI parsing code (unformat_fib_route_path) does not
recognise 'resolve-via-connected'.

However it understands 'resolve-via-attached'.

Change-Id: I57e5eb75199cb8ae72c0fc8642a41f042b022201
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoVPP-1083 "ip punt redirect add" crashed if not mentioned any other parameter 87/9787/4
Swarup Nayak [Mon, 11 Dec 2017 08:22:44 +0000 (13:52 +0530)]
VPP-1083 "ip punt redirect add" crashed if not mentioned any other parameter

Change-Id: Ibb6f450783d0ab64bd943c19f12d0954b0a94b24
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agoBIER coverity fix in route downlaod 71/9871/2
Neale Ranns [Tue, 19 Dec 2017 09:34:30 +0000 (01:34 -0800)]
BIER coverity fix in route downlaod

Change-Id: I9341f1554d804dfeeecef656e59e8598704863dc
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFIB memory leak during recursive loop detection 77/9877/2
Neale Ranns [Tue, 19 Dec 2017 15:00:09 +0000 (07:00 -0800)]
FIB memory leak during recursive loop detection

Change-Id: I5ecd43330b3329b072e6da62a4eed1641eb17f8f
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVPP-1032: fix coverity warning in bier 76/9876/2
Dave Barach [Tue, 19 Dec 2017 13:26:27 +0000 (08:26 -0500)]
VPP-1032: fix coverity warning in bier

Change-Id: I0f8d2d9be78d4d936ed61538aee1b7207871347b
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoFix passing bad context for callback function 24/9624/4
Juraj Sloboda [Fri, 10 Nov 2017 11:11:50 +0000 (12:11 +0100)]
Fix passing bad context for callback function

Change-Id: I61e6019ab34f52c82bf3f1e5327501a613f58bd9
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
6 years agoNAT: Twice NAT44 (VPP-969) 67/9867/2
Matus Fabian [Mon, 18 Dec 2017 13:38:24 +0000 (05:38 -0800)]
NAT: Twice NAT44 (VPP-969)

Translation of both source and destination addresses and ports for 1:1 NAT
session initiated from outside network (ExternalIP K8 use case).

Change-Id: Ic0000497cf71619aac996d6d580844f0ea0edc14
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agolldp: Fix Coverity Warnings CID 177942, CID 177945 70/9870/2
Dave Wallace [Mon, 18 Dec 2017 22:19:21 +0000 (17:19 -0500)]
lldp: Fix Coverity Warnings CID 177942, CID 177945

Change-Id: Ic1ab32c5df3f7a613fe0dcd6bfc15037fa2a008b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession api: Fix Coverity Warning CID 180115 68/9868/2
Dave Wallace [Mon, 18 Dec 2017 18:51:59 +0000 (13:51 -0500)]
session api: Fix Coverity Warning CID 180115

Change-Id: I87e3de556910851d16af343bfcbede49500843ff
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAPI: Fix Coverity Warning CID 177944 69/9869/1
Dave Wallace [Mon, 18 Dec 2017 20:40:53 +0000 (15:40 -0500)]
API: Fix Coverity Warning CID 177944

Change-Id: I5dbd5e5673ecb0d3878053ae9985478740cf3bc6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoNAT: Add performance testing TRex scripts and config (VPP-832) 58/8558/3
Matus Fabian [Wed, 27 Sep 2017 11:44:08 +0000 (04:44 -0700)]
NAT: Add performance testing TRex scripts and config (VPP-832)

Change-Id: I149a20f183b836db4c32fb4e4a8438b3a14c1c26
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoUpdated MAINTAINERS 64/9864/3
Radu Nicolau [Mon, 18 Dec 2017 11:18:22 +0000 (11:18 +0000)]
Updated MAINTAINERS

Added Radu Nicolau as maintainer for
src/devices/dpdk/ipsec/ and src/vnet/ipsec/

Change-Id: If354344f5685ce0e431757768b77c4d5e8e409f9
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agoFix nat44 identity mapping 65/9865/2
Dave Barach [Mon, 18 Dec 2017 13:11:37 +0000 (08:11 -0500)]
Fix nat44 identity mapping

Set l_addr to the interface address if the interface address is known
when the identity mapping is created.

Change-Id: I61af0f5248c9d86d23a24457b342b2e1fb4ac726
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoProvide useful output when installed vpp-dpdk version is incorrect 26/9326/2
Ed Warnicke [Wed, 8 Nov 2017 20:39:31 +0000 (13:39 -0700)]
Provide useful output when installed vpp-dpdk version is incorrect

Change-Id: Icb931de82cb5969fa4976611629e2f882c720a99
Signed-off-by: Ed Warnicke <eaw@cisco.com>
6 years agoSupport kube-proxy data plane 20/8220/25
Hongjun Ni [Mon, 28 Aug 2017 17:00:42 +0000 (01:00 +0800)]
Support kube-proxy data plane

This plugin provides kube-proxy data plane on user space,
which is used to replace linux kernal's kube-proxy based on iptables.
The idea is largely inspired from VPP LB plugin.

Currently, kube-proxy plugin supports three service types:
1) Cluster IP plus Port: support any protocols, including TCP, UDP.
2) Node IP plus Node Port: currently only support UDP.
3) External Load Balancer.

Please refer to kp_plugin_doc.md for details.

Change-Id: I36690e417dd26ad5ec1bd77c7ea4b8100416cac6
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoSR-MPLS: binary API and automated steering 76/9376/19
Pablo Camarillo [Thu, 13 Jul 2017 07:41:32 +0000 (09:41 +0200)]
SR-MPLS: binary API and automated steering

Change-Id: Iacfbaaa91ea8bd92790dec9fce567063bdbc5d64
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
6 years agoVPP-269 Coding standards cleanup - vnet/vnet/policer 87/9587/5
Krishanpal singh [Mon, 27 Nov 2017 14:10:56 +0000 (19:40 +0530)]
VPP-269 Coding standards cleanup - vnet/vnet/policer

Change-Id: Ib92794205027d3242c6f0c8962fe02ac38c7129b
Signed-off-by: Krishanpal singh <krish.singh03@gmail.com>
6 years agoUpdate CSIT tests 171204 -> 171218 63/9863/1
Jan Gelety [Mon, 18 Dec 2017 08:03:17 +0000 (09:03 +0100)]
Update CSIT tests 171204 -> 171218

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

Change-Id: I5ad0e36fa40095cc107a31b32dd2bbf936636dc4
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agoPAPI: Add docstrings to unit tests. 41/9841/3
Ole Troan [Thu, 14 Dec 2017 10:28:21 +0000 (11:28 +0100)]
PAPI: Add docstrings to unit tests.

Change-Id: I0e20100c9e2ca4e951f605a79d48c04ff47864cb
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoGRE tunnel key includes the FIB table 49/9849/2
Neale Ranns [Thu, 14 Dec 2017 16:51:32 +0000 (08:51 -0800)]
GRE tunnel key includes the FIB table

- GRE tunnels with the same src,dst addresses are not the same tunnel
- Two data-plane improvements:
  - the cached key was never updated and so useless
  - no need to dereference the tunnel's HW interface to get the sw_if_index

Change-Id: I2f2ea6e08c759a810b753cec22c497e921a2ca01
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoUse crc32 wrapper (VPP-1086) 54/9854/2
Gabriel Ganne [Thu, 14 Dec 2017 15:20:37 +0000 (16:20 +0100)]
Use crc32 wrapper (VPP-1086)

This allows arm platforms to also take advantage of crc32 hardware
acceleration.

* add a wrapper for crc32_u64. It's the only one really used. Using it
  instead of a call to clib_crc32c() eases building symmetrical hash
  functions.
* replace #ifdef on SSE4 by a test on clib_crc32c_uses_intrinsics.
  Note: keep the test on i386
* fix typo in lb test log

Change-Id: I03a0897b70f6c1717e6901d93cf0fe024d5facb5
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>