vpp.git
6 years agosession: lookup/rules table improvements and cleanup 31/9331/3
Florin Coras [Thu, 9 Nov 2017 01:55:03 +0000 (17:55 -0800)]
session: lookup/rules table improvements and cleanup

Change-Id: I5217364220023df34d5bee071cb750df1661b093
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: fix app ns list cli dump 38/9338/2
Florin Coras [Thu, 9 Nov 2017 10:06:07 +0000 (02:06 -0800)]
session: fix app ns list cli dump

Change-Id: I9b0a4676d088bc7587d12023fc3a3ea53aeaba20
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoPort restricted NAT44 (VPP-1048) 37/9337/3
Matus Fabian [Thu, 9 Nov 2017 09:43:47 +0000 (01:43 -0800)]
Port restricted NAT44 (VPP-1048)

For the MAP-E CE limit port choice based on PSID
CLI: nat44 addr-port-assignment-alg map-e psid <n> psid-offset <n> psid-len <n>

Change-Id: Iecceee61fca372cb5790c16993a82fbdc9930f0f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoRemove boost-log link dependency from test/ext/Makefile 34/9334/2
Neale Ranns [Thu, 9 Nov 2017 08:03:08 +0000 (00:03 -0800)]
Remove boost-log link dependency from test/ext/Makefile

Change-Id: I388526c31c75e6af694b96141497c0c67d8fe310
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVOM logger levels fix 35/9335/1
Neale Ranns [Wed, 8 Nov 2017 17:00:44 +0000 (09:00 -0800)]
VOM logger levels fix

Change-Id: I0e627adb7846a33ee6e43f66cde648b4ae7f5cd4
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agolock init 78/9278/5
JingLiuZTE [Wed, 8 Nov 2017 07:35:01 +0000 (15:35 +0800)]
lock init
writer_lock must be inited before used.

Change-Id: Ib258aa09b3bccc4de6edba0eb75a7eec20f1a61f
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
6 years agomemif: do not mask head and tail pointers 14/9214/3
Damjan Marion [Fri, 3 Nov 2017 11:24:37 +0000 (12:24 +0100)]
memif: do not mask head and tail pointers

Change-Id: Ie849ab713ff086187c18a91ab32e58207fe94033
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agoACL plugin support tagged subinterfaces 19/8519/7
Pavel Kotucek [Mon, 25 Sep 2017 07:44:05 +0000 (09:44 +0200)]
ACL plugin support tagged subinterfaces

Change-Id: I92b351895c7efb26533c05512b91ead8ddbfb9c8
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
6 years agopunt: fix sendmsg() failure detection 96/9296/1
Klement Sekera [Wed, 8 Nov 2017 11:18:21 +0000 (12:18 +0100)]
punt: fix sendmsg() failure detection

Change-Id: Ia8941b7b90f14dd688aca215b2dae1cc5c8f4472
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agojvpp: test measuring number of invocations per time (VPP-619) 90/8790/9
Matej [Thu, 12 Oct 2017 13:54:09 +0000 (15:54 +0200)]
jvpp: test measuring number of invocations per time (VPP-619)

test provide two ways to count invocations:
1) maximum number of invocations and received replyies within 1 sec
2) measure time in ns from first request to receiving last reply
over set amount of requests
specific command is included in Readme
results from testing on my local machine were:
350K/sec Callback Api Read - show version
250K/Sec Future Api Read - show version
120K/sec allback Api Write - add table

Change-Id: Ie0383d848b98ee2b4b90c38a827a24acd28cac72
Signed-off-by: Matej <matej.perina@pantheon.tech>
6 years agosession: fix show app ns table cli 77/9277/3
Florin Coras [Wed, 8 Nov 2017 06:36:02 +0000 (22:36 -0800)]
session: fix show app ns table cli

Change-Id: I188e0471636683345bd9daa779c3680a616c2244
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNAT64: fixed csum crash (VPP-1055) 79/9279/3
Matus Fabian [Wed, 8 Nov 2017 08:18:15 +0000 (00:18 -0800)]
NAT64: fixed csum crash (VPP-1055)

Change-Id: I28c8abe49c9858966a66530d3dc41c074c6901f3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoNAT64 to use IPv4 address from interface (VPP-1051) 80/9280/2
Matus Fabian [Wed, 8 Nov 2017 09:59:38 +0000 (01:59 -0800)]
NAT64 to use IPv4 address from interface (VPP-1051)

Change-Id: I326429c31dea6958a342ee152ef86cb975f4b12c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoVOM rpm build fixes 61/9261/2
Neale Ranns [Tue, 7 Nov 2017 13:20:16 +0000 (05:20 -0800)]
VOM rpm build fixes

Change-Id: I1f76aabecfd7d33b924a4856a4c3fc683b9b8802
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agohttp_server_rx_callback 76/9276/6
JingLiuZTE [Wed, 8 Nov 2017 07:01:27 +0000 (15:01 +0800)]
http_server_rx_callback

