vpp.git
5 years agoUse correct name to register ABF plugin with ACLs 04/15504/2
Neale Ranns [Wed, 24 Oct 2018 12:50:40 +0000 (05:50 -0700)]
Use correct name to register ABF plugin with ACLs

Change-Id: Ic69a68665dcff4e4d48803b634aa2cf234c3944b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession/tcp: improve cli 21/15521/2
Florin Coras [Thu, 25 Oct 2018 05:18:58 +0000 (22:18 -0700)]
session/tcp: improve cli

Change-Id: I91c9d040fc9b9b63f7109eeaac334c47fb1226cf
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAddress "is already installed" Jenkins issue 24/15524/2
Marco Varlese [Thu, 25 Oct 2018 09:49:39 +0000 (11:49 +0200)]
Address "is already installed" Jenkins issue

Change-Id: Iad2ddf63116a6f477c6106a3e045fe36f34bc062
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agopmalloc: support for 4K pages 09/15509/6
Damjan Marion [Wed, 24 Oct 2018 15:08:26 +0000 (17:08 +0200)]
pmalloc: support for 4K pages

Change-Id: Iecceffe06a92660976ebb58cd3cbec4be8931db0
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoACL: Fix next_table_index classifiers consistancy 84/11184/5
Gregory Thiemonge [Fri, 16 Mar 2018 07:40:50 +0000 (07:40 +0000)]
ACL: Fix next_table_index classifiers consistancy

Fixed consistancy between the first classifier match and the
next_table_index classifier matches:
- CLASSIFY_ACTION_SET_METADATA was applied only for the first
  classifier, but it was not applied for the other classifiers
- Actions should be performed only for input ACLs
- Payload should point at the IP header for output ACLs

Change-Id: Ifbd7791756320ae3198520c41902f5e99e3d40b4
Signed-off-by: Gregory Thiemonge <gregory.thiemonge@enea.com>
5 years agoipsec_gre.c: Remove redundant assignments. 19/15519/2
Paul Vinciguerra [Wed, 24 Oct 2018 23:45:50 +0000 (16:45 -0700)]
ipsec_gre.c: Remove redundant assignments.

Change-Id: I010528055b9d0597b087882146496eacc13b7daa
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp/session: add tx pacer 81/12681/17
Florin Coras [Tue, 22 May 2018 00:47:40 +0000 (17:47 -0700)]
tcp/session: add tx pacer

Adds tx pacing infrastructure for transport protocols that want to use
it. Particularly useful for connections with non-negligible rtt and
constrained network throughput as it avoids large tx bursts that lead to
local interface tx or network drops.

By default the pacer is disabled. To enabled it for tcp, add tx-pacing
to tcp's startup conf. We are still slightly inefficient in the handling
of incoming packets in established state so the pacer slightly affect
maximum throughput in low lacency scenarios.

Change-Id: Id445b2ffcd64cce015f75b773f7d722faa0f7ca9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobuffer trace is broken in ipsec-output. copy it from node->flags to frame->frame_flags 31/15231/2
Kingwel Xie [Thu, 11 Oct 2018 01:03:10 +0000 (21:03 -0400)]
buffer trace is broken in ipsec-output. copy it from node->flags to frame->frame_flags

Change-Id: I56b573b5da04a27766bcbcafbd5438555424f2e7
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoSCTP: DATA chunk padding fix and hardening 45/15145/9
Marco Varlese [Thu, 4 Oct 2018 13:46:05 +0000 (15:46 +0200)]
SCTP: DATA chunk padding fix and hardening

According to the RFC 4096 (section 3.3.1) the DATA chunk needs to be
padded to a boundary of 4 bytes with zeros. This patch addresses that
requirement.
At the same time, this patch takes care of adding some hardening for
corner-cases where the transmitted tag could be wrong.

Change-Id: I3b653926e9933d0d3d46bc5f37eaceefd932e874
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoAdd x86_64 perfmon tables 17/15517/2
Dave Barach [Wed, 24 Oct 2018 19:54:52 +0000 (15:54 -0400)]
Add x86_64 perfmon tables

The license issue is resolved, so we can package the .json
files. Added to the vpp-dev package in .tar.xz form, which saves a lot
of space.

Updated the perfmon error log entry: tell folks where to find the
compressed tarball, and how to extract it.

Change-Id: I3ed351fbf154cc3ba22d5f9c666acff77a2a14cf
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodpdk: fix hugepage pre-alloc 18/15518/2
Damjan Marion [Wed, 24 Oct 2018 21:21:32 +0000 (23:21 +0200)]
dpdk: fix hugepage pre-alloc

Change-Id: I88577615bfd3cddca834a7b881979ab32bfd5574
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoacl-plugin: introduce a format function for l4 session key 16/15516/1
Andrew Yourtchenko [Wed, 24 Oct 2018 18:51:30 +0000 (20:51 +0200)]
acl-plugin: introduce a format function for l4 session key

