vpp.git
5 years agoipsec: ipsec-tun protect 56/18956/18
Neale Ranns [Thu, 7 Feb 2019 15:26:12 +0000 (07:26 -0800)]
ipsec: ipsec-tun protect

please consult the new tunnel proposal at:
  https://wiki.fd.io/view/VPP/IPSec

Type: feature

Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agofib: fib api updates 96/12296/42
Neale Ranns [Tue, 1 May 2018 12:17:55 +0000 (05:17 -0700)]
fib: fib api updates

Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
  is_multipath - if set the the set of paths passed will be added to those
                 that already exist, otherwise the set will replace them.
  is_add - add or remove the set

is_add=0, is_multipath=1 and an empty set, results in deleting the route.

It is also considerably faster to add multiple paths at once, than one at a time:

vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec

vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec

Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agostats: off by one error in /sys/node/{calls,clocks,...} 10/20210/2
Ole Troan [Tue, 18 Jun 2019 11:56:05 +0000 (13:56 +0200)]
stats: off by one error in /sys/node/{calls,clocks,...}

Fixes: 58492a8372
Change-Id: Ia2eeebc2488b57e57f8d5e52f9948d1cced7b6fc
Type: fix
Ticket: VPP-1698
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agostats: fix memory leakage when adding / deleting interfaces 58/20158/6
Ole Troan [Sun, 16 Jun 2019 10:33:51 +0000 (12:33 +0200)]
stats: fix memory leakage when adding / deleting interfaces

This fixes two leaks in registering errors in the stats segment.
- The error name created by vlib_register_errors() was not freed.
- Duplicate error names (when interface readded) was added to the vector.

This fix also adds memory usage statistics for the statistics segment
as /mem/statseg/{used, total}

Change-Id: Ife98d5fc5baef5bdae426a5a1eef428af2b9ab8a
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agomisc: vpp_papi- add tests, clean up pep8 35/20035/4
Paul Vinciguerra [Fri, 7 Jun 2019 17:35:37 +0000 (13:35 -0400)]
misc: vpp_papi- add tests, clean up pep8

Type: test

Change-Id: Ic81bd4a9eba3c89a746e7a9b9e471b59cd87fa40
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoapi: string type to convert to vector 87/20087/6
Ole Troan [Wed, 12 Jun 2019 12:28:14 +0000 (14:28 +0200)]
api: string type to convert to vector

Previous use of strndup() required user to remember to call free().
Now return a vector pointing directly to the API message string.
Of course user must remember to copy the string out if lifetime
is longer than API message lifetime.

Change-Id: Ib5e2b3d52d258e1a42ea9ea9a9e04abbe360e2bf
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agodpdk: check result of rte_mempool_create_empty 04/20204/6
Lijian.Zhang [Wed, 3 Apr 2019 08:32:30 +0000 (16:32 +0800)]
dpdk: check result of rte_mempool_create_empty

Check the returned pointer, report error and return in case of failure.
This avoids crashing without any useful clues or debug messages.

Type: fix

Change-Id: I15d0735a531c2d9a8b6f67b7d6fe326b98c963c3
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
5 years agoquic: fix handling of stream reset & close 41/20141/5
Nathan Skrzypczak [Fri, 14 Jun 2019 14:44:38 +0000 (16:44 +0200)]
quic: fix handling of stream reset & close

Type: refactor

Change-Id: I4981704e3c886d90d482a1deba42633e92626743
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
5 years agoip: reassembly-separate feature and custom code 26/20126/6
Klement Sekera [Mon, 17 Jun 2019 12:23:15 +0000 (12:23 +0000)]
ip: reassembly-separate feature and custom code

This change is made fix a crash, because is_feature flag semantics turn
out to be different from "custom app code" semantics. Introduce a flag
which custom plugins/apps can use to instead of tying that code to
is_feature flag.

Change-Id: Ief5898711e68529f9306cfac54c4dc9b3650f9e3
Ticket: N/A
Type: fix
Fixes: 21aa8f1022590b8b5caf819b4bbd485de0f1dfe5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovppinfra: add format_hex_bytes_no_wrap 99/20199/2
Damjan Marion [Mon, 17 Jun 2019 21:20:27 +0000 (23:20 +0200)]
vppinfra: add format_hex_bytes_no_wrap

Type: feature
Change-Id: I53e1f05b2b048925fca3b2f6b0499ff9c3e6ee12
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: fix adminq enqueue errors 98/20198/2
Damjan Marion [Mon, 17 Jun 2019 20:55:44 +0000 (22:55 +0200)]
avf: fix adminq enqueue errors

Type: fix
Fixes: b4ff07a

Change-Id: I2578ae3e093961fa8765568b5fedcf75ae9487f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: add logging macros and improve logging 94/20194/3
Damjan Marion [Mon, 17 Jun 2019 18:44:19 +0000 (20:44 +0200)]
avf: add logging macros and improve logging

