vpp.git
6 years agoVCL: clean up disconnect_session debug output. 91/9391/1
Dave Wallace [Sun, 12 Nov 2017 03:45:38 +0000 (22:45 -0500)]
VCL: clean up disconnect_session debug output.

- Run VPP in xfce4-terminal in VCL unit tests.

Change-Id: Iba6a870617a811261de0a54fa38cdb5109ae1d07
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors 28/9328/4
Steven [Wed, 8 Nov 2017 22:14:45 +0000 (14:14 -0800)]
VCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors

Fixed out-of-bounds access in vcom_socket.c by limiting the copy to the
size of the address field that was passed. Truncation will occur if
the address field is not big enough.

Fixed inequality comparison in vppcom.c by using the predefined macro
MAP_FAILED.

Change-Id: I9517c29ae811d08058621bd548a352b4d4f05139
Signed-off-by: Steven <sluong@cisco.com>
6 years agoACL: Add coding-style-patch-verification and indent. 89/9389/1
Jon Loeliger [Sun, 12 Nov 2017 01:50:46 +0000 (19:50 -0600)]
ACL: Add coding-style-patch-verification and indent.

Change-Id: I2397ada9760d546423e031ad45535ef8801b05e7
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoACLs: Use better error return codes than "-1" everywhere. 83/9383/3
Jon Loeliger [Fri, 10 Nov 2017 19:15:12 +0000 (13:15 -0600)]
ACLs: Use better error return codes than "-1" everywhere.

Added two new errors:
    ACL_IN_USE_INBOUND
    ACL_IN_USE_OUTBOUND

Update ACL tests to expect new, precise return values.

Change-Id: I644861a18aa5b70cce5f451dd6655641160c7697
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoMPLS disposition actions at the tail of unicast LSPs 77/9377/3
Neale Ranns [Tue, 31 Oct 2017 19:28:22 +0000 (12:28 -0700)]
MPLS disposition actions at the tail of unicast LSPs

Change-Id: I8c42e26152f2ed1246f91b789887bfc923418bdf
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoUpdate CPU list 88/9388/2
Damjan Marion [Sat, 11 Nov 2017 01:21:34 +0000 (02:21 +0100)]
Update CPU list

Change-Id: Ibee8973270366c38dced6eb3e8ca41784549183a
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: optimize buffer alloc/free 58/9358/4
Damjan Marion [Thu, 9 Nov 2017 17:02:54 +0000 (18:02 +0100)]
dpdk: optimize buffer alloc/free

This reverts commit 45a588fa3efaaf52360986360ab1f6827bae3164.

Change-Id: I7e541545791f7743ee827bdec8b6fc46cbb0938f
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoHandle CPU flags from autotools project 82/9382/3
Damjan Marion [Fri, 10 Nov 2017 19:26:50 +0000 (20:26 +0100)]
Handle CPU flags from autotools project

Change-Id: Id085c1e3cbc7bf03df02755f9e35896cdb57e9e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL: Fix accept state machine, EPOLLET logic. 87/9387/2
Dave Wallace [Fri, 10 Nov 2017 22:07:13 +0000 (17:07 -0500)]
VCL: Fix accept state machine, EPOLLET logic.

Change-Id: I909b717e5c62e91623483bdbb93d9fe4c14f0be7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoMap SVM regions at a sane offset on arm64 42/9342/2
Brian Brooks [Wed, 8 Nov 2017 03:28:42 +0000 (21:28 -0600)]
Map SVM regions at a sane offset on arm64

Mapping shared virtual memory at 0x30000000, which appears to be derived
from x86-32, turns out to be too close to the heap on arm64 systems. The
symptoms of memory corruption were random and included crashes in the
Python runtime and what appeared to be corruption of malloc's internal
mutex. Thanks to Gabriel Ganne for pointing out that disabling ASLR seemed
to mitigate the situation.

This patch maps SVM regions at an offset from the arm64 kernel constant
TASK_UNMAPPED_BASE and also assumes a 48-bit VA (for Ubuntu).

Change-Id: I642e5fe83344ab9b5c66c93e0cf1575c17251f3b
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
6 years agoVCL-LDPRELOAD: Fix epoll_pwait timeout. 84/9384/2
Dave Wallace [Fri, 10 Nov 2017 20:49:32 +0000 (15:49 -0500)]
VCL-LDPRELOAD: Fix epoll_pwait timeout.

Change-Id: I5712f45c35dbdf34141c42b9d864cad1f918e5e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoBreak up vpe.api 75/9375/3
Neale Ranns [Fri, 10 Nov 2017 14:53:54 +0000 (06:53 -0800)]
Break up vpe.api

- makes the VAPI generated file more consumable.
- VOM build times improve.

Change-Id: I838488930bd23a0d3818adfdffdbca3eead382df
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agomake test: fix logic for CACHE_OUTPUT option 53/9253/2
Klement Sekera [Tue, 7 Nov 2017 02:19:16 +0000 (03:19 +0100)]
make test: fix logic for CACHE_OUTPUT option