http_server_rx_callback must return -1,
if session_rx_request fails.

Change-Id: I08e48ea7560dee301958e0babe023bb739b9342c
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
6 years agoFix SHG handling for ARP/ICMPv6 received from BVI in a BD 73/9273/2
John Lo [Tue, 7 Nov 2017 22:23:49 +0000 (17:23 -0500)]
Fix SHG handling for ARP/ICMPv6 received from BVI in a BD

This change makes sure ARP/ICMPv6 brodcast packets received from
the BVI of a BD can be flooded to all remote VTEPs via its VXLAN
tunnels irrespective of SHG setting. Similar processing was done
for unicast packets already and needs to be extpanded to ARP and
ICMPv6 broadcast packets.

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

6 years agoip: fix container proxy coverity warning 75/9275/2
Florin Coras [Wed, 8 Nov 2017 01:06:36 +0000 (17:06 -0800)]
ip: fix container proxy coverity warning

Change-Id: I5e35921acb65157a3de8ea0c53b3a6fa5cfca044
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agovat: session_rules_dump missing network to host conversion 74/9274/1
Steven [Wed, 8 Nov 2017 00:29:53 +0000 (16:29 -0800)]
vat: session_rules_dump missing network to host conversion

Add clib_net_to_host conversion for integer fields greater than
two bytes

Change-Id: I187d8d1adbb1e534d58bd69bfbc1c58df5b8fc1e
Signed-off-by: Steven <sluong@cisco.com>
6 years agoVCL: Fix error handling during heap alloc 69/9269/2
Dave Wallace [Tue, 7 Nov 2017 18:07:44 +0000 (13:07 -0500)]
VCL: Fix error handling during heap alloc

Change-Id: Ia8ab2b8677296f3d7d4a33e1faee494926e3b509
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoSNAT: IP fragmentation (VPP-890) 56/8056/4
Matus Fabian [Tue, 15 Aug 2017 13:59:19 +0000 (06:59 -0700)]
SNAT: IP fragmentation (VPP-890)

Translation of fragmented packets.

Change-Id: I9b1f2e9433ce273638080f32c2d3bff39c49899d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoFix include header for cmds 56/9256/2
Mohsin Kazmi [Tue, 7 Nov 2017 10:28:40 +0000 (11:28 +0100)]
Fix include header for cmds

Change-Id: I4dfdbf7f58af4f37141fa325edf8780b2dc4c8bb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agolibmmeif: Makefile fix 67/9267/2
Jakub Grajciar [Tue, 7 Nov 2017 15:41:35 +0000 (16:41 +0100)]
libmmeif: Makefile fix

Change-Id: Id3fae50714802a4e2a5a82fcdfcee5b640f47e37
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agoadd tracing to udp punt code 40/9240/3
Klement Sekera [Fri, 3 Nov 2017 09:25:23 +0000 (10:25 +0100)]
add tracing to udp punt code

Change-Id: I5f92e40d2fe08a05f51622143648433732141cf4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agovnet: ip4/6_local-> don't drop TCP/UCP marked for cksum calc fix 64/9264/3
Jakub Grajciar [Tue, 7 Nov 2017 13:39:10 +0000 (14:39 +0100)]
vnet: ip4/6_local-> don't drop TCP/UCP marked for cksum calc fix

Change-Id: Id14826eefe43168747c8ba69b3b600441a7d4047
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agoUDP Encapsulation. 27/9227/5
Neale Ranns [Mon, 6 Nov 2017 00:26:46 +0000 (16:26 -0800)]
UDP Encapsulation.

A UDP-encap object that particiapates in the FIB graph and contributes
DPO to teh output chain. It thereofre resembles a tunnel but without the
interface. FIB paths (and henace routes) can then be created to egress
through the UDP-encap. Said routes can have MPLS labels, hence this also
allows MPLSoUPD.
Encap is uni-directional. For decap, one still registers with the UDP port
dispatcher.

Change-Id: I23bd345523b20789a1de1b02022ea1148ca50797
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoip: add container proxy api 46/9246/3
Florin Coras [Tue, 7 Nov 2017 01:17:08 +0000 (17:17 -0800)]
ip: add container proxy api

Change-Id: Id324a757517f85973097e20e2eb88d64ae0e931b
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: fix v6 double binds 52/9252/3
Florin Coras [Tue, 7 Nov 2017 07:27:56 +0000 (23:27 -0800)]
session: fix v6 double binds

Change-Id: Ie747b490901254e962cf61814491851b891129ee
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL: handle process fork. 49/9249/2
Dave Wallace [Tue, 7 Nov 2017 06:21:39 +0000 (01:21 -0500)]
VCL: handle process fork.

Change-Id: I3e57d60fb5e42713effd4412288eccfa08f0be82
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agolibmemif: add dep to Makefile 55/9255/2
Jakub Grajciar [Tue, 7 Nov 2017 10:04:05 +0000 (11:04 +0100)]
libmemif: add dep to Makefile