Type: feature
Change-Id: I3d7009505ddbb2c41d8619d9195c6a5373fa9a04
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoip: consolidate IPv6 link-local-address functions. 79/20179/4
Jon Loeliger [Thu, 13 Jun 2019 16:02:26 +0000 (11:02 -0500)]
ip: consolidate IPv6 link-local-address functions.

Two codes diverged in the packet processor
And sorry I could not use them both
Long I stood being but one developer
And studied one as far as I could
To where the code said bitwise OR

Then took the other, as just could see,
And having perhaps the better bit,
Because it followed the RFC
And used the cryptic XOR in C,
Had run them both a fair bit.

And both equally ran that morning
With packets dropped and flowing.
Oh, I flagged the first for dropping!
Yet knowing bug leads to debuging
I hoped I'd never be returning.

I shall be commiting this with a sigh
Somewhere ages and ages hence:
Two codes diverged by a bit, and I,
I made the packets flow on by,
And that has made all the difference.

Type: fix
Change-Id: If2698726d5501fde76211994f8efc37119345352
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoipsec: One DPO per SA 80/20180/2
Neale Ranns [Mon, 17 Jun 2019 15:43:38 +0000 (15:43 +0000)]
ipsec: One DPO per SA

An SA can be used only for ESP or AH nver both, so it needs only one
coresponding DPO.

Type: refactor

Change-Id: I689060f795ee352245a0eaed0890a6b234c63d71
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoipsec: return original SA create error for tunnel create 31/20131/2
Neale Ranns [Fri, 14 Jun 2019 10:31:46 +0000 (10:31 +0000)]
ipsec: return original SA create error for tunnel create

rather than SRC/DST address error which is not so helpfull

Type: fix
Fixes: af3f0783

Change-Id: Ie2143e4e29de87d93e79bd96284c041bdbffd98e
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession: use listener_handle instead of listener_index 09/20109/4
Nathan Skrzypczak [Thu, 13 Jun 2019 08:14:28 +0000 (10:14 +0200)]
session: use listener_handle instead of listener_index

Type: refactor

Change-Id: I97fa59a0ba0b6b7a98698926020ffffcf6ae6ba3
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
5 years agomisc: vpp-api - add __repr__ to VPPApiClient. 61/20161/3
Paul Vinciguerra [Mon, 17 Jun 2019 01:23:31 +0000 (21:23 -0400)]
misc: vpp-api - add __repr__ to VPPApiClient.

Show the constructor of the object instead of the memory location.

api client: <VPPApiClient apifiles=None, testmode=False,
async_thread=True, logger=<logging.Logger object at 0x7f35d1bd2590>,
read_timeout=1, use_socket=False,
server_address='/tmp/vpp-unittest-TestGbpApi-pOKbWg/api.sock'>

vs.

api client: <vpp_papi.vpp_papi.VPPApiClient object at 0x7fa0003df750>

Type: feature

Change-Id: I1460d76f6796776dd525c0844e9e426ec2d52398
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovlib: add "memory-trace stats-segment" 55/20155/3
Dave Barach [Sat, 15 Jun 2019 16:46:13 +0000 (12:46 -0400)]
vlib: add "memory-trace stats-segment"

Type: feature

Change-Id: Ie020fd7e2618284a63efbeb9895068f27c0fb9ab
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoapi: add mp-safe/barrier-sync indication to elogs 52/20152/1
Dave Barach [Fri, 14 Jun 2019 21:29:55 +0000 (17:29 -0400)]
api: add mp-safe/barrier-sync indication to elogs

Costs nothing, and leaves nothing to the imagination.

Type: fix

Change-Id: I7c9f9fb9325475c268eca062da7bbbf014438cfc
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoipsec: Display user specified SPI ID not VPP's index 39/20139/2
Neale Ranns [Fri, 14 Jun 2019 13:48:27 +0000 (06:48 -0700)]
ipsec: Display user specified SPI ID not VPP's index

Type: fix
Fixes: 8d7c502002

Change-Id: Ia6de250f20200c17937d9d7b2aab17ccd81d7823
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: update known issues section in README.md 48/20148/2
Damjan Marion [Fri, 14 Jun 2019 16:38:03 +0000 (18:38 +0200)]
avf: update known issues section in README.md

Type: docs
Change-Id: I09f6984b74ebb7ee743881b4ad496618542eeaa5
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agog2: clean up compile/link errors 46/20146/3
Dave Barach [Fri, 14 Jun 2019 16:11:37 +0000 (12:11 -0400)]
g2: clean up compile/link errors

Many missing "extern" declarations, it's hard to imagine why the
related compile/link errors just showed up.

Type: fix

