vpp.git
20 months agowireguard: add dos mitigation support 14/36714/4
Alexander Chernavin [Wed, 20 Jul 2022 12:43:42 +0000 (12:43 +0000)]
wireguard: add dos mitigation support

Type: feature

With this change:
 - if the number of received handshake messages exceeds the limit
   calculated based on the peers number, under load state will activate;
 - if being under load a handshake message with a valid mac1 is
   received, but mac2 is invalid, a cookie reply will be sent.

Also, cover these with tests.

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

20 months agoikev2: fix rekeying with multiple notify payloads 09/36809/2
Atzm Watanabe [Mon, 8 Aug 2022 06:45:36 +0000 (15:45 +0900)]
ikev2: fix rekeying with multiple notify payloads

Type: fix
Signed-off-by: Atzm Watanabe <atzmism@gmail.com>
Change-Id: I065bd5c26055d863d786023970e7deeed261b31c

20 months agovnet: On rx-mode set, return error for an actual error. 07/36807/1
Wayne Morrison [Fri, 5 Aug 2022 13:47:24 +0000 (09:47 -0400)]
vnet: On rx-mode set, return error for an actual error.

In set_hw_interface_change_rx_mode(), when vnet_hw_if_set_rx_queue_mode()
returns an error it actually returns success.  This has been changed to
return a clib_error_return() value.

Type: fix
Change-Id: Iba39c875d9e15463cb6492d8a966234560a1f522
Signed-off-by: Wayne Morrison <wmorrison@netgate.com>
20 months agotests: fix node variant selection 77/36777/2
Benoît Ganne [Fri, 29 Jul 2022 08:52:34 +0000 (10:52 +0200)]
tests: fix node variant selection

Type: fix
Fixes: 4830e4f78fb8e46b23a1a0711cd06969a77d8d95

Change-Id: Iddc73dbda633acd72bd82e52f8ae83c17e3940f6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
20 months agovppapigen: make json in parallel 48/36448/5
Nathan Skrzypczak [Thu, 16 Jun 2022 15:00:02 +0000 (17:00 +0200)]
vppapigen: make json in parallel

Type: improvement

This patches makes the make json-api-files
run in parallel in the same python runtime.

Default number of workers is 8, and run time
goes from ~20s to ~2s on average.

Change-Id: Id8cff013889db2671f6b6b4af9a019460c656f81
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
20 months agotests: run a test inside a QEMU VM 37/32637/23
Naveen Joy [Tue, 11 May 2021 17:31:18 +0000 (10:31 -0700)]
tests: run a test inside a QEMU VM

Use the script test/run.py to run a test named test_vm_tap
inside a QEMU VM. The run script builds out a virtual env,
launches a light weight QEMU VM, mounts host directories,
starts VPP inside the VM and runs the test. The test named
test_vm_tap, creates two tap v2 interfaces in separate Linux
namespaces and using iPerf, streams traffic between the VM
and VPP. All data files are stored in the directory named
/tmp/vpp-vm-tests. To clean up, use the make test-wipe
command.
Usage:
test/run.py --vm --debug --test test_vm_tap

Type: improvement

Change-Id: I4425dbef52acee1e5b8af5acaa169b89a2c0f171
Signed-off-by: Naveen Joy <najoy@cisco.com>
20 months agodpdk: enable interrupt support for vmxnet3 66/36766/2
Benoît Ganne [Wed, 27 Jul 2022 15:50:46 +0000 (17:50 +0200)]
dpdk: enable interrupt support for vmxnet3

Type: feature

Change-Id: I0abbe925d6b9d3dd7196cd8beaf4f471beb45bd6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
20 months agoarping: validate am->interfaces before check address 96/36796/5
GaoChX [Thu, 4 Aug 2022 02:04:33 +0000 (10:04 +0800)]
arping: validate am->interfaces before check address

May cause pointers point to unexpected non-zero addresses if not
validate vec

Type: fix

Change-Id: Ie4d3343d6734125b98e0dc962e33e0c7514da829
Signed-off-by: GaoChX <chiso.gao@gmail.com>
20 months agowireguard: add processing of received cookie messages 13/36713/3
Alexander Chernavin [Wed, 20 Jul 2022 10:48:56 +0000 (10:48 +0000)]
wireguard: add processing of received cookie messages

Type: feature

Currently, if a handshake message is sent and a cookie message is
received in reply, the cookie message will be ignored. Thus, further
handshake messages will not have valid mac2 and handshake will not be
able to be completed.

With this change, process received cookie messages to be able to
calculate mac2 for further handshake messages sent. Cover this with
tests.

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

21 months agoipsec: fix coverity warnings found in fast path implementation 02/36702/2
Piotr Bronowski [Mon, 18 Jul 2022 16:45:22 +0000 (16:45 +0000)]
ipsec: fix coverity warnings found in fast path implementation

This patch fixes followig coverity issues:
CID 274739 Out-of-bounds read
CID 274746 Out-of-bounds access
CID 274748 Out-of-bounds read

Type: fix
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I9bb6741f100a9414a5a15278ffa49b31ccd7994f

21 months agoip6-nd: fix ip6 ra cli issue 79/36779/2
Takanori Hirano [Fri, 29 Jul 2022 11:21:30 +0000 (20:21 +0900)]
ip6-nd: fix ip6 ra cli issue

Fix parse problem with per-prefix settings (e.g. valid-lifetime)
in ip6 ra.

Type: fix
Signed-off-by: me@hrntknr.net
Change-Id: I2a00bf5b9621ebc16211227d70e376fc2f61bae1

21 months agosession: fix a crash when using unregistered transport proto 68/36768/2
Filip Tehlar [Thu, 28 Jul 2022 08:39:13 +0000 (08:39 +0000)]
session: fix a crash when using unregistered transport proto

Type: improvement

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

21 months agoip6-nd: copy mac address to wrong buffer current_data 85/36585/2
liangrq [Mon, 4 Jul 2022 08:23:21 +0000 (16:23 +0800)]
ip6-nd: copy mac address to wrong buffer current_data

Type: fix

Receive router solicitation in pop vlan interface, it will cause copy mac address to wrong buffer current_data and can not reply the solicitation right

Signed-off-by: liangrq <liangrq@efly.cc>
Change-Id: Ic40a5a47a52c8187aaf6c6854df761529e6f24d9

21 months agovppinfra: fix formatting of format_base10 03/36703/5
Pim van Pelt [Tue, 19 Jul 2022 08:32:22 +0000 (08:32 +0000)]
vppinfra: fix formatting of format_base10