Change-Id: I7a14474e4545016f0de97f92602e1dfcc0ffac12
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agoNAT: DS-Lite (VPP-1040) 38/9238/3
Matus Fabian [Mon, 6 Nov 2017 13:04:53 +0000 (05:04 -0800)]
NAT: DS-Lite (VPP-1040)

Dual-Stack Lite enables a broadband service provider to share IPv4 addresses among customers by combining two well-known technologies: IPv4-in-IPv6 and NAT.

Change-Id: I039740f8548c623cd1ac89b8ecda1a6cc4aafb9c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoVCL-LDPRELOAD: enable accept4() wrapper 50/9250/2
Dave Wallace [Tue, 7 Nov 2017 07:20:07 +0000 (02:20 -0500)]
VCL-LDPRELOAD: enable accept4() wrapper

Change-Id: I56567953fb8329315393047913e30fc7f2242bdb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agofix bfd cli with gcc >= 6 43/9243/2
Gabriel Ganne [Mon, 6 Nov 2017 15:52:24 +0000 (16:52 +0100)]
fix bfd cli with gcc >= 6

Change-Id: Iff63238bcf87db3411493e95064c5ad3ed8fd166
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoAdd --disable-vom config option 45/9245/2
Dave Barach [Mon, 6 Nov 2017 21:06:05 +0000 (16:06 -0500)]
Add --disable-vom config option

The vpp object model consumes more than half of the entire [initial]
build time, so it's worth adding a config option.

Change-Id: I86ad41f78160d93835804235b8b4a3fc7988f2f7
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agosession: add rule tags 34/9234/2
Florin Coras [Mon, 6 Nov 2017 07:07:07 +0000 (23:07 -0800)]
session: add rule tags

Change-Id: Id5ebb410f509ac4c83d60e48efd54e00035e5ce6
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: add CACHE_OUTPUT option 41/9241/2
Klement Sekera [Mon, 6 Nov 2017 08:46:00 +0000 (09:46 +0100)]
make test: add CACHE_OUTPUT option

This option allows one to toggle whether captured VPP stdout/stderr
output is printed inline (each line logged immediately after being
collected). Default setting is 0/no (behaviour same as before).

This allows one to see the output in case of vpp crashing during test
run even if test framework gets stuck waiting for shared memory mutex
(which crashed vpp can no longer unlock).

Complete stdout/stderr output is always printed as a block to the
logger after test finishes.

Change-Id: If3645a9b85562dba26ed9c87daa27ea5ef34f2e5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agomake test: fix DEBUG=core error 42/9242/2
Klement Sekera [Tue, 10 Oct 2017 04:44:05 +0000 (06:44 +0200)]
make test: fix DEBUG=core error

Change-Id: I703b2866a1607d6a2fad215e90b5cf2d7afdfd0d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoVOM reshuffle 15/9215/9
Neale Ranns [Fri, 3 Nov 2017 11:39:05 +0000 (04:39 -0700)]
VOM reshuffle

split the VOM into two halves; a top/front-end and a bottom/backend.
Only the backend includes the auto-generated VAPI.
This serves two purposes:
1 - improves ompile times for VOM, since the VAPI is included
    only in the backend.
2 - does not expose VAPI to users of VOM

Change-Id: I17b93aeaef10c0eba8612016d9034aca5628d9f7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agofix debian packages generation (invalid warning silencing) 39/9239/1
Gabriel Ganne [Mon, 6 Nov 2017 13:09:06 +0000 (14:09 +0100)]
fix debian packages generation (invalid warning silencing)

During dh_shlibdeps, we silence some plugin-related warnings using
"grep -v". grep is the last command of the line, and returns 1 on match.
Therefore, the whole make step fails.

This patch merges the two grep commands, and ignores the grep return
value.

Change-Id: I1237162ab3c9937dbc340e5a2fce7ec779a19f39
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoVCL_LDPRELOAD: mixed libc/vcl epoll fd's 08/9208/4
Dave Wallace [Fri, 3 Nov 2017 02:04:42 +0000 (22:04 -0400)]
VCL_LDPRELOAD: mixed libc/vcl epoll fd's

Change-Id: Ibc82781ddef5ea0517220b9054db3d53ec348c6c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: add api to dump rules 23/9223/3
Florin Coras [Sat, 4 Nov 2017 01:32:34 +0000 (18:32 -0700)]
session: add api to dump rules

Change-Id: Ie42fd77e75e86a45cfe5951768c4638f27fdc3aa
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoip4 network request processing 26/9226/2
Dave Barach [Sat, 4 Nov 2017 13:44:38 +0000 (09:44 -0400)]
ip4 network request processing

Change-Id: I6eb0681cc2595f81ac3bf5ffa3e9b2adfff04a36
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoFix coverity warnings in VOM and VAPI 04/9204/3
Neale Ranns [Thu, 2 Nov 2017 18:59:14 +0000 (11:59 -0700)]
Fix coverity warnings in VOM and VAPI

