vpp.git
5 years agoBVI Interface 16/18316/8
Neale Ranns [Fri, 15 Mar 2019 09:16:20 +0000 (02:16 -0700)]
BVI Interface

a new dedicated BVI interface as opposed to [re]using a loopback.

benefits:
 - removes ambiguity over the purpose of a loopback interface
 - TX node dedicated to BVI only functions.

Change-Id: I749d6b38440d450ac5b909a28053c75ec9df946a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodocs: break up long lines in vmxnet3.rst to avoid line wrap 99/18399/3
Steven Luong [Tue, 19 Mar 2019 21:35:29 +0000 (14:35 -0700)]
docs: break up long lines in vmxnet3.rst to avoid line wrap

Although it does not make a difference for the formatter with long lines, it
is easier to view and read the raw text with conventional editor when there no
line wrap. Just break up the long lines to 80 characters or less.

Change-Id: Ia916638e974abd19b8d19aee4dd72ff6a243ca48
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoerror-drop; print interface by name 54/18454/2
Neale Ranns [Thu, 21 Mar 2019 10:20:15 +0000 (10:20 +0000)]
error-drop; print interface by name

Change-Id: I19736180c1e7e1d13dbb74bcd8f1dfae762b1d25
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC: Mutli-tunnel tests 42/18442/4
Neale Ranns [Wed, 20 Mar 2019 18:24:43 +0000 (18:24 +0000)]
IPSEC: Mutli-tunnel tests

Change-Id: I46f1db6579835c6613fdbb2b726246cc62b135fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoapi trace: cli bug fix 10/18410/2
ezkexma [Wed, 20 Mar 2019 16:02:33 +0000 (12:02 -0400)]
api trace: cli bug fix

vpp/src/vlibmemory/vlib_api_cli.c
Fixing the help string for the "set api-trace" command.

Change-Id: I70f85a4f55466d2cc01018c4ad8cbe8332dbb925
Signed-off-by: ezkexma <maqi.z.ke@ericsson.com>
5 years agoicmp: bug fix of buffer->error 45/18445/4
Kingwel Xie [Thu, 21 Mar 2019 01:47:17 +0000 (21:47 -0400)]
icmp: bug fix of buffer->error

Recent changes in icmp4/6 choose to free the original
buffer, and make a copy for sending icmp reply back.
However, buffer->error will be ignored when the buffer
is freed unconditionally.

A quick fix can be moving the counter increment code to icmp,
but I prefert to enqueue all buffers to 'error-drop' so that
they can be handled in a batch

rebase, using vlib_buffer_enqueue_to_single_next

Change-Id: I9f3028b55f1d5f634763e2410cd91e17f368195e
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoipsec: add ipv6 support for ipsec tunnel interface 18/18418/4
Kingwel Xie [Wed, 20 Mar 2019 11:21:58 +0000 (07:21 -0400)]
ipsec: add ipv6 support for ipsec tunnel interface

Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agovcl: mark app state as failed if attach fails 40/18440/3
Florin Coras [Wed, 20 Mar 2019 15:33:10 +0000 (08:33 -0700)]
vcl: mark app state as failed if attach fails

Change-Id: If6c3b9a9136390fb740e5c00fd270b7962a1c4ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agocrypto: add hmac truncate option 38/18438/3
Damjan Marion [Wed, 20 Mar 2019 15:30:54 +0000 (16:30 +0100)]
crypto: add hmac truncate option

This reverts commit 785368e559dbdf50676f74f43f13423c817abb52.

Change-Id: I782ac2be4e161790c73ccd4b08492e2188a6d79d
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocrypto_openssl: call EVP_EncryptFinal_ex only if needed 39/18439/2
Damjan Marion [Wed, 20 Mar 2019 15:28:51 +0000 (16:28 +0100)]
crypto_openssl: call EVP_EncryptFinal_ex only if needed

Change-Id: I4dc6749a67c0726bae20b8204a5171676308b909
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoIPSEC: Tunnel SA not deleted 26/18426/2
Neale Ranns [Wed, 20 Mar 2019 14:10:23 +0000 (14:10 +0000)]
IPSEC: Tunnel SA not deleted

p is overwritten by hash_unset so an incorrect value is passed to
ipsec_sa_del

Change-Id: I97300dd4421c62d7cfa47b8e7e9789becb2370e9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoipsec: keep crypto data inside SA 37/18437/2
Damjan Marion [Wed, 20 Mar 2019 15:07:09 +0000 (16:07 +0100)]
ipsec: keep crypto data inside SA

Change-Id: Ie8986bd3652d25c4befe681cea77df95aba37ebc
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoipsec: bug fix ipsec-init sequence 76/18376/3
Kingwel Xie [Tue, 19 Mar 2019 11:57:52 +0000 (07:57 -0400)]
ipsec: bug fix ipsec-init sequence

