vpp.git
5 years agoEMACS-LISP-ONLY: fix names of xxx_main_t pointers 39/15639/1
Dave Barach [Wed, 31 Oct 2018 13:54:34 +0000 (09:54 -0400)]
EMACS-LISP-ONLY: fix names of xxx_main_t pointers

main_t pointer: <first-letter-of-plugin-name> + "mp"
test_main_t pointer: <first-letter-of-plugin-name> + "mp"

AKA: (setq main-p (concat (substring plugin-name 0 1) "mp")) etc.

Change-Id: Ie1b38fb62485183bbe00f649683492aa82a21376
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoEMACS-LISP-ONLY: fix boilerplate compile error 38/15638/1
Dave Barach [Wed, 31 Oct 2018 13:23:35 +0000 (09:23 -0400)]
EMACS-LISP-ONLY: fix boilerplate compile error

Change-Id: I81defe6465219e23a44608fcf0570a058ab3f59e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoAdd and enable msb mask vector intrinsic for aarch64. 06/15606/4
Lijian Zhang [Thu, 25 Oct 2018 10:50:33 +0000 (18:50 +0800)]
Add and enable msb mask vector intrinsic for aarch64.

This patch enables the use of this function for enqueuing frames to the next graph node.

Change-Id: I4003110db59870f7106e0d13942d6ff7bc54b46d
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Steve Capper <Steve.Capper@arm.com>
5 years agol2fib:remove unused bucket arg in lookup functions 27/15627/1
Eyal Bari [Wed, 31 Oct 2018 08:55:33 +0000 (10:55 +0200)]
l2fib:remove unused bucket arg in lookup functions

Change-Id: Ib138b6e2eac47acc16e81bc88358ae7947420134
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agosession: prioritize postponed sessions 14/15614/5
Florin Coras [Tue, 30 Oct 2018 17:21:59 +0000 (10:21 -0700)]
session: prioritize postponed sessions

If sessions cannot be handled during the current dispatch loop
iteration, ensure that they are first to be handled in the next.

Change-Id: Ifc6215900f8cfd530d4886b58641189f0ccf9bb7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: add wrk context 16/15616/5
Florin Coras [Tue, 30 Oct 2018 19:01:48 +0000 (12:01 -0700)]
session: add wrk context

Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoADJ: init MTU to interface default 05/15605/2
Neale Ranns [Tue, 30 Oct 2018 13:34:25 +0000 (06:34 -0700)]
ADJ: init MTU to interface default

Change-Id: Iaecf8c060e1337d8c362ad9a9be2bb9701664397
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoDOC-ONLY: document packet intialization from scratch 10/15610/2
Dave Barach [Tue, 30 Oct 2018 14:24:17 +0000 (10:24 -0400)]
DOC-ONLY: document packet intialization from scratch

Minor clean-up in the home gateway use-case documentation

Change-Id: I7d3aaea8cec62248daf7814b21a8acb574ac12a1
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agochange mac address functions take const mac 00/15600/2
Neale Ranns [Tue, 30 Oct 2018 10:47:20 +0000 (03:47 -0700)]
change mac address functions take const mac

Change-Id: Ia68db22b917e9af1394c00e5a6b3df134bfd1568
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodocs: Add VPP with iperf and trex 04/15604/2
jdenisco [Tue, 30 Oct 2018 12:46:02 +0000 (08:46 -0400)]
docs: Add VPP with iperf and trex

Change-Id: I9f238b6092bc072fd875facfee5262c6b155043e
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agoDOC-ONLY: upgrade the "requests" package 03/15603/2
Dave Barach [Tue, 30 Oct 2018 12:35:06 +0000 (08:35 -0400)]
DOC-ONLY: upgrade the "requests" package

requests 2.18.4 is the subject of a security alert

Change-Id: Id1e9338d86bced8c0bb065db7b3dc7f02aa41afc
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: fix bug in default_socket_sendmsg 01/15601/1
Damjan Marion [Tue, 30 Oct 2018 12:04:19 +0000 (13:04 +0100)]
vppinfra: fix bug in default_socket_sendmsg

Change-Id: Ia9b74761ce511d218bb5319c7c9b5e58be3e2e8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: .function should be removed for mutiarch nodes 99/15599/1
Damjan Marion [Tue, 30 Oct 2018 09:04:53 +0000 (10:04 +0100)]
dpdk: .function should be removed for mutiarch nodes