Change-Id: I0db55e079f9b1835668c8efe69e6e6f7f8437b00
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agolibmemif: example app can generate ICMP, dev perf tests (using icmpr-epoll) 97/9197/2
Jakub Grajciar [Thu, 2 Nov 2017 13:33:27 +0000 (14:33 +0100)]
libmemif: example app can generate ICMP, dev perf tests (using icmpr-epoll)

Change-Id: Ib72ede51559754f606c0a1d57f4fb624d032caa6
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agodpdk: build nasm from source 72/9072/4
Sergio Gonzalez Monroy [Fri, 27 Oct 2017 07:58:38 +0000 (08:58 +0100)]
dpdk: build nasm from source

As not all distros have the minimum required nasm version (2.12.01)
available, build nasm from sources when building Intel IPsec MB library.

Change-Id: Iaa9da87f612c0f84da5704162c3bf430b3351076
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoNAT64: Input feature arc on virtual interface via interface RX DPO. 18/9218/4
Ole Troan [Fri, 3 Nov 2017 13:02:26 +0000 (14:02 +0100)]
NAT64: Input feature arc on virtual interface via interface RX DPO.

Change-Id: If2048c7d72048679bc5d0412f3fae109926f759e
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoAdd C++ files to Doxygen 20/9220/2
Chris Luke [Fri, 3 Nov 2017 14:53:20 +0000 (10:53 -0400)]
Add C++ files to Doxygen

Change-Id: Iab943988d1c714fe315e1dd13bd5d21f6bebdca1
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agovnet: ip4/6_local->don't drop packet if marked for TCP/UDP offload cksum calculation 15/9115/3
Jakub Grajciar [Mon, 30 Oct 2017 13:56:17 +0000 (14:56 +0100)]
vnet: ip4/6_local->don't drop packet if marked for TCP/UDP offload cksum calculation

Change-Id: I62f625a93e5d818caef382316035cd5447bd8fef
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agopunt: free whole buffer chain if such is punted 17/9217/2
Klement Sekera [Fri, 3 Nov 2017 05:39:28 +0000 (06:39 +0100)]
punt: free whole buffer chain if such is punted

Change-Id: I1326f21f0a00a201d2bdb55b73af14fca6ba8888
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agosilence clib_mem_unaligned() invalid read found by address-sanitizer 13/9213/3
Gabriel Ganne [Fri, 3 Nov 2017 09:30:45 +0000 (10:30 +0100)]
silence clib_mem_unaligned() invalid read found by address-sanitizer

clib_mem_unaligned + zap64 casts its input as u64, computes a mask
according to the input length, and returns the casted maked value.
Therefore all the 8 Bytes of the u64 are systematically read, and
the invalid ones are discarded.

Since they are discarded correctly, this invalid read can safely be
ignored.

Revert "fix clib_mem_unaligned() invalid read"
This reverts commit 0ed3d81a5fa274283ae69b69a405c385189897d3.

Change-Id: I5cc33ad36063c414085636debe93707d9a75157a
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agosilence l2fib_init() invalid read of size 2 found by address-sanitizer 82/8982/6
Gabriel Ganne [Tue, 24 Oct 2017 08:24:57 +0000 (10:24 +0200)]
silence l2fib_init() invalid read of size 2 found by address-sanitizer

l2fib_make_key() casts and reads the input 6-Bytes mac_address as u64,
therefore if the mac_address is declared with 6 Bytes only, address-sanitizer
rightly triggers an invalid read on the last two Bytes.

However, l2fib_make_key() does a 16 bits shift to discard those 2 values,
therefore, this invalid read is of no consequence (and so can be silenced safely).

Change-Id: I38646fe60073093d25cdf135185d4c96136d55d0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agovppinfra: make _vec_resize_will_expand read-only 06/9206/2
Florin Coras [Thu, 2 Nov 2017 23:28:09 +0000 (19:28 -0400)]
vppinfra: make _vec_resize_will_expand read-only

Change-Id: Ibcc20c24f6feb2b91245b0d88830a6c730d704e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: support drop action in rules table 11/9211/2
Florin Coras [Fri, 3 Nov 2017 04:31:46 +0000 (21:31 -0700)]
session: support drop action in rules table

Change-Id: Ided2980373ed5329c68f958f61be893428bccd31
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoSet up P2P flag to gtpu interface 07/9207/2
Hongjun Ni [Fri, 3 Nov 2017 10:28:10 +0000 (18:28 +0800)]
Set up P2P flag to gtpu interface

Change-Id: Id01a363bf2b574376651de7bc8f3f7b2bb58c615
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agosession/udp: init rw locks 05/9205/2
Florin Coras [Thu, 2 Nov 2017 22:14:17 +0000 (18:14 -0400)]
session/udp: init rw locks

Change-Id: I68152d7338ce0d7805e50ccf9e9046de02cfd206
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL: application proxy configuration 88/9188/5
Dave Wallace [Thu, 2 Nov 2017 00:07:40 +0000 (20:07 -0400)]
VCL: application proxy configuration

