vpp.git
4 years agotap: revert clean-up when linux will delete the tap interface 34/21834/2
Mohsin Kazmi [Thu, 5 Sep 2019 18:17:30 +0000 (20:17 +0200)]
tap: revert clean-up when linux will delete the tap interface

Type: fix
Ticket: VPP-1766

revert e4ac48e792f4eebfce296cfde844ee73b1abd62f

Change-Id: I03feea4008a47859d570ad8d1d08ff3f30d139ef
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agocrypto: add '-maes' compile switch 23/21823/2
Benoît Ganne [Fri, 9 Aug 2019 12:07:23 +0000 (14:07 +0200)]
crypto: add '-maes' compile switch

AES intrinsics use builtins available only with the -maes and GCC 9 just
started to enforce it.

Type: fix

Change-Id: Ia6825ea3eae7191a4bfee47f9fa93fad16ccf76c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 561be280feb6a10834bf50e0813cc0ad3c635067)

4 years agogbp: add unknown remote EP redirect unit test 15/21815/2
Benoît Ganne [Wed, 31 Jul 2019 12:15:57 +0000 (14:15 +0200)]
gbp: add unknown remote EP redirect unit test

Type: test

Change-Id: I1dfbeef08a4f112551450682fc4040820251485b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agogbp: add remote EP redirect to remote SEP unit test 14/21814/1
Benoît Ganne [Fri, 2 Aug 2019 14:36:35 +0000 (16:36 +0200)]
gbp: add remote EP redirect to remote SEP unit test

Type: test

Change-Id: I4dd685f9acd4d467e0967e6fdd428558ffc8b209
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoquic: handle session migration notifications 91/21791/1
Aloys Augustin [Thu, 1 Aug 2019 13:22:07 +0000 (15:22 +0200)]
quic: handle session migration notifications

Rely on the migrate callback to move quic connections to follow the
underlying udp connection placement.

Change-Id: Ia1cf3a16187bbe48f5afb3d1f444427f288ff79c
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit 243e1933bbecce0a251a5ff71c12dced9e30823f)

4 years agoethernet: fix dmac check avx2 loop condition 67/21767/1
Matthew Smith [Tue, 3 Sep 2019 21:45:33 +0000 (16:45 -0500)]
ethernet: fix dmac check avx2 loop condition

In eth_input_process_frame(), a loop which checks the destination
MAC address of received packets had a different condition for avx2
than it did for the non-avx2 version of the loop. It could result
in one unnecessary execution of the loop body after all packets
had been processed.

Type: fix
Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0

Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit a6d4e3135b70db1b1df3f8852e1e229d13c24e72)

4 years agovppinfra: add bihash_init2 22/21722/2
Dave Barach [Tue, 3 Sep 2019 14:57:19 +0000 (10:57 -0400)]
vppinfra: add bihash_init2

Add controls to list / not list a specific bihash in clib_all_bihashes,
to immediately initialize a bihash.

clib_bihash_init2 is now the primary API. It takes a typical args_t
structure. clib_bihash_init becomes a compatibility widget. It
fabricates an args_t and calls init2...

Type: refactor
Ticket: VPP-1758

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib3e1304884997cf7025af20bdc67a7dda290f15b
(cherry picked from commit bdf9b97774f02458ede6b7c7ae2d5728bddba000)

4 years agotap: interface rx counter not increment correct 28/21728/2
Steven Luong [Fri, 30 Aug 2019 17:49:44 +0000 (10:49 -0700)]
tap: interface rx counter not increment correct

vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using
hw_if_index may work as long as there is no subinterface created to cause
hw_if_index and sw_if_index to differ.

Type: fix
Ticket: VPP-1759

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

4 years agovmxnet3: interface rx counter not increment correctly 30/21730/1
Steven Luong [Fri, 30 Aug 2019 18:22:13 +0000 (11:22 -0700)]
vmxnet3: interface rx counter not increment correctly

vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using
hw_if_index may work as long as there is no subinterface created to cause
hw_if_index and sw_if_index to differ.

Type: fix
Ticket: VPP-1760

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

4 years agonat: handoff traffic matching for dynamic NAT 65/21665/2
Filip Varga [Mon, 12 Aug 2019 12:24:39 +0000 (14:24 +0200)]
nat: handoff traffic matching for dynamic NAT

Type: feature

Change-Id: I5c5af6f9acb340cc674323305104b8ce23e6d21d
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 22bb417e91c7bdf639b24b5edd321028f56ea04a)

4 years agoacl: perform a sanity check of ACL rules before creating ACL 40/21640/2
Andrew Yourtchenko [Mon, 26 Aug 2019 12:25:42 +0000 (12:25 +0000)]
acl: perform a sanity check of ACL rules before creating ACL

Adding acl with incorrect arguments like 1.1.1.1/24 (instead of 1.1.1.0/24)
don't cause a disaster, but doesn't match either, as some might expect.

Add an explicit sanity check which returns an error.

Type: fix

Change-Id: Id1601f4b9c9887d3e7e70aac419d1f1de0c0e012
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoip: ip6_preflen_to_mask incorrect result for prefix len > 64 42/21642/2
Andrew Yourtchenko [Mon, 26 Aug 2019 12:58:48 +0000 (12:58 +0000)]
ip: ip6_preflen_to_mask incorrect result for prefix len > 64

The as_u64[0] in the result was not correctly filled in for
longer prefix lengths.

Type: fix
Fixes: 1c7104514c

Change-Id: I871772c618475396d1c1c4c699ff77e35097f07e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 59ac9c23c47962fbbd935e7075ff7ee89e955847)

