Compare commits

...

792 Commits

Author SHA1 Message Date
Andrew Yourtchenko
b91e15387d misc: Initial changes for stable/2410 branch
Type: docs
Change-Id: I08effaf1b16c2372b4883cf9c9cc5c4a441efe37
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-25 12:18:19 +02:00
Stanislav Zaikin
43b6ff39ae ipsec: cleanup tun protect on interface removal
when a protected tunnel gets deleted it's necessary to run a proper
cleanup

Type: fix

Change-Id: I9d2c60ecbf97c4df299ac5c2228b036bf3478a56
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-09-24 14:17:38 +02:00
Alok Mishra
53239b45ca octeon: enable ethernet pause frame support
This patch adds support for MAC pause flow control.
By default, pause flow control is enabled in the device
configuration.

Type: feature

Signed-off-by: Alok Mishra <almishra@marvell.com>
Change-Id: I0f448479a38fae615d87af7e736c6053ada89cca
2024-09-24 10:18:05 +00:00
Monendra Singh Kushwaha
156694162c octeon: fix error handling for packet with error
Type: fix

Change-Id: Ieb97f1526939bcd732c155d3a7535dca71971258
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-09-24 10:16:49 +00:00
Monendra Singh Kushwaha
02598d7c0c octeon: fix SDP device link information
This patch fixes SDP (System DPI Packet Interface Unit)
device link information.

Type: fix

Change-Id: I4563094601d9bb24132e4dc712cde14daa7f4364
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-09-24 10:15:42 +00:00
XiaomingJiang
bf0a6f8876 http_static: fix memory hss_session using after be freed
Type: fix

Change-Id: Ic3d3de4198310361de876a8224e4f7cd0b48b698
Signed-off-by: XiaomingJiang <jiangxiaoming@outlook.com>
2024-09-23 16:42:40 +08:00
Dave Wallace
0ef24297ec build: archive make install-ext-deps build logs in ci
- also add build/external artifacts to .gitignore file

Type: make

Change-Id: I9c8f4a312bbfddfa8024531e7246518c8c3589a4
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-09-20 20:37:23 +00:00
Florin Coras
6126ec9c53 udp: node counter for connected sessions
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4c0c1b27adb3e3ea3c3ff6353b068447db19fa85
2024-09-20 16:20:56 +00:00
Matus Fabian
05f7137389 hs-test: proxy testing improvements
- nginx and curl timeouts are extended if debug flag is set
- added write-out for curl (outputs extra info after transfer is done)

Type: test

Change-Id: I3f6c336a14cd00b9ae8669d2fa26e00709162100
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-20 16:06:17 +00:00
Matus Fabian
147585e7f6 hs-test: debugging utility methods
Type: test

Change-Id: I0c7e8424e53f1ad1896cd8439027e6081ccfeb28
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-20 10:44:08 +02:00
Andrew Yourtchenko
2fb8d2f96d pvti: remove clib_warning at init time
Type: fix
Change-Id: I62ccd96ea3549205510ff53118eab1fa3613d009
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-19 14:32:09 +00:00
Andrew Yourtchenko
33e1243a4c l2: fix DVR test failure on AWS Graviton on Ubuntu 22.04
The AWS Graviton make test fails in dvr_test.py on Ubuntu 22.04,
due to a mismatching source MAC address. Debian 11 tests run fine.

The following can be seen in the log.txt trace:

00:00:00:756422: ethernet-input
  frame: flags 0x1, hw-if-index 3, sw-if-index 3
  IP4: 02:03:00:00:ff:02 -> de:ad:00:00:00:00 802.1q vlan 92
00:00:00:756435: l2-input
  l2-input: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:ff:02 [l2-input-vtr l2-learn l2-fwd l2-flood l2-flood ]
00:00:00:756438: l2-input-vtr
  l2-input-vtr: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:00:00 data 08 00 45 00 00 80 00 01 00 00 40 11
00:00:00:756441: l2-learn
  l2-learn: sw_if_index 6 dst de:ad:00:00:00:00 src 02:03:00:00:00:00 bd_index 1

Note how l2-input-vtr node has the two lowest bytes of the source MAC corrupted.

Discussing with Benoit, since this could be caused by unaligned memory accesses,
using clib_memcpy_fast.

Type: fix
Change-Id: I28991e1166335df0edd1e4b84fa72a2b1d0bb9bf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-19 14:31:36 +00:00
Adrian Villin
3ecd6840af hs-test: containerize iperf tests
Type: test

Change-Id: I2c0bb76d96ccadd5ecfd6a04565420855043699e
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-18 18:09:44 +00:00
Monendra Singh Kushwaha
0950830ee9 octeon: fix compilation on octeon9
Type: fix

Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: I9ffa78122dcd6b98cad9902e43ba8432fcd572b1
2024-09-18 15:07:00 +05:30
Aritra Basu
70d2a08e7e vcl: add http support to vcl_test_protos
Type: improvement

Change-Id: Ibb493f1d7713d0e10b8bd1d5ff17b89967b53b8a
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-17 15:59:00 +00:00
Andrew Yourtchenko
0acb398d6d pvti: Packet Vector Tunnel Interface
This plugin implements a PoC of UDP-based tunnel substrate whose aim is
to specifically provide higher MTU to the upper layers by chunking
the payload PDUs into smaller packets with full 5-tuple.

At the same time, if there are multiple small packets to
the same destination during the vector processing, they
are packed into "carrier" packets up to underlay MTU size.

It does assume a trustworthy underlying medium, thus for the
operation over Internet it requires the use of encryption layer
underneath.

Type: feature
Change-Id: I323958fa8de62584f6ed15643ea689568a9a62bc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-09-17 12:10:19 +00:00
Kai Ji
6ccfc3991d dpdk: bump to DPDK 24.07 and RDMA 52.0
This patch bumps DPDK version to 24.07 and RDMA version
per dpdk 24.07 release notes (rdma-core >= 52.0)

Type: feature
Change-Id: I07c6f27becdbcd3696b821bbfd145610775cf51e
Signed-off-by: Kai Ji <kai.ji@intel.com>
2024-09-16 15:24:38 +00:00
Florin Coras
430cccf2e5 session: improve sh session cli
Add support for:
- "sh session verbose thread <n> [lcl|rmt|ep] <ip>[:port]", which can be
used to filter sessions based on transport ip:port
- "force-print" option to force printing even when it exceeds existing
printing thresholds

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iab3e58b8162664b425379d14818b8a4daa0ce345
2024-09-14 00:27:53 +00:00
Aritra Basu
6f45f5465f http: update body_len from u32 to u64
Type: improvement

Change-Id: I381541fb180d6d6ba42e4d231d22a73c5d33ef65
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-13 21:22:10 +00:00
Matus Fabian
6fbe913e45 hsa: fix proxy ao connect
Make sure that proxy server doesn't try to open connection to the
target multiple times. When client is uploading huge amount of data
it might happen that proxy_rx_callback is called again before
connection to the target is established.

Type: fix
Change-Id: I4d272d37bc545f6f8790a115c8d26bcf3ea84f22
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-13 16:22:27 +02:00
Ole Troan
9a3f387c30 vppapigen: endian generation for vla for non u32
The endian function for VLAs assumed length field to be of type u32.
That failed for APIs using different integer width.

Type: fix
Change-Id: I6ecaabb4563c8bafeb100a4c6c1eee9a08e6cabf
Signed-off-by: Ole Troan <otroan@employees.org>
2024-09-12 12:56:56 +00:00
Mohammed Hawari
3b5a013103 vlib: introduce lazy next node initialization
This change allow a node registration A to name a next node B that does not
exist yet at registration time. When node B is effectively created,
vlib_node_main_lazy_next_update need to be called so that the vlib graph
is updated accordingly. To enable this behavior, node A needs to bear
the new VLIB_NODE_FLAG_ALLOW_LAZY_NEXT_NODES.

Change-Id: I561d3a0de19a0b7bd1045760a2ba8e27d27caa9a
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2024-09-12 10:11:30 +00:00
Florin Coras
47968438dc hsa: fix proxy ao tx callback
Reuse existing proxy_force_ack for active open tx callback. This makes
sure proxy session is tcp (as opposed to tls) and also makes sure the
ack is sent from the thread that owns the proxy session.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9692fa2c4feefd3db701f9449a35495cf7b3d9dc
2024-09-11 15:09:40 +00:00
Dave Wallace
a8766ce2d3 vlib: fix gcc 13.2.0 build failure on ubuntu 24.04
Type: fix

Change-Id: I007d73d28633677395d4eb81534dbe2307b1a96f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-09-11 14:34:34 +00:00
Matus Fabian
5b175eca2d hs-test: upload via proxy tests
Type: test
Change-Id: Id6b4e2348735081c827f814a814c976b601432ec
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-10 16:35:23 +00:00
Matus Fabian
6e129e3a45 hsa: http_tps coverity fix
Type: fix
Change-Id: Iea00a03dc94dfd6d1f0532e629d2f3b38cb26c07
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-10 10:20:11 +02:00
Adrian Villin
540842835f http: fixed missing static keyword
Type: improvement

Change-Id: Id7a16388a72fc5de5848f3fec7a6dbeb6188f913
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-09 17:24:32 +00:00
Damjan Marion
4e51841896 armada: introduce dev_armada plugin
Also retires old marvell plugin.

Change-Id: Icedec11f5661909058fdfe8d5fc455306adafacd
Type: feature
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-09-09 14:43:22 +00:00
Garvit
1f7d14c810 ipsec: remove redundant code in ipsec_tun_in trace
This patch removes redundant sa index value in
format_ipsec_tun_protect_input_trace() as sa index value already added
by format_ipsec4_tunnel_kv().

Type: fix

Change-Id: I7834bda57ba0f7cfe5084b671f6f7da0749ba64d
Signed-off-by: Garvit <gvarshney@marvell.com>
2024-09-09 12:56:10 +00:00
Mohsin Kazmi
460dee56e7 dpdk: add support to disable interrupt mode
Type: improvement

Change-Id: I4864dc2af808aa76ecbc9ade0e86e1a781e6b704
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-09-09 08:45:15 +00:00
Matus Fabian
9bb0762357 http: large POST handling
Type: improvement
Change-Id: I28b8e8ccbff6f97e669b0048011b187decbfc892
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-08 22:41:27 +00:00
Steven Luong
c4b5d10115 session: add Source Deny List
With this feature, session enable is now modified to have 3 modes of operation
session enable -- only enable session
session enable rt-backend sdl -- enable session with sdl
session enable rt-backend rule-table -- enable session with rule-table

session rule tables are now created on demand, upon adding first rule
to the rule table.

refactor session table to remove depenency from sesssion rules table. Now
session rules table APIs take srtg_handle and transport
proto instead of srt pointer.

Type: feature

Change-Id: Idde6a9b2f46b29bb931f9039636562575572aa14
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-09-06 18:26:56 +00:00
Stanislav Zaikin
2a5bb3b5ab linux-cp: auto select tap id when creating lcp pair
Now when lcp pair is created, tap instance is based on hw_id. But tap
interface with such instance can already exist. Introduce an offset and
auto-selection based on it.

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I9db39106b0b0d5bf95c445b03e5b7ff52f946dd2
2024-09-06 14:09:48 +00:00
Scott Hutton
4779154a26 flowprobe: run input nodes before inacl nodes
Type: fix

The flowprobe-input-ip4 node must be run ahead of ip4-inacl in some scenarios
to ensure that it sees flows on receiving interfaces.

The same is presumably the case for flowprobe-input-ip6, but this hasn't been
tested/observed.

JIRA: VPP-2122

Change-Id: Idf3b14dd2bd829f9aa3b1a71ccdcdf015ccdb36a
Signed-off-by: Scott Hutton <schutton@cisco.com>
2024-09-05 15:06:06 +00:00
Damjan Marion
f508e07c14 dev: add platform bus and devicetree support
Change-Id: Ief8e159b25d4fc4859c7116da6ff22c15bd3fff0
Type: feature
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-09-05 11:42:57 +00:00
Ole Troan
222ff2beaf api: fix endian issue for api trace save-json
Type: fix
Fixes: 1a319aadc68c218f741a7cb23acbe70c4addae92
Change-Id: I471e61176fc52421cf91e7989185755fb0355158
Signed-off-by: Ole Troan <otroan@employees.org>
2024-09-05 11:40:06 +00:00
Mohamed Feroz
88c836c267 vcl: fix vcl issue in multi-thread-workers mode
In some multi-process/thread applications, a connection FD
is created on main process and actual data processing is done
in worker process. The main process does nothing. For such
applications, when multi-thread-workers is enabled, in current
VLS code, the session events are still enqueued to the VCL
worker corresponding to Main process. As the main process is
not dequeuing any event, application doesn't move forward.
This patch fixes this issue by enabling VCL worker
corresponding to the Worker process as listener of the session.

Type: improvement

Signed-off-by: Mohamed Feroz <mabdulmajeet@marvell.com>
Change-Id: Ia7e6270c1acbce7feeafbf281c661285d63c3b22
2024-09-04 17:57:34 +00:00
Vratko Polak
2f76b57280 iavf: fully support off-by-one driver behavior
Previously, iavf_port_add_del_eth_addr was not using large enough buffer
and address sanitizer does not allow that.

Type: fix

Change-Id: Icd1491fb5651aed20685d15224e9c725347ef369
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2024-09-03 16:37:49 +02:00
Aritra Basu
f0e81d247b vcl: add support to write segments
Type: improvement

Change-Id: Icfdaed6b70b83668127656930afcb4ac3c63b234
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-08-29 13:51:05 -07:00
Steven Luong
e9bc332019 virtio: RSS support
Add RSS support to make use of multiple queues.

With 4 RX queues and RSS enabled

ping from host	to guest vm ip	queue use
192.168.2.3	192.168.2.1	2
''		192.168.2.10	0
''		192.168.2.5	1
''		192.168.2.105	3

With 4 RX queues and RSS disabled, queue 0 is always used for all of the above cases

Type: improvement

Change-Id: I3ca78fd83fce26cbe8f23fee0a9034cb572bacb7
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-08-29 12:41:30 +00:00
Damjan Marion
fc49c63e74 build: add Marvell CN913x platform
Change-Id: If16b073ddf204676c3ef410ba76d289e25e376d8
Type: feature
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-08-29 11:49:12 +00:00
Dau Do
b8d4490d9c avf: add num tx/rx packets per queue
Type: improvement
Change-Id: I3459dba86eb7a784448633b69492d6d3f49db720
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-08-29 03:06:34 -07:00
Lukas Stockner
b4808de247 buffers: support disabling allocation per numa domain
Currently, the per-numa buffer allocation doesn't support skipping the
allocation altogether for a particular NUMA domain - if it's set to
zero, it instead uses the default allocation.

Therefore, this changes the behavior so that the default is only used
if no per-numa allocation is specified, and an allocation of zero
is honored by not allocating a buffer at all.

Type: improvement
Change-Id: Ie9133b179a88eb884aa3da921e65292daea0df2d
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
2024-08-29 08:40:34 +00:00
Sriram Vatala
ff17350ae0 octeon: use proper refs for roc item spec and mask
vnet flow enable is failing due to bogus bytes pointed by spec, mask
variables of roc_npc_flow_item structure. Using reference to local
variables defined in block scope is causing this. Moving the variable
declarations to function block scope fixes this issue.

Fixes: 064762e20

Type: fix

Signed-off-by: Sriram Vatala <svatala@marvell.com>
Change-Id: I3904199b5b2bd88cd02ada5604059ab6fd12eef7
2024-08-29 08:38:22 +00:00
Tom Jones
828353fa5f vppinfra: Use affinity for online cpus on FreeBSD
On FreeBSD the affinity returned by cpuset gives us a bitmask
documenting the available cpus. This can be modified if we are jailed or
are launched via the cpuset(1) command.

Initialise the clib bitmask otherwise it is always 0 and we cannot
configure any workers.

Type: improvement
Change-Id: I067e373ea440c6fbd03839d1cf103c8b97d8a0c6
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-08-29 08:36:25 +00:00
Mohammed Hawari
d726f6a999 crypto-native: aes_cbc_encrypt in vppinfra
Change-Id: Ibafa51f5fc98674d30e8758a0f9cc361c8b5c0fc
Type: refactor
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2024-08-29 08:34:59 +00:00
Benoît Ganne
51ca1ea2a6 ip6: fix error in ip6_input_check
Type: fix

Change-Id: Ibe8ee27484c3b7b920529fd082b1e46b7daef1e5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-08-28 15:41:50 +00:00
Matus Fabian
61409d2df6 hsa: http_cli coverity fix
Type: fix
Change-Id: I23c55e6be08cc02332da9375d2eb19b74b79427c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28 15:41:26 +00:00
Matus Fabian
dac6888244 http: http_send_data cleanup
removed unused parameter offset

Type: improvement
Change-Id: I30cde713731555fb2eb305c303369c1ead4d3783
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28 15:41:03 +00:00
Damjan Marion
82aa9a6301 interface: do not update runtime data if input node is not set
Type: improvement
Change-Id: Id81d1ac23505a74d3bc6f5d7eddca2be20d39f45
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-08-28 13:07:41 +02:00
Matus Fabian
56cefc89e2 http: http_state_wait_app_reply improvement
set http status according to whether app also sent the body

Type: improvement
Change-Id: Ia41603cc21b410ca6929ec3d3e7c4c6808305769
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28 06:08:04 +00:00
Adrian Villin
d01a63abd4 hs-test: added a redis-benchmark test
- basically a copy of LdpIperf test
- small update of LdpIperf test
- new LDP suite

Type: test

Change-Id: I3f8653288c6fc6dfd6a061315e983c000974d3ff
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-27 19:05:36 +00:00
Matus Fabian
a647a83496 hs-test: http tests improvement
- added http specific asserts
- added helper functions to NoTopoSuite

Type: test
Change-Id: I0a7e77ed3ffd938aa3eaa37ed5432fbaab0dab64
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-26 18:03:31 +02:00
Matus Fabian
62b508b396 hs-test: failed summary fix
Remove failed-summary.log from the previous run, otherwise it might be
displayed if all tests pass.

Type: test
Change-Id: I435de37e298105ed5b92012fe4da3cda3a0670b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-26 11:59:16 +02:00
Matus Fabian
69123a3f67 http: status line parsing fix
Request line must only start with method name and server should
ignore at least one empty line (CRLF) received prior to the
request-line.

Type: fix
Change-Id: Ifebd992dc4c13df1a3fabfcdef9e7ee644150a21
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 17:59:46 +00:00
Matus Fabian
4306a3e8f4 hs-test: core dump improvement
- load vpp plugin libraries path in gdb
- if core dump deceted change message in summary and show bt

Type: test
Change-Id: If5d44d29703edd16c816efc9d29e6a7a1b20613a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 15:52:54 +02:00
Matus Fabian
225e6f86a4 hs-test: assert improvement
Use ExpectWithOffset so Ginkgo's output point to the line in your test.

Type: test
Change-Id: Icb32c5be683f935a5e86f25c2ec5a6dfad2ec1ea
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 05:56:33 +00:00
Dave Wallace
c47d7ad721 sr: fix gcc 13.2.0 build errors on ubuntu 24.04
Type: fix

Change-Id: I3ea7664c9f2cd1deaa6721bfd31214fe27f21468
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-22 15:46:41 -04:00
Adrian Villin
399d44074b hs-test: fix incorrect exit status
- exit status was incorrect when tests didn't compile
- better summary formatting
- removed "full stack trace: null" from summary when a test times out

Type: test

Change-Id: Idd6b6bf3429fc8b704dd2345d257e9bdce1b82b7
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-22 11:53:13 +00:00
Matus Fabian
56f5bd9985 hs-test: fix after merge
Type: test
Change-Id: I2a1d35a9e7a6c8e8026388a0baacbc18310f0ba1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 11:40:10 +00:00
Hadi Rayan Al-Sandid
8629336fa5 misc: move osi to plugin
Type: refactor

This patch moves osi into a plugin, and also modifies
the init functions of llc and snap to preserve init
order dependency (llc_init --> osi_init --> snap_init).

While the initial intent was to move osi/llc/snap together
into a single plugin, there exists a dependency on llc
in vnet/ethernet, which would require further refactoring
and testing work.

Change-Id: Ic0eff030ee29c8d316c0e0fe13931451aa193527
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-08-22 08:00:52 +00:00
Dave Wallace
85ce93160f tests: fix make test python issues on ubuntu 24.04
- add patch to scapy to use latest six module instead
  of the old scapy specific six module which fails to
  import moves sub-module on python 3.12
- fix warning for deprecated legacy editable install of vpp_papi
- skip failing testcases on ubuntu-24.04

Type: test

Change-Id: Idc1a008c6e45ba69caa50c2e245012eb05effed7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-22 07:35:40 +00:00
Matus Fabian
7301abe9ba hs-test: nginx proxy/mirroring test cleanup
- test moved to proxy_test.go
- topology and suite updated to be vpp/envoy proxy compliant

Type: test
Change-Id: Iabee50b76bb8d96851f831c0b57d0e98dc4b3a5f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 07:08:20 +00:00
Adrian Villin
7e6606ab4e http_static: added last-modified header
Type: improvement

Change-Id: I492df92ef25f9c0cd57fc8980500b58bebaa94c6
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-22 06:09:43 +00:00
Matus Fabian
8792e5c5c5 hs-test: proxy testing improvement
- new container topologies and suites for VPP proxy and Envoy proxy
- removed build docker image since it can't be used with CI cache
  builder, container builders are designed to be stateless, they
  only preserve build-cache, but not images

Type: test
Change-Id: I93e4d079780d18d6aa3b5ce807adc4707b6f2d9b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 03:25:19 +00:00
Adrian Villin
58cb6ba818 hs-test: fix vppinstance logs and disable trace
- fixed a bug where vppinstance logs would concatenate -> each test now
  has its own bind mount
- removed "--trace" flag to avoid skipped tests printing a full
  stack trace. They are now only printed in the summary.

Type: test

Change-Id: Ib7f4254717cc798e456b9fca6f81685c8153ee2d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-21 15:38:19 +00:00
Adrian Villin
4995d0da8c hs-test: generate core dump, fix docker logs in CI
Type: test

Change-Id: Ie1f66cdc061d3eccefc2ce58e977d88a33340038
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-21 15:38:19 +00:00
Guillaume Solignac
fb9dd88809 vppinfra: cleaner way of getting libdl in CMake
Cmake has a dedicated CMAKE_DL_LIBS variable to get libdl; use it
instead of trying to find it manually.

Type: improvement
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I9969c6be029f6a6e09cccaecd50e9eaf7d785b34
2024-08-21 12:05:27 +00:00
Tom Jones
df87789a2a dpdk: Move file-prefix flag processing into linux only block
Type: improvement
Change-Id: I01a228618db72f8db4e439c6ad636defe79a695a
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-08-21 12:03:49 +00:00
Alok Mishra
f7f26e5b32 octeon: add support for max_rx_frame_size update
This patch adds capability to update max_rx_frame_size on octeon
port.
Initial MTU value is being set in the "oct_port_start", which is
invoked every time the Ethernet interface is brought up, thus
overwriting any MTU value set by VPP CLI.
Moved the MTU initialization to "oct_port_init" to address this.

Type: feature

Change-Id: I00d0d52bc7711062cde47b8fe52e6823bb718d08
Signed-off-by: Alok Mishra <almishra@marvell.com>
2024-08-21 11:54:29 +00:00
Monendra Singh Kushwaha
e00ce39714 octeon: enable tx checksum offload capability
This patch enables tx checksum offload and sets correct l3/l4 offset.

Type: feature

Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: I666f4000cb51c4979567a52255377dbe15ffb202
2024-08-21 11:53:36 +00:00
Monendra Singh Kushwaha
9b6df541e5 octeon: sync mac address to cgx/rpm table
This patch syncs mac address to cgx/rpm table at initialization,
which sets interface in unicast mode.

Type: fix

Change-Id: Icf64b91ce5c74cc399cad3d3358b951fb2a65297
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-08-21 11:52:55 +00:00
Adrian Villin
1fb7ae3440 vppinfra: fix format_clib_timebase_time
- make the format RFC9110 compliant

Type: fix

Change-Id: I4272562ca1082285a596ef866ab6c4f405c64bc5
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20 20:37:24 +00:00
Adrian Villin
86fa943725 http_static: make max-age configurable
Type: improvement

Change-Id: I629add6e3f4219d56610c3785013f69dbe847844
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20 18:19:12 +00:00
Adrian Villin
3601b322a0 http: make Media Types RFC9110 compliant
- https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type
  https://www.iana.org/assignments/media-types/media-types.xhtml

Type: improvement

Change-Id: I2624dc39a985ff3999aed6e1c833220b7049828d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-19 14:47:25 +02:00
Matus Fabian
5546755d1a http: http_read_message improvement
Use svm_fifo_peek in http_read_message and advance rx fifo head by
amount of bytes send to app, since not always you won't or can't
send all bytes.

Type: improvement
Change-Id: I84348c9df5c77ba386c9738a754295bb9ea0f7ef
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-16 13:36:34 +02:00
Florin Coras
f02e746785 tls: add basic tls record parsers
Type: improvement

Change-Id: Ia6a9f69b787950e3dbffd13ae577e499d6d2f55f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-08-13 22:42:31 -07:00
Steven Luong
3dd81c0e4a session: problem in session_rules_details API
Backend needs to return protocol to indicate if the prefix is ip4 or ip6.

Type: fix

Change-Id: If827c2e8b2a58051298968fa4d69de71ce9c4fcc
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-08-13 17:41:23 +00:00
Matus Fabian
d58177c50b http: authority-form target parsing/serializing
Type: improvement
Change-Id: Ifb90818a3526d3d4030a66b1ef7eebedfe97978f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-09 20:08:59 +00:00
Benoît Ganne
0ce93ae744 tests: fix scapy 2.4.5 IPsec patch for AH + ESN
Type: fix

Change-Id: Ifac0e2aca83fa2a79b65d8d1a40add02051287d2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-08-08 10:22:01 +02:00
Benoît Ganne
d13b61171b tests: fix ipv6 fragmented esp w/ scapy 2.4.5
Since scapy 2.4.4, scapy will not decode the next layer if the fragment
offset is not 0 - IOW it will decode only for the 1st fragment.
See f1c26e77c5

Type: fix

