vpp.git
18 months agoipsec: Failure at the start of the batch should not invalidate the rest of the batch 77/37677/2
Neale Ranns [Fri, 18 Nov 2022 04:24:09 +0000 (04:24 +0000)]
ipsec: Failure at the start of the batch should not invalidate the rest of the batch

Type: fix

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

18 months agosession: add transport main structure 70/37570/5
Florin Coras [Thu, 3 Nov 2022 19:50:13 +0000 (12:50 -0700)]
session: add transport main structure

Leave tp_vfts vector out for now.

Type: improvement

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

18 months agocrypto-ipsecmb: fix plugin crash in VirtualBox 14/37614/3
Maros Ondrejicka [Thu, 10 Nov 2022 13:11:40 +0000 (14:11 +0100)]
crypto-ipsecmb: fix plugin crash in VirtualBox

Plugin checks just for AVX2 instruction set, while the v1.3 of IPsec
Multi-Buffer library checks for both AVX2 and BMI2 sets during init.
VirtualBox VM doesn't provide BMI2 by default to guest operating system.

Result is that VPP plugin decides to use AVX2 initialization and library
then doesn't do it. Since flush_job remains empty, the self-check fails
and with that the whole VPP crashes on start-up.

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

18 months agohs-test: skip vcl reattach test 43/37643/2
Filip Tehlar [Fri, 11 Nov 2022 09:37:33 +0000 (10:37 +0100)]
hs-test: skip vcl reattach test

Type: test

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

18 months agobuild: fix lib install dir and add vat2 lib install when build rpm. 42/37642/2
Huawei LI [Fri, 11 Nov 2022 05:50:26 +0000 (13:50 +0800)]
build: fix lib install dir and add vat2 lib install when build rpm.

Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I5ac557756ff2b3de13ce328a27ffdd289ab3173e

18 months agohttp: use safe pool realloc 99/35899/13
Florin Coras [Tue, 5 Apr 2022 23:35:39 +0000 (16:35 -0700)]
http: use safe pool realloc

Type: improvement

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

18 months agosrtp: use safe pool reallocs 98/35898/13
Florin Coras [Tue, 5 Apr 2022 22:53:31 +0000 (15:53 -0700)]
srtp: use safe pool reallocs

Type: improvement

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

18 months agosession: safe pools for cut-through sessions 15/35915/9
Florin Coras [Thu, 7 Apr 2022 19:58:13 +0000 (12:58 -0700)]
session: safe pools for cut-through sessions

Type: improvement

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

18 months agosession: reduce safe pool expand rate 09/37609/3
Florin Coras [Wed, 9 Nov 2022 23:13:16 +0000 (15:13 -0800)]
session: reduce safe pool expand rate

Make sure they only double in size.

Type: improvement

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

18 months agomisc: ignore clangd cache folder 11/37611/2
Maros Ondrejicka [Thu, 10 Nov 2022 07:47:08 +0000 (08:47 +0100)]
misc: ignore clangd cache folder

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

18 months agolinux-cp: fix lcp_itf_pair_create()'s memory leak 62/37562/2
luoyaozu [Mon, 31 Oct 2022 13:46:38 +0000 (21:46 +0800)]
linux-cp: fix lcp_itf_pair_create()'s memory leak

need free args.error if args.rv < 0

Type: fix

Signed-off-by: luoyaozu <luoyaozu@foxmail.com>
Change-Id: I8ceebfc36f51798d8d1a8e4c41bec33d74344396

18 months agohs-test: add http client connect test 12/37612/2
Filip Tehlar [Thu, 10 Nov 2022 11:34:17 +0000 (12:34 +0100)]
hs-test: add http client connect test

Type: test

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

18 months agohttp: support client connect 95/37595/5
Filip Tehlar [Wed, 14 Sep 2022 09:07:12 +0000 (09:07 +0000)]
http: support client connect

Type: feature

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

18 months agonat: updating my maintainer email address 81/37581/3
Filip Varga [Sat, 5 Nov 2022 05:59:26 +0000 (06:59 +0100)]
nat: updating my maintainer email address

Type: fix

Signed-off-by: Filip Varga <filipvarga89@gmail.com>
Change-Id: I1f5069df2dc743ecd1269e947dd375cb1b84970f

18 months agotests: initial asf framework refactoring for 'make test' 15/37015/11
Pratikshya Prasai [Thu, 18 Aug 2022 15:09:38 +0000 (11:09 -0400)]
tests: initial asf framework refactoring for 'make test'

Type: refactor

Change-Id: I41455b759a5d302ad5c4247c13634c471e7d49a8
Signed-off-by: Pratikshya Prasai <pratikshyaprasai2112@gmail.com>
Signed-off-by: Saima Yunus <yunus.saima.234@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
18 months agosr: fix added for configuring vlan sub interface as iif interface in End.AD.Flow... 98/37298/2
ChinmayaAgarwal [Thu, 29 Sep 2022 06:47:05 +0000 (12:17 +0530)]
sr: fix added for configuring vlan sub interface as iif interface in End.AD.Flow localsid

Type: fix
Signed-off-by: ChinmayaAgarwal <chinmaya.agarwal@hsc.com>
Change-Id: Ifad23978b98c5e05d86f6254bfb65baa0b380436

18 months agoacl: verify that src and dst have sane and same address family 70/31770/4
Andrew Yourtchenko [Thu, 25 Mar 2021 15:34:33 +0000 (15:34 +0000)]
acl: verify that src and dst have sane and same address family

API refactoring moved the address-family tag from rule
level down to prefix level.

This necessarily warrants the check that they are the same.

Also, add a check that the address family is sane.

Change-Id: Ia63b688cc9e7c9e9cc773e89708d9e9f99185fb7
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
18 months agoip: fix unformat_ip_address forcing version to IP4 for some IP6 addresses 02/37602/4
Andrew Yourtchenko [Wed, 9 Nov 2022 01:18:56 +0000 (01:18 +0000)]
ip: fix unformat_ip_address forcing version to IP4 for some IP6 addresses

dd2f12ba made use of ip46_address_is_ip4() in order to determine whether
the address is ipv4 or ipv6 within unformat_ip_address - however, its
logic is correct only for some addresses. e.g. a valid IPv6 address of :: (unspecified)
will result in "true" result. This is probably not an issue for most
of the cases (the unspecified address is quite rare),
however if the unformat_ip_address is used as part of the
prefix parsing, the ::/0 is a fairly often utilized construct,
which gets parsed as 0.0.0.0

Solution: return the old logic, but use a temporary
variable to avoid overwriting the target memory on failure.

Type: fix
Fixes: dd2f12ba6ab952d9d66f4d9ba89ffde6309b1ff2.
Change-Id: I272f740dfdf07036cec68516e153f0701a53233d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
18 months agopolicer: improvement show policer cli. 79/37579/3
Huawei LI [Fri, 4 Nov 2022 18:50:53 +0000 (02:50 +0800)]
policer:  improvement show policer cli.

