12086 Commits

Author SHA1 Message Date
Klement Sekera
bb912f2e25 ip: reassembly: add documentation
Type: docs
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I23008cde47d8b7a531346eab02902e2ced18742a
2022-05-10 16:01:25 +00:00
Klement Sekera
e63a2d44d1 ip: fix buffer leaks in reassembly
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I952ba7e042779855e29628d048da7edec1caaafd
2022-05-10 16:01:03 +00:00
Steven Luong
fdc17b1ae7 vhost: memory leak upon deleting vhost-user interface
We allocate vring_spinlock for all vrings in the vui, not just the ones
being used. So when we free the vui, we have to free vring_spinlock for
all vrings, not just the one being used.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I3951fda71ce6e11474b04302116ea9e08b404758
2022-05-09 00:35:48 +00:00
Gabriel Ganne
01f6c73530 devices: fix crash on invalid interface
Type: fix

A simple "create host-interface name xxx" is enough to trigger the bug:
The interface is not found, and we goto error with apif=NULL

Signed-off-by: Gabriel Ganne <gabriel.ganne@gmail.com>
Change-Id: I2f894176d39b3d15efab054dc7340e7a0600a2e8
2022-05-08 14:00:11 +00:00
Xiaoming Jiang
da052b62bd session: fix session cli maybe parse wrong args if executed in files
Type: fix

Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Id19a52df4f237cf5d85d305fdc279ab7df2d6f4b
2022-05-06 17:46:14 +00:00
Damjan Marion
0530d09f9e stats: add vlib_stats_free_string_vector
Type: improvement
Change-Id: Ifa9f908b24b5fe867826601d32eeb4f0d639fbeb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-06 12:15:00 +00:00
Damjan Marion
6d953240bc vppinfra: free vector against its heap
Type: fix
Change-Id: Ie292ee56dd5265a56ef472554aaf086e61da7089
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-06 12:14:32 +00:00
Damjan Marion
4cfb46d4f8 stats: strings in string vector are c strings
Type: fix
Change-Id: I9cf9376f2813f7bceecc6a9d714dcb98df77615d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-06 12:45:11 +02:00
Ting Xu
4ba3c0a8d8 dpdk: fix generic flow input parsing in FDIR
This patch fixes the issue that in DPDK FDIR generic flow parsing, the
inputs will be changed during processing, which will lead to a failure
in vnet flow when creating generic flow rules.

Type: fix

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I107735a305ff48593d66746e0cd642c76ad5700d
2022-05-05 09:27:36 +00:00
Jieqiang Wang
4ebcd95e62 rdma: two small improvements for rdma interface
- fix branch prediction for checking rdma ERROR flag
- add the missing right angle bracket to help message

Type: improvement
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Reviewed-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I2ce667631b3e3f60939069e2a16ddba0ff12a695
2022-05-05 07:04:01 +00:00
Dave Wallace
0499d8839d vat2: fix argument parsing
Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I6d40ce90330d644469937a24eec47ea5bd5b649b
2022-05-05 05:34:19 +00:00
Stanislav Zaikin
e5a3ae0179 policer: output interface policer
Type: improvement

Change-Id: Ibc1b5059ed51c34334340534e9eb68121f556bce
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2022-05-05 00:19:12 +00:00
Benoît Ganne
0ec1c6dc68 udp: remove buggy assert in udp encap
It looks like in a distant past we were using a vnet_rewrite but this
no longer the case.

Type: fix

Change-Id: Ib8d336aec7d5abd7749f543739f531144e76e551
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-05 00:16:27 +00:00
Florin Coras
6e7ebb00af tls: free app session if connect notify refused
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iee6784c37a835b49d962ae6f87c279cbe65dde15
2022-05-04 21:05:11 +00:00
Fahad Naeem
08183d7904 vhost: use_custom_mac set in create_vhost_user_if_v2
Type: fix

set use_custom_mac for args in create_vhost_user_if_v2 API
Add testcase for custom mac-address

