vpp.git
4 years agoL3 cross connect 58/19758/7
Neale Ranns [Wed, 22 May 2019 13:26:39 +0000 (13:26 +0000)]
L3 cross connect

- all packets input on interface X are load-balanced over the set of
paths provided.

Change-Id: Ic27cb88c4cd5d6d3462570632daff7a43d5a652d
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoIPSEC: some CLI fixes 58/19958/3
Neale Ranns [Tue, 4 Jun 2019 15:37:34 +0000 (15:37 +0000)]
IPSEC: some CLI fixes

Change-Id: I45618347e37440263270baf07b2f82f653f754a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoTests: simple refactor in vpp_pg_interface. 60/19860/5
Paul Vinciguerra [Tue, 28 May 2019 19:40:47 +0000 (15:40 -0400)]
Tests: simple refactor in vpp_pg_interface.

Pull common code into a single method.

Type: refactor

Change-Id: Ic540d23eebbd17f838ed7a1a9dee80815a27847c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoelog: make elog_string() multi-thread safe 14/19914/2
Steven Luong [Fri, 31 May 2019 14:34:39 +0000 (07:34 -0700)]
elog: make elog_string() multi-thread safe

elog is supposed to be thread safe. Yet elog_string() is not. To fulfill
that promise, let's make elog_string() thread safe to avoid surprises.

Change-Id: Iab82faa7cb6719777a66c3ff14775e59a6a68a20
Signed-off-by: Steven Luong <sluong@cisco.com>
4 years agopunt: fix the set_punt API/CLI which was rejecting valid ports 55/19955/2
Neale Ranns [Tue, 4 Jun 2019 13:31:23 +0000 (13:31 +0000)]
punt: fix the set_punt API/CLI which was rejecting valid ports

add a UT for the API

Change-Id: I93fb6ec2c5f74b991bf7f229250a30c0395b8e24
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agofeatures will register udp ports once configured 47/19947/2
Jakub Grajciar [Tue, 4 Jun 2019 11:16:42 +0000 (13:16 +0200)]
features will register udp ports once configured

plugins:
- ipfixcollector

vnet:
- geneve
- vxlan_gpe
- vxlan

Change-Id: I69a8b4017ee6990f2b4874fe3e94c4520bde7101
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoFix: bug prevented IPsec ipv4 SPDs to show correctly 19/19719/5
Guillaume Solignac [Mon, 20 May 2019 13:58:46 +0000 (15:58 +0200)]
Fix: bug prevented IPsec ipv4 SPDs to show correctly

Because of the initialisation of the end of the range, the command show ipsec spd
on an ipv4 SPD didn't work correctly.

Change-Id: I3582382197bb6edef4fb077aac1e927ef4581cbf
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
4 years agosort worker-thread init functions in advance 38/19938/3
Dave Barach [Mon, 3 Jun 2019 23:48:22 +0000 (19:48 -0400)]
sort worker-thread init functions in advance

Otherwise, all N worker threads try to sort the list at the same time:
a good way to have a bad day.

This approach performs *far* better than maintaing order by adding a
spin-lock. By direct measurement w/ elog + g2: 11 threads execute the
per-thread init function list in 22us, vs. 50ms with a CLIB_PAUSE()
enabled spin-lock.

Change-Id: I1745f2a213c0561260139a60114dcb981e0c64e5
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agostats: removing empty object in stats vector 44/19944/2
Ole Troan [Tue, 4 Jun 2019 10:33:32 +0000 (12:33 +0200)]
stats: removing empty object in stats vector
Type: fix
Change-Id: I9b6bdacdb9a0750834de9a93d8c3f7ed827ce3c8
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoPunt: specify packets by IP protocol Type 58/19858/2
Neale Ranns [Tue, 21 May 2019 13:54:54 +0000 (06:54 -0700)]
Punt: specify packets by IP protocol Type

Change-Id: I0c2d6fccd95146e52bb88ca4a6e84554d5d6b2ed
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agomactime: upstream new features 28/19928/2
Dave Barach [Mon, 3 Jun 2019 14:23:30 +0000 (10:23 -0400)]
mactime: upstream new features

Add per mac address data quotas (simple version)

Add mini-ACLs to turf "call home" traffic from a certain species of
security DVR.
Add FEATURE.yaml

Update the API version number

Type: feature
Feature-name: mactime

Change-Id: Ida6945f7791ab43909afa68dcf2f652b20c53afd
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agodpdk: rework extended stats 27/19927/2
Filip Tehlar [Mon, 3 Jun 2019 08:13:21 +0000 (08:13 +0000)]
dpdk: rework extended stats

Change-Id: I421192e1921d4c9c5486a6dcca745582aebf4e3e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agostartup: remove dpdk linking bonding configuration 40/19940/2
Zhiyong Yang [Tue, 4 Jun 2019 02:28:06 +0000 (22:28 -0400)]
startup: remove dpdk linking bonding configuration

As dpdk linking bonding code has been removed by the patch
https://gerrit.fd.io/r/#/c/19867/, corresponding configuration
info should be removed.