format_base10 reads 64b but is fed 32b values at the callsite; change
to u64 consistently. The function has only one call site in
interface/monitor.c which has a few additional bugs (spurious
character, and ambiguous 'bits' versus 'bytes' in the output).

Type: improvement
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I360f0d439cc13c09bd3f53db8184bd12ad4bc2e9

21 months agolibmemif: fix chain buffer support 73/36673/3
Mohsin Kazmi [Mon, 18 Jul 2022 11:21:05 +0000 (11:21 +0000)]
libmemif: fix chain buffer support

Type: fix

This patch fixes chain buffer support as transmit side
missing to set the flag to the descriptor in case of
chain buffers.

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

21 months agolinux-cp: fix endianess for autoendian methods 10/36710/6
Stanislav Zaikin [Tue, 19 Jul 2022 14:08:15 +0000 (16:08 +0200)]
linux-cp: fix endianess for autoendian methods

If an API methos is specified as "autoendian" it should use macros with
_END at the end.

Type: fix

Change-Id: I73b7b4f6996b30631c4355ace156ed0665c4b8ad
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
21 months agovcl: new vcl api to get detailed session errors 00/36700/4
Radha krishna Saragadam [Mon, 18 Jul 2022 14:11:05 +0000 (19:41 +0530)]
vcl: new vcl api to get detailed session errors

Sometimes VPP rejects application connection requests
due to various reasons. Some errors application can
retry to get a successful connection.
In a non-blocking session, VCL sends EPOLLHUP.
An application can call a new API
vppcom_session_get_error to find the details and retry
depending on the error.

Type: fix

Signed-off-by: Radha krishna Saragadam <krishna_srk2003@yahoo.com>
Change-Id: If0e21a8e25701f66a190a2799b2209e0c31f897c

21 months agolinux-cp: change namespace to netns 09/36709/4
Stanislav Zaikin [Mon, 18 Jul 2022 06:55:04 +0000 (08:55 +0200)]
linux-cp: change namespace to netns

namespace is a keyword for c++ compilers

Type: fix

Change-Id: Ia8fc9ef1cc15fe9d0e40b3f543f9e8f411203b89
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
21 months agostats: add loops per second counter in the stats segment. 01/36701/3
Radha krishna Saragadam [Mon, 18 Jul 2022 14:20:23 +0000 (19:50 +0530)]
stats: add loops per second counter in the stats segment.

This change adds loops per second in the stats segment.
Applications using the stats segment to monitor VPP
can use this for better monitoring

Type: fix

Signed-off-by: Radha krishna Saragadam <krishna_srk2003@yahoo.com>
Change-Id: I53081f40ee918eec9763513a639b9d8a02488b20

21 months agosession: increase retries to grab mq lock 99/36699/4
Radha krishna Saragadam [Mon, 18 Jul 2022 13:53:06 +0000 (19:23 +0530)]
session: increase retries to  grab mq lock

With thousands of UDP sessions,
Sometimes VPP needs more time to grab the MQ lock for a session.
So increased tries from 5 to 75.

Type: fix
Signed-off-by: Radha krishna Saragadam <krishna_srk2003@yahoo.com>
Change-Id: Id8b877255aedcdcf206e9d0869fe5246645d76e7

21 months agolinux-cp: API downgrade due to namespace keyword 98/36698/2
Matthew Smith [Mon, 18 Jul 2022 13:19:26 +0000 (13:19 +0000)]
linux-cp: API downgrade due to namespace keyword

Type: fix

A user had trouble compiling C++ code to work with the linux-cp APIs
because some messages contain a field called namespace, which is a
reserved word for C++. We wish to rename those fields so the messages
which are affected are being set to in_progress.

Change-Id: I3bd1dc898c146a9980161a562b2b453313bb58fd
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
21 months agodpdk: fix mlx5 dpdk init with no-multi-seg 37/36437/2
Tianyu Li [Fri, 10 Jun 2022 09:30:47 +0000 (09:30 +0000)]
dpdk: fix mlx5 dpdk init with no-multi-seg

Build vpp with MLX DPDK PMD,
make DPDK_MLX4_PMD=y DPDK_MLX5_PMD=y DPDK_MLX5_COMMON_PMD=y build-release
With no-multi-seg in startup.conf,
Mellanox NIC init failed with following message,

rte_eth_rx_queue_setup[port:2, errno:-12]: Unknown error -12
mlx5_net: port 2 Rx queue 0: Scatter offload is not configured and
no enough mbuf space(2176) to contain the maximum RX packet length(2065)
with head-room(128)

In Mellanox NIC PMD driver, 'di.max_rx_pktlen' is returned as 65536,
and 'di.max_mtu' is returned as 65535, which makes
the driver_frame_overhead logic not suitable for Mellanox NICs.
So skip the logic code if MAX_MTU is returned as 65535.

Type: fix
Fixes: 1cd0e5dd533f ("vnet: distinguish between max_frame_size and MTU")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I027b76b8d07fb453015b8eebb36d160b4bc8df9c

21 months agotests: add fast path ipv6 python tests for outbound policy matching 42/36642/3
Piotr Bronowski [Fri, 8 Jul 2022 12:45:51 +0000 (12:45 +0000)]
tests: add fast path ipv6 python tests for outbound policy matching

This patch introduces set of python tests for fast path ipv6, based on
ipv4 tests. Some missing parts of ipsec framework has been added
in order to test ipv6 implementation.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Icc13322787d76485c08106bad2cb071947ad9846

21 months agoipsec: fast path outbound policy matching implementation for ipv6 41/36641/4
Piotr Bronowski [Fri, 8 Jul 2022 12:45:05 +0000 (12:45 +0000)]
ipsec: fast path outbound policy matching implementation for ipv6

With this patch fast path for ipv6 policy lookup is enabled.
This impelentation scales and outperforms original implementation when
the number of defined flows is higher thatn 100k.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I9364b5b8db4fc708790d48c538add272c7cea400

21 months agoquic: fix coverity warning 58/36658/2
Florin Coras [Tue, 12 Jul 2022 18:24:34 +0000 (11:24 -0700)]
quic: fix coverity warning

Type: fix
Fixes: 5b4b4c0

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

21 months agoperfmon: add Arm event bundles 92/36192/10
Zachary Leaf [Mon, 23 May 2022 11:23:40 +0000 (06:23 -0500)]
perfmon: add Arm event bundles