Change-Id: I0878bf5fdb10ffdd8e0c49c9e5153cddaf3bc1fd
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: optimize elog_string 45/20145/3
Dave Barach [Fri, 14 Jun 2019 16:02:38 +0000 (12:02 -0400)]
vppinfra: optimize elog_string

Add a string hash to make sure that strings in the string table are
unique. This optimization has been coded piecemeal in multiple places,
we should have made the underlying function do the work years ago.

Type: fix

Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agostats: add version field to stat segment base header 27/20127/6
Ole Troan [Fri, 14 Jun 2019 08:26:14 +0000 (10:26 +0200)]
stats: add version field to stat segment base header

Add a version in the base header of the stat segment
To make support for multiple reader implementations safer.

Change-Id: I6816e2a51a98c2df1e621e80d4ef0b4ba4e9f47b
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoipsec: Correctly rewind the buffer to the IP header when punting UDP encapped SPI... 28/20128/2
Neale Ranns [Fri, 14 Jun 2019 08:13:25 +0000 (01:13 -0700)]
ipsec: Correctly rewind the buffer to the IP header when punting UDP encapped SPI-0 packets

Type: fix
Fixes: b71fa75d48

Change-Id: I2d81b373f7659e702759939c096b315afa36f621
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agointerface: interface dump API check validity of sw_if_index 25/20125/5
Neale Ranns [Fri, 14 Jun 2019 08:26:21 +0000 (08:26 +0000)]
interface: interface dump API check validity of sw_if_index

Type: fix
Fixes: 6407ba56

Change-Id: I6d3ce68962986921e04aa00c989d8afa157ebcb8
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agomisc: Update MAINTAINERS to include interface common 29/20129/3
Neale Ranns [Fri, 14 Jun 2019 09:09:43 +0000 (02:09 -0700)]
misc: Update MAINTAINERS to include interface common

Type: feature

Change-Id: I72f35444c73c6a7099d34f7d5031cbe82cbdd383
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto-ia32: fix typo in ifdef for avx512 version 96/20096/3
Neale Ranns [Wed, 12 Jun 2019 16:04:02 +0000 (09:04 -0700)]
crypto-ia32: fix typo in ifdef for avx512 version

Type: Fix
Fixes: dd2423ef

Change-Id: I76f0ed5027161c396186845043f5afe395c20280
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoipsec: remove spurious warnings 15/20115/2
Neale Ranns [Thu, 13 Jun 2019 14:42:54 +0000 (07:42 -0700)]
ipsec: remove spurious warnings

Type: fix
Fixes: 999c8ee6d6

Change-Id: Idcdddbe45f2e0adfd375b07199bb30f77c28702d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix tcp_do_fastretransmits failure. 66/20066/7
Guoao Sun [Tue, 11 Jun 2019 14:07:21 +0000 (22:07 +0800)]
tcp: fix tcp_do_fastretransmits failure.

Type: fix

vpp would fail 'tcp_in_fastrecovery (tc)' if tcp_connection_get returns 0.

Change-Id: I512cba5234b3777f1737bec9451940e7e7975f15
Signed-off-by: Guoao Sun <guoao.sun@intel.com>
5 years agoipsec: ah_decrypt rework 08/19808/8
Filip Tehlar [Tue, 21 May 2019 08:11:21 +0000 (08:11 +0000)]
ipsec: ah_decrypt rework

This patch refactors AH decrypt node in such way that it calls crypto
backend only once per node call.

Type: refactor
Change-Id: I0dc72ff699042a151e64d44f76f791c5136ec009
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoavf: add README.md section about spoofing check 01/20101/2
Damjan Marion [Wed, 12 Jun 2019 20:41:21 +0000 (22:41 +0200)]
avf: add README.md section about spoofing check

Type: docs
Change-Id: I4ae65ed22275abf0d15045f3b09625d6aaa3b67b
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoinfra: fix minor memory leak in "api trace..." 02/20102/2
Dave Barach [Wed, 12 Jun 2019 20:50:38 +0000 (16:50 -0400)]
infra: fix minor memory leak in "api trace..."

Build api trace message print fns into the built-in copy of api_format.c
Optimize memory allocator behavior when the api trace wraps.

Type: Fix

Change-Id: If799d8784a459f981fc9ee3a3ca03d3f63b2bcd0
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agostatic_http: Typo in short_help. 99/20099/2
Paul Vinciguerra [Wed, 12 Jun 2019 17:13:22 +0000 (13:13 -0400)]
static_http: Typo in short_help.

Type: fix.

Change-Id: I48587c5eba6de6de820d348177b6733d0b048013
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agosession: use session handles as app listener handles 75/20075/9
Florin Coras [Tue, 11 Jun 2019 19:31:31 +0000 (12:31 -0700)]
session: use session handles as app listener handles

Type: refactor

Change-Id: I421750147a8a821bd0b522daf6c2b7239e551f12
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: better estimate snd space for rxt with no sacks 00/20100/2
Florin Coras [Wed, 12 Jun 2019 18:26:35 +0000 (11:26 -0700)]
tcp: better estimate snd space for rxt with no sacks