Change-Id: If738734f90b15b24c0d98fec4bce4ff48c6d5fea
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-08-07 13:18:47 +00:00
Stanislav Zaikin
0f2c6cd1ab ikev2: handoff packets
current approach saves state in per-thread data structure. in
multi-worker + nat-t cases udp/500 and udp/4500 might be dispatched on
different workers. this patch adds hands off packet to 1 explicit thread
- 1st worker (or main thread in case there're no workers) or to thread
  that was explicitly set by user via configuration

Type: improvement

Change-Id: Ib5cd9a4b8612dfaa63b276035709524f7a492d4f
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-08-07 12:07:13 +00:00
Ole Troan
9aa833b144 vppapigen: ensure address types are nul terminated
A string generated from format() may not be nul terminated.

Type: fix
Change-Id: I88452e446c3504d70758e9009c65be5466034d92
Signed-off-by: Ole Troan <otroan@employees.org>
2024-08-07 11:46:51 +00:00
Stanislav Zaikin
fa7b7a41e7 ikev2: fix BN_bn2bin re-allocation
the former code was re-allocating the vector when padding takes place.
it's not necessary since we have the correct size. also, it caused
issues since upper layer doesn't know about re-allocation and it caused
crash. with this patch many test-cases are enabled again.

Type: fix

Change-Id: Idf0b320101670ec64d62e9aac6399cc7c54c996f
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-08-07 10:12:22 +00:00
Dave Wallace
cf9356d642 tests: update scapy to version 2.4.5
- Required for Ubuntu 24.04 LTS jobs
- temporarily disable TestIpsecEsp1 and
  TestIpsecAhAll tests until a patch can
  be added to fix them

Type: test

Change-Id: I1ae7b170117182c3252629bbbb770775e2c496c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-07 09:15:17 +00:00
Steven Luong
0a3b0b231d session: memory leak in show session rules
Need to vec_free ns_id whenever we return in the function
show_session_rules_command_fn in case memory was allocated to it.

Type: fix

Change-Id: Ifc38d3eb2756a8a128467dd40ad40fe3f0be8fc0
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-08-06 13:30:31 -07:00
Matus Fabian
d46e674abc http: client POST method
Type: improvement

Change-Id: Iaa70abcee02866f9a6426a6e8e4709eeba0e8114
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-06 16:01:02 +00:00
Steven Luong
fc3464dac9 session: session_lookup_local_endpoint returns the wrong value
SESSION_INVALID_INDEX is u32. The function is supposed to return u64.
The caller of the function tests the return value to see if it is
SESSION_INVALID_HANDLE in ct_session_connect. If it is not, it
thinks it is a valid handle and calls listen_session_get_from_handle
which causes a crash.

Type: fix

Change-Id: I4ede6b2dfb95259f3a6071cfa3a77ce0d9cd9edd
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-08-06 15:52:35 +00:00
Maxime Peim
26a6b19a0e vlib: add 'exit' as alias to 'quit'
Type: improvement
Change-Id: I099739a246dbdb6fdca136d06bc8e4b3f493a839
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-08-06 13:38:27 +00:00
Matus Fabian
a67da25008 http_static: web app doc update
Type: docs
Change-Id: I0d3395c1de51c086b2ac68cd92c97efe36665b62
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-01 22:13:46 +00:00
Aritra Basu
119cbf2651 vcl: handle EINTR in epoll_wait calls
Type: improvement

Change-Id: I71a987b8871988d38e4a752c7f93f52a27bce6a3
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-08-01 22:06:37 +00:00
Aritra Basu
80a16d134e tcp: add establish timer pops to stats
Type: improvement

Change-Id: Ibc1e391356cef415b992b65c00f3d365fc97386d
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-08-01 11:46:59 -07:00
Matus Fabian
519983b44d misc: remove deprecated builtinurl plugin
Plugin code is incorporated in http_static plugin for longer time.

Type: refactor
Change-Id: Ib74adb2a79d3ee715bbc994d77bc7718faf7184f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-01 16:02:14 +02:00
Ole Troan
01ea72bc49 ip6: set buffer->error in ip6_input_check
When packets are dropped and this field is not set, then
trace shows the packet being dropped by the null-node instead
of the correct reason.

Type: fix
Change-Id: I3ed9186285d0db7fa6a1e5b739a28ee625968f30
Signed-off-by: Ole Troan <otroan@employees.org>
2024-07-31 13:40:11 +00:00
Ole Troan
f726ebd174 npt66: replace clib_warnings() with error counters
Replace clib_warnings() in the forwarding path with
error counters.

Change-Id: Ie679d940f056eeddeb8a032c77fe9c2195490cfc
Signed-off-by: Ole Troan <otroan@employees.org>
Type: fix
Signed-off-by: Ole Troan <otroan@employees.org>
2024-07-31 12:24:11 +02:00
Aritra Basu
4a65e0166b tcp: fix typo in show tcp config CLI command
Type: fix

Change-Id: I844539af3a283c8ec12498dbfd4857b8b533d7c1
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-07-29 10:59:12 -07:00
Matus Fabian
a330856f73 hs-test: disable color output only in CI
Type: test
Change-Id: I2ca7c8e714996b1badb59253b9b856fc623ab0c3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 16:02:13 +00:00
Matus Fabian
d464338c19 hs-test: save VPP logs with timestamps
Type: test

Change-Id: Ia76d23a8d57dfb5570eaf44a9fdb3eabeba01a4d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 16:01:24 +00:00
Matus Fabian
ba9ea13e26 http: client code improvement
Client app can sends request target, custom header and body to
HTTP layer. In response it receives all bytes as received from
transport, aditionally we provide offset and length of headers
and body.
In addtion client app is now able to receive response with all
status codes and Host header field is set in request at protocol
layer.

Type: improvement

Change-Id: I8c8e2c8f99cdf500126b7c2c722aebc254aa0d9f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 14:21:12 +02:00
Aritra Basu
dd4356dc97 tcp: CLI command to print tcp_cfg
Type: improvement

Change-Id: Ie8f6ddc96fd3f5d44827ace834f8f6baa330d37d
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-07-27 00:40:57 +00:00
Aritra Basu
e30f7122b7 tcp: improve tcp listener CLI
Type: improvement

Change-Id: I11dc43bdf65cecfa5c48ac734a4727b377023c80
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-07-26 15:13:27 -07:00
Adrian Villin
6a8f26c3ab hs-test: fix docker warning message
Type: test

Change-Id: I156b6d9e0759bc7d324ac7d618a195ee5803ca75
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-25 13:17:31 +02:00
Adrian Villin
007be4fa7f hs-test: check container state after startup
- tests will now fail if a container exits right after startup
- fixed MirroringTest (still broken with multiple workers)

Type: test

Change-Id: I47b51c2bcf53f535aa2d06c2f5b09a9559631117
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 23:41:04 +00:00
Adrian Villin
d9da4eeb79 hs-test: fix logs once again
- "/dev/null" and "tail: ..." messages should now be
  removed properly

Type: test

Change-Id: I4aa1f1a1cab17dab73f727e40c80a44d6e753bd5
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 21:16:21 +00:00
Matus Fabian
f95c4d81fc prom: test_prom fix
Type: test
Change-Id: I022a3435429976590b8e8e2e1abe924188d1c3f9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24 21:14:55 +00:00
Adrian Villin
2a2c653169 hs-test: update envoy
- v1.21 -> 1.30

Type: test

Change-Id: Ib79a4addc0a93089c41c13abffc3e8f0af4c0d91
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 15:54:02 +00:00
Matus Fabian
c712de5a8e prom: mem leak test
Type: test
Change-Id: Ibca5680778c9e27eb7b1ddbdba52f870852452fe
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24 15:38:46 +00:00
Matus Fabian
936c83db95 http_static: fix coverity warning
Type: fix

Change-Id: Ie4af8ec0c6089b5719899f3d0b670f8a2de7f8a2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24 10:16:47 +02:00
Steven Luong
5682ca8ef6 session: delete and add application namespace do not create the global session table
When an application namespace is added, we call session_table_is_alloced
to see if we need to allocate a new session table. That check returns true
even if we removed the session table.
The fix is when we delete an application's global session table,
we need to invalidate fib_index_to_table_index.

Fixed test_vcl test script to run two tests back to back.
The 1st test deletes the application namespace at the end.
The 2nd test adds the application namespace in the beginning.

Type: fix
Fixes: 67bae20b05cb46e5f6d19afeaf1f7a52a5309d59

Change-Id: I67f5cc1b726a07659597a9479df011717db08d0a
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-24 04:20:08 +00:00
Matus Fabian
5c4c1b63b9 prom: concurrent connections fix
Type: fix

Change-Id: I57814edb735e9dac916f2e01de95ccfb739ce655
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 20:37:29 +00:00
Matus Fabian
d086a3650e http: state machine fix
When client sends second request without waiting for response of the
first request http_ts_rx_callback should drop request (pipelining is
not supported) instead of invoking return to state machine which can
lead to erroneous state, e.g. reading random data from server app
fifo.

Added simple http static server url handler for testing to simulate
long running request processing, for now hardcoded delay 5 seconds.

Type: fix

Change-Id: Ied9f7e2e4ee64c982f045c0f7f99a2dc5d7a2108
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 20:37:16 +00:00
Matus Fabian
8ca6ce6fe1 http: return more than data from server app
Server app could return headers in front of body/data buffer.
Offers apis for building and serialization of headers section.
HTTP layer now only add Date, Server and Content-Lengths headers,
rest is up to app. Well known header names are predefined.

Type: improvement

Change-Id: If778bdfc9acf6b0d11a48f0a745a3a56c96c2436
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 15:22:34 +00:00
Florin Coras
1f870c9bdc vppinfra: get_mempolicy instead of move_pages for mem init
Use get_mempolicy instead of move_pages to detect numa nodes. Avoids
issues whereby move_pages could stall if another rt thread spin waits
instead of yielding the cpu.

Type: improvement

Signed-off-by: Tatsushi Kanemoto <t-kanemoto@fujitsu.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7db2073ed82bb0b1e707130d9bd8f54bea333840
2024-07-23 07:41:56 +00:00
Steven Luong
3ac2ac5324 ip: crash in ip4_sas_commonlen
ip4_sas_commonlen may be called with null a2 argument from
ip4_neighbor_advertise -> ip4_sas_by_sw_if_index.
If a1 or a2 is null, there is no common length, shortest mask
between a1 and a2, return 0 instead of crashing.

Type: fix

Change-Id: I307509ee7dedafac76d8877a1ef76ab8bbafef59
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-23 07:30:03 +00:00
Matus Fabian
e99d266612 hs-test: memory leak testing
add infra for memory leak testing

Type: test

Change-Id: I882e8dbb360597cdb82ad52682725f7d39b2df24
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-22 17:44:42 +00:00
Matus Fabian
7f163b682a misc: replace index() with strchr()
Type: improvement
Change-Id: I471e514ebef0b4c1f86067115b2ebe5a5517c6fb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-22 17:07:02 +00:00
Matus Fabian
7561c45bcc vlib: add "save memory-trace" debug CLI
Save memory traces of the currently traced heap in JSON format to file
which can be used as machine-readable data for memory leak diagnose.

Type: improvement

Change-Id: I277f5be5838510e907c4dd7a8a4e9a883cb67bc3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-22 15:50:22 +00:00
Matus Fabian
ef827b3efc vppinfra: expose raw memory traces
Add clib_mem_trace_dup which return copy of memory traces and
can be used to save memory trace in different formats.

Type: improvement

Change-Id: I731860cdc65e6c5255620a6778ce6c893a493b1d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-22 15:50:22 +00:00
Steven Luong
e87a03f7a6 session: show session rules does not display ip6 entries
1. Adding an ip6 rule entry
session rule add proto tcp ee80::/10 0 ee80::/10 0 action 2

2. show session rules does not display the entry.
show session rules tcp

3. However, show session rules for a specific entry shows the entry
show session rules tcp ee80::/10 0 ee80::/10 0

Type: fix

Change-Id: I65c881665d3698a2a9452a186ed657eee0bf13e0
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-19 17:05:29 +00:00
Adrian Villin
09b19fe8a3 hs-test: fix docker log output when logs are empty
- removed "==> /dev/null <==" and "tail: cannot open..." lines
  when docker logs are empty

Type: test

Change-Id: Ia51f7aa41d2c6c04c0adcb82142abfd45fbe2728
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-19 14:08:19 +00:00
Fan Zhang
b753554e25 ipsec: fix integer overflow
Type: fix
Coverity issue: 394440

Change-Id: I915a088145ee1317a7c8746b517f4af50323aa11
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2024-07-19 12:24:22 +00:00
Dave Wallace
6ce5d5bcbb pg: fix pcap packet type when writing pcap file
- fixes incorrect pcap packet type for packet
  generator interfaces configured in ip mode.
- corrects pcap file decode for pg output files
- fixes scapy versions > 2.4.3 which now appear to
  use the packet type in the pcap file header which
  had been ignored in earlier versions

Type: fix

Change-Id: Idb1e3f8fbc7ca938fb5d2aaa72365e333c0ea2e9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-18 14:46:07 +00:00
Dave Wallace
0da0883453 tests: output raw packet data when decoding pcap files
Type: test

Change-Id: I4e945b2bd067466afdaa58a6f07a1ab2c567bc2b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-18 14:45:49 +00:00
Xiaoming Jiang
04da324260 vppinfra: fix cpu freq init error if cpu support aperfmperf
After linux-v4.15, 'cpu MHz' in /proc/cpuinfo is CPU
real frequency on x86 if cpu support aperfmperf flags

more see linux commit: 
7d5905dc14

Type: fix
Change-Id: Ib655a9a1c519104142120b343cd8ddbe0b6e50e6
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
2024-07-18 08:46:14 +00:00
Klement Sekera
357291142b vnet: print Success for API errno 0 instead of UNKNOWN
Type: improvement
Change-Id: I8c5bfc82c1db1213eb43072853f8500ce1d2ee92
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-07-18 02:25:41 +00:00
Adrian Villin
2514001377 hs-test: use docker sdk
Type: test

Change-Id: I9d6b15ca6a9aac3343e10f480dec43c4c538f1b7
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-17 18:20:54 +02:00
Adrian Villin
b69ee00c34 hs-test: minor cpu pinning suite improvements
- added max cpu check for CI
- added a check for Ip4AddrAllocator: fixes a case where teardown panics
  if a test crashes before allocator gets initialized

Type: test

Change-Id: Ica12366cd79d77801964dfbdc8ee7c9969b4a9ce
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-17 16:10:29 +00:00
Adrian Villin
aedfd7ca3d hs-test: exit immediately if docker build fails
Type: test

Change-Id: I299d023ce59b931697352c54e4796ba0af2ab1af
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-17 16:07:32 +00:00
Niyaz Murshed
1d3faf0c57 vppinfra: Add macro for targeted prefetching
In Arm platform, targeted prefetching[1] is supported. Adding this in infra
to use it in future optimisation.

[1] https://developer.arm.com/documentation/101458/2404/Optimize/Prefetching-with---builtin-prefetch

Type: improvement
Change-Id: Id3e2a274628289707840a6b2ba4b83c5e4add60b
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
2024-07-17 14:59:26 +00:00
Steven Luong
99213e0836 session: memory leak on rule tag
Type: fix

Change-Id: If07a6a420d467e6305f166ed250f84befe9f983d
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-17 07:29:32 +00:00
Steven Luong
d1aeac5b7f session: memory leaks on rule tag hash tables
Type: fix

Change-Id: Id8542ad74389eca4cc7903cd455f556743a5e0cf
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-16 15:35:42 -07:00
Florin Coras
3a2cf84fa5 tls: track app owner of transport session
Allow other apps to own transport sessions for tls.

Type: improvement

Change-Id: Ida04cef1dc49acb7117cbed8657e26890bf43d2a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-07-16 15:50:30 +00:00
Steven Luong
2da273ace8 session: crash in session_rule_add_del if session is not enable
Invoking the API session_rule_add_del to add a rule causes VPP to crash
if session is not enable.

Type: fix

Change-Id: If8de83f1064bc60d20461e87889b7c3393ad2af1
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-15 21:11:00 +00:00
Steven Luong
67bae20b05 session: application namespace may reference a deleted vrf table
lock the vrf table when adding an application namespace and
unlock the vrf table when deleting an application namespace.

Free the session table when no more application namespace
uses it anymore to avoid memory leaks.

Type: fix

Change-Id: I10422c9a3b549bd4403962c925e29dd61a058eb0
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-15 20:57:35 +00:00
Klement Sekera
ca2f2e1ec9 tests: more options for decoding pcaps
Introduce "none", "all" and "failed" options for --decode-pcaps
parameter. Keep "failed" as default to be consistent with current
behaviour. Add missing documentation to test/Makefile and passthrough to
Makefile.

Rationale: running tshark binary takes about 100-150ms and if there are
thousands of pcap files, it takes minutes to decode them. This might not
be desirable if rerunning the tests repeatedly during development.

Type: improvement
Change-Id: Ie033521d51d18b9d499b9bc40fe6eff21c94622d
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-07-15 18:58:07 +00:00
Alok Mishra
9bff049b84 octeon: fix link down issue
An issue is noticed when the link state of the ethernet interface is
toggled to down and again brought up. The link status shows "up" in the
"show interface", but shows "down" in "show hardware-interface".
This issue does not occur when the link is brought up for the first
time, but only manifests when the interface is brought down and up again.

This happens because the device status and VNET_HW_INTERFACE_FLAG_LINK_UP
aren't correctly updated during the port stop, preventing them from
being updated during the port start.

This patch fixes this issue in the port stop function.

Type: fix
Fixes: 01fe7ab88e

Signed-off-by: Alok Mishra <almishra@marvell.com>
Change-Id: Idbc5a6c31409a3d1c5b19e14a3c9509291175677
2024-07-15 17:13:57 +00:00
Dmitry Valter
34fa0ce8f7 tests: skip more excluded plugin tests
Check and skip VPP_EXCLUDED_PLUGINS tests for most of plugins.

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I23fd3666729251c639aa8da72a676058e3f5bb4e
2024-07-12 15:43:24 +00:00
Jay Wang
7b7bc045f8 build: overwrite clang-format version on Ubuntu 24.04
clang-format-11 is used by default in checkstyle.sh while it can be
overridden to higher clang-format version. On Ubuntu 24.04, the minimum
version of clang-format is version 14. Set the environment variable
explicitly in Makefile to overwrite the clang-format version.

Before:
$ make checkstyle
extras/scripts/checkstyle.sh: line 41: --version: command not found
make: *** [Makefile:775: checkstyle] Error 127

After:
$ make checkstyle
Ubuntu clang-format version 14.0.6
*******************************************************************
* CHECKSTYLE SUCCESSFULLY COMPLETED
*******************************************************************

Type: fix

Change-Id: Iba3e4739c9376701577b2f37e070d199b195e7d0
Signed-off-by: Jay Wang <jay.wang2@arm.com>
2024-07-12 12:53:56 +00:00
Renato Botelho do Couto
e69ec9c101 build: Fix crossbuilding definitions
CMAKE_C_COMPILER_TARGET doesn't need to be set when it's not cross
compiling, and based on wrong identation of that line I suspect it was
intended to be inside CMAKE_CROSSCOMPILING conditional.

With this line moved inside, it ends up being the only place where
COMPILER_SUFFIX is used, so, move its declaration there as well.

It will not bring any change to currently supported systems but will
make it easier to build VPP on systems running musl libc.

Type: fix

Change-Id: Ia8e16d9e8ad9c987ddf246dd0e3f8636ccad1362
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-07-12 12:40:15 +00:00
Dave Wallace
d18726eaac build: ubuntu-24.04 install-deps package list
- support for ubuntu-24.04 CI jobs

Type: make

Change-Id: I225d72e22207283de9979cce75d8d208ab99feb5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-12 11:49:10 +00:00
Maxime Peim
6eac5bac60 fib: fix covered_inherit_add
When a FIB entry has multiple sources installed by covering inheritance,
the first walk installs the covering source, which can be worse than the
already used one (hence the source is not activated). If a covering path
is added and a new fib cover walk is done, the deactivated source is
compared to itself. This operation calls for a reactivation of the source which was not activated in the first place.

Type: fix
Change-Id: I2639401bed14eb5a2cb003664c04d6c1f9130de9
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-07-12 03:12:58 +00:00
Maxime Peim
0e3fcc0b7e ip6: fix icmp error on check fail
Avoid to do fixup either if TTL or MTU check fails. It rewrites the
icmp header copied in case the ip6-icmp-error ran before.

Type: fix
Change-Id: If043d1cae35c41ebf70ba979883119604bee883d
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-07-12 03:11:46 +00:00
Benoît Ganne
23c489660b fib: improve ipv6 fib scaling
VPP IPv6 FIB relies on 2 bihash for all its VRFs: 1 for control plane
and one for data plane. Because of that, control plane VRF walks
time grows with the number of VRFs as it has to go through all the VRFs.
In order to improve control plane performance with large number of VRFs,
the control plane data structure is changed from a global bihash to a
per-VRF hashtable, similarly to IPv4. Contrary to IPv4, there is only 1
hashtable per VRF and not 1 hashtable per prefix-length per VRF, which
is a compromise between memory consumption and single VRF scaling.

Type: improvement

Change-Id: Ib738a44adb88e46c95c4c62c853ee1f1392c7187
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-07-12 03:09:58 +00:00
Benoît Ganne
ff570d3d07 fib: make mfib optional
In some cases we do not need multicast support. Making it optional helps
scaling to high number of VRFs, by reducing the control plane operations
and memory consumption.

Type: improvement

Change-Id: Ib34ed3fe2806e2f4624981da4e4a3c49c69f70be
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-07-12 03:09:22 +00:00
Benoît Ganne
caaa633223 fib: log an error when destroying non-empty tables
Destroying a non-empty fib table can lead to difficult to diagnose bugs,
like dandling fib entries preventing entries to be inserting to the
mtrie.
Always log an error to help diagnose those issues.

Type: improvement

Change-Id: I2c771a80595035b440931b74cca4429af22161a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-07-12 03:05:02 +00:00
Adrian Villin
63bdb31963 hs-test: quick fix for CpuPinningSuite
Type: test

Change-Id: Iaed08fe23a63562c99012bd469ca3f3271be2564
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-10 22:26:39 +00:00
Steven Luong
3f75010dfb session: deleting an application namespace cleaning up the wrong application
We call application_namespace_cleanup to remove the application which
has a reference to the application namespace when deleting an application
namespace. When we find the matching application namespace, we queue
the ns_index instead of app_index to look for the application.
This may lead to a crash.

Type: fix

Change-Id: I89c7f8d1681b4c7c1bcb16641217230a26dbe582
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-10 17:39:10 +00:00
Hadi Rayan Al-Sandid
e0e85134ad hs-test: Add CPU pinning test suite
Type: test

Added suite to verify that VPP launches with provided
CPU pinning configurations. CPU configuration is
specified per-test.

Change-Id: Ic283339676d3b24636fc21156a09a192c1a8d8da
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-07-09 20:14:28 +00:00
Jay Wang
c44fa9355b vppinfra: fix huge page alloc error on 5.19+ kernel
Running VPP on a NUMA system with 5.19+ kernel outputs the following
error messages. 'show physmem' command confirms that VPP falls back to
using normal 4K pages instead of the preallocated 1G huge pages. The
root cause is that VPP uses move_pages()[1] to get the huge page node
information. However, this misbehaves on the 5.19+ kernel due to changes
introduced in its implementation[2].
Our proposed fix is retry obtaining NUMA node info with
get_mempolicy()[3] only if we see -ENOENT returned in status from
move_pages() and huge pages are used. Additionally, we use mincore()[4]
to check if pages are allocated and in memory to avoid the possibility
of get_mempolicy() falsely allocating a new page.

buffer  [warn  ]: numa[1] falling back to non-hugepage backed buffer pool ()

vpp# show physmem
 used-pages 2 reserved-pages 16 default-page-size 1G lookup-page-size 4K
   arena 'buffers-numa-0' pages 1 subpage-size 1G numa-node 0 shared fd 5
   arena 'buffers-numa-1' pages 1 subpage-size 4K numa-node 1 shared fd 6

[1] https://man7.org/linux/man-pages/man2/move_pages.2.html
[2] https://lore.kernel.org/linux-mm/91da2c3b-96f1-bb03-8fff-4c38f31cb9be@huawei.com/
[3] https://man7.org/linux/man-pages/man2/get_mempolicy.2.html
[4] https://man7.org/linux/man-pages/man2/mincore.2.html

Type: fix
Signed-off-by: Jay Wang <jay.wang2@arm.com>
Change-Id: Ia423745423bb080404292333ef95455a4950ce0a
2024-07-09 15:35:52 +00:00
Florin Coras
3fe610a2aa tls: refactor vft functionsn to allow for reuse
Type: refactor

Change-Id: I3d7ff64e2e54b113f8d4b26f2dbf5b9c67b80976
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-07-09 02:04:49 -07:00
Florin Coras
129ff04e3c session: add api to program rx io evts
Type: improvement

Change-Id: I5a4a33604ecb8a29ef6932cc5826835d3bec7f23
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-07-08 21:49:32 +00:00
Dave Wallace
5874dd0365 hs-test: add missing packages to install-deps
Type: test

Change-Id: I2730debc7ea9256bf27208a2662f920edcd6826c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-08 16:30:12 +00:00
Adrian Villin
5d171ebdc2 hs-test: CPU allocation improvements
- Release build runs on numa node0, debug on node1.
  Using the last digit of a build number to reserve 4 cores per test
  mmeans we can run 20 jobs (10 release, 10 debug) on the same machine,
  assuming we have 111 cores available (not counting core 0).
  Can be increased if needed, there are still some cores left.
- Added separate numa aware cpu allocation
- Added CPU0=true|false (useful for users with 4c/8t)

Type: test

Change-Id: Iba8e492a4e01a7f457e49112303887a2a27f6af9
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-08 16:27:38 +00:00
Florin Coras
75e8e1e948 session: improve enable and disable handling
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3c79d16f6a19767d990e8a4683c296219b559ccd
2024-07-08 16:27:06 +00:00
Florin Coras
6df9f44227 session: handle multiple attempts to mark mq congested
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iadc6ec58f5fc7fbff62e4fd31d509557b60395cb
2024-07-08 13:44:06 +00:00
Sanjyot Vaidya
e3469369da acl: cli addition to set macip rules
This change is used to add cli command for macip acl rules.
Cli commands added for addition and deletion of rule.

Type: improvement

Change-Id: I28adba0193a904f6c130c81cd19bb6de47f517a9
Signed-off-by: Sanjyot Vaidya <Sanjyot.Vaidya@arm.com>
2024-07-03 14:11:17 +00:00
Andrew Yourtchenko
9987d470a6 tests: disable failing tests on Ubuntu 22.04
Also rework the logic so the skipping of marked Ubuntu 22.04 occurs at framework level

Leave debian11 special cases as-is.

Type: fix
Change-Id: I481eb32cd1a0860935482e9f930ced409da653c9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-07-03 12:43:57 +02:00
Steven Luong
b8a227363c session: session disable crash if not enable
If session is not enable, type in the CLI session disable cause VPP to crash.

Type: fix

Change-Id: Ib55b7430b7ce521a40025d58fa18b765f5129fd5
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-07-02 08:44:07 +00:00
Steven Luong
1b8cef111b unittest: coverity woe
check return value after strstr()

Type: fix

Change-Id: Ib6eb82b6a52c7e08785f6deb73e6cc7a10e7f61b
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-06-29 16:29:15 -07:00
Steven Luong
d2d41bc34e session: memory leaks on various transports when session disable and enable
When toggling session disable and enable, memory leaks found on various
transports.

Don't create the timer wheels on enable when they are already creaded.
Don't create the spin locks when they are already created.
Add session enable disable test in session unit test.

Type: fix

Change-Id: I08988a96bbf2d67a67c743b50b63f5b1e27402a3
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-06-28 15:19:08 -07:00
Adrian Villin
6d44aabe8d hs-test: cat summary file after a failed test run
- as per Florin's request

Type: test

Change-Id: Id76fda0e2dfac7e58b703a8d6f096aa7b5be31c7
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-28 05:38:07 +00:00
Andrew Yourtchenko
3e0600bb12 misc: VPP 24.06 Release Notes
Type: docs
Change-Id: Id47dbab5e5661c76e6ff41237bbca5b5b15506c4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 6e8b350a0154caee6e9f037ae4938b83fb5dcf20)
2024-06-28 01:41:06 +00:00
Renato Botelho do Couto
7f3c21763f vppinfra: Improve code portability
Use standard macros CPU_ISSET_S and CPU_ZERO_S and make code more
portable.

Type: improvement

Change-Id: I8e6a0fd79b90de8c6c33cad8882680eae2ca50ef
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-06-26 19:25:50 +00:00
Denys Haryachyy
1b794cf1b6 linux-cp: populate mapping vif-sw_if_index only for default-ns
When custom netns is used we don't need to populate the mapping
ifindex->sw_if_index otherwise netlink events in default-ns can apply settings
to wrong interfaces. Most of the lcp functions however wasn't working for such
interfaces and neither it was fixed by this patch.

Type: fix
Change-Id: I74a8a4e332753f9a40fc291d489dfd7fc51cbef3
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2024-06-25 18:49:05 +00:00
Damjan Marion
3eb91a5d62 dev: move bus code to bus/
Type: refactor
Change-Id: If3a195f1ea600bfd621717f333af1b1273ab0807
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-06-25 18:16:33 +00:00
Steven Luong
5677c8ac4b session: memory leak in mma rule table
When the rule table is allocated, the root node is allocated. But it
cannot be deleted by the add_del API, or the table is useless.

When the table is free, the root node is not free and there is memory
leak. Let's add pool_flush when the rule table is free.

Type: fix

Change-Id: I58c3e040cd101c7db501d99a373ad78d85321b8f
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-06-25 17:11:43 +00:00
Jeff Shaw
26574dcd4f ipsec: enable ipv6 udp checksum offload
RFC6935 section 5 states that, by default, the UDP checksum must be
computed when originating an IPv6 UDP packet. The default behavior
may be overridden when conditions defined by RFC6936 are satisfied.
However this implementation does not satisfy all the conditions so
the checksum must be computed.

After ESP encryption the packet is an IPv6 UDP packet so set the
l3_hdr_offset and l4_hdr_offset values, and set the UDP_CKSUM
offload flag in the buffer.

Type: improvement

Co-authored-by: Cian Ferriter <cian.ferriter@intel.com>
Change-Id: I9f8c434c9fe9dbddd8890d5ae366984bfcf34067
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
2024-06-25 15:37:28 +00:00
Hadi Rayan Al-Sandid
0eccf453c6 hs-test: return error if connecting to vpp fails
Type: fix

Fix case where no error code would be returned if vpp was launched,
but then exited due to invalid configuration.

Change-Id: I54d526629a2ee0206227615ffb6cb658779f93a0
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-06-25 14:59:36 +00:00
Niyaz Murshed
290dc7b63e crypto: Add prefetching for src and dst
Adding prefetching to openssl plugin improves both sync and async mode
ipsec performance by more than 5% on N1 ampere.

Sync mode (1420b)
core count            old (MPPS)              new (MPPS) 	%diff
    1c                  0.972                   1.01            3.90
    2c                  1.91                    2.02            5.87
    3c                  2.86                    3.04            6.03

Async mode (1420b)
core count            old (MPPS)              new (MPPS)        %diff
    1c			1.296                   1.37		5.70
    2c			2.58			2.753		6.70
    3c			3.74			3.9		4.27
    6c			7.52			7.832		4.14

Type: improvement
Change-Id: Ieef22c37e1330ac9f8b7e09a25c24162516b6c26
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
2024-06-25 10:32:55 +00:00
Matus Fabian
ed9843826a hs-test: move nginx tests into one file
Type: test

Change-Id: Ie525636c6299a8306cba45e72f8ee6c9da6d6e4f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-24 19:05:38 +02:00
Adrian Villin
1fde999eec hs-test: added interrupt mode tests
Type: test

Change-Id: I327fa1a4ea23a3af3aa33e5260367426a11e7b4f
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-24 16:06:40 +00:00
Ole Troan
228e195e11 build: conditional dependency handling of depfile
Older distributions like Ubuntu 20.04 uses an old version
of cmake that does not handle absolute paths.
Leave .api dependency handling like before, i.e.
not handle interdependency between .api files for those older
builds.

Type: fix
Change-Id: I3f15a4506f6c95fca7a5b00893dc354cbed42a29
Signed-off-by: Ole Troan <otroan@employees.org>
2024-06-24 10:39:43 +00:00
Vladislav Grishenko
f876b69537 ip: mark IP_ADDRESS_DUMP as mp-safe
Since main thread is the only one thread that can modify address
hash, avoid barriers while IP_ADDRESS_DUMP api calls.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I9c35400bdef9fb08e81d859c8f2e3bdaa5468f4b
2024-06-24 01:26:55 +00:00
Dave Wallace
5eaa15dd0e hs-test: cache docker build in local filesystem
- when running in the CI, cache the docker build layers
  in the local filesystem to allow docker executor images
  to contain cached docker build layers

Type: test
Change-Id: Ie728a8370d3fb8144d01dff566aaa846ca6fd81b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-06-21 19:30:54 +00:00
Florin Coras
d8efd6e310 http_static: fix reply data leak
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ica78044b044a78714dd9947620250f13c63320fb
2024-06-20 14:59:43 -07:00
Maxime Peim
d5fa6cca0f ip6: fix ip6-michain trace function
Type: fix
Change-Id: I3a5c04b14bf1156376e2acece69f8256d00f261a
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-06-20 14:41:29 +00:00
Ole Troan
cbf3888ca8 dpdk: xstats vecor stuck at 0 elements
Fixes: dd6fb60f1794fc08ec40598a67dc70f942c200d1
Type: fix
Change-Id: I2429715a954361ceea969191493c15bef21e2040
Signed-off-by: Ole Troan <otroan@employees.org>
2024-06-19 23:35:25 +00:00
Adrian Villin
b4516bbccf hs-test: fix LDPreloadIperfVppTest
- fixed ldpreload path (debug build)

Type: test

Change-Id: Ib2ab58b32ffd87a78189464b599f7bbc4f05c175
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-19 16:14:12 +00:00
Matus Fabian
05fbc3569c http: fix app name formatting in template
app name is vector without null termination

Type: fix

Change-Id: Iaa50770c84f23a71165d76a63c29b76e90006ac6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-19 15:30:31 +00:00
Ole Troan
ed61b20ad7 build: vppapigen dependency handling
Add dependency generation to the vppapigen compiler, so that
when an API file depends on another, that's registered as a dependency
with the build system.

Add a build dependency on vppapigen submodules so that all api files
are regenerated if the compiler itself changes.

Type: improvement
Change-Id: I392853754129778ef15532d1b04813786b943b44
Signed-off-by: Ole Troan <otroan@employees.org>
2024-06-19 13:18:36 +02:00
Dmitry Valter
e95687b0d6 fib: fix ip drop path crashes
Do not mark drop paths as imported to avoid crashes on invalid table lookup.

```
vpp[8478]: /build/Vpp2310/source/src/vnet/fib/fib_table.c:35 (fib_table_get) assertion `! pool_is_free (ip4_main.fibs, _e)' fails
 #9  0x00007ff21785da1d in _clib_error () from /lib/x86_64-linux-gnu/libvppinfra.so.23.10
 #10 0x00007ff218087698 in fib_table_get (index=4294967295, proto=FIB_PROTOCOL_IP4) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:35
 #11 0x00007ff218087a37 in fib_table_lookup_exact_match (fib_index=4294967295, prefix=0x7ff0eae0d354) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:100
 #12 0x00007ff2180bc938 in fib_attached_export_import (fib_entry=0x7ff0eceac3e0, export_fib=4294967295) at /build/Vpp2310/source/src/vnet/fib/fib_attached_export.c:264
 #13 0x00007ff218098ade in fib_entry_post_flag_update_actions (fib_entry=0x7ff0eceac3e0, old_flags=FIB_ENTRY_FLAG_NONE, new_fib_index=4294967295) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:624
 #14 0x00007ff218098b90 in fib_entry_post_install_actions (fib_entry=0x7ff0eceac3e0, source=FIB_SOURCE_API, old_flags=FIB_ENTRY_FLAG_NONE) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:674
 #15 0x00007ff218098cce in fib_entry_create (fib_index=1, prefix=0x7ff0d3244d80, source=FIB_SOURCE_API, flags=FIB_ENTRY_FLAG_NONE, paths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_entry.c:712
 #16 0x00007ff218088db4 in fib_table_entry_update (fib_index=1, prefix=0x7ff0d3244d80, source=FIB_SOURCE_API, flags=FIB_ENTRY_FLAG_NONE, paths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_table.c:799
 #17 0x00007ff2180c026c in fib_api_route_add_del (is_add=1 '\001', is_multipath=0 '\000', fib_index=1, prefix=0x7ff0d3244d80, src=FIB_SOURCE_API, entry_flags=FIB_ENTRY_FLAG_NONE, rpaths=0x7ff0eac15ab8) at /build/Vpp2310/source/src/vnet/fib/fib_api.c:485
 #18 0x00007ff217d4b6dd in ip_route_add_del_t_handler (mp=0x7ff0eb08b998, stats_index=0x7ff0d3244dc8) at /build/Vpp2310/source/src/vnet/ip/ip_api.c:718
 #19 0x00007ff217d4b986 in vl_api_ip_route_add_del_t_handler (mp=0x7ff0eb08b998) at /build/Vpp2310/source/src/vnet/ip/ip_api.c:789
