vpp.git
4 years agotests: avoid unnecessary rebuilds 21/25821/3
Klement Sekera [Thu, 12 Mar 2020 11:30:21 +0000 (12:30 +0100)]
tests: avoid unnecessary rebuilds

Improve dependency tracking on vapi_test directory so that vapi_c_test
rebuild doesn't force vapi_cpp_test rebuild and vice versa.

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I00094c6374981333858ddbe6ae934cfda3b33a36

4 years agordma: cleanup rdma-core build 20/25820/4
Benoît Ganne [Thu, 12 Mar 2020 10:55:09 +0000 (11:55 +0100)]
rdma: cleanup rdma-core build

Type: improvement

Change-Id: I298bbb81c753d60288ac63bebf2bdfea323af68b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosvm: cleanup chunk and fifo allocation 55/25755/8
Florin Coras [Tue, 10 Mar 2020 04:46:32 +0000 (04:46 +0000)]
svm: cleanup chunk and fifo allocation

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2426211f48b242e51aeb1edc87c1cd21c526dbfa

4 years agovppinfra: refactor clib_timebase_t 00/25800/3
Dave Barach [Wed, 11 Mar 2020 14:31:36 +0000 (10:31 -0400)]
vppinfra: refactor clib_timebase_t

Add a clib_time_t * argument to clib_timebase_init(...), to encourage
client code to share the vlib_main_t's clib_time_t object.

Display the current day / date in GMT via the "show time" debug CLI.

Fix the test framework so it processes the new "show time" output format.

Type: refactor

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5e52d57eb164b7cdb6355362d520df6928491711

4 years agovppinfra: remove time jump workaround 37/25837/1
Dave Barach [Thu, 12 Mar 2020 18:43:04 +0000 (14:43 -0400)]
vppinfra: remove time jump workaround

A partial revert of gerrit 25729. The last_run_time == 0.0 check is
necessary and remains in place.

Type: fix
Fixes: 3d9f134

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3d2c9f90b2bc867f02c4749a5b19f997b84185b9

4 years agodpdk: tx/rx burst function description refactor 03/25703/2
Chenmin Sun [Fri, 6 Mar 2020 15:09:32 +0000 (23:09 +0800)]
dpdk: tx/rx burst function description refactor

DPDK provides two new APIs to retrieve information about the Tx/Rx
packet burst mode:
rte_eth_tx_burst_mode_get
rte_eth_rx_burst_mode_get

This patch leverages these two APIs to describe the tx/rx mode.

Currently, Intel X710/E810 and Mellanox Mlx5 support the new APIs.
For NICs that don't support the new APIs, still use the original way
to print their tx/rx function name

Type: refactor

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ibe47f5debe3b3f17f462fbf9834394e22845cc08

4 years agovrrp: unit tests do not run by default 34/25834/1
Matthew Smith [Thu, 12 Mar 2020 15:29:31 +0000 (10:29 -0500)]
vrrp: unit tests do not run by default

Type: fix
Fixes: 39e9428b90

VRRP unit tests fail sometimes for changes which have not touched any
code related to VRRP. There were some timing-related changes recently
which probably made the VRRP tests, which rely on a VR changing state
within a certain amount of time, start failing.

Set the VRRP tests to only run with the extended tests rather than
running by default. This is temporary so VRRP will not cause spurious
build failures while a proper solution is figured out.

Change-Id: I5826ea39b944dfb9b0ca4bdfa2ebbe86d269f935
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agovlib: fix unix cli SIGSEGV for empty line input 18/25818/3
Fan Zhang [Thu, 12 Mar 2020 09:26:38 +0000 (09:26 +0000)]
vlib: fix unix cli SIGSEGV for empty line input

When logging is enabled, an empty line input (press Enter only)
will cause SIGSEGV. This patch fixes the problem by checking
the command length first.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Ib4cbd1c7bfd6a694e289d28958875c7d2356a93e

4 years agopolicer: API cleanup 66/25566/8
Jakub Grajciar [Mon, 2 Mar 2020 12:16:53 +0000 (13:16 +0100)]
policer: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia14f33992353b419b70b55beed63ab8ed6a2e837
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoikev2: fix udp encap 15/25815/2
Filip Tehlar [Sat, 7 Mar 2020 20:55:59 +0000 (20:55 +0000)]
ikev2: fix udp encap

Type: fix

Change-Id: I2c89accddf2307fa975b71e974d4091499f104ed
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agosr: SRv6 uN behavior 71/25771/8
Pablo Camarillo [Wed, 18 Dec 2019 17:13:13 +0000 (17:13 +0000)]
sr: SRv6 uN behavior

Implements the uN behavior

Type: feature

Change-Id: Icb5efc560e09052cd183b468772cf7f799f81194
Signed-off-by: pcamaril <pcamaril@cisco.com>
4 years agonat: dslite plugin separation 06/25806/2
Filip Varga [Wed, 11 Mar 2020 11:49:46 +0000 (12:49 +0100)]
nat: dslite plugin separation

Type: refactor

Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: I81546423200cc7f8a06b527dac8ead191a9e0519