Type: refactor

Use tcp_available_cc_snd_space instead of sack scoreboard
last_delivered_bytes to estimate available space when retransmitting
with no sack support

Change-Id: I938c637279eaf8c5634c4e97f0633fa2d0054fac
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: add cc stats plotting tools 92/20092/4
Florin Coras [Wed, 12 Jun 2019 15:12:58 +0000 (08:12 -0700)]
tcp: add cc stats plotting tools

Type: feature

cc_plot.py can plot cc stats collected via elogs from tcp connections.
To enable the collection of cc stats, tcp must be compiled with
TCP_DEBUG_CC_STAT turned on.

Once the tests have been carried out, and elogs have been saved with "ev
save log <file>", the logs can be converted to txt format with the
convert_evt script. The resulting file can be used as input to the
cc_plots script.

Change-Id: I16df2993fa09cab9ad35f91825eab7df4da6428b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agomisc: add check_commit_msg.sh script 93/20093/2
Damjan Marion [Wed, 12 Jun 2019 15:41:39 +0000 (17:41 +0200)]
misc: add check_commit_msg.sh script

Type: feature
Change-Id: I5e04991afd7500673db121e4529275e9aff15e65
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agopapi: make socket disconnect more robust 91/20091/2
Vratko Polak [Wed, 12 Jun 2019 14:43:06 +0000 (16:43 +0200)]
papi: make socket disconnect more robust

Previusly, read error could happen before message_thread starts,
so do not attempt to join in that case.

Change-Id: Ie119916831e320e38eb02e48515b4c6a9cb937e5
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
5 years agotests: filter sw_interface_dump in tests. 37/20037/2
Paul Vinciguerra [Fri, 7 Jun 2019 19:01:12 +0000 (15:01 -0400)]
tests: filter sw_interface_dump in tests.

Type: test

Change-Id: I92921444ef6b0e574701398cf57971c9ecc1cc91
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agomaintainers: add vcl 94/20094/1
Florin Coras [Wed, 12 Jun 2019 15:57:24 +0000 (08:57 -0700)]
maintainers: add vcl

Change-Id: I29545cadcf0b764b931d14b0c3ec51d728d29504
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobuffers: fix vlib_buffer_free_no_next 88/20088/2
Damjan Marion [Tue, 11 Jun 2019 18:12:23 +0000 (20:12 +0200)]
buffers: fix vlib_buffer_free_no_next

Type: fix
Fixes: 910d369
Change-Id: I0e8380cd2b0dc038a028d9cf2568741059de460f
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agomisc: update MAINTAINERS file 89/20089/2
Damjan Marion [Wed, 12 Jun 2019 12:40:28 +0000 (14:40 +0200)]
misc: update MAINTAINERS file

Type: make
Change-Id: I082ae7af9a8d10d6caddf401d3fa843844503b26
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agolacp: cleanup unnecessary pointer cast 62/20062/2
Zhiyong Yang [Tue, 11 Jun 2019 02:23:11 +0000 (22:23 -0400)]
lacp: cleanup unnecessary pointer cast

Change-Id: Idc3a7588dc73e7180a15b6ace3684d3c12986b9d
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agoNAT: interface fib fix (VPP-1691) 69/20069/2
Filip Varga [Tue, 11 Jun 2019 08:45:21 +0000 (10:45 +0200)]
NAT: interface fib fix (VPP-1691)

Change-Id: I2d1e2addb2e440c23c255ac7709169f7909cb0be
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agovlib: avoid retrieving freed file in epoll 76/20076/1
Florin Coras [Tue, 11 Jun 2019 21:33:03 +0000 (14:33 -0700)]
vlib: avoid retrieving freed file in epoll

Type:fix

Change-Id: Id7f4f6e2a2f844085f511a33aa1db3968f5d97bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoip: punt coverity fix of CLI input 67/20067/2
Neale Ranns [Tue, 11 Jun 2019 08:39:08 +0000 (01:39 -0700)]
ip: punt coverity fix of CLI input

Type: fix

Change-Id: Ia73cbe2fba0a364d966daed0b5d5d2ac7499f86d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agofix compiling error with marvell pp2 plugin 64/20064/2
jialv01 [Tue, 11 Jun 2019 06:00:20 +0000 (14:00 +0800)]
fix compiling error with marvell pp2 plugin

fix compile issue
"src/plugins/marvell/pp2/pp2.c:247:62: error: 'vm' undeclared (first use in this function)"

Change-Id: Ia23e21b07c29faefa6e363816a220e312adba81c
Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
5 years agolacp: remove duplicated code 63/20063/1
Zhiyong Yang [Tue, 11 Jun 2019 05:08:20 +0000 (01:08 -0400)]
lacp: remove duplicated code

