12468 Commits

Author SHA1 Message Date
Jieqiang Wang
bf93670c51 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
2022-10-25 15:18:02 +00:00
Gabriel Oginski
813c1bd257 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
2022-10-25 08:30:02 +00:00
Ting Xu
c9d916c7cc 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
2022-10-25 02:07:35 +00:00
Miguel Borges de Freitas
938bff8084 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
2022-10-24 16:19:45 +00:00
Vladimir Ratnikov
a57549ad22 dpdk: add Intel QAT 200xx series support
Type: feature

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: I2fd1e321983ac5caa03aac8705dfc596985c35f7
2022-10-24 13:22:20 +00:00
Andrew Yourtchenko
0d36720f8d 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
2022-10-24 13:20:07 +00:00
Dmitry Valter
cb3a6bdea9 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
2022-10-24 09:35:45 +00:00
Steven Luong
4897257dbe 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
2022-10-24 09:00:05 +00:00
Mohsin Kazmi
8b90d89b05 devices: add support for af-packet v2
Type: feature

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I2ccaf1d512dcb72e414be8c69cbb538ebbe0e933
2022-10-21 16:32:56 +00:00
Vladimir Ratnikov
65bff88c36 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>
2022-10-20 20:47:29 +00:00
Naveen Joy
5569a85a1e tests: enable extended test runs in run.py
Change-Id: I5f712614910dc69f04c43efd8958ef8e87906b9e
Type: test
Signed-off-by: Naveen Joy <najoy@cisco.com>
2022-10-20 19:52:23 +00:00
Florin Coras
f8ee39ff71 udp: support for disabling tx csum
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I84843eb3a0a66c64cd46536624633e0dae1c4681
2022-10-20 18:14:32 +00:00
Steven Luong
20de85b6da 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
2022-10-20 15:16:08 +00:00
Mohsin Kazmi
049dee954f virtio: fix the missing unlock
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I7003162ee72c39c44be1e7ff0d27f4416b3eca5a
2022-10-20 14:05:43 +00:00
Marcel Cornu
f0d71c6b7f 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
2022-10-19 10:12:34 +01:00
Florin Coras
8c1be054b9 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
2022-10-19 01:00:52 +00:00
Mohammed Hawari
472d0da7a0 session: pass sep.opaque to listen session
Change-Id: I34ce2cc4585bfbd679d7d66d5bef69ddb268bb57
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2022-10-18 16:46:06 +00:00
Damjan Marion
fecb2524ab 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>
2022-10-18 15:41:23 +00:00
Mohsin Kazmi
1cc592b17c virtio: fix the tx side hdr offset
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ibb4b17b954c55bcb37ede57d398966f244735c3d
2022-10-17 18:32:31 +00:00
Mohsin Kazmi
cacde12127 devices: fix the header offsets in af_packet
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I7fc645c46d285ceb13903f5835c99e9b6a9e5b07
2022-10-17 18:32:11 +00:00
Mohsin Kazmi
79f6dbac75 gso: fix the metadata for gro packets
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I3a059b9dcbbcb597a7822f4f35fb275a7c197647
2022-10-17 18:31:47 +00:00
Mohsin Kazmi
19a168496b ip: fix the pseudo header checksum
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I5eb83cbd0f8534dc50ecb907b3582717e8709aa2
2022-10-17 18:31:19 +00:00
Nathan Skrzypczak
f284c14c7b 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>
2022-10-17 16:25:01 +00:00
Marcel Cornu
2a6f35f24c 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
2022-10-17 13:41:50 +00:00
Neale Ranns
80c0ae2437 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
2022-10-17 05:43:14 +00:00
Huawei LI
368dab3699 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
2022-10-16 20:52:07 +00:00
luoyaozu
d2d90ee048 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
2022-10-15 19:44:25 +08:00
Steven Luong
662c59a80a 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
2022-10-13 23:58:41 +00:00
Steven Luong
10e5b4a016 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
2022-10-13 18:25:46 +00:00
Matus Halaj
af36e96d07 gomemif: migrate to govpp repository
Type: make
Signed-off-by: Matus Halaj <mhalaj@cisco.com>
Change-Id: I1d48c7e44fdf23438132996fd3288b29da1fe36e
2022-10-13 18:23:10 +00:00
Benoît Ganne
70892fcada docs: fix memory traces command
Type: fix

Change-Id: I8fc949da209a5067c702952fbd0e6ce77b921d02
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-10-13 18:05:24 +00:00
Maros Ondrejicka
eeaf6c8973 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
2022-10-13 13:54:25 +00:00
Gabriel Oginski
ce62d6f01c 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
2022-10-12 21:16:54 +00:00
Damjan Marion
65d25b4b16 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>
2022-10-12 17:07:05 +00:00
Damjan Marion
42ed836fbd ip: simpler and faster ip4_full_reass_drop_all
Type: improvement
Change-Id: I4a75583ce718ba6466cd09ca8373fd43988ef62a
Signed-off-by: Damjan Marion <dmarion@me.com>
2022-10-12 16:55:52 +00:00
Damjan Marion
dd298e804a misc: fix issues reported by clang-15
Type: improvement

Change-Id: I3fbbda0378b72843ecd39a7e8592dedc9757793a
Signed-off-by: Damjan Marion <dmarion@me.com>
2022-10-12 16:04:13 +02:00
Laszlo Kiraly
0f8f4351b0 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
2022-10-11 23:21:03 +00:00
Naveen Joy
7498aadd23 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>
2022-10-11 23:19:30 +00:00
Benoît Ganne
6531cf5d1c 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>
2022-10-11 15:13:47 +00:00
Dave Cornejo
91246bc6a2 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>
2022-10-11 14:28:18 +00:00
Huawei LI
06923b33a9 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>
2022-10-11 03:37:36 +00:00
Steven Luong
23b33ec02b 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
2022-10-07 14:01:54 -07:00
Dave Wallace
8a0a9d2600 tests: disable broken wireguard tests on vpp_debug image
Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I3a53d57e42f4c1f5ba0de6d2b181c7f2ad083a3a
2022-10-07 20:00:33 +00:00
Steven Luong
8d97a5cd1c 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
2022-10-07 19:42:26 +00:00
Dave Wallace
14b118b4c7 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
2022-10-07 12:32:33 +00:00
hedi bouattour
b3605eab5a 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>
2022-10-07 04:18:54 +00:00
Damjan Marion
9260b8861e fib: add fib_entry_get_path_list_for_source
Type: improvement
Change-Id: Ie035bebf64226691cffc84484e4bf7310287d1b7
Signed-off-by: Damjan Marion <dmarion@me.com>
2022-10-07 04:17:21 +00:00
Matthew Smith
ba3d5afb92 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
2022-10-07 04:16:36 +00:00
Maros Ondrejicka
6ff8e90ed4 vcl: add api to check if vcl disconnected from vpp
Type: feature
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I98bc108360f9d04a33126865ce49d2702cbe9cdf
2022-10-06 20:32:43 +00:00
Mohsin Kazmi
426f8f239f gso: set the header offsets in gro hdr fixup
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I9d5004f8764b1833e5ca825bc52345e23770c6bc
2022-10-06 16:57:30 +00:00