cli show policer's help info is not consistent
with it's arguments.

Type: improvement

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I8332fe97ba343e98511db9ff1bb6afd6f3c657cd

18 months agoprom: fix stats vector leak 86/37586/3
Florin Coras [Sun, 6 Nov 2022 23:27:01 +0000 (15:27 -0800)]
prom: fix stats vector leak

Type: fix

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

18 months agonat: fix per-vrf session bookkeeping 70/36670/6
Jing Peng [Fri, 15 Jul 2022 19:12:29 +0000 (15:12 -0400)]
nat: fix per-vrf session bookkeeping

Each NAT44 ED session has a per_vrf_sessions_index referencing
an element in the thread-local vector per_vrf_sessions_vec.
However this index can be possibly invalidated by vec_del1() in
per_vrf_sessions_cleanup(), before a session is registered.
Such a stale index can cause an assertion failure in function
per_vrf_sessions_is_expired() when we use it to locate the
per_vrf_sessions object.

A possible sequence to reproduce is:

1. Create two NAT44 ED sessions s1, s2 so that two per_vrf_sessions are created:
     index 0: between VRF pair 10 and 11 (expired=0, ses_count=1)
     index 1: between VRF pair 20 and 21 (expired=0, ses_count=1)
   For the sessions we have:
     s1->per_vrf_sessions_index == 0
     s2->per_vrf_sessions_index == 1

2. Delete the first session via CLI, now the two per_vrf_sessions become:
     index 0: between VRF pair 10 and 11 (expired=0, ses_count=0)
     index 1: between VRF pair 20 and 21 (expired=0, ses_count=1)
   For the sessions we have:
     s2->per_vrf_sessions_index == 1

3. Delete the VRF 11:
     index 0: between VRF pair 10 and 11 (expired=1, ses_count=0)
     index 1: between VRF pair 20 and 21 (expired=0, ses_count=1)
   For the sessions we have:
     s2->per_vrf_sessions_index == 1

4. Create a new session s3 between VRF pair 20 and 21 so that the first
   per_vrf_sessions will be deleted:
     index 0: between VRF pair 20 and 21 (expired=0, ses_count=2)
   For the sessions we have:
     s2->per_vrf_sessions_index == 1
     s3->per_vrf_sessions_index == 0
   Here, note that the actual index of per_vrf_session is changed due
   to vec_del1(). The new session is added after the cleanup so it gets
   the correct index. But the index held by the existing session is not
   updated.

5. Trigger the fast path of the session s2. To achieve this, session
   s2 could be created in step 1 by
     ping -i20 -Iiface_in_vrf_10 1.1.1.1
   and steps 2-4 should then be performed within the 20-second interval.

This patch fixes this by changing per_vrf_sessions_vec to a pool so
that indicies are kept intact.

Type: fix
Signed-off-by: Jing Peng <jing@meter.com>
Change-Id: I4c08f9bfd50134bcb5f08e50ad61af2bddbcb645

18 months agonat: fix byte order error. 59/37559/6
Huawei LI [Sat, 29 Oct 2022 13:20:07 +0000 (21:20 +0800)]
nat: fix byte order error.

fix byte order error about the struct snat_address_t's member net.
for example configurations:
  set interface ip table loop1 1
  set interface ip addr loop1 10.10.10.2/24
  nat44 add address 10.10.10.2 tenant-vrf 1
the snat address's net should be "as_u8 = {0xa, 0xa, 0xa, 0x0}",
but now it's "as_u8 = {0x0, 0xa, 0xa, 0x2}" because of missing
transition of byte order about the member net of snat_address_t.
(gdb) p/x *snat_main->addresses
$3 = {addr = {data = {0xa, 0xa, 0xa, 0x2}, data_u32 = 0x20a0a0a,
      as_u8 = {0xa, 0xa, 0xa, 0x2}, as_u16 = {0xa0a, 0x20a},
      as_u32 = 0x20a0a0a}, net = {data = {0x0, 0xa, 0xa, 0x2},
      data_u32 = 0x20a0a00, as_u8 = {0x0, 0xa, 0xa, 0x2},
      as_u16 = {0xa00, 0x20a}, as_u32 = 0x20a0a00},
      sw_if_index = 0x3, fib_index = 0x1,addr_len = 0x18}
(gdb)

Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I4f25f0639ae90a7f2e8715b44f825571283d994d

18 months agoip6-nd: set router flag on NA if appropriate 82/37582/2
Matthew Smith [Sat, 5 Nov 2022 18:33:08 +0000 (18:33 +0000)]
ip6-nd: set router flag on NA if appropriate

Type: fix

The router flag on a neighbor advertisement can be used by neighbors to
detect that a router has changed to a host (RFC 4861 section 4.4).

If a neighbor adds routes after receiving a router advertisement sent
by VPP and subsequently receives a neighbor advertisement sent by VPP,
it may remove any routes it added based on the RA if the NA does not
have the router flag set. It appears that this is how windows behaves.

When sending a neighbor advertisement, set the router flag if sending
RAs is enabled on the interface.

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

18 months agoip6-nd: initialize radv_info->send_radv to 1 60/37560/3
Dave Barach [Sun, 30 Oct 2022 20:45:24 +0000 (16:45 -0400)]
ip6-nd: initialize radv_info->send_radv to 1

Otherwise, the newly configured interface will never send RADV's.

See below. In the typical case, suppress = 0 and is_no = 0, which
propagates the current value of radv->send_radv:

  radv_info->send_radv =
    (suppress != 0) ? ((is_no != 0) ? 1 : 0) : radv_info->send_radv;

No other bit of code will set send_radv, at least in straightforward
ways.

Type:fix

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

18 months agohsa: echo client crash when it fails to connect to remote 80/37580/2
Steven Luong [Fri, 4 Nov 2022 19:19:42 +0000 (12:19 -0700)]
hsa: echo client crash when it fails to connect to remote

When echo client fails to connect to remote, it should quit.

Type: fix

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

18 months agoclassify: fix crash when update nonexistent classify table. 78/37578/3
Huawei LI [Fri, 4 Nov 2022 16:35:19 +0000 (00:35 +0800)]
classify: fix crash when update nonexistent classify table.

vpp crash when update nonexistent classify table.
Program received signal SIGABRT, Aborted.
0x00007fbf3b49b337 in raise () from /lib64/libc.so.6
(gdb) bt
0  0x00007fbf3b49b337 in raise () from /lib64/libc.so.6
1  0x00007fbf3b49ca28 in abort () from /lib64/libc.so.6
2  0x00000000004079db in os_panic () at /usr/src/debug/vpp-23.02/src/vpp/vnet/main.c:417
3  0x00007fbf3bb611c7 in debugger () at /usr/src/debug/vpp-23.02/src/vppinfra/error.c:84
4  0x00007fbf3bb61529 in _clib_error (how_to_die=2, function_name=0x0, line_number=0, fmt=0x7fbf3d03af08 "%s:%d (%s) assertion `%s' fails")
   at /usr/src/debug/vpp-23.02/src/vppinfra/error.c:143
