vpp.git
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>
5 years agoTests: remote_test.py. Private member test catching dunder names. 61/18161/2
Paul Vinciguerra [Sun, 10 Mar 2019 14:03:22 +0000 (07:03 -0700)]
Tests: remote_test.py.  Private member test catching dunder names.

Private member check also catches __iter__, since it starts with '_'.

Fixes:
  Captured traceback:
  ~~~~~~~~~~~~~~~~~~
      b'Traceback (most recent call last):'
      b'  File "/vpp/test/test_memif.py", line 47, in tearDown'
      b'    remove_all_memif_vpp_config(self.remote_test)'
      b'  File "/vpp/test/vpp_memif.py", line 36, in remove_all_memif_vpp_config'
      b'    for d in dump:'
      b"TypeError: 'SerializableClassCopy' object is not iterable"
      b''

Change-Id: I6a3f3e0f2b1b2d0a2b97faa23bf542ff8f92de43
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: use self.assertNotIn(). 87/18087/2
Paul Vinciguerra [Wed, 6 Mar 2019 23:11:28 +0000 (15:11 -0800)]
Tests: use self.assertNotIn().

Many tests use self.assertEqual(error.find("failed"), -1)
Use self.assertNotIn("failed", error) to provide more meaningful errors such as
AssertionError: 'Failed' not found in '' instead of 0 != -1.

Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: 'Fix' __del__ in test/remote_test.py. 62/18162/2
Paul Vinciguerra [Sun, 10 Mar 2019 14:32:59 +0000 (07:32 -0700)]
Tests: 'Fix' __del__ in test/remote_test.py.

This is not a fix as much as supressing a warning.
__del__ is not a destructor.

test/remote_test.py:385:13: F821 undefined name 'cls'
            cls.vpp.poll()
            ^
test/remote_test.py:386:16: F821 undefined name 'cls'
            if cls.vpp.returncode is None:
               ^
test/remote_test.py:387:17: F821 undefined name 'cls'
                cls.vpp.terminate()
                ^
test/remote_test.py:388:17: F821 undefined name 'cls'
                cls.vpp.communicate()

Change-Id: I6f0ecf3ae5dee7f279a4e25994cc1c49470bca26
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTest: Fix hook.py: AttributeError 29/18129/2
Paul Vinciguerra [Fri, 8 Mar 2019 01:30:28 +0000 (17:30 -0800)]
Test: Fix hook.py: AttributeError

  File "/vpp/test/hook.py", line 84, in on_crash
    self.testcase.vpp_bin, core_path)
AttributeError: 'PollHook' object has no attribute 'testcase'

Change-Id: I84d9d86a5c6a5769a43a91cf23ce8a1141f7cd12
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoPerf tune get_frame_size_info 60/18160/3
Dave Barach [Sun, 10 Mar 2019 13:44:51 +0000 (09:44 -0400)]
Perf tune get_frame_size_info

It turns out that for scalar sizes 0..24, frames are always the same
size. That range includes all current use-cases - and then some - so
get rid of the hash table. Old code preserved under #ifdef
VLIB_SUPPORTS_ARBITRARY_SCALAR_SIZES.

Change-Id: Ic005c7143c9639f77d1a0fadd2fc0e90dccb68c1
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agovcl: update buf if whole buf cannot be done at once 59/18159/1
wuzhouhui [Sun, 10 Mar 2019 03:35:46 +0000 (11:35 +0800)]
vcl: update buf if whole buf cannot be done at once

Change-Id: I0d56d2cee012b46da848362f322d6f246f8bf4c2
Signed-off-by: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
5 years agoSVS: cleanup default route on SVS disable 45/18145/2
Neale Ranns [Fri, 8 Mar 2019 13:36:56 +0000 (13:36 +0000)]
SVS: cleanup default route on SVS disable

Change-Id: Ie0680330dd619cfdcb72ae8fb7e2463f732cff8c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix rcv_wnd computation 95/18095/3
Florin Coras [Thu, 7 Mar 2019 05:16:26 +0000 (21:16 -0800)]
tcp: fix rcv_wnd computation

Change-Id: I3cecffae2e30233d4725bd3eaf5ff4a8ff194fae
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession/tcp/vcl: fixes and optimizations 94/18094/5
Florin Coras [Thu, 7 Mar 2019 05:13:42 +0000 (21:13 -0800)]
session/tcp/vcl: fixes and optimizations

Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix window probes in fin-wait-1 88/18088/4
Florin Coras [Thu, 7 Mar 2019 00:51:58 +0000 (16:51 -0800)]
tcp: fix window probes in fin-wait-1

Change-Id: Idf060f385f4d9b2f42fdab6a1d372727beb8b19e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: reorganize session fields 82/18082/4
Florin Coras [Wed, 6 Mar 2019 20:04:24 +0000 (12:04 -0800)]
session: reorganize session fields

Change-Id: I7f3b015ea6750c9773e4285bb63b0d44fa2177b9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoupdates now that flags are supported on the API 31/18131/2
Neale Ranns [Fri, 8 Mar 2019 08:14:21 +0000 (00:14 -0800)]
updates now that flags are supported on the API

Change-Id: I9c45f390a6454c114f12f9c46c3a93fcecffa73f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoparse ethernet header in ct6_in2out 27/18127/2
Dave Barach [Thu, 7 Mar 2019 21:18:55 +0000 (16:18 -0500)]
parse ethernet header in ct6_in2out

fix a debug CLI scripting bug: cp_ip6_address_add_del_command_function
ate any subsequent commands, yielding indigestion.