4 years agogso: fix segmentation when gso_size greater than vlib buffer size 41/21541/2
Mohsin Kazmi [Thu, 22 Aug 2019 16:40:28 +0000 (18:40 +0200)]
gso: fix segmentation when gso_size greater than vlib buffer size

Type: fix
Ticket: VPP-1751

Change-Id: I5ffb078492adc97374290de404f2ec0102b75184
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 3f1964d2d2847c5307694fe8daea0a7eef1e2733)

4 years agodpdk: enable checksum offload for Intel SRIOV NIC drivers 39/21639/1
John Lo [Thu, 29 Aug 2019 19:40:26 +0000 (15:40 -0400)]
dpdk: enable checksum offload for Intel SRIOV NIC drivers

Type: fix

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

4 years agoavf: properly set irq queue masks 39/21539/1
Damjan Marion [Thu, 22 Aug 2019 11:36:15 +0000 (13:36 +0200)]
avf: properly set irq queue masks

Type: fix
Fixes: ae91180

Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 2ca9a84bd00f2aee642d0147c1b99d4be5725a70)

4 years agotests: move plugin tests to src/plugins/*/test 93/21493/1
Dave Wallace [Thu, 22 Aug 2019 00:32:29 +0000 (00:32 +0000)]
tests: move plugin tests to src/plugins/*/test