Signed-off-by: Fahad Naeem <fahadnaeemkhan@gmail.com>
Change-Id: Iac64d818e0f1e6d36187fe769ee33d202aaafd05
Signed-off-by: Fahad Naeem <fahadnaeemkhan@gmail.com>
2022-05-04 15:18:18 +00:00
Benoît Ganne
98ca76ab87 ipsec: support per next-header next-nodes
Type: feature

Change-Id: I940b6c9d206e407f3e17d66c97233cd658984e61
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-03 21:59:39 +00:00
Klement Sekera
77c821ccc6 tests: handle removed interface
Catch exception if sw_if_index is invalid when querying interface
binding config. If the interface is not there, it's surely not bound to
any table ...

Type: improvement
Change-Id: I1f3e04a631653feb5c2350662b6a041adccefa1f
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2022-05-03 15:07:41 +00:00
Ole Troan
2ca88ff978 vapi: support api clients within vpp process
Add vapi_connect_from_vpp() and vapi_disconnect_from_vpp()
calls to allow API clients from within VPP process.

Add a new memclnt_create version that gives the user a
knob to enable or disable dead client scans (keepalive).

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id0b7bb89308db3a3aed2d3fcbedf4e1282dcd03f
Signed-off-by: Ole Troan <ot@cisco.com>
2022-05-02 16:26:24 +02:00
Jing Peng
6a2868734c dhcp: fix dhcp_compl_event
This patch fixes two problems:

1. The lease field in the dhcp_compl_event message can include a list of
vl_api_domain_server_t structs, but no memory is allocated for it.
2. The DNS server address is not copied properly, resulting in wrong IP4
addresses in the event message.

Type: fix

Signed-off-by: Jing Peng <pj.hades@gmail.com>
Change-Id: I42c533e7af697568c69714011d983f88368a7e15
2022-05-02 06:46:18 +00:00
Damjan Marion
39d88cc0d4 build: use env to find bash path
Type: make
Change-Id: I9f87134ac05d99051888024f889f05dae8e3feec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-29 19:10:24 +02:00
Damjan Marion
16ca1a9856 vppinfra: fix clib_mem_destroy
Passing wrong pointer to clib_mem_vm_unmap...

Type: fix
Change-Id: I1f695d77bc45d9a6de3a4a3da1fbe6faebdad15e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-29 16:02:43 +00:00
Klement Sekera
687cf6faf2 tests: fix handling failed test case
Add missing parameter where required.

Type: fix
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I8cd7c31848836e3233cb79d1dd21884167db4354
2022-04-29 09:58:48 +00:00
Klement Sekera
16ce09db9e tests: fix assert_nothing_captured
Type: fix
Fixes: 26cd0242c95025e0d644db3a80dfe8dee83b6d7a
Change-Id: I9a88221af65f170dc6b1f0dc0992df401e489fa2
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2022-04-29 09:57:47 +00:00
Florin Coras
8eeb851d6f build: remove mbedtls from rpm dependencies
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I50dfed0fba3c8547f5c52998cf777f2ed1d2e4a5
2022-04-28 23:11:42 +00:00
Jon Loeliger
39fdefdc90 wireguard: Document wireguard async mode default
Type: improvement
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Change-Id: I446eb86c097d1bf99f05ee47f1c550689d70ced2
2022-04-28 14:51:50 +00:00
Benoît Ganne
07c73690e9 af_xdp: more meaningful frame_size error message
Type: improvement

Change-Id: If3a83848ae0741334887c654b65e424b99caa73c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-04-28 14:45:22 +00:00
Florin Coras
975e0dfe16 session: fix coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I67f5a2c8902dd14c09472c25599b3b1b493a6948
2022-04-28 14:09:15 +00:00
Renato Botelho do Couto
ed1f9adad7 vapi: Fix build when directory contains @
During build some header guards are created based on full path where
build is happening.  If one directory contains @ character build breaks
because compiler believes it's a macro declaration.

Jenkins adds `@${EXECUTOR_NUMBER}` suffix to workspace directory when
it uses more than one executor for that job, breaking the build.