Abstracting out the internal format function
for L4 session key type makes the other
acl plugin format/print functions more maintainable.

Change-Id: Ica1302263a42981555462b5338d18d9a9f9c8342
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoTrivial: vpp/vnet/main.c fix resource leak 14/15514/1
Paul Vinciguerra [Wed, 24 Oct 2018 17:39:15 +0000 (10:39 -0700)]
Trivial: vpp/vnet/main.c fix resource leak

Change-Id: Ia6cadec8117d2cc35c9329910bb403bcd1b048ce
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovlib: Fix pci io bar read/write fd leak 01/15501/2
Mohsin Kazmi [Wed, 24 Oct 2018 12:05:34 +0000 (14:05 +0200)]
vlib: Fix pci io bar read/write fd leak

Few devices provide PCI bar region(s) through I/O.
If any such device driver opens I/O "fd" to read and write,
needs to close it, when pci device is going to be deleted.

Change-Id: Iba104e56f76c6bf9ccd27bf2223bad39b1301763
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoKeep RPC traffic off the shared-memory API queue 85/14085/5
Dave Barach [Wed, 8 Aug 2018 13:09:05 +0000 (09:09 -0400)]
Keep RPC traffic off the shared-memory API queue

Change-Id: Ib5c346641463768cf33eaf8cb5fab5b63171398d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodocs: add useful debug CLI 85/15485/3
Scott Keeler [Tue, 23 Oct 2018 19:16:46 +0000 (15:16 -0400)]
docs: add useful debug CLI

Change-Id: I5ef9ecd741f1623ae1b7a23fa0a4fa6db7e243a3
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agoDOC ONLY: fix doc bugs 06/15506/2
Dave Barach [Wed, 24 Oct 2018 13:23:23 +0000 (09:23 -0400)]
DOC ONLY: fix doc bugs

multiarch support: change autotools -> cmake
getting a patch reviewed: improve patch conflict resolution section

Change-Id: I2f07e1d3f21dd8cefb4d4bb3b451965d9314211a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: autodetect default hugepage size 99/15499/2
Damjan Marion [Wed, 24 Oct 2018 10:56:32 +0000 (12:56 +0200)]
vppinfra: autodetect default hugepage size

Change-Id: I5ff713ad0b254c74c5622e3b9425cca365b5ee97
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: disable unused rxtx callbacks in ethdev 88/15488/3
Stephen Hemminger [Tue, 23 Oct 2018 23:15:58 +0000 (16:15 -0700)]
dpdk: disable unused rxtx callbacks in ethdev

Save a few cycles on every rx and tx burst call by not compiling
in support for DPDK Rx and Tx callbacks. This feature is optional
and unused by current VPP code.

Change-Id: I1916bc8822e2bd405c1ac3909e85467a01023862
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoL2-fwd trace show the lookup result 91/15491/2
Neale Ranns [Wed, 24 Oct 2018 09:25:06 +0000 (02:25 -0700)]
L2-fwd trace show the lookup result

Change-Id: I09cf6ee7b4874d71f293f8f1a426d3a5e9651749
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2-input/output: use feature enum type in flag update function 93/15493/1
Neale Ranns [Wed, 24 Oct 2018 09:31:51 +0000 (02:31 -0700)]
L2-input/output: use feature enum type in flag update function

Change-Id: I1f58f441c65fbca101bee2e864bfa6ae2306b475
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1474: fix coverity warning 87/15487/2
Dave Barach [Tue, 23 Oct 2018 22:05:25 +0000 (18:05 -0400)]
VPP-1474: fix coverity warning

Change-Id: I20f2fb14e00f3e7e96774959a4bf1a159ab9030f
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agophysmem coverity issues 86/15486/2
Damjan Marion [Tue, 23 Oct 2018 20:54:40 +0000 (22:54 +0200)]
physmem coverity issues

Change-Id: Ie9ff9b751190632dfc4576e5cbb1987a4142af5e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoperfmon.c: Register additional cpuids. 62/15462/3
Paul Vinciguerra [Tue, 23 Oct 2018 01:19:59 +0000 (18:19 -0700)]
perfmon.c:  Register additional cpuids.

Added/tested additional cpuids from our testbed.

Change-Id: Ifd3ea9e8e8231a8901966903bf5eceb635b82482
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agodns, dhcp: on-demand udp port registration 84/15484/3
Dave Barach [Tue, 23 Oct 2018 14:47:36 +0000 (10:47 -0400)]
dns, dhcp: on-demand udp port registration

Change-Id: I8bf411adc6c5f4caa349d161174b544d2de3ad1d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotcp: fast retransmit improvements 26/15426/18
Florin Coras [Fri, 19 Oct 2018 23:26:24 +0000 (16:26 -0700)]
tcp: fast retransmit improvements

Patch is too large to be ported to 18.10 just days before release.

- handle fast retransmits outside of established node and limit the
retransmit burst size to avoid tx losses and worsening congestion.
- in the absance of a tx pacer, use slow start after fast retransmit
exists
- add fast retransmit heuristic that re-retries sending the first
segment if everything else fails
- fine tuning