Change-Id: I9938c0154c860913e27cecb18ec68f247943a2e6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoadd warning control macro set 66/9266/2
Gabriel Ganne [Tue, 7 Nov 2017 13:24:56 +0000 (14:24 +0100)]
add warning control macro set

Add a way to toggle on and off a warning for a specific section of code.
This supports clang and gcc, and has no effect for any other compilers.

This follows commit bfc29ba442dbb65599f29fe5aa44c6219ed0d3a8 and
provides a generic way to handle warnings in such corner cases.

To disable a warning enabled by "-Wsome-warning" for a specific code:
  WARN_OFF(some-warning)  // disable compiler warning
  ; /* some code */
  WARN_ON(some-warning)   // enable the warning again

Change-Id: I0101caa0aa775e2b905c7b3b5fef3bbdce281673
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFurther fix to SHG handling for ARP/ICMPv6 from BVI in a BD 81/9381/2
John Lo [Fri, 10 Nov 2017 17:24:32 +0000 (12:24 -0500)]
Further fix to SHG handling for ARP/ICMPv6 from BVI in a BD

For ARP/ICMPv6 packets received from a BVI in a BD, allow flood
to all remote VTEPs via VXLAN tunnels irrespective of SHG check
for ARP request or ICMPv6 neighbor solicitation packets only.
All other packets types will flood normally as per SHG check.

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

6 years agoadd classify session action set-sr-policy-index 37/8637/9
Gabriel Ganne [Mon, 2 Oct 2017 09:41:24 +0000 (11:41 +0200)]
add classify session action set-sr-policy-index

This allows to use the classifier to steer source routing packets instead
of using the "sr steer" command.
This way we can steer on anything instead of only the dst ip address.

test:
 * add add_node_next function to the VppPapiProvider class.
 * add simple test scenario using the classifier to steer packets with
   dest ip addr == a7::/8 to the source routing insert node.
 * use new interface indexes (3,4) instead of (0,1) to prevent a cleanup
   conflict with the other tests which attach a specific fib to the
   interface.

The test creates interfaces sepsrated from the other tests to prevent a
conflict in the cleaning of the ip6 fib index 1 which causes vpp not to
be able to find a default route on this table.

Change-Id: Ibacb30fab3ce53f0dfe848ca6a8cdf0d111d8336
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoAllow Openssl 1.1.0 54/9354/4
Marco Varlese [Thu, 9 Nov 2017 14:16:20 +0000 (15:16 +0100)]
Allow Openssl 1.1.0

This patch addresses all the code changes required to VPP to support
openssl 1.1.0 API.
All the changes have been done so that VPP can still be built against
current openssl API whilst forward-looking to version 1.1.0.

Change-Id: I65e22c53c5decde7a15c7eb78a62951ee246b8dc
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agomake test: automatically seed random generator 57/9357/4
Klement Sekera [Thu, 9 Nov 2017 08:16:39 +0000 (09:16 +0100)]
make test: automatically seed random generator

Change-Id: I286b61d41cc2b557de3eb8801ff95c643f680acd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agovppinfra: add 512-bit vector definitions and types 80/9380/2
Damjan Marion [Fri, 10 Nov 2017 19:20:32 +0000 (20:20 +0100)]
vppinfra: add 512-bit vector definitions and types

Change-Id: I245c034684ba8585c8f5bb5353027aba13f8a53e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix bug in key calculation for IPsec tunnel interface 44/9244/2
Matthew Smith [Mon, 6 Nov 2017 18:12:13 +0000 (12:12 -0600)]
Fix bug in key calculation for IPsec tunnel interface

When IPsec tunnel interface has the inbound SA updated,
the key used to find the right interface for inbound
packets was being generated using the destination
address instead of the source.

Change-Id: Id5a6fb1511637c912b329aad65188789646a5889
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agosession: add app ns index to ns create api 78/9378/3
Florin Coras [Fri, 10 Nov 2017 17:03:54 +0000 (09:03 -0800)]
session: add app ns index to ns create api

Change-Id: I86bfe4e8b0a899cc54c9b37eeb5eec701d0baf3d
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoAdd sw_if_index to the ip_neighbor_details_t response. 25/9325/3
Jon Loeliger [Wed, 8 Nov 2017 19:07:39 +0000 (13:07 -0600)]
Add sw_if_index to the ip_neighbor_details_t response.

When a DUMP with sw_if_index == ~0 is used to get all Neighbor
entries for all interfaces, it is unclear in the details to
which interface the neighbor belongs.

Clear that up by returning the associated sw_if_index as well.

Change-Id: Ib584a57138f7faceffed64d7c1854f7af92e0e42
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agosession: use listener logic for proxy rules 65/9365/3
Florin Coras [Fri, 10 Nov 2017 03:30:17 +0000 (19:30 -0800)]
session: use listener logic for proxy rules