Replace any @ character on guard name by _ to get it fixed.

Type: fix
Change-Id: Id0f4cfc33fda95e168541aa4e353a0d08aa3b664
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2022-04-27 17:54:50 -03:00
Stanislav Zaikin
3bad8b62d8 linux-cp: sync addr and neigh only for lcp interfaces
Type: fix

Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
Change-Id: I792467b73449074e59c4232b1f82d134c399624c
2022-04-26 21:55:01 +00:00
Daniel Béreš
c69655e3bd libmemif: timer causes spin at 100% cpu
In case of timer is set and expires:
1. timer_fd is readable and stay readable.
2. timer_fd is part of epoll_fd set. This makes epoll_pwait()
   calls return immediately instead of sleeping.

Type: fix

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Change-Id: I9b228464fe45b83def9b182c885d6febf428049c
2022-04-26 15:46:00 +00:00
Ting Xu
b95e6d4e75 flow: enable RSS queue group action for 5G enhancement
Enable the flow action for RSS queue group. Packets can be distributed
among queues in group based on specific fields. Queues must be continous
in the group. This feature is to support 5G enhancement requirement.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I74fdc617659bcb61f00b3b1934c95ab1c73bb8f3
2022-04-26 15:45:07 +00:00
Florin Coras
d82f471a05 session: export session counts to stats segment
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I02aec410eaa7ccb999159b6967414fbaf4e76a3f
2022-04-26 15:10:14 +00:00
Damjan Marion
c5d81b91be stats: string vector and node collector improvements
Type: improvement
Change-Id: Ibdadeb4e685f45a93f45504a84709391489abb6a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-26 10:32:11 +00:00
Damjan Marion
45e0539639 build: add option to build only for native CPU
Significantly reduces compilation time for uses who are interested
to run binaries only on the build machine.

Type: make
Change-Id: I431f6f7374b6dfa8b3f7c72dc69f3d5cafd1f6bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-25 13:49:37 +02:00
Benoît Ganne
4e6222d598 build: fix 16-8-8 mtrie build option
VPP_IP_FIB_MTRIE_16 should be defined only if the option is enabled
instead of being defined as "ON" or "OFF".

Type: fix

Change-Id: Ib4e29a827bcbd84c8012f05ad264c1408ffccee7
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-04-24 13:11:27 +00:00
Florin Coras
a0d5433a6c hsa: vcl test client epoll worker loop
Supports more connections and track connect time. Can be used to measure
CPS. Only works in unidirectional mode for now.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I70bc6a271996407dd16a96115f509bd680a0f302
2022-04-21 18:17:11 -07:00
Florin Coras
94ba931b32 session: fix ctrl evt rpc elt pool realloc
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I79bfe91e81983b619c61a32285d8e038c2654147
2022-04-22 01:05:06 +00:00
Florin Coras
80d100cd59 session svm: fix mq producer wait on q and ring
Make sure producer drops lock when it waits for empty ring slot.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id77d54ee8c01bed20c9eaf5ad372ed4b1e9fa712
2022-04-21 16:48:15 +00:00
Ole Troan
5297447bd6 nat: tweak rfc7857 tcp connection tracking
The RFC7857 state machine introduced in 56c492a is a trade-off.
It tries to retain sessions as much as possible and also offers
some protection against spurious RST by re-establishing sessions if data
is received after the RST. From experience in the wild, this algorithm is
a little too liberal, as it leaves too many spurious established sessions
in the session table.

E.g. a oberserved pattern is:
client      server
         <- FIN, ACK
ACK      ->
ACK      ->
RST, ACK ->

With the current state machine this would leave the session in established state.

These proposed changes do:
 - require 3-way handshake to establish session.
   (current requires only to see SYNs from both sides)
 - RST will move session to transitory without recovery if data is sent after
 - Only a single FIN is needed to move to transitory