Change-Id: I0fb646c350b392d69658ba4188ae25e0f0a6cdc1
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agossvm: disable private segment expand 61/20061/2
Florin Coras [Mon, 10 Jun 2019 23:22:48 +0000 (16:22 -0700)]
ssvm: disable private segment expand

Change-Id: I893621d9a6520c6e24026a9bbaf44e9e69f60bcb
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: allow registration of new cc algo types 58/20058/3
Florin Coras [Mon, 10 Jun 2019 15:33:50 +0000 (08:33 -0700)]
tcp: allow registration of new cc algo types

Type: feature

Change-Id: I83e21b508a19df1beb207d961c8f2b52347deca0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosvm: improve fifo segment show 47/20047/1
Florin Coras [Sun, 9 Jun 2019 16:24:33 +0000 (09:24 -0700)]
svm: improve fifo segment show

Type: refactor

Change-Id: I6933205cfb04bc31cabe6e3b1a8044cace93f84c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agomactime: add per-mac allow-with-quota feature 43/20043/2
Dave Barach [Sat, 8 Jun 2019 16:33:13 +0000 (12:33 -0400)]
mactime: add per-mac allow-with-quota feature

Specify a data limit during specified time ranges. Outside of the
specified time ranges, data will be allowed.

Clean up "show mactime" output.

Type: feature

Change-Id: Iddd6678e7ded1d0f9cb88d69c656de8d87d5694c
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotrace frame-queue on trigger out of memory 41/19941/6
dongjuan [Tue, 4 Jun 2019 02:59:02 +0000 (10:59 +0800)]
trace frame-queue on trigger out of memory

FRAME_QUEUE_NELTS is 64 in thread.c

Change-Id: Ie7e5962afe05dfc7f38e3d597dabc74dcc2dab8d
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
5 years agotcp: send challenge ack for in wnd syn 38/20038/2
Florin Coras [Fri, 7 Jun 2019 19:38:55 +0000 (12:38 -0700)]
tcp: send challenge ack for in wnd syn

Type: fix

Per rfc793, in window syns for established connections should lead to
connection resets. As a mitigation for blind reset attacks, rfc5961
requests that such syns be replied to with challange acks.

Change-Id: I75e4972bbb515e48d9cf1bda32ea5d9891d670f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: close connection if not recovered after max tries 41/20041/8
Florin Coras [Fri, 7 Jun 2019 22:31:06 +0000 (15:31 -0700)]
tcp: close connection if not recovered after max tries

Type: feature

Change-Id: Ia8af6a62a2be2265bc42955d90e8c2222bdb8f50
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: add cc cleanup function 34/20034/1
Florin Coras [Fri, 7 Jun 2019 16:35:20 +0000 (09:35 -0700)]
tcp: add cc cleanup function

Type: feature

Change-Id: I54521078cf96e459d041c86297c6ca80045bf0a3
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobfd: UT for BFD session over GRE tunnel 21/20021/3
Neale Ranns [Wed, 5 Jun 2019 10:28:17 +0000 (10:28 +0000)]
bfd: UT for BFD session over GRE tunnel

Signed-off-by: Neale Ranns <nranns@cisco.com>
Adding UT for BFD over GRE tunnel.

Ticket: none
Type: test

Change-Id: I03eca4a0c7114cdc16fde9be4cd6db6216b8c845
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: log connect notify errors 31/20031/2
Florin Coras [Fri, 7 Jun 2019 14:03:01 +0000 (07:03 -0700)]
tcp: log connect notify errors

Type: fix

Change-Id: Idf0b2e16b2e7d126940bb38c7983d6784b5bfdc8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoipsec: export ipsec_punt.h 27/20027/3
Neale Ranns [Fri, 7 Jun 2019 12:17:07 +0000 (05:17 -0700)]
ipsec: export ipsec_punt.h

Change-Id: Ib489922af246b7dc3e770a57e51b87a2568a014d
Type: fix
Fixes: b71fa75d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoip: ip4 lookup performance bump with the usual receipe 18/20018/3
Neale Ranns [Fri, 7 Jun 2019 06:52:36 +0000 (02:52 -0400)]
ip: ip4 lookup performance bump with the usual receipe

2.77e1 v. 2.81e1

Type: performance

Change-Id: I896ec77818603f17aaa622073dafc626570326f1
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM-test: fix the UT post BVI and Bridge-domain changes 20/20020/2
Neale Ranns [Fri, 7 Jun 2019 07:54:21 +0000 (03:54 -0400)]
VOM-test: fix the UT post BVI and Bridge-domain changes

Change-Id: Ibd9059e616f46f7017e397262bf4c0606d81eb0c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agobuild: add -Wall and -fno-common, fix reported issues 89/19989/4
Benoît Ganne [Tue, 30 Apr 2019 09:50:46 +0000 (11:50 +0200)]
build: add -Wall and -fno-common, fix reported issues

Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agolacp: create lacp-process on demand 90/19990/6
Steven Luong [Wed, 5 Jun 2019 17:52:35 +0000 (10:52 -0700)]
lacp: create lacp-process on demand