Change-Id: I84a2ab8fbba8b97f1d2b26584dc11a1e2c33c8d2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovlib: alloc buffers on local numa, not on numa 1 83/15483/2
Damjan Marion [Tue, 23 Oct 2018 18:33:29 +0000 (20:33 +0200)]
vlib: alloc buffers on local numa, not on numa 1

Change-Id: Icb8172238f735fd0825e474e16a006f1435e175c
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agolisp: register cp port only if enabled 77/15477/2
Florin Coras [Tue, 23 Oct 2018 14:59:24 +0000 (07:59 -0700)]
lisp: register cp port only if enabled

Change-Id: I7030951215f0cf7d00c037892ac92d9c304cb5a1
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovlib: Add support for pci io read/write 79/15479/2
Mohsin Kazmi [Fri, 28 Sep 2018 09:45:01 +0000 (11:45 +0200)]
vlib: Add support for pci io read/write

Change-Id: I9d96e7782a12c2e19eacbb75edb1fb450cf33bed
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agovlib: reduce default buffer memory size to be below RLIMIT_MEMLOCK 82/15482/1
Damjan Marion [Tue, 23 Oct 2018 17:50:20 +0000 (19:50 +0200)]
vlib: reduce default buffer memory size to be below RLIMIT_MEMLOCK

Change-Id: If36be24fa08e21c7718a1dced506a7f254dfb5cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoNuma-aware, growable physical memory allocator (pmalloc) 06/15106/34
Damjan Marion [Sun, 30 Sep 2018 16:26:20 +0000 (18:26 +0200)]
Numa-aware, growable physical memory allocator (pmalloc)

Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agopg: udp length & checsum issue 30/15230/3
Kingwel Xie [Thu, 11 Oct 2018 00:51:59 +0000 (20:51 -0400)]
pg: udp length & checsum issue

if udp length is specified, then use this length to calculate udp checksum
otherwise, use length from vlib_buffer

Change-Id: I5304a60d5d429993d0524b864b65ec503775412d
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agodpdk: support 18.11 changes to CRC flags 23/15423/4
Stephen Hemminger [Mon, 22 Oct 2018 18:17:57 +0000 (11:17 -0700)]
dpdk: support 18.11 changes to CRC flags

In DPDK 18.11 the device flags for keeping/stripping CRC flags has
changed. The old strip flag is gone, and replaced by a CRC keep
flag.

Change-Id: Iaa162854862a2a0855b418ee8029383fc116d3a2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: add esp6 decrypt nodes, func declarations 60/15460/2
Matthew Smith [Mon, 22 Oct 2018 21:37:25 +0000 (16:37 -0500)]
dpdk: add esp6 decrypt nodes, func declarations

The function dpdk_ipsec_process() attempts to initialize some
globals that store node indexes after looking up the node
dpdk-esp6-decrypt. No such node was declared, so a segv
occurs after dereferencing the result of the lookup.

Add a node function that invokes dpdk_esp_decrypt_inline()
with is_ip6 set to 1. Add a declaration of node dpdk-esp6-decrypt
that uses the node function.

Change-Id: I31ce23a458c2d4181bf40cbc2118c4ef3b9baf97
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoc11 safe string handling support 47/15347/10
Dave Barach [Wed, 17 Oct 2018 14:38:51 +0000 (10:38 -0400)]
c11 safe string handling support

Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoRelease Notes for 18.10 64/15464/2
Marco Varlese [Thu, 18 Oct 2018 07:19:15 +0000 (09:19 +0200)]
Release Notes for 18.10

Change-Id: I3500113f30d6d98eae69d39b59b90569c796e011
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
(cherry picked from commit 3a9a6f72d18aa72e4038422a4c882927037441e7)

5 years agoipsec: fix wrong counter bump 69/15469/1
Klement Sekera [Tue, 23 Oct 2018 09:05:23 +0000 (11:05 +0200)]
ipsec: fix wrong counter bump

Change-Id: I5105b688ef3df2c949ba09e1e90c1b8913502388
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovlib: pci improvements 50/15450/3
Damjan Marion [Mon, 22 Oct 2018 11:38:57 +0000 (13:38 +0200)]
vlib: pci improvements

 - logging
 - pass vlib_main_t to all APIs
 - open vfio container only when needed

Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoGBP: Revert back to using VppIpPrefix wrapper 51/15451/2
Ole Troan [Mon, 22 Oct 2018 12:11:45 +0000 (14:11 +0200)]
GBP: Revert back to using VppIpPrefix wrapper

Change-Id: I33567b9c5822008e6b75c7cc04f63853dee88654
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec fix missing node renames 44/15444/4
Klement Sekera [Mon, 22 Oct 2018 11:17:19 +0000 (13:17 +0200)]
ipsec fix missing node renames

