vpp.git
3 years agoflow: The type of vni in VxLAN flow should be u32 20/30320/5
Chenmin Sun [Mon, 7 Dec 2020 16:42:43 +0000 (00:42 +0800)]
flow: The type of vni in VxLAN flow should be u32

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I40732dfb4fee4a5cfd699a8badea13d070f6b367

3 years agoavf: rework TX one-by-one loop 67/31967/3
Damjan Marion [Tue, 13 Apr 2021 18:13:07 +0000 (18:13 +0000)]
avf: rework TX one-by-one loop

Type: improvement
Change-Id: I466fd0324d53e8d68b53a2c84d97a722be90f4a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avoid placeholder buffer alloc in datapath 48/31948/4
Damjan Marion [Fri, 9 Apr 2021 15:38:31 +0000 (17:38 +0200)]
avf: avoid placeholder buffer alloc in datapath

Type: improvement
Change-Id: I0ad0fa42f056b5797ba71d6972a44273c13bb97e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avoid ring wrap in the tx path 46/31946/8
Damjan Marion [Thu, 8 Apr 2021 14:34:28 +0000 (16:34 +0200)]
avf: avoid ring wrap in the tx path

Type: improvement
Change-Id: I91ecf0bff2ddd43ab5cf0f03ed2882882154557b
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avf flow bug fix 54/31954/2
Chenmin Sun [Mon, 12 Apr 2021 12:42:42 +0000 (20:42 +0800)]
avf: avf flow bug fix

This patch fixes the below bugs in avf flow:
  1. remove the VXLAN flow as it is not yet supported
  2. fix a typo in IPv6 flow
  3. fix the wrong type of the AH flows

Also did some cleanup in this patch

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I5eae131f1e89071364a41b7006a00e8425089a4f

3 years agogeneve: fix options len parsing as 32-bits words 43/31843/2
Mohammed Hawari [Wed, 31 Mar 2021 15:26:19 +0000 (17:26 +0200)]
geneve: fix options len parsing as 32-bits words

See https://tools.ietf.org/html/rfc8926 3.4. second paragraph Opt Len

Change-Id: I191d835651b2fa64eeb4ec4271497cf3342554be
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

3 years agotests: support attaching to existing vpp 63/31663/20
Klement Sekera [Tue, 16 Mar 2021 11:52:12 +0000 (12:52 +0100)]
tests: support attaching to existing vpp

Introduce a new option DEBUG=attach to run a test against existing
already running vpp. A new target 'make test-start-gdb' will spawn VPP
in gdb for this purpose. Customization options explained in test-help.

Type: improvement
Change-Id: Ia160a85b33da3b2df292d44bb95729af9dd9da96
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agotests: improve naming 65/31865/2
Klement Sekera [Thu, 1 Apr 2021 16:19:29 +0000 (18:19 +0200)]
tests: improve naming

Change capture to pcap to remove confusion in framework.py

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

3 years agodpdk: selection of cryptodev engine data-path 03/31703/7
Fan Zhang [Tue, 30 Mar 2021 16:31:38 +0000 (17:31 +0100)]
dpdk: selection of cryptodev engine data-path

Type: improvement

This patch combined cryptodev op and cryptodev raw API data
paths into one and makes the engine run-timely select which
data path is used: if all cryptodev devices support
RTE_CRYPTODEV_FF_SYM_RAW_DP feature flag, the raw data path
API is used, otherwise the traditional data path is used.

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

3 years agodevices: af_packet - use netlink to get/set mtu 18/31818/3
Aloys Augustin [Mon, 29 Mar 2021 20:08:09 +0000 (22:08 +0200)]
devices: af_packet - use netlink to get/set mtu

The /sys filesystem is not always accurate when switching network
namespaces. Using netlink should work in more situations.

Type: improvement
Change-Id: I71611f14319820469ea7794eec5b7c6c70e2be6d
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
3 years agomemif: Use log_debug for clib_file_add and clib_file_del 75/31875/3
Steven Luong [Fri, 2 Apr 2021 19:23:05 +0000 (12:23 -0700)]
memif: Use log_debug for clib_file_add and clib_file_del

It is more appropriate to use log_debug instead of log_warn when inoking
clib_file_add and clib_file_del.

Type: fix

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

3 years agoavf: correctly set VL_API_AVF_DELETE is_mp_safe 35/31935/3
Steven Luong [Thu, 8 Apr 2021 17:17:26 +0000 (10:17 -0700)]
avf: correctly set VL_API_AVF_DELETE is_mp_safe

Need to add msg_id_base with VL_API_AVF_DELETE to properly set the
correct is_mp_safe variable.

Type: fix

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

3 years agoavf: crash on avf interface delete 34/31934/1
Steven Luong [Thu, 8 Apr 2021 16:31:27 +0000 (09:31 -0700)]
avf: crash on avf interface delete

When deleting an avf interface which is not the very first interface
that was created (dev_instance == 0), VPP crashes.

The reason is every avf interface delete always removes the very first
device instance due to ad->dev_instance was wiped out prior to the
statement pool_put_index (am->devices, ad->dev_instance)

Type: fix

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

3 years agovcl: use per worker mem bapi context 22/31922/2
Florin Coras [Thu, 8 Apr 2021 00:03:01 +0000 (17:03 -0700)]
vcl: use per worker mem bapi context

Type: fix

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

3 years agomisc: add build_static_vppctl.sh 96/31896/3
Damjan Marion [Fri, 2 Apr 2021 21:04:05 +0000 (23:04 +0200)]
misc: add build_static_vppctl.sh