5  0x00007fbf3c67062c in vnet_classify_add_del_table (cm=0x7fbf3d438f00 <vnet_classify_main>, mask=0x7fbf00fdc088 "", nbuckets=2, memory_size=2097152,
   skip=4, match=1, next_table_index=4294967295, miss_next_index=4294967295, table_index=0x7fbeed930b98, current_data_flag=0 '\000',
   current_data_offset=0, is_add=1, del_chain=0) at /usr/src/debug/vpp-23.02/src/vnet/classify/vnet_classify.c:780
6  0x00007fbf3c672bf4 in classify_table_command_fn (vm=0x7fbefb465740, input=0x7fbeed930ef0, cmd=0x7fbefc45ec18)
   at /usr/src/debug/vpp-23.02/src/vnet/classify/vnet_classify.c:1622
7  0x00007fbf3d52b527 in vlib_cli_dispatch_sub_commands (vm=0x7fbefb465740, cm=0x4273f0 <vlib_global_main+48>, input=0x7fbeed930ef0,
   parent_command_index=1064) at /usr/src/debug/vpp-23.02/src/vlib/cli.c:650
8  0x00007fbf3d52b2c3 in vlib_cli_dispatch_sub_commands (vm=0x7fbefb465740, cm=0x4273f0 <vlib_global_main+48>, input=0x7fbeed930ef0,
   parent_command_index=0) at /usr/src/debug/vpp-23.02/src/vlib/cli.c:607
9  0x00007fbf3d52b9cb in vlib_cli_input (vm=0x7fbefb465740, input=0x7fbeed930ef0, function=0x7fbf3d597406 <unix_vlib_cli_output>, function_arg=0)
   at /usr/src/debug/vpp-23.02/src/vlib/cli.c:753
10 0x00007fbf3d59cb0c in unix_cli_process_input (cm=0x7fbf3d61fe00 <unix_cli_main>, cli_file_index=0)
   at /usr/src/debug/vpp-23.02/src/vlib/unix/cli.c:2616
11 0x00007fbf3d59d25a in unix_cli_process (vm=0x7fbefb465740, rt=0x7fbf00f7bfc0, f=0x0) at /usr/src/debug/vpp-23.02/src/vlib/unix/cli.c:2745
12 0x00007fbf3d555a25 in vlib_process_bootstrap (_a=140458063833296) at /usr/src/debug/vpp-23.02/src/vlib/main.c:1221
13 0x00007fbf3bb74204 in clib_calljmp () at /usr/src/debug/vpp-23.02/src/vppinfra/longjmp.S:123
14 0x00007fbef10028a0 in ?? ()
15 0x00007fbf3d555b4e in vlib_process_startup (vm=0x7fbf3bb7d70f <clib_mem_size+24>, p=0x7fbef10028d0, f=0x7fbf00f06ae0)
   at /usr/src/debug/vpp-23.02/src/vlib/main.c:1246
16 0x00007fbf3d592be6 in vec_max_bytes (v=0x8) at /usr/src/debug/vpp-23.02/src/vppinfra/vec_bootstrap.h:161
17 0x00007fbf00f06af8 in ?? ()
18 0x0000000000000004 in ?? ()
19 0x00000000000000ff in ?? ()
20 0x00007fbef1002980 in ?? ()
21 0x00007fbf3d592dcb in _vec_set_len (v=<error reading variable: Cannot access memory at address 0xfffffffffffffff5>,
   len=<error reading variable: Cannot access memory at address 0xffffffffffffffed>,
   elt_sz=<error reading variable: Cannot access memory at address 0xffffffffffffffe5>) at /usr/src/debug/vpp-23.02/src/vppinfra/vec_bootstrap.h:196
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) f 5
   0x00007fbf3c67062c in vnet_classify_add_del_table (cm=0x7fbf3d438f00 <vnet_classify_main>, mask=0x7fbf00fdc088 "", nbuckets=2, memory_size=2097152,
   skip=4, match=1, next_table_index=4294967295, miss_next_index=4294967295, table_index=0x7fbeed930b98, current_data_flag=0 '\000',
   current_data_offset=0, is_add=1, del_chain=0) at /usr/src/debug/vpp-23.02/src/vnet/classify/vnet_classify.c:780
780   t = pool_elt_at_index (cm->tables, *table_index);
(gdb) p *table_index
$1 = 8
(gdb) p cm->tables
$2 = (vnet_classify_table_t *) 0x0
(gdb)

Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I1c5f6168f0a7e1d1989ce07ec6c30c6fd9f0aaa9

18 months agonat: cleanup of deprecated features 61/37561/3
Filip Varga [Mon, 31 Oct 2022 10:07:14 +0000 (11:07 +0100)]
nat: cleanup of deprecated features

Type: refactor

1) Removed deprecated API.
  - These specific APIs do not have repleacement
    because features that they controled
    aren't part of current NAT44-ED
    implementation anymore.

2) Removed unused typedef of port allocation funciton.
  - Missed left over removed.

Change-Id: Ib3f763449065eda7cdcb2c6565a9cae51baf23d6
Signed-off-by: Filip Varga <filipvarga89@gmail.com>
18 months agotls: crash in mbedtls due to ctx is already free 71/37571/2
Steven Luong [Thu, 3 Nov 2022 21:34:07 +0000 (14:34 -0700)]
tls: crash in mbedtls due to ctx is already free

_clib_error (how_to_die=2, function_name=0x0, line_number=0, fmt=0x7fffb3a7e1b5 "%s:%d (%s) assertion `%s' fails") at src/vppinfra/error.c:143
mbedtls_ctx_get (ctx_index=0) at src/plugins/tlsmbedtls/tls_mbedtls.c:114
tls_ctx_get (ctx_handle=536870912) at src/vnet/tls/tls.c:310
tls_app_session_cleanup (s=0x7fffbf102040, ntf=SESSION_CLEANUP_SESSION) at src/vnet/tls/tls.c:624
app_worker_cleanup_notify (app_wrk=0x7fffbef95f80, s=0x7fffbf102040, ntf=SESSION_CLEANUP_SESSION) at src/vnet/session/application_worker.c:445
session_cleanup_notify (s=0x7fffbf102040, ntf=SESSION_CLEANUP_SESSION) at src/vnet/session/session.c:262
session_free_w_fifos (s=0x7fffbf102040) at src/vnet/session/session.c:268
session_delete (s=0x7fffbf102040) at src/vnet/session/session.c:287
session_transport_delete_notify (tc=0x7fffbdf63c40) at src/vnet/session/session.c:1159
tcp_handle_cleanups (wrk=0x7fffbef46d40, now=133.30033046694487) at src/vnet/tcp/tcp.c:1298
tcp_update_time (now=133.30033046694487, thread_index=2 '\002') at src/vnet/tcp/tcp.c:1309
session_update_time_subscribers (smm=0x7ffff7f75ce0 <session_main>, now=133.30033046694487, thread_index=2) at src/vnet/session/session_node.c:1817
session_queue_node_fn (vm=0x7fffbdfad1c0, node=0x7fffbe0b1340, frame=0x0) at src/vnet/session/session_node.c:1934
dispatch_node (vm=0x7fffbdfad1c0, node=0x7fffbe0b1340, type=VLIB_NODE_TYPE_INPUT, dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x0, last_time_stamp=4722227957546624) at src/vlib/main.c:960