Change-Id: I70bc5af646894811d373456ec66aa83f2d75a477
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoadd Contiv-VPP installation guidance on Aarch64 58/15058/4
Lijian Zhang [Wed, 26 Sep 2018 01:48:57 +0000 (09:48 +0800)]
add Contiv-VPP installation guidance on Aarch64

add Contiv-VPP installation guidance on Aarch64

Change-Id: I323c871d346c47396916a618934c5e169ee49212
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Song Zhu <Song.Zhu@arm.com>
Reviewed-by: Trevor Tao <Trevor.Tao@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
Reviewed-by: Tina Tsou <Tina.Tsou@arm.com>
5 years agovlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlines 49/15449/2
Damjan Marion [Mon, 22 Oct 2018 11:07:02 +0000 (13:07 +0200)]
vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlines

Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: use log2 page size in hugepage functions 48/15448/2
Damjan Marion [Mon, 22 Oct 2018 11:01:46 +0000 (13:01 +0200)]
vppinfra: use log2 page size in hugepage functions

Change-Id: Ibec32c6df32f4cd9889d378e244f170c93ad295b
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFix buffer overflow when fragmenting packets (VPP-1383) 45/15445/2
Juraj Sloboda [Tue, 16 Oct 2018 10:18:21 +0000 (12:18 +0200)]
Fix buffer overflow when fragmenting packets (VPP-1383)

Change-Id: Idcda9ae55fa2efb0b2e928bac3e8e86ff8d19eba
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoX86_64 perf counter plugin 52/14752/35
Dave Barach [Mon, 10 Sep 2018 16:31:15 +0000 (12:31 -0400)]
X86_64 perf counter plugin

Change-Id: Ie5a00c15ee9536cc61afab57f6cadc1aa1972f3c
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoVPP-1420 CDP check memory bounds fix 43/15443/2
Filip Varga [Mon, 22 Oct 2018 10:36:58 +0000 (12:36 +0200)]
VPP-1420 CDP check memory bounds fix

Change-Id: I7951ffd050acb618dd20b86ae5946e1228ff5d79
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agoPAPI: Add support for format/unformat functions. 41/15441/2
Ole Troan [Mon, 22 Oct 2018 07:30:26 +0000 (09:30 +0200)]
PAPI: Add support for format/unformat functions.

With the introduction of new types, like vl_api_address_t
it is now possible to call a message using one of those
functions with a string representation. E.g. for an IP address

ip_add_address(address="1.1.1.1/24")

The language wrapper will automatically convert the string
into the vl_api_address_t representation. Currently
the caller must do the reverse conversion from the returned
named tuple with the unformat function.
rv = get_address_on_interface(sw_if_index=1)
print(VPPFormat.unformat(rv.address))

Change-Id: Ic872b4560b2f4836255bd5260289bfa38c75bc5d
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFix dereferencing null string in dpdk_early_init 40/15440/2
Juraj Sloboda [Mon, 22 Oct 2018 08:59:45 +0000 (10:59 +0200)]
Fix dereferencing null string in dpdk_early_init

Change-Id: Iffba7ebe5af8fadc0251f3a10022739d45f394ce
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoFix stat_segment.c issue. 29/15429/4
Paul Vinciguerra [Sat, 20 Oct 2018 21:51:14 +0000 (14:51 -0700)]
Fix stat_segment.c issue.

* using default socket name even when overridden in config.

Change-Id: I1849bf5269629873afd1dd48d2df785a491781c3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agostats: Add wrapper for vec_free 38/15438/2
Ole Troan [Mon, 22 Oct 2018 07:41:29 +0000 (09:41 +0200)]
stats: Add wrapper for vec_free

The result vector from stat_segment_ls must be freed
by the caller. Add wrapper for non-C language bindings.

Change-Id: I7eee7f80ec98b41696d354add47b26978e12ef0f
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec: split ipsec nodes into ip4/ip6 nodes 07/15207/7
Klement Sekera [Tue, 9 Oct 2018 14:05:48 +0000 (16:05 +0200)]
ipsec: split ipsec nodes into ip4/ip6 nodes

Change-Id: Ic6b27659f1fe9e8df39e80a0441305e4e952195a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agodpdk: use rte_vfio_dma_map API instead of digging for vfio fd 28/15428/6
Damjan Marion [Sat, 20 Oct 2018 21:26:46 +0000 (23:26 +0200)]
dpdk: use rte_vfio_dma_map API instead of digging for vfio fd

This is new API introduced in DPDK 18.08.

Change-Id: I66d49fe54a6abf2af621b597e8d4535e29cecec4
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agolisp-gpe: register udp port only if enabled (VPP-1468) 31/15431/2
Florin Coras [Sun, 21 Oct 2018 17:50:48 +0000 (10:50 -0700)]
lisp-gpe: register udp port only if enabled (VPP-1468)

Change-Id: I7d0930a19d927bbd7ba3fc879d5a0c8064827629
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: count first lost hole (VPP-1465) 27/15427/3
Florin Coras [Sat, 20 Oct 2018 00:49:00 +0000 (17:49 -0700)]
tcp: count first lost hole (VPP-1465)