Fixes debug build crash.

Change-Id: Ia5c5da82beda5992f9e67456af9a4676b9b82722
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agomigrate ipsec to new multiarch infra 20/15420/5
Klement Sekera [Mon, 29 Oct 2018 12:38:19 +0000 (13:38 +0100)]
migrate ipsec to new multiarch infra

Change-Id: Ibef46e068cd72415af28920b0146adf48105bf68
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoUse throttle_t for ND throttling 48/15548/5
Neale Ranns [Fri, 31 Aug 2018 09:51:45 +0000 (02:51 -0700)]
Use throttle_t for ND throttling

Change-Id: I93c6b7bccd1a1ab71625ae29c99c974581186c4d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agointerface-flags; fix coverity error found in conversion 79/15579/2
Neale Ranns [Mon, 29 Oct 2018 08:55:24 +0000 (01:55 -0700)]
interface-flags; fix coverity error found in conversion

Change-Id: I2eafac4ce810fe53454b729d81161ec80d036db7
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFixing Exclusive dpo path issues added when via rpath 42/15542/6
Vijayabhaskar Katamreddy [Thu, 25 Oct 2018 20:28:12 +0000 (13:28 -0700)]
Fixing Exclusive dpo path issues added when via rpath

Change-Id: I7531a64d7072d85514ca579827b6ea0e9cef6f08
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agosession: move test to unittest plugin 78/15578/2
Florin Coras [Mon, 29 Oct 2018 03:33:29 +0000 (20:33 -0700)]
session: move test to unittest plugin

Change-Id: I4921054b4e42bac3442d399681b21b613ce8b681
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: problem switching from l2 to l3 77/15577/3
Steven [Sun, 28 Oct 2018 20:36:45 +0000 (13:36 -0700)]
bond: problem switching from l2 to l3

when the last interface is removed from l2 in the bonding group, we should
invoke ethernet_set_rx_direct to allow ip packets to go directly to
ip4-input.

Change-Id: I43b3cd64e2c119762edd0c295bb9348732adab45
Signed-off-by: Steven <sluong@cisco.com>
5 years agophysmem: coverity issues 49/15549/4
Damjan Marion [Fri, 26 Oct 2018 08:29:35 +0000 (10:29 +0200)]
physmem: coverity issues

Change-Id: I34cc55d8292a69fb451ed0031484994f51d3537a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: extend connect api for internal apps 46/15546/11
Florin Coras [Fri, 26 Oct 2018 01:03:45 +0000 (18:03 -0700)]
session: extend connect api for internal apps

Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFIB: Sources must be keep in priority order, so re-sort after a vec_del 51/15551/4
Neale Ranns [Fri, 26 Oct 2018 11:17:54 +0000 (04:17 -0700)]
FIB: Sources must be keep in priority order, so re-sort after a vec_del

Change-Id: I77af4f3a7e826ea5c1a23ee8b348faefe9f2facc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agopg: icmp4 & tcp4 ip length issue 74/15574/2
Kingwel Xie [Sat, 27 Oct 2018 03:26:06 +0000 (23:26 -0400)]
pg: icmp4 & tcp4 ip length issue

length in ip4 header could be 0, when the length edit is fixed
this happens if length is not specified or size is specified as, f.g., 100-100
As a result, tcp and icmp would get a negative value for checksum calculation

Change-Id: I55fa1f5e95717ea4149cb3b8c9b73caf88ae7f98
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agopg: incrementing len should be truncated by 76/15576/2
Kingwel Xie [Sat, 27 Oct 2018 03:55:47 +0000 (23:55 -0400)]
pg: incrementing len should be truncated by
stream->max_packet_bytes

This length is the payload length, and will impact the ip length
when ip length is not specified. iplen = header_len + payload_len
SO, better to make it comply with max_packet_bytes

Change-Id: I8b0f7485e29fcaccae656f2d03b3b5e614300fb8
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agopg: allow creating pg for udp based protocols 75/15575/2
Kingwel Xie [Sat, 27 Oct 2018 03:42:15 +0000 (23:42 -0400)]
pg: allow creating pg for udp based protocols