4 years agodocs: Add feature build to publish script 97/25797/2
John DeNisco [Wed, 11 Mar 2020 13:47:21 +0000 (09:47 -0400)]
docs: Add feature build to publish script

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: I6a938f426b9a8e1242fa5c6f9716a3f9db4d4976

4 years agodocs: describe clib_time monotonic timebase support 91/25791/3
Dave Barach [Wed, 11 Mar 2020 13:00:47 +0000 (09:00 -0400)]
docs: describe clib_time monotonic timebase support

Type: docs

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I5b27d8b945472388498a4afc4be8dd868bb45ac3

4 years agovppinfra: minimize tw verbosity on timebase jump 80/25780/3
Florin Coras [Tue, 10 Mar 2020 23:19:53 +0000 (23:19 +0000)]
vppinfra: minimize tw verbosity on timebase jump

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5db3457a9fed11d6ecf6eaabcdf8f1d1177b2a9f

4 years agovlib: unix cli - log cli commands one per line 58/25558/3
Paul Vinciguerra [Sun, 1 Mar 2020 05:47:17 +0000 (00:47 -0500)]
vlib: unix cli - log cli commands one per line

This changeset modifies the log output so that cli commands now look like:
  cat /tmp/vpp-cli.log
  2020/03/10 19:24:42:186: ***** Start: PID 29570 *****
  /* [0] is stdin */
  2020/03/10 19:24:53:518[0]: show clock
  2020/03/10 19:24:56:078[0]: show clock
  2020/03/10 19:25:01:983[0]: show pci
  /* [1] is vppctl socket */
  2020/03/10 19:26:14:372[1]: show ver
  2020/03/10 19:26:23:395[1]: show hardware-interfaces
  2020/03/10 19:26:28:507[1]: q

instead of:
  cat /tmp/vpp-cli.log
2020/03/01 00:40:12:834: ***** Start: PID 29974 *****
2020/03/01 00:40:24:969[0]: show interface2020/03/01 00:40:31:945[0]: show clo2020/03/01 00:40:41:288[0]: show classify 2020/03/01 00:40:43:753[0]: show classify ?2020/03/01 00:40:53:392[0]: show classify tables2020/03/01 00:40:57:352[0]: quit

Type: improvement

Change-Id: I38d85535977296d174db7121ae340850b6476a39
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agotests: add running_gcov_tests to framework.py 79/25779/2
Dave Barach [Tue, 10 Mar 2020 20:59:39 +0000 (16:59 -0400)]
tests: add running_gcov_tests to framework.py

Mark a few code coverage tests appropriately:

@unittest.skipUnless(running_gcov_tests, "part of code coverage tests")
def test_my_coverage_unittest(self):
    <etc>

Almost exactly like "make EXTENDED_TESTS=yes test".

Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic6d0a097a608ba93442b3d88252f66f8e6805b97

4 years agotcp: protect against forced cleanups 76/25776/3
Florin Coras [Tue, 10 Mar 2020 19:34:28 +0000 (19:34 +0000)]
tcp: protect against forced cleanups

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0c3b847044d522f55dfd8262afa7c161d5bd5dd3

4 years agovppinfra: improve timebase resilience 63/25763/2
Dave Barach [Tue, 10 Mar 2020 13:01:02 +0000 (09:01 -0400)]
vppinfra: improve timebase resilience

Deal with arbitrary kernel reference time changes: for example,
yanking the kernel reference clock back to a time before vpp started.

Best practice involves aligning the kernel reference clock with
reality prior to starting apps which use 10us granularity timers.

Compute change in the reference and cpu clocks. Recompute the vpp
start time reference and and total cpu clock count, using the current
clock tick rate.

Next, compute a new clock rate sample. If the sample seems sane,
factor it into the exponentially smoothed clock rate and recalculate
total cpu ticks based on the new clock rate.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib6132ffbbe0e6d140725676de5e35be112a31dfe

4 years agodocs: doxygen fix siphon under python3 60/25560/2
Paul Vinciguerra [Sun, 1 Mar 2020 06:42:28 +0000 (01:42 -0500)]
docs: doxygen fix siphon under python3

siphon used cgi.escape which was deprecated in python 3.2 and
removed in python 3.8.

Update the code to use html.escape instead.

Type: fix

Change-Id: I3192e3f69a4a95fe23cb24e1c29194ba5310932b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agobuild: add libssl-dev for ubuntu 16.04 and 18.04 59/25259/4
Jieqiang Wang [Wed, 12 Feb 2020 12:13:34 +0000 (12:13 +0000)]
build: add libssl-dev for ubuntu 16.04 and 18.04

The recent changes to Makefile lead to the lack of libssl-dev
dependency for ubuntu 16.04 and 18.04. Add libssl-dev to DEB_DEPENDS
variable for corresponding ubuntu version.

Type: fix

Change-Id: I42e0e4761d5ec377de71b11cccf747c7f55ca337
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
4 years agolb: fix coverity warning 60/25760/2
Dave Barach [Tue, 10 Mar 2020 11:13:20 +0000 (07:13 -0400)]
lb: fix coverity warning

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e