- Add support to configure VCL to set
  application proxy transport types
  and app_is_proxy flag via vcl
  config file or env vars.
- Clean up debug output.
- Rename session_scope -> app_scope.

Change-Id: I6e35f3cdd84daf0112133af8f33acd0152f87ca3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoLISP: fix negative mapping timeout, VPP-1043 93/9193/2
Filip Tehlar [Thu, 2 Nov 2017 08:38:49 +0000 (01:38 -0700)]
LISP: fix negative mapping timeout, VPP-1043

Change-Id: Ie57b81f8743f14182813558887d84d6667c81d43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agoAdd replicate DPO header to export list for VPPSB 01/9201/2
Neale Ranns [Thu, 2 Nov 2017 14:39:24 +0000 (07:39 -0700)]
Add replicate DPO header to export list for VPPSB

Change-Id: I0b437ac5fecc81c7762d9cad0f33e977fcf3aa27
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoAdd builtin http server option to return static reply 87/9187/3
Florin Coras [Wed, 1 Nov 2017 22:05:49 +0000 (15:05 -0700)]
Add builtin http server option to return static reply

Change-Id: I9f4d1c7ee7b460a93198930a5a935fa90177cdad
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: fix proxy coverity warnings 89/9189/1
Florin Coras [Thu, 2 Nov 2017 01:19:22 +0000 (18:19 -0700)]
session: fix proxy coverity warnings

Change-Id: I8d233d2301fb0da0fe27fa36ba870484bb290b7b
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoA bit of cleanup, updated the README, started vhost test. 83/9183/2
John DeNisco [Wed, 1 Nov 2017 16:37:47 +0000 (12:37 -0400)]
A bit of cleanup, updated the README, started vhost test.

Change-Id: I49b998644b8b79c778c1186fc09831b1cd8fc015
Signed-off-by: John DeNisco <jdenisco@cisco.com>
6 years agoVPP-959: Support old version of CFFI 74/9174/2
Ole Troan [Wed, 1 Nov 2017 09:49:03 +0000 (10:49 +0100)]
VPP-959: Support old version of CFFI

Change-Id: I3d3e5dff5b22fca58a50da6a9d0aaf1182e736dd
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agovom: fix build with gcc7 75/9175/2
Damjan Marion [Wed, 1 Nov 2017 10:20:50 +0000 (11:20 +0100)]
vom: fix build with gcc7

Change-Id: I0b5806dd1d8cb45f40354cfe6cae7f4e76309f92
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM fixes for 9090 - ships in the night commits 76/9176/1
Neale Ranns [Wed, 1 Nov 2017 10:29:13 +0000 (03:29 -0700)]
VOM fixes for 9090 - ships in the night commits

Change-Id: I4b03a4f86a7e0e47874715398ca9f8ff0f5386ee
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agofix clib_mem_unaligned() invalid read 80/8980/2
Gabriel Ganne [Tue, 24 Oct 2017 07:58:45 +0000 (09:58 +0200)]
fix clib_mem_unaligned() invalid read

clib_mem_unaligned + zap64 casts its input as u64, computes a mask
according to the input length, and returns the casted maked value.
Therefore all the 8 Bytes of the u64 are systematically read, and
the invalid ones are discarded.
For example, for a 5-Bytes string, we will do an invalid read of size 3,
even though those 3 Bytes are never used.

This patch proposes to only read what we have at the cost of reading as
a u64 in one call, but that way, we do not trigger an invalid read
error.

Change-Id: I3e0b31c4113d9c8e53aa5fa3d3d396ec80f06a27
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agonat plugin - fix test logic 40/9040/2
Gabriel Ganne [Thu, 26 Oct 2017 08:10:42 +0000 (10:10 +0200)]
nat plugin - fix test logic

warning found by clang:
  warning: logical not is only applied to the left hand side of
  this bitwise operator [-Wlogical-not-parentheses]

Change-Id: I964651a4444b11da145edc329da83675cd830f78
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoClean up a few historical anomalies 70/9170/2
Dave Barach [Tue, 31 Oct 2017 20:28:11 +0000 (16:28 -0400)]
Clean up a few historical anomalies

Change-Id: I5d36a8a54fa6f73ea2b3761413098867dae1df74
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agosession: add support for proxying apps 33/9133/5
Florin Coras [Tue, 31 Oct 2017 08:51:04 +0000 (01:51 -0700)]
session: add support for proxying apps

To enable this, applications set the proxy flag in their attach requests
and pass the transport protocols they want to act as proxies for as part
of the attach options.

When proxy is enabled, session rules that point incoming packets to the
proxy app are addedd to the local and global session tables, if these
scopes are accessible to the app. In particular, in case of the former,
the rule accepts packets from all sources and all ports destined to the
namespace's supporting interface address on any port. While in case of
the latter, a generic any destination and any port rule is addedd.

Change-Id: I791f8c1cc083350f02e26a2ac3bdbbfbfa19ece3
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agodpdk/ipsec: align memory 58/9158/2
Sergio Gonzalez Monroy [Tue, 31 Oct 2017 15:58:57 +0000 (15:58 +0000)]
dpdk/ipsec: align memory