Included statistic bundles (all NODE type):
  - Instructions and CPU cycles, including IPC
  - Data cache access/refills/%
  - Data TLB cache access/refills/%
  - Instruction cache access/refills/%
  - Instruction TLB cache access/refills/%
  - Memory/Bus accesses, memory errors
  - Branch (mis)predictions, architecturally & speculatively executed
  - Processor frontend/backend stalls (stalled cycles)

Type: feature
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Tested-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I7ea4a27c8df8fc7222b743a98bdceaff727e4112

21 months agoperfmon: enable perfmon plugin for Arm 30/33630/13
Zachary Leaf [Thu, 12 May 2022 07:26:00 +0000 (02:26 -0500)]
perfmon: enable perfmon plugin for Arm

This patch enables statistics from the Arm PMUv3 through the perfmon
plugin.

In comparison to using the Linux "perf" tool, it allows obtaining
direct, per node level statistics (rather than per thread). By accessing
the PMU counter registers directly from userspace, we can avoid the
overhead of using a read() system call and get more accurate and fine
grained statistics about the running of individual nodes.

A demo of perfmon on Arm can be found at:
https://asciinema.org/a/egVNN1OF7JEKHYmfl5bpDYxfF

*Important Note*
Perfmon on Arm is dependent on and works only on Linux kernel versions
of v5.17+ as this is when userspace access to Arm perf counters was
included.

On most Arm systems, a maximum of 7 PMU events can be configured at once
- (6x PMU events + 1x CPU_CYCLE counter). If some perf counters are in
use elsewhere by other applications, and there are insufficient counters
remaining to open the bundle, the perf_event_open call will fail
(provided the events are grouped with the group_fd param, which perfmon
currently utilises).

See arm/events.h for a list of PMUv3 events available, although it is
implementation defined whether most events are implemented or not. Only
a small set of 7 events is required to be implemented in Armv8.0, with
some additional events required in later versions. As such, depending on
the implementation, some statistics may not be available. See Arm
Architecture Reference Manual for Armv8-A, D7.10.2 "The PMU event number
space and common events" for more information.

arm/events.c:arm_init() gets information from the sysfs about what
events are implemented on a particular CPU at runtime. Arm's
implementation of the perfmon source callback .bundle_support uses this
information to disable unsupported events in a bundle, or in the case
no events are supported, disable the entire bundle.

Where a particular event in a bundle is not implemented, the statistic
for that event is shown as '-' in the 'show perfmon statistics' cli
output, by disabling the column.

There is additional code in perfmon.c to only open events which are
marked as implemented. Since we're only opening and reading events that
are implemented, some extra logic is required in cli.c to re-align
either perfmon_node_stats_t or perfmon_reading_t with the column
headings configured in each bundle, taking into account disabled
columns.

Userspace access to perf counters is disabled by default, and needs to
be enabled with 'sudo sysctl kernel/perf_user_access=1'.

There is a check built into the Arm event source init function
(arm/events.c:arm_init) to check that userspace reading of perf counters
is enabled in the /proc/sys/kernel/perf_user_access file.

If the above file does not exist, it means the kernel version is
unsupported. Users without a supported kernel will see a warning
message, and no Arm bundles will be registered to use in perfmon.

Enabling/using plugin:
  - include the following in startup.conf:
    - plugins { plugin perfmon_plugin.so { enable }
  - 'show perfmon bundle [verbose]' - show available statistics bundles
  - 'perfmon start bundle <bundle-name>' - enable and start logging
  - 'perfmon stop' - stop logging
  - 'show perfmon statistics' - show output

For a general guide on using and understanding Arm PMUv3 events, see
https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/arm-neoverse-n1-performance-analysis-methodology

Type: feature
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Tested-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I0620fe5b1bbe78842dfb1d0b6a060bb99e777651

21 months agoperfmon: make less arch dependent 91/36191/4
Zachary Leaf [Mon, 23 May 2022 11:22:27 +0000 (06:22 -0500)]
perfmon: make less arch dependent

In preparation for enabling perfmon on Arm platforms, move some Intel
/arch specific logic into the /intel directory and update the CMake to
split the common code from arch specific files.

Since the dispatch_wrapper code is very different on Arm/Intel,
each arch can provide their own implementation + conduct any additional
arch specific config e.g. on Intel, all indexes from the mmap pages are
cached. The new method intel_config_dispatch_wrapper conducts this
config and returns a pointer to the dispatch wrapper to use.

Similarly, is_bundle_supported() looks very different on Arm/Intel, so
each implementation is to provide their own arch specific checks.

Two new callbacks/function ptrs are added in PERFMON_REGISTER_SOURCE to
support this - .bundle_support and .config_dispatch_wrapper.

Type: refactor
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
Change-Id: Idd121ddcfd1cc80a57c949cecd64eb2db0ac8be3

21 months agowireguard: fix coverity warnings 38/36638/2
Artem Glazychev [Fri, 8 Jul 2022 12:01:19 +0000 (19:01 +0700)]
wireguard: fix coverity warnings

Type: fix

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

21 months agodpdk: add ID for 4xxx QAT VF 40/36640/1
Matthew Smith [Wed, 6 Jul 2022 15:52:20 +0000 (10:52 -0500)]
dpdk: add ID for 4xxx QAT VF

Type: improvement

Enable use of 4th gen QAT devices. Will be available on Sapphire Rapids.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I89e7d29e10ecb4c36c700ff5e017796161ec6c5e

21 months agogre: fix returning the flags in the API 91/36591/2
Ivan Shvedunov [Tue, 5 Jul 2022 11:13:35 +0000 (15:13 +0400)]
gre: fix returning the flags in the API

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I5ecfb242e5905c9bd8ce19cd9ab6efd657ee14d4

21 months agovppinfra: fix memory leak in sparse_vec_free() 89/36589/2
Sergey Matov [Mon, 23 Nov 2020 17:35:28 +0000 (21:35 +0400)]
vppinfra: fix memory leak in sparse_vec_free()

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Sergey Matov <sergey.matov@travelping.com>
Change-Id: I4ec1a68b7266f05ab7c543cd8207afb29e740743

21 months agomisc: pass NULL instead of 0 for pointer in variadic functions 88/36588/2
Andreas Schultz [Fri, 15 May 2020 09:50:07 +0000 (11:50 +0200)]
misc: pass NULL instead of 0 for pointer in variadic functions

0 is not NULL (at least not in all cases), passing 0 into a variadic
function in a place where the consumer reads it as pointer might
leave parts of the pointer uninitilized and hence filled with random
data.

It seems that this used to work with gcc, but clang seems to treat the
0 in those places as a 32bit integer.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
Change-Id: I37d975eef5a1ad98fbfb65ebe47d73458aafea00

22 months agobuffers: protect against bad thread indices 27/36427/2
Jon Loeliger [Mon, 13 Jun 2022 15:39:32 +0000 (10:39 -0500)]
buffers: protect against bad thread indices

There is a very rare bug in NAT processing that yeilds a thread
index of ~0.  When this happens, vlib_get_frame_queue_elt()
suffers a segfault and VPP quits.  Prevent an outright fault
by dropping the packet instead.

Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I48c7a268925bb821ea15e58db5d4bfb211c40c09

22 months agovcl: check if listener valid on disconnect cleanup 38/36538/2
Florin Coras [Wed, 29 Jun 2022 03:01:20 +0000 (20:01 -0700)]
vcl: check if listener valid on disconnect cleanup

Type: fix

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

22 months agomisc: VPP 22.06 Release Notes 35/36535/2
Andrew Yourtchenko [Thu, 23 Jun 2022 05:18:21 +0000 (05:18 +0000)]
misc: VPP 22.06 Release Notes

Type: docs
Change-Id: I15971b21fd660b4893218640c0d5e5a5247868f1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 0d352a97c5e3ad1f5f6eab18a978a14b0b9e06a8)

