vpp.git
4 years agopppoe: remove api boilerplate 82/22482/2
Ole Troan [Wed, 2 Oct 2019 14:53:58 +0000 (16:53 +0200)]
pppoe: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I42705c508e88dae40a4c19ab20a1340623a57e16

4 years agooddbuf: remove api boilerplate 85/22485/2
Ole Troan [Wed, 2 Oct 2019 15:00:30 +0000 (17:00 +0200)]
oddbuf: remove api boilerplate

Type: refactor
Change-Id: Ic4922da46bf941249dd74b1a8bc6a98c62c099b7
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agonsim: remove api boilerplate 86/22486/2
Ole Troan [Wed, 2 Oct 2019 15:09:01 +0000 (17:09 +0200)]
nsim: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Idf2206ae3e3d8dd05e98528ee1f02c4c7d567f37

4 years agodpdk: remove api boilerplate 88/22488/2
Ole Troan [Wed, 2 Oct 2019 15:17:58 +0000 (17:17 +0200)]
dpdk: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I2cba1e2912902b092348dddcf9cbcba231c75995

4 years agofeature: API cleanup 39/22439/2
Jakub Grajciar [Tue, 1 Oct 2019 09:37:30 +0000 (11:37 +0200)]
feature: API cleanup

Use consistent API types.

Type: fix

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

4 years agodhcp: API cleanup 38/22438/7
Jakub Grajciar [Tue, 1 Oct 2019 09:30:56 +0000 (11:30 +0200)]
dhcp: API cleanup

Use consistent API types.

Type: fix

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