Change-Id: I048ae068619c83190252a75284bd5306ce61611e
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agosrp: leverage vlib_buffer_get_current 42/19942/2
Zhiyong Yang [Tue, 4 Jun 2019 02:58:44 +0000 (22:58 -0400)]
srp: leverage vlib_buffer_get_current

Change-Id: I8e4592734cd8343cd95b32ad8617fed4aec3f590
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agovom: Add bridge domain unknown unicast flooding flag 79/19879/4
Mohsin Kazmi [Wed, 29 May 2019 15:16:34 +0000 (11:16 -0400)]
vom: Add bridge domain unknown unicast flooding flag

UU flood can be disabled or enabled using this flag in a bd.

Change-Id: I799be2742b599783eec019b5fd295c3b940eb3e8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agoGBP: add subnet cli command 31/19931/1
Benoît Ganne [Mon, 27 May 2019 16:36:46 +0000 (18:36 +0200)]
GBP: add subnet cli command

Change-Id: I0f631da9d13df2d9c32bad879b2a6034cb847378
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoARP: add feature arc 77/19877/3
Neale Ranns [Wed, 29 May 2019 13:58:43 +0000 (13:58 +0000)]
ARP: add feature arc

- arp-input, registered with the ethernet protocol dispatcher, performs
basic checks and starts the arc
- arp-reply; first feature on the arc replies to requests and learns
from responses (no functional change)
- arp-proxy; checks against the proxy DB

arp-reply and arp-proxy are enabled when the interface is appropriately
configured.

Change-Id: I7d1bbabdb8c8b8187cac75e663daa4a5a7ce382a
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agocrypto_ia32: native AES-GCM implementation 03/19903/4
Damjan Marion [Wed, 22 May 2019 14:30:01 +0000 (16:30 +0200)]
crypto_ia32: native AES-GCM implementation

Change-Id: I006a150577e897731649f21908b4789e2eb485c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovom: Add bridge domain arp unicast forwarding flag 45/19845/3
Mohsin Kazmi [Mon, 27 May 2019 16:36:15 +0000 (18:36 +0200)]
vom: Add bridge domain arp unicast forwarding flag

Change-Id: Iede47e8d9e168125bcd938cca6182c9270dcb5c4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agoIPSec: memcpy of integ key bork 15/19915/1
Neale Ranns [Sun, 2 Jun 2019 06:01:42 +0000 (06:01 +0000)]
IPSec: memcpy of integ key bork

Change-Id: Icd76769d841792eb2d59ffc23c557dcca9ddc580
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoVPP-1692: move NULL pointer check 11/19911/1
Dave Barach [Fri, 31 May 2019 12:41:34 +0000 (08:41 -0400)]
VPP-1692: move NULL pointer check

TBH, this looks like merge damage or some such. Perfectly fine NULL pointer
check, about three lines after it was needed.

Change-Id: I52831062e30533a59fb76b644ee5ae389676d2ae
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agotools: FEATURE.yaml meta-data infrastructure 63/19563/3
Ole Troan [Tue, 14 May 2019 11:24:10 +0000 (13:24 +0200)]
tools: FEATURE.yaml meta-data infrastructure

Add tooling for feature metadata configuration files.
The main tool is in src/scripts/fts.py

make checkfeaturelist to validate against schema.
make featurelist to dump all feature lists to stdout.

Example feature definition:

name: IP in IP tunnelling
maintainer: Ole Troan <ot@cisco.com>
features:
  - IPv4/IPv6 over IPv4/IPv6 encapsulation:
    - Fragmentation and Reassembly
    - Configurable MTU
    - Inner to outer Traffic Class / TOS copy
    - Configurable Traffic Class / TOS
  - ICMPv4 / ICMPv6 proxying
  - 6RD (RFC5969):
    - Border Relay

description: "Implements IP{v4,v6} over IP{v4,v6} tunnelling as
              described in RFC2473. This module also implement the border relay of
      6RD (RFC5969)."

state: production
properties: [API, CLI, STATS, MULTITHREAD]
missing:
  - Tunnel PMTUD
  - Tracking of FIB state for tunnel state
  - IPv6 extension headers (Tunnel encapsulation limit option)

JSON schema is embedded in fts.py

Example markdown: https://github.com/otroan/scratch/blob/master/features.md

Change-Id: I903b4ee6b316a9378c259e86dc937092e5d4b7da
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoVPP-1640 - Missing rules in vpp-selinux-policy 46/19646/2
Billy McFall [Thu, 16 May 2019 13:13:50 +0000 (09:13 -0400)]
VPP-1640 - Missing rules in vpp-selinux-policy
SELinux exceptions occurring for host interfaces and with the
vmxnet3 driver.

Change-Id: Ia22bd82572acfa07ae287a755830abe1413f9939
Signed-off-by: Billy McFall <bmcfall@redhat.com>
4 years agoVPP-1679 - SElinux rules are not set accordingly 59/19659/2
Billy McFall [Thu, 16 May 2019 19:58:58 +0000 (15:58 -0400)]
VPP-1679 - SElinux rules are not set accordingly
Updates to the VPP SELinux policy to support the MLX5 DPDK driver.

