vpp.git
3 years agostats: counters data model 96/29296/4
Ole Troan [Wed, 7 Oct 2020 16:05:37 +0000 (18:05 +0200)]
stats: counters data model

This adds a new data model for counters.
Specifying the errors severity and unit.
A later patch will update vpp_get_stats to take advantage of this.
Only the map plugin is updates as an example.

New .api language:
A new "counters" keyword to define counter sets.

counters map {
  none {
    severity info;
    type counter64;
    units "packets";
    description "valid MAP packets";
  };
  bad_protocol {
    severity error;
    type counter64;
    units "packets";
    description "bad protocol";
  };
};

Each counter has 4 keywords. severity, which is one of error, info or warn.
A type, which is one of counter64 or gauge64.
units, which is a text field using units from YANG.

paths {
  "/err/ip4-map" "map";
  "/err/ip6-map" "map";
  "/err/ip4-t-map" "map";
  "/err/ip6-t-map" "map";
};

A new paths keyword that maps the counter-set to a path in the stats segment KV store.

Updated VPP CLI to include severity so user can see error counter severity.
DBGvpp# show errors
   Count               Node                    Reason        Severity
        13        ethernet-input              no error         error

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib2177543f49d4c3aef4d7fa72476cff2068f7771
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agoikev2: fix initial contact cleanup 52/28452/5
Filip Tehlar [Wed, 23 Sep 2020 11:20:12 +0000 (11:20 +0000)]
ikev2: fix initial contact cleanup

When looking for existing SA connection to clean up search all per
thread data, not only current one.

Type: fix

Change-Id: I59312e08a07ca1f474b6389999e59320c5128e7d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix coverity warning 63/29263/4
Filip Tehlar [Tue, 6 Oct 2020 08:04:10 +0000 (08:04 +0000)]
ikev2: fix coverity warning

Type: fix

Change-Id: Iee96b3ea3e71ec248c3c3c98d153a08372b5faf0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: fix memory leak in auth routine 35/29235/2
Filip Tehlar [Mon, 5 Oct 2020 12:30:44 +0000 (12:30 +0000)]
ikev2: fix memory leak in auth routine

Type: fix

Change-Id: I93529b069925fcef32cdb22e27975b802b4c3b97
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agol2: mark l2 fib uninitialized after clearing 02/29402/1
Matthew Smith [Mon, 12 Oct 2020 20:04:39 +0000 (15:04 -0500)]
l2: mark l2 fib uninitialized after clearing

Type: fix

After clearing the l2fib with 'vppctl clear l2fib', a SEGV occurs the
next time a MAC address is learned.

In l2fib_clear_table(), the l2fib bihash is freed and then
l2fib_table_init() is called to reinitialize it. l2fib_table_init()
will not do anything if l2fib_main.mac_table_initialized is set to 1.
Reset the value of l2fib_main.mac_table_initialized to 0 before
calling l2fib_table_init().

Change-Id: I87f1a3f9a46c951f36c1c0a5ab795b0ec08c81a8
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agomisc: clang-11 and gcc-10 support 78/29378/3
Damjan Marion [Sat, 10 Oct 2020 17:17:58 +0000 (19:17 +0200)]
misc: clang-11 and gcc-10 support

clang-11 complains:

 error: field 'buffer_template' with variable sized type 'vlib_buffer_t' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]

Type: improvement
Change-Id: I2cb6b4fde723a05b42cf33dd8130df074f0362ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip: IP6 incorrectly disabled on removing first ip6 prefix 90/29390/2
Neale Ranns [Mon, 12 Oct 2020 11:46:53 +0000 (11:46 +0000)]
ip: IP6 incorrectly disabled on removing first ip6 prefix

Type: fix

reference counting on the ip6 state was broken, meaning that disabling
one of serveral ip6 configs on an interface, completely ip6 disabled the
interface.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ie3af51587310ffe871ad2a9cbd927e15a3ececa9

3 years agotcp: use 100us timer resolution 60/29360/4
Florin Coras [Thu, 8 Oct 2020 23:59:54 +0000 (16:59 -0700)]
tcp: use 100us timer resolution

Experimental reduction of tcp timer resolution from 100ms that
allows for finer grained timers, if needed. Please report
issues if any encountered.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4050f7691aa7365b77298b4427408a4a447834fa

3 years agovcl svm: segments improvements 80/29380/6
Florin Coras [Sun, 11 Oct 2020 18:05:04 +0000 (11:05 -0700)]
vcl svm: segments improvements

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I717c64666972bb4e440cb3d1180a5cb26ee25577

3 years agotcp: fix connection reuse with no listener 81/29381/4
Florin Coras [Sun, 11 Oct 2020 18:20:56 +0000 (11:20 -0700)]
tcp: fix connection reuse with no listener

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I674872f68406ac778779a68d3ad991f41765d4e2