Change-Id: I2feb3e07c3070e8a525c539dd2feffa0dd1bca21
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agodpdk/ipsec: fix digest physical address 59/9159/2
Sergio Gonzalez Monroy [Tue, 31 Oct 2017 15:55:39 +0000 (15:55 +0000)]
dpdk/ipsec: fix digest physical address

VPP-1034

Change-Id: I02b4db9e52446ab8578df1f011dd27f39de64c70
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoVPP Object Model (VOM) 36/8836/17
Neale Ranns [Mon, 16 Oct 2017 11:20:13 +0000 (04:20 -0700)]
VPP Object Model (VOM)

The VOM is a C++ library for use by clients/agents of VPP for programming
state. It uses the binary APIs to do so. Various other common client side
functions are also provided. Please see om.hpp for a more detailed description.

Change-Id: Ib756bfe99817093815a9e26ccf464aa5583fc523
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Co-authored-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoFix "l2fib add" CLI to allow adding of filter MAC entries 65/9165/2
John Lo [Tue, 31 Oct 2017 17:26:02 +0000 (13:26 -0400)]
Fix "l2fib add" CLI to allow adding of filter MAC entries

When adding a filter MAC entry, the default sw_if_index of -1
was incorrectly validated and rejected.

Change-Id: Id7f122b6269ea7c299a4335b05b748afaf01383c
Signed-off-by: John Lo <loj@cisco.com>
6 years agoFix set interface mac address API to be endian neutral 68/9168/2
John Lo [Tue, 31 Oct 2017 18:31:10 +0000 (14:31 -0400)]
Fix set interface mac address API to be endian neutral

Store and pass MAC address as 6 byte u8 array instead of u64 to
make MAC address handling in set interface MAC endian neutral.
The previous API handler only works for little endian.

Change-Id: Ie4ec33a840bc5122ab1f17e25977e58f3466253b
Signed-off-by: John Lo <loj@cisco.com>
6 years agoVPP PAPI: Error in unserializer for non-array compound types. 49/9149/3
Ole Troan [Tue, 31 Oct 2017 13:50:13 +0000 (14:50 +0100)]
VPP PAPI: Error in unserializer for non-array compound types.

A bug in the decoder of messages when there was a non-array compound type.
The typical result was an error message from the struct library:
 "error:unpack_from requires a buffer of at least 4 bytes"

Change-Id: Ie30fec6fc39b9f4177b54fa4adc4fc69674f0e12
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoUpdate CSIT tests 171017 -> 171030 55/9155/2
Jan Gelety [Tue, 31 Oct 2017 15:07:44 +0000 (16:07 +0100)]
Update CSIT tests 171017 -> 171030

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

Change-Id: I818bb7f1778cd92716feeaeb9fc1af59c62bdbc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agoLISP: add P-ITR/P-ETR/xTR API handlers, ONE-24 94/8994/4
Filip Tehlar [Mon, 16 Oct 2017 12:48:23 +0000 (05:48 -0700)]
LISP: add P-ITR/P-ETR/xTR API handlers, ONE-24

Change-Id: I25937cd7470c826d1e833e65530ae959c39139d8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agol2fib: MAC: Fix uint64 to u8 byte array 90/9090/7
Mohsin Kazmi [Fri, 27 Oct 2017 19:28:07 +0000 (21:28 +0200)]
l2fib: MAC: Fix uint64 to u8 byte array

As per proposal on the mailing list, this patch fixes
the represntation of MAC address in VPP API calls for
   ·  L2fib_add_del
   ·  L2_fib_table_details

Change-Id: I31e17efd1a6314cded69666e693cb8fc33158d02
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoFix typo (double unlock) 40/9140/1
Dave Barach [Tue, 31 Oct 2017 12:45:52 +0000 (08:45 -0400)]
Fix typo (double unlock)

Change-Id: If4a128186a732266eb27b6aa3caf6f1feff449bf
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agophysmem: register region with IOMMU 27/9127/3
Damjan Marion [Mon, 30 Oct 2017 21:38:47 +0000 (22:38 +0100)]
physmem: register region with IOMMU

VFIO file descriptor is extracted in a hackish way, as DPDK doesn't
provide imethod to retrieve it.

This fixes issue with DPDK drivers not working correctly when IOMMU is
enabled and external buffer memory is used.

Change-Id: I5eaa8e78741c50504d87d44e706b5997c8189554
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoRefactor IP input checks for re-use at MPLS disposition 49/8949/4
Neale Ranns [Sat, 21 Oct 2017 16:37:55 +0000 (09:37 -0700)]
Refactor IP input checks for re-use at MPLS disposition

Change-Id: I7aafdecd6f370411138e6ab67b2ff72cda6e0666
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agolb plugin tests - wipe flowtable after each unit test 67/9067/5
Gabriel Ganne [Mon, 30 Oct 2017 14:44:31 +0000 (15:44 +0100)]
lb plugin tests - wipe flowtable after each unit test