Change-Id: I089ede88a5e9c4152178f8cf9be5ee14d8a9130f
Signed-off-by: Billy McFall <bmcfall@redhat.com>
4 years agoVPP-1640 - Missing rules in vpp-selinux-policy 60/19660/2
Billy McFall [Thu, 16 May 2019 20:54:44 +0000 (16:54 -0400)]
VPP-1640 - Missing rules in vpp-selinux-policy
Add additional section to the SELinux documentation to describe how to
collect debug information when SELinux issues are encountered. This is
purely a documentation change.

Note: Merged seperate from SELinux Policy change in case policy change
needs to be cherry-picked to older releases.

Change-Id: I7ba3d3c7d84171b503d956eb01e13a680b4d53fc
Signed-off-by: Billy McFall <bmcfall@redhat.com>
4 years agocrypo_ia32: don't optimize debug builds 02/19902/2
Damjan Marion [Thu, 30 May 2019 14:37:01 +0000 (16:37 +0200)]
crypo_ia32: don't optimize debug builds

Type: fix
Fixes: d5023a72
Change-Id: I17cf7887d1274cf3ca9301ec87b8c8f539359456
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoUpdate vnet hardware flags if link state changes 06/19906/2
Dave Barach [Thu, 30 May 2019 23:48:12 +0000 (19:48 -0400)]
Update vnet hardware flags if link state changes

Explains a variety of hard-to-diagnose problems with certain Atom and
Denverton NIC types.

I finally tripped over a highly-repeatable failure: home gateway
use-case bitten by refusal to negotiate a DHCP lease for the trunk
port.

The dhcp client won't send pkts unless VNET_HW_INTERFACE_FLAG_LINK_UP
is set on the tx hw interface:

  /* Interface(s) down? */
  if ((hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) == 0)
    return;

Change-Id: I17ef2ba7b39078555fa27d2d874a60c67e1530ee
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agobonding: add support for numa awareness 03/19603/5
Zhiyong Yang [Wed, 15 May 2019 08:25:20 +0000 (04:25 -0400)]
bonding: add support for numa awareness

This patch enables bonding numa awareness on multi-socket
server working in active-backeup mode.
The VPP adds capability for automatically preferring slave
with local numa node in order to reduces the load on the
QPI-bus and improve system overall performance in multi-socket
use cases. Users doesn't need to add any extra operation as
usual.

Change-Id: Iec267375fc399a9a0c0a7dca649fadb994d36671
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agonat44: fix CLI doc error 01/19801/2
jackiechen1985 [Fri, 24 May 2019 03:59:49 +0000 (11:59 +0800)]
nat44: fix CLI doc error

Change-Id: Iac6bd29389839c9eb8c1ff2105b4da69b6e1ce3e
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
4 years agoIP load-balance; perf improvement using the usual reciepe 42/19842/4
Neale Ranns [Mon, 27 May 2019 12:21:32 +0000 (08:21 -0400)]
IP load-balance; perf improvement using the usual reciepe

before and after:
ip4-load-balance 1.54e1
ip4-load-balance 1.36e1

p.s. Quad loops were not beneficial

Change-Id: I7bc01fc26288f0490af74db2b1b7993526c3d982
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoFIB: correctly report IPv6 FIB Unicast and Multicast memory usage (VPP-1578)" 55/19855/4
Neale Ranns [Tue, 28 May 2019 11:09:40 +0000 (11:09 +0000)]
FIB: correctly report IPv6 FIB Unicast and Multicast memory usage (VPP-1578)"

and document scaling

Change-Id: I65d8999e65616d77e525963c770d91e9b0d5e593
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years ago19.04.1 Release Notes 90/19890/2
Dave Wallace [Wed, 29 May 2019 21:34:59 +0000 (17:34 -0400)]
19.04.1 Release Notes

Change-Id: I2a69b29b9ecea2bfdf1832c184c7e63058a33b94
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agolisp-cp: start lisp retry service on demand 97/19897/3
Florin Coras [Thu, 30 May 2019 09:01:55 +0000 (02:01 -0700)]
lisp-cp: start lisp retry service on demand

Change-Id: I07681d94301e19389dda0caacd5a93b21d9aff1f
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosample-plugin: refactor .api to use explicit types 71/19871/5
Ole Troan [Wed, 29 May 2019 10:34:20 +0000 (12:34 +0200)]
sample-plugin: refactor .api to use explicit types

Use explicit types in .api definition.

Change-Id: Ib4c3c4ab6282a6d443e3d19af029dc091b462dac
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoipip: refactor ipip.api with explicit types 70/19870/4
Ole Troan [Wed, 29 May 2019 10:30:05 +0000 (12:30 +0200)]
ipip: refactor ipip.api with explicit types

Use explicit types vl_api_address/prefix in ipip.api.

Change-Id: Ib3133cebdbe4437742924efd49cde4009c4cc31b
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agodpdk: remove bonding code 67/19867/4
Damjan Marion [Wed, 29 May 2019 08:00:46 +0000 (10:00 +0200)]
dpdk: remove bonding code

We have native implementation and we should not maintain both....