Create lacp-process when the very first slave interface is added to the bond.
Log an event message when lacp-process starts/stops.
Be mindful when lacp-process is signalled to stop.

Type: refactor
Change-Id: I79e10e0a2a385a21a52ae5b8735f24631fdba293
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoipsec: remove the set_key API 03/20003/3
Neale Ranns [Thu, 6 Jun 2019 13:28:14 +0000 (13:28 +0000)]
ipsec: remove the set_key API

there's no use case to just change the key of an SA. instead the SA
should be renegociated and the new SA applied to the existing SPD entry
or tunnel.

the set_key functions were untested.

Type: refactor
Change-Id: Ib096eebaafb20be7b5501ece5a24aea038373002
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agogre: update gre.api with explicit types 23/20023/3
Ole Troan [Fri, 7 Jun 2019 09:02:58 +0000 (11:02 +0200)]
gre: update gre.api with explicit types

Change-Id: I0036c216b79afb66b982b1b6a7e81f738f3b61dc
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAPI: Add support for "defaults" 46/19246/4
Ole Troan [Tue, 30 Apr 2019 08:04:36 +0000 (10:04 +0200)]
API: Add support for "defaults"

Add support in the API language for specifying a field default.
Add default support in Python binding.

define foo {
  u16 mtu [default = 1500];
};

This is client side only. I.e. if the mtu argument is not passed to the foo function,
the client language binding will set it default to 1500.

Change-Id: I5df43f3cd87cb300b40ca38e15dcab25b40e424a
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovppapigen: Fold up CRC from dependent types. 42/19142/5
Ole Troan [Wed, 24 Apr 2019 12:31:18 +0000 (14:31 +0200)]
vppapigen: Fold up CRC from dependent types.

Change-Id: Id51f26f225cd567ca19efc2301e94fa88840ae8f
Signed-off-by: Ole Troan <ot@cisco.com>
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agop2p ethernet: update p2p_ethernet.api with explicit types. 22/20022/2
Ole Troan [Fri, 7 Jun 2019 08:59:25 +0000 (10:59 +0200)]
p2p ethernet: update p2p_ethernet.api with explicit types.

Change-Id: Id6b2c2321c5f1d56e7cfab24a7c1641b38e94e19
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agotests: framework gracefully handle 'VppTransportShmemIOError' 41/18341/9
Paul Vinciguerra [Fri, 15 Mar 2019 16:39:19 +0000 (09:39 -0700)]
tests: framework gracefully handle 'VppTransportShmemIOError'

Catches:
----
Traceback (most recent call last):
  File "/vpp/test/framework.py", line 593, in tearDown
    self.logger.info(self.vapi.ppcli("api trace save %s" % api_trace))
  File "/vpp/test/vpp_papi_provider.py", line 413, in ppcli
    return cli + "\n" + str(self.cli(cli))
  File "/vpp/test/vpp_papi_provider.py", line 402, in cli
    r = self.papi.cli_inband(cmd=cli)
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 100, in __call__
    return self._func(**kwargs)
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 414, in f
    return self._call_vpp(i, msg, multipart, **kwargs)
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 634, in _call_vpp
    msg = self.transport.read()
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py", line 120, in read
    raise VppTransportShmemIOError(rv, 'vac_read failed')
VppTransportShmemIOError: [Errno -1] vac_read failed
----

Change-Id: I767e48c4d03081eb5df6a8aa67da7e192d25e4cc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Context_id allocator for running forked. 97/19997/2
Paul Vinciguerra [Thu, 6 Jun 2019 11:06:09 +0000 (07:06 -0400)]
vpp_papi: Context_id allocator for running forked.

When running forked, distinct copies of the 'get_context'
singleton are created for each process.  To run under forked processes,
(as with make test TEST_JOBS=10), we need to use a shared
memory value across the processes.

Type: fix

Change-Id: I9eab8ce46ec23584e5bd651735ad75fd3f018e1a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Fix missing dependency. 98/19998/2
Paul Vinciguerra [Thu, 6 Jun 2019 11:38:42 +0000 (07:38 -0400)]
vpp_papi: Fix missing dependency.

Since we test vpp_papi as part of tests, the need for
ipaddress under python2.7 is masked.

Add ipaddress to setup.py for python <=3.3.

Change-Id: I01c2f5560eeb740e546024e84028d5a2fb2ace45
Type: fix
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agono trigger nat ipfix flush in first worker 64/19664/3
dongjuan [Fri, 17 May 2019 07:47:55 +0000 (15:47 +0800)]
no trigger nat ipfix flush in first worker