Putting a breakpoint in gdb, I found out ctx was free in mbedtls_app_close.
Looking at app_close function in picotls and openssl, I don't see they
free ctx and they don't crash when processing cleanup. I am inclined to
think that mbedtls_ctx_free should not be called in mbedtls_app_close

    at src/plugins/tlsmbedtls/tls_mbedtls.c:92
    at src/plugins/tlsmbedtls/tls_mbedtls.c:559
    at src/vnet/tls/tls.c:360
    thread_index=2) at src/vnet/tls/tls.c:762
    conn_index=536870912, thread_index=2 '\002')
    at src/vnet/session/transport.c:332
    at src/vnet/session/session.c:1608
    elt=0x7fffbdfef3dc)
    at src/vnet/session/session_node.c:1672
    node=0x7fffbe0b1340, frame=0x0)
    at src/vnet/session/session_node.c:1966
    node=0x7fffbe0b1340, type=VLIB_NODE_TYPE_INPUT,
    dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x0,
    last_time_stamp=4721919444027682)
    at src/vlib/main.c:960

Type: fix

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

18 months agomisc: fix failing TestNs/TestHttpTps test in hstf 69/37569/2
Maros Ondrejicka [Thu, 3 Nov 2022 12:30:08 +0000 (13:30 +0100)]
misc: fix failing TestNs/TestHttpTps test in hstf

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

18 months agosession: fix tx_fifo clear and incorrect bitmap invalidation 67/37567/6
Dongya Zhang [Thu, 3 Nov 2022 07:22:34 +0000 (15:22 +0800)]
session: fix tx_fifo clear and incorrect bitmap invalidation

The tx_fifo of session may not be set up yet, if app request to
disconnect the session, svm_fifo_dequeue_drop_all will crash.

In debug image, ho_session_alloc will do clib_bitmap_validate to
prevent race condition, however the input is not correct which
will make vpp crash.

Type: fix
Change-Id: Ia8bff325d238eacb671e6764ea2a4eecd3fca609
Signed-off-by: Dongya Zhang <fortitude.zhang@gmail.com>
18 months agosr: SRv6 Path Tracing Midpoint behaviour 54/37454/4
Julian Klaiber [Tue, 18 Oct 2022 08:37:14 +0000 (10:37 +0200)]
sr: SRv6 Path Tracing Midpoint behaviour

Type: feature

Signed-off-by: Julian Klaiber <julian@klaiber.me>
Change-Id: I866a2d2e06013380309c98a54078c1b3f6ad76fc

18 months agovpp-swan: remove step to copy vpp_sswan source for docker image 23/37523/3
Yulong Pei [Wed, 26 Oct 2022 09:14:42 +0000 (09:14 +0000)]
vpp-swan: remove step to copy vpp_sswan source for docker image

Since vpp_sswan plugin already merged in /vpp/extras/strongswan,
no need to provide additional vpp_sswan source files for docker image.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I35bad22b1046e0dddbcf39e1af38d589d1438239
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
18 months agoquic: use safe pool realloc 31/35831/18
Florin Coras [Wed, 30 Mar 2022 17:11:55 +0000 (10:11 -0700)]
quic: use safe pool realloc

Type: improvement

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

18 months agotls: use safe pool reallocs 18/35818/23
Florin Coras [Wed, 30 Mar 2022 00:49:37 +0000 (17:49 -0700)]
tls: use safe pool reallocs

Type: improvement

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

18 months agotests: session in interrupt mode 22/35322/6
Filip Tehlar [Mon, 14 Feb 2022 15:39:26 +0000 (15:39 +0000)]
tests: session in interrupt mode

Type: test

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

18 months agobuild: add extra rpm build dependencies 29/37529/2
Tianyu Li [Wed, 26 Oct 2022 09:15:12 +0000 (09:15 +0000)]
build: add extra rpm build dependencies

make install-ext-dep failed with,
sudo rpm -Uih vpp-ext-deps-23.02-4.aarch64.rpm
error: Failed dependencies:
        perl(IBswcountlimits) is needed by vpp-ext-deps-23.02-4.aarch64

vpp-ext-deps have dependencies on infiniband-diags and libibumad

Type: fix

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I2aea453f53d6507285b4f87f04c6dfc4845098cd

18 months agocnat: Fix unformat_cnat_snat_interface_map_type 89/37489/7
Miguel Borges de Freitas [Wed, 19 Oct 2022 21:33:56 +0000 (22:33 +0100)]
cnat: Fix unformat_cnat_snat_interface_map_type

Fix initialization of the table u32 var which is leading to the incorrect
unformat of interface map type

Type: fix

Signed-off-by: Miguel Borges de Freitas <miguel-r-freitas@alticelabs.com>
Change-Id: I1e56acd0e4c735df755e85b172bb6623bf47a57b

18 months agovcl: register workers when reattaching to vpp 89/37389/7
Maros Ondrejicka [Wed, 12 Oct 2022 20:58:01 +0000 (22:58 +0200)]
vcl: register workers when reattaching to vpp

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

18 months agosession: add session event log for session state 21/37521/5
Steven Luong [Tue, 25 Oct 2022 20:09:11 +0000 (13:09 -0700)]
session: add session event log for session state

To aid sesipon debug, add session event log in SM debug to track
the session state.

Type: improvement

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

18 months agovirtio: use current_data as l2_hdr_offset 20/37520/1
Mohsin Kazmi [Tue, 25 Oct 2022 19:27:08 +0000 (19:27 +0000)]
virtio: use current_data as l2_hdr_offset

Type: fix

virtio transmit node uses header offsets to set the
appropriate metadata for packet with offloads. But
l2_hdr_offset is not correctly set by previous node(s).
This patch makes use of curren_data field as l2_hdr_offset.

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

18 months agodevices: fix the l2 hdr offset in af_packet transmit side 19/37519/1
Mohsin Kazmi [Tue, 25 Oct 2022 19:23:51 +0000 (19:23 +0000)]
devices: fix the l2 hdr offset in af_packet transmit side

Type: fix

af_packet transmit node uses header offsets to set the
appropriate metadata for packet with offload. But
l2_hdr_offset is not correctly set by previous node.
This patch makes use of curren_data field as l2_hdr_offset.

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

18 months agoudp: use new wrk context for connections 13/37513/3
Florin Coras [Tue, 25 Oct 2022 01:59:06 +0000 (18:59 -0700)]
udp: use new wrk context for connections

Type: improvement

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

