vpp.git
15 months agovcl: add ldp implementation for recvmmsg 27/38127/5
Florin Coras [Fri, 3 Feb 2023 06:56:03 +0000 (22:56 -0800)]
vcl: add ldp implementation for recvmmsg

Type: improvement

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

15 months agovcl: better handlig of ldp apis that rely on gnu source 25/38125/6
Florin Coras [Thu, 2 Feb 2023 20:56:16 +0000 (12:56 -0800)]
vcl: better handlig of ldp apis that rely on gnu source

Control use of apis that rely on _GNU_SOURCE being defined with compile
time macro.

Also fixes sendmmsg and recvmmsg which were not probably wrapped.

Type: improvement

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

15 months agopacketforge: fix lack of edge for ipv6 after gtppsc 94/38094/4
Ting Xu [Mon, 30 Jan 2023 03:42:20 +0000 (03:42 +0000)]
packetforge: fix lack of edge for ipv6 after gtppsc

Add one new edge for ipv6 after gtppsc so that packetforge can parse
this protocol combination.

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

15 months agohs-test: add nginx perf tests 60/38060/4
Filip Tehlar [Fri, 27 Jan 2023 12:14:34 +0000 (13:14 +0100)]
hs-test: add nginx perf tests

Type: test

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

15 months agovppinfra: refactor clib_socket_init, add linux netns support 78/38078/4
Damjan Marion [Mon, 30 Jan 2023 10:48:38 +0000 (11:48 +0100)]
vppinfra: refactor clib_socket_init, add linux netns support

Type: improvement
Change-Id: Ida2d044bccf0bc8914b4fe7d383f827400fa6a52
Signed-off-by: Damjan Marion <dmarion@me.com>
15 months agoipsec: fix SA names consistency in tests 72/37672/6
Arthur de Kerhor [Wed, 16 Nov 2022 17:45:24 +0000 (18:45 +0100)]
ipsec: fix SA names consistency in tests

In some IPsec tests, the SA called scapy_sa designs the SA that
encrypts Scapy packets and decrypts them in VPP, and the one
called vpp_sa the SA that encrypts VPP packets and decrypts them
with Scapy. However, this pattern is not consistent across all
tests. Some tests use the opposite logic. Others even mix both
correlating scapy_tra_spi with vpp_tra_sa_id and vice-versa.

Because of that, sometimes, the SA called vpp_sa_in is used as an
outbound SA and vpp_sa_out as an inbound one.

This patch forces all the tests to follow the same following logic:
- scapy_sa is the SA used to encrypt Scapy packets and decrypt
them in VPP. It matches the VPP inbound SA.
- vpp_sa is the SA used to encrypt VPP packets and decrypt them in
Scapy. It matches the VPP outbound SA.

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

15 months agoipsec: fix async crypto linked keys memory leak 70/37870/3
Benoît Ganne [Tue, 3 Jan 2023 17:35:04 +0000 (18:35 +0100)]
ipsec: fix async crypto linked keys memory leak

Type: fix

Change-Id: I7bd2696541c8b3824837e187de096fdde19b2c44
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agosession: fix out of bounds event memcpy 26/38126/5
Florin Coras [Fri, 3 Feb 2023 04:07:19 +0000 (20:07 -0800)]
session: fix out of bounds event memcpy

Type: fix

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

15 months agonat: fix accidental o2i deletion/reuse 88/37788/3
Dmitry Valter [Fri, 9 Dec 2022 19:34:22 +0000 (19:34 +0000)]
nat: fix accidental o2i deletion/reuse

Nat session is allocated before the port allocation. During port allocation
candidate address+port are set to o2i 6-tuple and tested against the flow hash.
If insertion fails, the port is busy and rejected. When all N attempts are
unsuccessful, "out-of-ports" error is recorded and the session is to be
deleted.

During session deletion o2i and i2o tuples are deleted from the flow hash.
In case of "out-of-ports" i2o tuple is not valid, however o2i is and it refers
to **some other** session that's known to be allocated.

By backing match tuple up session should be invalidated well enough not to
collide with any valid one.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: Id30be6f26ecce7a5a63135fb971bb65ce318af82

15 months agovpp-swan: allow SAs to be used to the route-based IPsec 05/38005/2
Atzm Watanabe [Wed, 25 Jan 2023 05:11:10 +0000 (14:11 +0900)]
vpp-swan: allow SAs to be used to the route-based IPsec

This patch adds a "charon.plugins.kernel-vpp.use_tunnel_mode_sa"
key into strongswan.conf.  If this is turned off, SAs will be
installed without tunnel information and can be used to
"ipsec tunnel protect".  For the route-based IPsec, it will be
used with turning "policies" off in swanctl.conf.

Type: feature

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

15 months agovppapigen: fix incorrect comments in json 31/38131/2
Ondrej Fabry [Fri, 3 Feb 2023 10:33:39 +0000 (11:33 +0100)]
vppapigen: fix incorrect comments in json

Type: fix

Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I241cefbbce98cf6fef83f36bd87ae2c1f4b067f0

15 months agotls: openssl: fix SSL_read partial read scenario 23/38123/2
Ofer Heifetz [Thu, 2 Feb 2023 14:57:26 +0000 (06:57 -0800)]
tls: openssl: fix SSL_read partial read scenario

When application performs SSL_read from the app rx-fifo, it can
pre-allocate multiple segments, but there is an issue if the OpenSSL
manages to partially fill in the first segment, in this case, since
data is assumed to be copied over by OpenSSL to the pre-allocated
segments(s), vpp uses svm_fifo_enqueue_nocopy API which performs
zero copy by passing the pre-allocated segment to SSL_read.