ipsec_tunnel_if_init might be called before ipsec_init
this memset in ipsec-init therefore zero the memory
allocated by ipsec_tunnel_if_init

Change-Id: Ie889f1bf624c76842ef77e5a51ed1d41fed4758d
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agocpu: fix rtype for fn selected by CLIB_MARCH_FN 36/18436/2
Florin Coras [Wed, 20 Mar 2019 15:11:14 +0000 (08:11 -0700)]
cpu: fix rtype for fn selected by CLIB_MARCH_FN

Change-Id: I79f65d7bd19af035442dca48b7be6c94de20c167
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: disable cc elog debugging 03/18403/4
Florin Coras [Wed, 20 Mar 2019 02:36:07 +0000 (19:36 -0700)]
tcp: disable cc elog debugging

Change-Id: Iffed748a15b9f01b985f9a6a9574a7bc42ab55aa
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoperfmon: python to C parser for intel CPUs 10/17110/7
Damjan Marion [Mon, 28 Jan 2019 12:27:31 +0000 (13:27 +0100)]
perfmon: python to C parser for intel CPUs

EXAMPLE:
src/plugins/perfmon/intel_json_to_c.py \
  -i skylakex_core_v1.12.json \
  -o src/plugins/perfmon/perfmon_intel_skx.c \
  -m 0x55,0 \
  -m 0x55,1 \
  -m 0x55,2 \
  -m 0x55,3

Change-Id: I16ce059e231d340ecfcb6f6638e29c5b46304683
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoldp: force exit if constructor init fails 04/18404/2
Florin Coras [Wed, 20 Mar 2019 02:44:51 +0000 (19:44 -0700)]
ldp: force exit if constructor init fails

Change-Id: I0c4659b9e413cf7291ec9e3b5a67de8ad8028cd3
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoRe-enable aarch64 neon instruction in vlib_buffer_free_inline 05/18405/2
Lijian.Zhang [Tue, 12 Mar 2019 10:32:39 +0000 (18:32 +0800)]
Re-enable aarch64 neon instruction in vlib_buffer_free_inline

int vaddvq_u8 (uint8x16_t __a) is not appropriate to implement xxx_is_all_zero,
as there may be overflow causing incorrect return value.

Here's an example.
u8x16 x = {0 <repeats 12 times>, 1, 255, 0, 0};

Change-Id: Ia6a10bdf8da360dec12db902d028751a1a77e9a4
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
5 years agotests: implement crypto tests per RFC2202 95/18395/2
Filip Tehlar [Tue, 19 Mar 2019 17:37:06 +0000 (10:37 -0700)]
tests: implement crypto tests per RFC2202

Change-Id: I18b30d5ee8aa60c34d52b7716b5feb7225cb0d59
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agotests: cdp plugin. Replace cdp enable cli command with API call. 77/18377/2
Paul Vinciguerra [Tue, 19 Mar 2019 12:44:16 +0000 (05:44 -0700)]
tests: cdp plugin. Replace cdp enable cli command with API call.

Change-Id: Ic2d21b535a58c1c618ec9e652d30858ad45a7d43
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Expose the list of field attributes to the client. 00/18400/2
Paul Vinciguerra [Tue, 19 Mar 2019 22:04:17 +0000 (15:04 -0700)]
vpp_papi: Expose the list of field attributes to the client.

Change-Id: I7aba1760f68798fc5bea1244ce798e4b528a4df4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotests: replace CLI command with API for flowprobe params. 83/18383/2
Paul Vinciguerra [Tue, 19 Mar 2019 15:07:53 +0000 (08:07 -0700)]
tests: replace CLI command with API for flowprobe params.

Change-Id: If446a0d111b89f0a761db41696e0d6ca912312f0
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: specify encoding for .encode()/.decode() 01/18401/1
Paul Vinciguerra [Wed, 20 Mar 2019 00:32:39 +0000 (17:32 -0700)]
vpp_papi: specify encoding for .encode()/.decode()

py2 defaults to 'ascii', py3 defaults to 'utf-8'.

Change-Id: Ib76d0ec56f24535e4bafd397cc6fb5e85967d508
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoMAP: Add optional user-supplied 'tag' field in MAPs. 04/18304/3
Jon Loeliger [Tue, 12 Mar 2019 18:09:08 +0000 (13:09 -0500)]
MAP: Add optional user-supplied 'tag' field in MAPs.

Like other entities, allow an arbitrray user-supplied 'tag'
field to be place on created MAP domains.  It is also later
returned with the MAP details.  You might be thinking "User
assigned MAP name" here.

As the MAP domain structure was at the limit of a cacheline size,
introduce a parallel "extra data" vector with non-essential domain
information in it.

Change-Id: Icc12b64cc4cb3e040c9a475908b19f6abaf4c293
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoRevert "tests: Deprecate the use of CLI commands in tests." 94/18394/2
Neale Ranns [Tue, 19 Mar 2019 16:52:27 +0000 (16:52 +0000)]
Revert "tests: Deprecate the use of CLI commands in tests."