Change-Id: Ic09ebffda52cdc733b3cfeff06690e0d3cc08084
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agodpdk: bump to 19.05 66/19866/5
Damjan Marion [Wed, 29 May 2019 07:48:44 +0000 (09:48 +0200)]
dpdk: bump to 19.05

Change-Id: I738ff20a1ebb1cc70fb6ddb40791b6747cada372
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoNAT: create bypass in correct thread if workers>1 49/19649/4
Alexander Chernavin [Thu, 16 May 2019 14:51:22 +0000 (10:51 -0400)]
NAT: create bypass in correct thread if workers>1

Change-Id: I70817579a09a7026f5fa7c8e71babded891ea285
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agoStart the dns resolver process on demand 84/19884/2
Dave Barach [Wed, 29 May 2019 17:46:35 +0000 (13:46 -0400)]
Start the dns resolver process on demand

Change-Id: Iab27b405fb3ca7aed94ae974d57c286c41298c3a
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoIPsec: modify post-decrypt buf len calculation 89/19889/2
Matthew G Smith [Wed, 22 May 2019 18:34:08 +0000 (13:34 -0500)]
IPsec: modify post-decrypt buf len calculation

For tunnel mode, after decryption the buffer length was being adjusted
by adding (iv length + esp header size). Subtract it instead.

Required for BFD to work on an IPsec tunnel interface. BFD verifies
that the amount of received data is the expected size. It drops the
packet if the buffer metadata says that the packet buffer contains
more data than the packet headers say it should.

Change-Id: I3146d5c3cbf1cceccc9989eefbc9a59e604e9975
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agompls: leverage vlib_buffer_advance 92/19892/3
Zhiyong Yang [Thu, 30 May 2019 02:38:19 +0000 (22:38 -0400)]
mpls: leverage vlib_buffer_advance

Change-Id: I363a4444f4d296f04371acd65c702b1a1ce70913
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoosi_input: leverage vlib_buffer_get_current 94/19894/1
Zhiyong Yang [Thu, 30 May 2019 06:22:49 +0000 (02:22 -0400)]
osi_input: leverage vlib_buffer_get_current

Change-Id: Ib9297b712ff7d08bf085fb0b6c9e6ffd83c5fa57
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agogtpu: unit-test check udp ports 77/19777/4
Jakub Grajciar [Thu, 23 May 2019 11:01:41 +0000 (13:01 +0200)]
gtpu: unit-test check udp ports

Change-Id: I3efbbb1aefb43ecdf7016541b97343f9ca41f842
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoipsec: fix perf issue in esp_aad_fill 81/19881/1
Damjan Marion [Wed, 29 May 2019 16:49:25 +0000 (18:49 +0200)]
ipsec: fix perf issue in esp_aad_fill

Type: fix
Fixes: 47feb11
Change-Id: I6b3b97cd361eef19c910c14fd06edb001a4c191b
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoStart the cdp period process on demand 78/19878/2
Dave Barach [Wed, 29 May 2019 14:19:56 +0000 (10:19 -0400)]
Start the cdp period process on demand

Change-Id: I219b270f905dad5939ab38e933712845c314286d
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agovxlan-gbp: prefetch encap header memory area 35/19635/5
Zhiyong Yang [Thu, 16 May 2019 09:24:17 +0000 (05:24 -0400)]
vxlan-gbp: prefetch encap header memory area

This patch helps save 4.1 clocks/pkt from 62.9 to 58.8
clocks/pkt on Skylake.

Change-Id: I749a88a8fa6c78243441a89d6afcd04f106af3da
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoemacs-skeleton: improve generated .api files 76/19876/1
Dave Barach [Wed, 29 May 2019 13:59:51 +0000 (09:59 -0400)]
emacs-skeleton: improve generated .api files

Type cleanups:
  s/u8/bool/ for "enable_disable"
  s/u32/vl_api_interface_index_t/ for "sw_if_index"

Add an API version stamp.
Add a doxygen tag for the binary API.
Add Apache-2 licence text.

Change-Id: I2fa168336efb0f1d9b9b6dec945589cbc5fd5595
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoTests: vpp_pg_interface. Don't rewrite Dot1AD ethertype. 62/19862/2
Paul Vinciguerra [Tue, 28 May 2019 21:33:08 +0000 (17:33 -0400)]
Tests: vpp_pg_interface. Don't rewrite Dot1AD ethertype.

Type: Refactor

Change-Id: I42f65bcc76e4b0fcfbfe051c1c382a940bff1b3a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agomake test: fix packet counter assert 44/19644/9
Klement Sekera [Thu, 16 May 2019 12:34:55 +0000 (14:34 +0200)]
make test: fix packet counter assert

Change-Id: Ic6e6ac0629bbf07f7dad1803a85aabfdccbc2035
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agodpdk: make sure each segment have initalized rte_mbuf 19/19819/3
Damjan Marion [Fri, 24 May 2019 13:34:32 +0000 (15:34 +0200)]
dpdk: make sure each segment have initalized rte_mbuf