18 months agoudp: postpone cleanup of udp connections 12/37512/3
Florin Coras [Tue, 25 Oct 2022 01:46:20 +0000 (18:46 -0700)]
udp: postpone cleanup of udp connections

Avoid deleting connections in session layer io event handler.

Type: improvement

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

18 months agordma: set correct CQE flags 28/37428/2
Jieqiang Wang [Mon, 19 Sep 2022 15:33:21 +0000 (23:33 +0800)]
rdma: set correct CQE flags

CQE flags located in bits 16-31 at offset 0x1c should be defined as
actual numbers instead of indexes. Besides, L3 header type for IPv4 is
10(2 in decimal) and for IPv6 is 01(1 in decimal) according to CQE entry
fields description of page 120 in Mellanox Programmer Reference Manual.
(https://network.nvidia.com/files/doc-2020/ethernet-adapters-programming-manual.pdf)

Fixing this issue will lead to correct CQE flags printing for rdma-input
node when buffer trace is enabled.

Type: fix

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I9b578ca5cbd8cd93a577aa83131e31c79f60430e

18 months agordma: fix ipv4 checksum check in rdma-input node 29/37429/2
Jieqiang Wang [Wed, 21 Sep 2022 09:17:22 +0000 (17:17 +0800)]
rdma: fix ipv4 checksum check in rdma-input node

- cqe_flags pointer should be incremented accordingly otherwise only the
first element in cqe_flags will be updated
- flag l3_ok should be set for match variable when verifying if packets
are IPv4 packets with flag l3_ok set
- mask/match variables should be converted to network byte order to
match the endianness of cqe_flags
- vector processing of checking cqe flags will set return value to
0xFFFF by mistake if packet numbers are not multiple of 16(VEC256) or
8(VEC128)

Type: fix

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I9fec09e449fdffbb0ace8e5a6ccfeb6869b5cac1

18 months agohash: add local variable 01/37501/2
Gabriel Oginski [Fri, 21 Oct 2022 07:05:56 +0000 (07:05 +0000)]
hash: add local variable

The current implmentation of the hash table is not thread-safe.
This design leads to a segfault when VPP handling a lot of tunnels for
Wireguard, where one thread modify the hash table and other threads
starting to lookup at the same time.

The fix add a local variable to store how many bits are used by a user
object.

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

18 months agopacketforge: fix GTP-Extension header field data 71/37271/3
Ting Xu [Thu, 29 Sep 2022 05:50:55 +0000 (13:50 +0800)]
packetforge: fix GTP-Extension header field data

Fix the incorrect fields data of GTP-Extension header.

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

18 months agodocs: update cnat docs to current vpp version 90/37490/4
Miguel Borges de Freitas [Wed, 19 Oct 2022 22:21:20 +0000 (23:21 +0100)]
docs: update cnat docs to current vpp version

The documentation for the cnat plugin is highly outdated specially on
the snat section.

Type: docs

Signed-off-by: Miguel Borges de Freitas <miguel-r-freitas@alticelabs.com>
Change-Id: I30b0c6295d3c812b636374753af3c37f29b0cc53

18 months agodpdk: add Intel QAT 200xx series support 07/37507/2
Vladimir Ratnikov [Mon, 24 Oct 2022 11:11:56 +0000 (11:11 +0000)]
dpdk: add Intel QAT 200xx series support

Type: feature

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

18 months agovppinfra: fix incorrect sizeof() argument due to typo 03/37503/2
Andrew Yourtchenko [Fri, 21 Oct 2022 13:23:51 +0000 (13:23 +0000)]
vppinfra: fix incorrect sizeof() argument due to typo

fixes coverity 282527

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

18 months agocrypto: fix dead nn foreach 38/37438/2
Dmitry Valter [Mon, 17 Oct 2022 14:04:35 +0000 (14:04 +0000)]
crypto: fix dead nn foreach

Pass vec_foreach args in the right order

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

18 months agogso: remove vxlan header include file dependency 76/37476/2
Steven Luong [Tue, 18 Oct 2022 15:31:20 +0000 (08:31 -0700)]
gso: remove vxlan header include file dependency

vxlan will be moved to a plugin. Remove vnet files from including
vxlan header include files.

Type: fix

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

18 months agodevices: add support for af-packet v2 92/37092/6
Mohsin Kazmi [Thu, 8 Sep 2022 17:21:20 +0000 (17:21 +0000)]
devices: add support for af-packet v2

Type: feature

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

18 months agocrypto-sw-scheduler: fix queue iterator 30/37430/3
Vladimir Ratnikov [Mon, 17 Oct 2022 07:34:14 +0000 (07:34 +0000)]
crypto-sw-scheduler: fix queue iterator

 When there are several workers, iterator can and will skip
head iterator and it will last until BARRIER_SYNC_TIMEOUT won't
expire and will cause SIGABRT with `worker thread deadlock`

Type: fix

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: Id4def4d5894e077ae27592367b141ecd822e86af
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
18 months agotests: enable extended test runs in run.py 51/37451/2
Naveen Joy [Mon, 17 Oct 2022 22:07:49 +0000 (15:07 -0700)]
tests: enable extended test runs in run.py

Change-Id: I5f712614910dc69f04c43efd8958ef8e87906b9e
Type: test
Signed-off-by: Naveen Joy <najoy@cisco.com>
18 months agoudp: support for disabling tx csum 78/37478/2
Florin Coras [Wed, 19 Oct 2022 01:37:56 +0000 (18:37 -0700)]
udp: support for disabling tx csum

Type: feature

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

18 months agosession: add session debug cli 45/37445/6
Steven Luong [Mon, 17 Oct 2022 17:39:06 +0000 (10:39 -0700)]
session: add session debug cli

- add session debug cli to enable fine control of which event logs
are enable/disable with below syntax
  session debug {show | group <list> level <n>}
  list may be entered with a dash, "0-4"
  or it may be entered with a comma, "0,1,4"
- fix compilation errors when SESSION_EVT is enable
- change SESSION_EVT_FREE_HANDLER to use DEC_SESSION_ED instead of
DEC_SESSION_ETD because the transport may already be free when the
handler is called

Type: improvement

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

18 months agovirtio: fix the missing unlock 93/37493/2
Mohsin Kazmi [Thu, 20 Oct 2022 12:53:28 +0000 (12:53 +0000)]
virtio: fix the missing unlock

Type: fix

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

19 months agocrypto-ipsecmb: support previous ipsecmb versions 81/37481/1
Marcel Cornu [Wed, 19 Oct 2022 08:47:40 +0000 (09:47 +0100)]
crypto-ipsecmb: support previous ipsecmb versions

Backward compatibility was broken when updating ipsecmb version to 1.3.

Type: improvement
Signed-off-by: marcel.d.cornu@intel.com
Change-Id: I87a76859ec5e2ef6be0bc2af0960fa2494ce4297

19 months agoudp: explicit udp output node 50/37450/6
Florin Coras [Mon, 17 Oct 2022 18:52:34 +0000 (11:52 -0700)]
udp: explicit udp output node

This allows for custom next node selection on output.

Type: feature

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

19 months agosession: pass sep.opaque to listen session 44/37444/3
Mohammed Hawari [Mon, 17 Oct 2022 15:55:35 +0000 (17:55 +0200)]
session: pass sep.opaque to listen session

Change-Id: I34ce2cc4585bfbd679d7d66d5bef69ddb268bb57
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
19 months agovppinfra: send minimal needed mask to the set_mempolicy syscall 42/37442/2
Damjan Marion [Mon, 17 Oct 2022 15:27:28 +0000 (17:27 +0200)]
vppinfra: send minimal needed mask to the set_mempolicy syscall

Type: fix
fixes: 561ae5d

Change-Id: I0d98f5b43bc9ab5d31463b285177a11a10b864d2
Signed-off-by: Damjan Marion <dmarion@me.com>
19 months agovirtio: fix the tx side hdr offset 49/37449/1
Mohsin Kazmi [Mon, 17 Oct 2022 18:16:57 +0000 (18:16 +0000)]
virtio: fix the tx side hdr offset

Type: fix

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

19 months agodevices: fix the header offsets in af_packet 48/37448/1
Mohsin Kazmi [Mon, 17 Oct 2022 18:27:21 +0000 (18:27 +0000)]
devices: fix the header offsets in af_packet

Type: fix

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

19 months agogso: fix the metadata for gro packets 47/37447/1
Mohsin Kazmi [Mon, 17 Oct 2022 18:26:23 +0000 (18:26 +0000)]
gso: fix the metadata for gro packets

Type: fix

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

19 months agoip: fix the pseudo header checksum 46/37446/1
Mohsin Kazmi [Mon, 17 Oct 2022 18:21:44 +0000 (18:21 +0000)]
ip: fix the pseudo header checksum

Type: fix

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

19 months agocnat: Add sctp support 59/37259/6
Nathan Skrzypczak [Wed, 2 Feb 2022 18:31:58 +0000 (19:31 +0100)]
cnat: Add sctp support

This patch adds SCTP support in the CNat translation primitives.
It also exposes a clib_crc32c_with_init function allowing to set
the init value to start the crc32 with instead of 0.

Type: feature

Change-Id: I86add4cfcac08f2a5a34d1e1841122fafd349fe7
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
19 months agocrypto-ipsecmb: bump ipsecmb library to v1.3 58/37358/8
Marcel Cornu [Wed, 5 Oct 2022 11:08:05 +0000 (12:08 +0100)]
crypto-ipsecmb: bump ipsecmb library to v1.3

- Use the latest IPsec Multi-Buffer library release v1.3
- Use ipsec-mb burst API for HMAC-SHAx algorithms
- Use ipsec-mb burst API for AES-CBC and AES-CTR algorithms

The new burst API available in ipsecmb v1.3 brings significant
performance improvements for certain algorithms compared to the job API.

Type: feature
Signed-off-by: marcel.d.cornu@intel.com
Change-Id: I3490b35a616a2ea77607f103426df62438c22b2b

19 months agovlib: Counter free needs to NULL the allocated counter vector 91/37391/2
Neale Ranns [Thu, 13 Oct 2022 05:39:11 +0000 (05:39 +0000)]
vlib: Counter free needs to NULL the allocated counter vector

otherwise the next time the counter is validated this is dangling.

Type: fix
Fixes: 58fd481d73

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

19 months agoip-neighbor: delete redundant help information in cli. 24/37424/5
Huawei LI [Fri, 14 Oct 2022 13:37:23 +0000 (21:37 +0800)]
ip-neighbor: delete redundant help information in cli.

Delete redundant help information in ip neighbor's
cli. There is no code implementation about fib-id and
proxy in the cli's subsequent process.

Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I1e276aad030409e3f2f62fee489ea95d316e67b5

19 months agolinux-cp: fix infinite loop in CLI lcp default 26/37426/2
luoyaozu [Sat, 15 Oct 2022 11:31:05 +0000 (19:31 +0800)]
linux-cp: fix infinite loop in CLI lcp default

CLI lcp default clear or lcp default netns  hangs in an infinite while loop.

Type: fix

Signed-off-by: luoyaozu <luoyaozu@foxmail.com>
Change-Id: I699338abc045c84361707260adbb5b574a383170

19 months agol2: coverity complains dead codes 90/37390/3
Steven Luong [Thu, 13 Oct 2022 00:08:12 +0000 (17:08 -0700)]
l2: coverity complains dead codes

Coverity complains dead codes in 2 places due to a recent commit as
pointed out in Fixes. The dead codes are
      if (seed < L2_BD_ID_MAX % 2)
        is_seed_low = 1;
and
      if (is_seed_low)
        seed += (2 * (i % 2) - 1) * i;

seed can never be less than (L2_BD_ID_MAX % 2).
Consequently, is_seed_low is always 0.

There is also other problem. The inner loop is iterating only once.

The fix is to greatly simplify the code to generate a random bd_id.

Type: fix
Fixes: Ieb6919f958f437fc603d5e1f48cab01de780951d

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

19 months agosession: make session code compile with SESSION_DEBUG enable 80/37380/3
Steven Luong [Mon, 10 Oct 2022 18:37:57 +0000 (11:37 -0700)]
session: make session code compile with SESSION_DEBUG enable

Session debug code does not compile anymore due to vlib_mains global
variable disappearing over time. Replace it with vlib_get_main_by_index
call.

Add a cmake variable and pass it from make command line to enable
session debug. Notice transport debug is required for session debug.

make rebuild VPP_EXTRA_CMAKE_ARGS=-DVPP_TCP_DEBUG_ALWAYS=ON VPP_EXTRA_CMAKE_ARGS+=-DVPP_SESSION_DEBUG=ON

Type: fix

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

19 months agogomemif: migrate to govpp repository 93/37393/3
Matus Halaj [Thu, 13 Oct 2022 12:46:39 +0000 (14:46 +0200)]
gomemif: migrate to govpp repository

Type: make
Signed-off-by: Matus Halaj <mhalaj@cisco.com>
Change-Id: I1d48c7e44fdf23438132996fd3288b29da1fe36e

19 months agodocs: fix memory traces command 42/37342/2
Benoît Ganne [Mon, 3 Oct 2022 18:00:45 +0000 (20:00 +0200)]
docs: fix memory traces command

Type: fix

Change-Id: I8fc949da209a5067c702952fbd0e6ce77b921d02
Signed-off-by: Benoît Ganne <bganne@cisco.com>
19 months agomisc: avoid permission issue when running envoy 94/37394/2
Maros Ondrejicka [Thu, 13 Oct 2022 13:38:17 +0000 (15:38 +0200)]
misc: avoid permission issue when running envoy

Because envoy didn't have permission for `envoy.log` file it would stop.
This made tests involving envoy fail.
Adding `ENVOY_UID` environment variable makes envoy run as root,
which avoids the problem.

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

19 months agovpp-swan: fix linked library to plugin 88/37388/2
Gabriel Oginski [Wed, 12 Oct 2022 13:40:05 +0000 (13:40 +0000)]
vpp-swan: fix linked library to plugin

Due to refactor keeping api common code in vlibapi, changes order
linked library to this plugin.

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

19 months agoip: migrate ip4 full reassembly to use vlib_buffer_enqueue_to_next 27/37127/4
Damjan Marion [Wed, 14 Sep 2022 16:59:47 +0000 (18:59 +0200)]
ip: migrate ip4 full reassembly to use vlib_buffer_enqueue_to_next

Type: improvement

Change-Id: Ibf683c9ba8a2751e0b40920f6735cfe0a35a6e6d
Signed-off-by: Damjan Marion <dmarion@me.com>
19 months agoip: simpler and faster ip4_full_reass_drop_all 25/37125/3
Damjan Marion [Wed, 14 Sep 2022 15:40:24 +0000 (17:40 +0200)]
ip: simpler and faster ip4_full_reass_drop_all

Type: improvement
Change-Id: I4a75583ce718ba6466cd09ca8373fd43988ef62a
Signed-off-by: Damjan Marion <dmarion@me.com>
19 months agomisc: fix issues reported by clang-15 87/37387/1
Damjan Marion [Wed, 12 Oct 2022 14:02:18 +0000 (16:02 +0200)]
misc: fix issues reported by clang-15

Type: improvement

Change-Id: I3fbbda0378b72843ecd39a7e8592dedc9757793a
Signed-off-by: Damjan Marion <dmarion@me.com>
19 months agol2: Add bridge_domain_add_del_v2 to l2 api 41/37141/11
Laszlo Kiraly [Fri, 16 Sep 2022 11:20:07 +0000 (13:20 +0200)]
l2: Add bridge_domain_add_del_v2 to l2 api

https://jira.fd.io/browse/VPP-2034

Type: fix
Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Ieb6919f958f437fc603d5e1f48cab01de780951d

19 months agotests: don't use tmp as the default log dir with run.py 97/37197/5
Naveen Joy [Tue, 20 Sep 2022 18:38:33 +0000 (11:38 -0700)]
tests: don't use tmp as the default log dir with run.py

The log file directory is configurable with run.py using the
--log-dir argument. This patch removes the use of /tmp as
the default dir for storing all test logs. The default
log dir is now set to show the year, month and day
of the test run. This provides a more meaningful aggregation
of test logs for effective troubleshooting. The default log
dir is set to <CWD>/test-run-YYYY-MM-DD.

Type: improvement
Change-Id: I6c9002e961f6e06fc953ca42d86febf4f218e566
Signed-off-by: Naveen Joy <najoy@cisco.com>
19 months agovppinfra: fix AddressSanitizer 14/37314/3
Benoît Ganne [Fri, 30 Sep 2022 15:13:33 +0000 (17:13 +0200)]
vppinfra: fix AddressSanitizer

When checking for CLIB_SANITIZE_ADDR to enable specific behavior for
AddressSanitizer, we must have vppinfra/clib.h included as it is defined
there.

Type: fix

Change-Id: I9060c3c29c1289d28596c215a1d1709b2ea7c84e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
19 months agonat: report time between current vpp time and last_heard 67/37267/17
Dave Cornejo [Wed, 28 Sep 2022 01:47:45 +0000 (01:47 +0000)]
nat: report time between current vpp time and last_heard

existing details report the last_heard as the seconds since VPP
started, this is not very useful, so report additionaly
time_since_last_heard in seconds between VPP time and
last_heard.

Change-Id: Ifd34b1449e57919242b1f0e22156d3590af3c738
Type: improvement
Signed-off-by: Dave Cornejo <dcornejo@netgate.com>
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
19 months agofib: fix crash when create vxlan/vxlan-gpe/geneve/gtpu tunnel. 03/37303/4
Huawei LI [Thu, 29 Sep 2022 03:28:12 +0000 (11:28 +0800)]
fib: fix crash when create vxlan/vxlan-gpe/geneve/gtpu tunnel.

Fix vpp crash when create vxlan/vxlan-gpe/geneve/gtpu tunnel
with 0.0.0.0 dst ip in debug build. The ASSERT should be move
out of fib_prefix_from_ip46_addr, which may be called when
create vxlan/vxlan-gpe/geneve/gtpu tunnel with 0.0.0.0 dst ip.

How to reproduce:
1. build debug vpp and run vpp
2. create vxlan t src 192.168.0.2 dst 0.0.0.0 vni 1 instance 1
   create vxlan-gpe tunnel local 192.168.0.2 remote 0.0.0.0 vni 1
   create geneve tunnel local 192.168.0.2 remote 0.0.0.0 vni 1
   create gtpu tunnel src 192.168.0.2 dst 0.0.0.0 teid 1

Type: fix

Change-Id: I19972f6af588f4ff7fd17de1b16b9301e43d596f
Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
19 months agotcp: cmake option VPP_TCP_DEBUG_ALWAYS=ON not taken by all files 72/37372/1
Steven Luong [Fri, 7 Oct 2022 20:53:20 +0000 (13:53 -0700)]
tcp: cmake option VPP_TCP_DEBUG_ALWAYS=ON not taken by all files

Some files include tcp_debug.h without including <vpp/vnet/config.h>
As a result, those files do not get VPP_TCP_DEBUG_ALWAYS option
set. The fix is to include <vpp/vnet/config.h> in tcp_debug.h

Type: fix

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

19 months agotests: disable broken wireguard tests on vpp_debug image 47/37347/2
Dave Wallace [Wed, 5 Oct 2022 02:02:49 +0000 (22:02 -0400)]
tests: disable broken wireguard tests on vpp_debug image

Type: test

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

19 months agotcp: build image with TCP_DEBUG_ALWAYS via make 68/37368/2
Steven Luong [Thu, 6 Oct 2022 23:48:24 +0000 (16:48 -0700)]
tcp: build image with TCP_DEBUG_ALWAYS via make

Add cmake option to enable TCP_DEBUG_ALWAYS.
make rebuild VPP_EXTRA_CMAKE_ARGS=-DVPP_TCP_DEBUG_ALWAYS=ON
make rebuild VPP_EXTRA_CMAKE_ARGS=-DVPP_TCP_DEBUG_ALWAYS=OFF

Type: improvement

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

19 months agobuild: retain dpdk_mlx_default setting for ci script 48/37348/2
Dave Wallace [Wed, 5 Oct 2022 03:48:44 +0000 (23:48 -0400)]
build: retain dpdk_mlx_default setting for ci script

- tell git to ignore all build/external generated files

Type: make

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

19 months agourpf: add mode for specific fib index lookup 31/37131/19
hedi bouattour [Wed, 14 Sep 2022 12:39:23 +0000 (12:39 +0000)]
urpf: add mode for specific fib index lookup

this patch adds a mode to urpf in order to perform the lookup in a specified vrf instead of the interface vrf
Type: feature
Change-Id: Ieb91de6ccdfbf32b6939364f3bebeecd2d57af19
Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
19 months agofib: add fib_entry_get_path_list_for_source 46/37346/2
Damjan Marion [Tue, 4 Oct 2022 16:08:51 +0000 (18:08 +0200)]
fib: add fib_entry_get_path_list_for_source

Type: improvement
Change-Id: Ie035bebf64226691cffc84484e4bf7310287d1b7
Signed-off-by: Damjan Marion <dmarion@me.com>
19 months agoabf: return status of attachment add/del 67/37367/2
Matthew Smith [Thu, 6 Oct 2022 18:01:23 +0000 (18:01 +0000)]
abf: return status of attachment add/del

Type: fix

The handler for abf_itf_attach_add_del was always returning 0. Set rv to
the return value of call to abf_itf_attach() or abf_itf_detach().

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

19 months agovcl: add api to check if vcl disconnected from vpp 66/37366/5
Maros Ondrejicka [Thu, 6 Oct 2022 16:17:05 +0000 (18:17 +0200)]
vcl: add api to check if vcl disconnected from vpp

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

19 months agogso: set the header offsets in gro hdr fixup 65/37365/2
Mohsin Kazmi [Thu, 6 Oct 2022 15:46:24 +0000 (15:46 +0000)]
gso: set the header offsets in gro hdr fixup

Type: fix

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

19 months agogso: fix the checksum for odd number of data bytes 64/37364/2
Mohsin Kazmi [Thu, 6 Oct 2022 15:43:36 +0000 (15:43 +0000)]
gso: fix the checksum for odd number of data bytes

Type: fix

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

19 months agogomemif: update to libmemif version 4.0 65/36765/4
Daniel Béreš [Wed, 27 Jul 2022 12:22:39 +0000 (12:22 +0000)]
gomemif: update to libmemif version 4.0

Type: improvement

This patch provides:
1. interrupt mode support,
2. abstract socket support,
3. overriding responder example and divides it to two examples:
-icmp_responder_cb
-icmp_responder_poll

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Change-Id: I99c86d053521760c457541fc596ed554f4077608

19 months agofib: only invoke adj delegate create callback on mcast adj create 56/37356/2
Peter Morrow [Wed, 5 Oct 2022 10:50:22 +0000 (11:50 +0100)]
fib: only invoke adj delegate create callback on mcast adj create

adj_delegate_adj_created() is incorrectly called when an existing
adj is found and returned. This can lead to crashes in some cases
in the pmtu delegate:

(gdb) bt
0  0x00007f2aa8fc9ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6
1  0x00007f2aa8fb3537 in abort () from /lib/x86_64-linux-gnu/libc.so.6
2  0x0000564361b5403a in os_exit (code=code@entry=1) at ./src/vpp/vnet/main.c:437
3  0x00007f2aa9271a3e in unix_signal_handler (signum=11, si=<optimized out>, uc=<optimized out>) at ./src/vlib/unix/main.c:188
4  <signal handler called>
5  0x00007f2aa9970d5a in fib_table_get_table_id_for_sw_if_index (proto=FIB_PROTOCOL_IP4, sw_if_index=<optimized out>) at ./src/vnet/fib/fib_table.c:1156
6  0x00007f2aa964aebf in ip_pmtu_adj_delegate_adj_created (ai=8) at ./src/vnet/ip/ip_path_mtu.c:197
7  0x00007f2aa9993ee5 in adj_delegate_adj_created (ai=ai@entry=8) at ./src/vnet/adj/adj_delegate.c:166
8  0x00007f2aa998dbde in adj_mcast_add_or_lock (proto=proto@entry=FIB_PROTOCOL_IP6, link_type=link_type@entry=VNET_LINK_IP6, sw_if_index=sw_if_index@entry=7) at ./src/vnet/adj/adj_mcast.c:95
9  0x00007f2aa95c7b3e in ip6_link_enable (sw_if_index=7, link_local_addr=link_local_addr@entry=0x0) at ./src/vnet/ip/ip6_link.c:217
10 0x00007f2aa9621587 in vl_api_sw_interface_ip_enable_disable_t_handler (mp=0x7f2a4fa5ad10) at ./src/vnet/ip/ip_api.c:108
11 0x00007f2aaa3b7e44 in msg_handler_internal (free_it=0, do_it=1, trace_it=<optimized out>, msg_len=<optimized out>, the_msg=0x7f2a4fa5ad10, am=0x7f2aaa3cc020 <api_global_main>) at ./src/vlibapi/api_shared.c:593
12 vl_msg_api_handler_no_free (the_msg=0x7f2a4fa5ad10, msg_len=<optimized out>) at ./src/vlibapi/api_shared.c:810
13 0x00007f2aaa3a1702 in vl_socket_process_api_msg (rp=<optimized out>, input_v=<optimized out>) at ./src/vlibmemory/socket_api.c:208
14 0x00007f2aaa3a95d8 in vl_api_clnt_process (vm=<optimized out>, node=<optimized out>, f=<optimized out>) at ./src/vlibmemory/memclnt_api.c:429
15 0x00007f2aa9226f37 in vlib_process_bootstrap (_a=<optimized out>) at ./src/vlib/main.c:1235
16 0x00007f2aa91824a8 in clib_calljmp () at /builds/graphiant/graphnos/vpp/debian/output/source_dir/src/vppinfra/longjmp.S:123
17 0x00007f2a47cf5d60 in ?? ()
18 0x00007f2aa922853f in vlib_process_startup (f=0x0, p=0x7f2a494dc000, vm=0x7f2a489ed680) at ./src/vlib/main.c:1260
19 dispatch_process (vm=0x7f2a489ed680, p=0x7f2a494dc000, last_time_stamp=<optimized out>, f=0x0) at ./src/vlib/main.c:1316
20 0x0000000000000000 in ?? ()
(gdb)

Type: fix

Change-Id: I2d3c041e0be8284471771c7882c89f743baab0e5
Signed-off-by: Peter Morrow <pdmorrow@gmail.com>
19 months agoip: reassembly - custom context instead of VRF 27/36327/9
Mohammed Hawari [Thu, 2 Jun 2022 16:04:45 +0000 (18:04 +0200)]
ip: reassembly - custom context instead of VRF

Change-Id: Id8d6ab96a710cdd207068cf19a6363bbcd584de4
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
19 months agoip: reassembly - custom context of ipv6 54/36454/9
Mohammed Hawari [Mon, 20 Jun 2022 13:28:31 +0000 (15:28 +0200)]
ip: reassembly - custom context of ipv6

Change-Id: Ia5ec7fc0c71e6a0ad1b43df24bb6b88e616d260d
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
19 months agobuild: change make verify gate os to ubuntu 22.04 99/37099/6
Dave Wallace [Fri, 9 Sep 2022 15:34:02 +0000 (11:34 -0400)]
build: change make verify gate os to ubuntu 22.04

- Also fix log output to remove hardcoded compiler version

Type: make

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