This reverts commit e2e8f02165f27ae04e6d20ce0c628e29271a8db6.

Change-Id: Ie23dcb8a5b3e96f77e0d117a6887c43064c79669
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto: introduce crypto infra 75/18375/5
Damjan Marion [Mon, 18 Mar 2019 17:59:25 +0000 (18:59 +0100)]
crypto: introduce crypto infra

Change-Id: Ibf320b3e7b054b686f3af9a55afd5d5bda9b1048
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoadd default NONE flag for bd_flags 20/18320/3
Michal Cmarada [Fri, 15 Mar 2019 09:46:07 +0000 (10:46 +0100)]
add default NONE flag for bd_flags

Change-Id: I316bcc3d0244cf89bd1e2fc8a08cfac6aad0b22c
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agoIPSEC: remove byte swap operations in DP during SPD classify 69/18369/3
Neale Ranns [Mon, 18 Mar 2019 17:11:28 +0000 (17:11 +0000)]
IPSEC: remove byte swap operations in DP during SPD classify

Change-Id: I4bfde738f9585b045cb5ba62cf51b141d639b1b2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC: tidy the policy types 74/18374/2
Neale Ranns [Tue, 19 Mar 2019 10:06:00 +0000 (10:06 +0000)]
IPSEC: tidy the policy types

Change-Id: I5e981f12ff44243623cfd18d5e0ae06a7dfd1eb8
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodocs: Update vmxnet3 usecase 06/18306/4
Steven Luong [Thu, 14 Mar 2019 19:07:29 +0000 (12:07 -0700)]
docs: Update vmxnet3 usecase

Update vmxnet3 usecase to reflect the current supported features.

Change-Id: I4558eb422d5b2641b3acfc7c0a3734bf31a8fb0f
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agosession: add session flags 67/18367/4
Florin Coras [Mon, 18 Mar 2019 16:06:35 +0000 (09:06 -0700)]
session: add session flags

- use flag instead of enqueue_epoch for enqueueing rx events.
- use flag for proxy sessions

Change-Id: Iec3eee55a68d02536ece6329348a3369c7c7412e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix build with newer linux headers 66/18366/2
Damjan Marion [Mon, 18 Mar 2019 16:06:51 +0000 (17:06 +0100)]
Fix build with newer linux headers

Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVOM: GBP: L3-out subnets need only the sclass not an EPG 38/18338/3
Neale Ranns [Fri, 15 Mar 2019 16:04:52 +0000 (09:04 -0700)]
VOM: GBP: L3-out subnets need only the sclass not an EPG

Change-Id: Ic600233ea69216aeee707a103bf840fbeec5c205
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotests: Speedup tests by 30%. 45/18345/2
Paul Vinciguerra [Sat, 16 Mar 2019 02:16:50 +0000 (19:16 -0700)]
tests:  Speedup tests by 30%.

Baseline:
  2598325153 function calls (2598296959 primitive calls) in 2257.698 seconds

Post-changeset:
 1495427 function calls (1467233 primitive calls) in 1572.080 seconds

Change-Id: I191b68b29c9e0f19964bf0b8879ddf357c9cbd5c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: Trivial. Define constants once. 50/18350/2
Paul Vinciguerra [Sun, 17 Mar 2019 15:42:58 +0000 (08:42 -0700)]
Tests: Trivial. Define constants once.

Change-Id: Iaf106962598d04708e8740e016d5c55ff35432c9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotests: Deprecate the use of CLI commands in tests. 49/18349/2
Paul Vinciguerra [Sun, 17 Mar 2019 14:17:03 +0000 (07:17 -0700)]
tests: Deprecate the use of CLI commands in tests.

Since the stated policy regarding CLI commands is:
  "Note that the debug CLI is a developer's tool
   - no warranty express or implied - and that
   we may choose not to fix debug CLI bugs.",

this change emits a deprecation warning whenever a test case calls a CLI command.

Change-Id: I91b30e86ae1b2fca36732837f36cdda762cdf458
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovmxnet3: auto bind support 01/18301/5
Steven Luong [Thu, 14 Mar 2019 16:57:09 +0000 (09:57 -0700)]
vmxnet3: auto bind support

For creating the vmxnet3 interface, add the bind option to automatically bind
the pci to vfio-pci module which removes the need for manual bind. Manual bind
still works, should people prefer to go that route.

Change-Id: Ife75926f8755d754a08dd0ecff0f1de326ad5ba1
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agovnet: disable the expansion of the heap allocated for classifier tables 57/18357/1
Andrew Yourtchenko [Mon, 18 Mar 2019 09:49:56 +0000 (10:49 +0100)]
vnet: disable the expansion of the heap allocated for classifier tables

Classifier data structures assume the contiguous chunk of memory
within the heap. Default heap flags for dlmalloc allow for heap growth.
When that happens, the memory becomes discontiguous. This results
in symptoms that are more cryptic than necessary.