Change-Id: I0e28d059143fb7489d27a10c5b4a152d0d7dfb1f
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agomake: git commit template 91/19391/7
Ole Troan [Tue, 7 May 2019 08:32:40 +0000 (10:32 +0200)]
make: git commit template

Add a commit template for tagging of commits
with a type. Later tooling can then process
the commit log and generate reports of new features
etc.

Usage:

The template is automatically added to the current repository
by make install-dep.
(git config commit.template .git_commit_template.txt)

Type: make
Change-Id: I485d61f9852b7390e4f0539d737ab210f7b0723a
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoBreak out the broom for some cleanup work 61/19861/2
Dave Barach [Tue, 28 May 2019 20:31:05 +0000 (16:31 -0400)]
Break out the broom for some cleanup work

Maintain the MAINTAINERS file. Removed src/plugins/*.am listings. Added
a couple of plugins.

Add vlib_process_create (vlib_main_t *vm, char *name,
                         vlib_node_function_t *f, u32 log2_n_stack_bytes);
/** @brief Create a vlib process
 *  @param vm &vlib_global_main
 *  @param f the process node function
 *  @param log2_n_stack_bytes size of the process stack, defaults to 16K
 *  @return newly-create node index
 *  @warning call only on the main thread. Barrier sync required.
 */

This function makes it easy to spin up periodic processes when features
are enabled for the first time. That coding pattern is highly recommended.

Update the emacs-lisp plugin generator to use vlib_process_create,
instead of generating static periodic process nodes.

Change-Id: Icda33e93b9034779d3a3e228cd1110af14b058a5
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agomap: Use vl_api_string macros. 12/19812/15
Paul Vinciguerra [Fri, 24 May 2019 10:36:26 +0000 (06:36 -0400)]
map: Use vl_api_string macros.

* Add optional tag to api call in tests
* Add test for map_domain_dump() for api code coverage.

Type: fix

Change-Id: I2f7784aecdca4bf9e94de3319f959786e3d2c607
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoplugins: http_static. Migrate to use api string type. 98/19698/8
Paul Vinciguerra [Sun, 19 May 2019 02:09:28 +0000 (22:09 -0400)]
plugins: http_static. Migrate to use api string type.

This is not my core competency.
Reviews/feedback/suggestions welcomed. ;)

Tested with:
  rv = self.vapi.http_static_enable(
             fifo_size = 1,
             cache_size_limit = 1000000,
             prealloc_fifos = 0,
             private_segment_size = 0,
             uri="tcp://0.0.0.0/80",
             www_root = "/var/tmp/run/vpp/html"
             )

  DBGvpp# show http static server
  www_root /var/tmp/run/vpp/html, cache size 0 bytes, limit 1000000 bytes, evictions 0

Change-Id: I0f660753317ceedab89da1b65701a24d6f7145de
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agonsim: remove buffer u32 upper bound 20/19820/2
Korian Edeline [Fri, 24 May 2019 13:40:08 +0000 (15:40 +0200)]
nsim: remove buffer u32 upper bound

Extreme BDP flows requires more buffer memory.

Change-Id: I1134be248c6bdd719fa1a033bca41414ceb73371
Signed-off-by: Korian Edeline <korian.edeline@ulg.ac.be>
4 years agodocs: Add some packages for building the docs 57/19857/2
jdenisco [Tue, 28 May 2019 13:58:33 +0000 (13:58 +0000)]
docs: Add some packages for building the docs

Change-Id: I7af427ba6378ddd8480a153a65ec11c578bab12e
Signed-off-by: jdenisco <jdenisco@cisco.com>
4 years agol2tp: l2tp-decap-local don't accept packets unless configured 40/19840/3
Jakub Grajciar [Mon, 27 May 2019 10:23:57 +0000 (12:23 +0200)]
l2tp: l2tp-decap-local don't accept packets unless configured

Change-Id: I2e48eb772dc44912192d0684b8ee631d8d975e9e
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agomake test: add option in pg interfaces for duplicating packets 97/19397/6
Alexandre Poirrier [Tue, 7 May 2019 08:43:41 +0000 (10:43 +0200)]
make test: add option in pg interfaces for duplicating packets

Change-Id: Ia6d6de5de0414291d5637fb4b8c1480925f646d3
Signed-off-by: Alexandre Poirrier <apoirrie@cisco.com>
4 years agoipsec: ah_encrypt rework 16/19016/11
Filip Tehlar [Wed, 17 Apr 2019 07:16:39 +0000 (07:16 +0000)]
ipsec: ah_encrypt rework

call crypto backend only once per node call

Change-Id: I0faab89f603424f6c6ac0db28cc1a2b2c025093e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agodocs: Add VPP API language documentation 89/19389/6
Ole Troan [Tue, 7 May 2019 07:16:18 +0000 (09:16 +0200)]
docs: Add VPP API language documentation

Initial commit of VPP API language documentation.

Change-Id: Ied67203265319a8603086486c9031e723484c501
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoPunt: socket register for exception dispatched/punted packets based on reason 42/19642/14
Neale Ranns [Wed, 15 May 2019 09:13:37 +0000 (02:13 -0700)]
Punt: socket register for exception dispatched/punted packets based on reason

- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions
- move the punt nodes into punt_node.c
- improve tests (test that the correct packets are punted to the registered socket)

Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoAdd an ip6 local hop-by-hop protocol demux table 24/19824/5
Dave Barach [Fri, 24 May 2019 17:03:01 +0000 (13:03 -0400)]
Add an ip6 local hop-by-hop protocol demux table

Add a minimal ip6 hbh header processing test.

ioam plugin: use ip6_local_hop_by_hop_register_protocol() in
udp_ping_init().

Please test the ioam plugin udp_ping path AYEC, so I can
publish the patch.

Change-Id: I74e35276d6c38c31022026cfd238fad5e4a54485
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agonat44: make nat44-ed-hairpin-src follow arc 43/19743/3
Matthew Smith [Tue, 21 May 2019 21:20:11 +0000 (16:20 -0500)]
nat44: make nat44-ed-hairpin-src follow arc

It defaults to using interface-output as the next node. If other
output features are enabled on the ip4-output arc, they get skipped.
That makes me sad.

Change-Id: I3f4d3320fb8092918e1e0663c66baca1c74c26ec
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agogre: don't register gre input nodes unless a gre tunnel is created 09/19809/3
Jakub Grajciar [Fri, 24 May 2019 06:25:03 +0000 (08:25 +0200)]
gre: don't register gre input nodes unless a gre tunnel is created

Change-Id: Id5c0f420e32e0504cea660fed2013f3ad28088aa
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agopapi: avoid IOError on disconnect 44/19844/2
Vratko Polak [Mon, 27 May 2019 16:36:23 +0000 (18:36 +0200)]
papi: avoid IOError on disconnect

Change-Id: I331efb20b98a7e3c507d9158d0221ee7d5353b18
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agotap: crash in multi-thread environment 43/19843/2
Mohsin Kazmi [Mon, 27 May 2019 13:53:25 +0000 (15:53 +0200)]
tap: crash in multi-thread environment

In tap tx routine, virtio_interface_tx_inline, there used to be an
interface spinlock to ensure packets are processed in an orderly fashion
  clib_spinlock_lock_if_init (&vif->lockp);

When virtio code was introduced in 19.04, that line is changed to
  clib_spinlock_lock_if_init (&vring->lockp);
to accommodate multi-queues.

Unfortunately, althrough the spinlock exists in the vring, it was never
initialized for tap, only for virtio. As a result, many nasty things can
happen when running tap interface in multi-thread environment. Crash is
inevitable.

The fix is to initialize vring->lockp for tap and remove vif->lockp as it
is not used anymore.

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

4 years agosnap_input: simplify code using existing functions 47/19847/2
Zhiyong Yang [Tue, 28 May 2019 04:38:11 +0000 (00:38 -0400)]
snap_input: simplify code using existing functions

Change-Id: Ia0cadebab8b800e34e9574601cdebee5ca90cc6a
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agollc_input: simplify code using existing functions 48/19848/2
Zhiyong Yang [Tue, 28 May 2019 04:57:39 +0000 (00:57 -0400)]
llc_input: simplify code using existing functions

Change-Id: I3906adf9aa20b4221eeb7a8b5b353c6f0cb32d04
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agohdlc_input: simplify code using existing functions 49/19849/1
Zhiyong Yang [Tue, 28 May 2019 05:26:05 +0000 (01:26 -0400)]
hdlc_input: simplify code using existing functions

Change-Id: I527b7e43dfba05eab12591e193f07f5036e33f56
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoIPIP tunnel: use address types on API 30/19830/3
Neale Ranns [Sun, 26 May 2019 18:34:27 +0000 (11:34 -0700)]
IPIP tunnel: use address types on API

Change-Id: Ida6a8f96bd858246e993250087bed45e7084ede1
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovirtio: Add gso support for native virtio driver 91/19291/7
Mohsin Kazmi [Thu, 2 May 2019 11:54:59 +0000 (13:54 +0200)]
virtio: Add gso support for native virtio driver

Change-Id: I7b735f5a540e8c278bac88245acb3f8c041c49c0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agounittest: fix test crypto perf for AEAD algos 13/19813/2
Damjan Marion [Thu, 23 May 2019 18:46:33 +0000 (20:46 +0200)]
unittest: fix test crypto perf for AEAD algos

Change-Id: I055014ff0bc7f6d32d59eaf3511ecb91e268d49b
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agovppinfra: add pclmulqdq x86 cpuid flag 14/19814/2
Damjan Marion [Fri, 24 May 2019 11:05:08 +0000 (13:05 +0200)]
vppinfra: add pclmulqdq x86 cpuid flag

Change-Id: If59fea9bb733f6a134d9cb5a9f61dfabf3441820
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agogeneve: encap performance enhancement 04/19704/4
Zhiyong Yang [Mon, 20 May 2019 05:31:38 +0000 (01:31 -0400)]
geneve: encap performance enhancement

This patch can help save 2.7 clocks/pkt from 51.5 to 48.5
clocks/pkt on Skylake server.