Type: make
Change-Id: I47cf68ecd546cad05732a572579569594f96a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovcl: fix worker cleanup cb function 15/31915/2
Florin Coras [Wed, 7 Apr 2021 07:16:37 +0000 (00:16 -0700)]
vcl: fix worker cleanup cb function

Type: fix

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

3 years agosession: fix coverity warning 13/31913/2
Florin Coras [Tue, 6 Apr 2021 22:54:14 +0000 (15:54 -0700)]
session: fix coverity warning

Type: fix

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

3 years agocrypto: fix ops flags in crypto sw scheduler 50/31550/7
Benoît Ganne [Fri, 22 Jan 2021 17:11:37 +0000 (18:11 +0100)]
crypto: fix ops flags in crypto sw scheduler

The crypto op flags must be reset to frame flags minus invalid values
depending of the operation, instead of forcing them to specific values.

Type: fix

Change-Id: Ib02c2a738bbca6962394b3c03088d516d0da56a0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotests: remove wrappers 35/31835/6
Klement Sekera [Tue, 30 Mar 2021 18:29:05 +0000 (20:29 +0200)]
tests: remove wrappers

Improve the code by removing another kind of wrappers.

Type: improvement
Change-Id: I5292ef6c1761e3c6c2edd15f2aa625dac26c3732
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agosession: basic support for interrupt mode 85/31685/34
Florin Coras [Thu, 18 Mar 2021 22:04:34 +0000 (15:04 -0700)]
session: basic support for interrupt mode

Experimental support for session layer interrupt mode.  When enabled
(use-private-rx-mqs must be set) session queue node switches to
interrupt state when lightly loaded, i.e., no events and less than 1
vector/dispatch.

Because transport protocols require a periodic time update, when in
interrupt state the session queue node workers register a timerfd with
the unix-epoll-input node that when triggered signals, i.e., wakes up,
the queue node. Under light load, the timer is set to trigger every 1ms
whereas if no session is allocated, the worker moves to idle state and
the timeout is set to 100ms.

Type: feature

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

3 years agobuffers: performance improvement 62/31662/8
Radu Nicolau [Tue, 16 Mar 2021 12:45:01 +0000 (12:45 +0000)]
buffers: performance improvement

Initialize the local variables as to prevent first fall
through one by one processing; skip prefetching rather
than doing one by one when count below 12.

Type: improvement

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Change-Id: If02935da081e24f7cfe408811ccf6922cf982092

3 years agotcp: time infra improvements 98/31898/10
Florin Coras [Sat, 3 Apr 2021 01:32:00 +0000 (18:32 -0700)]
tcp: time infra improvements

Type: improvement

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

3 years agovhost: Crash upon disconnect 99/31899/2
Steven Luong [Sat, 3 Apr 2021 05:42:26 +0000 (22:42 -0700)]
vhost: Crash upon disconnect

Patch 24601 introduced description into template. In vhost_user_process,
template is reused inside the while loop to call clib_file_add. But
description is allocated outside of the loop only once. As a result, the
same storage for description is being referenced by all instances of call
to clib_file_add. As long as we don't call clib_file_del, we may be
good with multiple fds sharing the same storage for the description. When
one of the fds disconnects and frees the description, the other fds is
holding onto the free memory pointer. Bad news eventually happens when
another fd disconnects and frees the description that was already free
previously.

The fix is to move the allocation of description inside the loop to avoid
sharing.

Type: fix
Fixes: gerrit.fd.io/r/c/vpp/+/24601

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

3 years agoarping: coverity woe on COPY_PASTE_ERROR 73/31873/2
Steven Luong [Fri, 2 Apr 2021 15:51:17 +0000 (08:51 -0700)]
arping: coverity woe on COPY_PASTE_ERROR

coverity is trying to outsmart human by guessing on COPY_PASTE_ERROR.
Have it your way.

Type: fix

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

3 years agocnat: explicit BIHASH_USE_HEAP setting 00/31900/2
Dave Barach [Sat, 3 Apr 2021 12:52:02 +0000 (08:52 -0400)]
cnat: explicit BIHASH_USE_HEAP setting

The session db (bihash_40_56_t) was inheriting BIHASH_USE_HEAP=1 from
vppinfra/bihash_24_8.h through a convoluted set of #includes. Set
BIHASH_USE_HEAP in cnat_bihash.h, to avoid a surprise long after
anyone remembers the story.

Type: improvement

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

3 years agoip6-nd: Solicitation reply only if target is our link-local 70/31870/2
Neale Ranns [Fri, 2 Apr 2021 07:34:39 +0000 (07:34 +0000)]
ip6-nd: Solicitation reply only if target is our link-local

Type: fix

The fib source IP6_ND is used for all link-local entries, hence
solicitation responses were sent for a peer's address. Constrain the
source check to also in clude the LOCAL flag, which indicates that the
link-local address is ours.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Iba7e66049e4d89ee3f36d77aeb09310b978d70de

3 years agosvm: lock-free fifo chunk list push and pop 57/31857/7
Florin Coras [Thu, 1 Apr 2021 02:36:49 +0000 (19:36 -0700)]
svm: lock-free fifo chunk list push and pop

This avoids chunk allocation/collection deadlocks if either of the sides
crashes.

Type: improvement

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