Disabling the expand makes the session allocation behavior
of the classifier the same for dlmalloc as for the legacy allocator.

Change-Id: I2f725b5f78a31a8eaa5f5a20dfdd7e1129662f6a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoFix bihash bucket double unlock. 36/18336/4
Tom Seidenberg [Fri, 15 Mar 2019 14:15:26 +0000 (10:15 -0400)]
Fix bihash bucket double unlock.

Change-Id: Icc9bef32d1bb2b8f277598c50c69343c81f22cd2
Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
5 years agoPAPI: Build python3 package for vpp_papi 64/18264/5
Ole Troan [Wed, 13 Mar 2019 17:08:42 +0000 (18:08 +0100)]
PAPI: Build python3 package for vpp_papi

Change-Id: Iae53fe88a69b53b75a7439d159ae0f9d18545908
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoRevert "API: Cleanup APIs interface.api" 40/18340/2
Ole Trøan [Fri, 15 Mar 2019 16:14:41 +0000 (16:14 +0000)]
Revert "API: Cleanup APIs interface.api"

This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd.

Allow time for CSIT to accommodate.

Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2
Signed-off-by: ot@cisco.com
5 years agoDOC ONLY: fix g2 build documentation 35/18335/1
Dave Barach [Fri, 15 Mar 2019 15:27:30 +0000 (11:27 -0400)]
DOC ONLY: fix g2 build documentation

Removed a broken paragraph, replaced it with a link.

Some nuisance white-space cleanups courtesy of emacs:
(add-hook 'before-save-hook 'delete-trailing-whitespace)

Change-Id: Ib348107c2dc0df8249461591015347d7b4f6fa4a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovcl: cleanup debug messages 11/18311/3
Florin Coras [Fri, 15 Mar 2019 02:07:51 +0000 (19:07 -0700)]
vcl: cleanup debug messages

Change-Id: Ida3ecffc9a4d7a080ad63cd48fd4b5330b732ffb
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAPI: Cleanup APIs interface.api 57/17957/9
Jakub Grajciar [Fri, 1 Mar 2019 07:55:49 +0000 (08:55 +0100)]
API: Cleanup APIs interface.api

Use of consistent API types for interface.api

Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoAdd @deprecated decorator. 91/18291/2
Paul Vinciguerra [Thu, 14 Mar 2019 13:52:31 +0000 (06:52 -0700)]
Add @deprecated decorator.

import deprecation

@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
                        current_version=__version__,
                        details="Use the bar function instead")
def foo():
    """Do some stuff"""
    return 1

Change-Id: Ib2ec5dd90445c9967eb39dbf6543cafd48b7f866
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: test/test_flowprobe.py Fix TypeError. 96/18296/2
Paul Vinciguerra [Thu, 14 Mar 2019 15:46:52 +0000 (08:46 -0700)]
Tests: test/test_flowprobe.py Fix TypeError.

TypeError: not all arguments converted during string formatting

Change-Id: I0b4b27e37ba47e737aeb639c9787f8bc08a92dce
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoGBP: coverity legit bug 08/18308/3
Neale Ranns [Thu, 14 Mar 2019 19:15:17 +0000 (15:15 -0400)]
GBP: coverity legit bug

Change-Id: Ia7d98842669c605052371c2bf6a016e4b4f7dc8f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: drop anything but fins in TIME_WAIT 71/18271/3
Florin Coras [Wed, 13 Mar 2019 20:25:57 +0000 (13:25 -0700)]
tcp: drop anything but fins in TIME_WAIT

Change-Id: I8414c2ed8bda59504330aad5f1a80dfe08dd85de
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoUpdate documentation for src/vnet/interface.api sw_interface_dump 99/18299/2
Paul Vinciguerra [Thu, 14 Mar 2019 16:47:29 +0000 (09:47 -0700)]
Update documentation for src/vnet/interface.api sw_interface_dump

Change-Id: Idcb15632ffe45ec269f2482be2ada967f41f19be
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoGBP: update semantics for subnets 94/18294/2
Neale Ranns [Thu, 14 Mar 2019 15:06:48 +0000 (08:06 -0700)]
GBP: update semantics for subnets

Change-Id: I895c03b365619e6c66613242f4a97c79ce579879
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIGMP: typo and doc fix (no behaviour change) 00/18300/1
Neale Ranns [Thu, 14 Mar 2019 16:51:23 +0000 (09:51 -0700)]
IGMP: typo and doc fix (no behaviour change)

Change-Id: I1c870f90a8e0d14b972593e72242b430c13d3bf2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoacl-plugin: fix the l2l3 unittest to actually verify the pcap 86/18286/2
Andrew Yourtchenko [Thu, 14 Mar 2019 11:54:36 +0000 (12:54 +0100)]
acl-plugin: fix the l2l3 unittest to actually verify the pcap

Thanks to Paul Vinciguerra for spotting it.