Change-Id: I10173c8a147a0e54f925c7841c26f133eb75cbed
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agorewrite vnet_interface_output_node_inline_gso 41/19341/3
Zhiyong Yang [Sun, 5 May 2019 11:32:25 +0000 (19:32 +0800)]
rewrite vnet_interface_output_node_inline_gso

1. Using vlib_get_buffers replaces original logic.
2. Simplify some implementation.

Change-Id: I46cd3487c1d3289074d9dff22aa384688be326dd
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agodpdk: vlan strip config does not take effect in default device 33/19833/3
Chenmin Sun [Mon, 27 May 2019 14:05:42 +0000 (22:05 +0800)]
dpdk: vlan strip config does not take effect in default device

copy vlan strip config from default device

Change-Id: I4ad1c159bad964fd1900b5ae4960b7014dd9f9b1
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
4 years agodpdk: fix rss configuration error issue 31/19831/2
Chenmin Sun [Fri, 24 May 2019 17:47:40 +0000 (01:47 +0800)]
dpdk: fix rss configuration error issue

Reorder foreach_dpdk_rss_hf to fix rss configuration error issue.

Change-Id: Idec45534cd7dfe810b25584b1b27ac52b1c45110
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
4 years agotcp: handle disconnects in rcv-process 89/19789/2
Florin Coras [Thu, 23 May 2019 13:19:09 +0000 (06:19 -0700)]
tcp: handle disconnects in rcv-process

Change-Id: I005f96480e81f3e750c18261e78d0e401da7528e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotcp: handle fin+rst in same frame 26/19826/2
Florin Coras [Fri, 24 May 2019 05:28:16 +0000 (22:28 -0700)]
tcp: handle fin+rst in same frame

Change-Id: Ie7a6c7b92a6beeb356f01384216a4982fb3d420e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovxlan-gpe: improve encap performance 30/19630/3
Zhiyong Yang [Thu, 16 May 2019 08:03:18 +0000 (04:03 -0400)]
vxlan-gpe: improve encap performance

This patch improves performance by prefetching encap header area
and taking full advantage of optimized function vlib_get_buffers.
After applying the patch, the function vxlan_gpe_encap can save
4.1 clocks/pkt from 41.7 to 37.6 clocks/pkt on Skylake.

Change-Id: I85d486b21a2524d64f2e246dfb4183539ec2532d
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agoudp-ping: disable due to conflict with mldv2 16/19816/2
Florin Coras [Fri, 24 May 2019 11:30:08 +0000 (04:30 -0700)]
udp-ping: disable due to conflict with mldv2

Change-Id: I9e6a0fb583b0b6dd9b5e16aa9169bdf7b99a7664
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoip4/6-reassembly fixes 99/19799/2
Vijayabhaskar Katamreddy [Thu, 23 May 2019 20:02:28 +0000 (13:02 -0700)]
ip4/6-reassembly fixes

When multichained fragments comes into reassembly, followed by buffer Linearization or dropping the buffer for other reasons inbetween disturbs the multichained mbuf linking.
When packet is transmitted, followed by freeing of the buffers, woudl result in double free and packet corruptions

Change-Id: Ib5711d54e61fdd6a67deb30dad0b2a14afb9c2da
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
4 years agoAdd callback multiplex support 20/19720/10
Dave Barach [Mon, 20 May 2019 14:28:57 +0000 (10:28 -0400)]
Add callback multiplex support

Change-Id: Iddeb3a1b0e20706e72ec8f74dabc60b342f003ba
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agoTap: Fix the indirect buffers allocation VPP-1660 87/19787/2
Mohsin Kazmi [Thu, 23 May 2019 12:32:58 +0000 (14:32 +0200)]
Tap: Fix the indirect buffers allocation VPP-1660

Indirect buffers are used to store indirect descriptors
to xmit big packets.
This patch moves the indirect buffer allocation from
interface creation to device node. Now it allocates
or deallocates buffers during tx for chained buffers.

Change-Id: I55cec208a2a7432e12fe9254a7f8ef84a9302bd5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 55203e745f5e3f1f6c4dbe99d6eab8dee4d13ea6)

4 years agordma: add support for promiscuous mode 94/19794/2
Benoît Ganne [Wed, 22 May 2019 16:09:19 +0000 (18:09 +0200)]
rdma: add support for promiscuous mode

rdma interfaces filter packets per MAC by default to share the physical
interface between multiple users (eg. VPP and Linux).
When configured in promiscuous mode, all packets will go to this
interface, regardless of the MAC. All other interface will not receive
anymore packet while it is in promiscuous mode.
Promiscuous mode is needed (and automatically turned on) for L2 path
(l2patch, xconnect, bridge...).

Change-Id: I4c0eb4421f51d116e635e7828d00f202f4a97ded
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoRemove historical ip4 icmp OAM code 95/19795/3
Dave Barach [Thu, 23 May 2019 16:38:22 +0000 (12:38 -0400)]
Remove historical ip4 icmp OAM code

Add a registration overwritten warning to ip4_icmp_register_type(...)