3 years agobuild: create _objs target for each library 72/31872/2
Damjan Marion [Fri, 2 Apr 2021 15:35:13 +0000 (17:35 +0200)]
build: create _objs target for each library

Type: improvement
Change-Id: I260580cf2d32ff949f44d80c764937ee6102486c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoarping: add arping command 78/31278/16
Steven Luong [Sun, 14 Feb 2021 19:37:02 +0000 (11:37 -0800)]
arping: add arping command

Add linux similar arping command to VPP.
syntax: arping [gratuitous] <address> <interface> [repeat <count>] [interval <secs>]

Type: feature

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

3 years agoip-neighbor: suppress unsolicited clib_warning when sending garp 15/31715/2
Steven Luong [Tue, 23 Mar 2021 18:55:33 +0000 (11:55 -0700)]
ip-neighbor: suppress unsolicited clib_warning when sending garp

Replace clib_warning with vlog_log_debug when sending garp. There is nothing
to alert/warn the operator about sending garp. vlib_log is more appropriate.

Type: fix

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

3 years agomisc: update INFO.yaml 67/31867/1
Damjan Marion [Thu, 1 Apr 2021 15:41:27 +0000 (17:41 +0200)]
misc: update INFO.yaml

Type: make
Change-Id: I20e1509092e79a91cc015b932a06af4b466bfc84
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: support injecting multiple worker pcaps on one PG 39/31839/3
Klement Sekera [Wed, 31 Mar 2021 11:36:38 +0000 (13:36 +0200)]
tests: support injecting multiple worker pcaps on one PG

This change allows one to inject multiple streams for different workers
on the same PG interface at the same time.

Type: improvement
Change-Id: I29d80369aabada261eda466e5a5d8d3518bb8bc8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agosession: always clean rx mqs on app detach 58/31858/3
Florin Coras [Thu, 1 Apr 2021 04:05:24 +0000 (21:05 -0700)]
session: always clean rx mqs on app detach

Type: fix

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

3 years agoavf: disable VLAN stripping on E810 using V2 VLAN APIs 30/31830/3
Damjan Marion [Tue, 30 Mar 2021 12:41:35 +0000 (14:41 +0200)]
avf: disable VLAN stripping on E810 using V2 VLAN APIs

Type: fix
Change-Id: I9bb19a5c9b5b48825f19a4ac124a3628ceaa081d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: fix ordering of feature nodes 60/31860/2
Klement Sekera [Thu, 1 Apr 2021 11:10:25 +0000 (13:10 +0200)]
nat: fix ordering of feature nodes

Fix ordering of feature nodes so that ACL runs after NAT in in2out
direction so it can properly track stuff like ports after NAT rewrite.

Type: fix
Change-Id: I2c689b64765628e9bc77108914f74c6c801d8ce2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoperfmon: combined set and start command. 17/31617/5
Ray Kinsella [Wed, 10 Mar 2021 15:12:02 +0000 (15:12 +0000)]
perfmon: combined set and start command.

Original set, start, stop, reset, show etc interface was somewhat cumbersome, we
can improve slightly by combining set and start.

Type: improvement

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

3 years agoip: extend show cmd of ip reassembly configuration 20/31320/3
Anton Nikolaev [Wed, 17 Feb 2021 09:45:40 +0000 (14:45 +0500)]
ip: extend show cmd of ip reassembly configuration

Type: feature

Add output of field maximum reassembly length with others
ip reassembly configuration fields. This field can be configured
via vpp API, but there was no output of this field in vpp cli.

Output added for ipv4/ipv6 and full/shallow virtual nodes.

Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
Change-Id: Ibbd61aab26189d4a93d32e047d8f4e589fe9f8a5

3 years agolacp: correctly set is_mp_safe for VL_API_SW_INTERFACE_LACP_DUMP 85/31785/4
Steven Luong [Fri, 26 Mar 2021 17:08:28 +0000 (10:08 -0700)]
lacp: correctly set is_mp_safe for VL_API_SW_INTERFACE_LACP_DUMP

Need to add msg_id_base to the index

Type: fix

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

3 years agoperfmon: % power level per node 78/30878/9
Ray Kinsella [Thu, 21 Jan 2021 18:29:42 +0000 (18:29 +0000)]
perfmon: % power level per node

Show % time spent per graph node in power level 0, 1 and 2.

Type: improvement

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

3 years agodpdk: Update version to 21.02 44/31844/2
Kepka, Krzysztof [Wed, 31 Mar 2021 11:32:49 +0000 (13:32 +0200)]
dpdk: Update version to 21.02

Update of DPDK to latest stable release.
As this introduces new build dependency, it also adds install
of pyelftools to the build step. (note however that flush of pip downloads
cache dir is required)
https://doc.dpdk.org/guides-21.02/rel_notes/release_21_02.html

Type: improvement
Signed-off-by: Kepka, Krzysztof <krzysztof.kepka@intel.com>
Change-Id: I7ed2ca965f01c1062f5abc25ea428e8c1a016366

3 years agofib: Move the adjacency midchain nodes into a separate file 37/31837/3
Neale Ranns [Wed, 31 Mar 2021 07:36:33 +0000 (07:36 +0000)]
fib: Move the adjacency midchain nodes into a separate file

Type: refactor

It's only the nodes that require compiling for each arch,

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ibb2bfc756001735cc10ef0fd8db7e8b8358cf8e2

3 years agonat: enable multiworker tests 53/31753/5
Klement Sekera [Wed, 10 Mar 2021 10:18:11 +0000 (11:18 +0100)]
nat: enable multiworker tests

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