4 years agomap: fix DF[Don't fragment] ip4-map-t behaviour 33/22333/8
Vladimir Ratnikov [Fri, 27 Sep 2019 07:26:49 +0000 (03:26 -0400)]
map: fix DF[Don't fragment] ip4-map-t behaviour

This patch allows ip4-map-t plugin to drop
packets if DF flag is set and packet size
is bigger than MTU

Type: fix

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I0c1531a1f876d9efc8e7e2bff9804f298becdb68

4 years agomap: fix indent-off 44/22444/2
Klement Sekera [Tue, 1 Oct 2019 13:08:43 +0000 (13:08 +0000)]
map: fix indent-off

Replace erroneous INDENT-OFF with INDENT-ON and reformat code which is
non-conforming wrt to code style.

Type: style

Change-Id: Ia3310371e96b248e5da143fad8fdca3b2fb6650b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovlib: improve summary vector-rate statistics 53/22453/4
Dave Barach [Tue, 1 Oct 2019 17:34:23 +0000 (13:34 -0400)]
vlib: improve summary vector-rate statistics

Type: refactor

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I4b77879b0a84fdec3c1518a972cf003d5135222d
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoip: mfib CLI 'via local' fix 50/22450/2
Neale Ranns [Tue, 1 Oct 2019 16:49:53 +0000 (09:49 -0700)]
ip: mfib CLI 'via local' fix

Type: fix

Change-Id: I6fd7bb27b95a50d37424f65dc51e8b341f8b1b28
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoethernet: dmac filter checks secondary mac addrs 92/21792/10
Matthew G Smith [Wed, 4 Sep 2019 20:01:04 +0000 (15:01 -0500)]
ethernet: dmac filter checks secondary mac addrs

Maintain a list of secondary MAC addresses on ethernet_interface_t.
In ethernet-input dmac filtering, If packets do not match the
primary interface hardware address, check to see if they match the
other addresses.

Type: feature

Change-Id: Ie0edf45cae0d85c038a61086c47b3ae82d7e162d
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agoquic: Create custom event logger 15/22215/6
MathiasRaoul [Thu, 26 Sep 2019 09:17:13 +0000 (09:17 +0000)]
quic: Create custom event logger

Type: feature

Change-Id: I20acfe6a53cf9f15e3e4b8847b6f76757962f1c7
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agoquic: Add Tx, Rx and packet drop counters 14/22214/8
MathiasRaoul [Thu, 26 Sep 2019 09:13:39 +0000 (09:13 +0000)]
quic: Add Tx, Rx and packet drop counters

Type: feature

Change-Id: I25aeeed49fc569315296a73c5595c2e2e302434f
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agosession: fix use-after-free 28/21928/5
Benoît Ganne [Thu, 18 Jul 2019 16:38:42 +0000 (18:38 +0200)]
session: fix use-after-free

Make sure to reinitialize data before free-ing it.

Type: fix

Change-Id: I45727c456d0345204d4825ecdd9690c5ebeb5e94
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: allow transport cleanup in any state 54/22454/3
Florin Coras [Tue, 1 Oct 2019 17:32:46 +0000 (10:32 -0700)]
session: allow transport cleanup in any state

Type: fix

Third time's a charm

Change-Id: I31555a35d2b51f49a93a2a213c28896b0cad4c09
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoquic: add cli command for stats 13/22213/7
MathiasRaoul [Thu, 26 Sep 2019 09:07:16 +0000 (09:07 +0000)]
quic: add cli command for stats

add command to display stats from quicly (rtt, packet loss)

Type: feature

Change-Id: Iaa18bc78fbf80a9367ef150a8cf4997a456c6b39
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agordma: fix non-NULL terminated C-string overflow 35/22435/2
Benoît Ganne [Mon, 30 Sep 2019 14:43:25 +0000 (16:43 +0200)]
rdma: fix non-NULL terminated C-string overflow

Type: fix

Change-Id: I584777825636347c116bd084e348858bcb1b7d75
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agomap: use SVR for MAP-T 29/22429/2
Klement Sekera [Mon, 23 Sep 2019 09:00:30 +0000 (09:00 +0000)]
map: use SVR for MAP-T

This change is part of an effort to unify reassembly code. By removing
shallow virtual reassembly functionality in MAP and using the common
vnet provided shallow virtual reassembly, code size and complexity
is reduced.

Type: refactor
Change-Id: Iec8edd039f7b967b53e17bb9bca228a8b452ac0c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agobuild: build-root/Makefile rm of install tree 18/22418/4
Burt Silverman [Mon, 30 Sep 2019 13:50:42 +0000 (09:50 -0400)]
build: build-root/Makefile rm of install tree

Type: fix

The scenario is touch of a dpdk source file in places like
<TOP>/build-root/build-vpp-native/external/dpdk-19.08/.  The subsequent
build will trigger an rm -rf $(PACKAGE_INSTALL_DIR) by
build-root/Makefile at around line 709.  Because the package in
question, "external", consists of various "sub" packages, all of which
are controlled with files like .quicly.install.ok located in
build-root/build-vpp[_debug]-native/external, we end up not handling the
.*.install.ok files to reflect the removal of that PACKAGE_INSTALL_DIR.
This fix will correct that, at least for the case of touching/changing
dpdk files. A better long term solution would be to change the "sub"
packages to be full fledged build system packages, as Dave Barach points
out.

Signed-off-by: Burt Silverman <burtms@gmail.com>
Change-Id: Ia94ccaa2795cbf354b5921c3001a7141313b66be

4 years agoipsec: fix use-after-free 30/21930/4
Benoît Ganne [Mon, 9 Sep 2019 14:34:54 +0000 (16:34 +0200)]
ipsec: fix use-after-free

When deleting interface from the API, 'hi' gets removed before
'h->sw_if_index' is copied.

Type: fix

Change-Id: I8e10108e9bdf95ab2fe002790d98262d583ca58c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agobonding: fix non-null-terminated C-string 04/22404/3
Benoît Ganne [Fri, 27 Sep 2019 16:08:22 +0000 (18:08 +0200)]
bonding: fix non-null-terminated C-string

Type: fix

Change-Id: Ibb7ba878b049b8b18e890c43fdd6324cb88d63b8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agohsa: fix vpp_echo mq locking 50/22350/3
Nathan Skrzypczak [Fri, 27 Sep 2019 15:03:15 +0000 (17:03 +0200)]
hsa: fix vpp_echo mq locking

Type: fix

Change-Id: I18d2cde0baaed4134e8378c09aaa88693fb997f8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agodhcp: dhcp6_ia_na_client_cp API cleanup 94/22394/3
Jakub Grajciar [Mon, 30 Sep 2019 08:26:53 +0000 (10:26 +0200)]
dhcp: dhcp6_ia_na_client_cp API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie2d2c74ed3832d137e808e0b52348b4e660feb6f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoip: svr: fix feature refcounts 19/22419/2
Klement Sekera [Mon, 30 Sep 2019 14:35:36 +0000 (14:35 +0000)]
ip: svr: fix feature refcounts

Reference counts need to be per-interface as opposed to global. This
allows configuring the feature on more than one interface correctly.

Type: fix
Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75

Change-Id: I05534ac59fa86e67290737ec6c61df2c19acab48
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovlib: fix old nodes vector overflow in refork 33/21933/4
Benoît Ganne [Fri, 30 Aug 2019 14:20:12 +0000 (16:20 +0200)]
vlib: fix old nodes vector overflow in refork

Type: fix

Change-Id: I81c4cf0ce87288bb2d3c7b9f31e9419290d588b4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agodns: fix non-NULL terminated C-string 05/22405/3
Benoît Ganne [Mon, 30 Sep 2019 08:13:27 +0000 (10:13 +0200)]
dns: fix non-NULL terminated C-string

Type: fix

Change-Id: Ib030e6ac3386528901e0805d1ffe2eec033d819f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoapi: fix use-after-free 08/22408/3
Benoît Ganne [Wed, 11 Sep 2019 14:43:44 +0000 (16:43 +0200)]
api: fix use-after-free

Type: fix

Change-Id: I2a599c22d5770587fdd419e5d212c8527054d2e9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agolb: remove api boilerplate 95/22395/3
Ole Troan [Mon, 30 Sep 2019 09:04:39 +0000 (11:04 +0200)]
lb: remove api boilerplate

Type: refactor
Change-Id: I5555037386d6f6593ac3328385603a382be1fc2a
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agovmxnet3: remove api boilerplate 96/22396/2
Ole Troan [Mon, 30 Sep 2019 09:19:28 +0000 (11:19 +0200)]
vmxnet3: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I009e806997461ad790f125d6359993862e1c5e5d

4 years agostn: remove api boilerplate 98/22398/2
Ole Troan [Mon, 30 Sep 2019 10:44:03 +0000 (12:44 +0200)]
stn: remove api boilerplate

Type: refactor
Change-Id: I212c87c03324137c79a674d0842ca4537b28e4b4
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agotls: remove api boilerplate 11/22411/2
Ole Troan [Mon, 30 Sep 2019 11:17:26 +0000 (13:17 +0200)]
tls: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I92c010e64aa6cc6fb2b3845b37cc24dd112fc5f9

4 years agomactime: remove api boilerplate 10/22410/2
Ole Troan [Mon, 30 Sep 2019 11:11:35 +0000 (13:11 +0200)]
mactime: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I034cc6fb2a12d1b43b3470a1ba39cc1fe020386a

4 years agostats: fix per-worker stat vector length 01/22401/3
Benoît Ganne [Mon, 30 Sep 2019 10:39:55 +0000 (12:39 +0200)]
stats: fix per-worker stat vector length

Type: fix

Change-Id: I198a2312f5fc6e922c8a6c51ba7248ce6e236f81
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agohsa: fix non-NULL terminated C-string use in echo 07/22407/3
Benoît Ganne [Mon, 30 Sep 2019 08:56:33 +0000 (10:56 +0200)]
hsa: fix non-NULL terminated C-string use in echo

Use '%v' format for non-NULL terminated vectors instead of '%s'.

Type: fix

Change-Id: Id83de52486ad8dad3cdf3f32dad63a223fc1fdf7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: Fix missing elt regrab 17/22417/2
Nathan Skrzypczak [Mon, 30 Sep 2019 12:49:13 +0000 (14:49 +0200)]
session: Fix missing elt regrab

Type: fix

Change-Id: Ie756c5477d989702e633aa0d42ca154ff32b4c9a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoct6: remove api boilerplate 71/22271/5
Ole Troan [Wed, 25 Sep 2019 16:42:47 +0000 (18:42 +0200)]
ct6: remove api boilerplate

Type: refactor
Change-Id: Ibf00279d8065e7ef4fc06e8b9946dcc7bfd647de
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agol2e: remove api boilerplate 43/22343/3
Ole Troan [Fri, 27 Sep 2019 12:06:56 +0000 (14:06 +0200)]
l2e: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ifca5eee01b7813ddb6a8e4510f3adb96ade55fa7

4 years agoipsec: add insecure option for format of SA 62/22362/3
Christian E. Hopps [Fri, 27 Sep 2019 18:43:22 +0000 (14:43 -0400)]
ipsec: add insecure option for format of SA

If specified, shows keys, otherwise redacts. This change sets this flag
in the existing CLI code (thus maintaining the old behavior). The use
case for not specifying the insecure flag (and thus redacting the keys
from the show output) is for log messages.

Type: feature
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I8c0ab6a9a8aba7c687a2559fa1a23fac9d0aa111

4 years agoipsec: allow null cipher with dpdk esp 64/22364/2
Christian E. Hopps [Fri, 27 Sep 2019 19:19:19 +0000 (15:19 -0400)]
ipsec: allow null cipher with dpdk esp

The NULL cipher is a (valid) non-AEAD choice for ESP encrypt path.
Allow it.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I6d8b66223a0ffb0952c2dd6fa898a8a2289fef7a

4 years agoipsec: fix memleaks in ikev2 openssl code 65/22365/2
Christian E. Hopps [Fri, 27 Sep 2019 19:24:37 +0000 (15:24 -0400)]
ipsec: fix memleaks in ikev2 openssl code

- Need to always free created contexts
- Always pair init with cleanup for older openssl API.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: Ie8840403bcac500c20085d57240401ad39d119f8

4 years agovppinfra: implement CLIB_PAUSE () for aarch64 platforms 56/22356/2
jaszha03 [Fri, 27 Sep 2019 16:48:23 +0000 (11:48 -0500)]
vppinfra: implement CLIB_PAUSE () for aarch64 platforms

Define CLIB_PAUSE () to generate the "yield" instruction. No significant
performance changes were observed for clib_spinlock_t and clib_rwlock_t.

Type: feature

Change-Id: I59eb996e61c7a16007517e57e6996567302c1657
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
4 years agoipsec: support 4o6 and 6o4 for tunnel protect 48/22348/2
Neale Ranns [Fri, 27 Sep 2019 13:32:02 +0000 (13:32 +0000)]
ipsec: support 4o6 and 6o4 for tunnel protect

Type: feature

Change-Id: Ib2352ca4c7abf4645f21fa16aaaf27408890a2bf
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agosession: fix io_evt mq locking 51/22351/2
Nathan Skrzypczak [Fri, 27 Sep 2019 15:04:47 +0000 (17:04 +0200)]
session: fix io_evt mq locking

Type: fix

Change-Id: Iaa8045bba19cc305c84074668a20e1468d431b10
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agol3xc: remove api boilerplate 44/22344/2
Ole Troan [Fri, 27 Sep 2019 12:09:31 +0000 (14:09 +0200)]
l3xc: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Iea808fcdbf97cb78a2e2805002d3e2333279cb89

4 years agolacp: remove api boilerplate 45/22345/2
Ole Troan [Fri, 27 Sep 2019 12:14:38 +0000 (14:14 +0200)]
lacp: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5b77da8e9c476bd784be087a53b2eafb2d1a4831

4 years agosvs: remove api boilerplate 46/22346/2
Ole Troan [Fri, 27 Sep 2019 12:21:58 +0000 (14:21 +0200)]
svs: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I08eab052b67893cc6633d235885438e69950904b

4 years agoikev2: remove api boilerplate 42/22342/3
Ole Troan [Fri, 27 Sep 2019 12:02:13 +0000 (14:02 +0200)]
ikev2: remove api boilerplate

Type: refactor
Change-Id: Ib46ed3e65e75a97995a3e251d87324fec6595024
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agosctp: remove api boilerplate 47/22347/2
Ole Troan [Fri, 27 Sep 2019 12:27:16 +0000 (14:27 +0200)]
sctp: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I6576b76ef7ba494a8b777d01d75055270d837b24

4 years agotests: add quic plugin qclose/sclose tests 85/22185/5
Dave Wallace [Sat, 21 Sep 2019 04:19:26 +0000 (04:19 +0000)]
tests: add quic plugin qclose/sclose tests

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3122b038f7d77c7e5e8ee7c24046da6c94ca2d2c

4 years agobuiltinurl: remove api boilerplate 69/22269/4
Ole Troan [Wed, 25 Sep 2019 16:20:20 +0000 (18:20 +0200)]
builtinurl: remove api boilerplate

Type: refactor
Change-Id: Iaf728642e489acfd63e1da88aa8daa44ceca21e9
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agocdp: remove api boilerplate 70/22270/5
Ole Troan [Wed, 25 Sep 2019 16:24:42 +0000 (18:24 +0200)]
cdp: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I3b4bbbf2574faf8d06546eb72f127fa47479e988
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoavf: remote api boilerplate 67/22267/3
Ole Troan [Wed, 25 Sep 2019 15:33:46 +0000 (17:33 +0200)]
avf: remote api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Iafa1c0d0c1195f88b1a55f0341459c3278c3b2e6
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoigmp: remove api boilerplate 36/22336/2
Ole Troan [Fri, 27 Sep 2019 07:59:53 +0000 (09:59 +0200)]
igmp: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I578b09ec223c8e4a04b7590b55354b1104ac6628

4 years agohttp_static: remove api boilerplate 35/22335/2
Ole Troan [Fri, 27 Sep 2019 07:46:08 +0000 (09:46 +0200)]
http_static: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ie1f0cccf0c9dc4c0d8ae1e1b5d8e6a75c325d1ce

4 years agogtpu: remove api boilerplate 34/22334/3
Ole Troan [Fri, 27 Sep 2019 07:35:04 +0000 (09:35 +0200)]
gtpu: remove api boilerplate

Type: refactor
Change-Id: I08d200fbec805af3109e738eee32c3ecfd61c7cc
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agogbp: remove api boilerplate 31/22331/2
Ole Troan [Fri, 27 Sep 2019 07:20:37 +0000 (09:20 +0200)]
gbp: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I2995413619f5fbe77bbe2df9f5d37db8cc596b73

4 years agodns: remove api boilerplate 30/22330/2
Ole Troan [Fri, 27 Sep 2019 07:07:51 +0000 (09:07 +0200)]
dns: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ifffa86b45dd1f213ba974a296ab64202b672a6df

4 years agoabf: remove api boilerplate 66/22266/4
Ole Troan [Wed, 25 Sep 2019 15:33:27 +0000 (17:33 +0200)]
abf: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I80a371baf7715de1acee90952a0dd270172d8538
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoacl: remove api boilerplate 65/22265/2
Ole Troan [Wed, 25 Sep 2019 15:32:25 +0000 (17:32 +0200)]
acl: remove api boilerplate

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5701b7d6d5e1423fb0004f7e48815cd672f81e4d

4 years agomisc: add vnet classify filter set support 64/22264/4
Dave Barach [Wed, 25 Sep 2019 15:27:46 +0000 (11:27 -0400)]
misc: add vnet classify filter set support

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I79b216d2499df143f53977e5b70382f6f887e0bc

4 years agoip: fix use-after-free in reassembly 29/21929/5
Benoît Ganne [Fri, 19 Jul 2019 11:42:12 +0000 (13:42 +0200)]
ip: fix use-after-free in reassembly

 - ip{4,6}_reass_finalize() frees the reassembly context: do not access
it after the call.
 - traces access reassembly context: free it after and not before
tracing.

Type: fix

Change-Id: Ia3aaea9c7b74932e249e013be04b9bd7298fd187
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agomap: use SVR for MAP-E 75/22175/10
Klement Sekera [Wed, 21 Aug 2019 10:53:14 +0000 (10:53 +0000)]
map: use SVR for MAP-E

This change is part of an effort to unify reassembly code. By removing
shallow virtual reassembly functionality in MAP and using the common
vnet provided shallow virtual reassembly, code size and complexity is
reduced.

Type: refactor
Change-Id: I431f47d4db97154fecaeaecd6719cfc3b83cfc4a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoip: add shallow virtual reassembly functionality 82/20382/25
Klement Sekera [Tue, 25 Jun 2019 11:19:22 +0000 (11:19 +0000)]
ip: add shallow virtual reassembly functionality

Type: feature

Change-Id: Ibc8334e26c7e6f6120696c3e313b6e11d73dab99
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agolb: add APIs for set interface nat4 and nat6 03/21903/3
Hongjun Ni [Mon, 9 Sep 2019 16:49:24 +0000 (00:49 +0800)]
lb: add APIs for set interface nat4 and nat6

Type: feature

Change-Id: I5656cd798b108dd780381b87f574554442ed7b23
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
4 years agoclassify: use vector code even when data is not aligned 47/22247/2
Damjan Marion [Tue, 24 Sep 2019 22:25:36 +0000 (00:25 +0200)]
classify: use vector code even when data is not aligned

Type: feature

Change-Id: I8f5f4841965beb13ebc8c2a37ce0dc331c920109
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agolb: vl_api_lb_conf_t_handler has to ntohl 49/22149/5
Vratko Polak [Fri, 20 Sep 2019 16:23:58 +0000 (18:23 +0200)]
lb: vl_api_lb_conf_t_handler has to ntohl

As requested in review, this is a minimal edit.
Refactor comes as a separate Change.

Type: fix

Change-Id: Ie3bdfc3cfde4bfee56848217133ca5f6bbccaeef
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agodevices: pipe API cleanup 52/22252/2
Jakub Grajciar [Wed, 25 Sep 2019 08:07:28 +0000 (10:07 +0200)]
devices: pipe API cleanup

Use consistent API types.

Type: fix

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

4 years agoip: respect buffer boundary when searching for ipv6 headers 05/17905/22
Klement Sekera [Wed, 6 Mar 2019 10:59:57 +0000 (11:59 +0100)]
ip: respect buffer boundary when searching for ipv6 headers

Type: fix

Change-Id: I5a5461652f8115fa1270e20f748178fb5f5450f2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoudp: do not send received packets to error-drop 20/22220/3
Aloys Augustin [Tue, 24 Sep 2019 16:57:50 +0000 (18:57 +0200)]
udp: do not send received packets to error-drop

This tends to pollute the error counter.

Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Change-Id: Idb628e767b074a5ee7e00d001bc88c378d7b8d0b

4 years agosession: validate connection in session lookup del 63/22263/2
Florin Coras [Wed, 25 Sep 2019 14:28:34 +0000 (07:28 -0700)]
session: validate connection in session lookup del

Type: fix

Change-Id: I4e2617f99064c5a96e4debae8b68716ca129ee73
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotcp: use sacks for timer based recovery 33/22033/30
Florin Coras [Fri, 13 Sep 2019 01:36:44 +0000 (18:36 -0700)]
tcp: use sacks for timer based recovery

Type: feature

If available, reuse sack scoreboard in timer triggered retransmit to
minimize spurious retransmits.

Additional changes/refactoring:
- limited transmit updates
- add sacked rxt count to scoreboard
- prr pacing of fast retransmits
- startup pacing updates
- changed loss window to flight + mss

Change-Id: I057de6a9d6401698bd1031d5cf5cfbb62f2bdf61
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: fix cleanup in closing states 45/22245/5
Florin Coras [Tue, 24 Sep 2019 19:45:14 +0000 (12:45 -0700)]
session: fix cleanup in closing states

Type: fix

Change-Id: Iccc283bb98d3bb459a711ec2b74d6a32ad12903b
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoapi: split api generated files 08/22108/14
Ole Troan [Wed, 18 Sep 2019 23:08:30 +0000 (01:08 +0200)]
api: split api generated files

Split generation of API message enum and the typedefs into
separate files, so that the type file can be included from
elsewhere.

Generate a C file for VPP that contains the API registration,
this was previously done via X macros by the C pre-
processor.

This allows deleting lots of skeleton/copy paste code
for each feature.

plugins/flowprobe
plugins/map
examples/sample-plugin
vnet/ipip
used as Guinea pigs.

Generate a C Test file for VAT, that does the same for VAT plugins.
Also add support for a per-message CLI option, that is currently
limited to VAT help text. option vat_help = "<help text>";

Type: refactor
Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agofib: fix some typos in fib/mtrie 49/22249/2
Lijian.Zhang [Mon, 16 Sep 2019 08:22:36 +0000 (16:22 +0800)]
fib: fix some typos in fib/mtrie

Type: fix

Change-Id: I1af0e4a9bc23a3b6b6d3a74df093801ab6cae1f8
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
4 years agoip: refactor reassembly 13/20313/11
Klement Sekera [Mon, 24 Jun 2019 11:52:49 +0000 (11:52 +0000)]
ip: refactor reassembly

this is a preparation step for introducing other reassembly types

Type: refactor

Change-Id: I197e299dbd729b00eead31667913b8ceff915d63
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agopapi: truncate long logger messages 65/22065/4
Klement Sekera [Thu, 12 Sep 2019 09:01:06 +0000 (09:01 +0000)]
papi: truncate long logger messages

Dumping whole cli_inband output causes huge unformatted messages written
to logger, so truncate these to avoid that.

Type: fix

Change-Id: I59565a98e3595cbfe4971cc346e104cb198d8f24
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovlib: add flag to explicitelly mark nodes which can init per-node packet trace 19/22219/2
Damjan Marion [Tue, 24 Sep 2019 16:10:49 +0000 (18:10 +0200)]
vlib: add flag to explicitelly mark nodes which can init per-node packet trace

Type: feature

Change-Id: I913f08383ee1c24d610c3d2aac07cef402570e2c
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agobuild: pass 'no-pci' to autgenerated config 18/22218/2
Damjan Marion [Tue, 24 Sep 2019 15:45:49 +0000 (17:45 +0200)]
build: pass 'no-pci' to autgenerated config

Avoid aggresive hiijack of pci interfaces when 'make run' and
'make run-release' are used and there is no startup.conf present.

Type: feature

Change-Id: Id653b5f9ac3d2935a40299885e616960e75d4a95
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agosession: avoid transport cleanup if previously deleted 17/22217/3
Florin Coras [Tue, 24 Sep 2019 14:18:51 +0000 (07:18 -0700)]
session: avoid transport cleanup if previously deleted

Type: fix

Change-Id: I485d38c7d9473e2ad1cbd8e17a788ec8d29ab001
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agomisc: improve pcap drop trace output 04/22204/1
Dave Barach [Mon, 23 Sep 2019 20:03:49 +0000 (16:03 -0400)]
misc: improve pcap drop trace output

Append <nodename>: <error-string> to pcap drop traces.

The data displays perfectly fine in [vanilla] wireshark, and makes it
100% obvious which node dropped the packet, and why.

Type: feature
Ticket: VPP-1776

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9b964b99da4011b93723354db6ef0b128fca20cb

4 years agotests: fix test-checkstyle to check plugin tests 84/22184/2
Dave Wallace [Sat, 21 Sep 2019 03:53:22 +0000 (03:53 +0000)]
tests: fix test-checkstyle to check plugin tests

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I93eb0ae4338247fa2479f8e419483d1593436dc7

4 years agomisc: unify pcap rx / tx / drop trace 01/22201/4
Dave Barach [Mon, 23 Sep 2019 14:27:27 +0000 (10:27 -0400)]
misc: unify pcap rx / tx / drop trace

Use a single vnet_pcap_t in vlib_global_main, specifically to support
unified tracing

Update sphinx docs, doxygen tags

Type: refactor
Ticket: VPP-1776

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id15d41a596712968c0714cef1bd2cd5bc9cbdd55

4 years agogbp: fix contract rule handling 61/21861/4
Benoît Ganne [Fri, 6 Sep 2019 11:43:16 +0000 (13:43 +0200)]
gbp: fix contract rule handling

Fix a memory leak when removing old GBP contract rules and make sure a
GBP contract rule exists when matching the corresponding ACL rule.

Type: fix
Fixes: 13a08cc098

Change-Id: Iba67d573e69280ad998488a7a3d3462341c68ea4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotcp: fix unformat cwnd multiplier 93/22193/4
Florin Coras [Mon, 23 Sep 2019 02:05:50 +0000 (19:05 -0700)]
tcp: fix unformat cwnd multiplier

Type: fix

Change-Id: Ife4e650cb8b16f84ca6f77ba7b1d17a0f452fc3f
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agohsa: fix typo in vpp_echo for tx-buf 99/22199/5
MathiasRaoul [Mon, 23 Sep 2019 11:48:49 +0000 (11:48 +0000)]
hsa: fix typo in vpp_echo for tx-buf

fix typo and allow use of Gb, Mb or Kb for tx/rx-buf sizes

Type: fix

Change-Id: I2cfd4c09d6b14dd5c744d942eea09ca9ddcc0f46
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agonat: fix update of outside fibs (output-feature) 23/21423/11
Dmitry Vakhrushev [Tue, 20 Aug 2019 18:44:51 +0000 (14:44 -0400)]
nat: fix update of outside fibs (output-feature)

NAT hasn't worked when NAT interfaces wasn't in
default VRF (fib_index = 0). This issue has been occurred with
interfaces with output-feature in endpoint-dependent mode.

Update VAT commands:
  - update nat44_add_del_address_range
  - add nat44_interface_add_del_output_feature

Ticket: VPP-1732
Type: fix

Change-Id: Iddea15dde4b948f159a0056d48c55bd917037fd1
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
4 years agointerface: use the correct condition for checking if the pcap fd is open 93/21993/4
Andrew Yourtchenko [Wed, 11 Sep 2019 14:14:43 +0000 (14:14 +0000)]
interface: use the correct condition for checking if the pcap fd is open

The 9af7e2e87e used a comparison that fd is >= 0 to check that
the pcap needs closing. While the pcap_close() function does
reset the file descriptor to -1, the freshly initialized structure
has it equal to 0.

This causes the VPP to close stdin if the packets are being seen
on pg interface without the capture file being opened.
This triggers the vpp attempting to read from STDIN
(another bug), which results in running out of memory.

Change-Id: I11d61422701500a9b3e0dd52d59383f297d57f54
Type: fix
Fixes: 9af7e2e87e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoebuild: Add MAKE_PARALLEL_FLAGS to VPP build 52/21152/6
juraj.linkes [Thu, 8 Aug 2019 13:59:10 +0000 (15:59 +0200)]
ebuild: Add MAKE_PARALLEL_FLAGS to VPP build

Align with other packages.

Type: make

Change-Id: I3c8f5c6a349ce9d4e05f546945ae2d8dcf3b1b61
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
4 years agoapi: add missing format_vl_api_ip[46]_address_with_prefix_t 97/22197/2
Jakub Grajciar [Mon, 23 Sep 2019 08:42:19 +0000 (10:42 +0200)]
api: add missing format_vl_api_ip[46]_address_with_prefix_t

Type: fix

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

4 years agofib: do not dump no-longer valid adjacencies 32/21932/4
Benoît Ganne [Thu, 18 Jul 2019 15:34:28 +0000 (17:34 +0200)]
fib: do not dump no-longer valid adjacencies

In some cases, we can refer to no-longer adjacencies (eg. in traces). Do
not dump them in this case as they are probably incorrect (memory can be
reused).

Type: fix

Change-Id: Ib653ba066bb6595ec6ec37d313a3124bce0eeed3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agogbp: remove loopback interfaces between tests 59/21859/2
Benoît Ganne [Tue, 3 Sep 2019 16:17:38 +0000 (18:17 +0200)]
gbp: remove loopback interfaces between tests

Type: fix

Change-Id: I440f25b95b23b717518d101a1327ecf16d6ba39a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoip: fix memory leak in ip_dump handler 39/22139/2
Matthew Smith [Wed, 18 Sep 2019 18:51:46 +0000 (13:51 -0500)]
ip: fix memory leak in ip_dump handler

Type: fix

A vector allocated by vl_api_ip_dump_t_handler() was not being
freed.

Change-Id: I13425b8087e60df60c6aaa1230aa7e6d60b101a8
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agosession: fix msg freeing on error 56/22056/5
Nathan Skrzypczak [Fri, 13 Sep 2019 15:14:57 +0000 (17:14 +0200)]
session: fix msg freeing on error

Type: fix

Change-Id: I0807f84737d5e98e69e9ed27a1de6813b2ddd138
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agotcp: refactor congestion event handling 31/22031/10
Florin Coras [Thu, 12 Sep 2019 06:22:29 +0000 (23:22 -0700)]
tcp: refactor congestion event handling

Type: refactor

Minor cleanup to congestion event handling.

Change-Id: I7179ff9e21c1853382ba814652c9024f3e5b8a37
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agomisc: classifier-based packet trace filter 59/22059/9
Dave Barach [Fri, 13 Sep 2019 21:47:50 +0000 (17:47 -0400)]
misc: classifier-based packet trace filter

See .../src/vnet/classify/trace_classify.h for the business end
of the scheme.

It would be best to hash pkts, prefetch buckets, and do the primary
table lookups two at a time. The inline as given works, but perf
tuning will be required. "At least it works..."

Add "classify filter" debug cli, for example:
classify filter mask l3 ip4 src dst \
  match l3 ip4 dst 192.168.2.10 src 192.168.1.10

Add "pcap rx | tx trace ... filter" to use the current classify filter chain

Patch includes sphinx documentation and doxygen tags.

Next step: device-driver integration

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I05b1358a769f61e6d32470e0c87058f640486b26

4 years agoclassify: remove includes from classifier header file 54/22154/2
Damjan Marion [Thu, 19 Sep 2019 16:43:42 +0000 (18:43 +0200)]
classify: remove includes from classifier header file

Type: refactor

Change-Id: I6f0af1c3078edce1c1b29a8b99c4a232d7084d33
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agohsa: refactor vpp_echo failure handling 57/22157/5
Dave Wallace [Thu, 19 Sep 2019 20:38:44 +0000 (20:38 +0000)]
hsa: refactor vpp_echo failure handling

- Return unique value for each failure condition
- Last failure value returned
- All failures included in description
- Output failure value and description

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I72d5e7f660ad4765c468874421622607af6ae3d1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agointerface: fix pcap drop trace in case of vlan 03/22103/4
Benoît Ganne [Tue, 17 Sep 2019 15:30:35 +0000 (17:30 +0200)]
interface: fix pcap drop trace in case of vlan

Type: fix

Change-Id: If3c4e5c376b51a26143d8922dcacfbda534163bd
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: builtin app rx notifications regardless of state 53/22153/2
Florin Coras [Thu, 19 Sep 2019 15:19:44 +0000 (08:19 -0700)]
session: builtin app rx notifications regardless of state

Type: feature

Provide rx notifications to builtin apps even after disconnect.
Consequently tcp connections that are past FIN_WAIT_1 can still receive
rx notifications.

This is not currently supported for external applications.

Change-Id: I529da7f7120b0e7c62c5026ac71f86d6b5196cf4
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoikev2: add support for GCM cipher 45/22145/2
Filip Tehlar [Wed, 18 Sep 2019 22:43:44 +0000 (22:43 +0000)]
ikev2: add support for GCM cipher

Type: feature
Change-Id: Ic703015b55f0ae947e5e44b10b74b3c79efe7da6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>