Change-Id: I1f776c3c21865dbc52c4d659c62cbfa4967e15e9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: Add E810 family support 74/18274/2
ChenminSun [Wed, 13 Mar 2019 14:18:39 +0000 (22:18 +0800)]
dpdk: Add E810 family support

Change-Id: Id5b30d7a394551844a79b3d222d2d26194d033df
Signed-off-by: ChenminSun <chenmin.sun@intel.com>
5 years agoGBP: Endpoint flags 82/18282/2
Neale Ranns [Thu, 14 Mar 2019 09:22:24 +0000 (02:22 -0700)]
GBP: Endpoint flags

Change-Id: I4d70985ad078e84ec23ce704c8b76e2ac7809419
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTEST: link-state up/down notifications on FIB forwarding 52/18252/3
Neale Ranns [Wed, 13 Mar 2019 13:41:52 +0000 (06:41 -0700)]
TEST: link-state up/down notifications on FIB forwarding

Change-Id: I478c4e5feb9603b7443efdf2967f98f9bde7ea0f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: fix coverity warning 72/18272/2
Florin Coras [Wed, 13 Mar 2019 23:01:38 +0000 (16:01 -0700)]
vcl: fix coverity warning

Change-Id: I048276fd26e6e079ce31b9aeb1265f5d929f8540
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: get source address from ARP packets for LPM classification 81/18281/1
Neale Ranns [Thu, 14 Mar 2019 09:52:27 +0000 (02:52 -0700)]
GBP: get source address from ARP packets for LPM classification

Change-Id: I1370c1882f8ba9b709e54e62356d2c57d47d20fc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession rule cli add udp session fail 29/18229/2
zhanglimao [Wed, 13 Mar 2019 02:36:54 +0000 (10:36 +0800)]
session rule cli add udp session fail

current session rule cli can not add session rule of proto is udp.
because vnet_session_rule_add_del function's paramter does not include transport_proto element in args struct,
but session rule type on the basis of input args's transport_proto when create session rule with vnet_session_rule_add_del function,
so just add transport_proto element to vnet_session_rule_add_del function's args that to solve this problem

Change-Id: If1a5942b4a0b006d73376e0cb01b97e84c593493
Signed-off-by: zhanglimao <zhanglimao0017@gmail.com>
5 years agoVPP-1576: fix a set of coverity warnings 70/18270/1
Dave Barach [Wed, 13 Mar 2019 19:29:15 +0000 (15:29 -0400)]
VPP-1576: fix a set of coverity warnings

Change-Id: Ifd34aed8692d5acaa370d4976d974ac573e43705
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agobuffers: don't use clib_memcpy for copying buffer indices 48/18248/2
Damjan Marion [Wed, 13 Mar 2019 11:41:54 +0000 (12:41 +0100)]
buffers: don't use clib_memcpy for copying buffer indices

Should be faster this way if n_indices is not constant value

Change-Id: I6c34fd313daa2392199f3b9bd20d0cd6cf9ae21b
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovhost-user: restart vpp may cause vhost to crash 54/18254/1
Steven Luong [Wed, 13 Mar 2019 04:35:42 +0000 (21:35 -0700)]
vhost-user: restart vpp may cause vhost to crash

Fix a typo in vhost_user_rx_discard_packet which may cause
txvq->last_avail_idx to go wild.

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

5 years agoMove the punt/drop nodes into vlib 16/18116/5
Neale Ranns [Fri, 1 Mar 2019 15:53:11 +0000 (15:53 +0000)]
Move the punt/drop nodes into vlib

The core VLIB library now has a means to dispoe of buffers.

the vlib punt/drop node counts node errors.
the vnet punt/drop node counts interface errors.

speed up both nodes with the usual reciepe.

before:
  error-drop   8.33e1

after:
  drop   4.51e1
  error-drop  6.81e0

Change-Id: If2e919458a3f2e9d71dbf9c6f1352dafb186a05b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodeprecate VLIB_DEVICE_TX_FUNCTION_MULTIARCH 51/18251/1
Filip Tehlar [Wed, 13 Mar 2019 12:50:44 +0000 (05:50 -0700)]
deprecate VLIB_DEVICE_TX_FUNCTION_MULTIARCH

Change-Id: I8819bcb9e228e7a432f4a7b67b6107f984927cd4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoAdd the SRIOV variant PCI Device ID of the Cisco VIC 22/18222/2
Jay Lubomirski [Tue, 12 Mar 2019 20:44:00 +0000 (16:44 -0400)]
Add the SRIOV variant PCI Device ID of the Cisco VIC

Change-Id: I572cbba817275d85c200a4b09a63f4650075f638
Signed-off-by: Jay Lubomirski <jlubomir@cisco.com>
5 years agoTests: post-merge review comments for https://gerrit.fd.io/r/#/c/18081/ 32/18232/2
Paul Vinciguerra [Wed, 13 Mar 2019 03:04:56 +0000 (20:04 -0700)]
Tests: post-merge review comments for https://gerrit.fd.io/r/#/c/18081/