3 years agodpdk: fix packet offset for GCM crypto ops 27/31827/2
Robert Shearman [Tue, 30 Mar 2021 10:14:41 +0000 (11:14 +0100)]
dpdk: fix packet offset for GCM crypto ops

The crypto op data offset passed into DPDK is relative to the mbuf
buffer address plus the mbuf data offset, therefore the mbuf data
offset needs to be set rather than left at whatever previous value it
was at, which is likely to be incorrect and result in the wrong
portion of the packet being encrypted/decrypted for GCM.

The fe->crypto_start_offset field is relative to the start of the vlib
buffer (as opposed to the current data pointer), so set the mbuf
data_off field to VLIB_BUFFER_PRE_DATA_SIZE when performing a GCM
crypto op enqueue to match the crypto_start_offset semantics. This
then matches the behaviour in the non-GCM case.

Type: fix
Change-Id: I0ac2a44139387158765a3e04cfcaa5ee6f11d395
Signed-off-by: Robert Shearman <robertshearman@gmail.com>
3 years agonat: fix test for multi-worker scenario 49/31749/10
Klement Sekera [Wed, 24 Mar 2021 16:25:14 +0000 (17:25 +0100)]
nat: fix test for multi-worker scenario

Type: fix
Change-Id: I170f9d8c685f59b7ccf6f9ee7fdc1dcdf2a54fe1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoavf: improve capabilities handling 95/31795/7
Damjan Marion [Mon, 29 Mar 2021 16:22:22 +0000 (18:22 +0200)]
avf: improve capabilities handling

Type: improvement
Change-Id: If35b40168414807e928cb3026633ae9d2fa703ed
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoperfmon: add branch mispredictions 77/30877/9
Ray Kinsella [Thu, 21 Jan 2021 18:25:26 +0000 (18:25 +0000)]
perfmon: add branch mispredictions

Add branches, branches taken (a meteric for branchy code), and branch
misses.

Type: improvement

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

3 years agosrv6-ad-flow: SRv6 Per-Flow Dynamic Proxy 93/29593/12
Francois Clad [Fri, 3 Apr 2020 09:33:02 +0000 (11:33 +0200)]
srv6-ad-flow: SRv6 Per-Flow Dynamic Proxy

Type: feature
Change-Id: Ibfc412200ef5932fa40423075967df6d9156f3ed
Signed-off-by: Francois Clad <fclad@cisco.com>
3 years agonat: correct thread index usage 52/31752/5
Klement Sekera [Wed, 24 Mar 2021 16:29:23 +0000 (17:29 +0100)]
nat: correct thread index usage

Use actual thread index from hash table instead of doing calculation.
Calculated index might be different and could lead to crash.

Type: fix
Change-Id: Iede9a67fbe541cb44eccd0d6ddf4e2c51eb35423
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agonat: avoid creating negative zero checksum 73/31773/4
Klement Sekera [Thu, 25 Mar 2021 17:47:48 +0000 (18:47 +0100)]
nat: avoid creating negative zero checksum

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

3 years agonat: NAT44-ED unused value removal 09/31709/4
Filip Varga [Tue, 23 Mar 2021 11:10:55 +0000 (12:10 +0100)]
nat: NAT44-ED unused value removal

Type: fix

Coverity scan issue fix.

Change-Id: I9036fade15fd381da9c1e6b575f250fdcb21f876
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agonat: NAT66 plugin enable&disable calls update 44/31744/4
Filip Varga [Tue, 23 Mar 2021 11:57:58 +0000 (12:57 +0100)]
nat: NAT66 plugin enable&disable calls update

Type: improvement

Adding support for enable&disable calls
(dynamic plugin configuration).
API (nat66_plugin_enable_disable) and
CLI (nat66 plugin enable/nat66 plugin disable) with support for
outside_vrf id configuration.

Change-Id: I5637ff1621d6662adc3b7c6f7f8176d84a4b492b
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agotests: call venv module directly 34/31834/3
Klement Sekera [Tue, 30 Mar 2021 17:46:06 +0000 (19:46 +0200)]
tests: call venv module directly

This avoids

ModuleNotFoundError: No module named 'virtualenv.seed.embed.via_app_data'

https://github.com/pypa/virtualenv/issues/1873

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

3 years agosession: interrupt mode for session node on main thread 75/31675/8
Florin Coras [Thu, 18 Mar 2021 04:52:49 +0000 (21:52 -0700)]
session: interrupt mode for session node on main thread

Signal, and implicitly run, main thread session queue node via
interrupts instead of the queue process node.

Process node still needed for timers.

Type: improvement

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

3 years agointerface: fix coverity 29/31829/2
Damjan Marion [Tue, 30 Mar 2021 12:34:44 +0000 (14:34 +0200)]
interface: fix coverity

Type: fix
Change-Id: Ia7652fe8e8c20f4f7a019ab7ca0649c2180c7e90
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agostats: python: handle when pattern is not list in ls 17/31817/3
Ole Troan [Mon, 29 Mar 2021 19:12:53 +0000 (21:12 +0200)]
stats: python: handle when pattern is not list in ls

The reimplementation of python stats module mishandled the case
where pattern to ls was not a list.

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

3 years agosvm: cleanup mq private data on fifo segment cleanup 23/31823/3
Florin Coras [Tue, 30 Mar 2021 07:23:54 +0000 (00:23 -0700)]
svm: cleanup mq private data on fifo segment cleanup