If the decrypted data size is smaller than the pre-allocated fifo
segment buffer size, application will fetch buffers including zero
in the area not filled in by SSL_read.

Type: fix

Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Change-Id: I941a89b17d567d86e5bd2c35785f1df043c33f38

15 months agolinux-cp: fix auto-sub-int 18/38118/2
Stanislav Zaikin [Thu, 2 Feb 2023 08:54:17 +0000 (09:54 +0100)]
linux-cp: fix auto-sub-int

lcp_itf_pair_pool could grew during sub-interface creation.

Type: fix
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Change-Id: Ideafe392f9bb2b418ce9d6faa4f08dfe26f4a273

15 months agoip: fix ip ACL traces 90/37690/6
Benoît Ganne [Fri, 18 Nov 2022 16:05:10 +0000 (17:05 +0100)]
ip: fix ip ACL traces

If we match a next table, we must save its index in the trace instead of
the index of the 1st table.

Type: fix

Change-Id: Idd862242e7fc200eb3ab29b17a26131b844af2c0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agoaf_xdp: update custom XDP program example 09/38009/6
Yulong Pei [Wed, 25 Jan 2023 08:05:03 +0000 (08:05 +0000)]
af_xdp: update custom XDP program example

Update custom XDP program example to work with libbpf 0.8.0 and
libxdp 1.2.9.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Ib8d03f0be7f71fe996dfb7da0cfe35165711ebb0
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
15 months agopacketforge: fix order of dst/src address of mac 93/38093/2
Ting Xu [Wed, 18 Jan 2023 04:22:00 +0000 (04:22 +0000)]
packetforge: fix order of dst/src address of mac

In the defination of mac node, the order of dst and src address is
reversed. Swap their order in this patch.

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

15 months agoaf_xdp: fix default xdp program unload fail 08/38008/3
Yulong Pei [Wed, 25 Jan 2023 07:41:19 +0000 (07:41 +0000)]
af_xdp: fix default xdp program unload fail

Change to get ad->linux_ifindex in af_xdp_create_if() instead of in
af_xdp_load_program(), previous if did not load custom XDP program,
ad->linux_ifindex will be none, but bpf_xdp_detach() need it, so default
xdp program will be not unloaded when delete af_xdp interface.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Id8a640204e8d29152f03349a0b58104b275635aa

15 months agopolicer: API policer selection by index 73/37873/6
Maxime Peim [Fri, 6 Jan 2023 11:57:38 +0000 (11:57 +0000)]
policer: API policer selection by index

Policer API calls were only by policer name. It is now possible to
select a policer by its index.
Some functionalities are also added to allow updating a policer
configuration and to refill its token buckets.
Some dead codes are being removed, and small fixes made.

Type: improvement

Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I4cc8fda0fc7c635a4110da3e757356b150f9b606

15 months agofib: keep AddressSanitizer happy 50/38050/2
Benoît Ganne [Thu, 26 Jan 2023 16:16:54 +0000 (17:16 +0100)]
fib: keep AddressSanitizer happy

adj_delegate_remove() makes 'ad' invalid, invalidate it only after its
use.

Type: fix

Change-Id: I6908d3dd2962ebd3fdf37e946cb19dae727bda09
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agomemif: improve error reporting 84/38084/3
Damjan Marion [Tue, 31 Jan 2023 19:14:13 +0000 (20:14 +0100)]
memif: improve error reporting

Type: improvement
Change-Id: I12b120d988347cced3df82810e86dc2fd5cfca80
Signed-off-by: Damjan Marion <dmarion@me.com>
15 months agowireguard: update ESTABLISHED flag 00/38000/5
Artem Glazychev [Tue, 24 Jan 2023 08:34:00 +0000 (15:34 +0700)]
wireguard: update ESTABLISHED flag

We cannot confidently say that if we have received and processed
the handshake_initiation message, then the connection has been established.
Because we also send a response.
The fact that the connection is established can only be considered if a keepalive packet was received.

Type: fix

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

15 months agotests: refactor quic tests to use app-socket-api 46/38046/5
Dave Wallace [Thu, 26 Jan 2023 17:44:01 +0000 (12:44 -0500)]
tests: refactor quic tests to use app-socket-api

- clean up nomenclature & use f-strings where applicable

Type: test

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

15 months agovppinfra: keep AddressSanitizer happy 51/38051/2
Benoît Ganne [Thu, 26 Jan 2023 18:23:19 +0000 (19:23 +0100)]
vppinfra: keep AddressSanitizer happy

The vector size must be increased before setting the element so that
AddressSanitizer can keep track of the accessible memory.

Type: fix

Change-Id: I7b13ce98ff29d98e643f399ec1ecb4681d3cec92
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agovlib: chdir to runtime_dir 54/38054/2
Damjan Marion [Thu, 26 Jan 2023 19:23:11 +0000 (20:23 +0100)]
vlib: chdir to runtime_dir

Type: improvement
Change-Id: Id8ab75ef4384a1029ab7ee84048f347708307830
Signed-off-by: Damjan Marion <dmarion@me.com>
15 months agoapi: keep AddressSanitizer happy 53/38053/3
Benoît Ganne [Thu, 26 Jan 2023 18:28:16 +0000 (19:28 +0100)]
api: keep AddressSanitizer happy

Playing with vector length prevents AddressSanitizer to track accessible
memory. Make sure we update the size of the vector once we received the
data.

Type: fix

Change-Id: If7808254d46d7ab37d516e3de49e3583d07bb9ff
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agoapi: keep AddressSanitizer happy 49/38049/4
Benoît Ganne [Thu, 26 Jan 2023 16:04:58 +0000 (17:04 +0100)]
api: keep AddressSanitizer happy