4 years agompls: add user defined name tag to mpls tunnels 97/25697/3
IJsbrand Wijnands [Thu, 5 Mar 2020 18:56:26 +0000 (10:56 -0800)]
mpls: add user defined name tag to mpls tunnels

This allows a user creating MPLS tunnel through the bin_api to add a name tag. This is useful
to correlate the Tunnel with its use-case. Also useful if the user needs to recover the MPLS
Tunnel after a restart (mark-sweep).

Type: feature

Change-Id:

Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: Idc080a63810a176ab090a2678a73d2cf9f7b523f

4 years agoipsec: API cleanup 29/25529/3
Jakub Grajciar [Fri, 28 Feb 2020 07:26:32 +0000 (08:26 +0100)]
ipsec: API cleanup

Use consistent API types.

Change vl_api_ipsec_proto_t to iana values:
ESP 50,
AH 51,

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I2becefb343246e0233f290fefbfdd172d8237325
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agosvm: track fifo segment virtual memory consumption 01/25701/7
Florin Coras [Fri, 6 Mar 2020 02:23:58 +0000 (02:23 +0000)]
svm: track fifo segment virtual memory consumption

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89d33d8e7e7ab049750439b22ba50372fd2261ca

4 years agovppinfra: fix corner cases in tw_timer_expire 29/25729/3
Dave Barach [Sun, 8 Mar 2020 12:27:19 +0000 (08:27 -0400)]
vppinfra: fix corner cases in tw_timer_expire

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4b3ff6e9c8e1d76037b168aeab36dcb5b4482260

4 years agoip-neighbor: add description to the age parameter 49/25749/2
Vratko Polak [Mon, 9 Mar 2020 17:30:02 +0000 (18:30 +0100)]
ip-neighbor: add description to the age parameter

Type: docs

Change-Id: I311301328fb5e47ba1c3caaff18431738bbd1233
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agoudp: fix UDP socket byte order in lookup 32/25732/4
Andreas Schultz [Mon, 9 Mar 2020 10:36:15 +0000 (11:36 +0100)]
udp: fix UDP socket byte order in lookup

The port registry uses host byte order for while the session API
uses network order. In a single place the conversion was missing.

Type: fix
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391

4 years agol2: API cleanup 70/22970/11
Jakub Grajciar [Thu, 24 Oct 2019 11:52:42 +0000 (13:52 +0200)]
l2: API cleanup

Use consistent API types.

Type: fix

Change-Id: I7ac7cd00606101864fa3422e7b9ea2f1143665dd
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agodocs: Add list of nodes for 'trace add' 65/23165/4
Paul Vinciguerra [Fri, 1 Nov 2019 02:34:30 +0000 (22:34 -0400)]
docs:  Add list of nodes for 'trace add'

(provided by Andrew/Damjan: git grep -h -B20 VLIB_NODE_FLAG_TRACE_SUPPORTED | grep VLIB_REGISTER_NODE | awk -F [\(\),] '{print $2 }' | sed 's/_/-/g' | sort |sed 's/-node//' )

Type: docs

Change-Id: I4a58fe5ed6bb3598551482ea1c5f16e502cbd6a7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agovppinfra: fix 32-bit overflow in os_cpu_clock_frequency 61/25661/3
Damjan Marion [Wed, 4 Mar 2020 19:06:06 +0000 (20:06 +0100)]
vppinfra: fix 32-bit overflow in os_cpu_clock_frequency

Type: fix
Change-Id: I23250fcbc70086584b5448baec9af9a1528992f5
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agovcl: fix coverity warning 28/25728/1
Florin Coras [Sat, 7 Mar 2020 17:45:47 +0000 (17:45 +0000)]
vcl: fix coverity warning

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I35fba8f17bdd6e2f5612358608ff6c13f4b431fe

4 years agotls: refactor ctx_write function to avoid allocate new memory every time 67/25667/3
Simon Zhang [Thu, 5 Mar 2020 11:49:37 +0000 (19:49 +0800)]
tls: refactor ctx_write function to avoid allocate new memory every time

Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Ic34729d58a4218046afacaffc765649beb056a24

4 years agomisc: Fix vpp-selinux-policy dependency on CentOS 8 25/25725/2
Renato Botelho do Couto [Fri, 6 Mar 2020 19:42:22 +0000 (13:42 -0600)]
misc: Fix vpp-selinux-policy dependency on CentOS 8

policycoreutils-python is now called python3-policycoreutils on
CentOS 8.

Type: fix

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: I46264c66a2a719d546e0926f3bd716e986461963

4 years agoip-neighbor: populate neighbor age via API 43/25543/8
Vladimir Ratnikov [Fri, 28 Feb 2020 13:48:21 +0000 (08:48 -0500)]
ip-neighbor: populate neighbor age via API

When we get ip-neigbor information using VPP API,
it's age can be very useful information.
This patch adds age entry to API and neighbor type

Type: feature

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I822e70ba7a2bdd85fec40930cfc9341ab71f7cb3