Type: fix

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

3 years agomisc: vpptop makefile target 84/30384/19
Vladimir Lavor [Fri, 11 Dec 2020 09:28:49 +0000 (10:28 +0100)]
misc: vpptop makefile target

Type: feature

Added make target to install VPPTop - real-time
viewer of VPP metrics.

New targets in /extras/vpptop/Makefile:
* make start - starts the installed VPPTop binary
* make install - does the installation using the local VPP API
* make cleanup - removes the VPPTop local directory
* make help - prints the VPPTop help info

Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Change-Id: I1b93eaf67214e1fe0567d43409763882caea6416

3 years agonat: fix HA multi-worker issues 46/31646/17
Klement Sekera [Mon, 15 Mar 2021 15:34:01 +0000 (16:34 +0100)]
nat: fix HA multi-worker issues

Use correct vlib_main() in various code parts. Fix tests.

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

3 years agoavf: fix coverity issues 92/31792/3
Chenmin Sun [Mon, 29 Mar 2021 19:50:02 +0000 (03:50 +0800)]
avf: fix coverity issues

CID #220403 ~ 220406

Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: Ibb65f9f2b17b9a9d45c077933b033ca3a65ae42f

3 years agomap: tune dump/details test for socket transport 20/31820/2
Ole Troan [Mon, 29 Mar 2021 22:51:41 +0000 (00:51 +0200)]
map: tune dump/details test for socket transport

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

3 years agosvm session vcl: per app rx message queues 64/30864/37
Florin Coras [Fri, 15 Jan 2021 21:49:33 +0000 (13:49 -0800)]
svm session vcl: per app rx message queues

Add option to use per app private segments for app to vpp message
queues, as opposed to exposing internal message queues segment.

When so configured, internal message queues are still polled by the
session queue node but external app message queues are handled by a new
input node (appsl-rx-mqs-input) that runs in interrupt state. Signaling
of the node, when mqs receive new messages, is done through eventfds
epolled by worker epoll input nodes.

Type: feature

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

3 years agotls: fix app_worker_connect_notify param error 87/31787/2
yedg [Sat, 27 Mar 2021 22:33:00 +0000 (06:33 +0800)]
tls: fix app_worker_connect_notify param error

Type: fix
Signed-off-by: yedongggang <yedg@wangsu.com>
Change-Id: I5ec690e71fa9119a7bf1cfcb6e36263aa732eff0

3 years agotests: move vxlan tests to src/vnet/vxlan/tests 47/30647/5
Dave Wallace [Wed, 6 Jan 2021 15:48:45 +0000 (10:48 -0500)]
tests: move vxlan tests to src/vnet/vxlan/tests

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agovcl: fix only first epoll listen session be registered 79/31779/5
nandfan [Fri, 26 Mar 2021 08:46:58 +0000 (16:46 +0800)]
vcl: fix only first epoll listen session be registered

If configure listen port more than 1 with epoll in nginx, only first
listen port can be registered successed in nginx worker process.

Type: fix

Signed-off-by: nandfan <fanyufei521@outlook.com>
Change-Id: Iec2e058ee972a2cd5b2d1d7d20d373dc17084ce1

3 years agovlib: convert foreach_vlib_main macro to be more gdb and clang-format friendly 81/31781/6
Damjan Marion [Fri, 26 Mar 2021 10:38:01 +0000 (11:38 +0100)]
vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendly

Type: improvement
Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: split vlib_main_t into global and per-thread 23/31623/10
Damjan Marion [Sat, 6 Mar 2021 11:26:28 +0000 (12:26 +0100)]
vlib: split vlib_main_t into global and per-thread

Type: refactor
Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: introduce vlib_get_elog_main() 83/31783/4
Damjan Marion [Fri, 26 Mar 2021 12:45:37 +0000 (13:45 +0100)]
vlib: introduce vlib_get_elog_main()

Type: improvement
Change-Id: I73383eb15186021cd6527d112da8443a0082f129
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: introduce vlib_get_main_by_index(), vlib_get_n_threads() 82/31782/4
Damjan Marion [Fri, 26 Mar 2021 12:06:13 +0000 (13:06 +0100)]
vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()

Type: improvement
Change-Id: If3da7d4338470912f37ff1794620418d928fb77f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: move ping tests to src/plugin/ping/test 48/30648/4
Dave Wallace [Wed, 6 Jan 2021 15:49:24 +0000 (10:49 -0500)]
tests: move ping tests to src/plugin/ping/test

- Refactor make test code to be co-located with
  the vpp plugin source code

Type: test

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

3 years agoavf: flow support enhancement 61/31761/4
Chenmin Sun [Tue, 23 Mar 2021 22:00:55 +0000 (06:00 +0800)]
avf: flow support enhancement

This patch enables ip4, ip6, ip6-n-tuple, l2tpv3 esp ah flows in avf plugin

Type: improvement

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I92c6d4217a6cce4085ee83e8beb4b037c8d7da5f

3 years agoavf: handle flow id in data path 02/30002/22
Chenmin Sun [Thu, 19 Nov 2020 21:06:41 +0000 (05:06 +0800)]
avf: handle flow id in data path

Type: improvement

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I24fa52fee88dabad8f0b84446f796ee055819617

3 years agoavf: add avf flow framework 01/30001/18
Chenmin Sun [Thu, 19 Nov 2020 15:13:30 +0000 (23:13 +0800)]
avf: add avf flow framework