socket_tx_buffer is a vector, update its length accordingly so that
AddressSanitizer can keep track of the allowed memory area.
By doing so we can get rid of socket_tx_nbytes which becomes redundant
with the vector length.

Type: fix

Change-Id: Ied7cb430b5dd40d5ed1390aa15bd5f455a0dba62
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agoapi: keep AddressSanitizer happy 52/38052/2
Benoît Ganne [Thu, 26 Jan 2023 18:27:20 +0000 (19:27 +0100)]
api: keep AddressSanitizer happy

Type: fix

Change-Id: I793206068b8dca15b2f7f525ae1049139333c5b8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agodns: keep AddressSanitizer happy 47/38047/1
Benoît Ganne [Thu, 26 Jan 2023 15:03:55 +0000 (16:03 +0100)]
dns: keep AddressSanitizer happy

Type: fix

Change-Id: I0ae4071ee317f38daa882fec17087a55afe75d1d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
15 months agodpdk: add intf tag to dev{} subinput 05/35805/4
Nathan Skrzypczak [Mon, 28 Mar 2022 16:39:58 +0000 (18:39 +0200)]
dpdk: add intf tag to dev{} subinput

This patch allows to pass a tag when specifying
the dpdk `dev {  }` interface configuration.

It allows a control plane generating a vpp.conf
file to retreive the resulting mapping between
dpdk interfaces & sw_if_indices in VPP without
having to change the interface name exposed
to the user.

Type: feature

Change-Id: I55907417de0083b82d4a127172816cec3459acf3
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
15 months agowireguard: sending the first handshake 01/38001/9
Artem Glazychev [Tue, 24 Jan 2023 09:10:29 +0000 (16:10 +0700)]
wireguard: sending the first handshake

After creating a peer, we send a handshake request. But it's not quite right
to call wg_send_keepalive() directly.
According to documentation, handshake initiation is sent after (REKEY_TIMEOUT + jitter) ms.
Since it's the first one - we don't need to take REKEY_TIMEOUT into account,
but we still have jitter.

It also makes no sense to immediately send keepalives,
because the connection is not created yet.

Type: fix

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

15 months agohs-test: handle error in config serialization 14/38014/1
Filip Tehlar [Wed, 25 Jan 2023 12:56:38 +0000 (13:56 +0100)]
hs-test: handle error in config serialization

Type: test

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

15 months agoapi: pcap capture api update 18/37918/5
Maxime Peim [Fri, 13 Jan 2023 08:04:55 +0000 (08:04 +0000)]
api: pcap capture api update

Allow enabling and disabling pcap capture via the API.
A little bug is fixed along the way in
vl_api_classify_pcap_set_table_t_handler.

Type: improvement

Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I096129c82aecdc82bee5dbfb5e19c76a51d80aab

15 months agoaf_xdp: fix xdp socket create fail 74/37274/6
Chen Yahui [Wed, 28 Sep 2022 13:30:07 +0000 (21:30 +0800)]
af_xdp: fix xdp socket create fail

In libbpf code, xsk_socket__create will call xsk_link_lookup to get the
xdp_sock bpf prog. But xsk_link_lookup can't get any bpf prog. This will
cause Libbpf not to insert the fd into xsks_map and return ERROR.

The solution to this problem is to insert fd into xsks_map ourselves
instead of libbpf.

Type: fix
Change-Id: Ic5d279c6ddc02d67371262d6106a5b53b70e7913
Signed-off-by: Chen Yahui <goodluckwillcomesoon@gmail.com>
16 months agovppapigen: enable codegen for stream message types 21/36721/4
Stanislav Zaikin [Thu, 21 Jul 2022 17:06:26 +0000 (19:06 +0200)]
vppapigen: enable codegen for stream message types

Enable codegen for C type from 'rpc A returns B stream C' notation

Type: improvement

Change-Id: I05cfce71c385d414d7b177a080009628bc8c8fad
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
16 months agovppinfra: fix random buffer OOB crash with ASAN 74/37974/1
Dmitry Valter [Sun, 22 Jan 2023 13:09:15 +0000 (13:09 +0000)]
vppinfra: fix random buffer OOB crash with ASAN

Don't truncate with vec_set_len bytes before they can be used. When
built with ASAN, it these bytes are poisoned and trigger SIGSEGV when
read.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: I912dbbd83822b884f214b3ddcde02e3527848592

16 months agovlib: make pending_interrupts valid for AddressSanitizer 64/37964/2
Benoît Ganne [Fri, 20 Jan 2023 08:52:01 +0000 (09:52 +0100)]
vlib: make pending_interrupts valid for AddressSanitizer

vec_alloc_aligned() pre-allocates the vector memory but does not
update its size, making ASan unhappy when trying to access it.

Type: fix

Change-Id: I80e753cf2458cf516d1180a24cfaca4f382339d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agovppinfra: clib_bitmap fix 44/37944/4
Maxime Peim [Wed, 18 Jan 2023 10:57:31 +0000 (10:57 +0000)]
vppinfra: clib_bitmap fix

In clib_bitmap_set_region and clib_bitmap_set_multiple the index of
the last bit to set was off by 1. If this index was pointing to the
last bit of the bitmap, another uword would have been allocated,
even though it was unnecessary.

Moreover, in clib_bitmap_set_region, bits in the last word were not
properly set. Indeed, the n_bits_left value is wrong since n_bits
is not decreased by the number of already set bits.

Type: fix

Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I8d7ef6f47abb9f1f64f38297da2c59509d74dd72

16 months agovxlan: convert vxlan to a plugin 11/37511/8
Steven Luong [Mon, 24 Oct 2022 16:10:59 +0000 (09:10 -0700)]
vxlan: convert vxlan to a plugin