This moves session proxy logic from session rules tables to table/logic
used to manage session listeners in order to avoid overlap of
semantically different rules.

Change-Id: I463522cce91b92d942f6a2086fb14c3366b9f023
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVOM: enum_base - not constexpr to appease coverity 74/9374/2
Neale Ranns [Fri, 10 Nov 2017 12:03:08 +0000 (04:03 -0800)]
VOM: enum_base - not constexpr to appease coverity

Change-Id: Id87e245882eab80a85a2883ffdb7a0f3b7f26a75
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVOM: memset DHCP hostname in VPP API 44/9344/2
Neale Ranns [Thu, 9 Nov 2017 13:18:04 +0000 (05:18 -0800)]
VOM: memset DHCP hostname in VPP API

Change-Id: I74886c31f8ceba2561679513560cf5ae46757236
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoBIER: replace uintXX_t with uXX 70/9370/1
Neale Ranns [Fri, 10 Nov 2017 10:34:04 +0000 (02:34 -0800)]
BIER: replace uintXX_t with uXX

Change-Id: I0ba698da9739c11de3a368fe4cf3617167a8d854
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agosession: use pool for segment manager properties 64/9364/2
Florin Coras [Fri, 10 Nov 2017 02:00:15 +0000 (18:00 -0800)]
session: use pool for segment manager properties

Change-Id: I280fea2610dcfc0b2da84973b9f567daec42f1f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotcp: call accept notify after full connection init 63/9363/1
Florin Coras [Fri, 10 Nov 2017 00:26:03 +0000 (16:26 -0800)]
tcp: call accept notify after full connection init

Change-Id: I69998aa4eb587d80fc61d14bb28a9318a318f9ec
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoAdd udp.api.h to vnet.am 62/9362/2
Florin Coras [Thu, 9 Nov 2017 22:17:27 +0000 (14:17 -0800)]
Add udp.api.h to vnet.am

Change-Id: I77c1da7ba3770637a3414226f7ade229b8b0d216
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL: Set debug output level from env var 59/9359/5
Dave Wallace [Thu, 9 Nov 2017 18:00:34 +0000 (13:00 -0500)]
VCL: Set debug output level from env var

Change-Id: Ia99047715ed652eca1aea1e4144e407f9608d59e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: fix app index in unbind 60/9360/2
Florin Coras [Thu, 9 Nov 2017 18:05:42 +0000 (10:05 -0800)]
session: fix app index in unbind

Change-Id: Iff1a665b6cf9ca2def0fcdacf02d7f8c579c0f4e
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agobuffers: fix bug in free list n_alloc tracking 56/9356/3
Klement Sekera [Thu, 9 Nov 2017 08:12:12 +0000 (09:12 +0100)]
buffers: fix bug in free list n_alloc tracking

This change avoids hitting

ASSERT (vec_len (f->buffers) == f->n_alloc);

in vlib_buffer_delete_free_list_internal by updating
vlib_buffer_free_list_t->n_alloc in case when buffers are removed from
the free list due to overfill.

Change-Id: Id60fa97e8cb0f02ef529b05816265a57a4e7d998
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agomemif: use clib_socket_t for socket connections 16/8416/5
Damjan Marion [Wed, 13 Sep 2017 19:30:31 +0000 (21:30 +0200)]
memif: use clib_socket_t for socket connections

This reverts commit 590acf8fa7af6a8604edd72a32f9f087be52c767.

new version includes minor fix for the crash when the interface is
deleted.

Change-Id: I8fc56eb9145e4d8e1d410206f84e705045898608
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM: Inspect: fix the bug 55/9355/2
Mohsin Kazmi [Thu, 9 Nov 2017 12:30:59 +0000 (13:30 +0100)]
VOM: Inspect: fix the bug

If key is passed without ":", results in segmentation fault.
This patch fixes this issue.

Change-Id: I4e6bb3431c261cc2ac752b966a11edd7aa3304a0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoVOM: Makefile: Fix the execution time initialization order 41/9341/2
Mohsin Kazmi [Thu, 9 Nov 2017 10:58:26 +0000 (11:58 +0100)]
VOM: Makefile: Fix the execution time initialization order

When compile with gcc version 4.8.5, the compiler doesn't
able to optimize the execution time initialization order.
This patch fixes the initialization order.

Change-Id: I14eacdf30f7ef481f72452adfc955400e37ae559
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoBIER 50/8950/14
Neale Ranns [Sat, 21 Oct 2017 17:53:20 +0000 (10:53 -0700)]
BIER

- see draft-ietf-bier-mpls-encapsulation-10
- midpoint, head and tail functions
- supported payload protocols; IPv4 and IPv6 only.

Change-Id: I59d7363bb6fdfdce8e4016a68a9c8f5a5e5791cb
Signed-off-by: Neale Ranns <nranns@cisco.com>
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>