3 years agonat: set fib index for bypass session 66/29266/2
Vladimir Isaev [Tue, 6 Oct 2020 09:59:47 +0000 (12:59 +0300)]
nat: set fib index for bypass session

Bihash key already contains rx_fib_index for lookup
but fib value for session itself is set to 0.

In the result bihash is allocated with key with fib index
set, but free function is looking for key with fib index set
to zero. It leads to use-after-free because session itself is
removed from pool but bihash is not because of key mismatch.

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I8ac5a41b0a5a32b1baab9e9d757141d5b24b7798

3 years agolldp: fix typo in mac address constant 79/29379/2
Dmitry Vakhrushev [Sun, 11 Oct 2020 17:32:27 +0000 (20:32 +0300)]
lldp: fix typo in mac address constant

Type: fix
Fixes: 149fd3fbd069a5f7be86e68472578ee7af229cb6
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
Change-Id: I06956f3ed3689172c3682d6b707991613255cabd

3 years agolldp: fix memory leakage 88/29388/2
Dmitry Vakhrushev [Mon, 12 Oct 2020 10:43:39 +0000 (13:43 +0300)]
lldp: fix memory leakage

1. Typo in usage of vnet_hw_interface_add_del_mac_address(),
   which returns 0 when it succeeds instead non zero value.

2. Generated error doesn't clean allocated resources for
   an interface.

3. Returned value from vnet_hw_interface_add_del_mac_address()
   should be erased or reported.

Type: fix
Fixes: 149fd3fbd069a5f7be86e68472578ee7af229cb6

Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
Change-Id: Ia6b28ae70fea127d15eb0102223ff972358766bc
Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com>
3 years agosession: app_name should format with %v 75/29375/3
jiangxiaoming [Sat, 10 Oct 2020 07:23:54 +0000 (15:23 +0800)]
session: app_name should format with %v

Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ib096ad14e6ddbaff52429a416ea4d245703a368d

3 years agomisc: clib_unix_warning usage error 77/29377/1
jiangxiaoming [Sat, 10 Oct 2020 09:32:11 +0000 (17:32 +0800)]
misc: clib_unix_warning usage error

Type: fix
Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ibc4e961388d0976b55b9b936d6a37d36cddab5fe

3 years agoavf: add add_del_mac_address handler 07/29307/8
Damjan Marion [Thu, 8 Oct 2020 11:21:22 +0000 (13:21 +0200)]
avf: add add_del_mac_address handler

Type: improvement
Change-Id: I4d0b1cd87cf2f58a653f40a300da4b7a43348a06
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoacl: move nonip nodes to separate file 69/29369/2
Damjan Marion [Fri, 9 Oct 2020 14:10:59 +0000 (16:10 +0200)]
acl: move nonip nodes to separate file

Type: refactor
Change-Id: Idcef8effa86d6421e4b3e5f747695ddb2982e78f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agowireguard: park the timer process 72/29372/2
Dave Barach [Fri, 9 Oct 2020 15:33:55 +0000 (11:33 -0400)]
wireguard: park the timer process

Until the feature is configured. It would make sense to push more of
the feature init code into the newly-added wg_feature_init()
function. This patch fixes a severe hemorrhoid.

Type: improvement

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

3 years agovlib: save signal handler data to global vbls 70/29370/2
Dave Barach [Fri, 9 Oct 2020 14:17:22 +0000 (10:17 -0400)]
vlib: save signal handler data to global vbls

Turns out that clang is a bit too enthusiastic about mapping static
variables to registers, which makes it hard to extract (especially)
the faulting VA from an optimized core file.

Type: improvement

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

3 years agonat: ipfix logging separation & refactor 49/29149/6
Filip Varga [Tue, 29 Sep 2020 14:53:20 +0000 (16:53 +0200)]
nat: ipfix logging separation & refactor

Type: refactor

Change-Id: I8785e4987e4f60361072440d0c3c6954c9c12394
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agotcp: treat pending timers as active 59/29359/4
Florin Coras [Thu, 8 Oct 2020 20:33:20 +0000 (13:33 -0700)]
tcp: treat pending timers as active

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic63af51fab8dbefe79439554ea563f20e3788afa

3 years agotcp: custom geometry for timer wheel 56/29356/4
Florin Coras [Thu, 8 Oct 2020 16:28:32 +0000 (09:28 -0700)]
tcp: custom geometry for timer wheel

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04f992e5d91d21f1e5bbafef070478cfe268d94a

3 years agovppinfra: memory leak be gone 58/29358/1
Dave Barach [Thu, 8 Oct 2020 20:04:30 +0000 (16:04 -0400)]
vppinfra: memory leak be gone