- Relocate plugin tests for 'make test' into
  src/plugins/*/test so that plugin test cases
  are co-located with the plugin source code.

Type: refactor
Ticket: VPP-1754

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I503e6a43528e14981799b735fa65674155713f67
(cherry picked from commit a43c93f8554ad7418e31be3791b3fb71232f60ac)

4 years agodns: cherry-pick 21444, 21468 from master 87/21487/1
Dave Barach [Fri, 23 Aug 2019 14:53:01 +0000 (10:53 -0400)]
dns: cherry-pick 21444, 21468 from master

Type: refactor
Ticket: VPP-1752

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

4 years agomisc: 19.08 new features 20/21420/2 v19.08
Andrew Yourtchenko [Tue, 20 Aug 2019 16:31:34 +0000 (16:31 +0000)]
misc: 19.08 new features

The full RELEASE.md diff is b610f2022c9f4e10a922e7b57c80ec77cd45d021

Change-Id: Ide6d85d41bdc836a03390a50ab94f6ebbaae0b28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agodevices: skip checksum calculation if guest supports checksum offload 24/21424/1
Steven Luong [Wed, 7 Aug 2019 04:51:34 +0000 (21:51 -0700)]
devices: skip checksum calculation if guest supports checksum offload

Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface
to skip checksum calculation if guest supports checksum offload.

Type: fix
Ticket: VPP-1750

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

4 years agotcp: default to debug disabled 16/21416/2
Florin Coras [Tue, 20 Aug 2019 14:14:00 +0000 (07:14 -0700)]
tcp: default to debug disabled

Type:fix
Ticket:VPP-1737

Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agodns: handle multiple replies for single requests 10/21410/2
Dave Barach [Mon, 19 Aug 2019 22:15:51 +0000 (18:15 -0400)]
dns: handle multiple replies for single requests

The world is a mess. A single DNS request may yield multiple, subtly
different responses; all with the same DNS protocol-level ID.

Last response wins in terms of what ends up in the cache.

First response wins in terms of the response sent to the client. Hard
to do otherwise since we have no clue that more than one answer will
be forthcoming.

Type: fix
Ticket: VPP-1749
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef
(cherry picked from commit e8d2dcb6a619f0884ece2284a286f21b3aa77e5a)

4 years agomisc: VPP 19.08 Release Notes 66/21366/6
Andrew Yourtchenko [Sat, 17 Aug 2019 14:57:13 +0000 (14:57 +0000)]
misc: VPP 19.08 Release Notes

Change-Id: I81c7ad50c66b4b8d690e87aad1f3c16af065fc85
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agodhcp: resolver process node index in main_t 40/21340/2
Dave Barach [Thu, 15 Aug 2019 19:14:14 +0000 (15:14 -0400)]
dhcp: resolver process node index in main_t

Remove the (unused) node_registration_t, don't try to use it to signal
resolution events.

Type: fix
Ticket: VPP-1746

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ice975e32152892ac4100b9e758412d48a43f09f1
(cherry picked from commit 018c14b7dbc5a910693f150045bfa803c4ae4eec)

4 years agogso: fix l3 and l4 header offset in case of tagged interface 69/21369/2
Mohsin Kazmi [Mon, 29 Jul 2019 09:39:26 +0000 (11:39 +0200)]
gso: fix l3 and l4 header offset in case of tagged interface

previously, PG and virtio interfaces calculate wrong l3 and l4
header offset. This patch fixes this issue.

Type: fix
Ticket: VPP-1739

Change-Id: I5ba978e464babeb65e0711e1027320d46b3b9932
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 14bea1bb6505c0134dd5d2a18bcc436ce72cd149)

4 years agogso: fix the segmentation to use current_data offset 68/21368/1
Mohsin Kazmi [Tue, 13 Aug 2019 16:23:26 +0000 (18:23 +0200)]
gso: fix the segmentation to use current_data offset

Type: fix
Ticket: VPP-1740

Change-Id: If3e34b5b8260e4c50af338895066c2c96f4603af
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 0a5734372d7176146126f83f51b0b9062f90fe94)

4 years agogso: remove the ip checksum flag in case of ipv6 59/21359/2
Mohsin Kazmi [Wed, 14 Aug 2019 14:23:17 +0000 (16:23 +0200)]
gso: remove the ip checksum flag in case of ipv6

Type: fix
Ticket: VPP-1727

Change-Id: Icfee35c5ab5e1c65079d1ca7bb514162319113e5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 7dfcf7f1f504f5e8283c54a428805cc3a4aa8da9)

4 years agotcp: fix cc algo name parsing 60/21360/1
Florin Coras [Fri, 16 Aug 2019 02:55:03 +0000 (19:55 -0700)]
tcp: fix cc algo name parsing

Type: fix

The initial config parser passed a pointer to the field algo id field in
tcp main. Because the field is a u8 and it was interpreted as a uword,
it ended up overwrting other tcp configuration fields.

Change-Id: Ie9020051c8fca40e14cf42a9888daa87360e5038
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d25d364d2bc146d3e17ab7c4d558bcb0ce138b89)

4 years agovlib: copy trace_handle in vlib_buffer_copy/clone() functions 39/21339/1
John Lo [Tue, 13 Aug 2019 22:18:21 +0000 (18:18 -0400)]
vlib: copy trace_handle in vlib_buffer_copy/clone() functions

Since vlib_buffer_copy() and vlib_buffer_clone() both preserve
VLIB_BUFFER_IS_TRACED bit in flags field, it should also copy
trace_handle which would add minimal overhead. Thus, callers of
these functions do not have to call vlib_buffer_copy_trace_flags()
to copy trace_handle.

Type: refactor
Ticket: VPP-1745

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: Iff6a3f81660dd62b36a2966033eb380305340310
(cherry picked from commit 6631780422787166550b9871c46a94c160416324)
Signed-off-by: John Lo <loj@cisco.com>
4 years agoacl: fix stats-segment counters validation on acl update 29/21329/3
Andrew Yourtchenko [Thu, 15 Aug 2019 12:26:17 +0000 (12:26 +0000)]
acl: fix stats-segment counters validation on acl update

The stats-segment validation/clear logic for acl counters was wrong,
fix it. Also add the code to the unittests to cover that case,
add a vat command to enable/disable counters, clean up
the unnecessary endian conversion and remove the stray clib_warning()

Change-Id: I421297a92e4aeb885c468c72a97cec25981df615
Type: fix
Ticket: VPP-1744
Fixes: f995c7122ba0d024b17bc3232e8edd18d5e25088
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agotcp: extend protocol configuration 10/21310/2 v19.08-rc2
Florin Coras [Mon, 12 Aug 2019 21:17:47 +0000 (14:17 -0700)]
tcp: extend protocol configuration

Type: feature
Ticket: VPP-1736

Expose more configuration parameters and refactor some of the existing
ones.

Change-Id: If44c31ff77ce3d7e8da67d39a4ff61346bdf5ccc
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 9094b5c319d3f072d3c248fe7c876e4048c13ac2)

4 years agosvm: fix svmtool and svmdbtool segment fault. 82/21282/2
Guanghua Zhang [Mon, 12 Aug 2019 01:04:35 +0000 (09:04 +0800)]
svm: fix svmtool and svmdbtool segment fault.

Type: fix
Ticket: VPP-1741

Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com>
Change-Id: Ifd3abaa5ec912378dbc7b73c4863aad26777dd7e
(cherry picked from commit 60f16c22b44625d517830b4266a225d3abaccefc)

4 years agogbp: do not scan gbp bihash if not instantiated 90/21290/1
Benoît Ganne [Tue, 6 Aug 2019 11:47:21 +0000 (13:47 +0200)]
gbp: do not scan gbp bihash if not instantiated

Type: fix
Fixes: 32dcd3b2f227dec638c39ade0c58d6741d83ec30

Change-Id: I42550fcc5b3fa486a05770d3e220d7a86315628e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: fix enqueue notification on 32bit systems 81/21281/1
Florin Coras [Tue, 13 Aug 2019 15:35:39 +0000 (08:35 -0700)]
session: fix enqueue notification on 32bit systems

Type: fix
Ticket: VPP-1736

Change-Id: I7b5566525fc30fe0d3cc8cd991960f6ed2f1fc27
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5d8a806144fbf46c0575ef24ae081724dfbdbe75)

4 years agopapi: Revert vpp-api-python to py2, add py3 pkg 48/21248/3
Ian Wells [Sat, 10 Aug 2019 00:27:19 +0000 (17:27 -0700)]
papi: Revert vpp-api-python to py2, add py3 pkg

A previous commit, ca3d38ae18c21ce37212f0d5d5f4a1702429e70c, converts
the vpp-api-python package from a python2 library to a python3 one.
This changes the behaviour of the package and breaks anything that
uses it as a dependency.

This change reverts the package behaviour to a python2 package, and
additionally adds a *separate* python3 package for correct python3
behaviour.

Type: fix
Fixes: VPP-1738
Signed-Off-By: Ian Wells <iawells@cisco.com>
Change-Id: I54eb45156eb6e00fc4cd5b48e7a0aa17fd2f43f7
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 13cef0cc2cba4cff22bb5a860a8709cb3cfd35b2)

4 years agofib: add adj_midchain.h to the list of files to install in the include path 27/21227/4
Alberto Compagno [Mon, 12 Aug 2019 09:43:19 +0000 (11:43 +0200)]
fib: add adj_midchain.h to the list of files to install in the include path

Type: fix
Ticket: VPP-1735

Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I7063516a60bb211ad91ef04041b2751ca3f6598e

4 years agohttp_static: manual cherry-pick 21231,21246 47/21247/2
Dave Barach [Mon, 12 Aug 2019 17:49:46 +0000 (13:49 -0400)]
http_static: manual cherry-pick 21231,21246

Type: fix
Ticket: VPP-1736

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

4 years agotcp: handle fin+rst+syn in closing state 44/21244/2
Florin Coras [Mon, 12 Aug 2019 02:49:05 +0000 (19:49 -0700)]
tcp: handle fin+rst+syn in closing state

Type: fix
Ticket: VPP-1736

Change-Id: I32d4d4a5de04e89087f4ab4a5c425eda572932a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agohttp_static: tls support 32/21232/3
Dave Barach [Tue, 6 Aug 2019 21:38:13 +0000 (17:38 -0400)]
http_static: tls support

Type: refactor
Ticket: VPP-1736

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8
(cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)

4 years agoapi: vppapitrace JSON/API trace converter 03/21203/3
Ole Troan [Tue, 30 Jul 2019 13:38:13 +0000 (15:38 +0200)]
api: vppapitrace JSON/API trace converter

  Usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ...

optional arguments:
  -h, --help        show this help message and exit
  --debug           enable debug mode
  --apidir APIDIR   Location of JSON API definitions

subcommands:
  valid subcommands

  {convert,replay}  additional help
    convert         Convert API trace to JSON or Python and back
    replay          Replay messages to running VPP instance

To convert an API trace file to JSON:
vppapitrace convert /tmp/api.trace trace.json

To convert an (edited) JSON file back to API trace for replay:
vppapitrace convert trace.json api-edited.trace

To generate a Python file that can be replayed:
vppapitrace convert /tmp/api.trace trace.py
vppapitrace convert trace.json trace.py

Replay it to a running VPP instance:
vppapitrace replay --socket /tmp/api.trace

In VPP that file can be replayed with:
vpp# api trace replay api-edited.trace

This patch also modifies the API binary trace format, to include the
message id to message name table.

Ticket: VPP-1733
Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit edfe2c0079a756f5fb1108037c39450e3521c8bd)
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agovlib: fix vlib_buffer_copy to preserve buffer flags bit 10/21210/1
John Lo [Wed, 7 Aug 2019 23:30:29 +0000 (19:30 -0400)]
vlib: fix vlib_buffer_copy to preserve buffer flags bit

Make vlib_buffer_copy() preserve buffer flags bit the same way as
that of vlib_buffer_clone() so both are consistent.

Type: fix

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

4 years agotls: mark as no lookup transport 00/21200/2
Florin Coras [Fri, 9 Aug 2019 00:38:26 +0000 (17:38 -0700)]
tls: mark as no lookup transport

Type:fix

Also fix transport close while handshake is ongoing.

Change-Id: I004c56d2297d0847c2cb77202f8fba3edaacad29
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d09236d17d86a5d50166b2017f8f30a560c6e1b8)

4 years agoudp: fix rx event generation 02/21202/2
Florin Coras [Wed, 7 Aug 2019 01:28:49 +0000 (18:28 -0700)]
udp: fix rx event generation

When session is owned by another thread, avoid postponing the generation
of the rx event.

Type:fix

Change-Id: Ie6afc8116ce40e83d8aae0432b48e19b31287d8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 9cbf6818b37275199b6c0ebef0ef3d8ecaac0a3b)

4 years agosession: allow closed transports to send 99/21199/2
Florin Coras [Thu, 8 Aug 2019 02:12:38 +0000 (19:12 -0700)]
session: allow closed transports to send

Type:fix

Transports like tcp may notify session layer of a close but they may
defer the connection's deletion (e.g., tcp time-wait). During that time,
transports may still want to send packets. So, unless the session has no
transport (transport-deleted state), allow the transport to send.

Change-Id: I3ae335c7b951ff64be8529a5e3f3ad790feddc84
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit a678974cc52ac61dd6094c3f6649f9e3202be1cb)

4 years agotls: handle transport reset 01/21201/1
Florin Coras [Thu, 8 Aug 2019 04:39:27 +0000 (21:39 -0700)]
tls: handle transport reset

Type:fix

Change-Id: I5994fb53dc4b9fd58920b3d67472c38b41db27c2
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f03c49413f270386d46a82dd9a3bce819cf81250)

4 years agosvm: fix fifo max writeable chunk computation 60/21160/2
Florin Coras [Thu, 8 Aug 2019 19:57:48 +0000 (12:57 -0700)]
svm: fix fifo max writeable chunk computation

Type:fix

Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit fcd26a039409e2697a6797e74b0c45544503e853)

4 years agotls: fix close with data 59/21159/2
Florin Coras [Wed, 7 Aug 2019 18:14:56 +0000 (11:14 -0700)]
tls: fix close with data

Type:fix

Also changes the way the ctx is freed. TLS now waits for tcp delete
notification before freeing the ctx.

Change-Id: I2f606a9ce7b3755ae9d11d6fe714fe11b65dcb98
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef2b3357b4b2a682ef81ffa2c71cec14f83101d6)

4 years agotcp: fix zero rwnd sent check 58/21158/2
Florin Coras [Thu, 8 Aug 2019 16:44:47 +0000 (09:44 -0700)]
tcp: fix zero rwnd sent check

Type:fix

Change-Id: I1e6f2cb28c1bf544cc3d060b11c8935f9edb0eed
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d1ba3d257788f1a65016a50a53d85f2b905874bb)

4 years agotcp: cleanup timers 31/21131/2
Florin Coras [Fri, 2 Aug 2019 22:17:21 +0000 (15:17 -0700)]
tcp: cleanup timers

Type:refactor

Change-Id: I37dbc8b55827d66c2578d6ab8b86ed7e18198aa6
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoudp: fix connections move 30/21130/1
Aloys Augustin [Tue, 6 Aug 2019 14:09:01 +0000 (16:09 +0200)]
udp: fix connections move

Without this the use of uc0 is racy between the current thread and the
thread that owns it and will delete it.

This also ensures we don't trigger a read event on the session before
moving it to the right thread and notifying the application.

Type: fix
Change-Id: Icb1ca3ee5805ea3c0d2d424d4b23511465deb3b6
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit b3392334942ed5459edfa7f11e098f4eab3aa29a)

4 years agodocs: Initial changes for stable/1908 branch 24/21124/1 v19.08-rc1
Andrew Yourtchenko [Wed, 7 Aug 2019 17:30:04 +0000 (17:30 +0000)]
docs: Initial changes for stable/1908 branch

This patch adds an entry for the defaultbranch
in .gitreview

Change-Id: Icb772912db57db055aec94d3a6a3cba21ba00876
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agordma: add missing symbols 89/21089/3
Benoît Ganne [Tue, 6 Aug 2019 16:14:12 +0000 (18:14 +0200)]
rdma: add missing symbols

rdma-core-25.0 move some symbol to another library, make sure we link
to it.

Type: fix
Fixes: ec757593859bd8c16839ea8a81a2ef4eb8b29539

Change-Id: I6b8a56ea5fc7787d3de0982015ed47b767557c06
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agointerface: fix checksum flags 92/21092/2
Florin Coras [Tue, 6 Aug 2019 20:48:50 +0000 (13:48 -0700)]
interface: fix checksum flags

Type:fix
Fixes:4208a4c

Change-Id: I7077788cd14f539b06ead5dc65d8411940438bae
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agogbp: add l3out redirect to remote SEP unit test 69/20969/5
Benoît Ganne [Wed, 31 Jul 2019 12:29:00 +0000 (14:29 +0200)]
gbp: add l3out redirect to remote SEP unit test

Type: test

Change-Id: I0fafaebbb1f70488e0bc7d21da778d55fe15c3f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agovom: export/install cmake files 31/20931/2
Neale Ranns [Tue, 30 Jul 2019 13:20:39 +0000 (06:20 -0700)]
vom: export/install cmake files

Type: feature

allow other projects to use cmake modules to find VOM

Change-Id: I00e01e9bec3ecf79903cd522d2770bdb70e5399b
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agotests: UT for MPLS 6PE 46/21046/2
Neale Ranns [Sun, 4 Aug 2019 10:30:56 +0000 (03:30 -0700)]
tests: UT for MPLS 6PE

Type: test

Change-Id: I48650473591aa181167cf3a86ed2f5da58a81072
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agofib tests: IP multicast over GRE 45/21045/3
Neale Ranns [Sun, 4 Aug 2019 09:41:57 +0000 (02:41 -0700)]
fib tests: IP multicast over GRE

Type: feature

Change-Id: I1632ff23b1bf6d91aa3406c95ebd6ef0aa595f35
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agogbp: update gbp endpoint cli 82/21082/2
Benoît Ganne [Tue, 6 Aug 2019 11:56:18 +0000 (13:56 +0200)]
gbp: update gbp endpoint cli

Type: feature

Change-Id: I0afc6eb4765029dc28859c9ac2b0578749a38d3d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoudp: fix session migrate when not needed 58/21058/6
Nathan Skrzypczak [Mon, 5 Aug 2019 12:20:54 +0000 (14:20 +0200)]
udp: fix session migrate when not needed

Type: fix

Change-Id: I56f5f5e7e6430552f0346a65b1e5707edc28c1c0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoquic: Add missing session_migrate_callback 63/21063/3
Nathan Skrzypczak [Mon, 5 Aug 2019 15:23:07 +0000 (17:23 +0200)]
quic: Add missing session_migrate_callback

Change-Id: Ibbec53e07852f1b8987696fddbc3bf83f75705ce
Type: fix
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agordma: fix double-free in rdma-tx 62/21062/2
Benoît Ganne [Mon, 5 Aug 2019 15:07:20 +0000 (17:07 +0200)]
rdma: fix double-free in rdma-tx

In case of tx success after multiple retries, the last buffers to be
enqueued will be both enqueued for tx and freed.

Type: fix
Fixes: 211ef2eb24

Change-Id: I57d218cff58b74c1f3d6dc5722624327f0821758
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agodpdk: remove SFP eeprom dump from 'show hardware-interfaces' and 'show hardware-inter... 71/21071/2
Lijian.Zhang [Fri, 2 Aug 2019 02:42:48 +0000 (10:42 +0800)]
dpdk: remove SFP eeprom dump from 'show hardware-interfaces' and 'show hardware-interfaces verbose'

Type: fix

It's time-consuming to execute 'show hardware-interfaces detail' in CSIT script.
'show hardware-interfaces' dumps SFP eeprom, via a software emulated I2C bus.
Currently 'show hardware-interfaces', 'show hardware-interfaces verbose' and
'show hardware-interfaces detail' give exactly the same output,
and they all will dump SFP eeprom.
Will move the SFP eeprom dump to 'show hardware-interfaces detail' only,
and use “show hardware-interfaces verbose” in CSIT script to save time.

Change-Id: I1a6e5a0ca5fce5b4f0b9a6eb4e9dfd76d45b2487
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
4 years agoethernet: change to mark the CFI bit in the L2 header. 85/20985/9
Prashant Maheshwari [Wed, 31 Jul 2019 16:07:33 +0000 (21:37 +0530)]
ethernet: change to mark the CFI bit in the L2 header.

Type: fix
Fixes: 039cbfe2

Signed-off-by: Prashant Maheshwari <pmahesh2@cisco.com>
Change-Id: Idca91c73758824688dd6ce61df994be66753d838

4 years agordma: bump rdma-core to 25.0 67/21067/3
Benoît Ganne [Mon, 5 Aug 2019 15:52:25 +0000 (17:52 +0200)]
rdma: bump rdma-core to 25.0

Type: make

Change-Id: Ie7596e2976917657b089162c44b3b669e3a2d048
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosvm: fix fifo growth on dequeue with drop 68/21068/3
Florin Coras [Mon, 5 Aug 2019 16:39:47 +0000 (09:39 -0700)]
svm: fix fifo growth on dequeue with drop

Type:fix

Change-Id: I39c339abf1b51105ef1bcf3d6f0f4f6ded54f32d
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: cache align transport base class 39/21039/5
Florin Coras [Fri, 2 Aug 2019 19:52:00 +0000 (12:52 -0700)]
session: cache align transport base class

Type:refactor

Also remove tx stats. Expectation is that transports will keep track of
them.

Change-Id: I083b328d87d0ad3688b630ddb5ef97827a4dbc2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovcl: fix bapi disconnect with socket transport 44/21044/3
Florin Coras [Sun, 4 Aug 2019 01:53:48 +0000 (18:53 -0700)]
vcl: fix bapi disconnect with socket transport

Type:fix

Change-Id: I7b69c28118f3d7054a20ca48792dfc403a8e2694
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agodocs: Add more quic plugin documentation 98/20898/3
Nathan Skrzypczak [Mon, 29 Jul 2019 11:51:31 +0000 (13:51 +0200)]
docs: Add more quic plugin documentation

Type: docs

Change-Id: I0209769f73a46ddad7c2625ad0f774ee2eef43dd
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoquic: fix memset 0 picotls depends on 57/21057/3
Nathan Skrzypczak [Mon, 5 Aug 2019 12:07:15 +0000 (14:07 +0200)]
quic: fix memset 0 picotls depends on

Type: fix

Change-Id: Id03cc839662179f8543b0b3f540932e1d87f1cea
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agovxlan: fix VXLANoIP6 checksum offload setup 43/21043/2
John Lo [Sat, 3 Aug 2019 22:25:49 +0000 (18:25 -0400)]
vxlan: fix VXLANoIP6 checksum offload setup

Fix UDP over IP6 checksum offload setup for VXLAN and VXLAN-GBP.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: If110467a68234d8eed941869a2a03735f339dc33

4 years agoip: fix ip6/udp checksum for pkts using buffer chaining 42/21042/1
John Lo [Sat, 3 Aug 2019 18:36:39 +0000 (14:36 -0400)]
ip: fix ip6/udp checksum for pkts using buffer chaining

Fix ip6_tcp_udp_icmp_compute_checksum to work properly for packets
with multiple buffers.
Fix ip4_tcp_udp_compute_checksum to exit upon detecting error.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I673547f4479d72cd60757383343fc562cff10265

4 years agoquic: Improve quic echo connect threading 75/20775/12
Nathan Skrzypczak [Mon, 22 Jul 2019 14:30:40 +0000 (16:30 +0200)]
quic: Improve quic echo connect threading

Type: fix

Change-Id: I64f90139ad70e722f1ecbc4e0c6c1e723ec0f054
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agovlib: fix out of memory issue 63/20563/6
Filip Tehlar [Tue, 9 Jul 2019 13:52:26 +0000 (13:52 +0000)]
vlib: fix out of memory issue

'show node foo' causes infinite loop resulting in out of memory.
This patch fixes the issue by breaking the loop on invalid input.

Ticket: VPP-1538
Type: fix
Fixes: 98afc711c5
Change-Id: Icf2be92e277a7f820d4e08bea9ef22ffbbb116f6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agodevices: add null check after map_guest_mem calls 91/20991/3
Steven Luong [Wed, 31 Jul 2019 23:01:14 +0000 (16:01 -0700)]
devices: add null check after map_guest_mem calls

map_guest_mem may return null. Coverity complains about calls
without checking its return. Simple stuff.

Type: fix

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

4 years agovcl: initialize worker thread index and heap map slot 38/21038/2
Florin Coras [Fri, 2 Aug 2019 17:53:01 +0000 (10:53 -0700)]
vcl: initialize worker thread index and heap map slot

Type: fix

Change-Id: I7e762b43a2a074dc81cb7b0f6446e315e63ecae5
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovppinfra: Expose function setting __os_thread_index 29/21029/3
Nathan Skrzypczak [Thu, 1 Aug 2019 16:14:06 +0000 (18:14 +0200)]
vppinfra: Expose function setting __os_thread_index

Type: feature

This is needed when creating pthreads in client applications,
they need a way to set __os_thread_index per thread
that does not conflict with the binary API thread index.

If __os_thread_index is left to 0 in two client pthreads and
they call vl_msg_api_alloc and vec_resize at the same time
it can fail due to them sharing (and push/poping) the same
clib_per_cpu_mheaps slot.

Change-Id: I85d4248a39b641a4d3ad5a1c1bd6e0db5875fab6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agotcp: add more connection stats 05/20905/13
Florin Coras [Tue, 30 Jul 2019 01:13:25 +0000 (18:13 -0700)]
tcp: add more connection stats

Type:feature

Change-Id: If02884d0f1f26bfe31ec609ea9611cb27b699868
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoethernet: fix ARP feature arc definition 19/21019/3
Dave Barach [Thu, 1 Aug 2019 20:08:13 +0000 (16:08 -0400)]
ethernet: fix ARP feature arc definition

This patch gets rid of an ugly warning during vpp startup:

"vnet_feature_init:143: WARNING: arp arc: last node is arp-disabled,
but expected error-drop!"

Type: fix
Fixes: 1ff56f00ca015e82ef29955986e503913d1c3b86

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

4 years agovmxnet3: don't bypass ethernet_input 21/21021/2
Steven Luong [Fri, 2 Aug 2019 02:04:40 +0000 (19:04 -0700)]
vmxnet3: don't bypass ethernet_input

Queue everything to ethernet_input to not break pcap rx trace.
Fix a minor typo in vmxnet3_api.c

Type: fix

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

4 years agolb: fix usage of lb_main in test 16/21016/3
Florin Coras [Thu, 1 Aug 2019 18:39:34 +0000 (11:39 -0700)]
lb: fix usage of lb_main in test

Type: fix

Change-Id: I9f8a8da31624637c060a9757256589c8f372f192
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoipsec: FIx feature ordering 28/21028/2
Neale Ranns [Fri, 2 Aug 2019 08:17:13 +0000 (01:17 -0700)]
ipsec: FIx feature ordering

Type: fix
Fixes: 1404698df397bc4d3007daea41f52ad75ed4486c

Change-Id: Ibb77d95bb5e862cf5d1cb65843c526fd2e225c62
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovirtio: add the display information in virtio cli 15/20715/5
Chenmin Sun [Thu, 18 Jul 2019 15:19:28 +0000 (23:19 +0800)]
virtio: add the display information in virtio cli

Type: fix

1. Add option '[gso-enabled]' in cli 'create interface virtio'
2. Add gso information in virtio_show()

Change-Id: I4eb58f4421325ef54a6a68c8341b3a6d3d68136a
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
4 years agoquic: fix connection move with multiple workers 10/21010/2
Aloys Augustin [Tue, 30 Jul 2019 13:46:56 +0000 (15:46 +0200)]
quic: fix connection move with multiple workers

Change-Id: Ibd1012c2c1382de442ed294dd9e8a0ec89349fa1
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
4 years agointerface: fix pcap tx/rx trace cli handling 18/21018/2
John Lo [Thu, 1 Aug 2019 19:15:36 +0000 (15:15 -0400)]
interface: fix pcap tx/rx trace cli handling

Provide default packet_to_capture value. Display interface name
correctly for "pcap tx/rx trace status".

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I7064d0dbea236a9aff68bba7fbaf2c4a73b16c6f
Signed-off-by: John Lo <loj@cisco.com>
4 years agosession: session pool migration notification 92/20992/3
Florin Coras [Wed, 31 Jul 2019 23:46:24 +0000 (16:46 -0700)]
session: session pool migration notification

Type: feature

Change-Id: Ia9a5b1a6d85c7f3f2e6db583b33b5b20029a1e88
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovppinfra: fix spinlock and rwlock tests 15/21015/2
Florin Coras [Thu, 1 Aug 2019 17:54:06 +0000 (10:54 -0700)]
vppinfra: fix spinlock and rwlock tests

Type: fix

Change-Id: I67b72b5ad03b972198c27bc0d927867f41b0e20b
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoipsec: Redo the anit-replay check post decrypt 09/21009/2
Neale Ranns [Thu, 1 Aug 2019 11:45:15 +0000 (04:45 -0700)]
ipsec: Redo the anit-replay check post decrypt

Type: fix

Change-Id: I1fa8c5326d6f22cfb8dd40e97d8a22d11a716922
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agodocs: Small fixes and ordering 93/20893/4
Nathan Skrzypczak [Mon, 29 Jul 2019 09:18:05 +0000 (11:18 +0200)]
docs: Small fixes and ordering

* deactivtates the TODOs on doxygen (were empty)
* This move punt.md to readthedocs (should be the new
place for dev doc ?)
* Makes Handoff queue demo plugin a child of dev doc
in doxygen

Type: fix

Change-Id: I1f0476a911b35208212af8dd608bc76160efd22a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agovppinfra: refactor clib_rwlock_t to use single condition variable 63/20863/4
jaszha03 [Mon, 1 Jul 2019 22:08:57 +0000 (17:08 -0500)]
vppinfra: refactor clib_rwlock_t to use single condition variable

Previous implementation of clib_rwlock_t used two spinlocks: one
writer lock, and one to guard the counter for the number of readers.
This implementation uses a single condition variable rw_cnt which
has the following properties:

if a writer has the rwlock, rw_cnt = -1
if the rwlock is free, rw_cnt = 0
otherwise, rw_cnt > 0 and rw_cnt = number of readers
rw_cnt will never be less than -1

Benchmarking:
The results below are the cycle counts from test_rwlock.c, configured so
that for 10000 iterations, 6 reader and 6 writer threads on separate cores
are spawned such that each writer thread increments a global counter
10000 times in each iteration. For Taishan, 4 reader and 4 writer
threads are spawned in each test.

x86 Xeon old rwlock: 12.473e8, 11.655e8, 13.201e8, 11.347e8, 13.182e8
x86 Xeon new rwlock: 5.881e8, 5.796e8, 6.536e8, 5.540e8, 5.890e8
Aarch64 ThX2* old rwlock: 9.263e7, 8.933e7, 9.074e7, 8.979e7, 9.378e7
Aarch64 ThX2* new rwlock: 7.221e7, 8.107e7, 7.515e7, 7.672e7, 7.386e7
A72 old rwlock: 3.268e6, 3.200e6, 3.086e6, 3.176e6, 3.170e6
A72 new rwlock: 1.261e6, 1.288e6, 1.251e6, 1.229e6, 1.234e6

*ThunderX2 used additional gcc options "-march=armv8.1-a+crc+crypto+lse"

Type: refactor

Change-Id: I7c347d3037b36205ab532cbcb52a374c846eb275
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
4 years agovppinfra: remove unused historical code 12/21012/3
Dave Barach [Thu, 1 Aug 2019 13:54:05 +0000 (09:54 -0400)]
vppinfra: remove unused historical code

"timer.[ch]" used a signal handler to deliver timer callbacks. Without
indulging in a set of sigprocmask(...) system calls, it would be
unsafe to use the mechanism.

Rather than wait for another developer to accidentally open this
particular can of worms, best to remove the code. It's nothing more
than an attractive nuisance at this point.

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

4 years agovppinfra: make first bihash add thread-safe 05/21005/5
Dave Barach [Thu, 1 Aug 2019 12:15:01 +0000 (08:15 -0400)]
vppinfra: make first bihash add thread-safe

Type: fix

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

4 years agoquic: Improve quicly_ctx handling & crypto ctx 79/20979/6
Nathan Skrzypczak [Wed, 31 Jul 2019 13:51:04 +0000 (15:51 +0200)]
quic: Improve quicly_ctx handling & crypto ctx

Type: fix

Change-Id: I898de67c017c3a45bed123d81041b32b43f749d0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoethernet: Fix node ordering on ARP feautre ARC 82/20982/3
Neale Ranns [Tue, 30 Jul 2019 13:29:47 +0000 (06:29 -0700)]
ethernet: Fix node ordering on ARP feautre ARC

Type: fix
Fixes: fe2fff37

this improves the tracing for dropped ARP packets

Change-Id: Iefd0391e349fc54f1beebda403b2349534b20c48
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agonat: handoff rewrite & fixes for multi-worker 72/20972/2
Filip Varga [Wed, 31 Jul 2019 12:36:39 +0000 (14:36 +0200)]
nat: handoff rewrite & fixes for multi-worker

Type: fix

Change-Id: Ib9164d8f6c681e8900e645306f3a2dc0ac0e40a8
Signed-off-by: Filip Varga <filipvarga89@gmail.com>
4 years agovppinfra: refactor clib_spinlock_t to use compare and swap 60/20860/5
jaszha03 [Wed, 26 Jun 2019 22:06:59 +0000 (17:06 -0500)]
vppinfra: refactor clib_spinlock_t to use compare and swap

Tested performance of a CAS implementation (using __atomic_compare_exchange)
against a TAS implementation (using __atomic_exchange) using test_spinlock.c
and found some performance improvement.

Generated assembly for CAS and TAS implementations show that TAS always
executes with a load-store dependency, but CAS moves a branch condition
between the load and store so that only a load occurs when the lock is free.

Benchmarking:
The results below are the cycle counts from test_spinlock.c, configured so
that for 10000 iterations, 12 threads on separate cores are spawned, each of
which increments a global counter 10000 times in each iteration. For
A72, 8 threads are spawned in each test.

x86 Xeon TAS: 7.333e8, 7.605e8, 7.535e8, 7.485e8, 7.321e8
x86 Xeon CAS: 5.842e8, 5.433e8, 5.389e8, 5.983e8, 5.552e8
Aarch64 ThX2* TAS: 9.852e7, 10.209e7, 9.190e7, 9.600e7, 9.224e7
Aarch64 ThX2* CAS: 7.640e7, 7.486e7, 7.425e7, 7.269e7, 7.534e7
A72 TAS: 7.289e6, 6.963e6, 7.208e6, 6.976e6, 7.200e6
A72 CAS: 1.695e6, 1.608e6, 1.600e6, 1.634e6, 1.746e6

*ThunderX2 used additional gcc options "-march=armv8.1-a+crc+crypto+lse"

Type: refactor

Change-Id: Ic5cd97991804f6b012707fad1a5d1a6edb96cd3d
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
4 years agotcp: honor snd_wnd in fast rxt 90/20990/2
Florin Coras [Wed, 31 Jul 2019 21:11:05 +0000 (14:11 -0700)]
tcp: honor snd_wnd in fast rxt

Type:fix

Change-Id: I2f4224a53360f533c086ebde6a3056e60431da87
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoqos: Uninitialised variable (coverity) 95/20995/2
Neale Ranns [Thu, 1 Aug 2019 08:04:24 +0000 (01:04 -0700)]
qos: Uninitialised variable (coverity)

Type: fix
Fixes: 83832e7ced8be8b7de394415feaba70c32e3c38d

Change-Id: I63130c442f71d1aef0d389ab00bac8092224bec2
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovppapigen: revert "implement reversible repr's" 97/20997/1
Vratko Polak [Thu, 1 Aug 2019 08:31:49 +0000 (10:31 +0200)]
vppapigen: revert "implement reversible repr's"

The previous change seems to affect all CRCs.

Type: fix
Fixes: b504777e7f1c9728e65b874284b4dfd39359c8a8.

Change-Id: I65e27ce22020e5ebc764b5a51b5fc84992ddb40a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agolb: vip and as dump/detail api's 49/20049/25
Hongjun Ni [Mon, 10 Jun 2019 11:43:48 +0000 (19:43 +0800)]
lb: vip and as dump/detail api's

- lb_vip_dump/lb_vip_details - get all vip.
- lb_as_dump/lb_as_details - get all as list per vip.
- adds api unit test.
- adds vpp_lb to test framework.

Ticket:
Type: feature

Change-Id: I24be50d62c5234f3535cc840603ddd9df7eb3f07
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
4 years agoapi: add prefix matcher typedef 40/20940/7
Paul Vinciguerra [Sat, 27 Jul 2019 14:35:07 +0000 (10:35 -0400)]
api: add prefix matcher typedef

There is a need to be able to specifiy whether a prefix in
a request is to match exactly or if more specific
prefixes are also desired.

Todo: Uncomment defaults, once supported in vppapigen.

Type: feature

Change-Id: I74fdef0e89e3aefda822c7c0a477e22479297a90
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agonat: elog rewrite for multi-worker support 61/20961/3
Filip Varga [Wed, 31 Jul 2019 10:45:48 +0000 (12:45 +0200)]
nat: elog rewrite for multi-worker support

Type: fix

Change-Id: I04f136a04bc022d223e4bcb5c59920bd1f1fd560
Signed-off-by: Filip Varga <filipvarga89@gmail.com>