per https://jira.fd.io/browse/VPP-2058

Type: improvement

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

16 months agoip: add the missing offload check 31/37931/2
Mohsin Kazmi [Mon, 16 Jan 2023 15:28:26 +0000 (15:28 +0000)]
ip: add the missing offload check

Type: fix

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

16 months agoaf_packet: add the missing header-len for packets with checksum offload 48/37948/1
Mohsin Kazmi [Wed, 18 Jan 2023 19:34:00 +0000 (19:34 +0000)]
af_packet: add the missing header-len for packets with checksum offload

Type: fix

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

16 months agomisc: Initial 23.06-rc0 commit 45/37945/1 v23.06-rc0
Andrew Yourtchenko [Wed, 18 Jan 2023 13:01:05 +0000 (13:01 +0000)]
misc: Initial 23.06-rc0 commit

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

16 months agolb: add source ip based sticky load balancing 68/37268/7
Nobuhiro MIKI [Wed, 28 Sep 2022 06:53:17 +0000 (15:53 +0900)]
lb: add source ip based sticky load balancing

This patch adds source ip based sticky session, which is already
implemented in many hardware LBs and software LBs. Note that sticky
sessions may be reset if the hash is recalculated as ASs are added
or deleted.

Since this feature is unrelated to the other existing options, the
lb_add_del_vip API version has been upgraded to v2 and a new option
"src_ip_sticky" has been added.

Type: feature
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Change-Id: I3eb3680a28defbc701f28c873933ec2fb54544ab

16 months agobuild: use CMAKE_C_COMPILER_LAUNCHER for ccache 93/37893/4
Guillaume Solignac [Wed, 11 Jan 2023 10:56:29 +0000 (11:56 +0100)]
build: use CMAKE_C_COMPILER_LAUNCHER for ccache

In some situations, CMake will find ccache in /usr/bin but /usr/bin
might not present in PATH. The former fix for this was to place the
ccache configuration logic before the project() declaration, but since
CMake 3.4 there is a new variable to be used which handles this case.

For the original problem, see also
https://crascit.com/2016/04/09/using-ccache-with-cmake/

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: Ie026e02b2b06e2dca2d62da5fea7b1a104bcc7c3

16 months agovppapigen: include comments in json 27/32227/4
Ole Troan [Wed, 5 May 2021 21:00:58 +0000 (23:00 +0200)]
vppapigen: include comments in json

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ibd796adea734b64d9209c5e18c5b9800cbaf62c6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
16 months agohs-test: zero timeout on docker stop 40/37940/2
Florin Coras [Tue, 17 Jan 2023 21:02:51 +0000 (13:02 -0800)]
hs-test: zero timeout on docker stop

Should drop execution time for all tests by about 80%.

Type: test

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

16 months agopppoe: fix memcpy out of bounds with gcc-11 on arm 79/37779/2
Tianyu Li [Thu, 8 Dec 2022 02:08:32 +0000 (02:08 +0000)]
pppoe: fix memcpy out of bounds with gcc-11 on arm

In function ‘memcpy’,
    inlined from ‘clib_memcpy_fast’ at /home/vpp/src/vppinfra/string.h:86:10,
    inlined from ‘memcpy_s_inline’ at /home/vpp/src/vppinfra/string.h:157:7,
    inlined from ‘vnet_pppoe_add_del_session’ at /home/vpp/src/plugins/pppoe/pppoe.c:356:7:
 error: ‘__builtin_memcpy’ offset [0, 5] is out of the bounds [0, 0] [-Werror=array-bounds]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cc1: all warnings being treated as errors

Hardware address is zero length vector for PPP, use vec_len instead.

Type: fix
Fixes: 62f9cdd82c52 ("Add PPPoE Plugin")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: If9fb409cfbbac77c15559d103987f0130bf30255

16 months agovppinfra:fix pcap write large file(> 0x80000000) error. 98/37498/4
aihua2013 [Fri, 21 Oct 2022 02:32:08 +0000 (02:32 +0000)]
vppinfra:fix pcap write large file(> 0x80000000) error.

Type: improvement

Signed-off-by: aihua2013 <51931196@qq.com>
Change-Id: I22670f49abfb5d1fd728686fc7d65fb40ea6bda2

16 months agotests: improve packet checksum functions 54/37654/2
Klement Sekera [Mon, 14 Nov 2022 10:26:18 +0000 (11:26 +0100)]
tests: improve packet checksum functions

Fool-proof assert_checksum_valid so that one does not verify checksum on
wrong layer (because of how scapy internally works).

Make assert_packet_checksums_valid start checksum checking at inner
layers and outwards to make it more obvious where the error is. With old
behaviour, if one received an ICMP packet carrying a truncated TCP
packet, an error would be raised for ICMP checksum, as that one would be
the first to be wrong after recalculating all packet checksums, while
the real issue is TCP header being truncated and thus unsuitable for use
with this function.

Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I39a2b50ec5610f969cfde9796416ee3a50ae0ba3

16 months agopci: fix musl crash 41/37841/3
Benoît Ganne [Mon, 19 Dec 2022 17:23:03 +0000 (18:23 +0100)]
pci: fix musl crash

The musl libc does not support closedir(0) resulting in a crash. Only
call closedir() if we successfully opened it.

Type: fix

Change-Id: I3198454f44735501047afc42b94b2fea273212f4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agohs-test: add http proxy env to container builds 33/37933/2
Florin Coras [Mon, 16 Jan 2023 21:21:35 +0000 (13:21 -0800)]
hs-test: add http proxy env to container builds

Type: improvement

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