Type: fix
Fixes: ab1a50cf7407e31097b550226c2b6954d6371bea / gerrit 29272

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

3 years agopg: Choose the input interface from the stream's rx 12/29312/1
Neale Ranns [Thu, 8 Oct 2020 14:02:35 +0000 (14:02 +0000)]
pg: Choose the input interface from the stream's rx

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I656918a417d33ec6bea30054805e03ae19c38f2d

3 years agogre: MPLS over GRE does not select correct fixup function 03/29303/2
Neale Ranns [Thu, 8 Oct 2020 08:10:34 +0000 (08:10 +0000)]
gre: MPLS over GRE does not select correct fixup function

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I9eff41407b0f172f2b567e6a4ea1c48be8df883a

3 years agol2: Fix compile error on unused next_index 05/29305/1
Neale Ranns [Thu, 8 Oct 2020 10:39:07 +0000 (10:39 +0000)]
l2: Fix compile error on unused next_index

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ifc6b4c15f6055df4f403e9cd633e31f061a6d2da

3 years agointerface: shorten vnet_hw_if_rx_mode 98/29298/2
Damjan Marion [Wed, 7 Oct 2020 18:59:07 +0000 (20:59 +0200)]
interface: shorten vnet_hw_if_rx_mode

This is part of bigger refactor.

Type: refactor
Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agopci: add vlib_pci_get_msix_file_index 97/29297/2
Damjan Marion [Wed, 7 Oct 2020 18:00:39 +0000 (20:00 +0200)]
pci: add vlib_pci_get_msix_file_index

Type: improvement
Change-Id: Ibc15aa6f75e989b2b7caa9a57e3665b1ffc7cc18
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip-neighbor: Grat ARPs from different subnet are dropped 35/29035/3
Neale Ranns [Wed, 23 Sep 2020 11:25:21 +0000 (11:25 +0000)]
ip-neighbor: Grat ARPs from different subnet are dropped

Type: test

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Id07e8981a903f11f50fb494a93d01815382025e4

3 years agol2: input performance 32/29232/5
Neale Ranns [Tue, 29 Sep 2020 15:38:51 +0000 (15:38 +0000)]
l2: input performance

Type: improvement

- cache the values form the BD on the input config to avoid loading
- avoid the short write long read on the sequence number
- use vlib_buffer_enqueue_to_next

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I33442b9104b457e4c638d26e9ad3bc965687a0bc

3 years agovirtio: fix the trace 76/29276/2
Mohsin Kazmi [Wed, 7 Oct 2020 11:23:55 +0000 (13:23 +0200)]
virtio: fix the trace

Type: fix

This patch fixes the commit e347acbc31111504c015531e8ad764a86d489309

Change-Id: Icee7a6e250c94ae93e606d7869acc55c7a5806b1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agonat: use proper type for counters 79/29279/2
Klement Sekera [Wed, 7 Oct 2020 12:19:44 +0000 (12:19 +0000)]
nat: use proper type for counters

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I330822c5d675cdfa57ab75ceb0223f11e0ebb7d2

3 years agoipsec: Allow SAs with NULL auth &crypto on IPSec interface 82/29282/2
Neale Ranns [Wed, 7 Oct 2020 13:58:56 +0000 (13:58 +0000)]
ipsec: Allow SAs with NULL auth &crypto on IPSec interface

Type: improvement

on the dedicated IPSec interface, the SA describes the peer, so it is
not possible to forward to a peer for which there is no SA. Therefore if
an SA is added with NULL auth and integ then this explicitly states that
this is what the peer desires.
on the contrary on the IP-IP/GRE interface, in the absence of protection
and an SA, then the traffic is sent in the clear. So adding NULL
auth/crypto iSA is a means to describe that the peer should not be sent
traffic.

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I7ad2d466cc74eb7ff8c4c84e0d7897d06e2fcf86

3 years agofib: Register multicast MAC with interface for accepting interfaces 74/29274/2
Neale Ranns [Mon, 5 Oct 2020 12:26:47 +0000 (12:26 +0000)]
fib: Register multicast MAC with interface for accepting interfaces

Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic6c76b65e2dcc08916373153944507a297c962c0

3 years agovppinfra: fix coverity warnings 81/29281/2
Dave Barach [Wed, 7 Oct 2020 13:37:36 +0000 (09:37 -0400)]
vppinfra: fix coverity warnings

Type: fix

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

3 years agomisc: Purge unused pg includes 56/29256/2
Neale Ranns [Mon, 5 Oct 2020 12:39:41 +0000 (12:39 +0000)]
misc: Purge unused pg includes

Type: style

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I26a19e42076e031ec5399d5ca05cb49fd6fbe1cd

3 years agoapi: add heap alloc to vpp stats 63/29163/2
Ole Troan [Wed, 30 Sep 2020 08:43:00 +0000 (10:43 +0200)]
api: add heap alloc to vpp stats