Fixes: 56c492aa0502751de2dd9d890096a82c5f04776d
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I92e593e00b2efe48d04997642d85bd59e0eaa2ea
Signed-off-by: Ole Troan <ot@cisco.com>
2022-04-21 10:35:58 +00:00
Mohsin Kazmi
e0c875551f devices: remove redundant access in af-packet input
Type: fix

current_data is set to 0 for each packet in af-packet input node.
It is not required to include it to calculate the headers offset.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I538d8c04e24c758155b3f8d6a1532472ef549459
2022-04-19 12:39:12 +00:00
Florin Coras
8c2bdf8619 session: add support for listen proxies
Listener proxies are allowed to listen on IPs that are not local.
Configurable only by builtin apps for now.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb380ee3584a088878a03d45fd85e7bb0deeb590
2022-04-18 21:19:24 +00:00
Alexander Skorichenko
1afa2b62ce nat: fix deleting nat ei out interface feature
Type: fix

Set is_add function argument to 0 when deleting interface role.

Change-Id: I6ca88d6511e1c88285e51b3750eb501fde2b341b
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2022-04-18 19:28:17 +00:00
Florin Coras
66d6146ad5 rpm-packaging: remove mbedtls dependency
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf325b7f1ce75e973dbea4d5836609590c85dc38
2022-04-18 16:22:15 +00:00
Florin Coras
515aa75112 hsa: vcl test client allow non-blocking connects
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If7dd56e76efc31ed66b865e2c7231d22ec2322b4
2022-04-16 11:03:23 -07:00
Florin Coras
9fda33da5c hsa: support configurable vcl client wrk loop
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5e49f43b18ff011ce0b7259ed58854d81f910826
2022-04-15 17:53:52 +00:00
Damjan Marion
4b922ff051 stats: store heap in the directory_entry vector
Type: improvement
Change-Id: I878803d14d1070ef5a00ed9d3f72022906d55191
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-15 17:53:11 +00:00
Damjan Marion
8cb5d36c7e build: c compiler version warnings
Type: make
Change-Id: I9455da47f03383df822436d1adc4c4b5e58c7cf9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-15 17:52:43 +00:00
Andrew Yourtchenko
105cb1e4cf api: fix infinite loop in show api dump CLI
The following illustrates the problem:

./build-root/install-vpp_debug-native/vpp/bin/vpp api-trace { on } unix { cli-listen /tmp/vpp-api-cli.sock } plugins { plugin dpdk_plugin.so { disable } }
sleep 5
./build-root/install-vpp_debug-native/vpp/bin/vppctl -s /tmp/vpp-api-cli.sock show version
./build-root/install-vpp_debug-native/vpp/bin/vppctl -s /tmp/vpp-api-cli.sock show api dump file /tmp/api-table.master-api-baseline compare

The last CLI hangs in an infinite loop.

Fix the typo which got in during the conversion of _vec_len to read-only:

.@@ -1285,7 +1285,7 @@ extract_name (u8 * s)
.   rv = vec_dup (s);
.
.   while (vec_len (rv) && rv[vec_len (rv)] != '_')
.-    _vec_len (rv)--;
.+    vec_dec_len (rv, 0);
.

Type: fix
Fixes: 8bea589cfe0fca1a6f560e16ca66a4cf199041a2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I4f895348ae0ebaaba9da97c3a440912d38210f10
2022-04-15 15:46:57 +00:00
Benoît Ganne
8b153de6cd vlib: disable cpu pinning if not configured
In some environment like when running a lot of functional tests, it can
be useful to run more VPP instances than CPU and let the Linux scheduler
decide what to do. This change disable cpu pinning altogether in the
single-threaded case, provided that no main-core is explicitely
specified in the config

Type: improvement

Change-Id: I8c2f36fdd49c00f9adaaeb4c81aefb27c3420a9b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2022-04-14 19:20:43 +00:00
Leung Lai Yung
aad4298df0 gtpu: fix memory leak
Type: fix

Free the old rewrite string before assigning a new rewrite string for the updated new tteid value.

Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com>
Change-Id: I1ec19bce6afda3dfdc31c8724b32ac7b9bc84e89
2022-04-14 17:56:09 +00:00