4 years agosession: fix session reschedule condition 02/25702/2
Florin Coras [Fri, 6 Mar 2020 02:25:09 +0000 (02:25 +0000)]
session: fix session reschedule condition

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I01441e958517e31260e67c8caea5f75d684b2711

4 years agovcl: refactor vls to minimize lock usage 63/25663/13
Florin Coras [Wed, 4 Mar 2020 22:20:12 +0000 (22:20 +0000)]
vcl: refactor vls to minimize lock usage

Type: refactor

- per vls worker private pool of sessions
- deep copy of vls worker data structures on fork
- maintain a global, i.e., heap allocated, and lock protected  pool of
  elements that track sessions that are shared between workers (due to
  forking).

Credit for uncovering the issue goes to Intel team contributing code to
VSAP (Ping, Yuwei, Shujun, Guoao).

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id7d8bb06ecd7b03e4134f1cae23e740cf4634649

4 years agodocs: document the unformat '%_' option 92/25692/2
Paul Vinciguerra [Thu, 5 Mar 2020 16:47:41 +0000 (11:47 -0500)]
docs: document the unformat '%_' option

Type: docs

Change-Id: Id864fcff768a78aa313b193f2eaabe545d95bec4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agocrypto: align per thread data to cache line 09/25709/2
Filip Tehlar [Thu, 5 Mar 2020 16:41:27 +0000 (16:41 +0000)]
crypto: align per thread data to cache line

Type: improvement

Change-Id: I6bad46403c07b211dfda7229aed1b5e19342865f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoikev2: align per thread data to cache line 04/25704/3
Filip Tehlar [Thu, 5 Mar 2020 16:17:59 +0000 (16:17 +0000)]
ikev2: align per thread data to cache line

Type: improvement

Change-Id: Id8fc6750e856862157917587234a6b7b03531b13
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agobuild: building applications outside of vpp is missing header files 98/25698/2
IJsbrand Wijnands [Thu, 5 Mar 2020 19:29:23 +0000 (11:29 -0800)]
build: building applications outside of vpp is missing header files

Building applications using the VPP bin_api outside of the VPP tree is broken, missing these includes.

Type: fix

Change-Id:

Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: Ibcb2fea0f5740a73b9577392aa54ac3c93c8d2b5

4 years agofib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to client 90/25690/2
IJsbrand Wijnands [Thu, 5 Mar 2020 14:25:32 +0000 (06:25 -0800)]
fib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to client

This path flag FIB_API_PATH_TYPE_INTERFACE_RX is not copied to the client bin_api.

Type: fix

Change-Id:

Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: I612044d2f564c852f83fceb63ce750a6330e1365

4 years agosession: reduce segment reserved bytes 00/25700/4
Florin Coras [Thu, 5 Mar 2020 20:36:40 +0000 (20:36 +0000)]
session: reduce segment reserved bytes

Type: refactor

Rb-trees are no longer maintained in the segment so we don't need to
reserve memory. Keeping the option as a means to avoid underlying infra
(dlmalloc) and alignment overhead.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I84741e95d015f7b72c60d9dca20be8e0aee6a915

4 years agosession: fix segment search on fifo alloc 99/25699/3
Florin Coras [Thu, 5 Mar 2020 19:44:02 +0000 (19:44 +0000)]
session: fix segment search on fifo alloc

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iaa4f9b0ec31a58f7406774f73e1a089bfcf4ac30

4 years agosession: API cleanup 97/24697/9
Jakub Grajciar [Fri, 31 Jan 2020 08:35:29 +0000 (09:35 +0100)]
session: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ib752a3425c076eb53bc5255a48039cbb74b1fcce
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoapi: ipsec: add missing IS_INBOUND flag. 65/25665/4
Christian Hopps [Wed, 4 Mar 2020 18:21:41 +0000 (13:21 -0500)]
api: ipsec: add missing IS_INBOUND flag.

External IKE daemons need to be able to flag an SA as inbound (just as
the included ike plugin does). This commit adds this flag to the API.
This change is backward bug-compatible as not setting the flag (old
clients) continues to mean all SAs are created as outbound and fib nodes
are created for them. The addition of this flag inhibits this forwarding
node creation as well as properly flagging the SA as inbound.

Ticket: VPP-1845
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I195e32c430e51155fac2d9f33671e06ef42a3f7f

4 years agotap: add support for persistance 13/24713/4
Mohsin Kazmi [Fri, 14 Feb 2020 17:51:04 +0000 (17:51 +0000)]
tap: add support for persistance

Type: feature

Change-Id: I775f53531972447ebae0d69b9e2dfeee84d115e5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agovppapigen: crc is a negative value for some messages when using python 2.7 62/25662/1
Mark Nelson [Wed, 4 Mar 2020 20:32:09 +0000 (15:32 -0500)]
vppapigen: crc is a negative value for some messages when using python 2.7

Type: fix

Signed-off-by: Mark Nelson <manelso2@cisco.com>
Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271