The Python VPP Stats module also used the VPP heap.
Fix so it now explicitly allocates a heap.

Fixes: f68fccfe7e188fec2c9f91da38ca9acf6f67d811
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I0bd4ae64d6c89cdf634d8d9a91c23ab38017c5cc
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agonat: move nat64 to a subfeature 18/29018/11
Filip Varga [Mon, 14 Sep 2020 09:20:16 +0000 (11:20 +0200)]
nat: move nat64 to a subfeature

Type: refactor

Change-Id: I3b9e17164647d2019b1f40cffeed63393345219e
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agonat: det44 plugin fix style and api cleanup 37/29037/4
Filip Varga [Wed, 23 Sep 2020 11:47:50 +0000 (13:47 +0200)]
nat: det44 plugin fix style and api cleanup

Type: refactor

Change-Id: I3c5ca31de8046b82fb3d3f364ba88370fe51ef02
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agovppinfra: add heap header in front of dlmalloc space 71/29271/4
Damjan Marion [Tue, 6 Oct 2020 15:46:06 +0000 (17:46 +0200)]
vppinfra: add heap header in front of dlmalloc space

This patch adds smal header in front of dlmalloc space, and it stores
some additional information about the heap.

Immediate benefit of this patch is that we know the underlying page size
si we can display heap page statistics / real memory usage.

Type: improvement
Change-Id: Ibd6989cc2f2f64630ab08734c9552e15029c5f3f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: add xxx_not_inline 72/29272/1
Dave Barach [Tue, 6 Oct 2020 18:08:16 +0000 (14:08 -0400)]
misc: add xxx_not_inline

vlib_main_t *vlib_get_main_not_inline(void)
vlib_thread_main_t *vlib_get_thread_main_not_inline(void)
elog_main_t *vlib_get_elog_main_not_inline()

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

3 years agofeature: Add packet trace API 45/27445/16
Jon Loeliger [Mon, 11 May 2020 13:43:51 +0000 (08:43 -0500)]
feature: Add packet trace API

Also spiffed up the vpp_api_test plugin loader so it executes
VLIB_INIT_FUNCTIONs and VLIB_API_INIT_FUNCTIONs.

Type: feature

Change-Id: Id9a4f455d73738c41bcfea220df2112bb9679681
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
3 years agovppinfra: address sanitizer: do not instrument dlmalloc internals 27/29227/2
Benoît Ganne [Mon, 5 Oct 2020 08:33:24 +0000 (10:33 +0200)]
vppinfra: address sanitizer: do not instrument dlmalloc internals

Type: fix

Change-Id: I8b50777b6ce7df461e5256921591a58e52877628
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoikev2: support ipv6 traffic selectors & overlay 33/28733/11
Filip Tehlar [Tue, 8 Sep 2020 06:08:05 +0000 (06:08 +0000)]
ikev2: support ipv6 traffic selectors & overlay

Ticket: VPP-1917
Type: feature

Change-Id: Ie9f22e7336aa7807b1967c48de9843df10fb575c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoipsec: Use bihash for tunnel lookup 25/27225/8
Neale Ranns [Sun, 24 May 2020 16:17:50 +0000 (16:17 +0000)]
ipsec: Use bihash for tunnel lookup

Type: improvement

Change-Id: I0c82722dfce990345fe6eeecdb335678543367e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agolldp: set interface MAC address when enabled 18/29218/2
Klement Sekera [Fri, 2 Oct 2020 14:12:37 +0000 (14:12 +0000)]
lldp: set interface MAC address when enabled

Type: improvement
Change-Id: I4f2dc4e4c1c467fb9acd0fed231c56fcd54c8da9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agovlib: always replace bootstrap vlib_mains 20/29220/2
Dave Barach [Fri, 2 Oct 2020 15:35:44 +0000 (11:35 -0400)]
vlib: always replace bootstrap vlib_mains

Fixes an obscure issue when spinning up pure pthreads which don't have
vlib_main_t clones.

VLIB_REGISTER_THREAD () = {
  <snip>
  .use_pthreads = 1,
  .no_data_structure_clone = 1,
}

Type: improvement

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

3 years agovppinfra: use clib_mem_create_heap() to create numa heap(s) 17/29217/1
Damjan Marion [Fri, 2 Oct 2020 13:01:12 +0000 (15:01 +0200)]
vppinfra: use clib_mem_create_heap() to create numa heap(s)

Type: improvement
Change-Id: Ie04302c576869bc7bfaa9f13ed2ea8a403a393d4
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomemif: map shared memory with clib_mem_vm_map_shared(...) 01/28901/10
Damjan Marion [Thu, 17 Sep 2020 11:41:18 +0000 (13:41 +0200)]
memif: map shared memory with clib_mem_vm_map_shared(...)