Change-Id: I3ac136e2a10796d8fa86ddb6f0d6cabe5fa749f8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodpdk: add netvsc PMD 12/15312/3
Stephen Hemminger [Tue, 16 Oct 2018 00:50:46 +0000 (17:50 -0700)]
dpdk: add netvsc PMD

Teach DPDK plugin about the netvsc Poll Mode Driver.
The speed of the Netvsc device matches the speed of the external
port on the underlying vswitch. Therefore 1G, 10G, 25G, 56G and
even 100G are possible.

Change-Id: I14ab6907b7d8d350b63a083409d45fb9c348a364
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: turn off unused DPDK components 24/15424/2
Stephen Hemminger [Fri, 19 Oct 2018 19:29:57 +0000 (12:29 -0700)]
dpdk: turn off unused DPDK components

DPDK has added a lot more drivers and config options that are not
used by current VPP code.

Change-Id: I385f8b5df02b95a31ca9abe506c79cf52e99a24c
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoacl-plugin: use the L2 feature arc infrastructure instead of L2 classifier for plumbing 65/15165/9
Andrew Yourtchenko [Sat, 6 Oct 2018 07:26:02 +0000 (09:26 +0200)]
acl-plugin: use the L2 feature arc infrastructure instead of L2 classifier for plumbing

This makes ACL plugin use the new feature arcs, which slightly increases performance.

Since for ethertype whitelisting we were using the L2 classifier, to retain
the functionality, make a simple node doing that, and plug it into non-ip
L2 feature arc whenever needed.

Change-Id: I3add377a6c790117dd3fd056e5615cb4c4438cf4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agopipes: fix the l2.l2_len and the l[23]_hdr_offset setting behavior of pipe-rx node... 02/15302/5
Andrew Yourtchenko [Tue, 16 Oct 2018 10:04:51 +0000 (12:04 +0200)]
pipes: fix the l2.l2_len and the l[23]_hdr_offset setting behavior of pipe-rx node to match that of ethernet-input node

Since pipe-rx is a sibling node of ethernet-input, it ought to perform similarly: set l2/l3 header offsets,
and l2.l2_len value if the interface is in the l2 mode.

The use cases of pipes do not assume the tagged traffic, so
assume the simple ethernet header.

Change-Id: I7c9b5f4f2b1402cfbd10513f76cdd59b2db7a7a6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: use rx/tx_offload_names to format 25/15425/2
Stephen Hemminger [Fri, 19 Oct 2018 20:20:12 +0000 (13:20 -0700)]
dpdk: use rx/tx_offload_names to format

Rather than keeping our own list of offload capabalities, use the
function in 18.08 or later to decode the value.

Also, introduce a formatter to convert to lower case because
DPDK API returns upper case names.

Change-Id: I87546fa2bec67f8a8b44288f5994514114cb6faf
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoavf: fix crash in rss key calculation 13/15413/2
Damjan Marion [Fri, 19 Oct 2018 14:50:41 +0000 (16:50 +0200)]
avf: fix crash in rss key calculation

Change-Id: Id13a0b6ed54885babf679f05207170e36709d9fa
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: use memfd_create for hugepage mounts if supported 92/15392/2
Damjan Marion [Fri, 19 Oct 2018 10:54:42 +0000 (12:54 +0200)]
vppinfra: use memfd_create for hugepage mounts if supported

Starting with kernel 4.14 hugepage fd can be retrieved with
memfd_systemcall

Change-Id: I0f3bd6d0a7757ffe7b98e83763502013ac763ecb
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoNAT44: fix ICMP virtual fragmentation reassembly (VPP-1466) 93/15393/1
Matus Fabian [Fri, 19 Oct 2018 11:01:19 +0000 (04:01 -0700)]
NAT44: fix ICMP virtual fragmentation reassembly (VPP-1466)

Change-Id: I8006bca02948d9121f474a3d14f0576747bb3c51
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agovppinfra: add atomic macros for __sync builtins 81/15181/5
Sirshak Das [Wed, 3 Oct 2018 22:53:51 +0000 (22:53 +0000)]
vppinfra: add atomic macros for __sync builtins

This is first part of addition of atomic macros with only macros for
__sync builtins.

- Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/)
Additionally
- clib_atomic_release macro added and used in the absence
of any memory barrier.
- clib_atomic_bool_cmp_and_swap added

Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b
Original-patch-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
5 years agoAdd pool_get_zero, pool_get_aligned_zero macros 81/15381/2
Dave Barach [Thu, 18 Oct 2018 19:37:49 +0000 (15:37 -0400)]
Add pool_get_zero, pool_get_aligned_zero macros

Shorthand for the pattern:

   pool_get (<pool>, ep);
   memset (ep, 0, sizeof(*ep));

Should have done this years ago.