This patch adds the flow support to VPP avf_plugin.
Currently only IP4-N-TUPLE and GTPU flow are supported as
a reference. More flows will be added later.

Type: feature

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I563dbfacecd3eba31e8c3c7769142ea6adba54b6

3 years agosvm: add producer wait function 74/31774/6
Florin Coras [Thu, 25 Mar 2021 18:24:33 +0000 (11:24 -0700)]
svm: add producer wait function

Type: refactor

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

3 years agoacl: fix the integer overflow bug in API message length validation logic 66/31766/3
Andrew Yourtchenko [Thu, 25 Mar 2021 14:13:47 +0000 (14:13 +0000)]
acl: fix the integer overflow bug in API message length validation logic

Sending the bogus acl_add_replace message with count=~0 will result in
an overflow of "expected_len" field which is a u32, thus the message
will pass the validation when it should not.

Solution - make the expected_len a u64 to avoid overflow.

The bug was found while experimenting with libfuzzer as part of
https://gerrit.fd.io/r/c/vpp/+/31763

Type: fix
Change-Id: I4a866d48f2418148236f1b1d77c487b869c7c43d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agosvm: fix producer deadlock in svm_msg_q_wait() 59/31759/5
nandfan [Thu, 25 Mar 2021 06:24:53 +0000 (14:24 +0800)]
svm: fix producer deadlock in svm_msg_q_wait()

1. When producer invokes svm_msg_q_wait() in svm_msg_q_lock_and_alloc_msg_w_ring(), queue mutex is held by itself.
2. Sometimes, svm msg queue is not full and ring is full, svm_msg_q_wait() do nothing with mutex held, consumer will blocking at svm_msg_q_send_signal().

Type: fix

Signed-off-by: nandfan <fanyufei521@outlook.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib90b87ab76534cd42e9a4c3e11703e80d93ca678

3 years agonat: allocate enough space for full port usage 51/31751/4
Klement Sekera [Wed, 24 Mar 2021 16:28:13 +0000 (17:28 +0100)]
nat: allocate enough space for full port usage

Type: fix
Change-Id: I068bfeaf22b9e6cce967c27acdd46d4b8541bdf8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agordma: fix buggy cqe parsing (truncated packets) 72/31772/2
Mohammed Hawari [Thu, 25 Mar 2021 16:35:10 +0000 (17:35 +0100)]
rdma: fix buggy cqe parsing (truncated packets)

Change-Id: I17228bd35cc7aa0d207a16502bf1376c75675302
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

3 years agonat: fix bihash kvp print 50/31750/3
Klement Sekera [Wed, 24 Mar 2021 16:26:57 +0000 (17:26 +0100)]
nat: fix bihash kvp print

Type: fix
Change-Id: I392d348b1a38affac8761b0614b117cd991958d7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoavf: introduce program flow event 00/30000/11
Chenmin Sun [Thu, 19 Nov 2020 14:58:08 +0000 (22:58 +0800)]
avf: introduce program flow event

This patch introduces a 'program flow' virtchannel event.
The parameter is_add is used to identify adding or deleting the rule from avf

Type: improvement

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I1f5545ddc23e4494a25afa36ff601607405a8c3d

3 years agotests: move vppinfra tests to src/vppinfra/test 56/31756/2
Dave Wallace [Wed, 24 Mar 2021 22:03:01 +0000 (18:03 -0400)]
tests: move vppinfra tests to src/vppinfra/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agonat: prevent usage of ED nodes in EI code 48/31748/2
Klement Sekera [Wed, 24 Mar 2021 16:20:40 +0000 (17:20 +0100)]
nat: prevent usage of ED nodes in EI code

Type: fix
Change-Id: I84d511c30eb5878a1867f5e9d2207a39d4f0926c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agonat: fix vnet_feature_next in source hairpinning 47/31747/2
Klement Sekera [Wed, 24 Mar 2021 15:46:22 +0000 (16:46 +0100)]
nat: fix vnet_feature_next in source hairpinning

Avoid erroneous double vnet_feature_next if routing buffer manually.

Type: fix
Change-Id: I3f56c12bf57f59a1e5ddad63a2565fa195934cf6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agotests: introduce test-checkstyle-diff 57/31757/2
Klement Sekera [Wed, 24 Mar 2021 22:24:52 +0000 (23:24 +0100)]
tests: introduce test-checkstyle-diff

Make test-checkstyle-diff is a new target which checks PEP8 compliance
only for changed files. This makes it faster to execute and also more
readable as most of the time, only changed files will fail.

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

3 years agostats: python vpp_stats rewrite to access stat segment directly 78/31678/12
Ole Troan [Thu, 18 Mar 2021 10:12:01 +0000 (11:12 +0100)]
stats: python vpp_stats rewrite to access stat segment directly

This module implement Python access to the VPP statistics segment. It
accesses the data structures directly in shared memory.
VPP uses optimistic locking, so data structures may change underneath
us while we are reading. Data is copied out and it's important to
spend as little time as possible "holding the lock".

Counters are stored in VPP as a two dimensional array.
Index by thread and index (typically sw_if_index).
Simple counters count only packets, Combined counters count packets
and octets.

Counters can be accessed in either dimension.
stat['/if/rx'] - returns 2D lists
stat['/if/rx'][0] - returns counters for all interfaces for thread 0
stat['/if/rx'][0][1] - returns counter for interface 1 on thread 0
stat['/if/rx'][0][1]['packets'] - returns the packet counter
                                  for interface 1 on thread 0