Type: improvement
Change-Id: I91031d56aae884a0a42fca343a2fc24c442b1da8
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: add dummy nat_ha_resync() to avoid missing symbol errors 14/29214/2
Damjan Marion [Fri, 2 Oct 2020 10:13:08 +0000 (12:13 +0200)]
nat: add dummy nat_ha_resync() to avoid missing symbol errors

Type: fix
Change-Id: I288e93da192cf48b3d774e36584d471d4daa2727
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip: Fix unformat_ip_prefix 06/29206/3
Nathan Skrzypczak [Thu, 1 Oct 2020 14:50:14 +0000 (16:50 +0200)]
ip: Fix unformat_ip_prefix

Type: fix

Change-Id: I73629ccf7d5a49da3858899dc727cc180fb53003
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agoikev2: fix leaking pending INIT requests 12/29212/2
Filip Tehlar [Thu, 1 Oct 2020 03:08:52 +0000 (03:08 +0000)]
ikev2: fix leaking pending INIT requests

.. when associated profile is deleted.

Type: fix

Change-Id: Ib05831d79b3b58664ee0a930960513fd465373bf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovppinfra: Function to check if a bihash has been initialised 52/29152/2
Neale Ranns [Tue, 29 Sep 2020 14:44:23 +0000 (14:44 +0000)]
vppinfra: Function to check if a bihash has been initialised

Type: improvement

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic31f7721f326ca9d78d645abcea63ce58df5bd5b

3 years agodpdk: split PCI blacklist rte_eal args from startup.conf 96/29196/5
Vladimir Ratnikov [Thu, 1 Oct 2020 10:16:13 +0000 (06:16 -0400)]
dpdk: split PCI blacklist rte_eal args from startup.conf

Type: fix
Fixes: ed04407829728c5d258b6600155edabd5198d971

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

3 years agoikev2: fix cli memory leak 08/29208/2
Benoît Ganne [Wed, 30 Sep 2020 16:35:27 +0000 (18:35 +0200)]
ikev2: fix cli memory leak

Type: fix

Change-Id: Ibdd83fa336427ec0c66224ecebb1b6bd36d1d1ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppinfra: fix legacy huge pages creation for default size 15/29115/4
Benoît Ganne [Mon, 28 Sep 2020 15:34:17 +0000 (17:34 +0200)]
vppinfra: fix legacy huge pages creation for default size

Type: fix

Change-Id: I941b92ebec66ccd9c9e9a12d485844313c9f117b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agobuild: fix build for debian testing 98/29098/5
Chuan Han [Fri, 25 Sep 2020 22:34:06 +0000 (15:34 -0700)]
build: fix build for debian testing

1. add libelf-dev to default deb deps
2. Also use libffi7 instead of libffi6 for debian-testing

Type: fix

Signed-off-by: Chuan Han <chuan.han.comm@gmail.com>
Change-Id: I9f13955812877422ecb8aac3dd34c5828b9c4607

3 years agomisc: allow disabling of ipfix exporter via api 03/29203/2
Alexander Chernavin [Thu, 1 Oct 2020 12:57:59 +0000 (08:57 -0400)]
misc: allow disabling of ipfix exporter via api

Zero collector address indicates that the IPFIX exporter is disabled.
You can zero the collector address via vppctl but you can't do it via
the API because the handler returns an error if the address is zero.

With this change, do not return an error in the handler when the
collector address is zero thus allowing the IPFIX exporter be
disabled.

Type: fix
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I1335c0d06af81f11d743c395399a360c612c0c21

3 years agovlib: fix line-mode cli memory leak 07/29207/2
Benoît Ganne [Thu, 1 Oct 2020 16:20:23 +0000 (18:20 +0200)]
vlib: fix line-mode cli memory leak

Type: fix

Change-Id: Iaf60ec93ee9750074f52ba4dbe955355de5dbccc
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoclassify: Fix a couple bugs in 'pcap filter' command. 84/28984/4
Jon Loeliger [Mon, 21 Sep 2020 21:48:54 +0000 (16:48 -0500)]
classify: Fix a couple bugs in 'pcap filter' command.

- Assert a valid set prior to first use.
- Sort tables by mask prior to selecting first table
- Use actual table indices and not loop index when linking tables

Type: fix

Change-Id: I9c61c8b7fe97c38faed8f2fc1792d7232799f580
Signed-off-by: Jon Loeliger <jdl@netgate.com>
3 years agosvm: simplify memfd client segment mapping 69/29169/6
Florin Coras [Wed, 30 Sep 2020 15:13:44 +0000 (08:13 -0700)]
svm: simplify memfd client segment mapping

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I33c6a5d1686cc32a6cde149083256d6cf0770fc5