Change-Id: I2195b3264b5db34d869facf669f3e71a04fe3ff9
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agobuffers: fix ref_count mask in vlib_buffer_free_inline 47/18247/1
Damjan Marion [Wed, 13 Mar 2019 11:04:10 +0000 (12:04 +0100)]
buffers: fix ref_count mask in vlib_buffer_free_inline

Credits to: Lollita Liu <lollita.liu@ericsson.com>

Change-Id: I40f7ad9cc5220db7ac4571cb14feaf22fc02aa2e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodeprecate VLIB_NODE_FUNCTION_MULTIARCH 40/18240/2
Filip Tehlar [Mon, 11 Mar 2019 12:53:35 +0000 (05:53 -0700)]
deprecate VLIB_NODE_FUNCTION_MULTIARCH

Change-Id: I403173846bc5b1bbbe2a2c41225b0f666f851cb9
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agotcp: fix entering closing state while in fast recovery 33/18233/5
Florin Coras [Wed, 13 Mar 2019 03:37:09 +0000 (20:37 -0700)]
tcp: fix entering closing state while in fast recovery

Change-Id: I30470e8a1404632b0350056769338dc69a94c105
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: avoid computing flags in push hdr inline 25/18225/2
Florin Coras [Tue, 12 Mar 2019 23:56:26 +0000 (16:56 -0700)]
tcp: avoid computing flags in push hdr inline

Change-Id: I579eef6d70b94b20e22b7b116ac63b2d7af49b22
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovmbus: not having uio_hv_generic is not an error 31/18231/2
Stephen Hemminger [Wed, 13 Mar 2019 02:06:32 +0000 (19:06 -0700)]
vmbus: not having uio_hv_generic is not an error

If uio_hv_generic is not loaded, then the startup code will
fallback to the older failsafe/tap method of initialization
in DPDK.  Therefore don't put out scary message in the log.

Also, reorder startup to avoid manipulating lower device until/unless
uio is going to work.

Change-Id: Ie1cc77b4b5359c04f00a93d01a772eccf3bbab37
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoTests: Raise exception, don't raise string. 26/18226/1
Paul Vinciguerra [Wed, 13 Mar 2019 00:41:27 +0000 (17:41 -0700)]
Tests: Raise exception, don't raise string.

This was deprecated ~ python 2.4, and causes a TypeError as sideEffect.

>>> raise "foo"
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: exceptions must derive from BaseException

Change-Id: I4117b6d60ae896eaa1ef2a73a323d8d241f8c3a7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoUse AVX2 as default even on AVX512 systems 21/18221/2
Damjan Marion [Tue, 12 Mar 2019 18:59:22 +0000 (19:59 +0100)]
Use AVX2 as default even on AVX512 systems

Use of scalar AVX512 instructions impacts the maximum CPU frequency
as they require CPU to request level 1 power license.

So sparse use of AVX512 like we do, typically causes more harm than
improvement.

This patch makes AVX2 higher priority than AVX512, but still there
is option to change it on per-node basis:

vpp# set node function ethernet-input avx512

Change-Id: I42e03510a6efc1756e22fbb70e8c76d7f74f59d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosvm mq: add unit test 69/18169/8
Florin Coras [Sun, 10 Mar 2019 01:45:25 +0000 (17:45 -0800)]
svm mq: add unit test

Change-Id: I2f1fa15a99163b9c105707484503dc9502265c52
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: print congestion control algorithm in cli 00/18200/2
Florin Coras [Tue, 12 Mar 2019 04:59:00 +0000 (21:59 -0700)]
tcp: print congestion control algorithm in cli

And shuffle some of the other connection variables.

Change-Id: Ib5361d0a45537a3bd2421b8e4145ea0f0e525d91
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodpdk: pass log-level configuration to EAL 17/18217/2
Stephen Hemminger [Tue, 12 Mar 2019 16:47:16 +0000 (09:47 -0700)]
dpdk: pass log-level configuration to EAL

The log-level dpdk config value should be transparently
forwarded to DPDK via EAL argument.  Since DPDK now supports
naming log-levels, VPP no longer needs to parse and call
rte_set_loglevel().

This was the other part of the DPDK log-level change.
It must have got missed during my initial checkin.
Without it passing dynamic log-level values like are silently
ignored.

Fixes: 6ca6ac6c887e ("dpdk: support passing log-level")
Change-Id: I732cec5f638c9924e3ffb04c4753f957e3633d64
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoPerf tune handoff queue polling 91/18191/3
Dave Barach [Mon, 11 Mar 2019 13:57:38 +0000 (09:57 -0400)]
Perf tune handoff queue polling