4 years agomap: fix map port calculation for ICMP 55/25455/4
Vladimir Isaev [Wed, 26 Feb 2020 11:41:46 +0000 (14:41 +0300)]
map: fix map port calculation for ICMP

type should be used to get ICMP type instead of code.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: Iabf4ae38befde18309caff8efd9e1d956a2fde82

4 years agoflow: add vlan tagged types for IPv4/IPv6 5-tuple flows 31/25431/3
Chenmin Sun [Wed, 26 Feb 2020 11:22:35 +0000 (19:22 +0800)]
flow: add vlan tagged types for IPv4/IPv6 5-tuple flows

Add new flow type IP4_N_TUPLE_TAGGED and IP6_N_TUPLE_TAGGED
for vlan tag sensitive flows
The original IP4_N_TUPLE and IP6_N_TUPLE will not match VLAN anymore

Type: feature
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ie511e9a64126440fe81f29665a56ca060061662d

4 years agolldp: coverity fix, uninitialized array 62/25562/2
Jakub Grajciar [Mon, 2 Mar 2020 09:49:46 +0000 (10:49 +0100)]
lldp: coverity fix, uninitialized array

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia6095a91904693225e53a85f35dfebf0757b3971

4 years agovxlan: vxlan-gpe/vxlan-gpe.cpi API cleanup 02/24702/6
Jakub Grajciar [Fri, 31 Jan 2020 09:45:30 +0000 (10:45 +0100)]
vxlan: vxlan-gpe/vxlan-gpe.cpi API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ic428e35141724b47a944211b4d95c3e41796c81e
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoikev2: make integ algo optional 14/25614/3
Filip Tehlar [Mon, 2 Mar 2020 21:49:48 +0000 (21:49 +0000)]
ikev2: make integ algo optional

Type: improvement

This patch makes configuring integration algorithm optional. This is
useful when using AEAD cipher (in fact when using such
cipher, integ algo is ignored anyway).

Change-Id: I5891db5c0433afb85ae2d9084d45b89ec1133178
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agogeneve gtpu vxlan vxlan-gpe: VRF-aware bypass node 63/25563/2
Nick Zavaritsky [Thu, 27 Feb 2020 15:54:58 +0000 (15:54 +0000)]
geneve gtpu vxlan vxlan-gpe: VRF-aware bypass node

Bypass node MUST NOT intercept a packet if destination IP doesn’t match
a local address.  However IP address interpretation depends on the VRF,
hence bypass node must take that into account.

This patch also factors-out common VTEP management and checking code.

Type: improvement
Signed-off-by: Nick Zavaritsky <nick.zavaritsky@emnify.com>
Change-Id: I5665d94882bbf45d15f8da140c7ada528ec7fa94

4 years agoip: fix coverity warning 74/25574/5
Dave Barach [Mon, 2 Mar 2020 15:42:17 +0000 (10:42 -0500)]
ip: fix coverity warning

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ifb310d6378c77ed9d3aae994897ca71ba8c44fa2

4 years agordma: improve rx loop 81/25581/2
Damjan Marion [Mon, 2 Mar 2020 18:02:15 +0000 (19:02 +0100)]
rdma: improve rx loop

Type: improvement
Change-Id: If81847bc0c92d167ce03e1e94a2f8e18f8154af2
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agordma: improve refill 79/25579/2
Damjan Marion [Mon, 2 Mar 2020 16:55:54 +0000 (17:55 +0100)]
rdma: improve refill

Type: improvement
Change-Id: Ib9921718ec88e6dc56a38e40a140f16f86ed2e44
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agordma: use per-thread buffer template 78/25578/3
Damjan Marion [Mon, 2 Mar 2020 16:36:30 +0000 (17:36 +0100)]
rdma: use per-thread buffer template

Type: improvement
Change-Id: Ie6f2c79e0a769f70eab079c75a500b9308dd51e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovirtio: fix the coverity warning 00/25400/2
Mohsin Kazmi [Mon, 24 Feb 2020 14:54:24 +0000 (15:54 +0100)]
virtio: fix the coverity warning

Type: fix

Change-Id: Ia75edb74eb7c746dd4c66bdbff75efb949575ce4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agoikev2: make UDP encap flag configurable 46/25546/3
Filip Tehlar [Tue, 25 Feb 2020 09:27:10 +0000 (09:27 +0000)]
ikev2: make UDP encap flag configurable

Type: improvement

Change-Id: I081dec2dc0c2bd0845dd4638b7b2f12806594112
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agotls: reduce bio buffering 77/25477/3
Florin Coras [Wed, 26 Feb 2020 16:12:06 +0000 (16:12 +0000)]
tls: reduce bio buffering

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0895eb54a8c31bfa545d30287bb0783876483d21

4 years agosvm: add explicit dependency on lock for fifo types 57/25557/3
Florin Coras [Sat, 29 Feb 2020 01:09:30 +0000 (01:09 +0000)]
svm: add explicit dependency on lock for fifo types

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib363d8167102f4b05bec0624494481d572096c9f