3 years agoikev2: fix issue when decrypting packet with no keys 99/29199/1
Filip Tehlar [Wed, 30 Sep 2020 21:56:01 +0000 (21:56 +0000)]
ikev2: fix issue when decrypting packet with no keys

Type: fix

Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: refactor ikev2 node 76/28276/12
Filip Tehlar [Sat, 26 Sep 2020 16:47:13 +0000 (16:47 +0000)]
ikev2: refactor ikev2 node

Type: refactor

Change-Id: I65acbd5d9724c500a24699de973df08016d9d8d6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agosession: init size and watermarks on all seg managers 59/29159/3
Florin Coras [Wed, 30 Sep 2020 02:18:46 +0000 (19:18 -0700)]
session: init size and watermarks on all seg managers

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0cfe04277d80d9c81499651f893fb2d126ac8c85

3 years agosvm: harmonize ssvm names 58/29158/5
Florin Coras [Wed, 30 Sep 2020 01:11:24 +0000 (18:11 -0700)]
svm: harmonize ssvm names

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I26e4ad6bfd9e0be7745f6ba948bf51550fd4215e

3 years agovpp: update 'show bihash' command 70/29170/2
Damjan Marion [Wed, 30 Sep 2020 12:15:24 +0000 (14:15 +0200)]
vpp: update 'show bihash' command

Type: improvement
Change-Id: I6d00ba840d2168af0658f97c45a42d39be7cbbad
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoikev2: better packet parsing functions 59/28259/12
Filip Tehlar [Thu, 16 Jul 2020 07:25:56 +0000 (07:25 +0000)]
ikev2: better packet parsing functions

Ticket: VPP-1918
Type: improvement

Change-Id: I2bc3e30121697404dcd54f1c2127bd85ccc1029e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoikev2: show IKE SA command improvements 27/28427/3
Filip Tehlar [Mon, 17 Aug 2020 10:59:23 +0000 (10:59 +0000)]
ikev2: show IKE SA command improvements

Ticket: VPP-1898
Type: improvement

Change-Id: I1c56df331965c733a2d0eae63a12d5a4ee5a2e41
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovppinfra: use heap to store bihash data 99/29099/7
Damjan Marion [Sat, 26 Sep 2020 17:32:34 +0000 (19:32 +0200)]
vppinfra: use heap to store bihash data

Type: improvement
Change-Id: Ifb0fa114414aa2fdc244f964612ca3ac3e29b5e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosvm session: use new clib mem apis for segments 40/29140/11
Florin Coras [Tue, 29 Sep 2020 06:40:28 +0000 (23:40 -0700)]
svm session: use new clib mem apis for segments

"sh memory map" now reports shared memory segments mapped by session
layer for applications.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7debdcd06c7728abfb5cf817a1ccc37de495472c

3 years agoavf: check duplicate pci address upon create interface 57/29157/2
Steven Luong [Tue, 29 Sep 2020 23:23:25 +0000 (16:23 -0700)]
avf: check duplicate pci address upon create interface

Entering duplicate pci address when creating an avf interface causes
crash in register_node

(gdb) f 4
145     error_exit (1);
(gdb) up
354       clib_error ("more than one node named `%v'", n->name);
(gdb) p n
$1 = (vlib_node_t *) 0x7fffbbe55de4
(gdb) p n->name
$2 = (u8 *) 0x7fffbc410b10 "avf-0/4/a/0-tx"
(gdb)

The fix is to loop through the pci addresses in the avf interface pool
and to reject the duplicate.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I4ed6fb630fb11982d85c5bb325d9f0d6beeaf023

3 years agowireguard: fix udp-port registration 56/29156/2
Artem Glazychev [Tue, 29 Sep 2020 18:07:46 +0000 (01:07 +0700)]
wireguard: fix udp-port registration

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I698ef299316004b797da1e74b64d067caac4bd2d

3 years agosvm: fix max fifo size 55/29155/2
Florin Coras [Tue, 29 Sep 2020 17:27:07 +0000 (10:27 -0700)]
svm: fix max fifo size

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I52ac28ed6d420f03852a425b5a16a7eb8e94b628

3 years agohsa: fix coverity warning 51/29151/3
Florin Coras [Tue, 29 Sep 2020 14:45:25 +0000 (07:45 -0700)]
hsa: fix coverity warning

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I046e5aa90016e45b5cbaec12593ba4ac7a659783

3 years agoikev2: fix false positive NAT detection 32/29132/1
Filip Tehlar [Fri, 25 Sep 2020 16:55:03 +0000 (16:55 +0000)]
ikev2: fix false positive NAT detection

Type: fix