stat['/if/rx'][:, 1] - returns the counters for interface 1 on all threads
stat['/if/rx'][:, 1].packets() - returns the packet counters for
                                 interface 1 on all threads
stat['/if/rx'][:, 1].sum_packets() - returns the sum of packet counters for
                                     interface 1 on all threads
stat['/if/rx-miss'][:, 1].sum() - returns the sum of packet counters for
                                  interface 1 on all threads for simple counters

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I1fe7f7c7d11378d06be8276db5e1900ecdb8f515
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agotests: add vpp test dirs to PYTHONPATH 65/31665/6
Dave Wallace [Wed, 17 Mar 2021 02:12:07 +0000 (22:12 -0400)]
tests: add vpp test dirs to PYTHONPATH

- Required to relocate test infra modules
  to be co-located in feature test directory.
- Remove/regenerate build-root/build-test/src/
  soft links when running make test to allow
  re-running 'make test' after moving source files.
- Suppress annoying 'ls' error message when gathering
  test source files caused by 'c' test application
  directory being named 'test'.
- Use PYTHONPYCACHEPREFIX to generate all
  compiled source under build-root/build-test.
  This only works for python 3.8 or greater, but
  existing 'make test-wipe' target cleans up
  in-situ __pycache__ directories for older
  python versions.

Type: fix

Change-Id: If3c3ff0c58fb26a17395babc34783e06b1dd84e7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agotls: fix cleanup on app close with data 41/31741/2
Florin Coras [Wed, 24 Mar 2021 07:02:49 +0000 (00:02 -0700)]
tls: fix cleanup on app close with data

Type: fix

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

3 years agointerface: do subif or feature arc work in interface-output only if needed 42/31742/2
Damjan Marion [Wed, 24 Mar 2021 10:45:51 +0000 (11:45 +0100)]
interface: do subif or feature arc work in interface-output only if needed

Type: improvement
Change-Id: If3b44682e5bbf68b83adc12fb6c71899aecf8a98
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: improve compilation time 43/31743/3
Damjan Marion [Wed, 24 Mar 2021 11:24:58 +0000 (12:24 +0100)]
virtio: improve compilation time

Type: improvement
Change-Id: I56dadb852f63da0597ddf4db395a22afdf2d9cc0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: fuse fs for the stats segment 91/31491/15
Arthur de Kerhor [Wed, 3 Mar 2021 16:49:15 +0000 (08:49 -0800)]
misc: fuse fs for the stats segment

This extra allows to mount a FUSE filesystem reflecting
the state of the stats segment.

Type: feature

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I692f9ca5a65c1123b3cf28c761455eec36049791

3 years agointerface: simplify and optimize interface-output node 37/31737/3
Damjan Marion [Tue, 23 Mar 2021 20:05:18 +0000 (21:05 +0100)]
interface: simplify and optimize interface-output node

Type: improvement
Change-Id: I58a7d75da2db0ec84c7c1f08fd1ca7a72946f14d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: allow explicitelly setting CLANG_FORMAT_VER 38/31738/1
Damjan Marion [Tue, 23 Mar 2021 20:34:08 +0000 (21:34 +0100)]
misc: allow explicitelly setting CLANG_FORMAT_VER

Type: improvement
Change-Id: I356b1b1804a2b09b25f5a285ada12db6879e2f6a
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: add node adaptive mode flag 96/31696/9
Florin Coras [Fri, 19 Mar 2021 20:12:41 +0000 (13:12 -0700)]
vlib: add node adaptive mode flag

Don't switch nodes from interrupt to polling state unless adaptive mode
flag set. For starters, flag set only on interface input nodes
with no polling rx queue and at least one in adaptive mode.

Type: improvement

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

3 years agointerface: reduce duplicate code in the interface-output node 14/31714/1
Damjan Marion [Tue, 23 Mar 2021 17:47:34 +0000 (18:47 +0100)]
interface: reduce duplicate code in the interface-output node

Type: improvement
Change-Id: I46459a0c0a79677092aa9f8c92b67c0d06f7242e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotls: fix tlsopenssl for remaining buffer 01/31701/1
Sivaprasad Tummala [Mon, 22 Mar 2021 15:51:56 +0000 (21:21 +0530)]
tls: fix tlsopenssl for remaining buffer

Type: fix

1. added additional checks for pending data in
   openssl_ctx_read_tls().
2. fixed read/write typo issues.

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: Id018c62bb9e02bf0d5f9abf929b6030b965a5d61

3 years agovcl: fix libc epoll pwait starved 80/31680/3
wanghanlin [Thu, 18 Mar 2021 12:00:41 +0000 (20:00 +0800)]
vcl: fix libc epoll pwait starved

We call vls_epoll_wait with 0 timeout to process unhandled_evts_vector
in ldp_epoll_pwait_eventfd. But vls_epoll_wait will then call
vppcom_epoll_wait_eventfd to process events in event queue. If there are
continuous events to be handled, then libc_epoll_pwait have no chance to be called.

Type: fix

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Ia4f61d0d438a3475bfde9f6715805274671d4e75

3 years agovlib: graphviz upgrade to allow filters 40/31340/9
Arthur de Kerhor [Thu, 18 Feb 2021 11:09:42 +0000 (03:09 -0800)]
vlib: graphviz upgrade to allow filters

Possibility to draw only the active nodes on the graph.
These are scaled and colored according to their utilization.

Type: improvement
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I7ddb7b62b3a141cb03750dca24f044138fcc577f