4 years agosvm: fix slice locking on fifo alloc 56/25556/3
Florin Coras [Fri, 28 Feb 2020 21:51:24 +0000 (21:51 +0000)]
svm: fix slice locking on fifo alloc

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1fef115ffc2277ad6e0673b49be137147808891c

4 years agoebuild: fix the distclean target 47/25547/2
Dave Barach [Fri, 28 Feb 2020 14:50:33 +0000 (09:50 -0500)]
ebuild: fix the distclean target

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I32142962cb70ea0d92cda1b0ffaac42b7de15974

4 years agovrrp: fix api-related coverity warnings 45/25545/2
Dave Barach [Fri, 28 Feb 2020 14:27:07 +0000 (09:27 -0500)]
vrrp: fix api-related coverity warnings

Type: fix
Ticket: VPP-1837

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I13c0e4771defaebccc976a6f6703493de29434dd

4 years agoikev2: fix incorrect reply messages 44/25544/1
Filip Tehlar [Fri, 28 Feb 2020 14:00:38 +0000 (14:00 +0000)]
ikev2: fix incorrect reply messages

Type: fix

Change-Id: Idd679885f42de45429a1dcbf3b0af1037dc54d2b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoikev2: fix non-matching SPIs during rekey 01/25501/1
Filip Tehlar [Thu, 27 Feb 2020 13:14:52 +0000 (13:14 +0000)]
ikev2: fix non-matching SPIs during rekey

Type:fix

Change-Id: I01ac57f6186b20d8ab4070b7259a82a150f0ae9a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agoip-neighbor: fix ip6_ra_cmd 63/25463/4
Dave Barach [Wed, 26 Feb 2020 13:02:58 +0000 (08:02 -0500)]
ip-neighbor: fix ip6_ra_cmd

The option parsing loop had "break" statements included in each
'if (unformat (line_input, "this-option ...") option_values=xxx;'
statement.

Result: the code would silently ignore all but the first
option. Probably broken forever, not easy to spot because the code
looks OK even though it's badly broken.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I667bee85b4ca654b53fb3af421f957957ed0f0f8

4 years agoethernet: configure system default ethernet MTU 73/25473/3
Dave Barach [Wed, 26 Feb 2020 15:27:08 +0000 (10:27 -0500)]
ethernet: configure system default ethernet MTU

Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9c2081c56cfbf61df7e5170002f5f65902f49942

4 years agoipsec: Revert API cleanup 83/25483/3
Ole Trøan [Wed, 26 Feb 2020 17:20:42 +0000 (17:20 +0000)]
ipsec: Revert API cleanup

This reverts commit 666ece35cd2625bbd8b6ddadb6e87444a617df4d.

Reason for revert: Awaiting CSIT CRC job to catch up

Type: fix
Change-Id: Ib38bbd5879ff761496a6819186f1af1dbee48590
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agosvm: fix coverity warnings 30/25430/3
Florin Coras [Tue, 25 Feb 2020 22:28:27 +0000 (22:28 +0000)]
svm: fix coverity warnings

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2d5cb7cccb67a3193ce5a25323e70bc05737e023

4 years agordma: bunp rdma-core version to v28.0 58/25458/2
Damjan Marion [Wed, 26 Feb 2020 12:01:03 +0000 (13:01 +0100)]
rdma: bunp rdma-core version to v28.0

Type: feature
Change-Id: I85deba9572585745a3f8f8d2f1fe9b62055727b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agodpdk: bump dpdk version to 20.02 56/25456/2
Damjan Marion [Wed, 26 Feb 2020 11:49:49 +0000 (12:49 +0100)]
dpdk: bump dpdk version to 20.02

Type: feature
Change-Id: I44c7a4e4dc91daa517296257bfc1f6a7f7cd360b
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovppapigen: list imports in JSON 70/24770/4
Ondrej Fabry [Mon, 3 Feb 2020 22:25:23 +0000 (23:25 +0100)]
vppapigen: list imports in JSON

Type: fix

Change-Id: If50477f2487d8c13f91c119a1492370e6e937904
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
4 years agolb: Fix generating illegal key in per-port vip 85/25185/2
Yasuhiro Nakamura [Mon, 17 Feb 2020 04:03:38 +0000 (13:03 +0900)]
lb: Fix generating illegal key in per-port vip

VIP prefix index becomes always 0 when adding a VIP which is already registered different port, causing LB config crash.
This change assigns the same VIP prefix index to the same VIP.

Ticket: https://jira.fd.io/browse/VPP-1834
Type: fix

Signed-off-by: Yasuhiro Nakamura <yanakamu@yahoo-corp.jp>
Change-Id: Ib63b3e58db9bd85714d68cd1292aadd0c8580da8

4 years agovat: add ip api types parser definitions 43/25443/5
Jakub Grajciar [Wed, 26 Feb 2020 10:01:43 +0000 (11:01 +0100)]
vat: add ip api types parser definitions

build vat with src/vnet/ip/ip_types_api.c

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Iab0f18bf7a89cf9512beab0629bc3a349edec383
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agocrypto: fix set crypto handlers 15/25415/2
Filip Tehlar [Tue, 25 Feb 2020 09:53:26 +0000 (09:53 +0000)]
crypto: fix set crypto handlers

