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
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
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>
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
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
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
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
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>
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
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
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>
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>
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
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
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
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
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
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
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
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
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>
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
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
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>
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>
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
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>
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>
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
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
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
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
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
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
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
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>
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>
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>
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
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>
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>
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
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>
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>
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
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
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>
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
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
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
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
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
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
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
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
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
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
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>
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>
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>
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>
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
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
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
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
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
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>
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
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>
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
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>
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
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
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>
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>
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
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>
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>
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
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>
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>
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
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>
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>
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
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>
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
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
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
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
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>
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
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>
Neale Ranns [Fri, 19 Mar 2021 08:54:38 +0000 (08:54 +0000)]
policer: Add CLI for all equivalent API functions
Type: improvement
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ic17096c80fbde89f9bb74c29256abbe845130992
Mohsin Kazmi [Wed, 10 Feb 2021 11:03:53 +0000 (12:03 +0100)]
interface: add capabilities flags
Type: improvement
This patch adds flags to represent the modern NICs capabilities.
Change-Id: I96d38d9ab7eac55974d72795cd100d8337168e1e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Mohammed Hawari [Thu, 18 Mar 2021 11:02:08 +0000 (12:02 +0100)]
dpdk: don't mask interrupts for some drivers
It is well known that for some NICs, masking
interrupts results in delaying desc writebacks,
which breaks poll mode. This fix introduces an
"int-unmaskable" dpdk device flag to identify such
devices (typically Intel FVL). For such devices,
interrupts are masked by a call to
file_update(...,UNIX_FILE_UPDATE_DELETE) instead
of rte_eth_dev_rx_intr_disable (...)
Change-Id: Ifbc701aebe8572319b7aae19382bd683a47fc3cf
Type: fix
Fixes:
19ff0c3699342b512c03362b3815df684a661f49
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Klement Sekera [Thu, 18 Mar 2021 14:22:57 +0000 (15:22 +0100)]
tests: remove shm files created by vpp on reset
Even though we don't use shm transport anymore, vpp still populates shm.
Add cleanup before running tests to avoid the nuisance of running out of
space on /dev/shm.
Type: fix
Fixes:
eb506becd038f081bc7ac340412d3685425bb8b4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I2ef87e991223ee60892d56af1482025d91e77d46
Ivan Shvedunov [Mon, 15 Mar 2021 16:05:14 +0000 (19:05 +0300)]
session: fix populating chained buffers
Type: fix
Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I3fdc1711d508bc5b0c2f56b3bd3fb4a56056eb54
Klement Sekera [Tue, 16 Mar 2021 11:52:29 +0000 (12:52 +0100)]
tests: remove shm handling
Not used anymore with socket transport.
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I7061048dee21ce02637e34f73fb9984bd241f7df
pibr [Mon, 22 Feb 2021 22:19:06 +0000 (22:19 +0000)]
dpdk: cryptodev session management
Ensure that dpdk_cryptodev engine async handlers are registered for the set of algorithms supported by all cryptodevices in the system.
Type: improvement
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I8293d87c6f07e935a1a0637704f24918cd3e132a