3 years agogre: Multipoint GRE fixes 43/31643/2
Neale Ranns [Mon, 15 Mar 2021 14:42:30 +0000 (14:42 +0000)]
gre: Multipoint GRE fixes

Type: fix

- the CLI was broken when a nh-table-id was present, since it overwrote
the next-hop address
- bouncing interface state stacked the adjacencies on the tunnel's
destination (which is all zeros)
- don't crash in the switch path if the interface has no hw-address

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I1ba9fdc9b2185899b753a2d40f23afa847a3ef4f

3 years agotests: add support for worker awareness 49/31649/13
Klement Sekera [Mon, 15 Mar 2021 15:58:10 +0000 (16:58 +0100)]
tests: add support for worker awareness

VppTestCase now has vpp_worker_count property set to number of workers.
This can be overriden by child classes. Also overriden by
VPP_WORKER_CONFIG variable for legacy reasons.

Type: improvement
Change-Id: Ic328bacb9003ddf9e92815767653bd362aa7f086
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agovxlan: add tunnel cache to graph node 27/31027/13
Junfeng Wang [Tue, 9 Mar 2021 08:44:57 +0000 (16:44 +0800)]
vxlan: add tunnel cache to graph node

Type: improvement

Signed-off-by: Drenfong Wong <drenfong.wang@intel.com>
Change-Id: Ia81aaa86fe071cbbed028cc85c5f3fa0f1940a0f

3 years agoapi: Avoid the usage of the freed registration by the API calls 22/31622/4
Andrew Yourtchenko [Thu, 11 Mar 2021 12:54:11 +0000 (12:54 +0000)]
api: Avoid the usage of the freed registration by the API calls

This issue happens if:
- the API client connects via Unix socket
- the client issues the *_dump API call and immediately disconnects

What happens after is that the API handler keeps sending the *_details
messages, however at some point the write fails, and the socket is
deleted.

The attempt of a use of the registration pointer results in interpreting
the socket as a shared memory socket. This results in a crash, because
the data in this structure then does not make sense, like the below:

|
|Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
|__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
|67      ../nptl/pthread_mutex_lock.c: No such file or directory.
|(gdb) bt
|#0  __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
|#1  0x00007ffff500f957 in svm_queue_lock (q=0x0) at /home/ubuntu/vpp/src/svm/queue.c:101
|#2  svm_queue_add (q=0x0, elem=0x7fffa76c2de0 "\210\365\006\060\001", nowait=0) at /home/ubuntu/vpp/src/svm/queue.c:274
|#3  0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43
|#4  send_sw_interface_details (am=<optimized out>, rp=<optimized out>, swif=0x7fffb957a0bc, interface_name=<optimized out>, context=<optimized out>)
|    at /home/ubuntu/vpp/src/vnet/interface_api.c:353
|#5  0x00007ffff6e0edeb in vl_api_sw_interface_dump_t_handler (mp=<optimized out>) at /home/ubuntu/vpp/src/vnet/interface_api.c:412
|#6  0x00007ffff7daeb48 in msg_handler_internal (am=<optimized out>, the_msg=0x7fffb839a5e0, trace_it=<optimized out>, do_it=1, free_it=0)
|    at /home/ubuntu/vpp/src/vlibapi/api_shared.c:501
|#7  vl_msg_api_socket_handler (the_msg=0x7fffb839a5e0) at /home/ubuntu/vpp/src/vlibapi/api_shared.c:790
|#8  0x00007ffff7d7c608 in vl_socket_process_api_msg (rp=<optimized out>, input_v=0x7fffa76c2de0 "\210\365\006\060\001") at /home/ubuntu/vpp/src/vlibmemory/socket_api.c:212
|#9  0x00007ffff7d89ff1 in vl_api_clnt_process (vm=<optimized out>, node=<optimized out>, f=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/vlib_api.c:405
|#10 0x00007ffff53bf9a7 in vlib_process_bootstrap (_a=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1490
|#11 0x00007ffff4da0b2c in clib_calljmp () from /home/ayourtch/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.06
|#12 0x00007fffa99a4d90 in ?? ()
|#13 0x00007ffff53b6cb2 in vlib_process_startup (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0) at /home/ubuntu/vpp/src/vlib/main.c:1515
|#14 dispatch_process (vm=0x7ffff56a9880 <vlib_global_main>, p=0x7fffb5d41380, f=0x0, last_time_stamp=<optimized out>) at /home/ubuntu/vpp/src/vlib/main.c:1571
|#15 0x0000000000000000 in ?? ()
|(gdb) frame 3
|#3  0x00007ffff6e131e3 in vl_api_send_msg (rp=<optimized out>, elem=<optimized out>) at /home/ubuntu/vpp/src/vlibmemory/api.h:43
|43            vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem);
|(gdb) l
|38          {
|39            vl_socket_api_send (rp, elem);
|40          }
|41        else
|42          {
|43            vl_msg_api_send_shmem (rp->vl_input_queue, (u8 *) & elem);
|44          }
|45      }
|46
|47      always_inline int
|(gdb)
|

The approach in this change is to avoid the closing operations "here and
now", but instead mark the the registration as a zombie and place
a forced RPC towards a callback that does the actual cleanup work.

Forced RPC is handled via the API processing loop with barrier sync,
so we are guaranteed not to have any API processing in-process.

Type: fix
Change-Id: I1972d42da620bdb4fd773c83262863c2781d9005
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>