Add new cli api: "test lb flowtable flush" which flushes everything.
Call this new cli function after the end of each lb unit test.

Change-Id: I71d04a7bfba398f7d4dd9cc3ed24bba786943663
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoMinor copyedit fixes to ACL Hash doc. 25/9125/1
Jon Loeliger [Mon, 30 Oct 2017 20:04:26 +0000 (15:04 -0500)]
Minor copyedit fixes to ACL Hash doc.

Change-Id: I7fe34e99f566dd2e0a36a9ba38f894973989ca8a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoAdd the bihash_vec8_8 variant 09/9109/2
Dave Barach [Mon, 30 Oct 2017 13:42:54 +0000 (09:42 -0400)]
Add the bihash_vec8_8 variant

This is an all-purpose octet-vector memory hash, intended as a
thread-safe replacement for hash_create_mem / hash_create_string.  All
u8 * key vectors are memorized by the hash table.

Change-Id: I22944daea8fda07dde8ba118a6529a6d382491f9
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoRemove old Python vppctl script 16/9116/2
Chris Luke [Mon, 30 Oct 2017 14:17:50 +0000 (10:17 -0400)]
Remove old Python vppctl script

- The binary API method for executing commands was superceded
  by the unix-socket CLI approach used by the C vppctl utility.
  The API call it makes will soon be deprecated.
- This Python vppctl script was still being copied to the install
  directory, and then later overwritten by the binary vppctl.

Change-Id: I0a4b09b7c733049d0545b4c83b9ac5ac499a7300
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agoLISP: improve updating the dataplne when locators change 79/9079/7
Filip Tehlar [Fri, 27 Oct 2017 06:57:09 +0000 (23:57 -0700)]
LISP: improve updating the dataplne when locators change

Change-Id: Ifc0296834e25ddbdd0ad8283c061f309801b053c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
6 years agojvpp: bugfix for deadlock in java future API (VPP-1037) 57/8957/9
Matej [Mon, 23 Oct 2017 10:55:11 +0000 (12:55 +0200)]
jvpp: bugfix for deadlock in java future API (VPP-1037)

- message sending method inside synchronization blocks causes
deadlock between sending and receiving part
- breaking atomicity of sending message and putting future with
corresponding id to map needs additional handling by writer and receiver,
regardless which part get access to sync block first will create
new future and second one will complete it and remove from map,
in case of dump calls where control ping reply is required
as confirmation that all information were send, if ping reply is
received before writer put future in map, reader will create
regular control ping future instead and writer needs to made association
between these two futures

Change-Id: Id29a19be7a5319291a5e07cf931080610178f00c
Signed-off-by: Matej <matej.perina@pantheon.tech>
6 years agolibmemif: perf optimization 98/9098/2
Jakub Grajciar [Mon, 30 Oct 2017 09:34:54 +0000 (10:34 +0100)]
libmemif: perf optimization

Change-Id: Ie3bd75e0e98c7ecb4c66dba701131363e5ec89a2
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agovcl: fix compiling on newer systems 93/9093/4
Damjan Marion [Sun, 29 Oct 2017 18:28:31 +0000 (19:28 +0100)]
vcl: fix compiling on newer systems

Build fails on ubuntu 17.10...

Change-Id: I98dfffa3f8f5f9bca2ba97a856709714fbeec49c
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodevices: Add binary API for set interface <interface> rx-mode 94/9094/1
Steven [Mon, 30 Oct 2017 05:10:46 +0000 (22:10 -0700)]
devices: Add binary API for set interface <interface> rx-mode

Also add vat test code to test the subject API. The format is

sw_interface_set_rx_mode sw_if_index <index> [queue <id>]
<polling|nterrupt|adaptive>

Change-Id: Ib810d85d430077865bead8cc08a070f8ae478225
Signed-off-by: Steven <sluong@cisco.com>
6 years agosession: fix coverity warnings 92/9092/1
Florin Coras [Sun, 29 Oct 2017 17:56:15 +0000 (10:56 -0700)]
session: fix coverity warnings

Change-Id: Ib87eccb853cafceea5f5513f6bb51c2364449afa
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: rules tables 65/8865/21
Florin Coras [Tue, 17 Oct 2017 07:03:13 +0000 (00:03 -0700)]
session: rules tables

This introduces 5-tuple lookup tables that may be used to implement
custom session layer actions at connection establishment time (session
layer perspective).

The rules table build mask-match-action lookup trees that for a given
5-tuple key return the action for the first longest match. If rules
overlap, ordering is established by tuple longest match with the
following descending priority: remote ip, local ip, remote port, local
port.

At this time, the only match action supported is to forward packets to
the application identified by the action.

Change-Id: Icbade6fac720fa3979820d50cd7d6137f8b635c3
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoFix for vppctl and interactive commands (VPP-1038) 62/9062/2
Chris Luke [Thu, 26 Oct 2017 14:44:43 +0000 (10:44 -0400)]
Fix for vppctl and interactive commands (VPP-1038)