Type: fix

Change-Id: I9e168a87aff1882636840eb94e5509cd08885fb5
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agotls: fix bulk bio read/write 35/25435/4
Florin Coras [Wed, 26 Feb 2020 05:18:47 +0000 (05:18 +0000)]
tls: fix bulk bio read/write

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1f981e909c45f1731ce4bdfa959b41d349e22ef1

4 years agotls session: fix unlisten 33/25433/4
Florin Coras [Wed, 26 Feb 2020 02:56:14 +0000 (02:56 +0000)]
tls session: fix unlisten

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie3bc31fc3df662e087f7931de6c274eb3608a2d8

4 years agotls: fix picotls dbg 34/25434/3
Florin Coras [Wed, 26 Feb 2020 02:59:50 +0000 (02:59 +0000)]
tls: fix picotls dbg

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5ca8aee973776e73f1376b6be538785398ba9b3d

4 years agoapi: add macro that zeros out api reply buffer 69/24569/4
Paul Vinciguerra [Mon, 27 Jan 2020 23:42:25 +0000 (18:42 -0500)]
api: add macro that zeros out api reply buffer

Add macros REPLY_MACRO2_ZERO, REPLY_MACRO3_ZERO that zeros the buffer
before the values are set. This way if say, a u8[64] field is
only filled with 10 octets, the previous buffers trailing
contents are not sent.

Type: feature

Change-Id: Ia69cc9aa477f463336483f7556de32476a6f2d51
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agomap: handle IPv6 extension headers for TCP/UDP 45/25445/2
Vladimir Isaev [Wed, 26 Feb 2020 10:21:35 +0000 (13:21 +0300)]
map: handle IPv6 extension headers for TCP/UDP

Without this patch offset for TCP/UDP headers was not calculated
correctly if there is one or more IPv6 extension headers.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I04d6f5e42f8f072987192d6236085afbd74a4420

4 years agoipsec: API cleanup 98/22698/7
Jakub Grajciar [Mon, 14 Oct 2019 09:33:36 +0000 (11:33 +0200)]
ipsec: API cleanup

Use consistent API types.

Change vl_api_ipsec_proto_t to iana values:
ESP 50,
AH 51,

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ic961130ffa519d1c904d872c34f9a7461b1be77e
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agosrv6-mobile: Cherry-pick the update document from stable/2001 95/24695/2
Satoru Matsushima [Thu, 16 Jan 2020 09:16:39 +0000 (09:16 +0000)]
srv6-mobile: Cherry-pick the update document from stable/2001

Updating the document of srv6-mobile plugin code.
This commit also fixes the following issues:

- Doxygen build structure
- No binary file included

Type: docs

Signed-off-by: Satoru Matsushima <satoru.matsushima@gmail.com>
Change-Id: I376386ef6fc9584ab945db7358e3c4a698471e9b
Signed-off-by: Satoru Matsushima <satoru.matsushima@gmail.com>
4 years agolldp: API cleanup 66/24666/4
Jakub Grajciar [Thu, 30 Jan 2020 13:01:17 +0000 (14:01 +0100)]
lldp: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I2fe6b56dc0f224f438ed5f14c0f276d94afbaea8
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agopg: API cleanup 69/24669/3
Jakub Grajciar [Thu, 30 Jan 2020 13:14:15 +0000 (14:14 +0100)]
pg: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ibf693e4b178d2579bc3afb9653bffc07fbb7dd0a
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agosr: API cleanup 99/24699/3
Jakub Grajciar [Fri, 31 Jan 2020 09:17:29 +0000 (10:17 +0100)]
sr: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I6238ec79b916c23c07c3f7e2ac8e635f5a0d6112
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agospan: API cleanup 98/24698/3
Jakub Grajciar [Fri, 31 Jan 2020 08:51:41 +0000 (09:51 +0100)]
span: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ifddac07b15b116574de3a97f7c80d7bf6a3171f7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoapi: improve api string safety 48/24848/10
Jakub Grajciar [Fri, 7 Feb 2020 10:30:26 +0000 (11:30 +0100)]
api: improve api string safety

- Remove vl_api_from_api_string
  to prevent use of not nul-terminated strings.
- Rename vl_api_from_api_to_vec -> vl_api_from_api_to_new_vec
  to imply a new vector is created. NOT nul terminated.
- Add vl_api_from_api_to_new_c_string. Returns
  nul terminated string in a new vector.
- Add vl_api_c_string_to_api_string. Convert nul terminated
  string to vl_api_string_t
- Add vl_api_vec_to_api_string. Convert NON nul terminated
  vector to vl_api_string_t

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Iadd59b612c0d960a34ad0dd07a9d17f56435c6ea
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agosvm: support multi-chunk fifo chunk alloc 33/24833/11
Florin Coras [Thu, 6 Feb 2020 16:59:31 +0000 (16:59 +0000)]
svm: support multi-chunk fifo chunk alloc

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id601cd241a2d124d3189057edab4299ffde7ee32