22 months agovrrp: while delete vr can't delete multi virtual address. 10/36510/7
GaoChX [Tue, 28 Jun 2022 08:25:03 +0000 (16:25 +0800)]
vrrp: while delete vr can't delete multi virtual address.

Here is bug example:
vpp# create loopback interface
loop0
vpp# vrrp vr add loop0 vr_id 1 priority 100 192.168.1.1 192.168.1.2
vpp# vrrp vr del loop0 vr_id 1
vpp# vrrp vr add loop0 vr_id 1 priority 100 192.168.1.1 192.168.1.2
vrrp vr add: vrrp_vr_add_del returned -105

Type: fix
Signed-off-by: GaoChX <chiso.gao@gmail.com>
Change-Id: I3e0d086ac8fb52756339cff19b9a83911ec9748b

22 months agosr: SRv6 Path Tracing Sink node behavior 47/36547/2
Ahmed Abdelsalam [Wed, 29 Jun 2022 17:11:08 +0000 (17:11 +0000)]
sr: SRv6 Path Tracing Sink node behavior

Type: feature
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I2d3a0211abfee3501d3d77c80da20e67e1e9e133

22 months agovlib: enqueue_to_next_with_aux implementation 07/36307/5
Mohammed Hawari [Tue, 31 May 2022 16:11:05 +0000 (18:11 +0200)]
vlib: enqueue_to_next_with_aux implementation

Change-Id: I0e1bb39d765ec3efa7b28ca02fb7beeb23607e51
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
22 months agoclassify: use 32 bits hash 49/36349/4
Benoît Ganne [Wed, 8 Jun 2022 08:49:17 +0000 (10:49 +0200)]
classify: use 32 bits hash

classify hash used to be stored as u64 in buffer metadata, use 32 bits
instead:
 - on almost all our supported arch (x86 and arm64) we use crc32c
   intrinsics to compute the final hash: we really get a 32-bits hash
 - the hash itself is used to compute a 32-bits bucket index by masking
   upper bits: we always discard the higher 32-bits
 - this allows to increase the l2 classify buffer metadata padding such
   as it does not overlap with the ip fib_index metadata anymore. This
   overlap is an issue when using the 'set metadata' action in the ip
   ACL node which updates both fields

Type: fix

Change-Id: I5d35bdae97b96c3cae534e859b63950fb500ff50
Signed-off-by: Benoît Ganne <bganne@cisco.com>
22 months agosr: code refactor and style fix 46/36546/3
Ahmed Abdelsalam [Wed, 29 Jun 2022 16:30:21 +0000 (16:30 +0000)]
sr: code refactor and style fix

Type: refactor
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: Iff5e85952273526d5c9d9e7e73bd2b6c15bcd7f6

22 months agosvm: check svm_msg_q_size_to_alloc success 48/36548/1
Ofer Heifetz [Wed, 29 Jun 2022 17:18:27 +0000 (20:18 +0300)]
svm: check svm_msg_q_size_to_alloc success

svm_msg_q_size_to_alloc must return a valid base address, if it fails
pass up the error for handling

Type: fix

Change-Id: I408492f65f646862122acb9a187819b3bbf4f91c
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
22 months agosr: Add support for SRv6 Path Tracing Infrastructure 40/36540/3
Ahmed Abdelsalam [Wed, 29 Jun 2022 11:08:42 +0000 (11:08 +0000)]
sr: Add support for SRv6 Path Tracing Infrastructure

This patch adds support for the infrastructure
required to support SRv6 Path Tracing defined in
https://datatracker.ietf.org/doc/draft-filsfils-spring-path-tracing/

Type: feature

Change-Id: If3b09d6216490a60dd5a816577477b6399abc124
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
22 months agohsa: reduce number of preallocated vcl test server sessions 37/36537/2
Florin Coras [Wed, 29 Jun 2022 02:21:32 +0000 (19:21 -0700)]
hsa: reduce number of preallocated vcl test server sessions

Type: improvement

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

22 months agoipsec: add fast path python tests 10/36210/9
Fan Zhang [Wed, 25 May 2022 20:03:40 +0000 (20:03 +0000)]
ipsec: add fast path python tests

This patch introduces set of python tests for fast path, based on
flow cache tests. There was a bug in calculating of policy mask when
adding to fast path, which has been fixed. Memory size for bihash
tables for both ip4 and ip6 outbound fast path policies
has been increased.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Ibeee904ae7179f5dafbd45bb44282436f0b80821

22 months agotests: add ipsec flow performance unit test 99/36099/16
Piotr Bronowski [Thu, 5 May 2022 18:51:21 +0000 (18:51 +0000)]
tests: add ipsec flow performance unit test

This patch adds performacne and functional tests for ip4
outbound traffic policy matching.
Test setup is configurable in startup.conf and though the test
parameters. Cache, fast path, fast path burst mode can be enabled
and disabled,
and performance for different lookup setup can be measured.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I1d04d196e412f47f43b7e5cbd46607bf6a9cc40e