Change-Id: I5cfa0f6eee67156bf87907fcf8a39f16d68a0905
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoip: migrate old MULTIARCH macros to VLIB_NODE_FN 84/18184/3
Filip Tehlar [Mon, 11 Mar 2019 12:30:21 +0000 (05:30 -0700)]
ip: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Id55ec87724e421d5b722314f9302c6ade7545306
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agol2: migrate old MULTIARCH macros to VLIB_NODE_FN 76/18176/2
Filip Tehlar [Mon, 11 Mar 2019 11:26:37 +0000 (04:26 -0700)]
l2: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I8370c06150ce4499475e9d6dc6b3ab8be2016202
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoDOC ONLY: add packet handoff doc 10/18210/2
Dave Barach [Tue, 12 Mar 2019 12:54:21 +0000 (08:54 -0400)]
DOC ONLY: add packet handoff doc

Change-Id: I2e8076bb4f697819780e61ff761defdc74bf4f09
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoVPP-1585: fix dns test cli 12/18212/2
Filip Tehlar [Tue, 12 Mar 2019 13:17:59 +0000 (06:17 -0700)]
VPP-1585: fix dns test cli

Change-Id: Iac105e09bb88434fe55365fc1546d769f034e0e2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoGBP: L3 out fixes 13/18213/4
Neale Ranns [Tue, 12 Mar 2019 09:34:07 +0000 (02:34 -0700)]
GBP: L3 out fixes

Change-Id: I0562d597fd45c7ddcb6db42cf17d3ffb569eb140
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: custom-dump functions 89/18189/6
Neale Ranns [Mon, 11 Mar 2019 13:11:39 +0000 (06:11 -0700)]
GBP: custom-dump functions

Change-Id: I719882acb59bd069fd88b10989f11085a0c41ae6
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoFIB: path parsing, table-id not fib-index (VPP-1586) 85/18185/6
Neale Ranns [Mon, 11 Mar 2019 12:34:50 +0000 (05:34 -0700)]
FIB: path parsing, table-id not fib-index (VPP-1586)

Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: contracts API fixed length of allowed ethertypes 09/18209/3
Neale Ranns [Tue, 12 Mar 2019 11:34:53 +0000 (04:34 -0700)]
GBP: contracts API fixed length of allowed ethertypes

VAPI does not handle two VLAs in one struct.

Change-Id: I259c998bef4398ead2bbb9e788350d50c2f05694
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoICMP46 error: Clone first buffer instead of "truncating" original buffer 83/18183/6
Ole Troan [Mon, 11 Mar 2019 12:15:54 +0000 (13:15 +0100)]
ICMP46 error: Clone first buffer instead of "truncating" original buffer

Previous code was walked buffer chain, effectively trying to "truncate" the chain, reset the
length of first buffer and reused that as the ICMP error message. That could have issues in cases
there were other users of the buffer chain. Update to clone the first buffer in chain, and
use that for the ICMP error message instead.

Change-Id: Ibc1a0bf2d854dae41874808c8297028ed93dd69d
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1486: Unittest for stat segment file descriptor leak. 77/18177/2
Paul Vinciguerra [Mon, 11 Mar 2019 12:04:12 +0000 (05:04 -0700)]
VPP-1486: Unittest for stat segment file descriptor leak.

Verifies: https://gerrit.fd.io/r/#/c/18167/

Before patch:

    ==============================================================================
    Test Stats Client
    ==============================================================================
    Test file descriptor count - VPP-1486                                    FAIL [ temp dir used by test case: /tmp/vpp-unittest-StatsClientTestCase-EAp0e7 ]

    ==============================================================================
    FAIL: Test file descriptor count - VPP-1486
    ------------------------------------------------------------------------------
    Traceback (most recent call last):
      File "/vpp/test/test_stats_client.py", line 39, in test_client_fd_leak
        initial_fds, ending_fds))
    AssertionError: initial client side file descriptor count: 20 is not equal to ending client side file descriptor count: 120

    04:55:38,038 Symlink to failed testcase directory: /tmp/vpp-failed-unittests/vpp-unittest-StatsClientTestCase-EAp0e7-FAILED -> vpp-unittest-StatsClientTestCase-EAp0e7

    ==============================================================================
    TEST RESULTS:
         Scheduled tests: 1
          Executed tests: 1
            Passed tests: 0
                Failures: 1
    FAILURES AND ERRORS IN TESTS:
      Testcase name: Test Stats Client
        FAILURE: Test file descriptor count - VPP-1486 [test_stats_client.StatsClientTestCase.test_client_fd_leak]
    =============================================================================

After patch:

    ==============================================================================
    Test Stats Client
    ==============================================================================
    Test file descriptor count - VPP-1486                                    OK

    ==============================================================================
    TEST RESULTS:
         Scheduled tests: 1
          Executed tests: 1
            Passed tests: 1
    ==============================================================================

    Test run was successful

Change-Id: I055e473ecf0566ebfbfbadd58ec6eaf11fc77d68
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoFIB: crash when deleting default route 38/18138/3
Neale Ranns [Fri, 8 Mar 2019 12:18:40 +0000 (12:18 +0000)]
FIB: crash when deleting default route

