13317 Commits

Author SHA1 Message Date
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