Change-Id: Id7f865f537c55d00a784eec51624ba28e903a083
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovirtio: fix modern device queue notify 41/28841/4
Mohsin Kazmi [Tue, 29 Sep 2020 10:01:25 +0000 (10:01 +0000)]
virtio: fix modern device queue notify

QUEUE_SELECT and QUEUE_NOTIFY_OFF registers are shared between all
workers operating on the same device and operations are not atomic

Type: fix

Change-Id: Ie017b1bfc7e3b6b4e59029f45db78eeffd9f3aeb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovcl svm: provide apps access to fifo chunks 96/29096/7
Florin Coras [Fri, 25 Sep 2020 22:18:13 +0000 (15:18 -0700)]
vcl svm: provide apps access to fifo chunks

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2191b8594b1e87ecc00f237316457db249f73603

3 years agowireguard: fix license headers 11/29111/2
Artem Glazychev [Mon, 28 Sep 2020 12:54:35 +0000 (19:54 +0700)]
wireguard: fix license headers

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: If5cc8894e0d1785dd04ab1e460e017580c9b41ce

3 years agowireguard: fix indents 10/29110/2
Artem Glazychev [Mon, 28 Sep 2020 12:34:23 +0000 (19:34 +0700)]
wireguard: fix indents

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I84cd7b08eac62160cf407409d32dd40cec7ae9d6

3 years agowireguard: readme fix 04/29104/3
Artem Glazychev [Mon, 28 Sep 2020 09:57:26 +0000 (16:57 +0700)]
wireguard: readme fix

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I0080a158fc3e17dfdd360f6ba164e3bfa3d585a6

3 years agodpdk: fix compile 97/29097/4
Fan Zhang [Fri, 25 Sep 2020 21:36:04 +0000 (22:36 +0100)]
dpdk: fix compile

Type: fix

Since DPDK is now compiled by meson but some compiles in VPP is
missing. This patch fixes that.

- Fixes QAT PMD not compiled. QAT meson compile, even for sym
crypto PMD, is happened in drive/compress/qat. Originally all
PMDs in compressdev is disabled by default. This patch fixes
that.

- Fixes DPDK plugin version detection. DPDK meson build
generates rte_build_config.h, which containing all version
information in build-dpdk instead of rte_config.h in make.
This patch uses the file to detect version data.

- Removed SW crypto PMD auto-creation in cryptodev engine. In
case the AESNI-MB PMD required shared library is missing.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: I7cd91abb5de303ff5e4c55cd05e011b57f883524

3 years agoavf: validate queue size config 37/29137/3
Steven Luong [Mon, 28 Sep 2020 19:25:22 +0000 (12:25 -0700)]
avf: validate queue size config

Check CLI queue size is within the range of 64 and 4096
Enhance show hardware to display queue size and number of queues.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I360e3cdb2e69e4ea7380ed924e71a5ae84ed4b64

3 years agovppinfra: don't call dlmalloc API directly from the code 36/29136/2
Damjan Marion [Mon, 28 Sep 2020 17:03:37 +0000 (19:03 +0200)]
vppinfra: don't call dlmalloc API directly from the code

 - it is confusing from end consumer perspective that some thing
   is somewhere called heap and somewhere mspace

 - this is base for additional work where heap pointer is not the same
   thing like mspace

Type: improvement
Change-Id: I644d5a0de17690d65d164d8cec3c5654571629ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoikev2: fix memory leaks 48/28948/2
Benoît Ganne [Thu, 17 Sep 2020 15:08:07 +0000 (17:08 +0200)]
ikev2: fix memory leaks

Type: fix

Change-Id: I5be19a4923b37e2636621d36155178ac348ee41c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovirtio: add packet buffering on tx 86/28686/12
Mohsin Kazmi [Mon, 28 Sep 2020 10:26:33 +0000 (10:26 +0000)]
virtio: add packet buffering on tx

Type: feature

This patch adds packet buffering on tx for
slow backend which have some jitter/delays
in freeing the vrings.

There are some limitations to the current design:
1) It only works in poll mode.
2) Atleast 1 rx queue of an interface (with buffering
   enabled) should be placed on each worker and main thread.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ib93c350298b228e80426e58ac77f3bbc93b8be27

3 years agoclassify: use clib_crc32c on supporting uarch 99/26399/10
Ray Kinsella [Tue, 7 Apr 2020 06:51:23 +0000 (07:51 +0100)]
classify: use clib_crc32c on supporting uarch

Use clib_crc32c in place of clib_xxhash on supporting uarch.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Icdfb4ffa92c2c9e7aebc3ec99f20e91392a103ab

3 years agoclassify: preformance improvements in classifiers 36/25836/20
Ray Kinsella [Thu, 12 Mar 2020 15:52:41 +0000 (15:52 +0000)]
classify: preformance improvements in classifiers