Change-Id: I6c2aabdb979b54ec49e827225acc74559ac4caab
Signed-off-by: Dave Barach <dave@barachs.net>
4 years agostats: fix memory leak in statseg config 98/19798/2
Dave Wallace [Thu, 23 May 2019 16:55:19 +0000 (12:55 -0400)]
stats: fix memory leak in statseg config

Type: fix

Change-Id: I383d5b189efc90ad418725b7e52888138dee0f75
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agovpp_papi: Do not raise before find_api_dir() 36/19636/3
Vratko Polak [Thu, 23 May 2019 17:01:29 +0000 (19:01 +0200)]
vpp_papi: Do not raise before find_api_dir()

The change https://gerrit.fd.io/r/18352 has introduced a check
which raises when neither apifiles nor apidir are set.
This change removes that check, as it broke CSIT.

If such a check is intended, find_api_dir() should be removed.
Also, make sure you do not break CSIT next time.

Change-Id: I0faab7c41d199e3aa5d5bc6aab0defd1ab9e10da
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agorpm: VPP-1674: exclude external headers from rpm 92/19792/1
Benoît Ganne [Tue, 14 May 2019 09:11:16 +0000 (11:11 +0200)]
rpm: VPP-1674: exclude external headers from rpm

External libraries headers such as DPDK, libibverb, quicly, etc. should
not be packaged in vpp-dev RPM.
Only package headers from vpp/ and vom/ subdirs.

Change-Id: Ief1454bd1261c8cf4dcd3b105e28f6852439e896
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agofix rte_eth_dev_info’ has no member named ‘pci_dev’ when run show_dpdk_hqos_queue_stats 67/19067/2
cohu [Fri, 19 Apr 2019 10:27:22 +0000 (06:27 -0400)]
fix rte_eth_dev_info’ has no member named ‘pci_dev’ when run show_dpdk_hqos_queue_stats

Change-Id: Ic1a900e0fb85ee016af21535764dfca2e6282194
Signed-off-by: cohu <cong.hu@tieto.com>
4 years agocrypto_ia32: multiarch 60/19760/4
Damjan Marion [Wed, 22 May 2019 13:11:18 +0000 (15:11 +0200)]
crypto_ia32: multiarch

Change-Id: Iead43a2b524b735a2069e611d899cd41d3a8efdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoFix vpp crash bug while deleting dhcp client 55/19455/4
jackiechen1985 [Thu, 9 May 2019 08:57:16 +0000 (16:57 +0800)]
Fix vpp crash bug while deleting dhcp client

We must do lock fib while vrf id ~0, otherwise it crashes while unlocking fib.

Change-Id: Iec9754ccd67634a132bc5384a4f796d4a65943ae
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
4 years agoOptimize code 48/19248/2
jackiechen1985 [Tue, 30 Apr 2019 09:01:29 +0000 (17:01 +0800)]
Optimize code

Replace enqueue code with marcro vlib_validate_buffer_enqueue_x1

Change-Id: I4b454b1d73fa5adbaf5f40cf45dc8975878ac93b
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
4 years agofix show session verbose crash with quic transport 65/19765/2
Dave Wallace [Wed, 22 May 2019 23:12:09 +0000 (19:12 -0400)]
fix show session verbose crash with quic transport

Type: fix

Change-Id: I8199c233f6968ac147fb1867a4f10ef04d67642f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agofix show session verbose crash with udp transport 64/19764/1
Dave Wallace [Wed, 22 May 2019 22:56:57 +0000 (18:56 -0400)]
fix show session verbose crash with udp transport

Type: fix

Change-Id: Ib3a2777317f8c57e91ce43820ad7ca5d10ac8677
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agonew_log2_pages may increase 2 30/17930/9
dongjuan [Fri, 1 Mar 2019 02:34:27 +0000 (10:34 +0800)]
new_log2_pages may increase 2
when try_resplit

Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
Change-Id: I3ebbe7d2d11453700503df7f3be549781d8b73a7

4 years agogtpu: don't register udp ports unless a tunnel is created 52/19752/2
Jakub Grajciar [Wed, 22 May 2019 09:51:47 +0000 (11:51 +0200)]
gtpu: don't register udp ports unless a tunnel is created

Change-Id: I2945c2a2062ee5eda78f783c55cf16c2d60f959c
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agovxlan-gpe: fix CLI document error 50/19750/2
Zhiyong Yang [Wed, 22 May 2019 07:49:43 +0000 (03:49 -0400)]
vxlan-gpe: fix CLI document error

Change-Id: Id95fd604ed181a2f70c24e2c8cc4321755b7ba7f
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
4 years agomake test: fix bug due to concurrent commits 63/19763/2
Klement Sekera [Wed, 22 May 2019 18:18:26 +0000 (20:18 +0200)]
make test: fix bug due to concurrent commits

Change-Id: I912745950fe6e3f1688ef66b430ef86cdddd04cd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agomake test: Fix QUIC External apps transfer test 24/19724/2
Dave Wallace [Mon, 20 May 2019 19:57:28 +0000 (15:57 -0400)]
make test: Fix QUIC External apps transfer test

Change-Id: Idc4cd1d3b29d4656f2df998162e6f99116518a58
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>