when adding a recursive path the table is locked
so that it can be removed when the last recursive path
is removed. however, not all RR source'd prefixs use
a recursive path. so flushing the table of all RR source'd
entries is not correct.

Change-Id: Id4010774011046e66ddc443ac83cb8e9245313dd
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agobfd: register udp ports only when enabled 88/18188/2
Klement Sekera [Mon, 11 Mar 2019 13:04:19 +0000 (14:04 +0100)]
bfd: register udp ports only when enabled

Change-Id: Iffb4b314be3ded0d9c6acb77ec1c6f22778f301d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovpp_papi_provider: Remove more wrapper functions. 96/18196/2
Ole Troan [Mon, 11 Mar 2019 18:23:25 +0000 (19:23 +0100)]
vpp_papi_provider: Remove more wrapper functions.

Split this work up into pieces.
Please don't add new wrappers to vpp_papi_provider.py.

Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoldp: fix worker alloc when using eventfds 95/18195/1
Florin Coras [Mon, 11 Mar 2019 17:14:37 +0000 (10:14 -0700)]
ldp: fix worker alloc when using eventfds

Change-Id: Icfba7ae9cbf504a8966923eac06c9eb0e11899d2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodisable multiarch for error-drop 87/18187/1
Filip Tehlar [Mon, 11 Mar 2019 12:54:56 +0000 (05:54 -0700)]
disable multiarch for error-drop

this is a workaround that avoids building/linking other archs for error-node.
Combination error-node + avx512 arch triggers a crash in pg during
test run.

Change-Id: I6ed39fdf0a58f82d951082b1cf91ab2a57d8108c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoVPP-1533: Deleting a non-existent pre-resolved MAP next-hop causes VPP core dump 74/18174/2
Ole Troan [Mon, 11 Mar 2019 08:47:31 +0000 (09:47 +0100)]
VPP-1533: Deleting a non-existent pre-resolved MAP next-hop causes VPP core dump

Change-Id: I6f0830b786ac46c69c867f73b044aab174e6210b
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1508: Tests: Fix vpp_api struct.error under py3. 30/18130/3
Paul Vinciguerra [Fri, 8 Mar 2019 01:55:33 +0000 (17:55 -0800)]
VPP-1508: Tests: Fix vpp_api struct.error under py3.

Fix struct.error: expected bytes object got <class 'str'>

Change-Id: I837ae6e97e44c789a9372677151b157956525334
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agodpo: migrate old MULTIARCH macros to VLIB_NODE_FN 06/18106/5
Filip Tehlar [Thu, 7 Mar 2019 09:42:11 +0000 (01:42 -0800)]
dpo: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I3043112c3e7584f61e64dc6d20d57604ebceb76a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agomfib: migrate old MULTIARCH macros to VLIB_NODE_FN 03/18103/3
Filip Tehlar [Thu, 7 Mar 2019 08:30:03 +0000 (00:30 -0800)]
mfib: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I7114cd55ce1fc320d17b36cab731546fe4c58a72
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agotls: fixes and improvements 85/18085/8
Florin Coras [Wed, 6 Mar 2019 22:44:42 +0000 (14:44 -0800)]
tls: fixes and improvements

- disconnect sessions through session layer apis instead of directly
notifying the app worker.
- improve cli
- increase fifo sizes for tls app

Change-Id: I8a7d2865b3b00724e2a9da29fa4a906ea867da9b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: fix ct that match global table entries 70/18170/3
Florin Coras [Mon, 11 Mar 2019 04:03:20 +0000 (21:03 -0700)]
session: fix ct that match global table entries

Change-Id: I42addcd413094a8b6e9b2858ba2a292bd295ec82
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVPP-1486: stat segment file descriptor leak 67/18167/3
Ole Troan [Sun, 10 Mar 2019 20:26:14 +0000 (21:26 +0100)]
VPP-1486: stat segment file descriptor leak

Close the mmap file descriptor at first opportunity.

Change-Id: If8faa1de0a57dc7d8abb3eed97861813b841bd92
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1508: Use scapy.compat to manage packet level library differences. 65/18165/3
Paul Vinciguerra [Sun, 10 Mar 2019 17:04:23 +0000 (10:04 -0700)]
VPP-1508: Use scapy.compat to manage packet level library differences.

Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: fix time.sleep(0) # yield. Reduce sleep related log messages. 64/18164/2
Paul Vinciguerra [Sun, 10 Mar 2019 16:10:54 +0000 (09:10 -0700)]
Tests: fix time.sleep(0) # yield. Reduce sleep related log messages.

Reduce the incidence of:
20:04:23,606 unexpected time.sleep() result - slept for 2.187967e-03s instead of ~6.837845e-04s!

Change-Id: Ic576fda7f75e571c9019111588a6a936ee2cf5c2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>