Reworked the code to reduce line fill buffer pressure. Improved compiler loop
unrolling, over the existing complex hand-unrolling. Updated the code to use
vlib_get_buffers & vlib_buffer_enqueue_to_next.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I7dca7515ba91672eaf50a6eecd13811210cf0006

3 years agoapi: remove clib_mem_init from vppapiclient contructor 14/29114/2
Ole Troan [Mon, 28 Sep 2020 14:15:18 +0000 (16:15 +0200)]
api:  remove clib_mem_init from vppapiclient contructor

Having the constructor in the vppapiclient library led to
conflicts with applications wanting to allocate their own heap.
Note: Change of behaviour, applications that do not use a CLIB
heap must now call vac_mem_init() before using any functions from
vppapiclient.

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

3 years agoquic: Fix protip #47 / unformat (input_line) 02/29102/3
Nathan Skrzypczak [Mon, 28 Sep 2020 08:13:19 +0000 (10:13 +0200)]
quic: Fix protip #47 / unformat (input_line)

Type: fix

Change-Id: Id03f50c46d28c850865cc76692424d063a0c2cfb
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovirtio: fix the gro enable/disable on tx-vrings 94/29094/4
Mohsin Kazmi [Fri, 25 Sep 2020 13:36:19 +0000 (15:36 +0200)]
virtio: fix the gro enable/disable on tx-vrings

Type: fix

Change-Id: I96c30baaf34fe7b0cd899966a507501e58cde934
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agocnat: fix cnat_translation_cli_add_del 95/29095/2
Dave Barach [Fri, 25 Sep 2020 21:30:27 +0000 (17:30 -0400)]
cnat: fix cnat_translation_cli_add_del

Make the command scriptable, use unformat_line_input.

"paths" never needed to be a pool, it's used as a vector. Pools *are*
vectors so no harm but... use vec_add2(...) instead.

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

3 years agocnat: fix session scanner restart point 00/29100/1
Dave Barach [Sun, 27 Sep 2020 14:22:43 +0000 (10:22 -0400)]
cnat: fix session scanner restart point

Restart point saved by caller, do not restart at i=0.

Type: fix

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

3 years agobuild: remove OS distros which are EOL 79/29079/2
Dave Wallace [Thu, 24 Sep 2020 16:30:46 +0000 (12:30 -0400)]
build: remove OS distros which are EOL

Type: fix

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

3 years agocnat: Add DHCP support 81/28981/8
Nathan Skrzypczak [Mon, 21 Sep 2020 17:14:08 +0000 (19:14 +0200)]
cnat: Add DHCP support

Type: feature

Change-Id: I4bd50fd672ac35cf14ebda2b0b10ec0b9a208628
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Introduce parametric source policy 92/28792/3
Nathan Skrzypczak [Fri, 11 Sep 2020 15:30:06 +0000 (17:30 +0200)]
cnat: Introduce parametric source policy

Type: feature

Change-Id: I60ae9dd1c100b587d1902a20596b99a5c8a95df7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Add support for SNat ICMP 88/28788/4
Nathan Skrzypczak [Thu, 10 Sep 2020 15:44:41 +0000 (17:44 +0200)]
cnat: Add support for SNat ICMP

Type: feature

snat supports :
* echo request/reply by allocating an identifier
when translating echo requests
* icmp errors in the same manner as dnat

Change-Id: I684e983b0181f95c5eace5a984d40084e5625fa4
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agocnat: Ip ICMP error support 43/28743/4
Nathan Skrzypczak [Tue, 8 Sep 2020 13:16:08 +0000 (15:16 +0200)]
cnat: Ip ICMP error support

Type: feature

Add CNAT translation for ICMP 4 & 6 errors
inner packet will be translated according
to existing sessions.

Change-Id: If118751988f44ef96b800878596296d1ab8ab6f8
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agodocs: fix typo in bihash clib_bihash_search() documentation 92/29092/2
Jon Loeliger [Fri, 25 Sep 2020 14:22:43 +0000 (09:22 -0500)]
docs: fix typo in bihash clib_bihash_search() documentation

Type: docs

Change-Id: Ic8c628141f8a24b857a654e2ea9129f5f97807b6
Signed-off-by: Jon Loeliger <jdl@netgate.com>
3 years agovppinfra: dont complain about linux-vdso.so.1 93/29093/2
Dave Barach [Fri, 25 Sep 2020 14:18:04 +0000 (10:18 -0400)]
vppinfra: dont complain about linux-vdso.so.1

It's not an elf file, yadda yadda.

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

3 years agovppinfra session: file platform independent private data 82/29082/2
Florin Coras [Thu, 24 Sep 2020 18:58:28 +0000 (11:58 -0700)]
vppinfra session: file platform independent private data

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id43b0b6db2b42ee5801236df0bd7f7225e1e081c