22 months agoipsec: show fast path flag in cli 16/36316/5
Fan Zhang [Wed, 25 May 2022 19:42:08 +0000 (19:42 +0000)]
ipsec: show fast path flag in cli

This patch updates the "show ipsec spd" cli to display
policies maintained by fast path bihash table.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I58b9f92f3132dc9809b50786dc912e09c4b84d81

22 months agoipsec: add fast path configuration parser 98/36098/15
Piotr Bronowski [Fri, 6 May 2022 13:52:24 +0000 (13:52 +0000)]
ipsec: add fast path configuration parser

Parser can be configured from the level of startup.conf file:
fast path can be enabled and disabled.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Ifab83ddcb75bc44c8165e7fa87a1a56d047732a1

22 months agoipsec: add spd fast path matching 97/36097/15
Piotr Bronowski [Tue, 10 May 2022 14:06:29 +0000 (14:06 +0000)]
ipsec: add spd fast path matching

This patch adds matching functionality for spd fast path
policy matching. Fast path matching has been introduced
for outbound traffic only.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I03d5edf7d7fbc03bf3e6edbe33cb15bc965f9d4e

22 months agoipsec: make match function inline 75/36175/13
Piotr Bronowski [Tue, 10 May 2022 14:06:29 +0000 (14:06 +0000)]
ipsec: make match function inline

This patch introduces ipsec_output.h file. Matching implementation is
moved there. The reason behind is the possibility of unit testing
matching mechanism. Therefore we need to have functions that are in
scope of our intrest there and since these are inline their
implementation needs to be moved to the header file as well.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Id7c605375d1f3be146abf96ef70d336a5d156444

22 months agoipsec: add/delete ipsec fast path policy 96/36096/18
Piotr Bronowski [Tue, 10 May 2022 13:18:22 +0000 (13:18 +0000)]
ipsec: add/delete ipsec fast path policy

This patch introduces functions to add and delete fast path
policies.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I3f1f1323148080c9dac531fbe9fa33bad4efe814

22 months agosession: fix connected udp accepts 36/36536/2
Florin Coras [Tue, 28 Jun 2022 23:01:35 +0000 (16:01 -0700)]
session: fix connected udp accepts

Type: fix

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

22 months agosession quic: allow custom config of rx mqs seg size 15/36515/3
Florin Coras [Tue, 28 Jun 2022 21:34:45 +0000 (14:34 -0700)]
session quic: allow custom config of rx mqs seg size

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Idc0fdebfea29c241d8a36128241ccec03eace5fd

22 months agodocs: fix broken links 05/36505/5
Pratikshya Prasai [Mon, 27 Jun 2022 15:02:04 +0000 (11:02 -0400)]
docs: fix broken links

Type: docs

Signed-off-by: Pratikshya Prasai <pratikshyaprasai2112@gmail.com>
Change-Id: I729de9e18624c63a72ec415a05c55617cb360c47

22 months agoipsec: introduce spd fast path types 95/36095/13
Piotr Bronowski [Tue, 10 May 2022 09:08:47 +0000 (09:08 +0000)]
ipsec: introduce spd fast path types

This patch introdcues basic types supporting fast path lookup.
Fast path performs policy matching with use of hash lookup
(particularly bihash tries has been used for that purpose). Fast path
lookup addresses situation where huge number of policies is created
(~100k or more). In such scenario adding/removing a policy
and policy matching is not efficient and poorly scales (for example
adding 500k policies takes a few hours. Also lookup time
increases significantly). With fast path adding and matching up to
1M flows scales up linearly (adding 1M of policies takes about 150s
on the test machine vs many hours in case of original implementation,
also matching time is significantly improved). Fast path will not
deal well with a huge number of policies that are spanning large
ip/port ranges. Large range will be masked out almost entirely leaving
only a few bits for calculating the hash key. Such keys will tend to
 gather much more policies than other keys and hash will match most of
the packets anihilating advantages of hashing. Having said that
we also think that it is not the real life scenario.

Type: feature
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I600dae5111a37768ed4b23aa18426e66bbf7b529

22 months agoipsec: change wildcard value for any protocol of spd policy 52/36352/3
Piotr Bronowski [Thu, 9 Jun 2022 09:09:28 +0000 (09:09 +0000)]
ipsec: change wildcard value for any protocol of spd policy

Currently 0 has been used as the wildcard representing ANY type of
protocol. However 0 is valid value of ip protocol (HOPOPT) and therefore
it should not be used as a wildcard. Instead 255 is used which is
guaranteed by IANA to be reserved and not used as a protocol id.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2320bae6fe380cb999dc5a9187beb68fda2d31eb

22 months agoquic:fix crash rx_fifo full or grow 49/36449/2
fanxb [Fri, 17 Jun 2022 08:19:43 +0000 (16:19 +0800)]
quic:fix crash rx_fifo full or grow

if when the rx_fifo grows, svm_fifo_enqueue() return -4,
stream_data->app_rx_data_len += rlen type conversion occurs,
Finally,stream->recvstate.data_off calculation is wrong.

Type:fix

Signed-off-by: fanxb <fxb_mail@163.com>
Change-Id: Iae11f0c453f32d836f4148d70e3b121545a53a90

22 months agostats: fix prometheus exporter crash on large number of FIB entries 43/36443/1
Alexander Chernavin [Wed, 15 Jun 2022 14:42:17 +0000 (14:42 +0000)]
stats: fix prometheus exporter crash on large number of FIB entries

Type: fix

Currently, prometheus exporter may crash because of memory exhaustion
when dumps metrics if the FIB contains large number of routes.

With this fix, increase memory size for prometheus exporter to be able
to handle large number of FIB entries.

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

22 months agodocs: fix spelling errors 36/36436/1
Dave Wallace [Tue, 14 Jun 2022 16:06:55 +0000 (12:06 -0400)]
docs: fix spelling errors

- also add docs-spell to checkstyle-all make target

Type: fix
Fixes: 5f6422db9

Change-Id: I8e9d7d17a03ee7b55f4e1785983459c43af267f7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
22 months agoip: reassembly - Add node level stats, fix customapp behavior 06/36306/3
Vijayabhaskar Katamreddy [Tue, 31 May 2022 15:58:10 +0000 (15:58 +0000)]
ip: reassembly - Add node level stats, fix customapp behavior

Type: fix

Added stats for success and failure cases
Fixed Custom app behaviors for the error / drop cases

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Id6e981c7be5c5b3cee5af2df505666d5558da470