```

Type: fix
Fixes: 4b08632748727486e7ebfdcf4d992743595bc500
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I647899533771c35f44c9ecde517a30f111b36ad9
2024-06-19 00:50:49 +00:00
Ole Troan
dd6fb60f17 dpdk: expose xstats in stats segment
Expose DPDK xstats in the stat segment.
Represented as a 2D array. Thread by sw_if_index.
Each counter has the same name as the corresponding xstats counter,
under /if/<driver-name>/<xstats-name>

Type: improvement
Change-Id: Icd34b46e2b4d708f1c9a7063d6afd4ced3dfa4f5
Signed-off-by: Ole Troan <otroan@employees.org>
2024-06-18 17:13:16 +00:00
Benoît Ganne
32dc913e6f vnet: move format_vl_api_address_union() from vpp to vnet
format_vl_api_address_union() is used by vnet, creating a linkage
dependency from vnet to vpp.

Type: fix

Change-Id: I298a90d521e51b7527ef140d66130062824e1d16
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-06-17 18:44:59 +00:00
Benoît Ganne
448f08b685 vppinfra: export os_exit and os_puts
os_exit() and os_puts() are not exported, preventing linkage with
libvppinfra if those are not defined.

Type: fix

Change-Id: I7e3b583147e1348f078afeac3f793fe150405009
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-06-17 15:36:28 +02:00
Florin Coras
1c30d2d8bc tcp: make syn-rcvd timeout configurable
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic89570315a5c3c00e0e89c5535929313916869eb
2024-06-14 23:27:49 +00:00
Dave Wallace
bee28afbb2 hs-test: output docker build command for ci console log
- clean up shellcheck warnings
- rename extras/hs-test/test script
- add -x attribute to compress script for consistancy

Type: test

Change-Id: I5d1a9d16eeaff18562461b1e445e32ac696266d3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-06-14 20:14:59 +00:00
Dau Do
10dbb372cc vapi: Add option to dispatch with timeout
Type: improvement

Change-Id: I606efc90d9b1b8e2a2590a8b4e0021e2508642b2
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-06-14 19:16:18 +00:00
Adrian Villin
4677d920c0 hs-test: separate infra from tests
- most functions and vars now start with a capital letter:
  needed to access them outside the package that declares
  them
- updated README.md
- very minor changes in MAKEFILE

Type: test

Change-Id: I4b5a194f08f09d59e372e57da6451fbb5a1de4da
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-14 18:10:26 +00:00
Damjan Marion
2aa0f0da5d crypto-native: fix CPU detection for SHA2 code
Type: fix
Fixes: 9f2799f
Change-Id: Ib2b2df17507c536350ec92eeb1eea58f3a240c76
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-06-14 08:40:20 +00:00
Dau Do
75e8ffb261 vnet: export header files to build the plugins
Type: improvement

Change-Id: I86e8616a134829a66a9c9bb4313bbf95f835e7c0
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-06-13 18:52:52 +00:00
Adrian Villin
7d1e4a4ddb hs-test: added cleanup target
- Also added checkstyle-go and fixstyle-go to 'make help'

Type: make

Change-Id: I5402efa02bbbc54a20db8f54b0488c58a62ffaa1
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-13 16:28:56 +00:00
Matus Fabian
82ad9660be http: return more than url to server app
Provide all bytes as received from transport as data in the http
message to server. Additionally provide offset and length of target
path, target query, headers and body. Offers apis for parsing of
headers, percent decoding, target path/query syntax verification.

Type: improvement

Change-Id: Idbe6f13afa378650cc5212ea7d3f9319183ebbbe
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-13 06:35:26 +00:00
Adrian Villin
eaa7d91ad7 hs-test: improved suite teardown and replaced PIDs with PPIDs
- Fixed an issue where containers wouldn't stop and get removed when
  a test run is interrupted
- Replaced PIDs with Ginkgo process indexes + PPIDs
- Fixed CPU allocation for envoy and nginx-ldp containers
- All container logs should now get saved properly

Type: test

Change-Id: I4c737c1d326390494c0dda1ec6d3fc1f04f51663
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-12 23:38:25 +00:00
Florin Coras
6c37845a87 session: fix ho cleanup on forced reset
Avoid double free if app forces reset while half-open is cleaning up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2311fb763076aa8a263c193f5967793402eedb6a
2024-06-12 10:14:40 -07:00
Adrian Villin
56387407c3 hs-test: added go style targets
- added checkstyle-go and fixstyle-go
- comments in stats_fs.go were missing a space

Type: make

Change-Id: I520acab5ff61eaf9d0ccfd9425bdc41f74559198
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-12 16:08:49 +00:00
Florin Coras
7080294116 session: fix ho cleanup on active and passive close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9e7011ff45f14e17fc0d0d63800184f404c29093
2024-06-12 14:56:51 +00:00
vinay tripathi
518bcc1028 ipsec: move ah packet processing in the inline function ipsec_ah_packet_process
This inline function is introduced to simplify code readability and consolidate AH packet
processing in separate API.

Type: improvement

Change-Id: Id98074d00aba277fed714ea9995655c9e84ec83b
Signed-off-by: vinay tripathi <vinayx.tripathi@intel.com>
2024-06-12 13:16:53 +00:00
Dau Do
ea92116edf ipsec: Add option to configure the hand-off worker queue size
Type: improvement

Change-Id: I252951d3ec01497c049ca0ffb7cb42aaf2efb965
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-06-12 13:02:35 +00:00
Klement Sekera
5c0aa7d0b4 papi: more detailed packing error message
'struct.error: required argument is not an integer'

is quite useless itself, so let's raise an error from it at least
saying what was the thing getting packed

Type: improvement
Change-Id: Icb762fbab98446d1e1331315e6c337f789cbba95
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-06-12 11:55:50 +00:00
Monendra Singh Kushwaha
68b8125dbf octeon: add clear counters for port and queues
Type: feature

Change-Id: Ie36be41694e7bd5341b4239dcba2ae6834c4a73f
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-11 09:50:54 +00:00
Monendra Singh Kushwaha
2ea1e2c361 dev: add port and queue counter clear operation
Type: feature

Change-Id: Ibd876c5251fc2f9d87816d235fff2de22be4b21c
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-11 09:50:54 +00:00
Adrian Villin
681ff3a02a hs-test: added filenames to test names
- It is now possible to only run tests that are in a certain file

Type: test

Change-Id: I41665dd2bc0942c283be36a5af3e560fd65e9d03
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-10 16:42:38 +00:00
Florin Coras
3def24bc48 quic: initialize ooo lookup on fifos
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6a0493834c5b60bdb42865112c453157fdfeb87c
2024-06-10 15:56:53 +00:00
Matus Fabian
2d1f0e6c73 hs-test: HTTP download benchmarking
HttpTpsTest now use Gomega's gmeasure package and go internal http
client. With gmeasure you can create "Experiments" which can produce
reports to show the statistical distribution of measurement.
Potentially experiments can also be cached and used to identify
regression in performance.

Type: test

Change-Id: Id049fb0344d8ebed71b15e706b053b5c2a18e0de
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-06-10 15:28:53 +00:00
Renato Botelho do Couto
8a424338ad build: Fix makefile syntax
Type: fix

Change-Id: I29f679ffbc14242d9e7e5284b698b86a70fbbef6
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-06-10 13:14:04 +00:00
Renato Botelho do Couto
893dacae3f build: Use $(MAKE) instead of direct call to make
No functional changes, just make it to respect original make binary
name used to start building

Type: improvement

Change-Id: Ic8568237fbb39c6a0d3b7405a9670e9410aeb752
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-06-10 13:13:31 +00:00
Benoît Ganne
fa500e9854 vlib: fix gdb_show_traces()
When using gdb_show_traces() in debug mode, don't assert if workers are
not parked, as it is typically called from gdb.

Type: fix

Change-Id: Iabf175d96dc152da4d1abfbce9ccc9020d0b5d61
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-06-10 13:12:52 +00:00
Sriram Vatala
282f2ecd8e octeon: add support for vnet generic flow type
This patch adds vnet generic flow type support in OCTEON plugin, which
extends the existing vnet flow types supported. It allows users to
configure additional match patterns like 802.1q tag fields, 802.1ad tag
fields, MPLS fields, IP DSCP etc., if supported by the underlying hardware.
On OCTEON various match patterns including user defined custom protocol
types can be supported depending on the programmable classification profile.
Generic flows operate based on hexadecimal strings representing packet
data bytes and corresponding mask data bytes. The mask data bytes, with
bits set to '1', selectively identify the data bytes used for hardware
flow matching.

To configure generic flow rules, packetforge tool is recommended which
accepts inputs in a user readable and friendly format. This tool is
available in VPP tree under `extras/packetforge`. Detailed instructions
can be found in the documentation under `extras/packetforge`. Additionally
user can use existing vnet flow CLI and binary API interfaces to
configure rules manually.

Type: feature

Change-Id: I8198536cf1fe0a4719542a8b54c599230c7852e9
Signed-off-by: Sriram Vatala <svatala@marvell.com>
2024-06-10 13:07:01 +00:00
Monendra Singh Kushwaha
b26b2bcd43 octeon: add counters support for port and queue
Type: feature

Change-Id: I5d52d78a93c7d0a12b9cee16fe7ebabdc2b19f0a
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-10 12:54:36 +00:00
Monendra Singh Kushwaha
afd03ffff5 dev: fix counter_start in counter clear routine
This patch fixes counter_start value, as it should hold the cumulative
counter value whenever counter clear routine is called.

Type: fix
Fixes: 38c619115b

Change-Id: I50bf8ddcde419caf1170dfacdea03ff3d93a3327
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-10 12:54:36 +00:00
Monendra Singh Kushwaha
a391de68ac octeon: update trace to use qid instead of q
This patch updates trace to use "qid" keywords instead of "q".

Type: feature

Change-Id: Ib0f41a8a1a93cbbbf8c59304924d4e68efff48fd
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-10 12:21:15 +00:00
Harish Malik
38f59c315b octeon: enable vf device promiscuous mode feature
This patch enables promiscuous mode on vf devices except SDP vf
and LBK devices

Type: feature

Change-Id: I2e18c63590f22f99c69500f10b42b64d899249ce
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-10 14:17:16 +05:30
Monendra Singh Kushwaha
81f0f16b09 build: bump octeon-roc version to 0.5
This patch enables vf device promiscuous mode feature in
octeon-roc except SDP vf and LBK devices.

Type: feature

Change-Id: I221f64ba0bb768191e2228dab132166a8a3326c3
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-06-10 14:16:58 +05:30
Florin Coras
07994a25e8 hs-test: more debug output in http3 test
Type: test

Change-Id: I4d2b949f5ef5446c04ca6f35b0bd659ce389170f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-06-06 03:08:27 -04:00
Adrian Villin
7ad37b5cf5 hs-test: keep ab/wrk containers alive until teardown
- Fixes errors while obtaining container logs on test failure
  (NginxPerf tests), ab/wrk containers are now stopped on test teardown
  like other containers.

Type: test

Change-Id: Ic336fcd3ed6bf68dd345d378262cb28eb5efc789
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-05 16:57:00 +00:00
Dave Wallace
8a284cc611 tests: organize test coverage report generation
- Remove code from test report that is effectively
  untested and categorize based on reason for lack
  of testing.

Type: test

Change-Id: I6ca5444055b3a81a4880945b6845afc867556277
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-06-05 16:30:17 +00:00
Lukas Stockner
63ff7a6325 buffers: support per-numa-domain buffer size
Currently, buffers-per-numa is used for all NUMA domains, and there's
no way to allocate different amounts for each domain.

Therefore, this adds a per-NUMA-domain buffer config section, which
currently has a single option to set the number of buffers.

If it's not specified or set to zero, the code falls back to
buffers-per-numa as before.

Type: improvement
Change-Id: If35d7a9eff6f8d1d78063ea7873dbf50780d0ec3
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
2024-06-05 12:28:27 +00:00
Adrian Villin
f4972f9232 hs-test: fix coverage integration
- fixed 'make test-cov' not generating gcda files

Type: test

Change-Id: I9745c6501a97248ab343a5dbb39dddcc75f715fd
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-04 15:20:05 +00:00
Fan Zhang
e7901e8830 ipsec: fix missing udp port check
Type: fix

This patch fixes the missing UDP port check in IPsec NAT-T
case. As of RFC3948 UDP encapped ESP traffic should have
destination port ID of 4500, which was missing.

The related tests are updated with this port ID, too.

Change-Id: I73ecc6a93de8d0f4b642313b0f4d9c2f214a7790
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2024-06-04 12:44:53 +00:00
Mohsin Kazmi
8c77c1930a ip: add support for drop route through vpp CLI
Type: improvement

Change-Id: Ib822f36ff7b3ecda162fc99bf3892f912d0649f0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-06-03 12:29:37 +00:00
Mohsin Kazmi
5f694322a9 fib: set the value of the sw_if_index for DROP route
Type: fix

fib_api_path_decode() is utilized by the IP route API call
to translate the path from the API to the fib_route_path_t
structure. The ip_route_add_del_handler_t function initializes
the fib_route_path_t structure to zeros, consequently setting
the sw_if_index value to 0, which is a valid value in VPP.
Typically, the default VRF (Virtual Routing and Forwarding)
has a local interface at index 0, leading to normal functionality.
However, a custom VRF table without any interface will result
in a crash.

The issue arises because the DROP route in fib_api_path_decode()
does not override the sw_if_index value with the one provided
in vl_api_fib_path_t. Subsequently, when this sw_if_index is
attempted to be resolved in the VRF table where the interface
does not exist, it leads to a crash.

This patch addresses the problem by setting the sw_if_index of
fib_route_path_t to the sw_if_index value of the API path.

To reproduce the issue, please remove the fix and run the following command:
make test-debug TEST=test_ip4.TestIPv4RouteLookup.test_exact_match

Change-Id: I5d72e91e5c701e749a92873941bee7b7b5eabd41
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-06-03 12:22:10 +00:00
Adrian Villin
05b0307962 hs-test: add libunwind dependency to nginx dockerfile
- Libunwind was missing in Dockerfile.nginx, causing some tests to fail.
  Tests that were temporarily disabled because of that issue
  are now re-enabled.

Type: test

Change-Id: I3f544be483784e8a7a1f22737cafca615b9f836b
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-06-03 04:58:58 -04:00
Dave Barach
9d5be6ae2a vlib: clean up r2 plugin registration relocator
Thanks, Eliot!

Type: fix
Change-Id: I3737f62d08d5cd2db803af86285f9a2e456bab72
Signed-off-by: Dave Barach <vpp@barachs.net>
2024-06-01 08:51:14 -04:00
Adrian Villin
00e35ce8e0 hs-test: temp skip some tests
- Some tests are broken in the CI, skipping them
  for now

Type: test

Change-Id: I3d4efeee63b819956e5ffa1b3920e81962a2fcc9
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-31 10:55:40 -04:00
Adrian Villin
fd366b4da6 hs-test: container logging improvements
- Reduced the amount of error messages while obtaining container logs
  when a test fails by keeping track of started containers. NginxPerf
  tests still have those error messages, because wrk/ab containers shut
  themselves down before the test ends.

Type: test

Change-Id: I40a193345e5b46aec1834774f23aebc822eee885
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-31 06:46:52 -04:00
Dave Wallace
d1a5161200 hs-test: add libunwind dependency to vpp dockerfile
- missing from https://gerrit.fd.io/r/c/vpp/+/40929 due to hst not running in CI yet.

Type: fix

Change-Id: Ib5d9b877725624ef7de9f2be5e517609aec7c5a1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-05-31 00:23:54 +00:00
adrianvillin
8512145d7c hs-test: added targets to makefiles to get coverage from HS tests
Type: make

Change-Id: Iae7998692890264dfeea98c165617d0efa024d42
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-05-30 15:59:07 +00:00
Adrian Villin
93974e281e hs-test: set longer timeouts while debugging
Type: test

Change-Id: I87baba7efa36dd40f086523b35bc6d3b0a26a1b5
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-30 15:59:01 +00:00
Adrian Villin
b9464cde7d hs-test: pin CPUs to containers
Type: test

Change-Id: I412be2dec7ff352740e50e838e0ac466bf0a6674
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-30 15:58:18 +00:00
Monendra Singh Kushwaha
2b671aa3e9 octeon: convert link speed from Mbps to Kbps
Type: fix
Fixes: 01fe7ab88e

Change-Id: I88d03adcd4ef2a585ed77834b3bf8ef9d50b15c9
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-05-29 21:48:11 +00:00
Damjan Marion
78925604e9 vlib: stack trace and signal handler improvements
- use libunwrap which seems to be industry standard
 - display traceback on console if running interactive or with syslog
   disabled (color output unless nocolor specified)
 - print hexdump of offending code
 - print library filename for each stack frame

Type: improvement
Change-Id: I61d3056251b87076be0578ccda300aa311c222ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-05-29 09:50:18 +00:00
Matus Fabian
5409d33002 http_static: sanitize path before file read
Romove dot segments from requested target path before start reading
file in file handler to prevent path traversal.

Type: fix

Change-Id: I3bdd3e9d7fffd33c9c8c608169c1dc73423b7078
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-28 20:42:30 +00:00
Monendra Singh Kushwaha
a93c85a579 octeon: add support for Marvell Octeon9 SoC
Type: feature

Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: I5db58b8ec41b45596bc03b4a336a184c17871294
2024-05-28 15:59:22 +00:00
Monendra Singh Kushwaha
b2c8c481cc octeon: fix lbk vf initialization
Type: fix
Fixes: 0a2fdc56

Change-Id: I5d232a86be66edeec8b740a883104f5a22516697
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-05-28 15:58:14 +00:00
Maxime Peim
0720d65c7b urpf: export to use it externally
Type: improvement
Change-Id: Ia70f16c92dfc153256db6dcdf23f5487d5a7b678
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-05-28 11:56:46 +00:00
Maxime Peim
7624083c27 urpf: node refactor
Type: refactor
Change-Id: Icb3c6cbe1425331c7a8a4b0dd583389f2257befa
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-05-28 11:56:15 +00:00
Florin Coras
fc42280434 udp: fix csum computation when offload disabled
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I11de9e1156420e0a37d637d8611bb3cf9788d699
2024-05-24 17:28:16 +00:00
Maxime Peim
fe736b2af9 ip6: fix icmp throttling error index
Type: fix
Change-Id: I57ce42c193fd9408b9d4790482ea76d784148c30
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-05-24 15:29:50 +02:00
hsandid
0b0468cb0f vlib: improvement to automatic core pinning
Type: feature

If 'main-core' is not specified, the main thread is pinned
by default to the cpu it is running on during initialization.
This change does not impact manual core-pinning, which
requires the 'main-core' argument
e.g. 'cpu {main-core x corelist-workers n}.

Change-Id: I874034591bf0acf4d71b231dfbbb0f6de8fe6060
Signed-off-by: hsandid <halsandi@cisco.com>
2024-05-24 08:21:14 +00:00
Steven Luong
1b053782a5 virtio: Add RX queue full statisitics
In production network, often the host and the vm are managed by different
groups. The host statistics may not be readily available to the folks who
manage the VM. Having the RX queue full statistics in VPP can inform
that there might possibly be drops in the host.

Type: improvement

Change-Id: I43206647ac0d8092968c4187236d9696ae0acccd
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-05-23 17:50:50 +00:00
Adrian Villin
0df582e8ec hs-test: fix CPU alloc when running in parallel
Type: test

Change-Id: I6062eddffb938880d9ec004c8418a9a731891989
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-23 15:48:50 +00:00
Guillaume Solignac
f5df854389 vppinfra: support libunwind for backtrace
On non-glibc systems, execinfo is the only option available, but the lib
is old and can crash when unwinding. We now can use libunwind to unroll
it instead of using execinfo.h.

Type: improvement
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I8b55f7aca97261a2efb5dca998889d5e0645939a
2024-05-23 13:56:28 +02:00
Guillaume Solignac
5444973bd0 vlib: prevent some signals from being executed on workers
Before this commit, SIGINT, SIGHUP and SIGTERM could be executed on the
workers. Since those signals don't stop execution, it meant that atexit
handlers (like the `vl_unmap_shmem`) could run while the main thread was
still running, which can cause race conditions. To avoid that, we
prevent workers from handling those signals.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I27a87d96a027d7423ced881a614427af4ab0f969
2024-05-22 12:52:31 +00:00
Andrew Yourtchenko
71e0902454 misc: Initial 24.10-rc0 commit
Type: docs
Change-Id: If9cfc421a0769b68a8520e99c41c954db1973ca9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-05-22 12:58:06 +02:00
Brian Morris
f03d448142 session: remove ipv6 lookup threading assert
This makes session_lookup_connection_wt6 consistent with session_lookup_connection_wt4 -
they both just return an error for wrong thread.

Type: fix
Change-Id: Ide38976e9a7274b53311e65711098e6b22a3f8d5
Signed-off-by: Brian Morris <bmorris2@cisco.com>
2024-05-21 15:30:08 +00:00
Matus Fabian
a5668eb055 builtinurl: mark api as deprecated
Plugin will be removed since it is incorporated in http_static plugin
for longer time.

Type: refactor
Change-Id: I6ed99d1b118fb5951aafceb05a953f39d325e87e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-20 20:01:04 +02:00
Adrian Villin
688ac5ae55 hs-test: fixed timed out tests passing in the CI
Type: test

Change-Id: Id05ea56bc5dfd80d42b8600cf11e763e25420bd0
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-17 16:47:00 +00:00
Matus Fabian
595d8cb668 http: ignore http_proxy env in tests
Type: test

Change-Id: I45a091a43e7ecb3f321fc9ecc761df2b44c9c351
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-17 11:28:43 +02:00
Adrian Villin
46d66000fb hs-test: updated api calls
Type: test

Change-Id: I2583ee74426ef154d03d4991b78ab57c5cec436f
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-17 03:11:13 +00:00
Maxime Peim
f66702df6b ip-neighbor: show age instead of time in cli
To match the API behavior, and as it is more useful to have an entry
age than its time last probe.

Type: fix
Change-Id: I07680cd713d0d2b6208a58208b032af7f6a92825
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-05-15 17:55:27 +00:00
Matus Fabian
fec709125b http: fix unsupported client app method
HTTP client app code currently support only GET method but method
set in message from client app was silently ignored.

Type: fix

Change-Id: I99dc6323d9783ee5a20623e7923cfdbf31474a4f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14 22:39:38 +00:00
Matus Fabian
3d00893c37 http: notify client when connection failed
Type: fix

Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14 22:38:23 +00:00
Matus Fabian
b7a9ed75fb http: fix server sending all status codes
Type: fix

Change-Id: I4bc748e3091c2fbe0142d1b74d21a543a62c4ce0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-14 22:36:31 +00:00
Scott Hutton
182d8b2ddb sr: move srmpls to a plugin
Move sr_mpls folder under vnet to the plugin folder, update cmake configuration
and header paths, and add plugin.c to register plugin.

JIRA: VPP-2054

Type: improvement
Change-Id: I1ad6f287f67eb0c35588c339bcd51218fadf5f8e
Signed-off-by: Scott Hutton <schutton@cisco.com>
2024-05-14 07:53:35 +00:00
lajoskatona
9850d301b0 marvell: remove uses of uint
This change changes all instances of `uint` to `unsigned int` to avoid
use of the non-standard type. This fixes problems that some versions of
GCC may have.
For similar patch see: https://gerrit.fd.io/r/c/vpp/+/40762

Type: fix
Change-Id: I0c666de788ac5b3c457e0a073e3e279f2fb99a4f
Signed-off-by: lajoskatona <katonalala@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-05-14 07:52:19 +00:00
Tom Jones
2e87d942ab vppinfra: Add platform cpu and domain get for FreeBSD
Type: improvement
Change-Id: I5253f2b1b51493f2d4d0f451ad4c2208fd8f6bf2
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-14 07:46:44 +00:00
Vladislav Grishenko
703289224c vppinfra: fix mhash oob after unset and add tests
Fix out of buffer access after mhash_unset
Add format mhash pair functions
Add related mhash tests, similar to hash ones

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Idbefd7d32c4cd16b55d84ad4006c38251b4e2c33
2024-05-14 07:37:50 +00:00
Tom Jones
2f5d094ddd dpdk: Only prealloc huge pages on Linux
Type: improvement
Change-Id: I4d9c0f96d81c8b510086a54990b3fcd3d5fdb695
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-14 07:34:25 +00:00
Tom Jones
16cc51b88a netmap: Reinstate and update netmap plugin
Thet netmap plugin was moved to depreciated in commit 998b8fe.

On FreeBSD netmap offers a natively supported kernel interface for
userspace networking and enables VPP without the use of DPDK.

Reinstate the netmap plugin and adapt it to the newer plugin interface.

Type: improvement
Change-Id: I113daa33a490f04cbb29909f9789fa66284ac80e
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-14 07:15:12 +00:00
Matus Fabian
2516b1ac73 http: fix user agent in request
App name is used in HTTP request User-Agent header.

Type: fix

Change-Id: Ib761e8a8e793e04e8d77141cc8c0f8514ed0e547
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-13 15:06:26 +00:00
Vladimir Zhigulin
05c625f1f6 vlib: avoid pci scan without registrations
Type: improvement
Signed-off-by: Vladimir Zhigulin <scripath96@gmail.com>
Change-Id: Id1d78a36cec10a01fbf266b016ba364519e5cb66
2024-05-13 15:03:18 +00:00
Alok Mishra
5233ee29cc dev: fix mac address dump in trace output
"port->attr.hw_addr" is set during the port initialization. It won't be
updated if the mac address of the port is changed via the vpp command
line.
Use "port->primary_hw_addr" to dump the updated mac address correclty.

Type: fix
Fixes: 38c619115b

Change-Id: I6c99fcfdfae67efb3606e17f36781c56716ff7ea
Signed-off-by: Alok Mishra <almishra@marvell.com>
2024-05-13 14:59:38 +00:00
Guillaume Solignac
9e45a5732b wireguard: use clib helpers for endianness
In some cases, the Linux helpers for endianness conversion are not
present. We use clib helpers to fix this.

Type: fix

Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I4d21fb5edae6fa6413b10f298a84ff4b88bda5db
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-05-13 14:57:50 +00:00
Guillaume Solignac
9d5fed08ae nat: fix unitialized variable
Fixes an unitialized variable.

Type: fix
Change-Id: I636dc8433679606262d9a974c01f81d8721634f2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
2024-05-13 14:57:50 +00:00
Alok Mishra
b448568fad octeon: add support for mac address update
This patch adds support for updating primary hardware address
on octeon port.

Type: feature

Change-Id: Ib0ff6aaa6dafc209eb71c44b8a6504d3df9aa5c8
Signed-off-by: Alok Mishra <almishra@marvell.com>
2024-05-13 09:00:20 +00:00
Elod Illes
078a3607c3 docs: Use newer Ubuntu LTS in tutorial
The tutorial uses old 18.04 Bionic Ubuntu release, and tries to
install vpp from packagecloud.io's bionic repository which does not
exist. However newer ubuntu releases' repositories exist, so let's
update to newer Ubuntu LTS version: 22.04 Jammy.

Also, the ubuntu vagrant box is old, so let's replace it to a newer,
generic/ubuntu2204, which uses libvirt provider (instead of virtualbox)
and updated frequently, works well for the tutorial. Due to using
libvirt provider, there is no need to customize the VM as those
customizations are present in the box by default.

The truested=yes part is removed from the apt source list command, as
we add gpgkey anyway, thus, no need for this.

Tutorial and vpp build tested with this new box and looks to be working
fine.

Type: docs
Signed-off-by: Elod Illes <elod.illes@est.tech>
Change-Id: Idcff693240fc6a1496a240e0d07c5ed43fe833e9
2024-05-10 21:39:54 +00:00
Adrian Villin
637edda132 hs-test: logging improvements
Type: test

Change-Id: Iffefe085e846b6ba614b0d74c4ba9907080a9a59
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-10 03:53:42 +00:00
Matus Fabian
8761095e80 http: fix client parse error handling
Do not return HTTP errors to server on parse errors in client.

Type: fix

Change-Id: Id3e99d69626855848faa87af73002d559d948516
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-09 15:57:42 +00:00
Matus Fabian
2d1bc4c9fe hs-test: add make test-debug target
Run tests on vpp debug build.

Type: test

Change-Id: I51e6f4ac9449c1c5b7eb649af91347188f9227e1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-09 10:46:58 +02:00
Steven Luong
e4238aa34f ethernet: check destination mac for L3 in ethernet-input node
When the NIC does not support mac filter, we rely on ethernet-input
node to do the destination mac check, ie, when the interface is in L3,
the mac address for the packet must be the mac address of the
interface where the packet arrives. This works fine in ethernet-input
node when all packets in the frame might have different interfaces, ie,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is not set in the frame. However,
when all packets are having the same interface,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is set, ethernet-input node goes
through the optimized routine eth_input_single_int -> eth_input_process_frame.
That is where dmac check has a bug when all packets in the frame are
either, ip4, ip6, or mpls without vlan tags. Because without vlan tags,
the code handles all packets in fast path and ignores dmac check.
With vlan tags, the code goes to slow path where dmac check is handled
properly.

The fix is to check if we have a bad dmac in the fast path and force the
code to go to slow path which will handle dmac check properly.

Also do a wholesale correction on all the testcases which do not use
the proper dmac when sending L3 packets.

Type: fix

Change-Id: I73153a805cecdc24c4eefcc781676de04737ae2c
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-05-08 09:42:23 +00:00
Matus Fabian
dba5c41942 http: fix client send another request
HTTP client should be able to send another request after large data
receiving.

Type: fix

Change-Id: I8352ea760a4b3de4b79159531c7e4c1fa4e03203
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-07 17:06:51 +00:00
Matus Fabian
b8c762cc22 http: notify client on request error
Notify client app that we errored out while trying to generate request.

Type: fix

Change-Id: I3e20fe22d8a927ae8e9bf8391297e10c974dc941
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-07 17:01:01 +00:00
Ole Troan
1a319aadc6 api: add to_net parameter to endian messages
The VPP API auto-generated endian conversion functions are intended to
be symmetrical. They are used both by the API client and the API server.
Called on send to convert from host endian to network endian and on
receive to convert back.

For variable length arrays, we have to iterate over the array and call
a more specific handler for the array type. Unfortunately the length of
the array is part of the api definition, and if it's endian swapped
prior to the for loop, unexpected behaviour will ensue.

There was an earlier fix, for some specific messages, but unfortunately
that only fixed the problem from the VPP (server) side.

This adds a new parameters to the endian handler, so the boundary
argument to the loop can be treated differently depending on if this
message is to the network or from the network.

Type: fix
Change-Id: I43011aed384e3b847579a1dd2c390867ae17a9ad
Signed-off-by: Ole Troan <otroan@employees.org>
2024-05-07 09:59:31 +00:00
Ole Troan
4013851e42 api: upgrade cjson and fix realloc
Upgrade cJSON library to patchlevel 17.
Replace internal realloc added earlier 36217e3ca.

Type: fix
Fixes: 36217e3ca
Change-Id: I7d8a80dc4241e9f952895d24adca8fa2d873e746
Signed-off-by: Ole Troan <otroan@employees.org>
2024-05-07 09:59:00 +00:00
Eric Sun
ee98c9dd8e vlib: fix use of RTLD_DEEPBIND for musl
RTLD_DEEPBIND only exists in glibc. If it isn't defined we can just
ignore it.

Type: fix
Change-Id: I5b2d65b2462020808635b057d5f7665fb75a2444
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Eric Sun <esun@meraki.com>
2024-05-06 11:55:39 +00:00
Eric Sun
c353b3622b tests: remove uses of uint
This change changes all instances of `uint` to `unsigned int` to avoid
use of the non-standard type. This fixes problems that some versions of
GCC may have.

Type: fix
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Change-Id: I08cce367c2a8f31efb2fccabcb8f699d801b0f8a
Signed-off-by: Eric Sun <esun@meraki.com>
2024-05-06 11:54:44 +00:00
Guillaume Solignac
687707d0b8 vlib: fix missing integer init
Some compilers were not clever enough to figure out these inits
weren't needed. Hence adding them.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I50c4e978bfd2ef15ece7a29e517bb8ddba12f960
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-05-06 11:53:32 +00:00
Hadi Rayan Al-Sandid
4aecd4869c vlib: revert automatic core pinning changes
This reverts commit 71c32a898941e32b5d4f865b50fbe775560c582d.

Type: fix

Reason for revert: vnet pinning is not considered in this patch.
This causes keywords 'workers' and 'skip-cores' to be broken,
as well as keyword 'main-core auto' introduced in this patch.
If this patch is ever reconsidered, it must account for vnet
pinning fix in commit https://gerrit.fd.io/r/c/vpp/+/40711.

Change-Id: I1f3154a6c7e830b100f824375aa00e95b192f7f3
Signed-off-by: hsandid <halsandi@cisco.com>
2024-05-06 11:52:35 +00:00
Mohsin Kazmi
fb113ca560 iavf: disable VLAN stripping when VLAN offload is set in caps
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4cc7433a707649c46d501249477949b62199c8a2
2024-05-06 11:52:07 +00:00
Tom Jones
04880a94c1 dpdk: Only use --file-prefix flag on Linux
--file-prefix is only supported by DPDK on Linux currently.

Type: improvement
Change-Id: I47765ea666b7d14011804e7cc90d9035bce1bc93
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:39:23 +00:00
Tom Jones
e625d0e7af vlib: Add FreeBSD specific platform files
Type: improvement
Change-Id: I0739959084d7cfd8309793f54c92c046b94d7a02
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:38:56 +00:00
Tom Jones
3d372e6553 dpdk: Only reconfigure max pipe size on linux
FreeBSD dynmically grows pipes based on usage and available system
memory. Don't try to resize pipes on FreeBSD for now.

Type: improvement
Change-Id: I78b06dead5d42a3a7bdf634a67b43ef854e510f8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:38:40 +00:00
Tom Jones
f4c79967a6 vppinfra: Include param.h on FreeBSD
Type: improvement
Change-Id: I5fa90dd26d6cac2cefee009c97dd5ff8dac3ee1e
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:37:44 +00:00
Tom Jones
3b8819524f dpdk: Don't depend on rdma-core on FreeBSD
Type: improvement
Change-Id: Icad058df22d3f9d65b086215cc17b1ab32d59eb8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:37:06 +00:00
Tom Jones
5267b53528 dpdk: Use gnu sed on FreeBSD for header fix ups
FreeBSD sed isn't compatible with gnu seds in place option. On FreeBSD
explicitly use gsed, on Linux and other platforms this is available just
as 'sed'.

Type: improvement
Change-Id: I6e4fcaf11d4d22cd3e4cd0c3327b16393542845f
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-05-06 11:36:29 +00:00
Monendra Singh Kushwaha
0a2fdc5669 octeon: fix rvu vf device id
Type: fix
Fixes: I1ea92f

Change-Id: Idf91b3f4cb3cc93081a282a14ffe2421a3628509
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-05-06 11:23:16 +00:00
Monendra Singh Kushwaha
c2bbc7bc8c octeon: add max packet length check
This patch compares packet length with maximum supported
packet length and drops the packet accordingly.

Type: fix

Change-Id: I80ef453d43149818936649e1e58ae90c84a34ab9
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-05-06 10:06:51 +00:00
Monendra Singh Kushwaha
622003c813 octeon: fix buffer free for more than 6 segment
Type: fix
Fixes: 01fe7ab

Change-Id: I4423d287e8148344754b2f6a13886c093a1384e4
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-05-06 10:06:51 +00:00
Florin Coras
916ca8d5a0 vcl: allow more rx events on peek
If peek touches all data in the fifo, unset fifo event to request new
events when more data is enqueued.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I878fa017f18ada5cef557600673bba920f230542
2024-05-03 20:05:33 +00:00
Stanislav Zaikin
51e6c0d5fe interface: fix check in set_interface_name api
set_interface_name may crash if wrong sw_if_index is passed e.g. ~0

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: Ic7e400c914fb33c2f9eac4f2985bb5b163a18d57
2024-05-03 17:08:55 +00:00
Matus Fabian
616201abe2 http: fix http server in response
App name is used in HTTP response Server header.

Type: fix

Change-Id: Ie3b2d985dd7d554a0352f7e602891f878bebd031
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-03 08:17:16 +02:00
Mohsin Kazmi
7b3339efff gso: use the header offsets from buffer metadata
Type: improvement

Change-Id: I955fbef0e0238cb69307e96cd1c677061737e5f3
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-05-02 14:51:59 +00:00
Eric Sun
c2db8491e8 acl: add missing byteswap header for musl
On glibc this builds fine; on musl the byteswap header doesn't seem to be
included properly. This change adds it, fixing the build.

Type: fix
Change-Id: I402812409395d471357b6317084774afba39548f
Signed-off-by: Eric Sun <esun@meraki.com>
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2024-05-02 10:46:05 +00:00
Filip Tehlar
d894438f04 http: fix client receiving large data
HTTP client was relying on synchronous rx notifications to the client
app when moving lage data from underlying transport proto.
Recent change in session layer made such notifications asynchronous
making http client not working. This patch fixes the issue.

Type: fix

Change-Id: I4b24c6185a594a0fe8d5d87c149c53d3b40d7110
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-05-01 05:07:26 +00:00
Damjan Marion
1db11b7d8d octeon: fix roc_nix_npc_mac_addr_get() return value check
Type: fix
Fixes: 01fe7ab
Change-Id: I46782c69773085f9e6a8dfff798bb42b1e822c32
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-05-01 01:17:20 +00:00
Klement Sekera
0f1fda9cec tests: remove duplicate SVR test case
Type: fix
Change-Id: I4105109c1c659190fc2da4ee1802ef53449a3c15
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-05-01 00:59:42 +00:00
Adrian Villin
fd9efaec17 hs-test: disable color output
Jenkins cannot display colors in console output

Type: fix

Change-Id: I5365dec471d773dae1f139c5fabd0711298f8bea
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-05-01 00:24:55 +00:00
Damjan Marion
9f2799fda4 crypto-native: add SHA2-HMAC
Type: feature
Change-Id: I9e7ebf43536c972a62621fc7ad7406abec0ce071
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-30 14:38:28 +00:00
Matus Fabian
18c9f14037 hs-test: fix cpu allocator
Effective CPUs file is different between cgroups v1 and v2.

Type: test

Change-Id: Ic1b9059435b3f0944624120f57e72da45adca223
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-29 15:44:41 +00:00
Guillaume Solignac
52bd5376e4 pci: fix missing limits.h
When building with musl, PATH_MAX is not available if we don't add its header
to pci.c.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I3d4e7cf5754d7c1d480834d7cd038d5bda46fd2f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2024-04-29 08:35:20 +00:00
Dave Wallace
83b12bf895 hs-test: clean up Makefile for compatibility with ci-management
Type: test
Change-Id: Ic767bc1eef0180941dd8730f9fcca1389ad7e043
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-04-26 01:48:58 +00:00
Tom Jones
5389a70c9b vcl: Only exclude vcl ldpreload on FreeBSD
Previously all of the vcl library was excluded from the build on
FreeBSD, this was too agressive as only the ldpreload component requeres
platform specific implementation for FreeBSD

Type: improvement
Change-Id: I94e70d7730878cc98060561eedf07cb7e4d1868a
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-25 17:06:15 +00:00
Tom Jones
1613e401e7 hsa: Link against libepoll-shim
Type: improvement
Change-Id: I08610ce71282f10c587d956b27e0f572a812bedd
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-25 13:33:34 +00:00
Dave Wallace
62af9bb645 dpdk: bump rdma-core to 51.0
- Per dpdk 24.03 release notes (rdma-core >= 50.0)

Type: feature
Change-Id: Ieed077dc9b54cc1c59c75ebdbccfc683c7636222
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-04-24 19:17:29 +00:00
Tom Jones
d346b8852a vlib: Add FreeBSD thread specific header and calls
Type: improvement
Change-Id: Ia84683936da02968991ea717316a834a5da1a517
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 16:40:24 +00:00
Tom Jones
1817c8e609 vppinfra: Link against lib execinfo on FreeBSD
Type: improvement
Change-Id: Ie3d6cba886e0779949e8d574f82cff62abc7ebed
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 16:06:58 +00:00
Tom Jones
97188d71dd vppinfra: Add FreeBSD method for updating pmalloc lookup table
FreeBSD has a different interface to request memory mapping information.
Add a FreeBSD specific method for reading physical addresses and make it
available at build time.

Type: improvement
Change-Id: I3588dde8e0a6f6d53333040245341ed09cebef9d
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 14:40:59 +00:00
Kai Ji
a0fd523013 dpdk: bump to DPDK 24.03
This patch bumps DPDK version to 24.03

Type: feature
Change-Id: I4d7d1348f905579ece3cbe4ab89873abd212c636
Signed-off-by: Kai Ji <kai.ji@intel.com>
2024-04-24 14:40:16 +00:00
Matus Fabian
0d0c590936 hsa: fix http client error handling
Type: fix

Change-Id: I5595260b903e3e1f15caccd168914f33f7161b59
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-24 14:40:06 +00:00
Damjan Marion
804255c9f0 misc: fix int/enum mismatch errors reported by gcc-14
Type: fix
Change-Id: I80e90cab8e2e9fef837779e36e0256baf791b801
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-24 14:33:34 +00:00
Damjan Marion
21c5ae36af dpdk: remove unnecessary includes
Type: improvement
Change-Id: Idf3d440ee9763b54c973e6d87394b786eb66e307
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-24 14:32:59 +00:00
Damjan Marion
ee577115ff dpdk: remove dead code
Type: improvement
Change-Id: I888f29e1ff15c5aa59a2a74dc0b2a818baf0bfde
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-24 14:32:29 +00:00
Tom Jones
b2a357bc1f vlib: Add a skeleton pci interface for FreeBSD
Implement a subset of the pci interface with unimplemented methods
marked with a comment. This is enough functionality to allow dpdk to
attach to pci devices and forward traffic on FreeBSD.

Type: improvement
Change-Id: I0d87778cd92ae332a6802c11083d3d99988678a1
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 12:31:24 +00:00
Tom Jones
154e19c09a fateshare: Add FreeBSD specific API for controlling processes
Type: improvement
Change-Id: I7ea8b5505a2663d6751208f0001e4b9ba2deb150
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 12:30:01 +00:00
Tom Jones
abd6a7b2b5 api: Add FreeBSD specific mechanisms for unix sockets
FreeBSD doesn't support SCM_CREDENTIALS, but has an equivalent mechanism
called SCM_CRED. This is documented in unix(4), use SCM_CREDS on
FreeBSD.

Type: improvement
Change-Id: Iaf4ec0d68445239c06fa0eef6c25db7e3328e989
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 12:23:25 +00:00
Tom Jones
1dcb24c347 dpdk: Use FreeBSD specific values for network interface classes
The PCI class values used to identify devices are different between
platforms. Add a selector for the values used on FreeBSD.

Type: improvement
Change-Id: I981f0dc24954457068fc94bcc4681b120ee253db
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 11:43:32 +00:00
Tom Jones
da03d6b3f5 dpdk: Only use vmbus on Linux
Type: improvement
Change-Id: If181c4bfd7fc93583a608d478bd070930c853f52
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 11:38:01 +00:00
Tom Jones
2535bdea47 dpdk: Disable building FreeBSD kernel modules
Disable building the FreeBSD kernel modules, while these are required
to run, this dpdk step will fails inside the vpp build.

If the build succeeded this step would try to install the kernel modules
as root in the vpp build which also isn't desirable. For packaging the
kernel modules should be provided in a seperate package rather than
through the vpp build process.

Type: improvement
Change-Id: I01f1ae2845445e2babad380b675054b80d4b325b
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 11:33:45 +00:00
Tom Jones
934bab6766 dpdk: Only use vmbus on Linux
Type: improvement
Change-Id: Iba3e287f420c0bdc8d248695163e7dfe1acd24d8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 11:33:19 +00:00
Tom Jones
cc0c8c7e9e dpdk: Only require libnuma on Linux
On FreeBSD the numa APIs are always available.

Type: improvement
Change-Id: I34b8f6b0a81bc3d73f9b95b10d3a788dcdd71b65
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-24 11:30:34 +00:00
Tom Jones
ab47993a00 vppinfra: Add method for getting current executable name
Add a unix method for getting the current executable name. This is
implemented to match the readlink api for existing calls.

Type: improvement
Change-Id: Id06a55892d09d0b305a56b55a424f53ffb685a72
Signed-off-by: Tom Jones <thj@freebsd.org>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-24 10:30:20 +00:00
Brian Morris
c0580f91a1 tls: don't upper-case cipher string
Change-Id: Ic8308046610aa5d49d9595bcd450f9651b9915e4
Signed-off-by: Brian Morris <bmorris2@cisco.com>
The string is allowed to contain lower case characters, for example "TLSv1.2"
Type: fix
2024-04-23 20:17:10 +00:00
Gabriel Oginski
6edc6bcc31 ipsec: fix CLI for create ipsec itf
This commit adds missing support in CLI for creating ipsec itf
in p2mp mode.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I1bd1cc6667625b8e527af8d25bd8e723751dbc41
2024-04-23 13:03:10 +00:00
Guillaume Solignac
9abc01f251 octeon: add promisc support
We add the capability to enable and disable promiscous mode on the
octeon port.

Type: feature
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I9a1464d2e1e8a0570ff16e221a4896aedc3ed6f8
2024-04-23 12:58:47 +00:00
Maxime Peim
f13534e79d tests: allow ip table name
Type: refactor
Change-Id: I4abbc77a447358f4beaa05505299cae732a3f374
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-04-23 08:52:48 +00:00
Denys Haryachyy
07b2274073 ikev2: uptime
Introduced SA and child SA uptime.

Type: improvement

Change-Id: I28cf9f90d35ebe035a31ed0a985a5e462c8536a8
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
2024-04-23 08:52:23 +00:00
Matus Fabian
bbee45c80b hs-test: add tests repeat option
Type: test

Change-Id: I0143d26d929f6408a5399d7ca536e48cbd9d46bb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-23 00:37:23 +00:00
Matus Fabian
c899ab4e56 hs-test: fix TCP with loss test
Load NSIM plugin.

Type: test

Change-Id: I250f51e6622419d98fd17216031a5b4d2da07fba
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-22 20:37:11 +00:00
Monendra Singh Kushwaha
043560ef2d octeon: add support for SDP device
This patch adds support for SDP (System DPI Packet Interface Unit)
device.

Type: feature

Change-Id: Idf1f53b151edf2992613746d5818409187b4b051
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-04-22 19:10:05 +00:00
Tom Jones
36d099a5cd vlib: Place linux pci headers in a linux include block
Type: improvement
Change-Id: I6b30ffd1eabfa9544d548082b7e38b8fe7224c07
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-22 19:09:13 +00:00
lijh_7
4c15c94b09 nat: add saddr info to nat44-ed o2i flow's rewrite
Type: fix

Change-Id: Ic303ff9b21872b7cc31f23c92e48ec3737eeb8fe
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
2024-04-22 11:11:56 +00:00
Anton Nikolaev
67226438c6 ipip: specify af for a tunnel ip addresses
Currently ipip tunnel allows to use an empty addresses for dst when we
trying to add tunnel, but it doesn't return it correctly on ipip dump
call. There is case when we create an ipip tunnel with an empty ipv6
address, address is zero, but AF is ipv6. And when we dump ipip tunnels
we get an emtpy ipv4 address instead of an empty ipv6 address.
There is no point to detect AF for each address in
send_ipip_tunnel_details, because ipip tunnel can't handle different
AF for src and dst addresses, and prohibits creating ipip tunnel
with different AF of dst and src addresses.

With this fix, send_ipip_tunnel_details function return a correct AF
despite address value.

Type: fix
Change-Id: Ib343293ad79a300cdb70135fffbfd156dfef6e27
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
2024-04-19 18:28:39 +00:00
Adrian Villin
cee15aa940 hs-test: transition to ginkgo test framework
Type: test

Change-Id: Ia38bf5549d20b22876f6082085b69a52a03d0142
Signed-off-by: Adrian Villin <avillin@cisco.com>
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-04-19 14:52:05 +00:00
Vratko Polak
3a05db6264 sr: use correct reply to sr_policy_add_v2
Type: fix
Fixes: c4c205b091934d96a173f4c0d75ef7e888298ac7

Change-Id: I110729601a9f19451297883b781ec56e2b31465b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2024-04-18 15:28:47 +00:00
Florin Coras
9a5caec182 session: force session cleanups on app detach
Force transport and session cleanup on session detach if transport is
already closing. This should also avoid races between transport
initiated session cleanups and pending session control events.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I83a947a0c01f5af8ac70aa31fee660276f1d1c60
2024-04-17 19:03:28 +00:00
lijinhui
8188f47eb8 ip: fix comments for icmp4
Type: fix
Change-Id: I5f309ca4db4ae4a3e475d87b8f0188c4ead5e562
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
2024-04-15 23:33:25 +00:00
Niyaz Murshed
dd5f75c6fd crypto-sw-scheduler: crypto-dispatch improvement
Currently sw_scheduler runs interchangeably over queues of one selected
type either ENCRYPT or DECRYPT, then switches the type for the next run.
This runs perfectly when we have elements in both ENCRYPT and DECRYPT
queues, however, this leads to performance degradation when only one
of the queues have elements i.e either all traffic is to be encrypted or
decrypted.
If all operations are encryption, then 50% of the time, the loop exits
without dequeueing.With this change, that dequeueing happens on every
loop. This increases the performance of single mode operation (ecryption
or decryption) by over 15%.

This change was also added in commit 61cdc09810
to fix similar performance issue when the crypto-dispatch node is in interrupt
node, however was removed by 9a9604b09f
which has its own limitations.

Type: improvement
Change-Id: I15c1375427e06187e9c4faf2461ab79935830802
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
2024-04-15 23:30:55 +00:00
Anton Nikolaev
4ebe5eef8a linux-cp: fix seg fault in get_v2 methods
vl_api_lcp_itf_pair_get_v2_t_handler method was not be able to
handle invalid sw_if_index, it caused a seg fault.

With this fix, the method checks for an invalid sw_if_index and
sends error back to caller.

Type: fix
Change-Id: I4e89b0cab34f9109c4ce2689021ecfc2786055ab
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
2024-04-15 14:41:21 +00:00
Florin Coras
d7f0daecce g2: fix gpointer cast complaints
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iadd6a4dd928002e764fc52343c14403620279aa7
2024-04-11 01:07:59 +00:00
Benoît Ganne
a1d20405b7 stn: fix non-NULL terminated string overflow
Type: fix

Change-Id: I9d7e6dd099cf9f4b7f6bb06d9e8a17fac7d7e772
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-04-11 01:06:20 +00:00
Benoît Ganne
11f7965350 tcp: check for header truncation
Type: fix

Change-Id: I0a43a37971d03a700926d59e848f0b6e6dbeb19a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-04-11 01:06:03 +00:00
Florin Coras
aa78631d75 session: add api to detach session from app
Type: improvement

Change-Id: Ib824d0ca9efc7d8967e043db69017655b2dcf6b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-04-10 19:35:48 +00:00
Benoît Ganne
50e7ea7b14 vlib: fix vlib_buffer_free_inline() AVX-512 overflow
'queue' is declared on the stack and must be big enough to handle
queue_size + max processed elements per loops.
When AVX-512 was added, this additional max was not increased from 4 to
8 accordingly.

Type: fix
Fixes: 767a9ab4b1

Change-Id: I15f2f930fc316f92da2e4642f41852d856c06a48
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-04-10 14:04:51 +00:00
Wim de With
f521df7200 build: use GNUInstallDirs where possible
Some installation destinations were already converted to the
GNUInstallDirs standard in e3cf4d0cf. This patch converts the share and
include directories (typically /usr/share and /usr/include respectively)
as well.

Type: improvement
Change-Id: Id481b16604f3f52203166a5c0647f43d6eb05239
Signed-off-by: Wim de With <wf@dewith.io>
2024-04-10 13:59:41 +00:00
Damjan Marion
a447c66e55 vppinfra: add support for precomputed SHA2 HMAC key and chained buffers
Change-Id: Ic1fa3bd164e80c2ca1146be001870da0238a5f2e
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-09 21:09:21 +00:00
Maxime Peim
b0d433978b tests: allow to add paths to default route
After adding a path to the default route, the prefix still be there
in the table as it is a mandatory prefix. However, the registry hence
fail to remove the route from VPP.

Type: fix
Change-Id: Ic4ad72455ac7a1a2f1d8baba59a7a3afe1610726
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-04-09 17:30:57 +00:00
adrianvillin
bfbe7a8c9a tests: Added a simple prom(etheus exporter) plugin test
Type: test

Change-Id: Ibceabc411f09d80cc23be6f2e7c8abd56d4c4ac2
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-04-09 16:17:29 +00:00
Tom Jones
bf89b81779 build: Error out Makefile if bash can't be found
Type: improvement
Change-Id: I3bba4e53364dbcc0d7a373fdc9cac2db3bbb4249
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-09 15:15:45 +00:00
Tom Jones
5997a5db0a acl: Use clib_net_to_host rather than library bswap
Type: improvement
Change-Id: I51345fb75843c67c6bf6a4c56380e1f0899c45b1
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-09 15:14:54 +00:00
Benoît Ganne
7b899be710 fib: fix off-by-one error in rewrite length check
The rewrite string can be up to max_size, and max_size can be up to
VNET_REWRITE_TOTAL_BYTES. Don't waste the last byte.

Type: fix

Change-Id: I2fb7e9873b6b4c1e6a55b172c7f753f3c5910802
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-04-09 04:49:17 +00:00
Vladislav Grishenko
302db471a0 mpls: fix default mpls lb hash config
In case of multiple path within tunnel, mpls lookup node
computes lb hash with mpls_compute_flow_hash config value 0,
so only mpls label and l4 ports gets accounted, not 5-tuple.
This leads to flow traffic polarization and disbalance over
mpls paths.

Use mpls hash config from lb instead, usually it'll be
MPLS_FLOw_HASH_DEFAULT with 5-tuple plus flowlabel.
As optimization, fix flow hash reuse from the previous lookup
node if present, like ip_lookup does. Previously mpls lookup
always calcs the hash.
Test lb distribution for both cases.

Also, use the same flow hash hex format in ip4/ip6 and mpls
traces for easier reading, most code changes is due fixstyle
formatting.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib89e1ab3edec14269866fe825a3e887d6c817b7c
2024-04-09 04:47:02 +00:00
Pim van Pelt
2a7bc81ae3 vnet: fix ARP for unnumbered
On unnumbered interfaces, ARP fails because there is no attached route.
Allow replies to peer-to-peer addresses on unnumbered interfaces:
  eg. 192.0.2.1/32 <-> 192.0.2.2/32

Type: fix
Change-Id: Ibeb8d8ebc8d58d5bfb0724739a17694e0217356e
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2024-04-09 04:26:21 +00:00
Florin Coras
0bfce6b724 tls: fix session state update on accept
Only set state to ready if session is not already closing.

Type: fix

Change-Id: Ic95667f43ed09d693f1cf7c9f1c16f7f995ea2d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-04-08 16:10:03 +00:00
Dmitry Valter
3150250bc9 vppinfra: fix mask compare and compress OOB reads
Use mask_load_zero to avoid out-of-buffer reads in vectorized
function versions.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I12bcb817ccf2db210c1c99fdfa444dc3f540035b
2024-04-08 11:46:30 +00:00
Damjan Marion
df47a0812a octeon: fix memory ordering issue in tx batch free
Type: fix
Fixes: 01fe7ab
Change-Id: I4425e809f0977521ddecf91b58b26fe4519dd6e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-05 19:33:32 +00:00
Florin Coras
d1364402b6 session: fix cleanup for refused sessions
Type: fix

Change-Id: I739b7129c7e5a3fccefcdeeaf7f4a298223dd8eb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-04-05 16:22:32 +00:00
Damjan Marion
a2f53c700a octeon: fix buffer free on full tx ring
Type: fix
Fixes: 01fe7ab
Change-Id: I4419107c4bcb7f85b76addfc62178b6e75e10a52
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-05 16:00:41 +00:00
Klement Sekera
e8fb3cfe89 api: fix [un]formatting in vpp/api/types.c
vl_api_prefix_t.len is 1 byte only, but unformat %d writes 4 bytes
add helper functions unformat_u(8|16) which don't write more than
appropriate amount of bytes
fix other similar errors in vpp/api/types.c

Type: fix
Change-Id: I74a61a377147c373f8c25ed083052b2287763c39
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-04-05 14:03:40 +00:00
Maxime Peim
37d8c185b8 ip6: fix icmp trace flag copy
Type: fix
Change-Id: I56c1a2717f197c889425449b37f51b0f2cc89ea5
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-04-04 11:41:04 +02:00
Dave Wallace
940a70fff4 tests: upgrade python packages
Type: test

Change-Id: I01500466f3d15c79e38028677ce7e5c75d427fdc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-04-03 14:10:47 -04:00
Matthew Smith
b48325100b tests: figure out correct version of sed to run
In run_in_venv_with_cleanup.sh, sed was changed to gsed to allow the
script to run properly on FreeBSD because the sed script uses an
expression that is specific to the gnu sed. Gnu sed is available to
be invoked as gsed on FreeBSD systems, but there is no executable or
symlink which allows sed to be run by the name gsed on ubuntu 22.04.

Check for the existence of gsed. If it's found, use it. Otherwise, just
use sed.

Type: fix
Fixes: b3c863eae4

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I487197e486f500711aa3e87ec7ba899a53606b40
2024-04-02 18:35:06 +00:00
Florin Coras
461aaa8d7a session: fix closing ntfs handling for refused sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1464e93cd3020eaa26068df558924e39dd255ccb
2024-04-02 16:44:25 +00:00
Dave Wallace
9dec76be0f fib: coverity 335348 out-of-bounds access
- also fix memory leak in adj_glean_walk_proto()

Type: fix

Change-Id: I3cd72b14506e6bfc9d8d77a65d7b9b2703992367
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-04-02 11:12:23 +00:00
Dmitry Valter
966049986a vppinfra: fix array_mask_u32 underrun
Properly handle small buffers in the AVX256 version of array_mask_u32.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Fixes: f62ed3f9c1ec3e8db36f63d6a54f46b7bea43723
Change-Id: Idf1cb43ccf37bd7c439d11e4f68fe30064c6d09a
2024-04-02 11:11:53 +00:00
Vladislav Grishenko
b24ff24da9 api: fix rx timeout thread busy loop after reconnect
After memclnt api client disconnect, read timeout is set to zero
and stays the same even after same client reconnect. It causes
client process to spin in timeout loop up to 100% cpu.
Fix it by resetting timeout process state upon every (re)connect.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I56812972a69c343f869eebbdfebdcbefd3d201e0
2024-04-02 06:56:37 +00:00
Dan Geist
e53e296841 map: BR rule lookup update
Update to the MAP rule lookup (in IPv6) based on the rule's source
prefix instead of DMR

Type: improvement

Per RFC, the DMR is allowed to serve multiple MAP Basic Mapping Rules, but this
capability was prevented by the above logic.

Updates to the code include populating a new hash table based on the MAP rule
ip6 prefix and length, changing several functions to reference this new table,
and slight alterations to a few functions regarding pre-lookup bitmasking.

All changes are commented with [dgeist] and are in need of peer review,
especially the bitmask alterations.

An attempt was made at generating an additonal MAP rule in the test_map_br test
harness, but the coding appears very much oriented towards testing just one
rule. I would appreciate suggestions on how to test multi-rule cases.

Issue: VPP-2111
Change-Id: Id1fea280eba625e23cd893575d9b63aac7f48405
Signed-off-by: Dan Geist <dan@polter.net>
2024-04-02 06:56:04 +00:00
Dave Wallace
3a0d7d2c95 misc: in crcchecker.py, don't check for uncommitted changes in CI
Type: fix

Change-Id: I63260a953e54518b3084b62fccdb4af81315b229
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-04-02 06:55:34 +00:00
Klement Sekera
0f4febfac3 vapi: avoid memory leak
Erase removed elements to avoid memory leaks.

Type: fix
Change-Id: I1605bea8df7e08455691364efb0a12eb0d9dae93
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-04-02 06:55:01 +00:00
Georgy Borodin
f46c5525d2 lb: fix using vip after free
fix use of vip after it was deleted

Type: fix
Fixes: 041eacc81656d2ed5bc01b96b15a7d03a1700f13
Change-Id: I5723485c5da7507fbc6c86ff6eb9f77127439f67
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-04-02 02:39:10 +00:00
Tom Jones
b3c863eae4 tests: Use gnu sed explicitly in test setup/tear down
Type: improvement
Change-Id: Ie79fd8a5bcfd72a97bf460ef6437913ac34f439c
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-02 02:26:29 +00:00
Tom Jones
800386ac3f tests: Add missing socket imports in tests
Type: fix
Change-Id: I646f96517d3bda5c0f5644e6bb89ade7818fc466
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-02 02:25:22 +00:00
Vladislav Grishenko
f2fc97aafc l2: fix vxlan src port entropy with mpls payload
l2 tunnels like vxlan, gtpu, geneva use vnet_l2_compute_flow_hash() to
compute flow hash for udp src port entropy. In case of inner mpls tunnels
to the same lsr ethernet src and dst macs are the same, so l2 flow hash
is also the same leading to no src port entropy and the only rss queue
overflow on receiver side.

Fix it for all the possible vnet_l2_compute_flow_hash callers by making
mpls playload hash in additon to ip4/ip6. Visible performance impact is
not expected as it's only one check for mpls ethertype for common cases.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I69153d42fb3d7c094a670c674fac8d14039c626a
2024-04-02 02:11:02 +00:00
Vladislav Grishenko
704d5a53e0 linux-cp: add support for tap num queues config
This change allows to limit lcp interface queues
to be used by explicit host interface workers.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I0626f66021e5a5f251470156231dc44ddaea5ee6
2024-04-01 20:20:08 +00:00
Jon Loeliger
d465fd0819 fib: add early config support for IP and IP6 default FIB table names
Type: improvement
Change-Id: I8c248d9e224bd069b641a174da57d448371470af
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2024-04-01 18:06:09 +00:00
Tom Jones
e98031646a vhost: Only enable plugin on Linux
Type: improvement
Change-Id: I6cf5adbd609d911e15dcc6d976cda4ad21ce89ad
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-04-01 17:59:37 +00:00
lijinhui
eb2a4189f5 vlib: fix counter_index check
Ensure counter index is valid before using it to lookup
the counter.

Type: fix
Change-Id: I423c7a6aa6b65f6367b18d8e99cf40f52e06b416
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
2024-04-01 17:57:58 +00:00
Damjan Marion
5e814768b8 octeon: specify pool when alloc buffers
Type: fix
Fixes: 01fe7ab
Change-Id: I72fdaca250468d91a31efcce2fb447c97ba49dc7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-01 10:49:57 +00:00
Damjan Marion
cbaa256a14 octeon: refill even if nothing dequeued from rx queue
It may happen that rx queue is empty of free buffers due to previous
alloc failure.

Type: fix
Fixes: 01fe7ab
Change-Id: I344dcda11525444bd1358b3d36ffdf8ab9aa2677
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-04-01 10:48:53 +00:00
Kai Ji
0cbd623d72 ipsec: fix clang compile issue
Type: fix

Change-Id: Ic015b37e18a43c49c3fb3dbff284a17fa2c5fd99
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
Signed-off-by: Kai Ji <kai.ji@intel.com>
2024-03-30 18:54:15 +00:00
Florin Coras
7a18b0f0a5 tls: fix rescheduling when no data available
Don't force tx rescheduling of tls session if no forward progress is
made. The session will still be rescheduled by the session infra if
there's pending tx data.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic57b6ee79969055cec782938668c054bcc39f206
2024-03-30 18:25:24 +00:00
Florin Coras
ea5d5bdd1c session: fix api coverity warnings
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ieb4e9d9e39b937ad4c7316b3955b3ca296f0a191
2024-03-29 18:41:07 -07:00
Florin Coras
7e9e2bd8f2 session: add new api for enq tx io events
Type: improvement

Change-Id: Iefe5c2e610a26241a88ca783ac548fd8f2317bb0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-03-29 21:48:20 +00:00
Florin Coras
a58fce23de session: use custom types for session flags and state
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04f836d09a1cbd5a5b55dc64359d2d761dfc4988
2024-03-29 21:45:18 +00:00
Florin Coras
980ee74b16 session: improve use of session handles
First step towards moving to an 8 byte struct instead of u64.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idd0b95520ab7158e175b9af1702fc09c0613a4bb
2024-03-29 21:45:18 +00:00
hsandid
71c32a8989 vlib: improve automatic core pinning
Type: feature

Auto core pinning now fetches vpp cpu affinity list
using pthread api. This enables us to do core-pinning in
environments where the host cpu list does not necessarily align
with cpus available to vpp

Change-Id: Ife8c2a2351c08c5c6c4fdf7c729eeff2697bc39a
Signed-off-by: hsandid <halsandi@cisco.com>
2024-03-29 16:29:44 +00:00
hsandid
3e147f08ef misc: deprecate lawful-intercept
Type: refactor
Change-Id: Ifd7f5b351401cdcaaaf57fefc5dbbfdaf235054e
Signed-off-by: hsandid <halsandi@cisco.com>
2024-03-29 13:31:50 +00:00
Mohammed Hawari
dcb5eb5a18 acl: rework headers to enable out-of-tree usage
Change-Id: I1f8adf1f5650ab6c04e03c95d7a8d0bfa39b5f2d
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2024-03-28 16:56:32 +00:00
Florin Coras
7c2a3357f3 tls: init session for accepted ctx
Make sure session is marked as invalid.

Type: improvement

Change-Id: I1c861645de95ef15a24acd4fe6dd5364a55b4fb8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-03-26 19:48:33 -07:00
Florin Coras
e8ea6be8df tcp: avoid fr segments less than mss if possible
Type: improvement

Change-Id: I958e059384db3c13a29f64be96877f57617bbae2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-03-26 17:24:07 +00:00
Tom Jones
4941afb4f9 tests: Add support for getting corefile patterns on FreeBSD
Type: improvement
Change-Id: I960edc05a9a77eb55f67cb1ec01d2b3122298ef8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:15:02 +00:00
Tom Jones
e49e75a4b5 tests: Add platform handling for FreeBSD
FreeBSD doesn't have an easy mechanism to discover CPU features
currently. For tests declare we don't support anything we are asked
about.

Add the FreeBSD spelling of amd64 while we are here.

Type: improvement
Change-Id: I3eb5db856ee5cbc71250e47eee619e2f620de33a
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:14:29 +00:00
Tom Jones
ebe3a11ca7 tests: Add missing struct import
Type: fix
Change-Id: I957877d7a82dea437c072e493561894f11321aaf
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:14:05 +00:00
Tom Jones
853cc9f2ad tests: Use errno value rather than a specific int
For portability we use errno defines rather than explicit int values
when checking for errors.

Type: improvement
Change-Id: Ib5fc1db357da150d008d5a11bef5dbc7ec354cfb
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:13:34 +00:00
Tom Jones
b3ee84d0bb tests: Add a socket timeout
On FreeBSD a races seems to occur between the states socket connecting
and VPP accepting the connection and calling getpeername. The recv_fd
call here will fail with no fds before the VPP process has time to
handle the connection.

Introducing a socket timeout removes this failure on FreeBSD and allows
the test suite to run. Add a timeout on all platforms to try to avoid
this race everywhere.

Type: improvement
Change-Id: I96f77f924a9491222bc213b534cb17001d081f3f
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:12:48 +00:00
Tom Jones
26eec75f2b build: Detect number of CPUs for build processes on FreeBSD
Type: improvement
Change-Id: Ia3a00266f47f0c3e567efa143ef08bf4e8cffe35
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:09:39 +00:00
Tom Jones
b10561bbec papi: Use CMSG_SPACE for sizing ancillary buffer space
CMSG_LEN provides the length required to store an ancillary item, but it
does not consider padding. RFC 3542 requires portable applications to
use CMSG_SPACE(), this is documented in the python API:

https://docs.python.org/3/library/socket.html#socket.CMSG_LEN

Type: improvement
Change-Id: I0eab470585f2f39bea38639db95d6b0e047d2cff
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:09:29 +00:00
Tom Jones
dfd426c2c8 nat: Include platform specific headers on FreeBSD
Type: improvement
Change-Id: I43f59037181ec6b76499e8ee1d82c04670119dc9
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-26 15:08:49 +00:00
luoyaozu
4f30bc7457 vrrp: fix vrrp_garp_or_na_send()'s memory leak
need free bi after send packets

Type: fix

Signed-off-by: luoyaozu <luoyaozu@foxmail.com>
Change-Id: I98d03820366c3d106df212c4eb353ec6a228e20e
2024-03-26 14:25:39 +00:00
Florin Coras
8ae63db020 vcl: add api to retrieve num bytes for tx
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iaa1b026e2baea1c03f8c75e7d6879d0ff6d379d6
2024-03-25 18:53:05 +00:00
Florin Coras
a8d266a7a4 tls: pass session state to engine on client init
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe218a922ab656b8362e3c085193cb848783c255
2024-03-24 00:03:49 +00:00
Dmitry Valter
5f22f7d11c fib: fix vectorized impl buffer typo
Fix copy-paste typo with an incorrect index.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I463e6f016df9cd24e96defcd30c1b442b8809416
2024-03-23 12:13:28 +00:00
Fan Zhang
a4df00f651 ipsec: esp_decrypt code clean up
Type: improvement

Change-Id: Icac31a8a3da71334e2b877f3b8e5d5a7cc5e76b8
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2024-03-22 14:30:40 +00:00
Dmitry Valter
b300180082 dpdk-cryptodev: fix coverity issues
Copy v23.10-rc0-154-gfeda2ff64 fix to the unbatched path

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I2f58ed9a39439b22918946f328f96e676c68add9
2024-03-22 13:40:47 +00:00
Maxime Peim
e119586138 mss_clamp: fix next layer in ipv6
Type: fix
Change-Id: I06d56e6d4be2e728e13053a66273a71656ac14c4
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-03-22 10:15:55 +00:00
Florin Coras
5bd96b7733 session: fix workers race to allocate lookup table
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I60600452c91184da571d4630bf2f0d9c24a3e85e
2024-03-21 18:01:32 +00:00
Arthur de Kerhor
2f4586d9b3 ip: add support for buffer offload metadata in ip midchain
The offload should be handled by gso node or by the NIC
if the latter has the relevant capabilities. But ip midchain
is missing the support for buffer offload metadata in case
of GSO packet.

This patch adds the relevant support to add the buffer metadata
if the packet is GSO/IPIP to be handled accordingly.

Type: improvement

Change-Id: I17f5d71bf4c5f43a85ca3f2fbebfa1426b42ef69
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-03-21 14:38:49 +00:00
Fan Zhang
b8cb22318c ipsec: remove unused parameter for esp_add_footer_and_icv
Type: improvement

Change-Id: Ib6c4e6bc42dd63cb2fdb2dfa7e94baa709e7185b
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2024-03-21 13:34:18 +00:00
Florin Coras
e565902654 tls: avoid app session preallocation
Since async rx event infra decouples notification event generation from
delivery we no longer run the risk of having tls realloc session pools
while session layer still holds a pointer to the accepted/connected tcp
session.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1bb429a058707aba1d4f32ea33615a2367e66969
2024-03-20 20:07:05 +00:00
Tom Jones
40c95f50ba vppinfra: Define EBADFD on FreeBSD
Type: improvement
Change-Id: I303a8a7333d44f6eab902d4d61023cfa96760dd2
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-20 16:44:20 +00:00
Tom Jones
3076c69a9e vcl: Only build vcl_ldpreload on Linux
vcl_ldpreload requires some additional porting for FreeBSD, until that
can be completed only build on Linux.

Type: improvement
Change-Id: I9b0942114252a0c6241640d2e454861c2b5d4304
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-19 15:21:05 +00:00
Florin Coras
ac60efd523 tls: handle attepts to renegotiate hs
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I549d0c8715e5c06bfc22be26ca1dc78ec3c29a61
2024-03-18 19:20:38 +00:00
Stanislav Zaikin
dc4d21e9ce vapi: uds transport support
introduce ability to connect over unix socket instead of shared memory

Type: improvement

Change-Id: Id9042c74e33ad4e418896c4d7ae48bb9106195c9
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-03-18 17:30:07 +00:00
Damjan Marion
3eb6cbec50 vppinfra: os agnostic api for getting CPU information
Avoid direct sysfs reads when possible...

Type: improvement
Change-Id: I2b84cd18f3da47925d068951f24b79b5b6e20bb1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-18 16:01:35 +00:00
Damjan Marion
8799bf6ca6 build: add option to specify supported OS list for plugin
Type: improvement
Change-Id: I0d6f11d5ece19c5e0e00dfdadc9d4c09274ae8e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-18 16:01:25 +00:00
Klement Sekera
99c317a606 ip: reassembly - return correct value
If already enabled, return 0 to indicate success.

Type: fix
Change-Id: I4a182e14df9b05698ad93d596a97c46a020fd54b
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-03-15 19:05:18 +00:00
Tom Jones
8942e07332 misc: Add platform specific header on FreeBSD
Type: improvement
Change-Id: Ia23414e87d64567d5124b8297315ed7a426c3651
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-03-15 17:48:08 +00:00
Florin Coras
39e7f2e650 vcl: fix bitfield truncation with clang16
Reported by phlax while building Envoy with clang16

error: implicit truncation from 'int' to a one-bit wide bit-field
changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib1b731780cf27a9498299f0424a06000dc67e81e
2024-03-13 17:06:32 +00:00
Andrew Yourtchenko
e574736322 misc: fix the static vppctl build
Change I58e1ae1c91f4a62e80eaf4e16e9932d8bab17c74 has introduced a reference to config.h,
which is not there in a case of building a static standalone vppctl.

Solution: add a variable STATIC_VPPCTL which, when defined, avoids including
the missing include file. Thanks a lot to Damjan for the suggestion.

Type: fix
Change-Id: I133235ba07e5c2e0d5669be9c2292cab0fdf436f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-03-13 13:39:22 +01:00
Klement Sekera
e45fac02fd papi: use correct size for fixed length strings
This is required for correct packing of unions.

Type: fix
Change-Id: I92d04b1bbcb3fc3fe06474d8f2c59ed3502e6bd6
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-03-13 07:57:44 +00:00
Klement Sekera
ceed1e3b81 tests: use proper unit test skip instead of prints
Using unittest skip instead of print unclutters display by not printing
skip messages when not applicable, e.g. when somebody runs tests which
are unrelated to netns tests, e.g. with FILTER=vapi.

Type: fix
Fixes: e416893a59
Change-Id: Ie09e213249aa47da7e4ff484c3d072fbce3c2001
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2024-03-12 19:33:12 +00:00
Damjan Marion
c3148b1be8 misc: remove GNU Indent directives
Type: refactor
Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-12 19:29:56 +00:00
Dmitry Valter
e2ed599331 vpp: set asan default options
set asan default options in vppctl and vpp_get_stats

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I58e1ae1c91f4a62e80eaf4e16e9932d8bab17c74
2024-03-12 16:52:01 +00:00
adrianvillin
28bd8f07d3 hs-test: experimental support for multiple test instances
- appending PID to interface and container names
- added a check for used IP addresses
- TestEnvoyProxyHttpTcp and TestTcpWithLoss are broken when running multiple instances

Type: test

Change-Id: Ib917079ec7cf851dee59ff9c67e74f48c7c5e3c6
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-03-12 16:48:46 +00:00
Maxime Peim
7a2961523e urpf: fix uprf_update prototype
Type: fix
Change-Id: Idc325a096903dcdfad5157db2eb728f2e61ce974
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-03-11 10:54:24 +01:00
Florin Coras
236534136d session: use no for ports in transport port allocator
Type: improvement

Change-Id: Ia1d8aaa3c51938cfa15dd09102471f52ebe67a3d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-03-10 00:13:01 +00:00
Florin Coras
91bfe5b658 session: fix port alloc for fixed lcl port reuse
Type: fix

Change-Id: If30d1aa8aa752ae4bddde776832a3009ebc7e316
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-03-09 04:29:33 +00:00
Alexander Chernavin
4c7305f124 flowprobe: fix flush callbacks when multiple workers
IPFIX buffers are stored on a per worker thread basis. Currently, the
flush callbacks will flush only buffers stored for the main thread. And
buffers for worker threads will not be sent until their size reach the
path MTU configured for the exporter. So if traffic is constant, the
problem will unlikely to be visible. Buffers will be sent once they
reach the maximum size. However, if traffic stops at some point and
flush is triggered in order to make the plugin send all currently
buffered data, this will not happen. And collectors will not receive
that data. The plugin will keep the remaining data until traffic starts
again, the buffers reach the maximum size, and be sent.

With this fix, flush buffers for worker threads and for the main thread
when the flush callbacks are triggered.

This will allow to remove @tag_fixme_vpp_workers from the unit tests
that don't set timers. The tests that set timers will still be failing
for other multi-worker related problems.

Type: fix
Change-Id: I9a7d9cef8ddbec7ee68c79309e48e7bc0953d488
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2024-03-07 21:18:03 +00:00
Andrew Yourtchenko
93d38823f9 misc: VPP 24.02 Release Notes
Type: docs
Change-Id: I4209b4edf387f2d7b88ecc338cca3b4901210ed2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 455960759b5417c767ed331748c7ee76662ffd18)
2024-03-06 01:01:23 +00:00
Matthew Smith
205ed8f884 ip: force full reassembly before virtual
Type: improvement

The vnet buffer metadata for full IP reassembly and shallow virtual
reassembly overlaps. If you have full reassembly and virtual reassembly
enabled on the same interface and virtual reassembly happens to process
packets first, full reassembly will stomp on the metadata populated by
virtual reassembly.

Virtual reassembly gets enabled implicitly when NAT feature nodes
are enabled. Those NAT feature nodes rely on the virtual reassembly
metadata being populated correctly in order to find L4 proto & ports.
When NAT and IP full reassembly are both enabled on an interface, NAT
can drop fragmented packets because the virtual reassembly metadata
can be overwritten by full reassembly.

Ensure that full reassembly runs before virtual reassembly. Add a
runs_before dependency to ensure that ip4-full-reassembly-feature
runs before ip4-sv-reassembly-feature.

There was a duplicate VNET_FEATURE_INIT() for
ip4-full-reassembly-feature. It seems to have been intended for enabling
ip4-full-reassembly-custom as a feature node, but its contents are
identical to the earlier VNET_FEATURE_INIT() for
ip4-full-reassembly-feature. Removed the duplicate.

Change-Id: Ie600b854d4ceb90a7cb736810140d410b8f72447
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2024-03-05 23:31:40 +00:00
Georgy Borodin
904459ff32 dpdk: correct waiting times
When link state interval is 3 and stats interval is 10, updates
for stats will be made every 12 seconds (next number after 10,
that divisible by 3). And if you get counters every 30 secs, you
will get ideal "saw"-line instead of real smooth chart.

This commit makes smooth line on stats intervals that are divisors
of the charts update interval (regardless of link state interval),
and makes it possible to configure them.

Type: fix
Fixes: cb9cadad578297ffd78fa8a33670bdf1ab669e7e
Change-Id: Ia4350467be2b0ec0c1be37c7fda63f43b3330f44
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-03-05 18:53:01 +00:00
Vladislav Grishenko
29e916a07c vpp: fix stdin vs non-interactive command clash
In case of both stdin and non-interactive inputs are there
vppctl parses them all, causing mixed corrupted output:
  $ echo foo | vppctl sh bar
  show: unknown input `bar'
  unknown input `foo'

This is not desired, stdin should be ignored if there's a command
but still allow stdin commands - following cases are still equal:
  $ vppctl foo
  $ echo foo | vppctl

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I98667391627150c98a57d49ae544e48ef3351f34
2024-03-05 18:51:37 +00:00
Monendra Singh Kushwaha
09c6cae8c8 octeon: add support for VF device
This patch adds support for VF and loopback device.

Type: feature

Change-Id: I1ea92f3a1161851957206300ab921c27290b0305
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-03-05 18:50:36 +00:00
Vladislav Grishenko
3026ffa091 vlib: fix initial stats time for the process nodes
Uninitialized stats time for new dynamic processes (like unix
cli) leads to invalid and too high clocks diff, breaking the
stats collecting.

  $ sudo vppctl sh runtime | grep unix
  unix-cli-new-session  any wait      0  0  30   2.72e3  0.00
  unix-cli-process-0      active     14  0  27  3.73e15  0.00
  unix-epoll-input       polling   6464  0   0   3.56e6  0.00
  unix-epoll-input       polling  68360  0   0   1.31e3  0.00

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ic70678b67a3fb3f78ed4a1a03077ae243ed5d7cd
2024-03-05 18:49:49 +00:00
Vladislav Grishenko
fb9d1ac843 vnet: fix format of deleted sw interfaces
As similar 535364e90459566b603661c3dbe360c72f59ad71 is
merged, printing possibly deleted interfaces by index
only in all the rest cases.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I4fa58b382c0279ff893523ba0188fdb9b09e10af
2024-03-05 18:48:28 +00:00
Damjan Marion
7ad751ba53 vppinfra: SHA2-256 ARM ISA support
Change-Id: I0fcda3e7afaab037bd12d0079d6639c6cbe8647e
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-04 14:07:25 +00:00
Mohsin Kazmi
7ad43a4184 af_packet: fix the device input feature arc support
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I1c900bbe441c6797215f16e99b71149904aa745f
2024-03-04 13:10:03 +00:00
Maxime Peim
2cc14de7eb misc: fix icmp
- fix ICMPv6 lookup FIB (don't reset sw_if_index[VLIB_TX] to -1)
- add locally generated flag in ICMPv4 buffers (reflect ICMPv6)

Type: fix
Change-Id: If25a176a9952cbe185a030f8b136718af1bff9e8
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-03-04 11:30:24 +00:00
Vladislav Grishenko
5be4b869a4 bpf_trace_filter: support bpf filter optimization and dump
BPF filter w/o optimization can take x2 - x3 more instructions,
causing significant slow down in fast path.

Enable pcap optimization by default via cli and introduce api v2
with pcap optimization control, keep v1 for a while as it exists
in previous release already.
Intriduce bpf filter cli dump, similar to tcpdump -d.

Also fix memleak, function name typo, cli pcap format hint and
add related tests.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I92b2b519e92326f1b8e1a4dda6a3e3edc52f87ad
2024-03-04 09:29:12 +00:00
Damjan Marion
4b6614030f vppinfra: add os_get_online_cpu_core() and os_get_online_cpu_node()
Type: improvement
Change-Id: I6f99f09c7724ce656a4f41a1d5f9c88d74c00faf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-04 08:53:08 +00:00
Vladislav Grishenko
2921e02341 ip: fix warning on interface ipv6 prefix remove
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I428f52abbdddd9caca9b0f619a0e934f96ac0b4a
2024-03-04 07:57:03 +00:00
Vladislav Grishenko
dea806da53 fib: fix crash while adding intf-rx routes
Fix crash while adding intf-rx ip4 and ip6 routes via api due
invalid exporting of interface rx routes as attached.
Also, add missed route path via rx-ip6 cli support.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I15711c8c0787398dd7e3baa4787019bb1f317666
2024-03-04 07:51:16 +00:00
Vladislav Grishenko
eb5a08e91d svm: fix svm queue overwrite while adding 2 elements
Adding two elements to the full svm queue passes exact
bounds check, therefore tail gets overwritten w/o any
waiting. Fix it with requiring at lease two free slots.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I704ee606c47b523952cb965f848339ae1988cb60
2024-03-03 18:47:41 +00:00
Samvel Vartapetov
7f5f21ebc4 udp: fix ipv6 udp punt show
Type: fix
Signed-off-by: Samvel Vartapetov <svartapetov@yandex-team.ru>
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I57cba1e724f851419c7dfdee896568fc7416feaf
2024-03-03 01:12:14 +05:00
Florin Coras
4f3da9c1f7 session: add api cb for listen and unlisten
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I28ccebf4d2f0728dd174ab3ee77a0d7ad4b90951
2024-03-01 22:22:53 +00:00
Damjan Marion
242fe13c62 crypto-native: fix AES-CBC encrypt loop
Type: fix
Change-Id: I11cc52ff3867277e6591efb061f96cadfcc70c88
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-03-01 15:33:53 +00:00
Tom Jones
46bddc3b4a dhcp: Compare DIUD_LL as a network short
The existing comparision triggers the following clang assertion:

    error: result of comparison of constant 50331648 with expression of type
    'u16' (aka 'unsigned short') is always true

Section 9.1 of RFC3315 describes the DUID type field as:
    "A DUID consists of a two-octet type code represented in network byte"

correctly convert the local type to a network short for the comparison.

Type: fix
Change-Id: I7cb048035bd5e06372e29471ae6004ee1b2191b9
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-29 14:57:45 +00:00
Monendra Singh Kushwaha
3d1459b142 octeon: add flow offload infra
Type: feature

Change-Id: I3485e1627eafc5125255985003573247e7562db2
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-02-28 15:35:52 +01:00
Niyaz Murshed
7f050d9749 crypto: CLI to change dispatch mode
This change aims to affect crypto_sw_scheduler behavior,
but all the edits end up in vnet/crypto.

After 9a9604b introduced adaptive mode for crypto dispatch,
the performance of async mode at lower rate got worse.

A work around for CSIT test is done by changing dispatch mode via explicit API call
in 139aba2047

In this change, the CLI is brought back to allow user to fix the
dispatch mode.

set crypto async dispatch mode <polling|interrupt|adaptive>

Type: improvement
Change-Id: I029e98aa25889eddcf62e75a6c78926cdee862ef
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
2024-02-28 13:40:03 +00:00
Florin Coras
ea158d64a0 tls: pass reset ntf to engines
Type: improvement

Change-Id: Ie042605e50656229874b7a93638f0f04c894410f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-27 18:49:20 +00:00
Florin Coras
7c90be5e29 session: fix transport closed and disconnect race
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie7ff4bac22e9dbb449610072b52d1ec4e46fe757
2024-02-27 18:49:06 +00:00
Monendra Singh Kushwaha
4af3fdfdd0 dev: add per-port vnet flow
Type: feature

Change-Id: If63f39211288ab2eba8bc1ab50a2a4c7755abc66
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-02-27 15:37:20 +00:00
Florin Coras
4e32bc6b6d tcp: fix fin retransmit when out of buffers
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I787825dea7f82748537cc4372104cc6647cf2132
2024-02-26 18:43:48 +00:00
Tom Jones
5bce60353c hsa: Undef libepoll-shims close on FreeBSD
libepoll-shim has some hacks to enable functionality, one of these
redefines close as a macro. This conflicts with a close call back. On
FreeBSD undefine this macro at point of use.

Type: improvement
Change-Id: I7b4f7cd874f3451d76c580cf999369426d9e89c2
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-26 18:04:11 +00:00
Mohsin Kazmi
84847c4762 virtio: fix the packed ring support
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: If27702d2a9755e0e0a6eaeab4cf26b4974444b44
2024-02-26 16:15:48 +00:00
Tom Jones
4e16e782ad memif: don't include prctl.h
Type: improvement
Change-Id: I3ab8df625524b5ff85e62760f5e29daf0d650773
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-26 09:23:15 +00:00
Florin Coras
60732dff6d tls: initialize app session app wrk
Type: fix

Change-Id: I8832839738b96495bd775a778dd736bb25e1236c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-23 18:06:36 -08:00
Tom Jones
eceef16b5c svm: Use ftruncate to expand svm on FreeBSD
Linux doesn't support the Linux idiom of using lseek and a write to set
the size of a file, instead use ftruncate to accomplish the same effect.

This change is taken from the Nanoteq VPP port commit:
04a1b19b37

Type: improvement
Change-Id: Ie0b83e751b8b8f20b6814e5c9f760035747dfad9
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-23 18:48:29 +00:00
Tom Jones
b613d411a4 vcl: Use FreeBSD specific errno value for bad fd
Type: improvement
Change-Id: I7693f2647f65f662c9b20f77bbf7e1a530b58259
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-23 10:51:40 +00:00
Tom Jones
5ed27ef8b6 build: Discover libepoll-shim on FreeBSD
FreeBSD doesn't offer epoll, but an implementation which uses kqueue is
available as an external library. On FreeBSD in subsystems which require
epoll have cmake look for libepoll-shim.

Type: improvement
Change-Id: Iafd5406a9e2ebaa53fd94034489ffbbf87a7d040
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-23 10:07:49 +00:00
Tom Jones
72cb9f7e44 vlib: Use platform specific headers for sched.h
FreeBSD only defines posix scheduling policies, remove the others from
the for each look to allow build.

Type: improvement
Change-Id: Ifdb9414417e8b6ffdf216fd001708b347c496b97
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-23 10:02:34 +00:00
Tom Jones
532a1ce98a build: Add support to add_vpp_library for platform specific sources
Add support for adding Linux and FreeBSD specific sources to
add_vpp_library and support for installing Linux specific headers. Don't
add support for FreeBSD specific headers until we have some to install.

Type:	improvement
Change-Id: I38549cf4d71999b71b3298e529323956e54ddc36
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-23 10:01:47 +00:00
Benoît Ganne
89c7b545dd ip6: ECMP hash support for ipv6 fragments
Type: improvement

Change-Id: I41f70e5977fedbf0050205ebe52126ef373ebc06
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-02-22 08:24:02 +00:00
Florin Coras
8074fc6209 tls: fix transport endpoint get
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb8cc576168ce0ffa8f06be1acef4be4b3b29433
2024-02-20 11:27:03 -08:00
Maxime Peim
7217dcdb54 pg: fix stream pg interface
When an other interface is specified to generate packets from, we should
bind its sw_if_index to the pg interface to use.
Fix if_index_by_sw_if_index variable name, and force to specify a pg
interface to source traffic from.

Type: fix
Change-Id: Ib3e6dca92774b307def82926fc09945b7998267d
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-02-20 17:20:43 +00:00
Kaj Niemi
088d1a0168 build: Enable building on AlmaLinux 9
AlmaLinux is identical to Rocky and can be made to work with
the same build dependencies

Type: feature

Change-Id: I24bb8781a02c15f887c9c26cc98621e6256f4115
Signed-off-by: Kaj Niemi <kajtzu@a51.org>
2024-02-19 18:19:24 +00:00
Tom Jones
078affa92c vnet: include platform specific un.h
On FreeBSD define UNIX_PATH_MAX so it is available in punt.c. FreeBSD's
max path is 4 bytes shorter than Linux's.

Type: improvement
Change-Id: I2c4b7aa11246213575b557fab44669706885e6b7
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-19 18:12:06 +00:00
Tom Jones
ac80b8be8b vppinfra: Stub out get_current_cpu and get_current_numa on FreeBSD
FreeBSD has its own set of syscalls for getting current CPU and NUMA
domain information. Stub out these calls and return CPU 0 and NUMA domain
0 as placeholders until we bring in FreeBSD specific calls.

Type: improvement
Change-Id: Id61df0273b0bcc6acf4844ee626e4f246f9f217b
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-19 18:11:34 +00:00
Monendra Singh Kushwaha
03b7ac929e dev: fix type for uint32 arg value
Type: fix

Change-Id: Ib09d6a0dfc95d82ecfd2ff123be9004cb038d0d4
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2024-02-19 18:10:38 +00:00
Monendra Singh Kushwaha
3e594d6d7d build: bump octeon-roc version to 0.3
This patch updates cache line size in octeon-roc library.

Type: fix

Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: Ifbb6e7d2a5436a88ef10d22c414112edc23e0b35
2024-02-19 18:10:07 +00:00
Lijian Zhang
97c9f5e7c7 crypto-openssl: refactor openssl API usage
For the openssl crypto engine based cipher encrypt/decrypt and HMAC IPSec
use cases, the openssl API calls of doing ctx init and key expansion are
moved to initialization stage.

In current implementation , the ctx is initialized with "key" and "iv" in
EVP_EncryptInit_ex (ctx, 0, 0, key->data, op->iv)
in data plane, while the ctx can be initialized with 'key' and 'iv' separately,
which means there could be two API calls:
 1. EVP_EncryptInit_ex (ctx, 0, 0, key->data, 0)
 2. EVP_EncryptInit_ex (ctx, 0, 0, 0, op->iv)

As the 'key' for certain IPSec SA is fixed and known, so call #1 can
be placed in IPSec SA initialization stage.
While call #2 should be kept in data plane for each packet, as the "iv"
is random for each packet.

Type: feature
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Change-Id: Ided4462c1d4a38addc3078b03d618209e040a07a
2024-02-19 15:37:19 +00:00
Lijian Zhang
6f8252e83c wireguard: notify key changes to crypto engine
This is a prerequisite patch for the following openssl API optimization
patch, which tries to offload openssl ctx init and key expansion work to
the initialization stage.

Wireguard adds crypto keys via vnet_crypto_key_add (), and whenever it
modifies the keys, the underneath openssl crypto engine shoud be informed
of the changes to update the openssl ctx.

Type: feature
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Change-Id: I3e8f033f3f77eebcecfbd06e8e3bbbfdc95a50e2
2024-02-19 15:36:36 +00:00
Matthew Smith
ff71939c30 ipsec: check each packet for no algs in esp-encrypt
In esp_encrypt_inline(), if two or more consecutive packets are
associated with the same SA which has no crypto or integrity algorithms
set, only the first one gets dropped. Subsequent packets either get sent
(synchronous crypto) or cause a segv (asynchronous crypto).

The current SA's index and pool entry are cached before it can be
determined whether the packet should be dropped due to no algorithms
being set. The check for no algorithms is only performed when the cached
SA index is different than the SA index for the current packet. So
packets after the first one associated with the "none" alg SA aren't
handled properly.

This was broken by my previous commit ("ipsec: keep esp encrypt pointer
and index synced") which fixed a segv that occurred under a different
set of circumstances.

Check whether each packet should be dropped instead of only checking
when a new SA is encountered.

Update unit tests:
- Add a test for no algs on tunnel interface which enables
  asynchronous crypto.
- Send more than one packet in the tests for no algs.

Type: fix
Fixes: dac9e566cd16fc375fff14280b37cb5135584fc6

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I69e951f22044051eb8557da187cb58f5535b54bf
2024-02-19 15:35:54 +00:00
Florin Coras
37127f7bcc udp: use transport port refcnt on accept
Use udp transport refcnt instead of local port refcnt when accepting new
connections.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibc34677b1138682497f98e96b6fddb5b96094ff9
2024-02-18 18:54:55 +00:00
Tom Jones
9a97fb8ad7 svm: Only include sys/user on Linux
Type: improvement
Change-Id: Idb318eb386617013015c43153bf0bd92fa28b9b6
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:08:21 +00:00
Tom Jones
9447adc429 vnet: Add required header for pthread_np
Type: improvement
Change-Id: Ia9295b79340a18de6eb5fe80877dcf4ce97b35eb
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:08:04 +00:00
Tom Jones
67e7f016d2 vppinfra: Place hugepage MMAP call behind linux specific ifdef
Type: improvement
Change-Id: I3a48ec4fd4a4063b6e3792b87def7bb796fc947c
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:06:31 +00:00
Tom Jones
9bf4f8fb58 vnet: Use platform specific netlink headers on FreeBSD
Type: improvement
Change-Id: Ifbd84a45edc82c79ac2850dd70ecdd2f9f1289ae
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:05:33 +00:00
Tom Jones
0f7830023a vnet: Disable tuntap build on not Linux
tuntap requires porting on FreeBSD, only build on Linux for now.

Type: improvement
Change-Id: I448c462b31f3bc06f291a95d0ff5df9d6f8f24b8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:03:01 +00:00
Tom Jones
aaa2a89a3d vlib: Only init vfio on Linux
Type: improvement
Change-Id: Id1c72928324b85bc67860e600722bf8baeff45b2
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:02:27 +00:00
Tom Jones
646e5d2ad4 vpp: Add required socket headers on FreeBSD
Type: improvement
Change-Id: I948e447082233187d9ca794ca56a62fad4592e13
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:01:57 +00:00
Tom Jones
e12f69f773 vppinfra: Provide FreeBSD implementation of clib_mem functions
Working from the implementation in linux/mem.c add FreeBSD specific
functionality. This duplicates parts of the Linux implementation and a
depuplication job could be run in the future.

Stub out some parts of the API for now, they are either use unavailable
features on FreeBSD or require further implementation than this initial
implementation.

Type: improvement
Change-Id: I1e443e32304d19776a9a4d5e34adfa16ec919427
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 16:00:09 +00:00
Tom Jones
2cbbbb6d15 build: Add FreeBSD as a supported platform for cmake
Allow FreeBSD as a platform in the main CMakeLists file. This requires a
correct target for the compiler and an explicit name in the system
check.

The included subdirs require further changes to build, but the compiler
needs to find them before it can complain.

Type: improvement
Change-Id: Ic56fe68290519ef5d3ed61082e7fb0ba0528a3fc
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 15:59:11 +00:00
Tom Jones
61b4efc4da vnet: Provide platform specific if_tap headers
Type: improvement
Change-Id: Ia5cec0afc7f929491e495bb337493e64f752d75f
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 15:58:01 +00:00
Tom Jones
6ce1e930e8 vnet: Only build tap on Linux
tap requires some porting on FreeBSD, while we wait for those changes
only build tap on Linux.

Type: improvement
Change-Id: I4361bf43764fdb046c2138d4a2ee5d7efa31bd5a
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 15:57:17 +00:00
Tom Jones
393bfa786c vpp: Add platform specific headers for socket and inet
Type: improvement
Change-Id: Idcedc14089a49483d83c28a82ecb79d1b856f225
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18 15:53:09 +00:00
Florin Coras
d1e17a8738 tcp: retransmit fins in last-ack
Fix instances where timers are reset after programming fin.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib80e3a401d585f388a97c7f2bb62e68ee774d50d
2024-02-17 02:25:07 +00:00
Florin Coras
81a6ffced1 udp: unregister ports on all cleanups
UDP transport port refcount is incremented even if port is shared. So
decrement it, by unregistering, whener udp connections are cleaned up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id0a2c60c5faf4dea8b2cd9ded0334934ad9e918c
2024-02-16 18:18:56 +00:00
Denys Haryachyy
d5d510f795 vppapitrace: Fixed trace dump API result issue.
Set last thread id and last packet position in TRACE_DUMP_REPLY.
To enable collection of traces from multiple workers using iterator.

Type: fix

Change-Id: I69872af4f6981d50cd050fa3d16de2a3c0d6b496
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
2024-02-16 15:29:07 +00:00
adrianvillin
fbf5f2b030 hs-test: shortened interface names to avoid character limit
Type: test

Change-Id: I09df597ccb8a3c4af47b8a36010afb81df533236
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-02-15 18:35:34 +00:00
Florin Coras
0ded4890be tls: mark ho done atomically after ctx init
Make sure ctx is initialized before ho is marked as done.

Type: fix

Change-Id: If0525a9890a56e289e2ab006c669a9d64dc6505d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-15 17:52:51 +00:00
Florin Coras
e439b1e70e session: postpone ct cleanup if rx evt pending
Type: fix

Change-Id: I8cfaa62abd38d5356263b0ffd428638d1a027617
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-15 17:20:41 +00:00
Benoît Ganne
a421d564cd build: add fib configuring option
Allow to select 8-8-8-8 or 16-8-8 mtrie FIB implementation.

Type: improvement

Change-Id: I2f4aec8bfec987d3f3d9f9cc5a16fabf4b6cc2ac
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-02-15 08:34:58 +00:00
adrianvillin
7c675471e8 hs-test: improved logging
- improved readability of some error messages
- printing container logs to stdout on test failure (last 20 lines)

Type: test

Change-Id: Idbb358bdd89aa7b1a6bdc9d96bf029d4c299ce64
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-02-15 02:38:10 +00:00
Naveen Joy
0215ef1010 tests: refactor virtual interface tests
Split virtual interface tests in VPP into smaller and modular
tests for testing various interface types and features.

Type: test

Change-Id: Ic38af88379f75eee3090679d411edbdc8fd5d2e5
Signed-off-by: Naveen Joy <najoy@cisco.com>
2024-02-14 22:08:20 +00:00
Niyaz Murshed
28aef29e01 tls: fix compilation error
After changes done in https://gerrit.fd.io/r/c/vpp/+/40281 ,
mbedtls plugin is failing to build if enabled.

Discussion https://lists.fd.io/g/vpp-dev/topic/104344802#24060

Type: fix
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
Change-Id: Iee58b69301ac64f058bca0a7f7a0dedd2def4b35
2024-02-14 18:46:56 +00:00
Denys Haryachyy
f40a354dab ikev2: dump state and profile name in CLI and API
Type: improvement

Change-Id: Ide4b45da99e3a67376281f6438997f3148be08e5
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
2024-02-14 18:47:23 +02:00
Florin Coras
e81f27ffb2 vcl: fix epollet test for unhandled evts
Argument to vcl_epoll_ctl_add_unhandled_event is often the result of an
and between events and EPOLLET which is larger than u8

Type: fix

Change-Id: I8c98f557fa1db9f3eb79c90ecdd60ac9366d4d40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-13 17:19:20 +00:00
Tom Jones
775002358f svm: Add FreeBSD specific signal handling path
FreeBSD's siginfo_t doesn't have the ptr value used on linux to encode a
token. Fow now recover the code from siginfo_t and leave the opaque
value as 0.

Type: improvement
Change-Id: Ic6ef96f018b326b99d68534a4488cfc49fdf16e1
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:33:06 +00:00
Tom Jones
7ec62fb0cd vppinfra: Put clib_perf* behind Linux checks and provide stubs for FreeBSD
As a placeholder stub out clib_perf functions on FreeBSD, the interface
for performance counters on FreeBSD is different and will require its
own implementation.

Type: improvement
Change-Id: I61511ebe5ee1fd6fe93d3179c7843c811f47a846
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:28:51 +00:00
Tom Jones
a0b8538837 vppinfra: Add netlink header on FreeBSD
FreeBSD has support netlink since 13.2, but keeps its header in a
slightly different place. Correctly include netlink/netlink.h for
FreeBSD.

Type: improvement
Change-Id: Iec78ca72db74ea7f9c874e7039c7d17b6321f9dc
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:28:21 +00:00
Tom Jones
93fc6920fb vppinfra: Protect Linux specific features behind CLIB_LINUX
Place Linux specific features behind CLIB_LINUX. The previous #ifdef
calls would still pass even if CLIB_LINUX is set to 0 in clib.h, instead
use #if.

Type: improvement
Change-Id: Ibe4424eee4bc0065f54764b017b9a56a3e854380
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:27:26 +00:00
Tom Jones
b077d6678c build: Limit external libraries on FreeBSD
Limit the libraries we build on FreeBSD. This change intends to get us
closer to building on FreeBSD, DPDK will require a larger set of changes
so remove it until those changes are ready to integrate.

Type: improvement
Change-Id: I0f672a2b5bc30f2228020049fa71a81a2569ef54
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:26:41 +00:00
Tom Jones
caf9d4f4f8 svm: Include stdint on FreeBSD
On FreeBSD we need to include stdint.h to get __WORDSIZE.

Type: improvement
Change-Id: I784aa0856fd8298f33016b7ccedecfa3672d5429
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:25:18 +00:00
Tom Jones
7d2978dab9 vppinfra: Make program counter printing more portable
Finding the program counter in the ucontext struct is platform and
architecture specific, place the Linux checks inside an #ifdef and add a
look up for the FreeBSD amd64 specific naming.

Type: improvement
Change-Id: I42fcef5f20227c23d84acee336e37c4870146bb4
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:24:45 +00:00
Tom Jones
249f0dcdf6 vnet: Don't use __unused for struct padding
__unused is a clang keyword, this struct member will trip the build when
using clang. Instead call the unused padding 'pad' which should be clear
to the purpose if not the usage.

Type: improvement
Change-Id: I0abae34841651be1ef6b7d94864f0dc8185f0733
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:20:18 +00:00
Tom Jones
7c0415450b vppinfra: Add a stubbed out test_perf function for FreeBSD
Type: improvement
Change-Id: If136e0854dbaecfa62fc009ca2b0b94e8d9a56f2
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:18:41 +00:00
Tom Jones
77ce67f70b vppinfra: MAP_HUGETLB isn't available on FreeBSD
Don't use the MAP_HUGETLB mmap flag on FreeBSD as it isn't available on
the platform.

Type: improvement
Change-Id: Ie2046601c693f9ef12cf8113d6dbd87c322f1cf0
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:17:02 +00:00
Tom Jones
cb3372ddc8 vppinfra: Only prealloc hugepages on Linux
FreeBSD doesn't support sysfs or preallocating hugepages directly.  In
lieu of refactoring clib_sysfs calls place this one behind an #ifdef
linux.

Type: improvement
Change-Id: I4079ca70175e4cec44d913db2b0407a3ca6306c9
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:16:43 +00:00
Tom Jones
000b5e1b71 vppinfra: Don't build perfmon on FreeBSD
FreeBSD has platform specific APIs for interfacing with performance
counters. Until we bring in FreeBSD support, don't build perfmon on
platforms which aren't linux.

Type: improvement
Change-Id: Iabc418922c0d2e851c6098508761135f53433ae8
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:16:23 +00:00
Tom Jones
b2e0ce96ea vppinfra: Place SIGPWR behind a linux define
The SIGPWR signal is specific to Linux, place it behind a Linux flag to
help the build on FreeBSD.

Type: improvement
Change-Id: Ie36c2ceb201afff98e92bbe64595c3953b11c457
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13 16:13:19 +00:00
Steven Luong
58f37b21ea fib: contention with DP on deleting a route
Add vlib_worker_wait_one_loop prior to invoking dpo_reset
upon uninstalling a fib entry to avoid contention with DP.

Type: fix

Change-Id: If2a6c4cb9b5629dd61e506ab9f9c3e6aef121b45
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-02-12 16:55:11 -08:00
hsandid
d1fa7ae03e af_packet : fix crash on interface creation
Type: fix

Attempting to create a host-interface with an invalid af_packet name
causes a crash, as we attempt to read the contents of a null ptr.

Change-Id: Ia31ae21684c2b66baa1ceaadf29e19fae33c4ed4
Signed-off-by: hsandid <halsandi@cisco.com>
2024-02-12 16:29:22 +00:00
Vratko Polak
04fd51c03c buffers: bring back cache occupancy improvement
The improvement was removed in 40129,
causing 5-40% regressions in AVF tests.

There is a memory-speed trade-off,
this change prefers speed over memory efficiency.

Ideally, the choice should be configurable,
but that is not easy to achieve, considering
how early is vlib_buffer_main_init called.

Type: fix
Fixes: 038dad7ef29b0b724071edb5f8cc7a9845584454

Change-Id: I4746f3634abe6d233c9d092a372de05b3d1ae4b6
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2024-02-12 16:20:31 +00:00
Benoît Ganne
7286065911 ip_session_redirect: export symbols
Add/del functions can be used from external modules.

Type: improvement

Change-Id: I267bcfacd58970bcacae13744d8acc690b87d2fc
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-02-12 09:59:57 +00:00
Atzm Watanabe
d4f405a70f ikev2: accept rekey request for IKE SA
RFC 7296 describes the way to rekey IKE SAs: to rekey an IKE SA,
establish a new equivalent IKE SA with the peer to whom the old
IKE SA is shared using a CREATE_CHILD_SA within the existing IKE
SA.  An IKE SA so created inherits all of the original IKE SA's
Child SAs, and the new IKE SA is used for all control messages
needed to maintain those Child SAs.

Type: improvement
Signed-off-by: Atzm Watanabe <atzmism@gmail.com>
Change-Id: Icdf43b67c38bf183913a28a08a85236ba16343af
2024-02-09 14:19:31 +00:00
Florin Coras
d9b4d9fb1f udp: add cli to dump transport ports
show udp transport ports

Dumps list of ports registered by udp transport, as opposed to udp
local, and their refcount.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If3cbe51a7176cb89fa38b524defffbbd76af8f58
2024-02-07 00:17:36 +00:00
Florin Coras
f9bdc03c1c session: guard session lookup table allocs
Session lookup tables could be allocated from workers, e.g., connects
are done from first worker. Make sure consumers are not affected by
stopping workers.

Type: fix

Change-Id: I63b53c58b41ce91b08f50a2325c69c9f9fd25ed3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-02-02 13:22:31 -08:00
Florin Coras
e060b0a079 vlib: flush rpcs on worker sync
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I89624254649089e497d119eb6cee2cecf3dc11f3
2024-02-02 17:46:44 +00:00
Florin Coras
4cadd3b15b vlib api: move wrkr rpc flushing to vlib
Move vlib worker rpc flushing to main worker from memclnt api into vlib.
RPCs are no longer delivered via binary api queues

Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5b8761a57d1f4a1f2220e860cfb2e6b980f46f6d
2024-02-02 14:44:26 +00:00
Florin Coras
d7f17a2393 tls: set app closed flag in framework
Set the flag in tls framework as opposed to tls engines. This is similar
to passive close.

Type: improvement

Change-Id: I0c2a774b1ef9d7ec6ba74daf1678ea449815184f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-31 17:08:18 -08:00
Florin Coras
4a98b9360e tls: convert ctx fields to connection flags
Type: refactor

Change-Id: I527bbc1cf2e7b6d06fd0c88b7563fb59ed28bc40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-31 22:01:57 +00:00
Anton Nikolaev
83ad79d69a linux-cp: add add_del_v3 and get_v2 methods
Added vl_api_lcp_itf_pair_add_del_v3_t_handler method, it can return
vif_index in reply. Also added vl_api_lcp_itf_pair_get_v2_t_handler
methods, this method is able to dump only one lcp pair or dump all
lcp pairs via stream_msg.

Type: improvement
Change-Id: I1d25344ee57f8fac8b857bb3a9a03116230b4d2c
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
2024-01-30 12:07:12 +00:00
Ole Troan
ac0babd412 api: provide api definition over api
This patch allows a client to bootstrap itself by downloading the
JSON API definitions over the API itself.

This patch enables it for Python (probably need a dynamic language).
Call VPPApiClient with the new bootstrapapi=True parameter.

Example (Python):

from vpp_papi import VPPApiClient
vpp = VPPApiClient(bootstrapapi=True)
rv = vpp.connect("foobar")
assert rv == 0
print(f'SHOW VERSION: {vpp.api.show_version()}')
vpp.disconnect()

Type: feature
Change-Id: Id903fdccc82b2e22aa1994331d2c150253f2ccae
Signed-off-by: Ole Troan <otroan@employees.org>
2024-01-29 22:57:31 +00:00
Filip Tehlar
f34b6800de hs-test: update docs on debugging
Type: docs

Change-Id: I3bd89feb53a35532c79283bcdac2c87635c60920
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-29 19:59:02 +00:00
Filip Tehlar
a1bd50c7a2 hs-test: use relative paths for docker volumes
Type: test

Change-Id: I9d5c15662e50ceea08d2ccc653db36c5e3df869e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-29 19:58:37 +00:00
Arthur de Kerhor
af1ddd39f1 ip: don't export useless error counters for ip6 rewrite
the error node is set to ip6_input in the inline funcition
associated with ip6_rewrite. Thus, error counters defined
for node ip6 rewrite are never used.

Type: fix
Change-Id: Id6bef633928b0fff9069498c2e39e9f5bea2cf9b
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2024-01-29 10:22:17 +00:00
adrianvillin
707210c636 hs-test: updated golang and packages
ioutil.ReadFile is deprecated, replaced with os.ReadFile

Type: test

Change-Id: I9f8075796d05d47ea4dddd7e986026a267a7fe0c
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-01-26 16:59:02 +00:00
Florin Coras
f1acfc00ee udp: update rx sw_if_index to ip-local selected one
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0afd1b9ddbc17825aab3bfa3e5f9c6c0fbc561ca
2024-01-25 10:10:06 +00:00
Andrew Yourtchenko
6fb2b3dc72 misc: Initial 24.06-rc0 commit
Type: docs
Change-Id: Ia459d5ba6f7da3081192c6aba156e66fb2d6377c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-01-24 12:28:55 +00:00
Dmitry Valter
a21889174f vppinfra: fix clib_array_mask_u32 OOB reads
Handle non-even n_elts for the larger array instead of reading past
the source buffer.

Type: fix
Fixes: f62ed3f9c1ec3e8db36f63d6a54f46b7bea43723
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Ic1708a3f33fe71ca752345b5c77b6ae7a2d42bcd
2024-01-23 22:39:43 +00:00
Florin Coras
3109d1c298 tls: fix ho leak on tcp connect return
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I40345d635b8067dcffbbdd39d0a5b0c0934a6d54
2024-01-23 17:50:52 +00:00
Vratko Polak
1effb29aa2 papi: support old style of providing apidir
77caeb1b193404e76beb27a1aa81321e8eb1cf1f has changed the behavior
in an incompatible way, breaking users (including CSIT).

The new behavior is more pythonic,
but the old behavior has to be supported
at least one release after publicly deprecating it.

Type: fix

Change-Id: I9dfdd2229065010216e49db80b14b856c545965c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2024-01-23 16:34:14 +00:00
Florin Coras
e6d05dc1b6 tls: overlap parent opaque with listener ctx
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0a0d0b8721f5a15da47c7ac0e58cd50e159b2f54
2024-01-23 16:32:28 +00:00
Florin Coras
fad689eeba tls: set flag whenever app session is freed
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3d44ff851da00573343e15712284af3b9c3912e3
2024-01-23 16:32:08 +00:00
Florin Coras
77680ae56f session: flag instead of state for filtering ntf
Avoid situations when notifications are delayed for long enough for
transports to start closing/cleaning up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id35b0099adb5242108154a5e19d5ee15e6ca0058
2024-01-22 17:05:34 -08:00
Tom Jones
0aa0d6ffbe build: Explicitly use gmake
VPP requires GNU Make to build, on GNU systems (such as Debian), GNU
Make is installed as 'make', typically with a symlink from 'gmake'.

On other systems (such as FreeBSD), 'make' is a BSD Make derriviative
and GNU Make is installed a 'gmake'.

Use $(MAKE) variable for make calls from within Makefiles.  This
variable is set to the path of the calling make program, i.e.,
/usr/local/bin/gmake on a bsd system.

This is the recommended way to call make from Makefiles in the GNU Make
documentation.

Type: improvement
Change-Id: Id9162a34a0f8358f22090718087918dae31c0fce
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-21 14:42:03 +00:00
Damjan Marion
038dad7ef2 buffers: add compile-time option to set buffer alignment
Type: improvement
Change-Id: I88c4c45bed0bdd8686e17e4f77a7d32a08c995aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-20 18:28:09 +00:00
Damjan Marion
5840c66bbc build: disable plugins which require openssl if openssl is not available
Type: improvement
Change-Id: I4591fcb31dd28d1771b3d6e5afdaa14f29efe6ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-19 21:56:35 +01:00
Benoît Ganne
9705d848a2 build: fix default platform
When unsetting VPP_PLATFORM in cmake, it unmasks the cached value
instead, misleading the platform selection logic in src/cmake/cpu.cmake

Type: fix
Fixes: 01fe7ab88e

Change-Id: I676cd0af9ba28150f8ac07724c03df8ef24b640f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-01-19 19:02:27 +00:00
Filip Tehlar
9418143bd4 hs-test: change convention for skipping tests
Also re-enable external echo QUIC test.

Type: test

Change-Id: I3973409c31fd7c42b97ac3ceae1a5cbad6f1b2b6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-19 17:02:03 +00:00
Dmitry Valter
705f66e5ac vppinfra: fix test_bihash
Correctly wrap data indices in test_bihash.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I740fa1cf9f8c382c12f01f607095c5995be6845f
2024-01-19 12:51:52 +00:00
Denys Haryachyy
9f8d3b9b2f lldp: dump api
Introduce a dump api for LLDP plugin

Type: improvement

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: If67dedd329cced59227187284646d147ef6ef92c
2024-01-19 12:51:07 +00:00
Georgy Borodin
c03593e81d vppinfra: fix bracket balance
fix bracket balance in pool_put_will_expand

Type: fix
Fixes: 66d4cb5a217d556aa7bd2471f02a39badb6d5cd2
Change-Id: I921366c0898cca39cc728b7c7ef4c4c725c6b87d
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-19 12:48:02 +00:00
Dmitry Valter
8263888f46 vppinfra: fix vec_prepend use-after-free
Don't access free'd memory in vec_prepend.
Don't allow prepend when v1 == v2 as it also causes a use-after-free.
Found via ASAN.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I21f8422c007d07d40d237e873b84c042be1fe8e8
2024-01-19 12:37:49 +00:00
Mohsin Kazmi
c60266d1ea memif: use VPP cacheline size for memif when compiling within VPP
Type: make

memif.h file is independent code which can be used outside of
VPP. Hence it uses its own cacheline size MACRO. This patch
sets the value of MEMIF_CACHELINE_SIZE in the cmake file for
memif plugin to VPP_CACHE_LINE_SIZE.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I8185e78897f4571f1a0430dd7e758816e127444c
2024-01-19 12:32:55 +00:00
Tom Jones
c3b416c492 build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.

Look up the location of bash for makefiles.

Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-19 12:30:01 +00:00
nucleo
ca75cd83b5 af_xdp: Backport xdp-tools fix transposed calloc() arguments
Fixes compilation error with GCC 14

'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument

Type: fix

Change-Id: Ie328ecc711976547df2cffe17325b786bc7a8849
Signed-off-by: nucleo <alekcejk@googlemail.com>
2024-01-19 08:39:46 +00:00
Maxime Peim
77caeb1b19 tests: preload api files
When sanity test is not done, API files are not loaded until the
first test case is run. Hence, it is not possible to use enums, etc.
outside of a test class.
By preloading API files before running any tests, it prevents its
issue.

Type: fix
Change-Id: I8730150374e6c5f8d6933ec037811372ac2a8da0
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-01-18 20:14:54 +00:00
Filip Tehlar
87241fefd9 hs-test: use specific port for http3 test
curl sometimes uses 2 different source ports during the test.

Type: test

Change-Id: Ib27e9d22a9cc951f4729f4bd0ae99d80bf8d938b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-18 17:06:00 +00:00
Damjan Marion
01fe7ab88e octeon: native driver for Marvell Octeon SoC
Type: feature
Change-Id: I6898625c4e8854f777407dac3159e4c639a54860
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-17 20:44:10 +01:00
Georgy Borodin
dc26d50426 vppinfra: change fchmod to umask for unix socket
Setting g+w permission for unix sockets didn't work. There were
two problems:
1. new flag local_only wasn't set for all AF_UNIX sockets;
2. fchmod is not a good choice for sockets.

fchmod was replaced with couple of umasks, and local_only with
socket type check.

Type: fix
Fixes: 085757bb4930511928daa97f972cdca021e7a813
Change-Id: I8dc0fceb110a36bfa234f552bbdf182e09e55e27
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-17 19:10:13 +00:00
Artem Glazychev
8beddaf5b4 af_packet: set next0 for AF_PACKET_IF_MODE_ETHERNET mode
Normally af_packet sets next0 = next_index on each cycle. It works for the most cases.
But if vlib_validate_buffer_enqueue_x1() changes the next_index (from NEXT_ETHERNET to NEXT_DROP for example)
then the following next0 will have the wrong value, and the correct packet will be dropped.

AF_PACKET_IF_MODE_IP handles this case, but AF_PACKET_IF_MODE_ETHERNET doesn't.

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ic742043e8b10a2abe56b314bb584277151a9c5eb
2024-01-17 14:13:47 +00:00
Guillaume Solignac
de04e023cb build: add vapi scripts to VPP_HOST_TOOLS_ONLY
vapi generators were missing from the VPP_HOST_TOOLS_ONLY, which
prevents building an out-of-tree plugin with API files. We now
install them.

Type: improvement
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: Ie613c8f64034e933124325242f2f8b3ac3955878
2024-01-16 22:34:43 +00:00
Georgy Borodin
c018204aaf vnet: fix log_debug message format
debug+asan build will fail on initialisation when loglevel==debug

Type: fix
Fixes: 1cd0e5dd533f4209dde453eaa43215e52cd42985
Change-Id: I2005ebf9b95ec3b753c4e6d29337be460c77ffed
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:07:46 +00:00
Dmitry Valter
0bef4cf39c vppinfra: fix memcpy test buffer size
Fix dst buffer size in memcpy_x86_64 test.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I2b4502a62d9346d729b83522f4ea01c98a5b961c
2024-01-16 22:04:38 +00:00
Kai Ji
ebe2371e6a dpdk: add ID for QAT 4xxx series VF support
Type: feature

Enable use of 4th gen QAT series devices.

Change-Id: I890c1f1d305ff9b996322c29e9510cfe89d88d97
Signed-off-by: Kai Ji <kai.ji@intel.com>
2024-01-16 22:03:43 +00:00
Georgy Borodin
dbe9937b72 dpdk: fix log_debug message format
debug+asan build will fail on initialisation when log level==debug

Type: fix
Fixes: 549838c81bd0d995f2b8569955afc33132582c77
Change-Id: Ic64b376727d49f89790fb29bd03a0a2520625cdc
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:02:58 +00:00
Damjan Marion
1cfac4e6e4 vlib: remove unused code
Type: improvement
Change-Id: I2c54cb3eb41ed35f114eca75fb6e2be3eb3f4ca1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-16 17:40:56 +00:00
Damjan Marion
7e9513b8fc vppinfra: enable AES tests on ARM
Type: improvement
Change-Id: I30f3b2924ab219a8bace87f358b1b823e8bc83bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-16 17:40:40 +00:00
Pim van Pelt
4a515d35a8 build: Provide clang-14 for Debian12
checkstyle.sh assumes clang-format-11 but allows it to be overridden.
Debian12 ships with a minimal version of clang-14, so set the correct
version for checkstyle.

Before:
$ make checkstyle
extras/scripts/checkstyle.sh: line 41: --version: command not found
make: *** [Makefile:720: checkstyle] Error 127

After:
$ make checkstyle
Debian clang-format version 14.0.6
*******************************************************************
* CHECKSTYLE SUCCESSFULLY COMPLETED
*******************************************************************

Type: make
Fixes: 712fc0308981c61444e593d6bcc2ad62102c726d
Change-Id: I0c58456477011397115810dab825865b5850d10d
Signed-off-by: pim@ipng.nl
2024-01-16 17:39:17 +00:00
Pim van Pelt
276cd73b75 stats: Add optional labels to prometheus metrics
* Refactor the existing prometheus exporter to function print_metric_v1()
* Add a 'v2' flag which instead uses metric names with labels, example:
  nodes_clocks{node="ip4-lookup",index="0",thread="4"} 30198798628761
  nodes_vectors{node="ip4-lookup",index="0",thread="4"} 298176625181
  nodes_calls{node="ip4-lookup",index="0",thread="4"} 119789874274
  nodes_suspends{node="ip4-lookup",index="0",thread="4"} 0

  interfaces_rx_packets{interface="tap0",index="0",thread="1"} 79582338270
  interfaces_rx_bytes{interface="tap0",index="0",thread="1"} 16265349667188
* For stat names that we don't know, print their v1 equivalent, which
  keeps backwards compatibility.

Details in https://ipng.ch/s/articles/2023/04/09/vpp-stats.html

Type: improvement
Signed-off-by: pim@ipng.nl
Change-Id: I53ed3ede8cc7853eb46c354834d89eb788ece3b1
2024-01-16 10:05:55 +00:00
Florin Coras
66abf32283 session: avoid spurious disconnect and reset ntfs
Type: fix

Change-Id: Icdc9d1c8b7b29827ce17920dae64a365bb8a4e40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-15 13:11:24 +00:00
Mohsin Kazmi
159ee88ff5 devices: add support to check host interface offload capabilities
Type: improvement

This patch implements support to check the host interface offload
capabilities.

NOTE: this check is only done once when interface is being created.
Any changes to the cap of host interface after that will not reflect
changes to af_packet interface in VPP.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ibc9953131f64f3fb3e601d34036b9f453913692a
2024-01-15 10:01:37 +00:00
Pim van Pelt
712fc03089 build: Add Debian12 environment
Add clang-14 and libffi8 which ship with Debian Bookworm. The project
compiles cleanly with these versions.

Type: make
Change-Id: I17350aae30cec72987792d54d88231b3221b56b9
Signed-off-by: pim@ipng.nl
2024-01-14 21:10:33 +01:00
Florin Coras
ed4e612e60 session: fix app wrk free leak
Type: fix

Change-Id: I9c48b163f174b824df1a76e75c272dc985386bf2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-12 18:23:53 +00:00
Damjan Marion
da3771c25b crypto-native: add AES-CTR
Type: feature
Change-Id: Iab84226043d8042a99a507767b75e9d4a89cc5c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-12 17:37:42 +00:00
Damjan Marion
9caef2a351 vppinfra: native AES-CTR implementation
Type: feature
Change-Id: I7ef3277edaeb266fbd3c8c9355d4443002ed2311
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-12 17:37:28 +00:00
Filip Tehlar
bf40da413f http: fix memory leak
Type: fix

Change-Id: I36905132a42d23e719bf0e82eeafa48f60f4887a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-12 11:25:16 +01:00
Tianyu Li
d7c96324c0 libmemif: fix segfault and buffer overflow in examples
- Fix buffer overflow caused by strncpy(dst, src, strlen(src)),
use sized buffer to ensure overflow safe.

- Fix test_app getopt usage

 When use example/icmp_responder in slave mode
- Fix segfault when buffer size is not specified
- Fix wrong packet send out.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I5ed47fd8e630420d7ae0203a2605d2b9abd33d2a
2024-01-12 03:22:56 +00:00
mbly
00e9fe6ca7 libmemif: fix for memif_init_queues slot math
Increase slot variable to u32 to address combinations of num-queues and queue-size that cause slot variable to wrap when declared as u16, e.g. num-queues > 8 && queue-size is 2^12

Type: fix
Change-Id: I5bd6198d60395156a06f1a280ea2594824ceaa9d
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:30 +00:00
mbly
a908779820 libmemif: Fix for memif_buffer_alloc rewind logic
Rewind logic was not supporting count = 1, where size was > memif_buffer_size and a rewind is required.
Fixed slot-->next_buf bug for !master as well.

Type: fix
Change-Id: I65cf0d3d0c105f37125412a613e5ff8c5da9a3a2
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:06 +00:00
Daniel Béreš
9853342194 libmemif: added tests
This patch provides unit tests for libmemif written in Unity

Type: test

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I19116def6e6d28efd5f460c93911245474a11321
2024-01-12 03:21:41 +00:00
Filip Tehlar
56e17cf7a2 hs-test: add more asserts
Type: test

Change-Id: Ia285ff39d9b19464ea086ec847ceaf52c6c0195c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 19:45:06 +00:00
Ranjan Raj
ba39d86eec crypto: align host and VPP IPsec-mb lib
Ensure alignment between the Intel IPsec-mb library on the
host and VPP targets.If the version of Intel ipsec-mb on the
host is misaligned with the targets,terminate the compilation
process to prevent potential library linkage issues.

Type: fix

Change-Id: I38864115d59ae09fb5556ad4a29e884ebace8155
Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
2024-01-11 13:19:57 +00:00
Filip Tehlar
3336eefaa8 hs-test: add tls proxy test
Type: test

Change-Id: I8f3f4c464907356bb1990ea53f0f46befc057acf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:35:54 +00:00
Filip Tehlar
4fa0ba6ac0 hs-test: retry command on test setup failure
Type: test

Change-Id: Iad744c4b3f79820e8bd0dd2ef9f18e4f7718e845
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:27:09 +00:00
Alexander Skorichenko
afefe22e5d linux-cp: fix route prefix construction
Prevent comparison ops for uninitialized IPv6 prefix bytes.

Type: fix

Change-Id: I440fea7f0725769406ad348eb3402a98c593dc3c
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2024-01-10 16:16:35 +00:00
Pim van Pelt
2c9b128e1b linux-cp: Fix looping netlink messages
Signal when consuming a batch of netlink messages, in order to inhibit
lcp_sync from generating new netlink messages. This avoids link up/down
state changess from triggering an infinite loop.
Do this in the regular case of nl_route_process_msgs()
and in the special case of re-synchronizing in lcp_nl_recv_dump_replies().
Type: fix
Change-Id: I419d3f9aa350c119b3778b644c65165cb4cc1bef
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2024-01-10 14:49:25 +00:00
Pim van Pelt
2fa69effc8 urpf: add interface dump to API
Add an urpf_interface_dump() API call, with optional sw_if_index.
If either a mode or a table is specified in any given interface
address family and direction, return it in a list, otherwise omit
it.

TESTED:
create loopback interface instance 0
create loopback interface instance 1
create loopback interface instance 2
create loopback interface instance 3
ip6 table add 8298
set urpf ip4 rx loose loop1
set urpf ip6 tx off loop2 table 8298

API call urpf_interface_dump(sw_if_index=~1) returns:
[
urpf_interface_details(_0=658, context=2, sw_if_index=2, is_rx=True, mode=<vl_api_urpf_mode_t.URPF_API_MODE_LOOSE: 1>, af=<vl_api_address_family_t.ADDRESS_IP4: 0>, table_id=0),
urpf_interface_details(_0=658, context=2, sw_if_index=3, is_rx=False, mode=<vl_api_urpf_mode_t.URPF_API_MODE_OFF: 0>, af=<vl_api_address_family_t.ADDRESS_IP6: 1>, table_id=8298)
]

Type: improvement
Change-Id: I1ded5c445dc07dab73ea41b817b5827b72ca79d4
Signed-off-by: pim@ipng.nl
2024-01-10 00:28:06 +00:00
Florin Coras
97fef28a0b session: make app listener pool global
One less pointer chase when accepting sessions.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I20dbb21d15d4a703f76e3b12f04a6f5b5d2a3cd8
2024-01-09 17:07:54 +00:00
Florin Coras
7428eaa4a1 session: support for cl port reuse
Adds support for connectionless listener port reuse. Until now, cl
listeners had fifos allocated to them and therefore only one app worker
could ever listen, i.e., a session cannot have multiple fifos.

To circumvent the limitation, this separates the fifos from the listener
by allocating new cl sessions for each app worker that reuses the app
listener. Flows are hashed to app worker cl sessions but, for now, this
is not a consistent/fixed hash.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic6533cd47f2765903669f88c288bd592fb17a19e
2024-01-09 17:07:54 +00:00
Florin Coras
5afc13d594 session: avoid spurious closed notifications
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia98556e7ae61547cf153c78ec085cd4248bee74a
2024-01-09 17:07:26 +00:00
Mohsin Kazmi
2b5bc3bce6 libmemif: add name to maintainer file
Type: docs

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I994d843a035e6afc4b72d06745d2be74cd81cd3a
2024-01-08 13:45:52 +00:00
Alexander Chernavin
5d13416f38 flowprobe: fix calling vlib_time_now() from worker threads
Currently, when flowprobe_export_send() calls vlib_time_now(), a pointer
to the main thread's vlib_main_t is always passed (the one cached in
flow_report_main). However, that code can also be executed from a worker
thread. And passing a pointer to the main thread's vlib_main_t to
vlib_time_now() from a worker thread may cause time synchronization
issues. Also, running a debug binary will cause an assertion failure in
vlib_time_now() in this case.

With this fix, flowprobe_export_send() passes the pointer to the current
thread's vlib_main_t to vlib_time_how().

This doesn't allow to remove @tag_fixme_vpp_workers from the unit tests
yet as they will be failing for other multi-worker related problems.

Type: fix
Change-Id: Ia35e3a4176777b88cf8ca8af8af7c42c495cbc6a
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2024-01-02 23:08:59 +00:00
Filip Tehlar
b1ea30e563 http: unify client/server state machines
Type: improvement

Change-Id: I57a816fbed8b681dec201edc8d5950a34a555a2b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-02 12:07:04 +00:00
Dave Barach
b7e66f4a30 docs: minor updates to the lxc container test writeup
Fix minor differences between Ubuntu 18.04 LTS and Ubuntu 22.04 LTS when
using the scheme to test new code.

Type: docs

Change-Id: I5810b6f3d76d8d98fa764b61828b1ca32507bd91
Signed-off-by: Dave Barach <dave@barachs.net>
2023-12-29 11:19:37 -05:00
Florin Coras
44d9cbc49c session: add flag to track cless sessions
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0bb6aba26f1cd974d6bb3b5fe6234aacfee0d30c
2023-12-22 22:30:09 -05:00
Florin Coras
98d24a5fea hs-test: more proxy vars for docker builds
Type: improvement

Change-Id: Ica9d87abde7a1dc0b4007911a7e0abab46dfb75d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-12-23 01:01:09 +00:00
adrianvillin
a77d4ca32a tests: Temporarily skip an unstable test
Type: test

Change-Id: Idd608511ed350a8e13afff393e558e20d52627a0
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-22 17:32:10 +00:00
Florin Coras
f26bbeac4b hs-test: use prebuilt curl with http3 support
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4d17ae3f7736dc10c68ca6e304699ea39d012f6c
2023-12-22 17:19:11 +00:00
Filip Tehlar
7e452ba15c quic: seed random generator during init
Quic does not seed random value, so if the plugin is loaded
separately RAND_bytes will fail.

Type: fix

Change-Id: If600cbde1fef30afb6316fc1a355261b008c3191
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-22 16:49:57 +00:00
emmanuel
b1454f89b5 session: unset fifo evt to enqueue ack evt on tcp timewait
Incase the ack for the fin is lost twice or want to dup ack
packets with incorrect ack/seq # at different times and
session state is already closed, this fifo event is set for
the first ack that went out and prevents queuing of further events.

Type: fix
Change-Id: I102019fca26918a51e055a751db7209011bd43ad
Signed-off-by: emmanuel <emmanuelscaria11@gmail.com>
2023-12-22 16:27:48 +00:00
Alexander Skorichenko
e1489260ca vlib: lowercase vmbus device names
Use lowercased hex in uuid in sysfs/vmbus names

Type: fix

Change-Id: Ic4b7b995441723dc1b29ff8a75346cc8ba7f85f1
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2023-12-22 15:46:51 +00:00
hsandid
832342e3a4 vlib: add error checks to thread pinning
Type: fix

Added error checks around pthread_setaffinity_np
calls to stop vpp launch if pinning fails.

Change-Id: Iec391c485d1832b6c2ff20fbf789608f6bcf7b57
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-22 15:45:07 +00:00
Dave Wallace
ccc17f0a70 build: fix 'make test' target to build with clang
- gmake set CC=cc as the default therefore the test/test-debug
  makefile targets will build using gcc (cc == gcc for debian/ubuntu
  distros) unless set explicitly to clang due to use of 'CC=$(CC)' in
  test macro.

  Note: the CI builds vpp images prior to running 'make test', thus
  the CI does test vpp built using clang.  This basically makes local
  runs of 'make test' build using clang as well.

Type: make

Change-Id: I7221098c200be23b53bb616e41a42a6d65a03699
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-12-22 14:32:38 +00:00
Damjan Marion
95f07a16ae build: add .cmake to gitignore
Type: improvement
Change-Id: I3047b4a750581d68053f522479b23865e3da2505
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-22 14:23:00 +00:00
Damjan Marion
82a68e91d0 buffers: add vlib_buffer_unalloc_to_pool()
Change-Id: Icd616989a525ef0be6c73a2ad91ae4871cf3921d
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-21 20:23:41 +00:00
Damjan Marion
28b6dfa723 dev: per-queue format callbacks
Change-Id: Ia9fa6fab6288b4d0876022e72bf4f49bd00a19d2
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-21 15:55:39 +01:00
Nathan Skrzypczak
f3b0004f8a fib: format deleted LB
This patch allows the formatting of deleted Load-balancer
objects. This is needed in the case a trace references a DPO
that went away in the interim.

Type: improvement

Change-Id: I6d67519b8d62f69aafde3c8fe3065bc85a7adbde
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-21 11:39:08 +01:00
Naveen Joy
70335e8e50 tests: memif interface tests using libmemif
Type: test

Change-Id: I711dfe65ad542a45acd484f0b4e3e6ade9576f66
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-12-21 00:53:44 +00:00
Ole Troan
00c59e4965 virtio: virtio_flags api use enumflag instead of enum
In the API there is a difference between enum and enumflags.
The latter one allowing multiple set entitires, while enum
only allows one.

Type: fix
Change-Id: I5db88c15c85fc6c7130b7b35febcd1ea02ef8f76
Signed-off-by: Ole Troan <otroan@employees.org>
2023-12-20 20:52:33 +00:00
Takeru Hayasaka
68ac244283 srv6-mobile: Implement SRv6 mobile API funcs
This merge request adds the feature to manipulate localsids and policies for SRv6 mobile via API.

Type: feature
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Change-Id: Ibb46bf71ae1d9d4591ce2c8ccf66f520887dad70
2023-12-20 17:30:19 +00:00
Mohsin Kazmi
69f800fbfd devices: add cli support to enable disable qdisc bypass
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic124f44e64bd60f41e750b4118be3e8d1d1eb70b
2023-12-15 18:09:45 +00:00
Filip Tehlar
48744b9aa3 hs-test: decrease docker image size
Type: test

Change-Id: Ic1ad2f1f983ad8f8e8e8813f941e11757930c92e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 17:50:06 +00:00
Filip Tehlar
5ebdd51c60 hs-test: remove unnecessary app ns configs
Type: test

Change-Id: I0226227dc756a5a3af5e9d3b0d65a38c0aa55b3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 13:38:31 +01:00
adrianvillin
c6fe617490 tests: Added bpf trace filter plugin test
Type: test

Change-Id: I026d9298fe1372d03f61b6ad57c82628bab4c831
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-15 09:53:29 +00:00
Vratko Polak
04d262d1eb rdma: add rdma_create_v4 that handles flags properly
The _v3 was not handling endianness on flags (e.g. mode).
Marking _v3 as deprecated, but keeping it
as there might be users who learned to preprocess their flag values.

+ Also, format PCI product_name as a vector, not a string.

Type: fix

Change-Id: I50c4b44f3570f02518dbd9a43239c1a37612d24a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-12-15 08:44:10 +00:00
Florin Coras
6d14c0cc5a session: add forced reset api to ct transport
Type: improvement

Change-Id: Iebf9ee8275a92e962679e3d0d22d33ed0bd8b3ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-12-15 00:47:49 +00:00
Florin Coras
86b02c728c tls: no closed notify if no app session
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0e58bb970d371818217390d451cf26925b04970f
2023-12-14 22:58:31 +00:00
Mohammed Hawari
bc67e9fd20 bpf_trace_filter: allow use whithout classifier
Change-Id: I7ac5693ca547fe7249e7b6297bade70a6052b169
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2023-12-14 16:29:53 +00:00
Florin Coras
a474bc8a3b tls: postpone ho cleanup if not fully established
If ho cleans up on first worker before owner of established session
receives connected notification, the ho session is prematurely cleaned
up.

Wait for established ctx to be allocated before freeing ho.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icf707e5d8c62a288a49d078460d2ada3b5c41b0e
2023-12-13 16:51:22 +00:00
Nathan Skrzypczak
2ae8f79b50 cnat: undo fib_entry_contribute_forwarding
Type: fix

Change-Id: I9df43a34328209c87177a534d08919dda0af6096
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-12 14:06:19 +00:00
Dave Wallace
b1a1209ce9 dpdk: bump rdma-core to 49.0
- Per dpdk 23.11 release notes (rdma-core >= 48.0)

Type: feature

Change-Id: I6f73fdfd2226c501d22cd16e5c47500ff05fbff3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-12-12 12:10:40 +00:00
Arthur de Kerhor
8fce546370 ipsec: allow receiving encrypted IP packets with TFC padding
Type: feature
Change-Id: I7b29c71d3d053af9a53931aa333484bf43a424ca
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-12-12 09:02:03 +00:00
hsandid
b321325a47 vppinfra : fix alignment issue
Type: fix

Modified alignment cast causing crash issues

Change-Id: Iae3bb767ef2ba81466bf1567264a4c76ae45bb92
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-11 04:47:11 +01:00
Damjan Marion
d1eb1b7523 dev: caps and rx/tx offload support
Type: improvement
Change-Id: I7972f595444eacdb020f3fa2a60331c40766fc0b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-08 16:02:36 +01:00
Peter Morrow
31d4891cfe dpdk: never override devname if set via config
Even if the device name is specified in the startup config it may
be appended to if the device is a switch domain member. This leads
to unexpected device naming if an explicit device name was requested.

Type: fix
Change-Id: Ib56b4ac41c17008db55dc69497721e3cb7d540c1
Signed-off-by: Peter Morrow <pdmorrow@gmail.com>
2023-12-08 12:43:10 +00:00
Piotr Bronowski
864eaae5bb dpdk-cryptodev: fix crypto-dispatch node stats
This patch introduces a fix for correcting a counter for the number
of processed vectors in the crypto-dispatch node.

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Icaeb925a352a9ac766652f43c4e752f6727cdeb9
2023-12-07 15:45:36 +00:00
Dmitry Valter
caf12e6ab6 misc: fix tracedump show graph out-of-buffer
Use the correct string type for vlib_get_node_by_name. Found by ASAN.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I679d27050487e013e3320a4c558d78fa60c5e98a
2023-12-07 15:44:43 +00:00
Ranjan Raj
adb2c67992 crypto-ipsecmb: bump intel-ipsec-mb version to 1.5
This patch update the Intel IPsec-MB lib to v1.5

Type: feature

Change-Id: Ib2b5d28866f52d428d9400318cffcae11f935c3f
Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
2023-12-07 10:16:49 +00:00
Nathan Skrzypczak
535364e904 vnet: allow format deleted swifidx
This patch prevents the sw interfaces format
function to fail when the interface was deleted.
It also prints the swifindex alongside the 'DELETED'
keyword.

Printing deleted swifindex should not happen, but it is still
helpful to have these safeguards for troubleshooting in the case
invariants get corrupted (e.g. fib entry refcounts, ...)

Type: improvement

Change-Id: I66711049db2eebe0ad17e37c3a260ac81d1e5134
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-07 10:14:49 +00:00
Kai Ji
327c323065 dpdk: bump to DPDK 23.11
This patch bumps DPDK version to 23.11

Type: feature

Change-Id: Id19fa6e2789ffa3264614a011656dfe2303173ab
Signed-off-by: Kai Ji <kai.ji@intel.com>
2023-12-07 10:13:03 +00:00
hsandid
e60386b99b tests: tracedump test replace hardcoded value
Type: fix

Fetch 'pg-input' node index instead
of using a hardcoded value

Change-Id: I1ca27ddb54806530b546085d83e83b880acc4573
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-07 10:04:07 +00:00
Damjan Marion
4cdf30dcec iavf: set max_pkt_size even for disabled queues to make i40e PF driver happy
Type: improvement
Change-Id: I3daf6c32888a15c7ef1f32e729c1e23765d14dc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-05 13:28:24 +01:00
yanlong
7fa1674c19 l2: resolve l2 rewrite entry 'hit_count' always being 0 bug
The hit_count does not implement the corresponding processing logic, and here the missing is fixed

Type: fix
Fixes: missing

Change-Id: I04a8e11d6b48c2a15c371cbeb2467fa89a9d82bb
Signed-off-by: yanlong <dyl_wlc@163.com>
2023-12-05 10:09:46 +00:00
Filip Tehlar
7521d6745a http: fix coverity warning
Type: fix

Change-Id: I659a67293763a6035cfa64a4057ebf716fe93ab4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-04 17:28:33 +00:00
Damjan Marion
4338683b07 iavf: add missing cfg_change_validate callback
Type: fix
Fixes: 47447f1f
Change-Id: I438f5535bc48ca5397b8f5d3fbbd893ca6a511b4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 16:35:10 +00:00
Damjan Marion
c6ae4999d2 iavf: workaround for case when PF driver sends zero for max_mtu
Type: improvement
Change-Id: Ie4b2b958a24cdde8c183b700d864fc6f5b0df08f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 12:27:19 +00:00
Damjan Marion
39e79fdf30 dev: mark API handlers as thread safe
Type: improvement
Change-Id: I2acab04ddb6a46a637ed17c683fb37ed7bce3df6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 09:09:34 +00:00
Florin Coras
94a52d795d session: no segment handle on worker del
Coverity report.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3ce06634b30688d2a9581b50d462092daa8b4cac
2023-12-02 23:37:19 +00:00
Florin Coras
2c5e2184ef vcl: remove perror ldp call
Reported by coverity

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idae1bceb1eeb6dfe0394eed39ced9d09342d201f
2023-12-01 23:37:47 +00:00
Dengfeng Liu
d053508fcf ipsec: should use praddr_ instead of pladdr_
Type: fix

Change-Id: I982ef624226807d7c263e3ff83c108f7d31f61f1
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
2023-12-01 17:16:07 +00:00
adrianvillin
ef75a543fa tests: Added tracedump plugin tests
Type: test

Change-Id: Ie054924eb5e5b2b146db8d2b63511c8b0400f045
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-01 17:11:33 +00:00
Damjan Marion
9ec6f59d94 iavf: limit maximum number of queues to 32
First genaration of AVF APIs we currently use doesn't support more...

Type: improvement
Change-Id: I1ae27f322403a2b455fcad8b028fa2004b449789
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-01 13:30:39 +00:00
Vratko Polak
3a9c3ebcc1 dev: use the endian reply macro
Checkstyle also forces the new indentation.

Type: fix
Fixes: ddf6cec37027547ff7cc61e15bb8080664d41514

Change-Id: Ife96928d6ca30ba94e1c423d557d6ed9d68eca2b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-30 17:42:25 +01:00
Filip Tehlar
cc1475cdc2 hs-test: add http prom test
Type: test

Change-Id: Ia15ecc3cf2c087a6959601ff02e187c32570ff60
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-11-30 03:33:02 +00:00
Florin Coras
18710d58f0 session: no reply on app del worker with sapi
With socket api, applications should not expect reply after worker del
msg. VCL in particular closes the socket after it enqueues the message.

Found by ASAN.

Type: fix

Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1be02a0cde6b96a96edb709f3fe30bbc01ff2d24
2023-11-29 17:01:08 +00:00
Florin Coras
1b75fdbda0 vcl: fix init of ldp workers
LDP workers is used as vector but was initialized as a pool. There was
no side effect but ASAN does not properly unpoison memory and this
triggers false used-after-poison crashes.

Type: fix

Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie769dad0e86ab970de9929800d0a4131f846e70e
2023-11-29 17:00:24 +00:00
Florin Coras
557b20c4ea tcp: fix rxt send of new data assert
We might have less than 1 mss when attempting write but more after
write, as application could be actively enqueuing more data. Relax
assert.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I54a83c4460f8e022a88758f0ebd7828df711dbb9
2023-11-29 16:59:36 +00:00
Damjan Marion
32c00ce79a pci: fix MSI-X vector length check
Type: fix
Fixes: 38c6191
Change-Id: I7760947986dc56236f2494fb1c8c238321489ef6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-29 12:35:06 +00:00
Florin Coras
e32580caa8 tcp: allow unsent segments less than mss in recovery
During recovery, send unsent data even if less than mss available as
application is not guaranteed to provide more.

This should speed up recovery when all data in flight was lost.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7a3c73a0d04d93d51a5910d85450c173c3ad8e93
2023-11-28 22:41:14 +00:00
Florin Coras
6ae6c98d7c tcp: add counter for accepted connections
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2925134cfcfa36c14b3b69efa892b9b96fce2e6f
2023-11-28 22:02:16 +00:00
Georgy Borodin
bffd4461d2 session: fix asan failure
fix asan failure when params number is less then 3:
functions that are set as format_half_open pointer values have
different number of arguments

Type: fix
Fixes: de9a849a18514f0b09bb5f57a73f6a57ee425c76
Change-Id: I6b6e1adf4ffc0c1ec847613f00fe269af640d42b
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2023-11-28 21:32:03 +00:00
Dmitry Valter
953fbd2b24 tests: fix default node variant in tests
Pass a correct form of node variant config in tests

Type: fix
Signed-off-by: d-valter@yandex-team.ru
Change-Id: I8cdc240b18a1664e57a5814d6cd644891c99f515
Fixes: 8800f732f868bf54da8adba05e38bd2477895ca5
2023-11-28 20:48:31 +00:00
adrianvillin
6160f2ddb2 tests: Added NSIM plugin tests
Type: test

Change-Id: Id621a806b853688ced7c6a38e1a9e5f298d2b97e
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-28 20:39:37 +00:00
Dave Wallace
87a8826d17 tests: refactor pcap file deletion to improve robustness
Type: test

Change-Id: I504c079126bd8b33c5e217a1b9086788a8c778e5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-28 03:34:49 +00:00
Alexander Skorichenko
4b08632748 fib: fix fib_path_create() with drop targets
Properly set type
	path->fp_type = FIB_PATH_TYPE_SPECIAL
for paths with (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_DROP)

Type: fix

Change-Id: Id61dbcda781d872b878e6a6410c05b840795ed46
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2023-11-27 22:07:43 +00:00
adrianvillin
176cff55b1 tests: Excluded some components from LCOV
Type: test

Change-Id: I387611cfc361e664eb1e78ae669ba4e3901c4fe6
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-27 20:39:32 +00:00
Alexander Chernavin
1f4023d55d bfd: fix buffer leak when cannot send periodic packets
When a periodic BFD packet cannot be sent because the interface is
disabled, the allocated buffer needs to be freed. This currently will
occur for IPv4 sessions. However, buffers will leak for IPv6 sessions as
in this case, bfd_transport_control_frame() and bfd_transport_udp6()
will not indicate failure.

With this fix, stop always returning success in bfd_transport_udp6() and
start returning the actual return value.

Type: fix
Change-Id: I5fa4d9206e32cccae3053ef24966d80e2022fc81
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-27 18:53:43 +00:00
Florin Coras
a2be1cffbe tcp: allow multiple rxt rescues during recovery
Type: improvement

Change-Id: Ia8d7cd6ff9b1449d986d514d9556cbf803deb670
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-11-27 18:50:34 +00:00
Damjan Marion
ddf6cec370 dev: initial set of APIs
Type: improvement
Change-Id: I9ecbf705d460a1744f36c7005b08097dc58d9522
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-25 12:39:25 +00:00
Damjan Marion
07a62cc236 dev: fix null dereference of arg list
Type: fix
Fixes: 69768d9
Change-Id: Iafd3a55634583f2799a81c477ccbf5e53b6f29d0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-24 13:25:26 +00:00
Vratko Polak
20e37d2639 avf: put sentinel at correct place
The previous fix was adding the sentinel before refilling rx,
which gave the NIC time to overwrite it with a new descriptor.

Ticket: VPP-2087
Type: fix
Fixes: 8b4d474abd62c623502ad9a4a279a9b4535ca0c1

Change-Id: I32bde4a763a62fb66c5c3871d9f10af6066e2d47
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-22 13:39:47 +01:00
Florin Coras
9375266bd3 session: per app wrk client ct segment handle
Make sure ct client segment handles do not collide if multi worker
application establishes cut-through sessions to only one server segment
manager.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I905379f9ed73c64d57a826a3e97d53dab3a87517
2023-11-22 00:58:53 +00:00
Vratko Polak
23b6a9ebeb virtio: fix cli parsing for tx-queue-size
The previous change made CSIT virtio tests fail,
but those tests are not part of trending.

Ticket: VPP-2088
Type: fix
Fixes: a181eaa59bb2ff2784376918e95bbf92e5340db1

Change-Id: If0439a030c051894e07007da9cf0a2e4dc1434c3
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-21 12:45:39 +00:00
Florin Coras
894d0a6762 session: add session lookup cli for stats
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I96bff47206ef64ea7369ae92e1b9ff1f74dfd71b
2023-11-20 16:13:44 +00:00
Nobuhiro MIKI
c4d989d6f3 dpdk: fix description for mlx5_pci driver
This is because mlx5_pci is also compatible with another
series of NICs such as ConnectX-5 and ConnectX-6.

Type: fix
Change-Id: I10f0468bbe36ab61c72fb3dc0aa898f8e2f9e88c
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2023-11-20 11:51:01 +09:00
Florin Coras
cfe6462fd2 session: always clear rx evt flag on ntf
Apps may drain fifos prior to handling of accept notification, e.g.,
vcl session relying on epoll lt mode.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7d105d35a6bf33c419f4f137a5132e6a5d294fe7
2023-11-17 12:08:58 +00:00
Matthew Smith
dac9e566cd ipsec: keep esp encrypt pointer and index synced
Type: fix

In esp_encrypt_inline(), an index and pointer to the last processed SA
are stored. If the next packet uses the same SA, we defer on updating
counters until a different SA is encountered.

The pointer was being retrieved, then the SA was checked to see if the
packet should be dropped due to no crypto/integ algs, then the index was
updated. If the check failed, we would skip further processing and now
the pointer refers to a different SA than the index. When you have a
batch of packets that are encrypted using an SA followed by a packet
which is dropped for no algs and then more packets to be encrypted using
the original SA, the packets that arrive after the one that was dropped
end up being processed using a pointer that refers to the wrong SA data.
This can result in a segv.

Update the current_sa_index at the same time that the sa0 pointer is
updated.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I65f1511a37475b4f737f5e1b51749c0a30e88806
2023-11-17 11:15:31 +00:00
Damjan Marion
862097a166 dev: startup.conf handling improvements
Type: improvement
Change-Id: I74fb01061b4949d68ec39d0b7d08e6df8dc44b98
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-16 20:33:31 +00:00
Damjan Marion
69768d99ee dev: device and port specific args
Type: improvement
Change-Id: I26124a50d8e05d6f01a2e6dbc4bc8183fb5a09c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-16 16:01:35 +00:00
Ole Troan
f3be34e443 dhcp: api to enable client detect on interface
DHCPv4 aka BOOTP is somewhat awkward. A DHCP client
on an interface must receive DHCP packets to
the broadcast address or to a unicast address.
Apparently before it's been assigned to itself.

Add this new API to allow external DHCP clients
enable the DHCP client detect feature per interface.

Type: improvement
Change-Id: If55aac03f25a045496be483940e4f5e7e18885b9
Signed-off-by: Ole Troan <otroan@employees.org>
2023-11-16 15:38:51 +00:00
Andrew Yourtchenko
4b89013081 misc: VPP 23.10 Release Notes
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Icd40064c06ccc53efba1cd9564613108b999b656
(cherry picked from commit 7c4027fa5e42a8cc7176cd62ab7a0043fb1933ff)
2023-11-15 16:16:08 +00:00
Steven Luong
ac49cf9205 docs: Remove references to vlan-strip-offload as it is deprecated
Type: fix

Change-Id: I3a258433cf507f48cd67332387eb7fef103a88f8
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-11-15 14:07:33 +00:00
Alexander Chernavin
bae6b6d1f2 flowprobe: fix L3 header offset calculation for tx flows
The recent TX flows generation fix introduced "l3_hdr_offset" which
represents the offset of the IP header in the buffer's data. The problem
is that it is erroneously defined as a 16-bit unsigned integer. If the
calculated offset is negative, "l3_hdr_offset" will get a value close to
UINT16_MAX. And the code will search the IP header somewhere beyond the
buffer's data. For example, this will occur in the case when an ICMP
error is being sent in response to a received packet.

With this fix, make "l3_hdr_offset" a signed integer.

Type: fix
Change-Id: I6f1283c7ba02656d0f592519b5863e68348c5583
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-14 22:06:53 +00:00
Damjan Marion
dd8f8dec50 vppinfra: respect indent in format_table
Change-Id: Ib7e5cb5adfe81e5cc6243125d91f5179608a7733
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-14 21:33:09 +00:00
Damjan Marion
f6f21db2e3 vppinfra: add unformat_{single,double}_quoted_string function
Change-Id: I8ee90be1b772074c1130b98c71b3be48c973b2e2
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-14 21:32:22 +00:00
Dave Wallace
1b86f0f477 tests: retry unlinking pcap files on os error
Type: test

Change-Id: I270798ed68f04bd3974dd39c44e85dad5fa02de0
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-14 17:23:49 +00:00
Damjan Marion
2d725c6128 ena: Amazon Elastic Network Adapter (ENA) native driver
Type: feature
Change-Id: Icd9de05f2cbac0e5a6dfb1f1414f21dc4b893104
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-13 19:05:17 +00:00
Damjan Marion
e596ca1b51 dev: add change_max_rx_frame_size capability
Type: improvement
Change-Id: I922e216818b78f2fe7689c21a1d27d74a0ae28b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-13 12:21:45 +00:00
Alexander Chernavin
64d6463d2e flowprobe: fix tx flows generated for rewritten traffic
Currently, when IPFIX records generation is enabled for an interface in
the TX direction, some rewritten traffic is being sent from that
interface, and the Ethernet header's location has changed due to
rewriting, generated TX flows will contain fields with wrong and zero
values. For example, that can be observed when traffic is rewritten from
a subinterface to a hardware interface (i.e. when tags are removed). A
TX flow generated in this case will have wrong L2 fields because of an
incorrectly located Ethernet header. And zero L3/L4 fields because the
Ethernet type will match neither IP4 nor IP6.

The same code is executed to generate flows for both input and output
features. And the same mechanism is applied to identify the Ethernet
header in the buffer's data. However, such general code usually works
with the buffer's data conditionally based on the direction. For most
input features, the buffer's current_data will likely point to the IP
header. For most output features, the buffer's current_data will likely
point to the Ethernet header.

With this fix:
 - Keep relying on ethernet_buffer_get_header() to locate the Ethernet
   header for input features. And start using vlib_buffer_get_current()
   to locate the Ethernet header for output features. The function will
   account for the Ethernet header's position change in the buffer's
   data if there is rewriting.

 - After fixing Ethernet header determination in the buffer's data,
   L3/L4 fields will contain non-zero but still incorrect data. That is
   because IP header determination needs to be fixed too. It currently
   relies on the fact that the Ethernet header is always located at the
   beginning of the buffer's data and that l2_hdr_sz can be used as an
   IP header offset. However, this may not be the case after rewriting.
   So start calculating the actual offset of the IP header in the
   buffer's data.

 - Add a unit test to cover the case.

Type: fix
Change-Id: Icf3f9e6518912d06dff0d5aa48e103b3dc94edb7
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-12 21:52:13 +00:00
Florin Coras
4aaedaa2ff tls: fix forced ho cleanup
Do not force cleanup of tcp half-open connection if tcp's cleanup
notification to tls is pending.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7bccbe8429a4aab10df1c89b66138b967e04ac19
2023-11-10 17:48:33 +00:00
Rune E. Jensen
f9ab6985d4 gtpu: support non-G-PDU packets and PDU Session
Updated the gtpu plugin code to support the PDU Session user plane protocol, required for 5G, as
specified in 3GPP TS 38.415 version 17.0.0. This enables some initial support of 5G gNodeB's with
the gtpu plugin.

New features:
- Basic support for the GTP-U Extension Header Flag.
Packets with one extension can now be decapsulated.
This enables basic support of the PDU Session user plane protocol (3GPP TS 38.415 version 17.0.0).
New tunnels can be created with a PDU enable flag and a 6-bit QoS Flow Identifier (QFI).
With this, encapsulated packets will have the PDU Session extension header, and the QFI set.

- Ability to forward GTP-U packets that are not handled by the plugin directly.
Only GTP-U packets with a message type of 255 (G-PDU) are handled directly.
However, 3GPP TS 29.281 defines several other message types like echo and error indication.
A new feature is added to optionally forward unknown or unsupported packets to a new IP address.
This works separately for unknown GTP-U message types, unknown TEIDs, and packets with an unknown
GTP-U header.
This allows both echo and error indications from a 5G gNodeB to be handled by a different system
outside VPP.

- Simple way to get metrics for active tunnels and on tunnel close.
In 5G session/tunnel lifetime is often short and created frequently.
The normal API becomes too slow and inaccurate when too many tunnels are created and deleted
every second.

Improvements:
- A clean ground structure to handle multiple message type in the future.
The code path for G-PDU packets is optimized for performance, representing the typical case.
Unsupported GTP-U packets enter a slow path that decodes the nature of the error.
This presents a easy hook to handle other message types in the future.

- Improved error reporting
When using traces there is more details in the tunnel descriptions.

- Updated the API with several enums.

Fixes:
- gtpu0->length field in IPv6 was computed with IPv4 header lengths in the encapsulation code.
- vec_set_len (t->rewrite, ...) size was computed with the IPv4 header size also for IPv6 tunnels.

Issues:
- This PR does not enable full support of the 3GPP specification.
In particular it only supports a single QoS/QFI flow for each tunnel.
It ignores all incoming extension header flags.

- API functions might change again when/if more support of the 3GPP TS 38.415 spec is added.

Note that I have bumped the API version to 2.1.0 as it seems to be the correct approach based on
my API changes.

Type: feature

Signed-off-by: Rune E. Jensen <runeerle@wgtwo.com>
Change-Id: I91cd2b31f2561f1b3fb1e46c4c34a5a3c71b4625
2023-11-10 14:39:39 +00:00
adrianvillin
5cc67aacf0 tests: perfmon - Added a check if test is running with root privileges
Type: test

Change-Id: I1910f3ef79e9018aee032daca0f1932eccb7b9f9
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-10 11:45:25 +01:00
Damjan Marion
67f03ba71d iavf: interrupt mode support
Type: improvement
Change-Id: Ie5fcaa706ab0995e0021cf1ee74b95c5a3b30283
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-09 19:56:35 +00:00
Florin Coras
14bfd3d8b8 tls: fix handling of client and server init errors
- notify app on failed connect
- avoid cleanup of ctx before transport cleanup to be able to handle
pending rx notifications.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1b70ad45109d4c942afa1990dfce4fc44a50a637
2023-11-09 19:14:12 +00:00
Maxime Peim
115e31b43f ipsec: IPsec fix constant propagation
In some anti-replay, some functions weren't using the boolean
telling if the window was huge or not. Hence, limiting the constant
propagation at compilation.

Type: fix
Change-Id: Ie5f2dda38339bb32113c6f7b2b82c82135fc92a8
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-11-09 14:24:25 +00:00
Florin Coras
0fbf07ed7f tls: propagate transport closed notifications
Notify app that transport is closed when tcp moves to closed state.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I18cbe1ac16b1a48ecd06af4c1b5535e12e4b0e75
2023-11-08 23:36:06 +00:00
Florin Coras
cfc2a0e688 tls: avoid reads after tcp transport removed
Make sure underlying transport connection is not removed on rescheduled
read event.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0137a2e43aa84d9442279e036c25771aeefd207f
2023-11-08 14:16:24 -08:00
adrianvillin
098ee3aaf1 tests: Fix http static test failing on retry
- test_http_static.py: If namespace creation fails, try to delete the namespace and create it again
- vpp_qemu_utils.py: Added "isinstance()" to "delete_namespace()" to match "create_namespace()"

Type: test

Change-Id: I88ff7a36f5d52816fee16283efba6af025496491
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 20:36:49 +00:00
adrianvillin
e59761f721 tests: added a simple perfmon plugin test
Type: test

Change-Id: Ief0c0e13a2c19a03b48219d9a0d85256fb0c9dbe
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 17:08:34 +00:00
adrianvillin
22b4a9c732 tests: added simple CT6 plugin tests
Type: test

Change-Id: I77f119ac982170627484d792dc456753c9847af8
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 17:05:43 +00:00
Damjan Marion
449c677440 dev: remove unused code
Change-Id: If380e4ab6ca30243137fd31fbe51845c0414721a
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-08 13:40:50 +00:00
Damjan Marion
b8dd9815ef dev: interrupt mode support
Type: improvement
Change-Id: I4a0578598182339bcf76e6b01da76b590a06f773
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-08 13:28:19 +00:00
Artem Glazychev
29d07dbef9 af_packet: remove UNIX_FILE_EVENT_EDGE_TRIGGERED flag
af_packet does not process data until the interface is UP. If after interface creation, but before it is UP, the host interfaces are flooded, then blocking case may occur - VPP interface will never be able to process the data.
If the EDGE_TRIGGERED flag is set, the event will not arrive, because nothing new is happening anymore (probably because the queue is already full).
Therefore, we need to use LEVEL_TRIGGERED (default value), which indicates that there is still unprocessed data (accumulated after interface creation, but before it was UP).

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ied459fd194149d09f226bcb0a5907b3e327b148a
2023-11-07 14:03:01 +00:00
Alexander Chernavin
dab1dfeea9 flowprobe: fix clearing interface state on feature disabling
As a result of recent fixes, all currently stored flows of an interface
are deleted when the feature is being disabled for the interface. This
includes stopping the timer and freeing the flow entries for further
reuse. The problem is that meta information is not cleared in the flow
entries being deleted. For example, packet delta count will keep its
value. The next flow that gets one of these pool entries will already
have a non-zero packet count. So the counting of packets will start from
a non-zero value. And incorrect packet delta count will be exported for
that flow.

With this fix, clear meta information too when clearing interface state.
Also, update the corresponding test to cover this case.

Type: fix
Change-Id: I9a73b3958adfd1676e66b0ed50f1478920671cca
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-07 14:01:13 +00:00
Jieqiang Wang
92ab407a59 build: disable bogus warnings for GCC 12
The array bounds and string overread check on GCC 12 report a dozen of
false positives that result in VPP build failures on ubuntu 22.04.
Work around this build issue by unconditionally disabling these two
warnings if C compiler is GCC 12 or newer version.

Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I999e847bb625ebdf3ef5f11b11598c553f306670
2023-11-07 10:58:50 +00:00
Jieqiang Wang
76d14b797c misc: silence -Wmaybe-uninitialized warnings
GCC 12 complains about such errors while the code itself looks good.

Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I021719fdbf7d9bd93a12eac76aeac8cbca13a810
2023-11-07 10:58:50 +00:00
Damjan Marion
e73c731ad8 vppinfra: fix ASAN issue in vec_foreach_pointer and pool_foreach_pointer
Change-Id: If9381ae7283488b352a3c22f85732cd56ac6bfd9
Type: fix
Fixes: 9937359, 91ff0e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 17:40:07 +00:00
Dengfeng Liu
4504df795b ipsec: delete redundant code
Type: fix

Change-Id: I0de1c51455b0d3958c75ab5626a318ac656adbe7
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
2023-11-06 17:38:05 +00:00
Jieqiang Wang
505f4e1db1 dpdk: correct the printing of Rx offloading flags
DPDK added new Rx checksum flags[1] to handle cases like the virtual
drivers. Current check of flags is not strict enough for flags like
RTE_MBUF_F_RX_IP_CKSUM_NONE and will always be true no matter the
checksum in packet is good or bad.
Fix this issue by comparing the result of AND operation with the
correspinding Rx checksum flags.

Before this patch, packet trace prints the offload flags as below:

    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_IP_CKSUM_NONE (0x0090) no IP cksum of RX pkt.
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_NONE (0x0108) no L4 cksum of RX pkt.

After this patch, packet offload flags would be like:

    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid

Type: fix

[1] 5842289a54

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I3182022d9ccd46b2fc55bb3edfbfac9062ed7c89
2023-11-06 10:21:35 +00:00
Damjan Marion
7444fd2a0d pci: remove unnecessary ioctl() call and improve logging in vfio_set_irqs
Type: improvement
Change-Id: Ic8e2785bf375882defe5a1d299948d522cdd4895
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 10:15:12 +00:00
Damjan Marion
60529a8ef8 pci: fix VFIO set IRQ code
Type: fix
Fixes: 599a16b
Change-Id: I954e037ab944028798f9aa2a93f45322c8c7b4bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 00:09:23 +00:00
Stanislav Zaikin
9c6fd897fd bonding: add checks for sw_if_index in api
Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I16b48460b3fcd82bbb89c375402cb2455414d8bb
2023-11-04 01:55:39 +00:00
Damjan Marion
7f75e80f08 vppinfra: refactor interrupt code
Type: improvement
Change-Id: Ie6987736faf7d8a641762e276775da8ee0c03ea4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-03 22:56:29 +00:00
Dmitry Valter
236fae462a tests: allow explicit defaults for arg types
Allow settings default values explicitly in positive_int_or_default and
positive_float_or_default.

It allows setting setting default 0 test retries explicitly despite it
being not positive.

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Id23a9fdae0ef174eea8992c1f9fc2530aade6194
2023-11-03 20:13:58 +00:00
Damjan Marion
6bd6c80f27 dev: strip debig log function name prefix during compilation
Type: improvement
Change-Id: I9b9bb37a0895366b412f042b0e2da5bbdd477325
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-03 09:26:47 +00:00
Dave Wallace
8800f732f8 tests: refactor asf framework code
- Make framework.py classes a subset of asfframework.py classes
- Remove all packet related code from asfframework.py
- Add test class and test case set up debug output to log
- Repatriate packet tests from asf to test directory
- Remove non-packet related code from framework.py and
  inherit them from asfframework.py classes
- Clean up unused import variables
- Re-enable BFD tests on Ubuntu 22.04 and fix
  intermittent test failures in echo_looped_back
  testcases (where # control packets verified but
  not guaranteed to be received during test)
- Re-enable Wireguard tests on Ubuntu 22.04 and fix
  intermittent test failures in handshake ratelimiting
  testcases and event testcase
- Run Wiregard testcase suites solo
- Improve debug output in log.txt
- Increase VCL/LDP post sleep timeout to allow iperf server
  to finish cleanly.
- Fix pcap history files to be sorted by suite and testcase
  and ensure order/timestamp is correct based on creation
  in the testcase.
- Decode pcap files for each suite and testcase for all
  errors or if configured via comandline option / env var
- Improve vpp corefile detection to allow complete corefile
  generation
- Disable vm vpp interfaces testcases on debian11
- Clean up failed unittest dir when retrying failed testcases
  and unify testname directory and failed linknames into
  framwork functions

Type: test

Change-Id: I0764f79ea5bb639d278bf635ed2408d4d5220e1e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-03 05:06:43 +00:00
Florin Coras
af5684bf18 tcp: fix reset w pkt
Do not add ip header as that's added by tcp output and fix checksum.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9439acf5c66184af0350b1d4d7406b3feb2e79a1
2023-11-02 22:12:15 +00:00
Dave Wallace
e3f59e2ae2 tests: remove packet debug output from npt66 testcases
Type: test

Change-Id: I1883b50f67890aefb28ca0ca7447f4e73c574d26
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-02 21:24:30 +00:00
Damjan Marion
47447f1f59 iavf: new driver using new dev infra
Type: feature
Change-Id: I9ae0dbf28b4571a37c568b587b771f90c06f200d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-02 16:08:57 +00:00
Damjan Marion
38c619115b dev: new device driver infra
Type: feature
Change-Id: I20c56e0d3103624407f18365c2bc1273dea5c199
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-02 13:41:32 +00:00
Florin Coras
d3ef00098c tcp: remove redundant ack checks
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4001f39afde8c33b60c15f74034bcce013fbbf70
2023-11-01 22:58:32 +00:00
Florin Coras
7499591bff tcp: allow ooo data in syn-rcvd
As long as ack and segment are legitimate accept ooo data as we
transition to established.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I85cdc65d70cb8ae689a9ce9bbe4f86228b1ac533
2023-11-01 22:58:16 +00:00
Florin Coras
ea309c4660 tcp: postpone cleanup on connect failures
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I231b319d4d7aa3e17cc8cfe8aaa4762995a5b2c4
2023-11-01 20:33:44 +00:00
Dave Wallace
6e66ea75a0 tests: fix UDP port range for mdata and bufmon
- Use of well known UDP port numbers causes random
  failure of mdata and bufmon tests

Type: test

Change-Id: I21a01c54e5f166aea101d3caace85b53f3f7285d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-31 23:20:47 -04:00
hsandid
e75176a257 docs: Updated "VPP with Containers" use-case section
Type: improvement

Modified "VPP with Containers" doc section to run on Ubuntu 22.04 LTS.

Change-Id: Ic09b88cf0e3b492711222a1bb24552de964a7d03
Signed-off-by: hsandid <halsandi@cisco.com>
2023-10-31 23:54:28 +00:00
adrianvillin
e908fe7e47 tests: http static - skip if cannot create namespaces
Type: test

Change-Id: I5fddb293f1b56853613ca2823dbb6d3d887d9929
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-31 15:29:08 +00:00
Filip Tehlar
4a8fde0e51 hsa: use common app session interface in echo tests
Type: test

Change-Id: Ib320cfb5e20f12614c013a92ac15490f8ca3a7ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-31 15:27:55 +00:00
vinay tripathi
2d7988d719 ipsec: separate UDP and UDP-encapsulated ESP packet processing
This fix differentiates UDP and UDP-encapsulated ESP packets processing.
While UDP-encapsulated ESP traffic is processed as IPsec traffic, UDP as
other plain-text protocols is NOT dispatched against SPD policies.
Key logic is taken from RFC 3948, and is based on the fact
that the checksum of UDP packet encapsulating ESP packet must be zero.

Type:  fix

Signed-off-by: vinay tripathi <vinayx.tripathi@intel.com>
Change-Id: Ib1b4d240eea8e89f2daf17ec833905f26cdb31bd
2023-10-31 11:41:54 +00:00
vinay Tripathi
bc5f530599 ipsec: modify IPsec related tests to send and verify UDP-encapsulated ESP traffics
In this patch, IPsec related test files have been modified to send UDP-encapsulated
ESP packets,and validate against Inbound and Outbound policies that are configured
with Bypass, Discard and Protect action.

Type: test

Change-Id: I4b8da18270fd177868223bfe1389dc9c50e86cc5
Signed-off-by: vinay Tripathi <vinayx.tripathi@intel.com>
2023-10-31 10:33:13 +00:00
vinay tripathi
75069cee95 ipsec: move udp/esp packet processing in the inline function ipsec_esp_packet_process
This inline function is introduced to simplify code readability and allows to splitting of
UDP and ESP processing in the next step.

Type: improvement

Change-Id: Ida4d6abbed141ac74d4d285900777778eb8a5a1d
Signed-off-by: Vinay Tripathi <vinayx.tripathi@intel.com>
2023-10-31 10:32:52 +00:00
adrianvillin
485f7bcccb tests: Added LLDP plugin tests
Type: test

Change-Id: I5a2d1b2c92f2bb7c45a7b5e025584d9417487840
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-30 21:23:01 +00:00
adrianvillin
30f2600dcf tests: Added http static server tests.
Coverage increased from 21% to 80%

Type: test

Change-Id: Ic8ecc620cef738d7dbe4c259f58a373ac155a588
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-30 21:17:56 +00:00
Filip Tehlar
c78eeaba49 hsa: preallocate sessions on server side
Type: test

Change-Id: Ib809f5a6c9e2f08d87f0070231df04d5f0040ca0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-30 15:56:38 +00:00
Mohammed Hawari
f4e3ee1dd1 vcl: propagate correctly EADDRINUSE for UDP bind
Change-Id: Ia8b5421cbaaf861ddb3ad7aeca53a077ff18864e
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
2023-10-30 15:48:34 +00:00
Maxime Peim
0e2f188f7c ipsec: huge anti-replay window support
Type: improvement

Since RFC4303 does not specify the anti-replay window size, VPP should
support multiple window size. It is done through a clib_bitmap.

Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I3dfe30efd20018e345418bef298ec7cec19b1cfc
2023-10-30 15:23:13 +00:00
Alexander Chernavin
21922cec73 flowprobe: fix accumulation of tcp flags in flow entries
Currently, TCP flags of a flow entry don't get reset once the flow is
exported (unlike other meta information about a flow - packet delta
count and octet delta count). So TCP flags are accumulated as long as
the flow is active. When the flow expires, it is exported the last time,
and its pool entry is freed for further reuse. The next flow that gets
this pool entry will already have non-zero TCP flags. If it's a TCP
flow, the flags will keep being accumulated. This might look fine when
exported. If it's a non-TCP flow, that will definitely look erroneous.

With this fix, reset TCP flags once the flow is exported. Also, cover
the reuse case with tests.

Type: fix
Change-Id: I5f8560afffcfe107909117d3d063e8a69793437e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-30 13:32:50 +00:00
Florin Coras
4197fb95f2 session: fix bind replies with errors
Type: fix

Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icdff3528fcaf863b400b9aca6c30d284bc17d5f0
2023-10-27 16:15:58 +00:00
Filip Tehlar
81c8514219 hsa: fix coverity warning
Type: test

Change-Id: Iba94edb7eb439ddc994d9a16cb52108373d052ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-27 15:28:29 +00:00
Damjan Marion
4e8f9be435 devices: remove unused code
Type: improvement
Change-Id: I2427e1a93e89e9a7ac884b84352b96cf523ae11e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-26 19:45:59 +00:00
Filip Tehlar
efe875e7cd hsa: unify echo test setup
Type: test

Change-Id: I8665492c2f7755901a428aacdb27e98329ff557a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-26 16:32:17 +00:00
adrianvillin
4d05f069a3 tests: Added bufmon plugin test
Coverage increased from 35% to 94%

Type: test

Change-Id: I9a54a58bf53b29a771a93ce03998e95fbcd518eb
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-26 15:45:11 +00:00
Andrew Yourtchenko
5ca8bfcacb build: allow for reproducible builds
Setting and using the SOURCE_DATE_EPOCH variable takes
care of most of the magic necessary.
https://reproducible-builds.org/docs/source-date-epoch/

vpp-ext-deps packages after this change is being built with that
date set to date of the last modification of the
subtree (similar logic to deriving the "number" for
the package version)

For the rest of the packages, pinning the following
three variables should result in bit-identical
artifacts across multiple runs:

export SOURCE_DATE_EPOCH=$(date +%s)
export VPP_BUILD_HOST="buildhost"
export VPP_BUILD_USER="builduser"

Add a blurb in the docs describing this new functionality.

Type: improvement
Change-Id: I71b085f0577b2358aa98f01dafd8e392239420a6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2023-10-26 12:09:44 +00:00
Damjan Marion
e9d7babde0 lisp: fix missing symbol issue
Type: fix
Change-Id: I9373dabcdb2c4ba987e732b59e63b52603010873
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 15:20:28 +00:00
adrianvillin
6facf8cd45 tests: Added mdata plugin test
Coverage increased from 54% to 92%

Type: test

Change-Id: Ibb26f2b8989c5bb2826190c961bffe2c21c3f9a2
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 15:13:29 +00:00
Damjan Marion
55a1f288ed buffers: buffer name is vector, not c string
Type: fix
Fixes: 8973b07
Change-Id: Iba6e29bab35be0148b469965c3af8391b5ab9140
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 11:51:30 +00:00
Damjan Marion
29de4694e6 marvell: fix compilation issues
Type: fix
Fixes: unknown
Change-Id: I81ee03aaea2e1e6ffb9d6ee91db7fb9acd6debb7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 11:36:46 +00:00
Matthew Smith
9e5694b405 fib: only update glean for interface if necessary
Type: improvement

If an interface address is added, the glean adjacency for it's covering
prefix is updated with that address. In the case of multiple addresses
within the same prefix being added, the most recently added one will end
up being used as the sender protocol address for ARP requests.

Similar behavior occurs when an interface address is deleted. The glean
adjacency is updated to some appropriate entry under it's covering
prefix. If there were multiple interface addresses configured, we may
update the address on the adjacency even though the address currently in
use is not the one being deleted.

Add a new value PROVIDES_GLEAN to fib_entry_src_flag_t. The flag
identifies whether a source interface entry is being used as the address
for the glean adjacency for the covering prefix.

Update logic so that the glean is only updated on adding an interface
address if there is not already a sibling entry in use which has the
flag set. Also, only update the glean on deleting an interface address
if the address being deleted has the flag set.

Also update unit test which validates expected behavior in the case
where multiple addresses within a prefix are configured on an interface.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I7d918b8dd703735b20ec76e0a60af6d7e571b766
2023-10-25 08:46:20 +00:00
adrianvillin
52aaa9b0ac tests: Added STN plugin test to improve coverage.
Type: test

Change-Id: I30dfaed684e1f808089bb8eb301486434425ccd7
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 02:15:54 +00:00
adrianvillin
4450aed056 tests: Added a simple Snort plugin test to increase coverage.
Type: test

Change-Id: I96ec8b4347210672bc587407ab2fd0f0305ea486
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 01:53:43 +00:00
Ting Xu
51880abac1 dpdk: fix variable type in pattern parsing
In current pattern parsing function in DPDK, some of the variables of
packet length are defined as uint8_t, which are too small for some
large-size packets, such as srv6. Change the type to uint16_t.

Type: fix

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I06819e9716da098ca456c0405f0e6fd9a8eb0bc9
2023-10-24 22:14:03 +00:00
Dmitry Valter
e8e4b5f9af crypto: fix algo selection
Check if crypto ops vector is matching actual ops instead if blindly
dereferencing it.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Ib88ab44137d9360ee96228e72349a62b2fa7a7e0
2023-10-24 22:13:43 +00:00
Alexander Chernavin
6b027cfdbc flowprobe: fix sending L4 fields in L2 template and flows
Currently, when L2 and L4 recording is enabled on the L2 datapath, the
L2 template will contain L4 fields and L2 flows will be exported with
those fields always set to zero.

With this fix, when L4 recording is enabled, add L4 fields to templates
other than the L2 template (i.e. to the IP4, IP6, L2_IP4, and L2_IP6
templates). And export L2 flows without L4 fields. Also, cover that case
in the tests.

Type: fix
Change-Id: Id5ed8b99af5634fb9d5c6e695203344782fdac01
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-18 21:01:03 +00:00
Steven Luong
34c721fb47 memif: contention between memif_disconnect and memif RX/TX threads
memif_disconect may be called without barrier sync. It removes stuff in mq
without protection which may cause troubles for memif RX/TX worker threads.

The fix is to protect mq removal in memif_disconnect.

Type: fix

Change-Id: I368c466d1f13df98980dfa87e8442fbcd822a428
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-10-18 09:16:35 +00:00
Damjan Marion
bf236630f5 buffers: introduce vlib_buffer_template_t
Type: improvement
Change-Id: Ie86a5edf2ada21355543e9a0382052b16ff86927
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-17 17:44:41 +00:00
Florin Coras
0094fe0190 tcp: initialize connection index on rst w packet
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie01d7e8d6eddf3ba88f2cd6eb8369c8ec8179cb4
2023-10-16 20:01:02 +00:00
Florin Coras
da2ae9af61 tcp: allow fins in syns in syn-rcvd
Also make sure connection is properly cleaned up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I02f83e9a1e17cbbbd2ee74044d02049b2fd2f21c
2023-10-16 20:00:49 +00:00
Florin Coras
61d63e8323 tcp: handle syn-ack in fin-wait-2 in rcv process
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If74e04498423bed42593e79ec92482421cfda8d2
2023-10-16 20:00:31 +00:00
Ole Troan
dbeb56d2da ip-neighbor: do not use sas to determine NS source address
Using the source address selection algorithm to determine the best source
of an NS for address resolution risks incompatible behavior.
It may choose a source address that is off-link to the other host.
Which may drop it.

A safer approach is to always use the link-local address as the SA.
It's recommended to pick a source that an application will later use,
as VPP is mostly a router, that rarely applies. And regardlessly we have
no mechanism to signal from an application that triggered address resolutiuon
what source address it intends to use.

Type: fix
Change-Id: I3c5de66e41505f3682767706ef1195a20e4f0e54
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 14:48:46 +00:00
Alexander Chernavin
f68afe85a6 flowprobe: fix corrupted packets sent after feature disabling
When IPFIX flow record generation is enabled on an interface and the
active timer is set, flows will be saved and then exported according to
the active and passive timers. If then disable the feature on the
interface, the flow entries currently saved will remain in the state
tables. They will gradually expire and be exported. The problem is that
the template for them has already been removed. And they will be sent
with zero template ID which will make them unreadable.

A similar problem will occur if feature settings are "changed" on the
interface - i.e. disable the feature and re-enable it with different
settings (e.g. set a different datapath). The remaining flows that
correspond to the previous feature settings will be eventually sent
either with zero template ID or with template ID that corresponds to the
current feature settings on the interface (and look like garbage data).

With this fix, flush the current buffers before template removal and
clear the remaining flows of the interface during feature disabling.

Type: fix
Change-Id: I1e57db06adfdd3a02fed1a6a89b5418f85a35e16
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-16 13:13:55 +00:00
Vladislav Grishenko
da34f4add5 nat: add ipfix rate-limiter for nat44-ed, nat44-ei and nat64
This prevents ipfix flood with the repeating events and allows
to enable nat64 max_session and max_bibs events. Also fix wrong
endian for det44 and nat64 ipfix tests, now should be fine with
extended tests enabled.
Max session per user event @ nat44-ei requires more precise rate
limiter per user address, probably with sparse vec, not handled.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib20cc1ee3f81e7acc88a415fe83b4e2deae2a836
2023-10-16 13:13:00 +00:00
Ole Troan
ff344a98af npt66: icmp6 alg to handle icmp6 error messages
Support rewriting the inner packet for ICMP6 error messages.

Type: feature
Change-Id: I7e11f53626037075a23310f1cb7e673b0cb52843
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 10:59:22 +00:00
Ole Troan
1fe132ec1a ip-neighbor: add ip neighbor flush
Flushing the neighbor cache was only available through API.
Add CLI command. Either flushes whole table (IP4,IP6)
or all neighbors on specified interface.

Type: improvement
Change-Id: Ia8c68fb032a2dfd940a136edc2aee80db5c37685
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 10:52:51 +00:00
Damjan Marion
d0ffa26a0e feature: remove unused code
Type: improvement
Change-Id: If775b1d145e462346de562a3c893f302e8c7b814
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-14 09:58:10 +00:00
Stanislav Zaikin
a164636106 linux-cp: check if lcp_itf_pair exists before creating tap
Now we create tun/tap and then check whether lcp_itf_pair was already
created. Move the check in the beginning.

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I848685a9cfdbe92a5e38ecb8e5d5322262b4e384
2023-10-13 20:45:57 +00:00
Alexander Chernavin
8a92b68bc8 ethernet: run callbacks for subifs too when mac changes
When MAC address changes for an interface, address change callbacks are
executed for it. In turn adjacencies register a callback for MAC address
changes to be able to update their rewrite strings accordingly.

Subinterfaces inherit MAC address from the parent interface. When MAC
address of the parent interface changes, it also implies MAC address
change for its subinterfaces. The problem is that this is currently not
considered when address change callbacks are executed. After MAC address
change on the parent interface, packets sent from subinterfaces might
have wrong source MAC address as the result of stale adjacencies. For
example, ARP messages might be sent with the wrong (previous) MAC
address and address resolution will fail.

With this fix, when address change callbacks are executed for an
interface, they will be also executed for its subinterfaces. And
adjacencies will be able to update accordingly.

Type: fix
Change-Id: I87349698c10b9c3a31a28c0287e6dc711d9413a2
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-13 18:39:00 +00:00
Damjan Marion
29aabcf8f6 vlib: properly replicate nexts when sibling node is created on runtime
Change-Id: I5aff21b5ca32e7eb84b11cca8387e7ac42fbbe23
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-13 10:39:24 +00:00
Damjan Marion
c9275dadef vlib: allow unpriviledged vlib_pci_get_device_info()
When running unpriviledged sysfs allows reading only first
64 bytes of PCI config space.

Change-Id: I62d18328925a2e4936406c2842154b20182cacb9
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-13 10:39:10 +00:00
Ole Troan
bdeee2194b npt66: add show command and rx/tx counters
Add show npt66 bindings.
Add RX/TX and translation error counters.

Type: improvement
Change-Id: I4513b111f815a15d5a7537ce503f0c084b523aa1
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-13 08:27:26 +00:00
Florin Coras
054aa8c2f2 session: fix duplicate rx events
Be less aggressive with rx events on connect/accept notification.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie93a08c7eef69383bf0301a163fd2131dd51372a
2023-10-12 23:21:31 +00:00
Alexander Chernavin
120095d3d3 flowprobe: fix sending L2 flows using L2_IP6 template
Currently, L2 flows are exported using L2_IP6 template if L3 or L4
recording is enabled on L2 datapath. That occurs because during feature
enable, L2 template is added and its ID is not saved immediately. Then
L2_IP4 and L2_IP6 templates are added overwriting "template_id" each
time. And in the end, the current value of "template_id" is saved for L2
template. The problem is that "template_id" at that point contains the
ID of L2_IP6 template.

With this fix, save the template ID immediately after adding a template
for all variants (datapaths). Also, cover the case with a test.

Type: fix
Change-Id: Id27288043b3b8f0e89e77f45ae9a01fa7439e20e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-12 22:15:20 +00:00
Alexander Kozyrev
006c071b0a dpdk: add Mellanox BlueField NICs
List BlueField NICs as a supported PCI devices.

Type: feature
Change-Id: Ida2300df516ab9cd2fcde1f816bbdc081016039a
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
2023-10-12 20:44:48 +00:00
Steven Luong
947aa8fffc session: ignore connecting half_open session in session_tx_fifo_dequeue_internal
s->tx_fifo is 0 for the connecting half open session.

Type: fix

Change-Id: I2ba1ae99a2fa4fae1896587f40e0e4fb73c1edcb
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-10-12 18:06:39 +00:00
Brian Morris
733e093e70 tls: Fix SSL_CTX leak on every client session
Type: fix

Change-Id: I35b3920288269073cdd35f79c938396128d169c9
Signed-off-by: Brian Morris <bmorris2@cisco.com>
2023-10-11 20:12:50 +00:00
Florin Coras
9eaf377a38 session: ignore app rx ntf if transport closed
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id56a101a6350903b00f7c96705fb86039e70e12c
2023-10-11 19:23:38 +00:00
Florin Coras
fa9f37c15c session: fix tx deq ntf assert for cl
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I97a04ed0417f1a3433665f6aa1a9424138fd54cb
2023-10-11 19:23:26 +00:00
Dave Wallace
21bc900c34 lb: fix intermittent per-port-vip idx lookup failure
- Causes per-port-vip testcases to fail when the
  uninitialized reserved field in the stack variable
  key for the hash lookup was a non-zero stack memory
  location.

Type: fix

Change-Id: I56afa15e7df60bc2340514f2c7ce5e71a9cb47a9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-10 23:19:18 -04:00
Florin Coras
84c9ee3d69 session: maintain old state on premature close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2ea821e0499a3874c4579f5480ea86f30ebe615f
2023-10-10 15:59:16 +00:00
Dave Wallace
05cc62dd50 vppinfra: fix coverity issue CID 323952
Type: fix
Fixes: 08600ccfa

Change-Id: I53ba0d96507b55ab7cd735073d6c4cf20a3cc948
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-09 18:05:47 -04:00
Damjan Marion
65dc34bb0b buffers: buffer allocation improvements
- pass buffer pool name trough va
- make buffers naturaly aligned
- fix calculation of total number of buffers

Type: improvement
Change-Id: I6aebf249ebd67823b4632ac08905bfa3aa7d1ee5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-09 09:58:37 +00:00
Florin Coras
aa7b88120a tls: propagate reads to app irrespective of state
Session input node handles rx notifications even if session not fully
accepted/connected

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6560c45db8f8e0b7f0dc3bdd0939f13ca2f43f15
2023-10-08 00:16:56 +00:00
Florin Coras
a3d55df1e9 tls: report error if connected cannot be initialized
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I987ac6b461b473836917bce6ce0d4ac109cc8ddb
2023-10-08 00:10:52 +00:00
Florin Coras
3843d0dd03 tls: no read after app close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I34f8ee2e36d07e8e55e21561528fc6b73feb852f
2023-10-08 00:10:32 +00:00
Florin Coras
431b489c5a session: propagate delayed rx evts after connect/accept
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4a2e8f864df7269ec5a3c4fd4d8785a67b687d58
2023-10-07 14:23:18 -07:00
Florin Coras
9ffec14a22 session: handle accept and connect errors
If builtin apps refuse connections, they should be cleaned up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I95ef22902ac3fe873e15e250aa5f03031c2dc0c4
2023-10-07 10:03:56 -07:00
hedi bouattour
589fe7ca61 cnat: add flow hash config to cnat translation
Type: feature

this patch adds a hash config field to cnat translation
to use it in load balancing instead of always using default one

Change-Id: I5b79642ca8b365b5dcc06664f6c100a9d3830a29
Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
2023-10-06 18:18:00 +00:00
Gabriel Oginski
b953532ed4 vpp-swan: fix config to run containers
This patch changes config to run containers on Ubuntu 22.04.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3be48099cb48d2c4a04526c15780244614bef3d4
2023-10-05 10:37:37 +00:00
Damjan Marion
08600ccfa1 vppinfra: fix string termination in clib_file_get_resolved_basename
Type: fix
Fixes: 40f4810
Change-Id: Idf51462c8154663de23154f17a894b7245c9fbf0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-04 18:03:25 +02:00
Nathan Skrzypczak
e111bbd121 session: make port range configurable
Type: feature

This patch makes the port range used by the transport layer
configurable in the manner of sysctl's ip_local_port_range.

Change-Id: Ie17f776538311b29d1dca64643a3a0bd74cb90a6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-10-03 16:28:36 +00:00
Andrew Yourtchenko
bc37878ecb build: add ability to disable some plugins from packaging and tests
When custom-packaging the VPP artifacts, it can be useful to exclude
some of the core plugins from packaging/testing, for some reasons.
A removal of a plugin(s) from the worktree needs to be tracked as
a separate change, and thus is tricky from the maintenance
point of view.

This change adds the ability to "pretend they do not exist" -
plugins which are added to the comma-separated environment
variable "VPP_EXCLUDED_PLUGINS" will not be added to the build
process and not packaged.

The tests do not have the 1:1 relationship as plugins,
so they might need to be modified separately. This change
includes some of these modifications as an example.

Type: feature
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id31562d00a01ced1acbb4996a633517cbd6f09d8
2023-10-03 13:23:25 +00:00
Damjan Marion
08057947f3 vppinfra: add foreach_int macro
foreach_int(x, 1, 3, 5, 7)
   {
     fformat(stdout, "x is %u\n", x);
   }

Type: improvement
Change-Id: Idc355f4a284f421b150e3acb7a3a57bcede408c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-03 12:19:58 +00:00
Damjan Marion
029bff4b9a vppinfra: splat and gather vector inlines
Type: improvement

Change-Id: I4b00b3a6ff63fc8b313c89217ccdea356c0783a3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-03 12:19:33 +00:00
Filip Varga
1457828c59 nat: nat66 cli bug fix
Two similar CLI paths in nat66 plugin cause
unexpected behavior. Bug fix following [1] fix.

[1] https://gerrit.fd.io/r/c/vpp/+/35859

Change-Id: I771dd230fa6edb6bab3936652770a388d6e41a3f
Type: fix
Signed-off-by: Filip Varga <fivarga@cisco.com>
2023-10-03 08:03:10 +00:00
Fahad Khan
5299164022 stats: added optional CLI arg "port" to specify non-default port
There are cases where default port for prometheus exporter is not
available e.g. when multiple vpp are running on single node.

Type: improvement
Change-Id: I39701486f9dfaf4dc9f08aab56e88126687b507a
Signed-off-by: Fahad Khan <fahadnaeemkhan@gmail.com>
2023-10-03 08:01:35 +00:00
Florin Coras
c1b038001e tls: limit openssl engine max read burst
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic7a8fd37d79fc9c09c8b1539d630f3b8983b8bb3
2023-10-02 20:23:06 +00:00
Florin Coras
d69ef3aeeb tls: fix formatting of half open connections
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If96dc748a716a261edfcb1020210bd73058e382f
2023-10-02 17:38:11 +00:00
Xinyao Cai
6cb7273949 flow dpdk avf: add support for using l2tpv3 as RSS type
This patch adds support for using l2tpv3 as RSS type

Type: feature
Signed-off-by: Xinyao Cai <xinyao.cai@intel.com>
Change-Id: Ic3e0935a4754d084184f1cc38ea9531ddfd9e7bc
2023-10-01 21:17:07 +00:00
Jieqiang Wang
bef2d6da4e build: modify N_PREFETCH on Arm N2 to achieve best perf
From GCC 12, march=armv9-a option is supported, which includes the sve
and crc options needed. Furthermore, VPP L3Fwd benchmark results on N2
based servers show that N_PREFETCH set to 6 gives the best performance.

Type: feature

Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I9c4fcad84d4db1189d956dabab22b26d020fbfd6
2023-10-01 21:11:32 +00:00
Gavril Florian
e7f34c93b1 fib: Crash when specify a big prefix length from CLI.
The VPP is crashing when specify a very big prefix length, like
ip route add 1.1.1.1/55 via 2.2.2.2

Type: fix

Signed-off-by: Gavril Florian <gflorian@3nets.io>
Change-Id: Ic491c0b24e07be897ff35ae1e835280f04ab3ea5
2023-10-01 20:59:58 +00:00
Fan Zhang
35f8ee6921 crypto: update maintainer email
Update my email address in maintainer document.

Type: improvement

Change-Id: I8ba518fa4c9cb414342383e1461f3f94b661ac33
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2023-09-28 15:09:12 +00:00
Piotr Bronowski
7cc17f6df9 dpdk-cryptodev: improve dequeue behavior, fix cache stats logging
This patch provides minor improvements to the logic governing dequeuing
from the ring. Previously whenever a frame was dequeued
we've been trying to dequeue from the ring another one till
inflight == 0. Now threshold is set for 8 frames pending in the cache
to be consumed by the vnet. This threshold has been chosen based on
cache ring stats observation in the system under load.
Some unnecessary logic for setting deq_tail has been removed.
Also logging has been corrected, and cache ring logic simplied.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I19f3daf5913006e9cb23e142a163f596e85f5bda
2023-09-28 15:07:52 +00:00
Alexander Kozyrev
029f039d5d dpdk: add ConnectX-6LX and ConnectX-7 support
List Mellanox ConnectX-6LX and ConnectX-7 as a supported PCI devices.

Type: feature
Change-Id: Ieeca3f214d08f29238c387354055ac1320cab75f
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
2023-09-28 12:36:21 +00:00
Florin Coras
a127d3c157 tls: init connection for prealloced app sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icd62dc110e3a73b24372f3a5162f8008b7edee9f
2023-09-26 22:06:09 +00:00
NikitaSkrynnik
bb1cde678e ping: Simple binary API for running ping based on events
Type: improvement
Change-Id: I02846a2420637470cb0f9472c86471b6a3421a75
Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
2023-09-26 20:45:28 +00:00
Ranjan Raj
40242b88e9 crypto-ipsecmb: bump intel-ipsec-mb version to 1.4
Type: feature

This patch update the Intel IPsec-MB lib to v1.4
Remove v0.54 and v0.55 support, as the compatible IMB APIs
are deprecated in v1.4

Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
Change-Id: I01f71134c6bd17a68ec20b7bb4b0b0ff43fc644b
2023-09-26 15:07:32 +00:00
Vladislav Grishenko
d732f34911 fib: fix mpls label dpo drop proto
Next drop node should be related to payload protocol.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: If12e8dc8b19c61f8c96c275b3f9e565e91ecdbed
2023-09-26 02:37:20 +00:00
Vladislav Grishenko
08ba422739 fib: fix mpls label dpo packets prefetching
Four packets are batched after 696e88da9799056036f329676213f3c0c0a1db9c,
so prefetch is required for the next 4-7 packets, not for 2-5.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I4ab01e66c3b446caf113a154915473e96ab32198
2023-09-25 03:11:30 +05:00
Neale Ranns
3952879609 fib: Don't use an address from an attached prefix when sending ARP requests.
Change-Id: I4c3144794dd0bd7de6150929e53f6d305c496b17

Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I7b0c2c2dec5e867970599b8f2f2da17f2ff0b17c
2023-09-24 02:29:00 +00:00
Dmitry Valter
25801d6d2a udp: fix udp encap tracing
Correct trace functions correspond with the encap type rather than with
the payload type.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Iea1eb08a2ce9d147984ef604c7a39c62c7330e80
2023-09-23 17:29:50 +00:00
Florin Coras
00d7d86be7 tls: ignore tx events for not fully established sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I401a116a1a46c0dc5d591115de5ff0eef2f6440b
2023-09-22 19:27:03 -07:00
Andrew Yourtchenko
7419bede7a misc: Initial 24.02-rc0 commit
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I42af9706461034957f83103e2756cc6bfab054f7
2023-09-20 15:59:48 +02:00
1555 changed files with 75201 additions and 24547 deletions

View File

@ -20,15 +20,26 @@ ForEachMacros:
- 'vec_foreach_index_backwards'
- 'vec_foreach_pointer'
- 'vlib_foreach_rx_tx'
- 'foreach_int'
- 'foreach_pointer'
- 'foreach_vlib_main'
- 'foreach_set_bit_index'
- 'foreach_vlib_frame_bitmap_set_bit_index'
- 'FOREACH_ARRAY_ELT'
- 'RTE_ETH_FOREACH_DEV'
- 'foreach_clib_stack_frame'
- 'foreach_vnet_dev_rx_queue_runtime'
- 'foreach_vnet_dev_counter'
- 'foreach_vnet_dev_port_rx_queue'
- 'foreach_vnet_dev_port_tx_queue'
- 'foreach_vnet_dev_port'
- 'foreach_vnet_dev_args'
- 'foreach_vnet_dev_port_args'
StatementMacros:
- 'CLIB_MULTIARCH_FN'
- 'VLIB_NODE_FN'
- 'VNET_DEV_NODE_FN'
- 'VNET_DEVICE_CLASS_TX_FN'
- '__clib_section'
- '__clib_aligned'

15
.gitignore vendored
View File

@ -24,6 +24,13 @@
/build/external/vpp-*
/build/external/dpdk_mlx_default.sh
/build/external/downloads/
/build/external/deb/_build/
/build/external/deb/debian/changelog
/build/external/deb/debian/debhelper-build-stamp
/build/external/deb/debian/tmp/
/build/external/deb/debian/files/
/build/external/deb/debian/.debhelper/
/build/external/deb/debian/vpp-ext-deps*
/path_setup
/tools/
# start autotools ignore
@ -122,7 +129,10 @@ compile_commands.json
/extras/hs-test/vpp-data
/extras/hs-test/hs-test
/extras/hs-test/http_server
/extras/hs-test/.build.vpp
/extras/hs-test/.build.ok
/extras/hs-test/.build.cov.ok
/extras/hs-test/.last_hst_ppid
/extras/hs-test/summary/
# ./configure
/CMakeFiles
@ -130,8 +140,11 @@ compile_commands.json
/lib
/.ninja_deps
/.ninja_log
/.cmake
/CMakeCache.txt
/build.ninja
/cmake_install.cmake
/startup.conf
/startup.vpp
# log file archives
/archives

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2410

View File

@ -98,6 +98,11 @@ I: policer
M: Neale Ranns <neale@graphiant.com>
F: src/vnet/policer/
VNET New Device Drivers Infra
I: dev
M: Damjan Marion <damarion@cisco.com>
F: src/vnet/dev/
VNET Device Drivers
I: devices
Y: src/vnet/devices/pipe/FEATURE.yaml
@ -187,14 +192,14 @@ I: sr
M: Pablo Camarillo <pcamaril@cisco.com>
M: Ahmed Abdelsalam <ahabdels@cisco.com>
F: src/vnet/srv6/
F: src/vnet/srmpls/
F: src/plugin/srmpls/
F: src/examples/srv6-sample-localsid/
VNET IPSec
I: ipsec
M: Neale Ranns <neale@graphiant.com>
M: Radu Nicolau <radu.nicolau@intel.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/vnet/ipsec/
VNET Crypto Infra
@ -226,12 +231,12 @@ F: src/plugins/crypto_openssl/
Plugin - Crypto - ipsecmb
I: crypto-ipsecmb
M: Neale Ranns <neale@graphiant.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/crypto_ipsecmb/
Plugin - Crypto - sw_scheduler
I: crypto-sw-scheduler
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugs/crypto_sw_scheduler/
VNET L2
@ -405,6 +410,22 @@ I: avf
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/avf/
Plugin - IAVF Device driver
I: iavf
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_iavf/
Plugin - Amazon Elastic Network Adapter (ENA) device driver
I: ena
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_ena/
Plugin - Marvell Octeon device driver
I: octeon
M: Monendra Singh Kushwaha <kmonendra@marvell.com>
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_octeon/
Plugin - Dispatch Trace PCAP
I: dispatch-trace
M: Dave Barach <vpp@barachs.net>
@ -419,7 +440,7 @@ F: src/plugins/dpdk/
Plugin - DPDK Crypto
I: dpdk-cryptodev
M: Radu Nicolau <radu.nicolau@intel.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/dpdk/cryptodev/
Plugin - flowprobe
@ -439,11 +460,6 @@ M: Dave Barach <vpp@barachs.net>
M: Florin Coras <fcoras@cisco.com>
F: src/plugins/http_static/
Plugin - builtinurl
I: builtinurl
M: Dave Barach <vpp@barachs.net>
F: src/plugins/builtinurl/
Plugin - GTPU
I: gtpu
M: Hongjun Ni <hongjun.ni@intel.com>
@ -484,10 +500,10 @@ I: memif
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/memif/
Plugin - Marvell MUSDK device driver
I: marvell
Plugin - Marvell Armada device driver
I: armada
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/marvell/
F: src/plugins/dev_armada/
Plugin - performance counter
I: perfmon
@ -665,7 +681,7 @@ F: src/plugins/snort/
libmemif
I: libmemif
M: Damjan Marion <damarion@cisco.com>
M: Mohsin Kazmi <sykazmi@cisco.com>
F: extras/libmemif
gomemif
@ -751,7 +767,7 @@ F: src/plugins/cnat
Plugin - Wireguard
I: wireguard
M: Artem Glazychev <artem.glazychev@xored.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/wireguard
Packetforge
@ -831,6 +847,11 @@ I: tracenode
M: Maxime Peim <mpeim@cisco.com>
F: src/plugins/tracenode
Plugin - Packet Vector Tunnel Interface
I: pvti
M: Andrew Yourtchenko <ayourtch@gmail.com>
F: src/plugins/pvti
cJSON
I: cjson
M: Ole Troan <ot@cisco.com>
@ -854,7 +875,7 @@ F: src/extras/rpm/opensuse
VPP StrongSwan Daemon
I: vpp-swan
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
M: Gabriel Oginski <gabrielx.oginski@intel.com>
F: extras/strongswan/vpp_sswan
@ -871,3 +892,8 @@ M: vpp-dev Mailing List <vpp-dev@fd.io>
C: Missing Maintainer
F: *
F: */
Netmap
I: netmap
M: Tom Jones <thj@freebsd.org>
F: src/plugins/netmap/

157
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -42,4 +42,4 @@ external_configure = echo
external_build = echo
external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install
external_install = $(MAKE) $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install

View File

@ -30,6 +30,15 @@ vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
ifeq ("$(V)","1")
vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
endif
ifneq ($(VPP_PLATFORM),)
vpp_cmake_args += -DVPP_PLATFORM="$(VPP_PLATFORM)"
endif
ifneq ($(VPP_EXCLUDED_PLUGINS),)
vpp_cmake_args += -DVPP_EXCLUDED_PLUGINS="$(VPP_EXCLUDED_PLUGINS)"
endif
ifneq (${SOURCE_DATE_EPOCH}),)
vpp_cmake_args += -DVPP_SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
endif
ifneq ($(VPP_EXTRA_CMAKE_ARGS),)
vpp_cmake_args += $(VPP_EXTRA_CMAKE_ARGS)

View File

@ -39,7 +39,7 @@
######################################################################
# Scripts require non-POSIX parts of bash
SHELL := /bin/bash
SHELL := $(shell which bash)
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
@ -365,7 +365,7 @@ NATIVE_TOOLS_$(IS_LINUX) += $(NATIVE_TOOLS_LINUX)
CROSS_TOOLS_$(IS_LINUX) += glibc gcc
# must be first for bootstrapping
NATIVE_TOOLS = findutils make
NATIVE_TOOLS = findutils $(MAKE)
# basic tools needed for build system
NATIVE_TOOLS += git automake autoconf libtool texinfo tar
@ -614,7 +614,7 @@ check_platform = \
-a ! -x "`which 2> /dev/null $${target_gcc}`" ] ; then \
$(call build_msg_fn, \
No cross-compiler found for platform $(PLATFORM) target $(TARGET); \
try make PLATFORM=$(PLATFORM) install-tools) ; \
try $(MAKE) PLATFORM=$(PLATFORM) install-tools) ; \
exit 1 ; \
fi
@ -650,11 +650,18 @@ configure_check_timestamp = \
# /proc/cpuinfo does not exist on platforms without a /proc and on some
# platforms, notably inside containers, it has no content. In those cases
# we assume there's 1 processor; we use 2*ncpu for the -j option.
#
# On FreeBSD we can call nproc to get the number of processors.
#
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
# for file presence and content; for now this will have to do.
ifndef MAKE_PARALLEL_JOBS
ifeq ($(shell uname), FreeBSD)
MAKE_PARALLEL_JOBS = $(shell nproc)
else
MAKE_PARALLEL_JOBS = $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
$(shell grep -c ^processor /proc/cpuinfo), 2)
endif # FreeBSD
endif
MAKE_PARALLEL_FLAGS ?= $(if $($(PACKAGE)_make_parallel_fails),,-j $(MAKE_PARALLEL_JOBS))
@ -800,7 +807,7 @@ pull-all:
$(call build_msg_fn,Git pull build tools) ; \
$(call tool_make_target_fn,pull-all) ; \
$(call build_msg_fn,Git pull packages for platform $(PLATFORM)) ; \
make PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
$(MAKE) PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
.PHONY: %-diff
%-diff:
@ -962,13 +969,13 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot /bin/bash -c "{ \
fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
basic_system \
$(ROOT_PACKAGES)) ; \
: make dev directory ; \
: $(MAKE) dev directory ; \
$(linuxrc_makedev) ; \
echo @@@@ Relocating ELF executables to run in / @@@@ ; \
scripts/set-rpath /$(arch_lib_dir):/lib ; \
@ -990,7 +997,7 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
| xargs sign $($(PLATFORM)_public_key) \
$($(PLATFORM)_private_key_passphrase) ; \
fi ; \
: make read-only file system ; \
: $(MAKE) read-only file system ; \
mksquashfs \
$${tmp_dir} $${ro_image} \
-no-exports -no-progress -no-recovery ; \
@ -1054,7 +1061,7 @@ rw-image: rw-image-check-type ro-image
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot /bin/bash -c "{ \
fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -12,20 +12,30 @@
# limitations under the License.
# Scripts require non-POSIX parts of bash
SHELL := /bin/bash
SHELL := $(shell which bash)
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
MAKE_ARGS ?= -j
BUILD_DIR ?= $(CURDIR)/_build
INSTALL_DIR ?= $(CURDIR)/_install
PKG_VERSION ?= $(shell git describe --abbrev=0 --match 'v[0-9]*' | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2)
PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l)
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct .)
ifeq ($(shell uname), FreeBSD)
JOBS := $(shell nproc)
else
JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell grep -c ^processor /proc/cpuinfo), 2)
endif # FreeBSD
B := $(BUILD_DIR)
I := $(INSTALL_DIR)
ifeq ($(WORKSPACE),)
L := $(B)
else
L := $(WORKSPACE)/archives/vpp-ext-deps
$(shell rm -rf $(L) && mkdir -p $(L))
endif
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
@ -34,23 +44,35 @@ CMAKE?=cmake
endif
ARCH_X86_64=$(filter x86_64,$(shell uname -m))
AARCH64=$(filter aarch64,$(shell uname -m))
include packages.mk
include packages/ipsec-mb.mk
include packages/quicly.mk
ifneq ($(shell uname), FreeBSD)
include packages/rdma-core.mk
include packages/dpdk.mk
include packages/xdp-tools.mk
include packages/octeon-roc.mk
endif # FreeBSD
.PHONY: clean
clean:
@rm -rf $(B) $(I)
.PHONY: install
install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install
ifeq ($(shell uname), FreeBSD)
install: $(if $(ARCH_X86_64), ipsec-mb-install) quicly-install
else
install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install $(if $(AARCH64), octeon-roc-install)
endif # FreeBSD
.PHONY: config
ifeq ($(shell uname), FreeBSD)
config: $(if $(ARCH_X86_64), ipsec-mb-config) quicly-build
else
config: $(if $(ARCH_X86_64), ipsec-mb-config) dpdk-config rdma-core-config quicly-build
endif # FreeBSD
##############################################################################
# .deb packaging
@ -68,7 +90,7 @@ deb/debian/changelog: Makefile
@echo "" >> $@
@echo " * Version $(DEB_VER)" >> $@
@echo "" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R --date=@${SOURCE_DATE_EPOCH})" >> $@
$(DEV_DEB): deb/debian/changelog
@cd deb && dpkg-buildpackage -b -uc -us
@ -78,7 +100,7 @@ build-deb: $(DEV_DEB)
install-deb:
ifneq ($(INSTALLED_VER),$(DEB_VER)-$(PKG_SUFFIX))
@make $(DEV_DEB)
@$(MAKE) $(DEV_DEB)
@sudo dpkg -i $(DEV_DEB)
else
@echo "=========================================================="
@ -156,17 +178,17 @@ ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
@echo "development package by invoking 'make install-ext-deps'"
@echo "from the top level directory"
@echo "=========================================================="
make config
$(MAKE) config
else
ifneq ($(INSTALLED_VER),)
make check-deb
$(MAKE) check-deb
endif
ifneq ($(INSTALLED_RPM_VER),)
make check-rpm
$(MAKE) check-rpm
endif
endif
ebuild-install:
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
make install
$(MAKE) install
endif

View File

@ -1,2 +1,3 @@
rdma=45.0 dpdk=23.03
rdma=46.1 dpdk=23.07
rdma=49.0 dpdk=23.11
rdma=51.0 dpdk=24.03
rdma=52.0 dpdk=24.07

View File

@ -21,9 +21,9 @@ $1_src_dir ?= $(B)/src-$1
$1_patch_dir ?= $(CURDIR)/patches/$1_$($1_version)
$1_build_dir ?= $(B)/build-$1
$1_install_dir ?= $(I)
$1_config_log ?= $(B)/$1.config.log
$1_build_log ?= $(B)/$1.build.log
$1_install_log ?= $(B)/$1.install.log
$1_config_log ?= $(L)/$1.config.log
$1_build_log ?= $(L)/$1.build.log
$1_install_log ?= $(L)/$1.install.log
##############################################################################
# Download

View File

@ -19,9 +19,12 @@ DPDK_FAILSAFE_PMD ?= n
DPDK_MACHINE ?= default
DPDK_MLX_IBV_LINK ?= static
dpdk_version ?= 23.07
dpdk_version ?= 24.07
dpdk_base_url ?= http://fast.dpdk.org/rel
dpdk_tarball := dpdk-$(dpdk_version).tar.xz
dpdk_tarball_md5sum_24.07 := 48151b1bd545cd95447979fa033199bb
dpdk_tarball_md5sum_24.03 := a98da848d6ba09808ef00f9a26aaa49a
dpdk_tarball_md5sum_23.11 := 896c09f5b45b452bd77287994650b916
dpdk_tarball_md5sum_23.07 := 2b6d57f077585cb15b885482362fd47f
dpdk_tarball_md5sum_23.03 := 3cf8ebbcd412d5726db230f2eeb90cc9
dpdk_tarball_md5sum_22.11.1 := 0594708fe42ce186a55b0235c6e20cfe
@ -31,8 +34,11 @@ dpdk_tarball_md5sum_21.11 := 58660bbbe9e95abce86e47692b196555
dpdk_tarball_md5sum := $(dpdk_tarball_md5sum_$(dpdk_version))
dpdk_url := $(dpdk_base_url)/$(dpdk_tarball)
dpdk_tarball_strip_dirs := 1
ifeq ($(shell uname), FreeBSD)
dpdk_depends := $(if $(ARCH_X86_64), ipsec-mb)
else
dpdk_depends := rdma-core $(if $(ARCH_X86_64), ipsec-mb)
endif
DPDK_MLX_DEFAULT := $(shell if grep -q "rdma=$(rdma-core_version) dpdk=$(dpdk_version)" mlx_rdma_dpdk_matrix.txt; then echo 'y'; else echo 'n'; fi)
DPDK_MLX4_PMD ?= $(DPDK_MLX_DEFAULT)
DPDK_MLX5_PMD ?= $(DPDK_MLX_DEFAULT)
@ -132,14 +138,19 @@ endif
DPDK_DRIVERS_DISABLED := $(shell echo $(DPDK_DRIVERS_DISABLED) | tr -d '\\\t ')
DPDK_LIBS_DISABLED := $(shell echo $(DPDK_LIBS_DISABLED) | tr -d '\\\t ')
SED=sed
ifeq ($(shell uname), FreeBSD)
SED=gsed
endif
HASH := \#
# post-meson-setup snippet to alter rte_build_config.h
define dpdk_config
if grep -q RTE_$(1) $(dpdk_src_dir)/config/rte_config.h ; then \
sed -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \
$(SED) -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \
$(dpdk_src_dir)/config/rte_config.h; \
elif grep -q RTE_$(1) $(dpdk_build_dir)/rte_build_config.h ; then \
sed -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \
$(SED) -i -e 's/$(HASH)define RTE_$(1).*/$(HASH)define RTE_$(1) $(DPDK_$(1))/' \
$(dpdk_build_dir)/rte_build_config.h; \
else \
echo '$(HASH)define RTE_$(1) $(DPDK_$(1))' \
@ -155,7 +166,7 @@ if [[ "$(DPDK_$(1))" == "y" ]]; then \
>> $(dpdk_build_dir)/rte_build_config.h ; \
fi; \
elif [[ "$(DPDK_$(1))" == "n" ]]; then \
sed -i '/$(HASH)define RTE_$(1) .*/d' $(dpdk_build_dir)/rte_build_config.h \
$(SED) -i '/$(HASH)define RTE_$(1) .*/d' $(dpdk_build_dir)/rte_build_config.h \
$(dpdk_src_dir)/config/rte_config.h ; \
fi
endef
@ -171,6 +182,7 @@ DPDK_MESON_ARGS = \
-Db_pie=true \
-Dmachine=$(DPDK_MACHINE) \
--buildtype=$(DPDK_BUILD_TYPE) \
-Denable_kmods=false \
${DPDK_MLX_CONFIG_FLAG}
PIP_DOWNLOAD_DIR = $(CURDIR)/downloads/

View File

@ -11,25 +11,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ipsec-mb_version := 1.3
ipsec-mb_version := 1.5
ipsec-mb_patch_version := 0
ipsec-mb_version_str := $(ipsec-mb_version).$(ipsec-mb_patch_version)
ipsec-mb_tarball := v$(ipsec-mb_version).tar.gz
ipsec-mb_tarball_md5sum_0.54 := 258941f7ba90c275fcf9d19c622d2d21
ipsec-mb_tarball_md5sum_0.55 := deca674bca7ae2282890e1fa7f953609
ipsec-mb_tarball_md5sum_1.0 := 906e701937751e761671dc83a41cff65
ipsec-mb_tarball_md5sum_1.1 := 3916471d3713d27e42473cb6af9c65e5
ipsec-mb_tarball_md5sum_1.2 := f551d9c208893a436c1f5c146a615bd6
ipsec-mb_tarball_md5sum_1.3 := d8692db9efe32a263b61f12ac0dca950
ipsec-mb_tarball_md5sum_1.4 := fddba2611f822296ddd82d1c31d22b24
ipsec-mb_tarball_md5sum_1.5 := f18680f8dd43208a15a19a494423bdb9
ipsec-mb_tarball_md5sum := $(ipsec-mb_tarball_md5sum_$(ipsec-mb_version))
ipsec-mb_tarball_strip_dirs := 1
ipsec-mb_url := http://github.com/intel/intel-ipsec-mb/archive/$(ipsec-mb_tarball)
ipsec-mb_system_header := $(wildcard /usr/include/intel-ipsec-mb.h)
define ipsec-mb_config_cmds
@true
endef
define ipsec-mb_build_cmds
@make -C $(ipsec-mb_src_dir)/lib -j \
@$(MAKE) -C $(ipsec-mb_src_dir)/lib -j \
SHARED=n \
SAFE_PARAM=n \
SAFE_LOOKUP=n \
@ -38,7 +41,22 @@ define ipsec-mb_build_cmds
EXTRA_CFLAGS="-g -msse4.2" > $(ipsec-mb_build_log)
endef
ifneq ($(ipsec-mb_system_header), )
ipsec-mb_system_ver_str := $(shell awk '/^#define\s+IMB_VERSION_STR/ { print $$3 }' \
$(ipsec-mb_system_header))
endif
define ipsec-mb_install_cmds
if [[ -n "$(ipsec-mb_system_header)" ]]; then \
if [[ "$(ipsec-mb_system_ver_str)" != "$(ipsec-mb_version_str)" ]]; then \
echo "Intel-ipsec-mb build Error: System installed Intel IPsec-mb lib \
version mismatch with target version, \
expecting $(ipsec-mb_version_str), \
but system has $(ipsec-mb_system_ver_str) \
please align/remove system installed $(ipsec-mb_system_header) before building."; \
exit 1; \
fi \
fi
@mkdir -p $(ipsec-mb_install_dir)/include
@mkdir -p $(ipsec-mb_install_dir)/lib
@cp $(ipsec-mb_src_dir)/lib/intel-ipsec-mb.h $(ipsec-mb_install_dir)/include

26
build/external/packages/octeon-roc.mk vendored Normal file
View File

@ -0,0 +1,26 @@
# Copyright (c) 2023 Marvell.
# SPDX-License-Identifier: Apache-2.0
# https://spdx.org/licenses/Apache-2.0.html
octeon-roc_version := 0.5
octeon-roc_tarball := v$(octeon-roc_version).tar.gz
octeon-roc_tarball_md5sum := 76bc56c84935da944bbf340fe5283ef0
octeon-roc_tarball_strip_dirs := 1
octeon-roc_url := https://github.com/MarvellEmbeddedProcessors/marvell-octeon-roc/archive/refs/tags/$(octeon-roc_tarball)
define octeon-roc_config_cmds
@true
endef
define octeon-roc_build_cmds
@cd ${octeon-roc_src_dir} && rm -f $(octeon-roc_build_log) && $(CMAKE) ${octeon-roc_src_dir} -DCMAKE_INSTALL_PREFIX='$(octeon-roc_install_dir)' >> $(octeon-roc_build_log)
@$(MAKE) -C ${octeon-roc_src_dir} >> $(octeon-roc_build_log)
endef
define octeon-roc_install_cmds
@$(MAKE) -C ${octeon-roc_src_dir} install >> $(octeon-roc_install_log)
endef
$(eval $(call package,octeon-roc))

View File

@ -23,11 +23,11 @@ RDMA_CORE_DEBUG?=n
# 2. Verify that the file build/external/dpdk_mlx_default.sh was generated
# and contains 'DPDK_MLX_DEFAULT=y'
#
rdma-core_version := 46.1
rdma-core_version := 52.0
rdma-core_tarball := rdma-core-$(rdma-core_version).tar.gz
rdma-core_tarball_md5sum_43.0 := 3785fd2b35cd41043ab53226fc112d41
rdma-core_tarball_md5sum_45.0 := 2b170e6d2ad66fb688580520a16d1ad5
rdma-core_tarball_md5sum_46.1 := 3ac7c00717ea2720df5d90f8a43ae33a
rdma-core_tarball_md5sum_49.0 := 9fe3909f19c7e0276c9e546411bbb49c
rdma-core_tarball_md5sum_51.0 := ed95d79f782ea00bd7233d453abd60b3
rdma-core_tarball_md5sum_52.0 := c78dba484aac72eb8586d88f7b399b0f
rdma-core_tarball_md5sum := $(rdma-core_tarball_md5sum_$(rdma-core_version))
rdma-core_tarball_strip_dirs := 1
rdma-core_url := http://github.com/linux-rdma/rdma-core/releases/download/v$(rdma-core_version)/$(rdma-core_tarball)

View File

@ -24,15 +24,15 @@ define xdp-tools_config_cmds
endef
define xdp-tools_build_cmds
@cd ${xdp-tools_src_dir} && make V=1 BUILD_STATIC_ONLY=y > $(xdp-tools_build_log)
@cd ${xdp-tools_src_dir} && $(MAKE) V=1 BUILD_STATIC_ONLY=y > $(xdp-tools_build_log)
endef
define xdp-tools_install_cmds
@rm -f $(xdp-tools_install_log)
@cd ${xdp-tools_src_dir} && \
make -C lib/libbpf/src install V=1 BUILD_STATIC_ONLY=y PREFIX='' DESTDIR='$(xdp-tools_install_dir)' >> $(xdp-tools_install_log)
$(MAKE) -C lib/libbpf/src install V=1 BUILD_STATIC_ONLY=y PREFIX='' DESTDIR='$(xdp-tools_install_dir)' >> $(xdp-tools_install_log)
@cd ${xdp-tools_src_dir} && \
make libxdp_install V=1 BUILD_STATIC_ONLY=y PREFIX='' DESTDIR='$(xdp-tools_install_dir)' >> $(xdp-tools_install_log)
$(MAKE) libxdp_install V=1 BUILD_STATIC_ONLY=y PREFIX='' DESTDIR='$(xdp-tools_install_dir)' >> $(xdp-tools_install_log)
endef
$(eval $(call package,xdp-tools))

View File

@ -0,0 +1,63 @@
From 6429e38ae77c7998c84d5a0ed26b4fb0d81424c1 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Thu, 15 Jun 2023 01:33:37 +0000
Subject: [PATCH v1] net: fix pkt length type for raw pattern
In current pattern parsing function for raw pattern, the packet length
variable is defined as uint8_t, which is too small for a large packet,
such as srv6. Change the type to uint16_t.
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading
in RSS")
Signed-off-by: Ting Xu <ting.xu@intel.com>
---
drivers/net/iavf/iavf_hash.c | 2 +-
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index ae6fb38594..cf4d677101 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -886,8 +886,8 @@ iavf_hash_parse_raw_pattern(const struct rte_flow_item *item,
struct iavf_rss_meta *meta)
{
const struct rte_flow_item_raw *raw_spec, *raw_mask;
+ uint16_t spec_len, pkt_len;
uint8_t *pkt_buf, *msk_buf;
- uint8_t spec_len, pkt_len;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
int i, j;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 480b369af8..e8842bc242 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1876,7 +1876,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
(uint8_t *)(uintptr_t)raw_mask->pattern;
uint8_t *tmp_spec, *tmp_mask;
uint16_t tmp_val = 0;
- uint8_t pkt_len = 0;
+ uint16_t pkt_len = 0;
uint8_t tmp = 0;
int i, j;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f35727856e..52646e9408 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -653,8 +653,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
const struct rte_flow_item_raw *raw_spec, *raw_mask;
struct ice_parser_profile prof;
struct ice_parser_result rslt;
+ uint16_t spec_len, pkt_len;
uint8_t *pkt_buf, *msk_buf;
- uint8_t spec_len, pkt_len;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
int i, j;
--
2.25.1

View File

@ -0,0 +1,54 @@
From b184d103bd767e2286cdb2b0639a2470dce205d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 18 Jan 2024 13:22:47 +0100
Subject: [PATCH] Fix transposed calloc() arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Calls to calloc() are supposed to have the number of elements as the first
argument, but we erroneously transposed the arguments in a couple of places. It
seems GCC 14 has started to warn about this, which exposed this as build
breakage.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
lib/util/params.c | 2 +-
lib/util/xpcapng.c | 6 +++---
xdp-trafficgen/xdp-trafficgen.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/util/xpcapng.c b/lib/util/xpcapng.c
index e453b88..8cfc947 100644
--- a/lib/util/xpcapng.c
+++ b/lib/util/xpcapng.c
@@ -226,7 +226,7 @@ static bool pcapng_write_shb(struct xpcapng_dumper *pd, const char *comment,
shb_length += sizeof(uint32_t);
/* Allocate the SHB and fill it. */
- shb = calloc(shb_length, 1);
+ shb = calloc(1, shb_length);
if (shb == NULL) {
errno = ENOMEM;
return false;
@@ -318,7 +318,7 @@ static bool pcapng_write_idb(struct xpcapng_dumper *pd, const char *name,
idb_length += sizeof(uint32_t);
/* Allocate the IDB and fill it. */
- idb = calloc(idb_length, 1);
+ idb = calloc(1, idb_length);
if (idb == NULL) {
errno = ENOMEM;
return false;
@@ -549,7 +549,7 @@ struct xpcapng_dumper *xpcapng_dump_open(const char *file,
goto error_exit;
}
- pd = calloc(sizeof(*pd), 1);
+ pd = calloc(1, sizeof(*pd));
if (pd == NULL) {
errno = ENOMEM;
goto error_exit;
--
2.43.0

26
configure vendored
View File

@ -5,6 +5,7 @@ set -o pipefail -o errtrace -o nounset -o errexit
# submitting any changes
# defaults
platform=default
build_dir=.
install_dir=/usr/local
build_type=release
@ -31,6 +32,8 @@ OPTIONS:
--native-only, -n Only compile for Native CPU (no multiarch)
--wipe, -w Wipe whole repo (except startup.* files)
--sanitize, -s Enable sanitizer (mem)
--platform, -p Specify target platform
--option, -o Enable specific VPP options (fib8, fib16)
__EOF__
}
@ -76,6 +79,15 @@ while (( "$#" )); do
exit 1
fi
;;
-p|--platform)
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
platform=$2
shift 2
else
echo "Error: Argument for $1 is missing" >&2
exit 1
fi
;;
-n|--native-only)
native_only=yes
shift 1
@ -93,6 +105,19 @@ while (( "$#" )); do
;;
esac
;;
-o|--option)
shift 1
case "$1" in
fib8)
shift 1
args+=("-DVPP_IP_FIB_MTRIE_16=OFF")
;;
fib16)
shift 1
args+=("-DVPP_IP_FIB_MTRIE_16=ON")
;;
esac
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
exit 1
@ -121,6 +146,7 @@ args+=("-DCMAKE_PREFIX_PATH=/opt/vpp/external/${arch}")
args+=("-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON")
args+=("-DCMAKE_INSTALL_PREFIX=${install_dir}")
args+=("-DCMAKE_BUILD_TYPE:STRING=${build_type}")
args+=("-DVPP_PLATFORM=${platform}")
[ "${native_only}" == "yes" ] && args+=("-DVPP_BUILD_NATIVE_ONLY:BOOL=ON")
[ "${wipe}" == "yes" ] && git clean -fdx --exclude=startup.\*

View File

@ -70,7 +70,7 @@ venv:
spell: venv
@( \
. ${VENV_DIR}/bin/activate; \
make -C ${SCRIPTS_DIR} generate && \
$(MAKE) -C ${SCRIPTS_DIR} generate && \
$(SPHINXBUILD) -b spelling $(SPHINXOPTS) $(BUILDDIR_SRC) $(BUILDDIR_OUT); \
)
@ -81,7 +81,7 @@ rebuild-spell: clean spell
docs: venv
@( \
. ${VENV_DIR}/bin/activate; \
make -C ${SCRIPTS_DIR} generate && \
$(MAKE) -C ${SCRIPTS_DIR} generate && \
$(SPHINXBUILD) $(SPHINXOPTS) -b html $(BUILDDIR_SRC) $(BUILDDIR_OUT); \
)
@ -90,7 +90,7 @@ rebuild: clean docs
.PHONY: clean
clean:
@make -C ${SCRIPTS_DIR} clean
@$(MAKE) -C ${SCRIPTS_DIR} clean
.PHONY: build
build: docs

View File

@ -6,9 +6,8 @@ Release notes
.. toctree::
:maxdepth: 2
v24.06
v24.02
v23.10
v23.06
v23.02
v22.10.1
v22.10
v22.06.1
past

View File

@ -6,6 +6,10 @@ Past releases
.. toctree::
:maxdepth: 1
v23.02
v22.10.1
v22.10
v22.06.1
v22.06
v22.02
v21.10.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -497,6 +497,9 @@ The buffers Section
buffers-per-numa 128000
default data-size 2048
page-size default-hugepage
numa 1 {
buffers 64000
}
}
buffers-per-numa number
@ -532,6 +535,33 @@ Set the page size for buffer allocation
page-size default
page-size default-hugepage
numa <numa index> { .. }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Settings specific to a single NUMA domain.
.. code-block:: console
buffers {
numa 0 {
buffers 32768
}
}
buffers <n>
^^^^^^^^^^^^^^^
The number of buffers allocated for this specific NUMA domain.
If this is set to zero, no buffers are allocated for this domain.
By default, the value configured in **buffers-per-numa** is used.
.. code-block:: console
numa 0 {
buffers 32768
}
The dpdk Section
----------------
@ -642,19 +672,6 @@ can impact performance. Default is 1024.
num-rx-desc <n>
}
vlan-strip-offload on | off
^^^^^^^^^^^^^^^^^^^^^^^^^^^
VLAN strip offload mode for interface. VLAN stripping is off by default
for all NICs except VICs, using ENIC driver, which has VLAN stripping on
by default.
.. code-block:: console
dev 000:02:00.1 {
vlan-strip-offload on|off
}
uio-driver driver-name
^^^^^^^^^^^^^^^^^^^^^^

View File

@ -256,6 +256,44 @@ To build the debian packages, use the following command:
$ make pkg-deb
Reproducible builds on Debian
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default the VPP artifacts have various bits of
information in them aimed at simplifying the identification
during the development (like, the user name that built
the package as well as the build times). By setting
a few environment variables one can obtain bit-identical
.deb files, assuming that the prerequisites installed
in the build environment are identical.
Setting and using the SOURCE_DATE_EPOCH variable
(see https://reproducible-builds.org/docs/source-date-epoch/)
takes care of most of the magic necessary.
The package vpp-ext-deps is already being built with that
date set to date of the last modification of the
build/external/ tree
(similar to deriving the "number of commits" for the package
versioning of vpp-ext-deps)
For the rest of the packages, pinning the following
three variables should result in bit-identical
artifacts across multiple runs in the build environment:
.. code-block:: console
export SOURCE_DATE_EPOCH=$(date +%s)
export VPP_BUILD_HOST="buildhost"
export VPP_BUILD_USER="builduser"
If you want to reproduce the bit-identical builds across
different environments, take a look at "vpp_<BUILD_VERSION>.buildinfo" file
which gets created in build-root alongside the .deb repositories -
it has the cryptographic hashes for the newly built packages, and
the full list of build dependencies and their versions.
.. _rpmpackages:
Building RPM Packages

View File

@ -1 +1 @@
../../../../src/vnet/srmpls/sr_doc.rst
../../../../src/plugins/srmpls/sr_doc.rst

View File

@ -0,0 +1 @@
../../../src/plugins/dev_armada/README.rst

Some files were not shown because too many files have changed in this diff Show More