Change-Id: Ideeb27a79ff4ca3e9a077c973b297671d1fa2d26
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotcp: fix sacks lost bytes counting (VPP-1465) 56/15356/6
Florin Coras [Thu, 18 Oct 2018 06:34:54 +0000 (23:34 -0700)]
tcp: fix sacks lost bytes counting (VPP-1465)

Change-Id: Ie46b3a81de4ed39b7b40e3879436f7e5a2908d98
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotls: fix connection failures/interrupts at scale (VPP-1464) 53/15353/5
Florin Coras [Wed, 17 Oct 2018 21:53:11 +0000 (14:53 -0700)]
tls: fix connection failures/interrupts at scale (VPP-1464)

Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix cleanup of non established connections (VPP-1463) 50/15350/4
Florin Coras [Wed, 17 Oct 2018 17:41:28 +0000 (10:41 -0700)]
tcp: fix cleanup of non established connections (VPP-1463)

- fix delete of connection in syn-received
- fix delete of half-open connection

Change-Id: I72ff4b60406a2762d998328c52f41adea40d2c1b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoPing; remove unused arrays 65/15365/2
Neale Ranns [Thu, 18 Oct 2018 09:18:06 +0000 (02:18 -0700)]
Ping; remove unused arrays

Change-Id: I104f2b4e0b1c354d3671962be3f6002f2721388d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoPAPI: Expose API enums to tests / applications 06/15306/7
Ole Troan [Tue, 16 Oct 2018 12:42:50 +0000 (14:42 +0200)]
PAPI: Expose API enums to tests / applications

e.g:
from vpp_papi import VppEnum

VppEnum.vl_api_address_family_t.ADDRESS_IP4

Change-Id: I10c22d57234a1a06e98a889cf80b19085b468ed3
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoUpdate version (18.10) for API changes script 61/15361/1
Marco Varlese [Thu, 18 Oct 2018 07:37:17 +0000 (09:37 +0200)]
Update version (18.10) for API changes script

Change-Id: I41d22bfc87849e923628de08f922f7a541579fe1
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agovxlan:decap caching error (VPP-1462) 49/15349/1
Eyal Bari [Wed, 17 Oct 2018 14:13:42 +0000 (17:13 +0300)]
vxlan:decap caching error (VPP-1462)

Change-Id: I3ef0725684bcb8ea526abe0ce62562b35a0070f5
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 0d87894bf279a4678cfca6cc438583090b166f85)

5 years agofix ip6 prefix check for tap_v2 41/15341/2
Michal Cmarada [Wed, 17 Oct 2018 11:40:32 +0000 (13:40 +0200)]
fix ip6 prefix check for tap_v2

Change-Id: Ifbb1393fc3c50c140c09e8baedcd4a92189ba56e
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agoUpdate to doxygen documentation for release 18.10 34/15334/1
Marco Varlese [Wed, 17 Oct 2018 09:21:32 +0000 (11:21 +0200)]
Update to doxygen documentation for release 18.10

Change-Id: Id8eebd59bad27ac3cc46bf993a5ca1d8410bf84c
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
(cherry picked from commit 44c6ca6038776787671e78e3dae78e812c72429e)

5 years agoIP Route add/del API is MP safe 24/15324/2
Neale Ranns [Wed, 17 Oct 2018 06:38:00 +0000 (06:38 +0000)]
IP Route add/del API is MP safe

Change-Id: I0bfa4c9a3bb22155d7862cc13019cb172e77407c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix multiple fin retries (VPP-1461) 19/15319/4
Florin Coras [Wed, 17 Oct 2018 03:30:31 +0000 (20:30 -0700)]
tcp: fix multiple fin retries (VPP-1461)

Change-Id: I1be7c59df7b48875f81ebeebf5f39ed15a43d2d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agostats: vpp_get_stats missing last interface in dump 27/15327/2
Ole Troan [Wed, 17 Oct 2018 07:28:23 +0000 (09:28 +0200)]
stats: vpp_get_stats missing last interface in dump

Change-Id: Ie1fa560cb255a9b13ddb4929da8f33286a8c137e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoacl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each... 29/15329/1
Andrew Yourtchenko [Tue, 16 Oct 2018 15:18:26 +0000 (17:18 +0200)]
acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each collision in split_partition() (VPP-1458)

A pointer to hash-ready ACL rules is only set once, which might cause a crash if there are colliding entries
from more than one ACL applied.

Solution: reload the pointer based on the element being processed.

Change-Id: I7a701c2c3b4236d67293159f2a33c4f967168953
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 84112dd4f98e5a31a8c7340a741f89e77fd03363)

5 years agotcp: avoid sack processing when not needed (VPP-1460) 17/15317/3
Florin Coras [Wed, 17 Oct 2018 02:52:10 +0000 (19:52 -0700)]
tcp: avoid sack processing when not needed (VPP-1460)

Change-Id: If81ee34e1f1e929de1a5b758ddb9aede4002e858
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: tx optimizations 66/15166/13
Damjan Marion [Sat, 6 Oct 2018 12:33:18 +0000 (14:33 +0200)]
bond: tx optimizations