16 months agohs-test: autodetect ubuntu version during build 36/37936/2
Maros Ondrejicka [Tue, 17 Jan 2023 09:52:20 +0000 (10:52 +0100)]
hs-test: autodetect ubuntu version during build

Since VPP binaries are being compiled on host system,
it makes sense to autodetect Ubuntu version when building test images
so that containers would be running version equal to host system.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I0e13d9ba1ddcd3ad5835bce1b8cccfc048e5e528

16 months agoacl: CLI allow replace, allow deletion 24/37924/2
Pim van Pelt [Sun, 15 Jan 2023 19:04:56 +0000 (19:04 +0000)]
acl: CLI allow replace, allow deletion

Allow the CLI caller to specify an optional [index <idx>] index,
which will remove the ACL at that index. This mimicks the API behavior,

Add a 'delete acl-plugin acl index <idx>' to mimick the API acl_del
call, which will refuse to delete a non-existent index, as well as
an index that is referenced by an interface.

Type: improvement
Signed-off-by: pim@ipng.nl
Change-Id: I5f240f7a4e3bca14e8122917e8a5186d80094de2

16 months agovlib: install dma.h to fix out-of-tree plugins 37/37937/1
Mohammed Hawari [Tue, 17 Jan 2023 11:18:15 +0000 (12:18 +0100)]
vlib: install dma.h to fix out-of-tree plugins

Change-Id: I7888ab58abced93859ce15d0dbd1c3d7c94a02f5
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Fixes: 0654242d1ef51566f0d58445a16053cf376e5a6e

16 months agohs-test: better directory structure 25/37925/2
Filip Tehlar [Mon, 16 Jan 2023 09:21:29 +0000 (10:21 +0100)]
hs-test: better directory structure

Move config files to resources and docker files to separate directory

Type: test

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

16 months agohs-test: restrict concurrency on envoy 23/37923/3
Filip Tehlar [Fri, 13 Jan 2023 20:33:43 +0000 (21:33 +0100)]
hs-test: restrict concurrency on envoy

Type: test

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

16 months agowireguard: add local variable 63/37763/4
Gabriel Oginski [Thu, 10 Nov 2022 09:22:17 +0000 (09:22 +0000)]
wireguard: add local variable

The current implementation of wireguard use dereference value from
pointer, but between get and dereference the value from pointer can be
occur change in pool memory, which means that this pointer can be
invalid. Since current implementation doesn't handle with invalid
pointers, segfault can occur.

The fix add a local variable to keep index of peer from pool and also
handle with null pointers from get pointer from pool.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Ic161ab08266e584493338c682d827ea1fd754b98

16 months agoipsec: fix transpose local ip range position with remote ip range in fast path implem... 04/37504/4
Piotr Bronowski [Fri, 21 Oct 2022 15:48:55 +0000 (15:48 +0000)]
ipsec: fix transpose local ip range position with remote ip range in fast path implementation

In fast path implementation of spd policy lookup  opposite convention to
the original implementation has been applied and local ip range has been
interchanged with the remote ip range. This fix addresses this issue.

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

16 months agovlib: add const to char* params of several funcs 22/37922/5
Sergey Nikiforov [Fri, 13 Jan 2023 19:15:13 +0000 (00:15 +0500)]
vlib: add const to char* params of several funcs

These functions do not need modifiable strings.
It helps with linker sections as well as C++ compatibility.
It is a good style to use const where approriate.

Type: refactor
Signed-off-by: void234@gmail.com
Change-Id: Ib437a01663aa61860c6a938d869ed1111da71ec7

16 months agovppinfra: add const to char* params of several funcs 21/37921/4
Sergey Nikiforov [Fri, 13 Jan 2023 19:12:05 +0000 (00:12 +0500)]
vppinfra: add const to char* params of several funcs

These functions do not need modifiable strings.
It helps with linker sections as well as C++ compatibility.
It is a good style to use const where approriate.

Type: refactor
Signed-off-by: void234@gmail.com
Change-Id: I8d1e922197b3594122296e8c1af57e0a8ec0bf3d

16 months agovcl: set deq notify flag on epoll connected sessions 20/37920/4
Florin Coras [Fri, 13 Jan 2023 17:44:14 +0000 (09:44 -0800)]
vcl: set deq notify flag on epoll connected sessions

Type: fix

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

16 months agohs-test: use equal ubuntu versions in test images 15/37915/6
Maros Ondrejicka [Fri, 13 Jan 2023 09:09:14 +0000 (10:09 +0100)]
hs-test: use equal ubuntu versions in test images

Official nginx image is based on Debian with older libc version,
that causes a runtime fail when VPP libraries are compiled in Ubuntu
which has newer libc.
Using equal version of Ubuntu in VPP image and in nginx image
ensures that running nginx won't fail due to different libc versions.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I48f3b23be30a9d9d9144351437ce163d64a4bb6b

16 months agovppinfra: fix else if check in _vec_set_len() 11/37911/2
Liangxing Wang [Fri, 13 Jan 2023 03:48:37 +0000 (03:48 +0000)]
vppinfra: fix else if check in _vec_set_len()

Type: fix

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

16 months agobuild: cmake NAMELINK_COMPONENT in vpp libraries 25/37825/2
Nick Brown [Tue, 13 Dec 2022 14:20:35 +0000 (14:20 +0000)]
build: cmake NAMELINK_COMPONENT in vpp libraries

Installs the unversioned .so symlink in the -dev component.
This prevent debian lintian error:
link-to-shared-library-in-wrong-package

NAMELINK_COMPONENT was added in cmake 3.12