f.g., gtpu4/6

Change-Id: I8bb1dc5fd2fba89ff17ec069a9816bafb9684190
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoEnumify interface flags 55/15555/4
Neale Ranns [Fri, 26 Oct 2018 12:17:03 +0000 (05:17 -0700)]
Enumify interface flags

clang will emit a warning when the wrong enum type is passed to a
function whose arguments are an enum type. free bug finding...

Change-Id: I62215d8ef22c7527a31272e31f5d190e4e762e53
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovmxnet3: add logging support to the control plane [VPP-1470] 73/15573/2
Steven [Sat, 27 Oct 2018 03:10:49 +0000 (20:10 -0700)]
vmxnet3: add logging support to the control plane [VPP-1470]

There are different flavors of vmxnet3 device, esxi server, vm fusion, vmware
workstation, and vmware player, that we need to communicate with. Each of
them also has different versions. We really need the control plane logging
to debug when things don't work as expected.

Change-Id: I53c23cf10958bfbc06abb1c252d368003563cd04
Signed-off-by: Steven <sluong@cisco.com>
5 years agovirtio: remove the extra return call 69/15569/3
Mohsin Kazmi [Fri, 26 Oct 2018 17:36:55 +0000 (19:36 +0200)]
virtio: remove the extra return call

Change-Id: I6e43953a6ad1bd672e69d8377d18bd9614b469d8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agodpdk: fix mlx5 build on SUSE 44/15544/4
Stephen Hemminger [Thu, 25 Oct 2018 21:40:24 +0000 (14:40 -0700)]
dpdk: fix mlx5 build on SUSE

Current mlx5 requires libmnl, and SUSE has a bug which
installs the header file in incorrect location.

Workaround (from upstream) is to use pkg-config.

Change-Id: Iadfd2dc0df211876258c31da028af2e8934483b3
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agocj: cj dump crash 29/15229/2
Steven [Wed, 10 Oct 2018 21:48:32 +0000 (14:48 -0700)]
cj: cj dump crash

Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
0x00007ffff670da53 in cj_dump_one_record (r=0x7ffff50f0fec)
    at /home/sluong/vpp3/vpp/src/vlib/unix/cj.c:138
138    (long long unsigned int) r->data[1]);

(gdb) p *cjm
$1 = {tail = 58645908, records = 0x7fffb64646ec, num_records = 512,
  enable = 1, vlib_main = 0x7ffff6953240 <vlib_global_main>}
(gdb) p /x cjm
$2 = 0x7ffff6953880
(gdb) p /x *cjm
$3 = {tail = 0x37edd94, records = 0x7fffb64646ec, num_records = 0x200,
  enable = 0x1, vlib_main = 0x7ffff6953240}
(gdb)

cjm->tail is a 64 bit counter, not the total number of records. Dumping from
0 to cjm->tail can be a very large number of records which go beyond the
limit. I believe we meant to dump from 0 to index. index has been set  by
this statement
  index = (cjm->tail + 1) & (cjm->num_records - 1);

Change-Id: Ie1a8ba757598de9757accc1488577c15aa49726b
Signed-off-by: Steven <sluong@cisco.com>
5 years agovxlan-gbp: On demand udp ports registration 96/15496/4
Mohsin Kazmi [Wed, 24 Oct 2018 10:17:50 +0000 (12:17 +0200)]
vxlan-gbp: On demand udp ports registration

Change-Id: I3a47c71ad3e35df47d11fed6db95019a45f3015f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoacl-plugin: fix the node multiarch function selection 36/15536/3
Andrew Yourtchenko [Thu, 25 Oct 2018 16:21:33 +0000 (18:21 +0200)]
acl-plugin: fix the node multiarch function selection

Thanks to Damjan for rewriting my previous patch into
not-to-be-deprecated soon form!

Change-Id: I595a13c44ed07d4c6d60e2aef0f0bd807a76cbba
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: ENA PMD patch for failure on port restart 35/15535/2
Matthew Smith [Thu, 25 Oct 2018 13:46:53 +0000 (08:46 -0500)]
dpdk: ENA PMD patch for failure on port restart

Patch to fix a bug in the ENA PMD on starting a port that
had previously been started and stopped. There was a
failure to allocate descriptors on start because they had
been allocated during the initial start and not released
when the port was stopped.