Break up bond tx function into multiple small workloads:
  1. parse the packet header and hash it based on the configured algorithm
  2. optionally, trace the packet
  3. convert the hash value from (1) to the slave port
  4. update the buffers with the slave sw_if_index
  5. Add the buffers to the queues
  6. Create and send the frames

old numbers
-----------
Time 5.3, average vectors/node 223.74, last 128 main loops 40.00 per node 222.61
  vector rates in 3.3627e6, out 6.6574e6, drop 3.3964e4, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active              68998        17662979               0          1.89e1          255.99
BondEthernet0-tx                 active              68998        17662979               0          2.60e1          255.99
TenGigabitEthernet3/0/1-output   active              68998         8797416               0          1.03e1          127.50
TenGigabitEthernet3/0/1-tx       active              68998         8797416               0          7.85e1          127.50
TenGigabitEthernet7/0/1-output   active              68996         8865563               0          1.02e1          128.49
TenGigabitEthernet7/0/1-tx       active              68996         8865563               0          7.65e1          128.49

new numbers
-----------
BondEthernet0-output             active             304064        77840384               0          2.29e1          256.00
BondEthernet0-tx                 active             304064        77840384               0          2.47e1          256.00
TenGigabitEthernet3/0/1-output   active             304064        38765525               0          1.03e1          127.49
TenGigabitEthernet3/0/1-tx       active             304064        38765525               0          7.66e1          127.49
TenGigabitEthernet7/0/1-output   active             304064        39074859               0          1.01e1          128.51

Change-Id: I3ef9a52bfe235559dae09d055c03c5612c08a0f7
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVPP-1459:Ip4 lookup fail when exist prefix cover. 16/15316/1
mu.duojiao [Wed, 17 Oct 2018 02:59:09 +0000 (10:59 +0800)]
VPP-1459:Ip4 lookup fail when exist prefix cover.

Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agotls: fix multi threaded medium scale test (VPP-1457) 98/15298/7
Florin Coras [Tue, 16 Oct 2018 04:35:42 +0000 (21:35 -0700)]
tls: fix multi threaded medium scale test (VPP-1457)

- ensure session enqueue epoch does not wrap between two enqueues
- use 3 states for echo clients app, to distinguish between starting and
closing phases
- force tcp fin retransmit if out of buffers while sending a fin

Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoPAPI: Add bool type support in vppapigen. 07/15307/2
Ole Troan [Tue, 16 Oct 2018 13:14:03 +0000 (15:14 +0200)]
PAPI: Add bool type support in vppapigen.

Change-Id: I9c2eaa2ee04a1c9a92018afb92cb2c5610df2991
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoPAPI: Add timeout support for socket transport 08/15308/1
Ole Troan [Tue, 16 Oct 2018 13:16:07 +0000 (15:16 +0200)]
PAPI: Add timeout support for socket transport

Change-Id: I0402989e0ac738cab2f918e6e3d73c571457c08e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFIB: use vlib-log for debugging 99/15299/2
Neale Ranns [Mon, 24 Sep 2018 12:36:26 +0000 (12:36 +0000)]
FIB: use vlib-log for debugging

Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFix coverity issue for potentially overflowing of page size 91/15291/2
Haiyang Tan [Mon, 15 Oct 2018 13:17:55 +0000 (06:17 -0700)]
Fix coverity issue for potentially overflowing of page size

Change-Id: I2779626d745badb63386efcf729da7a094a4f297
Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
5 years agoPing; report failures to the terminal 90/15290/3
Neale Ranns [Mon, 15 Oct 2018 12:47:58 +0000 (05:47 -0700)]
Ping; report failures to the terminal

Change-Id: Icd48de31302f62c59961c573699a1dd0474b8acb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: fix bidirectional tests (VPP-1455) 83/15283/7
Florin Coras [Sat, 13 Oct 2018 19:20:01 +0000 (12:20 -0700)]
vcl: fix bidirectional tests (VPP-1455)

- add epoll dequeued events beyond maxevents to unhandled
- filter multiple epoll rx events

Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoIGMP: proxy device 33/15133/7
Jakub Grajciar [Thu, 4 Oct 2018 09:05:35 +0000 (11:05 +0200)]
IGMP: proxy device

Create 'proxy device' per VRF and add one upstream
and one or many downstream interfaces.

Change-Id: I1cef05fb01e73a5b483c7a2f4debaaeffe2c8155
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agovmxnet3: show vmxnet3 with filtering capability [VPP-1452] 74/15274/4
Steven [Fri, 12 Oct 2018 17:21:32 +0000 (10:21 -0700)]
vmxnet3: show vmxnet3 with filtering capability [VPP-1452]

show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each
table may have 1000 entries. It would not be very useful to debug problem.

We need filtering capability for the subject show command. We need to be able
to display the descriptor table per interface, per interface per table, and
per interface per table per slot. The latter is the most useful.