Change-Id: I4dbeed0b94003a698e9218648d4b352db6fbb70e
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
5 years agovpp_papi: Fix format_vl_api_address_t under python3. 05/20005/2
Paul Vinciguerra [Thu, 6 Jun 2019 14:49:46 +0000 (10:49 -0400)]
vpp_papi: Fix format_vl_api_address_t under python3.

Under PY3, inet_pton returns OSError, not socket.error.

Type: fix

Change-Id: Id270a684c0ab124cbe1ddcb7123e14e85af844b8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agobfd: midchain adjacency support 91/19891/2
Matthew G Smith [Wed, 22 May 2019 19:49:24 +0000 (14:49 -0500)]
bfd: midchain adjacency support

Support an adjacency with lookup_next_index of IP_LOOKUP_NEXT_MIDCHAIN
so tunnel interfaces can have BFD configured on them.
Also, check if the interface a session is configured on is up
and skip assembling the packet and calculating the checksum if
the interface is down.

Change-Id: I44f76478d0fc1592e3491dd9368819a5c957e74a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agovpp_papi: Accept ipaddress.Network objects on prefix_t methods. 13/20013/2
Paul Vinciguerra [Thu, 6 Jun 2019 19:25:44 +0000 (15:25 -0400)]
vpp_papi: Accept ipaddress.Network objects on prefix_t methods.

vl_api_prefix_t returns ipaddress.<IPv[46]>Network objects.
Accept Network objects as well as existing string format.

Type: refactor.

Change-Id: Iba5403724a7b3e1da3b3740027fccd43631bf31e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Fix vapi.disconnect exception. 14/20014/2
Paul Vinciguerra [Thu, 6 Jun 2019 21:14:37 +0000 (17:14 -0400)]
vpp_papi: Fix vapi.disconnect exception.

Traceback (most recent call last):
  File "/vpp/test/framework.py", line 521, in setUpClass
    cls.quit()
  File "/vpp/test/framework.py", line 556, in quit
    cls.vapi.disconnect()
  File "/vpp/test/vpp_papi_provider.py", line 308, in disconnect
    self.vpp.disconnect()
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_papi.py", line 500, in disconnect
    if self.event_thread is not None:
AttributeError: 'VPPApiClient' object has no attribute 'event_thread'

Type: fix

Change-Id: I7a8db08b0922bf92ab42df121b1707073af9cedf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotests: fix broken test test_gtpu.py TestGtpuUDP 15/20015/3
Paul Vinciguerra [Thu, 6 Jun 2019 22:01:07 +0000 (18:01 -0400)]
tests: fix broken test test_gtpu.py TestGtpuUDP

Test failing due to call to super.tearDown in setUp.

==============================================================================
FAIL: test UDP ports
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/vpp/test/test_gtpu.py", line 77, in test_udp_port
    self._check_udp_port_ip4(False)
  File "/vpp/test/test_gtpu.py", line 48, in _check_udp_port_ip4
    self.assertEqual(err, self.ip4_err + 1)
AssertionError: 0L != 1

Type: fix

Change-Id: Iec4ef5edd3ee11bcd962b77cc8159dee9cb15687
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovcl: avoid hash table lookup on accept 07/20007/4
Florin Coras [Thu, 6 Jun 2019 16:38:44 +0000 (09:38 -0700)]
vcl: avoid hash table lookup on accept

Type: refactor

Change-Id: I363a97b9f5ab0dbda78e13582630e78d57fb83e7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: cap epoll dequeue batch size to max events 87/19987/5
Florin Coras [Wed, 5 Jun 2019 17:47:16 +0000 (10:47 -0700)]
vcl: cap epoll dequeue batch size to max events

Type: fix

Change-Id: Ia9be1413cf9423552137885521cefdbecc3e5df5
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agoIP-Punt-redirect: allow the use of a FIB path to describe how to 34/19934/3
Neale Ranns [Mon, 3 Jun 2019 13:21:40 +0000 (13:21 +0000)]
IP-Punt-redirect: allow the use of a FIB path to describe how to
redirect

Change-Id: I2a3ba2a3d73ea8511e3a511855b041432328f0a8
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodpdk: fix clear hw stats 94/19994/3
Filip Tehlar [Tue, 4 Jun 2019 01:22:55 +0000 (01:22 +0000)]
dpdk: fix clear hw stats

.. and remove helper stat struct for keeping last cleared stats.
This is not needed anymore as dpdk lib provides rte_eth_dev_reset().

Change-Id: I78076e689aac7ca70836ce688dfa8e704f64cd84
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoDVR: Control the reinject as L2 or L3 based on the output interface type 96/19996/1
Neale Ranns [Thu, 6 Jun 2019 10:35:07 +0000 (10:35 +0000)]
DVR: Control the reinject as L2 or L3 based on the output interface type