22 months agobuild: update makefile for ubuntu 22.04 docker executors 22/36422/3
Saima Yunus [Sat, 11 Jun 2022 02:34:04 +0000 (19:34 -0700)]
build: update makefile for ubuntu 22.04 docker executors

* apt '—force-yes' is deprecated in the version of apt in Ubuntu 22.04
* several Ubuntu-22.04-specific packages (e.g. python3-virtualenv, libssl-dev, clang clang-format-11)
are needed in the current VPP installation as well

Type: fix

Signed-off-by: Saima Yunus <yunus.saima.99@gmail.com>
Change-Id: I96ead90152f692233da812cdc853792bedb47c3c

22 months agodocs: cleaning up VPP documents by deleting unnecessary info. 31/36331/5
Saima Yunus [Thu, 19 May 2022 18:48:59 +0000 (11:48 -0700)]
docs: cleaning up VPP documents by deleting unnecessary info.

- cleaned up the 'build/run VPP' docs

Type: docs

Signed-off-by: Saima Yunus <yunus.saima.99@gmail.com>
Change-Id: I9dbddbe1932804b8d507cb2f1631cd7116e59072

22 months agordma: bump to rdma-core 41.0 55/36355/3
Benoît Ganne [Thu, 9 Jun 2022 10:09:19 +0000 (12:09 +0200)]
rdma: bump to rdma-core 41.0

Type: improvement

Change-Id: Ifdbb879d3018996c09f0caf55df11038ead173a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
22 months agodpdk: add support allow/block scan mode for vmbus dev 51/36351/10
Xiaoming Jiang [Wed, 8 Jun 2022 15:28:59 +0000 (15:28 +0000)]
dpdk: add support allow/block scan mode for vmbus dev

Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Id3f45968cd24f53350dce365b2cc9b3191ec836f

22 months agovcl: fix iperf3 server crash issue when it runs over vpp host stack. 30/36130/10
Liangxing Wang [Fri, 13 May 2022 04:24:19 +0000 (04:24 +0000)]
vcl: fix iperf3 server crash issue when it runs over vpp host stack.

Issue:

Let iperf3 server run via ldp and vcl on top of vpp's host stack. If
iperf3 client connects this iperf3 server with tcp MSS setting option,
iperf3 server will always crash.

Root cause:

When MSS option is specified by iperf3 client, iperf3 server will
recreate the listening socket firstly, then call setsockopt() to set MSS
immediately. Iperf3 code can be referred here:
https://github.com/esnet/iperf/blob/58332f8154e2140e40a6e0ea060a418138291718/src/iperf_tcp.c#L186.
However, in vcl layer vpp_evt_q of this recreated session is not
allocated yet. So iperf3 server crashes with vpp_evt_q null pointer access.

Fix:

Add session vpp_evt_q null pointer check in vcl_session_transport_attr().
Add a vcl test case for this MSS option scenario.

Type: fix
Signed-off-by: Liangxing Wang <liangxing.wang@arm.com>
Change-Id: I2863bd0cffbe6e60108ab333f97c00530c006ba7

22 months agovppinfra: fix bihash_8_16 entry format function 18/36418/1
Benoît Ganne [Fri, 10 Jun 2022 07:40:47 +0000 (09:40 +0200)]
vppinfra: fix bihash_8_16 entry format function

Type: fix

Change-Id: I1e8655baaf09b455f7f0052452402a372f738d0f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
22 months agohsa: allow first segments larger than 4g for proxy 16/36416/4
Florin Coras [Thu, 9 Jun 2022 19:38:13 +0000 (12:38 -0700)]
hsa: allow first segments larger than 4g for proxy

Type: improvement

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

22 months agoip: improve ip ACL traces 48/36348/3
Benoît Ganne [Wed, 8 Jun 2022 08:56:33 +0000 (10:56 +0200)]
ip: improve ip ACL traces

Type: improvement

Change-Id: I85c73cb940d81d0b249eda0d57de135bcd798418
Signed-off-by: Benoît Ganne <bganne@cisco.com>
22 months agovppinfra: missing __clib_export for clib_pmalloc_alloc_aligned 15/36315/3
Damjan Marion [Wed, 1 Jun 2022 14:18:23 +0000 (16:18 +0200)]
vppinfra: missing __clib_export for clib_pmalloc_alloc_aligned

Type: improvement
Change-Id: I7489327d8b9c5f69b4ceb2159456f00f8a3612df
Signed-off-by: Damjan Marion <damarion@cisco.com>
22 months agoudp: add cli to dump registered ports 47/36347/2
Benoît Ganne [Wed, 8 Jun 2022 08:23:43 +0000 (10:23 +0200)]
udp: add cli to dump registered ports

Type: improvement

Change-Id: Ic949e3136a7cf27011d098a50e91920f83226ea9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
22 months agowireguard: increment interface RX counters 32/36332/2
Matthew Smith [Thu, 2 Jun 2022 19:11:28 +0000 (19:11 +0000)]
wireguard: increment interface RX counters

Type: improvement

When packets were received and processed successfully, increment the
byte/packet counters for the tunnel interface.

Change-Id: I42855607ac6916de641be42aac86c9942cc97140
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
22 months agoclassify: fix sesssion details api 43/36343/1
Nathan Skrzypczak [Tue, 7 Jun 2022 16:30:40 +0000 (18:30 +0200)]
classify: fix sesssion details api

We were not allocating space for the
variable length payload in the response
message.

Type: fix

Change-Id: I345102f4555f66c5632ab0882ca1dd178e98eb7b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
22 months agovlib: fix crash on packet on deleted interface 34/36334/4
Pim van Pelt [Fri, 3 Jun 2022 21:05:26 +0000 (21:05 +0000)]
vlib: fix crash on packet on deleted interface

If ip4_neighbor_probe (or any other) is sending packet to a deleted interface,
ASSERT trips and dataplane crashes. Example:

create loopback interface instance 0
set interface ip address loop0 10.0.0.1/32
set interface state GigabitEthernet3/0/1 up
set interface state loop0 up
set interface state loop0 down
set interface ip address del loop0 10.0.0.1/32
delete loopback interface intfc loop0
set interface state GigabitEthernet3/0/1 down
set interface state GigabitEthernet3/0/1 up
comment { the following crashes VPP }
set interface state GigabitEthernet3/0/1 down

This sequence reliably crashes VPP:

(gdb)p n->name
$4 = (u8 *) 0x7fff82b47578 "interface-3-output-deleted”