tested the following valid combinations
show vmxnet3
show vmxnet3 desc
show vmxnet3 vmxnet3-0/13/0/0
show vmxnet3 vmxnet3-0/13/0/0 desc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 tx-comp
show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1
show vmxnet3 vmxnet3-0/13/0/0 tx-desc
show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1

negative tests and command is rejected
show vmxnet3 abc
show vmxnet3 desc abc
show vmxnet3 vmxnet3-0/13/0/0 abc
show vmxnet3 vmxnet3-0/13/0/0 desc abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc

Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb
Signed-off-by: Steven <sluong@cisco.com>
5 years agovmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456] 96/15296/2
Steven [Mon, 15 Oct 2018 17:22:53 +0000 (10:22 -0700)]
vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456]

When using vpp_api_test, there is an undefined symbol error for
format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded.

The cause is due to vlib not included in vpp_api_test. Remove the reference
for vlib.so in vmxnet3_test.

Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 3d29e83112a349b7d27ef792463f246b18115d3e)

5 years agoSticky Load-balance 84/15184/3
Neale Ranns [Mon, 8 Oct 2018 14:51:11 +0000 (14:51 +0000)]
Sticky Load-balance

keep the number of buckets in the load-balanced fixed. If a
path goes dwon fill its buckets with those from the next
available up path.

Change-Id: I15603ccb899fa9b77556b898c99136379cf32eae
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovnet: create L2 feature arc infrastructure 63/15163/3
Andrew Yourtchenko [Sat, 6 Oct 2018 07:18:00 +0000 (09:18 +0200)]
vnet: create L2 feature arc infrastructure

This commit adds two new nodes in the L2
datapath in input and output direction respectively.

These nodes fork the traffic into three feature
arcs: ip4, ip6 and nonip, which later join
to continue the usual L2 processing.
The vnet_l2_feature_enable_disable() function
with the same signature as
vnet_feature_enable_disable() takes care of
enabling the L2 datapath feature bits as needed, when
the features are enabled/disabled.

Thus, L2 features may use the similar plumbing as
the L3 features enjoy.

Change-Id: I76877b3a92d794c492bff1622bb26acba05705b2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: drop no longer used config options 80/15280/2
Stephen Hemminger [Fri, 12 Oct 2018 23:43:58 +0000 (16:43 -0700)]
dpdk: drop no longer used config options

DPDK has switched to dynamic logging for initialization (since 18.05).
Don't generate config for unused options.

Change-Id: I3f1a5b3b8bee38abc9d0654737b59368646ed0fa
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: only look at PCI information on PCI devices 79/15279/2
Stephen Hemminger [Fri, 12 Oct 2018 00:04:13 +0000 (17:04 -0700)]
dpdk: only look at PCI information on PCI devices

The rte_device is use as a base type of all DPDK devices.
It is not valid to use container_of to find PCI information
unless the bus of the rte_device is pci. Otherwise, the
pointer is looking at some other data, which may or may not
be zero.

This change introduces a helper function to get rte_pci_device
pointer. If device is on PCI bus it returns pointer to
rte_pci_device info, otherwise it returns NULL.

Change-Id: Ia7446006bb93a7a54844969f3b3dd3b918890dfd
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoVPP-1448: Fix error when recurse on down the trie. 34/15234/7
mu.duojiao [Thu, 11 Oct 2018 06:27:30 +0000 (14:27 +0800)]
VPP-1448: Fix error when recurse on down the trie.

Change-Id: Idfed8243643780d3f52dfe6e6ec621c440daa6ae
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agovxlan:fix ip6 tunnel deletion 84/15284/3
Eyal Bari [Sun, 14 Oct 2018 07:54:32 +0000 (10:54 +0300)]
vxlan:fix ip6 tunnel deletion

Change-Id: I70fb7394f85b26f7e632d74fc31ef83597efdd16
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoacl-plugin: make each test in test_acl_plugin runnable separately 64/15164/3
Andrew Yourtchenko [Sat, 6 Oct 2018 07:24:28 +0000 (09:24 +0200)]
acl-plugin: make each test in test_acl_plugin runnable separately

And improve the robustness of the ethertype whitelist test coverage

Change-Id: I64fe3a25208dbc619ae5cd6404f6122e69394a38
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agosession: mark apis for deprecation 72/15272/2
Florin Coras [Fri, 12 Oct 2018 15:36:20 +0000 (08:36 -0700)]
session: mark apis for deprecation

Change-Id: I913ffc963928b74cf4753b6b9a0eed4436887e04
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: fix empty epoll returns (VPP-1453) 76/15276/2
Florin Coras [Fri, 12 Oct 2018 20:09:36 +0000 (13:09 -0700)]
vcl: fix empty epoll returns (VPP-1453)

Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: don't wait indefinitely for apps to consume evts (VPP-1454) 77/15277/1
Florin Coras [Fri, 12 Oct 2018 23:55:14 +0000 (16:55 -0700)]
session: don't wait indefinitely for apps to consume evts (VPP-1454)

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