Change-Id: Iaca7bed5687759da36ae91dc658e758549b71796
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoTests: Refactor payload_to_info() 81/18081/5
Paul Vinciguerra [Wed, 6 Mar 2019 19:58:06 +0000 (11:58 -0800)]
Tests: Refactor payload_to_info()

All callers of payload_to_info were required to wrap payload with str().
Refactor to call scapy's payload.load for raw payloads or specify the
specific fieldname.

Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508: Python3 tests. Explicitly specify string formatting. 72/18072/5
Paul Vinciguerra [Wed, 6 Mar 2019 16:23:58 +0000 (08:23 -0800)]
VPP-1508: Python3 tests.  Explicitly specify string formatting.

.format() doesn't understand what to do with binary values by default.
Specify that we expect coersion to string.

Change-Id: Ic4b697f70852124dc85ab231f76b7934d0d71f4d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508: test_acl_plugin vapi changes for Python3. 89/18089/7
Paul Vinciguerra [Thu, 7 Mar 2019 03:06:19 +0000 (19:06 -0800)]
VPP-1508: test_acl_plugin vapi changes for Python3.

Change-Id: I0863cefa523a6d7c11e48649b03f058130e5a4ee
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Adjust aenum import for python3. 26/18126/2
Paul Vinciguerra [Thu, 7 Mar 2019 19:26:23 +0000 (11:26 -0800)]
vpp_papi: Adjust aenum import for python3.

The stdlib introduced IntEnum in python 3.4 and IntFlag in python 3.6.

Change-Id: I3ac278a9d5a97eefa9fc4f1491f0cd030e40c3b2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agomake-test: Python pep8 compliance for sequences 80/18080/2
Naveen Joy [Wed, 6 Mar 2019 18:41:06 +0000 (10:41 -0800)]
make-test: Python pep8 compliance for sequences

For sequences, (strings, lists, tuples), use the fact that
empty sequences are false. A tiny change towards getting
full pep8 compliance, which will look good.
Yes: if not seq:
     if seq:
No:  if len(seq):
     if not len(seq):
(https://www.python.org/dev/peps/pep-0008/)

Change-Id: I6b565bef424f81afc66aba3b0041a5029a9f8954
Signed-off-by: Naveen Joy <najoy@cisco.com>
5 years agoHonor vnet_rewrite_data_t data_bytes == 0 20/18120/2
Dave Barach [Thu, 7 Mar 2019 15:06:52 +0000 (10:06 -0500)]
Honor vnet_rewrite_data_t data_bytes == 0

Avoid the cache miss consequences of spraying [functionally harmless]
junk into un-prefetched rewrite space. As things stand, several tunnel
encap rewrites set rewrite data_bytes = 0, and take a performance hit
due to unwanted speculative copying.

Should be performance-neutral in speed-path cases, which won't execute
the added check.

Change-Id: Id83c0325e58c0f31631b4bae5a06457dfc7ed567
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix typo in feature arc constraint 18/18118/2
Dave Barach [Thu, 7 Mar 2019 14:28:15 +0000 (09:28 -0500)]
Fix typo in feature arc constraint

Also, increase ip6 address field width in "show ip6 conn verbose"
output

Change-Id: If7d1bcd439d94a22d1f1c6c1298cb30aba13d0a2
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoassign flood_class to vnet_sw_interface_t template in subif api handle function 98/18098/2
Joe Zhou [Thu, 7 Mar 2019 07:05:32 +0000 (23:05 -0800)]
assign flood_class to vnet_sw_interface_t template in subif api handle function

Change-Id: I352f4a4adcf8771c21530657efcaecb532416612
Signed-off-by: Joe Zhou <zhouyoucn@qq.com>
5 years agoRemove local REPLY_MACRO so that socket transport works. 12/18112/3
Ole Troan [Thu, 7 Mar 2019 12:03:26 +0000 (13:03 +0100)]
Remove local REPLY_MACRO so that socket transport works.

memif, lacp, nsh and cdp used local REPLY_MACROs.
Remove and use those in api_helper.h

Change-Id: Ib01d6ae5cff0b6f1cef90996a54b3177f0c53463
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec: cli bug fixes 09/18109/2
Kingwel Xie [Thu, 7 Mar 2019 11:34:30 +0000 (06:34 -0500)]
ipsec: cli bug fixes

1. fix wrong assignemnt of lik/rik
2. keys initialized to 0, to avoid using random data
   in stack. could cause memory overlapped then crash
3. show sa->id in hex format

Change-Id: Id0430aa49bb55c27cee4f97f8c0e4ec87515dcd2
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoAPI: Add python2.7 support for enum flags via aenum 08/18108/2
Ole Troan [Thu, 7 Mar 2019 10:28:32 +0000 (11:28 +0100)]
API: Add python2.7 support for enum flags via aenum

Change-Id: I77a43bfb37d827727c331cd65eee77536cc15953
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoBIER: trace then drop. MPLS: trace the drops 68/18068/2
Neale Ranns [Wed, 6 Mar 2019 16:07:34 +0000 (08:07 -0800)]
BIER: trace then drop. MPLS: trace the drops

Change-Id: I952e6aec6487270a79c4d92cfe828cc55d42d536
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agogdb-helper: add gdb_show_traces 16/18016/2
Kingwel Xie [Tue, 5 Mar 2019 10:06:48 +0000 (05:06 -0500)]
gdb-helper: add gdb_show_traces

gdb_show_traces() dumps buffer traces.

Ease gdb debugging when vpp crashed...

Change-Id: Ib24314832386ee4defc2d31cbb4c05d293fb3338
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>