Change-Id: Ib4cdbe8a6a1d10a643941c13aa0acbed410f876c
Type: Feature
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoreassembly: support more custom options for apps 12/19712/5
Klement Sekera [Mon, 20 May 2019 10:27:33 +0000 (12:27 +0200)]
reassembly: support more custom options for apps

Change-Id: Ib9f98fba5a724480ca95f11a762002c53e08df70
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agogbp: fix lpm classification with vlan 86/19986/2
Benoît Ganne [Wed, 5 Jun 2019 17:08:40 +0000 (19:08 +0200)]
gbp: fix lpm classification with vlan

Fix GBP LPM packet classification in the presence of a VLAN header.

Change-Id: I2ff63b34f7475d696b10b5a245ff802bbb1ff01a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agogbp: do not classify unknown packet as EP packets 85/19985/2
Benoît Ganne [Wed, 5 Jun 2019 17:11:11 +0000 (19:11 +0200)]
gbp: do not classify unknown packet as EP packets

If we fail to classify the packet based on LPM we must not classify it
based on the EP sclass.

Change-Id: Ie234e0c87bd44976c3c57c818359c93f7d99ab84
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agolb: crashed with some specific commit under heavy traffic 39/19939/6
Hongjun Ni [Tue, 4 Jun 2019 10:58:58 +0000 (18:58 +0800)]
lb: crashed with some specific commit under heavy traffic

- When deleting VIP member with flush, VPP will crash.
- When deleting VIP member without flush, vpp won't crash.
- This crash is almost 100% reproductive.

Ticket: VPP-1680
Type: fix
Change-Id: Ia4e8f9e0f987176c7f6ec52c92e66563f313b0c3
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agoipsec: fix combined counters in ah-encrypt node 80/19980/4
Filip Tehlar [Mon, 3 Jun 2019 23:36:10 +0000 (23:36 +0000)]
ipsec: fix combined counters in ah-encrypt node

Type: fix
Fixes: 1197449
Change-Id: Icdda3c667ba76542ea3af5d66cc7c3fb10ade1ca
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoipsec: fix sa counters in esp-encrypt 73/19973/3
Damjan Marion [Wed, 5 Jun 2019 13:45:50 +0000 (15:45 +0200)]
ipsec: fix sa counters in esp-encrypt

Type: fix
Fixes: c59b9a2
Change-Id: I6021e67196a4d31ab11d4e3cfbda34b678150701
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoipsec: fix sa counters in esp-decrypt 72/19972/4
Damjan Marion [Wed, 5 Jun 2019 13:42:54 +0000 (15:42 +0200)]
ipsec: fix sa counters in esp-decrypt

Type: fix
Fixes: b4fff3a
Change-Id: I2552cbc0a02e7445825a5a4ce290cde3d10c5f0b
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoSwitch atomic release API from __sync to __atomic builtin. 30/19930/3
Sirshak Das [Tue, 28 May 2019 13:46:27 +0000 (08:46 -0500)]
Switch atomic release API from __sync to __atomic builtin.

__sync_lock_release switched to __atomic_store for code consitency,
although both generate same instructions with current compilers.

Change-Id: I37d320509e43a4c2b8a49af6346dc4a43ca2f535
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
5 years agoSwitch atomic test and set API from __sync to __atomic builtin 29/19929/3
Sirshak Das [Tue, 28 May 2019 13:44:46 +0000 (08:44 -0500)]
Switch atomic test and set API from __sync to __atomic builtin

__sync_test_and_set uses full memory barriers for AArch64,
__atomic_exchange(ACQUIRE) would use load acquire.

Change-Id: Ifdf2481db3b9dde6c5842d75671402862adb6d81
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
5 years agoavf: enable promiscuous mode 64/19964/4
Steven Luong [Wed, 5 Jun 2019 05:29:39 +0000 (22:29 -0700)]
avf: enable promiscuous mode

In order to receive multicast packets from the VF interface, promiscuos
mode must be enable.

Type: fix
Fixes: b4ff07a
Change-Id: I549bc37a05895d3355f2832c200e9262c95a27b5
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoIn ip6_mfib_forward_rpf_node,is_v4 should be 0. 17/19217/3
mu.duojiao [Mon, 29 Apr 2019 09:29:44 +0000 (17:29 +0800)]
In ip6_mfib_forward_rpf_node,is_v4 should be 0.

Change-Id: I9de63cebfcef8898d0ea4c9c2b7451b168b06c2c
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agoL3 cross connect 58/19758/7
Neale Ranns [Wed, 22 May 2019 13:26:39 +0000 (13:26 +0000)]
L3 cross connect

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

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

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

Pull common code into a single method.

Type: refactor

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

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

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

add a UT for the API

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

plugins:
- ipfixcollector

vnet:
- geneve
- vxlan_gpe
- vxlan

Change-Id: I69a8b4017ee6990f2b4874fe3e94c4520bde7101
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>