Type: make
Change-Id: I9d743218fa1f6b677659d745525e399ff66e73f4
Signed-off-by: Nick Brown <nickbroon@gmail.com>
16 months agoaf_xdp: update af_xdp driver plugin to depend on libxdp 69/37869/6
Yulong Pei [Thu, 5 Jan 2023 02:26:32 +0000 (02:26 +0000)]
af_xdp: update af_xdp driver plugin to depend on libxdp

AF_XDP support is deprecated in libbpf since v0.7.0 [1], the libxdp library
now provides the functionality which once was in libbpf, this commit updates
af_xdp plugin to depend on libxdp, libbpf still remains a dependency even if
libxdp is present, as it need use libbpf APIs for program loading.

libxdp is distributed within xdp-tool [2], xdp-tools package also
include libbpf in it as dependency, so here installed libxdp v1.2.9 and
libbpf v0.8.0, both from xdp-tool-1.2.9 package.

More information about libxdp compatibility can be found in the libxdp
README [3].

In libbpf v0.8.0, The bpf_prog_load function was deprecated and changed to
bpf_object__open_file and bpf_object__next_program and bpf_object__load,
The bpf_get_link_xdp_id and bpf_set_link_xdp_fd functions were deprecated
and changed to bpf_xdp_attach and bpf_xdp_detach, The bpf_object__unload
function was deprecated and changed to bpf_object__close.

[1] https://github.com/libbpf/libbpf/commit/277846bc6c15
[2] https://github.com/xdp-project/xdp-tools/releases/tag/v1.2.9
[3] https://github.com/xdp-project/xdp-tools/blob/master/lib/libxdp/README.org

Type: improvement

Change-Id: Ifbf6e3aa38bc6e0b77561f26311fd11c15ddb47e
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
16 months agovppinfra: fix longstanding corner case bug in serialize_get() 10/37910/2
Dave Barach [Thu, 12 Jan 2023 21:07:26 +0000 (16:07 -0500)]
vppinfra: fix longstanding corner case bug in serialize_get()

serialize_get() -> serialize_write_not_inline(...) was losing track of
the current buffer index when it managed to empty the overflow vector
but had to turn around and use it again.

Test-case added to test_serialize.c.

This issue dates from 2010.

Type: fix

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

16 months agohs-test: fix tests using wget 06/37906/1
Filip Tehlar [Thu, 12 Jan 2023 15:21:55 +0000 (16:21 +0100)]
hs-test: fix tests using wget

This fixes an issue on systems with http proxy set.

Type: test

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

16 months agomisc: use right include for fctnl.h and poll.h 90/37890/3
Guillaume Solignac [Tue, 10 Jan 2023 14:37:18 +0000 (15:37 +0100)]
misc: use right include for fctnl.h and poll.h

Musl is stricter than glibc and has a warning that including fctnl.h and
poll.h should be prefered rather than their sys/ counterparts, which
breaks -Wall setups.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: Id101e999371951b0927cc8c4109f8f1536de1bc2

16 months agoabf: exclude networks with deny rules 76/37876/6
Josh Dorsey [Wed, 4 Jan 2023 21:28:07 +0000 (21:28 +0000)]
abf: exclude networks with deny rules

Type: improvement

Signed-off-by: Josh Dorsey <jdorsey@netgate.com>
Change-Id: Iee43ca9278922fc7396764b88cff1a87bcb28349

16 months agohs-test: optimize size of docker image 95/37895/2
Filip Tehlar [Wed, 11 Jan 2023 09:58:58 +0000 (10:58 +0100)]
hs-test: optimize size of docker image

Copy necessary only plugins in docker image

Type: improvement

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

16 months agohs-test: use anchors in yaml config files 45/37845/4
Maros Ondrejicka [Tue, 20 Dec 2022 14:10:50 +0000 (15:10 +0100)]
hs-test: use anchors in yaml config files

Volumes can be referenced with anchors to reduce text duplication
and to explicitly show which containers share a volume.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: Id408a78262573b3faf2257c32bfa569eca2e2049

16 months agovirtio: add option to bind interface to uio driver 16/37416/9
Benoît Ganne [Thu, 13 Oct 2022 12:01:03 +0000 (14:01 +0200)]
virtio: add option to bind interface to uio driver

Type: improvement

Change-Id: I30e66370c927afeb62ba3a2b3334bdc2a31d4561
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agopci: add option to force uio binding 17/37417/7
Benoît Ganne [Thu, 13 Oct 2022 15:22:26 +0000 (17:22 +0200)]
pci: add option to force uio binding

Type: improvement

Change-Id: Ifea4badd58f7e2b5e792d7506f6747851a08587f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agolinux-cp: Fix endianness in lcp response 94/37894/2
Pim van Pelt [Wed, 11 Jan 2023 11:31:41 +0000 (11:31 +0000)]
linux-cp: Fix endianness in lcp response

Creation of LCP will return garbled host_sw_if_index of the newly
created TAP interface.

Example PAPI code:
```
lcp_add = vpp.api.lcp_itf_pair_add_del_v2(is_add=True, sw_if_index=17,
          host_if_type=VppEnum.vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP,
          host_if_name="loop0", netns="dataplane")
print(lcp_add)

lcp_ret = vpp.api.lcp_itf_pair_get()
print(lcp_ret)
```

Before, the returned host_sw_if_index has the wrong endianness:
VPP version is 23.02-rc0~212-gf06a518f8
lcp_itf_pair_add_del_v2_reply(_0=103, context=2, retval=0, host_sw_if_index=301989888)
(lcp_itf_pair_get_reply(_0=105, context=3, retval=0, cursor=4294967295),[lcp_itf_pair_details(_0=106, context=3, phy_sw_if_index=17, host_sw_if_index=18, vif_index=594, host_if_name='loop0', host_if_type=<vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP: 0>, netns='dataplane')])