If the interface doesn't exist, return ~0 and be tolerant of this in the
two call sites of counter_index()

Type: fix
Signed-off-by: Pim van Pelt <pim@ipng.nl>
Change-Id: I90ec58fc0d14b20c9822703fe914f2ce89acb18d

22 months agosr: SRv6 TEF behavior support 38/36338/4
Ahmed Abdelsalam [Mon, 6 Jun 2022 15:54:02 +0000 (15:54 +0000)]
sr: SRv6 TEF behavior support

Adding support for the SRv6 TEF (Timestamp, Encapsulation and Forward) behavior defined in
draft-filsfils-spring-path-tracing (https://datatracker.ietf.org/doc/draft-filsfils-spring-path-tracing/).

Type: feature

Change-Id: I7f38b593147daf8d27af9c983448cf82947e5bed
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
22 months agowireguard: fix crash by not sending arp via wg interface 25/36325/4
Alexander Chernavin [Thu, 2 Jun 2022 09:55:37 +0000 (09:55 +0000)]
wireguard: fix crash by not sending arp via wg interface

Type: fix

Currently, neighbor adjacencies on a wg interface are converted into a
midchain only if one of the peers has a matching allowed prefix
configured. If create a route that goes through a wg interface but the
next-hop address does not match any allowed prefixes, an ARP/ND request
will try to be sent via the wg interface to resolve the next-hop address
when matching traffic occurs. And sending an ARP request will cause VPP
to crash while copying hardware address of the wg interface which is
NULL. Sending an ND message will not cause VPP to crash but the error
logged will be unclear (no source address).

With this fix, convert all neighbor adjacencies on a wg interface into a
midchain and update tests to cover the case. If there is no matching
allowed prefix configured, traffic going such routes will be dropped
because of "Peer error". No changes if there is matching allowed prefix
configured.

Also, fix getting peer by adjacency index.

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

22 months agohsa: dealloc proxy fifos on right thread 35/36335/2
Florin Coras [Fri, 3 Jun 2022 21:29:20 +0000 (14:29 -0700)]
hsa: dealloc proxy fifos on right thread

Type: fix

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

22 months agohsa: refactor proxy session lookup and cleanup 33/36333/4
Florin Coras [Fri, 3 Jun 2022 17:51:27 +0000 (10:51 -0700)]
hsa: refactor proxy session lookup and cleanup

Type: improvement

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

22 months agosession: fix double free in CLI 30/36330/2
Filip Tehlar [Fri, 3 Jun 2022 12:21:16 +0000 (12:21 +0000)]
session: fix double free in CLI

Type: fix

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

22 months agoipfix-export: Fix frame leak in flow_report_process_send() 28/36328/1
Jon Loeliger [Thu, 2 Jun 2022 20:18:54 +0000 (15:18 -0500)]
ipfix-export: Fix frame leak in flow_report_process_send()

The flow_report_process_send() function always allocates a frame.
However, when no template_send is needed, template_bi is ~0.
When this happens, no vectors are placed in the frame.  When
the frame is then "put", a check for n_vectors == 0 prevents
the frame from actually being placed back on the free list.
Fix that by using a direct call to vlib_frame_free() when
there are no frame vctors.

Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I936b5cea4cb3c358247c3d2e1a77d034a322ea76

23 months agosession: make sure fifos are freed on right thread 21/36321/3
Florin Coras [Wed, 1 Jun 2022 21:44:11 +0000 (14:44 -0700)]
session: make sure fifos are freed on right thread

Type: improvement

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

23 months agostats: swap used and total stats 45/36245/2
Leland Krych [Thu, 26 May 2022 15:37:54 +0000 (08:37 -0700)]
stats: swap used and total stats

Type: fix

reported stats seem to have mixed up used and total counters

Signed-off-by: Leland Krych <leland.krych@gmail.com>
Change-Id: I221c7b114c0da2ed53171d7f047a4bda07ee6cb2

23 months agopapi: vpp_serializer.py - replace slow bytes() with fast bytearray() 08/36308/7
Viktor Velichkin [Tue, 31 May 2022 19:12:15 +0000 (22:12 +0300)]
papi: vpp_serializer.py - replace slow bytes() with fast bytearray()

https://docs.python.org/3/library/stdtypes.html

"if concatenating bytes objects, you can similarly use bytes.join() or io.BytesIO, or you can do in-place concatenation with a bytearray object. bytearray objects are mutable and have an efficient overallocation mechanism"

Type: improvement

Signed-off-by: Viktor Velichkin <avisom@yandex.ru>
Change-Id: Id20d337f909cce83fcd9e08e8049bb0bf5970fbc

23 months agovlib: add VLIB_NUM_WORKERS_CHANGE_FN() handler 09/36309/2
Damjan Marion [Tue, 31 May 2022 22:45:18 +0000 (00:45 +0200)]
vlib: add VLIB_NUM_WORKERS_CHANGE_FN() handler

Allows features to update their data structures after change in number
of worker threads.

Type: improvement
Change-Id: Icd4d197e28608f5bbb1edd13eb624cd98e33cafe
Signed-off-by: Damjan Marion <damarion@cisco.com>
23 months agoip: unformat_ip_address should no modify its argument on failure 44/36044/3
Benoît Ganne [Tue, 26 Apr 2022 16:44:19 +0000 (18:44 +0200)]
ip: unformat_ip_address should no modify its argument on failure

When failing to match an ip address, we should not reset the ip address
that could have been initialized by a previous match.

Type: fix

Change-Id: I026766391eb3eb8230f75f66bf4b681e774741d9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
23 months agonat: disable nat44-ei-in2out-output ttl check 48/36248/3
Alexander Skorichenko [Fri, 27 May 2022 08:23:20 +0000 (08:23 +0000)]
nat: disable nat44-ei-in2out-output ttl check

Type: fix

A packet passing through nat44-ei-in2out-output,
has its ttl value validated in earlier nodes.
"ip4-input" node checks ttl for locally generated packets.
"ip4-rewrite" node validates ttl in forwarded packets.

Thus for example, the ED counterpart disables ttl checks
in its "nat44-ed-in2out-output" node.
This patch updates nat44 EI conditions for ttl checks to
those currently used in nat44 ED case, meaning no extra ttl
validation for in2out when output-feature is enabled.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: Idd15d7c9a746b60c0a6dac5537d00ef10c257fdc

23 months agovppapigen: fix make go-api for go1.18 61/36161/3
Nathan Skrzypczak [Wed, 18 May 2022 11:46:24 +0000 (13:46 +0200)]
vppapigen: fix make go-api for go1.18

This patch updates the go-api-files logic for supporting go1.18.
Notable changes are that `go get ...` changed to `go install`
and that we need to bump the govpp binapigen version to integrate
a go1.18 fix.

This patch also simplifies the cli execution syntax

Type: fix

Change-Id: I1d8aac65490fe3ea4c1965a4775b6bf8d5c05d26
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
23 months agobuild: add python3-pip dependency 51/36251/2
Saima Yunus [Thu, 19 May 2022 18:48:59 +0000 (11:48 -0700)]
build: add python3-pip dependency

- python3 pip module is missing on a new Ubuntu installation

Type: fix

Signed-off-by: Saima Yunus <yunus.saima.99@gmail.com>
Change-Id: I5a9886cd5f9226dc0a968c2f70a7c436a06ddf50

23 months agoip: reassembly - Fixing buffer leaks, corruption in v6 reasm 40/36240/3
Vijayabhaskar Katamreddy [Thu, 26 May 2022 14:11:51 +0000 (14:11 +0000)]
ip: reassembly - Fixing buffer leaks, corruption in v6 reasm

Type: fix

*Buffer leaks and corruptions during internal errors, either overriding
or missing to add the buffer to the list

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: I1ead1eca1cde10a36d60dbfcfe36ca6375690b03

23 months agoip: reassembly - pacing reassembly timeouts for v6 42/36242/1
Vijayabhaskar Katamreddy [Thu, 26 May 2022 15:03:47 +0000 (15:03 +0000)]
ip: reassembly - pacing reassembly timeouts for v6

Type: fix

Pace the main thread activity for reassembly timeouts, to avoid barrier syncs

Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Change-Id: Iebe9a38d2a7a6471afa6621f12bb545668dc8384

23 months agodocs: update spelling word list and fix typos 99/36199/2
Dave Wallace [Wed, 25 May 2022 01:25:55 +0000 (21:25 -0400)]
docs: update spelling word list and fix typos

- update wordlist and fix typos so that 'make docs-spell' passes
- sort spelling_wordlist.txt
- update docs maintainers list

Type: docs

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

23 months agomisc: Initial 22.10-rc0 commit 07/36207/1 v22.10-rc0
Andrew Yourtchenko [Wed, 25 May 2022 10:45:43 +0000 (10:45 +0000)]
misc: Initial 22.10-rc0 commit

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

23 months agodocs: make docs build incremental 90/35790/5
Nathan Skrzypczak [Fri, 25 Mar 2022 11:06:51 +0000 (12:06 +0100)]
docs: make docs build incremental

This patch makes the `make docs` directive incremental
avoiding re-running the siphon when the source hasn't
changed, and leveraging sphinx internal cache.
It adds a `make rebuild-docs` directive for cases where
this caching logic might break, e.g. in CI.
The virtualenv doesn't also get recreated on each build,
which might be enough when writing docs, provided
automated process leverage its rebuild counterpart.

Type: improvement

Change-Id: Ie90de3adebeed017b249cad81c6c160719f71e8d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
23 months agotests: fix ipsec sdp cases with parrallel job 49/36049/2
Tianyu Li [Fri, 22 Apr 2022 03:22:55 +0000 (11:22 +0800)]
tests: fix ipsec sdp cases with parrallel job

Serveral IPSec SPD cases re-use the same test class name,
leads to test error when do parrallel test with TEST_JOBS=16,
change the test class names to unique values.

Type: fix
Fixes: 7cd35f5d688d9e3bddf66602655274dae944b086
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Ia5768654ddb6274531222761cc82b226d97325a9

23 months agotests: fix default failed dir setting 59/36159/2
Klement Sekera [Fri, 13 May 2022 16:01:36 +0000 (18:01 +0200)]
tests: fix default failed dir setting

When running tests via run.sh, default setting of None would cause
failed directory symlink to appear in vpp workspace with an ugly name.
This patch places the symlink in temporary directory.

Type: fix
Fixes: b23ffd7ef216463c35b75c831e6a27e58971f4ec
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: Ic1715eba7ac1f82f71855e2aeb9b659d27bbb3af

23 months agodevices: add af-packet v3 api 32/35932/4
Mohsin Kazmi [Mon, 11 Apr 2022 16:14:45 +0000 (16:14 +0000)]
devices: add af-packet v3 api

Type: improvement

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

23 months agoflow: support generic flow and RSS action in vapi 14/35614/8
Ting Xu [Tue, 8 Mar 2022 07:22:56 +0000 (07:22 +0000)]
flow: support generic flow and RSS action in vapi

Add generic flow type and rss action type to vapi. It is to support
creating generic flow rule via vapi.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Ifeaa007679487e02bd2903dc591d80a1caba33bc

23 months agovppinfra: fix memory trace 89/36189/2
Leung Lai Yung [Sun, 22 May 2022 13:25:53 +0000 (13:25 +0000)]
vppinfra: fix memory trace

Type: fix

reset the memory trace if mem trace is turned on

Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: Ib99355b9ed42ff66c720bbea5cbbf03c65820d12

23 months agovlib: implement aux data handoff 66/36166/4
Mohammed Hawari [Wed, 18 May 2022 08:08:47 +0000 (10:08 +0200)]
vlib: implement aux data handoff

Type: improvement
Change-Id: I20b41537a249a55f01004e45392b34adaa8fd792
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
23 months agoapi: start enum values from 0 94/36194/1
Filip Varga [Mon, 23 May 2022 19:18:38 +0000 (21:18 +0200)]
api: start enum values from 0

C enum values by default start from 0.
All unassigned names should get value as value of previous name plus one.
The problem was that default value was 0 and adding one for the first
value would make generated api files start from 1 instead of 0.

Type: fix

Change-Id: I772d6411435648de3ec514f57025ef1acae87338
Signed-off-by: Filip Varga <fivarga@cisco.com>
23 months agodpdk: fix update link state 84/36184/3
Alexander Skorichenko [Fri, 20 May 2022 11:13:19 +0000 (11:13 +0000)]
dpdk: fix update link state

Type: fix

Correct vnet_hw_interface_t flags update on link state changes.
Currently incomplete set of flags is applied on each change,
only flags related to the most recent change are being set correct.
E.g. setting the link up would erase the duplex part of the flags.

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Change-Id: I5b95e1c0eaea0c283b108dbf7f809682ec9064eb