4 years agosvm: remove chunk add function 22/24822/9
Florin Coras [Wed, 5 Feb 2020 21:13:18 +0000 (21:13 +0000)]
svm: remove chunk add function

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I606eabbe0f3f387529e77d2483f5d63db7bde88a

4 years agoavf: Handle chain buffer in TX properly 19/25119/4
Steven Luong [Thu, 13 Feb 2020 17:27:38 +0000 (09:27 -0800)]
avf: Handle chain buffer in TX properly

For chain buffer, need to traverse b->next_buffer to transmit all buffers
in the chain. Only set EOP at the last descriptor in the chain to signal
this is a chain descriptor.

Introduce slow path to handle ring wrap. This is needed because chain
buffer may consist of multiple pieces and it may span from near the end of
the ring to the beginning of the ring.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Id7c872f3e39e09f3566aa63f3cdba8f40736d508

4 years agounittest: Skip string test case for sizeof (src) > sizeof (dst) 29/25429/2
Steven Luong [Tue, 25 Feb 2020 19:06:17 +0000 (11:06 -0800)]
unittest: Skip string test case for sizeof (src) > sizeof (dst)

coverity complains that the subject test may cause dst buffer overrun
problem and it is right. The problem is when __builtin_constant_p (n)
returns true, memcpy_s_inline skips all the errors checking and does the
copy blindly. Please see the code in memcpy_s_inline.

The fix is to skip the subject test when the aformentioned builtin function
returns true.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092

4 years agosvm: minimal initial fifo 35/24735/13
Florin Coras [Sun, 2 Feb 2020 19:30:39 +0000 (19:30 +0000)]
svm: minimal initial fifo

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4ee46a6c3c53c58199c275e20702f7fd11b60d9a

4 years agosession: basic fifo-tuning-logic 72/24472/26
Ryujiro Shibuya [Wed, 22 Jan 2020 12:11:42 +0000 (12:11 +0000)]
session: basic fifo-tuning-logic

- Allowing application to register custom fifo-tuning-logic.
- Adding an example custom fifo-tuning-logic in hs_app/proxy.

Type: feature

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2aca14d1f23d5c3c9debb7f4c46aca3a15a8d1b9

4 years agosession svm: tracking segment memory usage 78/24278/42
Ryujiro Shibuya [Wed, 25 Dec 2019 07:40:54 +0000 (07:40 +0000)]
session svm: tracking segment memory usage

1. segment manager would attempt to balance the usages across
   the segments, when it allocate fifos
2. the memory presure level is determined per fifo-segment
3. updated unit test
4. updated cli output for segments

Type: feature

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: I2923f3e0a43dd919196a0cb2cd55e098fde6cf66

4 years agosvm: refactor fifo 86/24086/65
Florin Coras [Fri, 20 Dec 2019 00:10:58 +0000 (16:10 -0800)]
svm: refactor fifo

Type: refactor

Switch from a wrapped byte space to a "continuous" one wherein fifo
chunks are appended to the fifo as more data is enqueued and chunks are
removed as data is dequeued.

The fifo is still subject to a maximum size, i.e., maximum number of
bytes that can be enqueued, so the max number of chunks associated to
the fifo is also constrained.

When enqueueing data, which must fit within the available free space, if
not enough "supporting" chunk  memory is available, the fifo asks the
fifo segment for enough chunk memory to ensure that the write can
succeed. To avoid allocating large amounts of small chunks due to small
writes, if possible, the size of the chunks requested is lower capped by
min_alloc.

When dequeuing data, all the chunks that have been completely drained,
i.e., head moved beyond the chunks’ end bytes, are unlinked from the
fifo and returned to the fifo segment. The one exception to this is the
last chunk which is never unlinked.

Change-Id: I98c1dbd9135fb79650365c7e40c29238b96cd4ee
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosvm: refactor fifo chunk tracking 74/23974/34
Florin Coras [Thu, 12 Dec 2019 20:09:29 +0000 (12:09 -0800)]
svm: refactor fifo chunk tracking

Avoid tracking with rbtrees all of the chunks associated to a fifo.
Instead, only track chunks when doing out-of-order operations (peek or
ooo enqueue).

Type: refactor

Change-Id: I9f8bd266211746637d98e6a12ffc4b2d6346950a
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agofeature: provide a u16 version of vnet_feature_next 85/25385/2
Neale Ranns [Mon, 24 Feb 2020 12:54:31 +0000 (12:54 +0000)]
feature: provide a u16 version of vnet_feature_next

Type: improvement

when using vlib_buffer_enqueue_to_next the 'nexts' parameter is an array
of u16, but vnet_feautre_next takes a u32. this is a simple wrapper to
address the impedence mismatch.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I0fa86629e979e313344eb68442dc35a7b9537a8f

4 years agotcp: handle cleanups without timers 66/25366/8
Florin Coras [Sat, 22 Feb 2020 02:27:21 +0000 (02:27 +0000)]
tcp: handle cleanups without timers

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ida896e9fbe83b4c76578b089bb3fd2bef5e07fd2