After, it is correctly showing idx 18:
VPP version is 23.02-rc0~212-gf06a518f8
lcp_itf_pair_add_del_v2_reply(_0=103, context=2, retval=0, host_sw_if_index=18)
(lcp_itf_pair_get_reply(_0=105, context=3, retval=0, cursor=4294967295), [lcp_itf_pair_details(_0=106, context=3, phy_sw_if_index=17, host_sw_if_index=18, vif_index=595, host_if_name='loop0', host_if_type=<vl_api_lcp_itf_host_type_t.LCP_API_ITF_HOST_TAP: 0>, netns='dataplane')])

Type: fix
Signed-off-by: pim@ipng.nl
Change-Id: I9085bac0c4a9ad64356c67f9b85f4910131e349e

16 months agosr: remove stale runs_after 37/37837/2
Nathan Skrzypczak [Mon, 19 Dec 2022 08:38:02 +0000 (09:38 +0100)]
sr: remove stale runs_after

This patch removes a
.runs_after = VNET_FEATURES ("ip6-lookup"),
On the 'pt' node, as 'ip6-lookup' does not belong to the 'ip6-output' arc.

Type: fix

Change-Id: Ie34aaf7351593f08c61e3b02aaf9f72a4de1a437
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
16 months agonat: do not use nat session object after deletion 42/37742/4
Benoît Ganne [Thu, 22 Dec 2022 14:01:21 +0000 (15:01 +0100)]
nat: do not use nat session object after deletion

Type: fix

Change-Id: Ifc709b6e7217a893d13aee6d3019e699637366ef
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agosr: fix compilation errors 74/37874/3
Guillaume Solignac [Fri, 6 Jan 2023 12:55:04 +0000 (13:55 +0100)]
sr: fix compilation errors

Uses VPP's clib_host_to_net functions, and initializes a potentially
uninitialized variable.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: Ie6b035c698f57ff39aeb955b35db8ec40f383b7a

16 months agotests: update install-deps to support interface test runs in the CI 46/37846/2
Naveen Joy [Tue, 20 Dec 2022 16:39:06 +0000 (08:39 -0800)]
tests: update install-deps to support interface test runs in the CI

Change-Id: I704c35644b3caf6567be4b43dc4e550d1394e438
Type: improvement
Signed-off-by: Naveen Joy <najoy@cisco.com>
16 months agobuild: do not link with libssl if not needed 67/37867/2
Benoît Ganne [Wed, 4 Jan 2023 16:56:58 +0000 (17:56 +0100)]
build: do not link with libssl if not needed

In most cases we only need OpenSSL libcrypto (crypto primitives) but
not libssl (tls).

Type: improvement

Change-Id: I9dce27d23d65bf46aea2d0f8aaf417240701efcc
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agoudp: avoid listener cleanups with active opens 83/37883/6
Florin Coras [Mon, 9 Jan 2023 20:46:07 +0000 (12:46 -0800)]
udp: avoid listener cleanups with active opens

Type: fix

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

16 months agocrypto-ipsecmb: fix perf scaling in ipsecmb v1.3 85/37885/2
Marcel Cornu [Mon, 9 Jan 2023 23:15:11 +0000 (23:15 +0000)]
crypto-ipsecmb: fix perf scaling in ipsecmb v1.3

Type: fix

This patch adds a fix for an issue in the ipsecmb library resulting in
lower than expected performance in multi-threaded scenarios. This is
due to multiple threads writing the same global variable simultaneously.

Signed-off-by: marcel.d.cornu@intel.com
Change-Id: Ibcac321aa40da4b1709198dec3e18226e3891138

16 months agovrrp: fix update virtual addr make mistake 79/37879/5
gaochx [Mon, 9 Jan 2023 09:56:09 +0000 (17:56 +0800)]
vrrp: fix update virtual addr make mistake

When use update api delete a virtual address, no matter which IP want to delete, always delete the last one.

Type: fix

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

16 months agosession: avoid trying to send incomplete dgram 86/37886/3
Florin Coras [Tue, 10 Jan 2023 00:00:10 +0000 (16:00 -0800)]
session: avoid trying to send incomplete dgram

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ibebe9e4ab7331c3ae66c9502e910368acaba51ec

16 months agoudp: initialize gso_size on dgram enqueue 84/37884/4
Florin Coras [Mon, 9 Jan 2023 22:00:33 +0000 (14:00 -0800)]
udp: initialize gso_size on dgram enqueue

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I1b5a35b9d53cc56d4d8050de70f40b95e92f1011

16 months agohs-test: remove exec flags from source files 81/37881/1
Filip Tehlar [Mon, 9 Jan 2023 14:48:40 +0000 (15:48 +0100)]
hs-test: remove exec flags from source files

Type: style

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

16 months agohs-test: fix code style 80/37880/1
Filip Tehlar [Mon, 9 Jan 2023 11:07:09 +0000 (12:07 +0100)]
hs-test: fix code style

This will add a new target (fixstyle) to Makefile that runs gofmt tool.

Type: style

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

16 months agohs-test: add nginx test 49/37849/2
Filip Tehlar [Wed, 21 Dec 2022 07:59:16 +0000 (08:59 +0100)]
hs-test: add nginx test

Type: test

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

16 months agosession: avoid dgram dequeues with no transport 75/37875/2
Florin Coras [Fri, 6 Jan 2023 19:38:49 +0000 (11:38 -0800)]
session: avoid dgram dequeues with no transport

Type: fix

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