- Interactive commands like "ping" read extra input from the
  input stream.
- In the case of "ping" it is simply a signal to cease the current
  operation.
- "vppctl", in non-interactive mode, will issue a "quit" immediately
  after the requested command to queue up closing of the session.
- This resulted in "ping" thinking a keypress was seen and returning
  control to the CLI; the "quit" command however is consumed by the
  keypress event handler and thus the session does not close.

- This patch reworks vppctl slightly to only issue "quit" after the
  command has completed. In particular it uses the fact that VPP issues
  NUL bytes as a surrogate prompt between output of commands to signal
  acknowledgement that the command has completed; vppctl now flags
  that the quit should be issued after the next such acknowledgement.
- Since input it still accepted, the user can still terminate the
  "ping" early, if desired.

Change-Id: I7e3dbe767f32f8e364ccb5f81799759b311585df
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agoVCL-LDPRELOAD: Fix CID 178271 87/9087/3
Dave Wallace [Fri, 27 Oct 2017 17:42:05 +0000 (13:42 -0400)]
VCL-LDPRELOAD: Fix CID 178271

- Pointer to local outside scope

Change-Id: I84a7958e10dbc9369ffa5172cbad5dbade9b2bc9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: instantiate appns lookup table only once 70/9070/2
Florin Coras [Thu, 26 Oct 2017 21:25:12 +0000 (14:25 -0700)]
session: instantiate appns lookup table only once

Change-Id: I39d634b7691a524e5221c28997a737102298c281
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoLDPRELOAD: Fix out-of-scope variable coverity error 86/9086/2
Steven [Fri, 27 Oct 2017 16:34:57 +0000 (09:34 -0700)]
LDPRELOAD: Fix out-of-scope variable coverity error

>>>    CID 178271:  Memory - illegal accesses  (RETURN_LOCAL)
>>>    Using "ep", which points to an out-of-scope variable "_ep".

Change-Id: Icf21e602bc2718bfedd9480e9da41aff8693048e
Signed-off-by: Steven <sluong@cisco.com>
6 years agoacl-plugin: increase the amount of memory for classifier tables used by MACIP ACLs 85/9085/1
Andrew Yourtchenko [Fri, 27 Oct 2017 15:03:34 +0000 (15:03 +0000)]
acl-plugin: increase the amount of memory for classifier tables used by MACIP ACLs

The classifier tables upper bound of memory was just big enough
to cause the unittests pass most of the time but not always.
Increase the amount of space and run several hundred iterations
of unittests to ensure they always pass.

Change-Id: Ieb7876c6ebdde1f8c5273dbb9b090f12f2c38915
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agoVCL: refactor session close / disconnect. 33/9033/2
Dave Wallace [Thu, 26 Oct 2017 06:51:07 +0000 (02:51 -0400)]
VCL: refactor session close / disconnect.

Change-Id: Ib0797faaa3f21c7577330bb8d0e801d43e01110e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: Fix more coverity warnings 69/9069/2
Dave Wallace [Thu, 26 Oct 2017 20:12:04 +0000 (16:12 -0400)]
VCL-LDPRELOAD: Fix more coverity warnings

vcom.c:
  CID 178227: Logically dead code in vcom.c

vcom_socket.c:
  CID 178254: Dereference after null check
  CID 178250: Out-of-bounds access

vppcom.c:
  CID 178252: Unused value
  Suppress vppcom_session_attr() debug output.

Change-Id: I1d47bafb84fc0ad00c642392ae3cb6761fd3fb17
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL-LDPRELOAD: Fix CID 178251 & CID 178253 68/9068/3
Dave Wallace [Thu, 26 Oct 2017 18:47:06 +0000 (14:47 -0400)]
VCL-LDPRELOAD: Fix CID 178251 & CID 178253

- CID 178251 Dereference after null check in vcom_socket.c
- CID 178253 Logically dead code in vppcom.c

Change-Id: I2a24cd53727fec76cf1a6d60f90414ff92567818
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoConsolidate short_help for classify table with memory-size 06/9006/3
Hongjun Ni [Wed, 25 Oct 2017 12:47:56 +0000 (20:47 +0800)]
Consolidate short_help for classify table with memory-size

When creating 32K classify sessions, VPP crashes.
Default heap size is 2MB.
Need to configure it when requiring large number sessions.

Change-Id: I16678ee4a9e0ba61cbd2d3b38c43d10c59325968
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agoNAT: delete session API/CLI (VPP-1041) 50/9050/2
Matus Fabian [Thu, 26 Oct 2017 10:37:38 +0000 (03:37 -0700)]
NAT: delete session API/CLI (VPP-1041)

Administratively delete NAT44 session for specific inside/outside addresses and port pair.

Change-Id: If5ab500ac3592c7153d6d8f2cc0297df7309fbc3
Signed-off-by: Matus Fabian <matfabia@cisco.com>