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
Ray Kinsella [Thu, 21 Jan 2021 18:39:26 +0000 (18:39 +0000)]
perfmon: fixes for cache hierarchy
Account for occasional instances with the misses rates between caches
are inconsistent.
Type: fix
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Idfb8bb7543401405cfe04291ad201c28be030cc9
Ray Kinsella [Thu, 21 Jan 2021 18:18:45 +0000 (18:18 +0000)]
perfmon: add support for raw and timestamps
Add perfmon plugin support to output raw counter and timestamps, both
are useful for debug.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ia5a73d1f05e3464c18991c2346f0ed8b7ef63099
Ray Kinsella [Fri, 12 Mar 2021 15:57:29 +0000 (15:57 +0000)]
misc: fix checkstyle on fedora
The fedora clang-format command helpfully does not include the version
suffix, and places clang-format-diff in /usr/share/clang.
Have summited #
1939018 in Fedora, to fix upstream.
https://bugzilla.redhat.com/show_bug.cgi?id=
1939018
Until then ...
Type: fix
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Ibceae0fc15e7461c24288ee04f4d28943f889c36
Filip Tehlar [Wed, 17 Feb 2021 17:53:27 +0000 (17:53 +0000)]
docs: ikev2 usecases
Type: docs
Change-Id: Ib607b9426572585c1c7bfc4fcbbb1591ff5d9d42
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Neale Ranns [Wed, 4 Dec 2019 06:11:00 +0000 (06:11 +0000)]
fib: Allow the creation of new source on the API
Type: feature
an client can dump the existing sources, examine their
priorities, then define thier own source.
Usefull if a client wants to distingusih between say, static,
ospf, bgp, etc routes it has added over the API.
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: I5158b4fa1ebe87381ff8707bb173217f56ea274a
Klement Sekera [Mon, 15 Mar 2021 20:30:15 +0000 (21:30 +0100)]
api: allow specifying no timeout
This functionality is used in make test when DEBUG=gdb is used.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I1339e6460aa624a3bcb4b03db46991590e126f92
Klement Sekera [Mon, 15 Mar 2021 18:52:57 +0000 (19:52 +0100)]
nat: get rid of worker selection callbacks
Make code easier to read and debug.
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib52a4cdd3bcdcc475053aa32af3964c00859e1cd
Mohammed Hawari [Wed, 10 Feb 2021 08:38:05 +0000 (09:38 +0100)]
ipsec: allow inbound non-tunnel SA through CLI
Change-Id: Ia304488900bd9236ab4e7cc6f17ae029ee6f2c00
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Andrew Yourtchenko [Tue, 23 Feb 2021 08:56:27 +0000 (08:56 +0000)]
nat: pnat copy and clear byte instructions
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I8e48bdcc4c311717e067bb0a4e0b409a2eb8e83d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Brian Russell [Thu, 4 Mar 2021 17:13:11 +0000 (17:13 +0000)]
tests: fix syntax warning in ipsec tun test
Testing for equality should be done via '==' rather
than 'is' which tests identity.
Type: fix
Signed-off-by: Brian Russell <brian@graphiant.com>
Change-Id: Iade53aea61d8aadcf6bffbfbef7fdac9a1004873
Dave Barach [Mon, 15 Mar 2021 15:10:27 +0000 (11:10 -0400)]
dns: fix crash when printing unlikely msg
%U format, arguments out of order, etc.
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I829a3e5808923f096369ccf6af6386060ee8b62f
Filip Tehlar [Mon, 22 Feb 2021 16:15:51 +0000 (16:15 +0000)]
ikev2: support responder hostname
Type: feature
Ticket: VPP-1901
Change-Id: I1ad222b54363fd35679d0132d458345a9a18362c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Nathan Skrzypczak [Fri, 5 Mar 2021 16:16:40 +0000 (17:16 +0100)]
cnat: maglev fixes
This fixes cnat_feature node LB
- use siblings instead of direct next_nodes
- only do the lookup if we have NO_NAT
- fix behavior in v6
Type: fix
Change-Id: Ie80c9912946bf55c30eadeb51340f4aec9bb297e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Dave Barach [Thu, 11 Mar 2021 20:12:29 +0000 (15:12 -0500)]
misc: finish removing deprecated cop API
Fix bug in crcchecker. It must be possible to remove a non-production
.api file
Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I00b953e58017cc53051e6f4d8a70403dce8219a0
Mohammed Hawari [Wed, 10 Feb 2021 08:20:51 +0000 (09:20 +0100)]
dpdk: implement interrupt mode
Change-Id: I6ababc99ecf559327a4370914580c98d32680175
Type: feature
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Ole Troan [Wed, 3 Mar 2021 09:40:05 +0000 (10:40 +0100)]
tests: use socket transport instead of shared memory
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I9e65c94a5a05047a5104e9361ea36eac77b40442
Signed-off-by: Ole Troan <ot@cisco.com>
Andrew Yourtchenko [Thu, 11 Mar 2021 12:33:59 +0000 (12:33 +0000)]
libmemif: fix the include for ssize_t
Change-Id: I83830e64fb0fc302474837ebfa4f8cb133b1dccf
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Klement Sekera [Mon, 15 Mar 2021 14:46:09 +0000 (15:46 +0100)]
nat: remove unused parameter
Type: refactor
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ifb4a9c52fd2c5dd9f3f5cf41214aa1851f6d7acd
Klement Sekera [Fri, 12 Mar 2021 17:16:10 +0000 (18:16 +0100)]
tests: fix NoneType printing if VPP died early
Make error message more meaningful.
Type: fix
Change-Id: I3c49cb179c3ee7a59657b3ae9a06311f57dc52ac
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Mohammed Hawari [Fri, 5 Feb 2021 14:40:00 +0000 (15:40 +0100)]
ip: extend punt CLI for exception packets
Change-Id: I20e48a5ac8068eccb8d998346d35227c4802bb68
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: feature
Dmitry Vakrhushev [Thu, 11 Feb 2021 21:42:40 +0000 (00:42 +0300)]
interface: fix extra locking on fib/mfib table
Unlocking previeous fib/mfib table before bind it to a new.
Currently if rebind interface table from one to another,
previous table's lock wouldn't decrease the locks count.
Type: fix
Change-Id: I09340baf1c7039aed3be15ee231eded7364b213e
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
Klement Sekera [Wed, 10 Mar 2021 09:45:44 +0000 (10:45 +0100)]
nat: remove unused import
Type: style
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I66b7ed03f784f3992a910ad6a52ed89116a39297
Andrew Yourtchenko [Tue, 9 Mar 2021 19:02:06 +0000 (19:02 +0000)]
libmemif: add an include of sys/types.h header file
the ssize_t is defined there.
Change-Id: Ie46d196347ab91d0a92c15f331db14fe3b57061c
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Florin Coras [Thu, 11 Mar 2021 00:15:11 +0000 (16:15 -0800)]
hsa: add support for tls to proxy
Type: improvement
Change-Id: I934e1e981bfa3e5ef81a61b2180604f9b9fc991b
Signed-off-by: Florin Coras <fcoras@cisco.com>