16 months agobfd: fix ip address cli parsing 72/37872/2
Benoît Ganne [Fri, 6 Jan 2023 08:58:53 +0000 (09:58 +0100)]
bfd: fix ip address cli parsing

unformat_ip46_address() requires the address type as 2nd parameter.

Type: fix

Change-Id: Iaa1aebaebd1a947dab6c936c3b931854c0a3facc
Signed-off-by: Benoît Ganne <bganne@cisco.com>
16 months agovapi: add vapi_stop_rx_thread() 57/37857/2
Matthew Smith [Thu, 15 Dec 2022 22:18:08 +0000 (22:18 +0000)]
vapi: add vapi_stop_rx_thread()

Type: improvement

Allow vapi to signal to an application's RX thread that it should wake
up and exit.

Before disconnecting from VPP's API, libvlibmemoryclient inserts an
rx_thread_exit message into the client's own input queue to cause its
RX thread to wake up from its blocking dequeue and exit cleanly. Add a
function to vapi's API which will allow libvapi client applications
which have an RX thread waiting for incoming messages using vapi_wait()
to do the same thing.

The existing libvlibmemoryclient code which does this was moved to a
separate function and made available for vapi_stop_rx_thread() to call.

Also fixed some inconsistencies in indentation of function prototypes in
vapi.h to make checkstyle.sh happy.

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

16 months agovppinfra: fix function prototypes 62/37862/1
Dave Barach [Mon, 26 Dec 2022 19:01:36 +0000 (14:01 -0500)]
vppinfra: fix function prototypes

Type: fix

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

16 months agodocs: update home-gateway use-case 59/37859/1
Dave Barach [Sun, 25 Dec 2022 13:47:47 +0000 (08:47 -0500)]
docs: update home-gateway use-case

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

17 months agohsa: fix echo client workers initialization 55/37855/3
Benoît Ganne [Thu, 22 Dec 2022 14:01:32 +0000 (15:01 +0100)]
hsa: fix echo client workers initialization

We were creating an additional worker not backed by any VPP threads,
leading off-by-1 access in the session main workers vector.
Also uses vec_elt_at_index() when accessing session main workers vector
elements to catch those errors more easily.

Type: fix

Change-Id: I6059116b7b64ae6b26ad83c1fcf55df8522868ad
Signed-off-by: Benoît Ganne <bganne@cisco.com>
17 months agomisc: fix crash using tracedump plugin with socket API clients 56/37856/1
Arthur de Kerhor [Thu, 22 Dec 2022 18:48:05 +0000 (19:48 +0100)]
misc: fix crash using tracedump plugin with socket API clients

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

17 months agodpdk: link DPDK with MLX4/MLX5 libraries again 38/37838/2
Vladimir Ratnikov [Mon, 19 Dec 2022 08:45:35 +0000 (08:45 +0000)]
dpdk: link DPDK with MLX4/MLX5 libraries again

 Previously it was linked and worker properly. While rdma build
was simplified, link was lost so all encrypted data won't pass
via Mellanox interfaces(ipsec, ipip, ssh etc) and NetVSC taps
won't created the right way.

 Errors:
mlx5_common: Verbs device not found: 21a5:00:02.0
mlx5_common: Failed to initialize device context.
EAL: Requested device 21a5:00:02.0 cannot be used
 Tested on Azure. Same errors appears on physical machine with
Mellanox connect adapter

Type: fix

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

17 months agoaf_packet: move to plugin 30/37830/3
Mohsin Kazmi [Wed, 14 Dec 2022 13:10:29 +0000 (13:10 +0000)]
af_packet: move to plugin

Type: improvement

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

17 months agohs-test: small improvements 50/37850/2
Filip Tehlar [Wed, 21 Dec 2022 13:40:35 +0000 (14:40 +0100)]
hs-test: small improvements

Type: test

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

17 months agoquic: fix quic plugin with openssl 3.x 47/37847/3
Dave Wallace [Tue, 20 Dec 2022 22:41:43 +0000 (17:41 -0500)]
quic: fix quic plugin with openssl 3.x

- load openssl legacy providers during quic init
  when building with openssl 3.0 or greater
- re-enable quic 'make test' testcases on
  ubuntu-22.04

Type: fix

Change-Id: Icfd429b6bc1bddf9f9937baa44cc47cd535ac5f2
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
17 months agoudp: fix tx handling of non-connected sessions 42/37842/5
Florin Coras [Mon, 19 Dec 2022 18:55:18 +0000 (10:55 -0800)]
udp: fix tx handling of non-connected sessions

Type: fix

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

17 months agohs-test: add runtime options 43/37843/3
Maros Ondrejicka [Mon, 19 Dec 2022 19:35:27 +0000 (20:35 +0100)]
hs-test: add runtime options

Options
 "-p" to not remove topology elements after the test finishes
 "-v" from now on extra output from tests is hidden by default,
      this will show it again

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I626188561c883534e9004d5130ee2a972d12b4e2

17 months agovapi: use the correct my_context_id when disconnecting API clients 17/37817/8
Mauro Sardara [Mon, 12 Dec 2022 14:04:09 +0000 (14:04 +0000)]
vapi: use the correct my_context_id when disconnecting API clients

While before the my_client_index variable was stored as global variable
in api_main_t, after commit 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f
the my_client_index becomes part of vapi_ctx_t.

Each API client (internal/external) connected to VPP stores its
client index in vapi_ctx_t.

The issue is in the client disconnection. The vapi_disconnect is
untouched in patch 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f,
so it keeps the behavior of using the my_client_index stored
in api_main_t.

Ticket: VPP-2069
Type: fix
Fixes: 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f

Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Idf8c1d1056cbd631cc3057cf7acc486216fa8303