Issue reported/tracked at
https://github.com/amzn/amzn-drivers/issues/86

Change-Id: Id9c8d598929f0561788b985011fe5dea8f4a21a5
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoTrivial: Fix Makefile typo 53/15553/2
Paul Vinciguerra [Fri, 26 Oct 2018 11:42:31 +0000 (04:42 -0700)]
Trivial: Fix Makefile typo

Change-Id: Ia108b0359cb2dc4ba2e773117ee7134274a98056
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoextras/scripts: update vfctl script 54/15554/2
Damjan Marion [Fri, 26 Oct 2018 11:43:43 +0000 (13:43 +0200)]
extras/scripts: update vfctl script

Change-Id: I49cb5863237e4f9d2ac94879577d5d011e3bfe97
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodocs: add useful debug CLI Review Updates 63/15563/3
Scott Keeler [Fri, 26 Oct 2018 13:12:15 +0000 (09:12 -0400)]
docs: add useful debug CLI Review Updates

Change-Id: I4ebd977672090f2a7fc08bb139832df39614564a
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agovmxnet3: enable promiscuous mode 38/15538/2
Steven [Thu, 25 Oct 2018 18:04:42 +0000 (11:04 -0700)]
vmxnet3: enable promiscuous mode

Some L2 traffic requires promiscuous mode enable on the interface

Change-Id: Icbb2792aaf0d9d1c51373e46ae5049ff0d986863
Signed-off-by: Steven <sluong@cisco.com>
5 years agoRevert "Keep RPC traffic off the shared-memory API queue" 40/15540/2
Florin Coras [Thu, 25 Oct 2018 19:03:46 +0000 (19:03 +0000)]
Revert "Keep RPC traffic off the shared-memory API queue"

This reverts commit 71615399e194847d7833b744caedab9b841733e5.

There seems to be an issue with ARPs when running with multiple workers.

Change-Id: Iaa68081512362945a9caf24dcb8d70fc7c5b75df
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agopmalloc: don't lock 4K pages if we don't have access to pagemap 34/15534/2
Damjan Marion [Thu, 25 Oct 2018 13:56:04 +0000 (15:56 +0200)]
pmalloc: don't lock 4K pages if we don't have access to pagemap

Without pagemap access only way to do DMA to physmem is by
using IOMMU. In such case VFIO will take care for preventing
paging of such memory so we don't need to lock here.

Change-Id: Ica9c20659fba3ea3c96202eb5f7d29c43b313fa9
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoacl-plugin: "show acl-plugin acl" ACE# is truncated to 4 digits in output 97/15497/3
Andrew Yourtchenko [Wed, 24 Oct 2018 10:51:43 +0000 (12:51 +0200)]
acl-plugin: "show acl-plugin acl" ACE# is truncated to 4 digits in output

I was expecting "%4d" format string to exhibit the same behavior as
the one in C standard library, but rather than specifying _minimal_
width and expanding as necessary, it actually truncates the output.

Changing that to "%9d" should take care of pushing this surprising
difference in behavior into the domain of impossible.

Change-Id: Ia687137ca765bf9c1575af998ff11314010e81ad
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovnet/tcp/tcp.c: address a corner case. 28/15528/2
Paul Vinciguerra [Thu, 25 Oct 2018 12:14:19 +0000 (05:14 -0700)]
vnet/tcp/tcp.c: address a corner case.

Avoid possible null pointer dereference

Change-Id: If8023edb43aaf037234f4a7b5f191cb23b09c74d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTrivial: Cleanup missing va_ends. 15/15515/2
Paul Vinciguerra [Wed, 24 Oct 2018 19:14:09 +0000 (12:14 -0700)]
Trivial: Cleanup missing va_ends.

Change-Id: Ie7827b6a31968a355687d27325c0f30cab1bc890
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRun 'make test' verify job on ubuntu 18.04 instead of 16.04 25/15525/2
Damjan Marion [Thu, 25 Oct 2018 10:25:38 +0000 (12:25 +0200)]
Run 'make test' verify job on ubuntu 18.04 instead of 16.04

Change-Id: If570bb8cc19b2eab5877a20c963e27e410ee7560
Signed-off-by: Damjan Marion <damarion@cisco.com>
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>