vpp.git
2 weeks agosr: use correct reply to sr_policy_add_v2 88/40688/1 stable/2310
Vratko Polak [Thu, 11 Apr 2024 14:06:29 +0000 (16:06 +0200)]
sr: use correct reply to sr_policy_add_v2

Type: fix
Fixes: c4c205b091934d96a173f4c0d75ef7e888298ac7

Change-Id: I110729601a9f19451297883b781ec56e2b31465b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 3a05db6264a4b2edf1fc7e6c35ee3b688baa463a)

3 weeks agomisc: in crcchecker.py, don't check for uncommitted changes in CI 77/40677/1
Dave Wallace [Fri, 15 Mar 2024 01:41:00 +0000 (21:41 -0400)]
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>
(cherry picked from commit 3a0d7d2c95e8b8087c20b99fed5bcf62fac027d9)

5 months agofib: fix fib_path_create() with drop targets 43/40043/2
Alexander Skorichenko [Fri, 24 Nov 2023 08:59:42 +0000 (09:59 +0100)]
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>
(cherry picked from commit 4b08632748727486e7ebfdcf4d992743595bc500)

5 months agobfd: fix buffer leak when cannot send periodic packets 42/40042/2
Alexander Chernavin [Thu, 23 Nov 2023 11:36:09 +0000 (11:36 +0000)]
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>
(cherry picked from commit 1f4023d55d7a9c777465d24065e91fc076602fb0)

5 months agoipsec: keep esp encrypt pointer and index synced 56/39956/3
Matthew Smith [Thu, 16 Nov 2023 02:27:29 +0000 (02:27 +0000)]
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
(cherry picked from commit dac9e566cd16fc375fff14280b37cb5135584fc6)

5 months agoflowprobe: fix L3 header offset calculation for tx flows 41/40041/2
Alexander Chernavin [Tue, 14 Nov 2023 11:33:46 +0000 (11:33 +0000)]
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>
(cherry picked from commit bae6b6d1f2a2e6623257afab21e05da2d795323a)

5 months agoflowprobe: fix tx flows generated for rewritten traffic 40/40040/2
Alexander Chernavin [Tue, 7 Nov 2023 11:25:21 +0000 (11:25 +0000)]
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>
(cherry picked from commit 64d6463d2eac0c0fe434f3a7aa56fe4d85c046d9)

5 months agoflowprobe: fix clearing interface state on feature disabling 39/40039/2
Alexander Chernavin [Thu, 26 Oct 2023 11:48:06 +0000 (11:48 +0000)]
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>
(cherry picked from commit dab1dfeea9fec04a9a90a82dc5d770fbff344540)

5 months agoflowprobe: fix accumulation of tcp flags in flow entries 38/40038/2
Alexander Chernavin [Thu, 26 Oct 2023 11:18:19 +0000 (11:18 +0000)]
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>
(cherry picked from commit 21922cec7339f48989f230248de36a98816c4b1b)

5 months agofib: only update glean for interface if necessary 37/40037/2
Matthew Smith [Tue, 26 Sep 2023 13:08:26 +0000 (13:08 +0000)]
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
(cherry picked from commit 9e5694b405e0200725a993f0c17d452fab508435)

5 months agoflowprobe: fix sending L4 fields in L2 template and flows 36/40036/2
Alexander Chernavin [Tue, 17 Oct 2023 08:54:33 +0000 (08:54 +0000)]
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>
(cherry picked from commit 6b027cfdbcb750b8aa1b8ab9a3904c1b2dca6f15)

5 months agoflowprobe: fix corrupted packets sent after feature disabling 35/40035/2
Alexander Chernavin [Tue, 3 Oct 2023 12:45:51 +0000 (12:45 +0000)]
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>
(cherry picked from commit f68afe85a6e4d5e00fdad1af19a76eb40fdfa388)

5 months agoethernet: run callbacks for subifs too when mac changes 34/40034/2
Alexander Chernavin [Mon, 22 May 2023 14:27:24 +0000 (14:27 +0000)]
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>
(cherry picked from commit 8a92b68bc8eaaec48d144fba62490a32f28eb422)

5 months agoflowprobe: fix sending L2 flows using L2_IP6 template 33/40033/2
Alexander Chernavin [Wed, 11 Oct 2023 12:15:55 +0000 (12:15 +0000)]
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>
(cherry picked from commit 120095d3d33bfac64c1f3c870f8a332eeaf638f0)

5 months agomemif: contention between memif_disconnect and memif RX/TX threads 57/39957/2
Steven Luong [Thu, 5 Oct 2023 22:33:40 +0000 (15:33 -0700)]
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>
(cherry picked from commit 34c721fb47155135bf2173ca7b9a31aaacfde190)

5 months agofib: Don't use an address from an attached prefix when sending ARP requests. 32/40032/1
Neale Ranns [Wed, 8 Mar 2023 04:53:37 +0000 (04:53 +0000)]
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
(cherry picked from commit 39528796098973fe9a5411e0f6f94268c3324e94)

6 months agotcp: allow fins in syns in syn-rcvd 51/39651/2
Florin Coras [Sat, 14 Oct 2023 22:16:18 +0000 (15:16 -0700)]
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
(cherry picked from commit da2ae9af61fbdb3b68eb72f8d35294fdb3720303)

6 months agotcp: handle syn-ack in fin-wait-2 in rcv process 52/39652/2
Florin Coras [Sat, 14 Oct 2023 22:22:04 +0000 (15:22 -0700)]
tcp: handle syn-ack in fin-wait-2 in rcv process

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If74e04498423bed42593e79ec92482421cfda8d2
(cherry picked from commit 61d63e8323d11240edab44ff714def1c573fc987)

6 months agotcp: initialize connection index on rst w packet 50/39650/2
Florin Coras [Sat, 14 Oct 2023 22:01:48 +0000 (15:01 -0700)]
tcp: initialize connection index on rst w packet

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie01d7e8d6eddf3ba88f2cd6eb8369c8ec8179cb4
(cherry picked from commit 0094fe0190b623dbef0e57b7f4032ba3cf5f36b0)

6 months agosession: fix duplicate rx events 48/39648/2
Florin Coras [Thu, 12 Oct 2023 19:39:15 +0000 (12:39 -0700)]
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
(cherry picked from commit 054aa8c2f2681e3a4a4af02d9119fb6eaa5dbad6)

6 months agosession: ignore connecting half_open session in session_tx_fifo_dequeue_internal 47/39647/2
Steven Luong [Wed, 11 Oct 2023 21:09:21 +0000 (14:09 -0700)]
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>
(cherry picked from commit 947aa8fffcd85563ed0bad620f739e76c6002f50)

6 months agotls: Fix SSL_CTX leak on every client session 45/39645/2
Brian Morris [Wed, 11 Oct 2023 17:36:59 +0000 (17:36 +0000)]
tls: Fix SSL_CTX leak on every client session

Type: fix

Change-Id: I35b3920288269073cdd35f79c938396128d169c9
Signed-off-by: Brian Morris <bmorris2@cisco.com>
(cherry picked from commit 733e093e7099552a4609dc5efadf9261df7778d4)

6 months agosession: fix tx deq ntf assert for cl 44/39644/2
Florin Coras [Tue, 10 Oct 2023 17:21:01 +0000 (10:21 -0700)]
session: fix tx deq ntf assert for cl

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I97a04ed0417f1a3433665f6aa1a9424138fd54cb
(cherry picked from commit fa9f37c15ceb32c4b4d6fd0d352cfd5a38a6ab94)

6 months agodpdk-cryptodev: improve dequeue behavior, fix cache stats logging 72/39572/2
Piotr Bronowski [Thu, 14 Sep 2023 17:41:13 +0000 (17:41 +0000)]
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
(cherry picked from commit 7cc17f6df9b3f4b45aaac16ba0aa098d6cd58794)

6 months agomisc: VPP 23.10 Release Notes 53/39153/1 v23.10
Andrew Yourtchenko [Fri, 20 Oct 2023 09:24:01 +0000 (11:24 +0200)]
misc: VPP 23.10 Release Notes

Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Icd40064c06ccc53efba1cd9564613108b999b656

6 months agosession: ignore app rx ntf if transport closed 43/39643/1
Florin Coras [Tue, 10 Oct 2023 19:39:55 +0000 (12:39 -0700)]
session: ignore app rx ntf if transport closed

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id56a101a6350903b00f7c96705fb86039e70e12c
(cherry picked from commit a0b8c8fdf3fc555fc2ed7792d67bf3fb4fb99b9f)

6 months agovppinfra: fix coverity issue CID 323952 40/39640/2 v23.10-rc2
Dave Wallace [Mon, 9 Oct 2023 22:05:47 +0000 (18:05 -0400)]
vppinfra: fix coverity issue CID 323952

Type: fix
Fixes: 08600ccfa

Change-Id: I53ba0d96507b55ab7cd735073d6c4cf20a3cc948
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 05cc62dd504bbb0fb230fcf3786ed7f4d5be2364)

6 months agosession: maintain old state on premature close 41/39641/2
Florin Coras [Tue, 10 Oct 2023 01:25:39 +0000 (18:25 -0700)]
session: maintain old state on premature close

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2ea821e0499a3874c4579f5480ea86f30ebe615f
(cherry picked from commit 84c9ee3d696ef5c1162530a30ba591b806a7e175)

6 months agosession: propagate delayed rx evts after connect/accept 36/39636/3
Florin Coras [Sat, 7 Oct 2023 21:22:52 +0000 (14:22 -0700)]
session: propagate delayed rx evts after connect/accept

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4a2e8f864df7269ec5a3c4fd4d8785a67b687d58
(cherry picked from commit 431b489c5a4f60a82781ace60d07471d003787af)

6 months agotls: propagate reads to app irrespective of state 37/39637/2
Florin Coras [Sat, 7 Oct 2023 21:27:52 +0000 (14:27 -0700)]
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
(cherry picked from commit aa7b88120ad83a29a05522bed4e5aa71524b8aba)

6 months agosession: handle accept and connect errors 75/39575/2
Florin Coras [Fri, 6 Oct 2023 23:45:04 +0000 (16:45 -0700)]
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
(cherry picked from commit 9ffec14a2202e1268c4a2f189c39a90986090a25)

6 months agotls: no read after app close 73/39573/2
Florin Coras [Sat, 7 Oct 2023 00:31:32 +0000 (17:31 -0700)]
tls: no read after app close

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I34f8ee2e36d07e8e55e21561528fc6b73feb852f
(cherry picked from commit 3843d0dd03a3ebbdb5d13b54e1b871a8ea72498c)

6 months agotls: report error if connected cannot be initialized 74/39574/2
Florin Coras [Sat, 7 Oct 2023 02:06:35 +0000 (19:06 -0700)]
tls: report error if connected cannot be initialized

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I987ac6b461b473836917bce6ce0d4ac109cc8ddb
(cherry picked from commit a3d55df1e91a7df4ad4c0e1b639ba12a1ed04c79)

6 months agovppinfra: fix string termination in clib_file_get_resolved_basename 71/39571/2
Damjan Marion [Wed, 4 Oct 2023 16:03:18 +0000 (18:03 +0200)]
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>
(cherry picked from commit 08600ccfa12f529d6ca7b852106227fc5f7addbf)

6 months agotls: limit openssl engine max read burst 70/39570/2
Florin Coras [Sat, 30 Sep 2023 22:21:08 +0000 (15:21 -0700)]
tls: limit openssl engine max read burst

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic7a8fd37d79fc9c09c8b1539d630f3b8983b8bb3
(cherry picked from commit c1b038001e1f18effb3c9ff5daa9e9cac1cd66e8)

6 months agotls: init connection for prealloced app sessions 66/39566/2
Florin Coras [Tue, 26 Sep 2023 02:50:48 +0000 (19:50 -0700)]
tls: init connection for prealloced app sessions

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icd62dc110e3a73b24372f3a5162f8008b7edee9f
(cherry picked from commit a127d3c157cb6e7658451a877abbfe0dd16c982a)

6 months agotls: ignore tx events for not fully established sessions 64/39564/2
Florin Coras [Sat, 23 Sep 2023 02:26:33 +0000 (19:26 -0700)]
tls: ignore tx events for not fully established sessions

Type: fix

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

7 months agotls: fix formatting of half open connections 69/39569/1
Florin Coras [Mon, 2 Oct 2023 17:41:54 +0000 (10:41 -0700)]
tls: fix formatting of half open connections

Type: fix

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

7 months agomisc: Initial changes for stable/2310 branch 49/39149/1 v23.10-rc1
Andrew Yourtchenko [Wed, 20 Sep 2023 14:55:45 +0000 (16:55 +0200)]
misc: Initial changes for stable/2310 branch

Type: docs
Change-Id: I82d323c6e4585772e5c9a9f5b5bbb77b65c1da85
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 months agotests: remove unsupported qemu feature 37/39437/3
Naveen Joy [Wed, 23 Aug 2023 20:27:55 +0000 (13:27 -0700)]
tests: remove unsupported qemu feature

pretty=on|off has been removed from qemu and its presence
causes VM boot up issues.

Type: fix

Change-Id: I4a9f15dba5015e81fbd32278b1c74b2606c32c8f
Signed-off-by: Naveen Joy <najoy@cisco.com>
7 months agonpt66: ensure feature is not configured multiple times 06/39506/3
Ole Troan [Fri, 8 Sep 2023 09:32:33 +0000 (11:32 +0200)]
npt66: ensure feature is not configured multiple times

If the control agent enabled a binding on an interface multiple times,
we would add the node in the feature arc multiple times.

Type: fix
Change-Id: I2ca247db0a0211f5fa3974a18ca4fcae8485cb12
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agovcl: unset fifo evt before size check 36/39536/1
Florin Coras [Mon, 18 Sep 2023 16:56:21 +0000 (09:56 -0700)]
vcl: unset fifo evt before size check

For blocking sessions, if fifo event still active before size check it
could lead to vpp not generating an event because of race to check flag
in vpp and to eventually unset flag in vcl.

Type: fix

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

7 months agovapi: fix coverity warnings 10/39410/2
Dave Wallace [Tue, 22 Aug 2023 18:18:32 +0000 (14:18 -0400)]
vapi: fix coverity warnings

- CID-322713, CID-322712, CID-314881, CID-314880,
  CID-314878 COPY_INSTEAD_OF_MOVE

Type: fix

Change-Id: Idad6806fcd4e1a89a750dcc0584b5b1f0432bf3c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agomisc: VPP 23.06 Release Notes 25/39425/1
Andrew Yourtchenko [Mon, 26 Jun 2023 11:50:58 +0000 (13:50 +0200)]
misc: VPP 23.06 Release Notes

Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id39d7d6a6340e65885ab0845b6fc9a2b81e4f565
(cherry picked from commit 493b8990d1185f818890560101e13e1b69f54b1d)

7 months agovpp-swan: fix configuration of policies 34/39534/1
Gabriel Oginski [Thu, 14 Sep 2023 09:03:36 +0000 (09:03 +0000)]
vpp-swan: fix configuration of policies

This patch fixes configuration of priority, port and type of protocol
for inbound and outbound policies in policy-based IPsec of this plugin.

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

7 months agonat: fix nat44_ed set_session_limit crash 41/37241/5
Vladislav Grishenko [Mon, 5 Sep 2022 05:32:46 +0000 (10:32 +0500)]
nat: fix nat44_ed set_session_limit crash

Setting session limit should return error for unknown fib.
Optimize max_translations_per_fib expanding and drop unnecessary
trailing fib entry.

Type: fix
Change-Id: Ie7d2b363ade48f53598faa617a49cce7b2db6400
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agoquic: fix quic sessions state updates 01/39501/5
Florin Coras [Thu, 7 Sep 2023 02:09:30 +0000 (19:09 -0700)]
quic: fix quic sessions state updates

Session state cannot be updated after async notification event is
generated for app. Instead, make sure quic sessions that accept new
streams are switched to listening state only on accept.

Type: fix
Fixes: 0242d30

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

7 months agosr: mark sr_policies_v2_details message as production 44/39144/2
Andrew Yourtchenko [Tue, 1 Aug 2023 11:00:13 +0000 (13:00 +0200)]
sr: mark sr_policies_v2_details message as production

As per discussion on the VPP community call,
since the message is used in CSIT tests and did
not see the changes in a while, mark as production
for the purposes of change process.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I4a79aafb1a9f37ac87faea7abea28cf01d1ffb4c

7 months agoadl: stabilize the API 40/39140/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:43:46 +0000 (12:43 +0200)]
adl: stabilize the API

As discussed on the VPP call, since CSIT tests use these messages
and they have not been changedfor quite a while, bump the version
so these messages are considered as "production" from the change
process standpoint.

Type: improvement
Change-Id: I93a04b10b273d5904c0678fa0b85d47f9f683a9b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 months agoflow: mark API as production 43/39143/3
Andrew Yourtchenko [Tue, 1 Aug 2023 10:54:36 +0000 (12:54 +0200)]
flow: mark API as production

As per discussion on the VPP call - since the APIs are used
in CSIT tests, mark them as production from the change process
perspective.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I9164073425384e8aa281445a2852fee49b777e2f

7 months agowireguard: stabilize the API 42/39142/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:52:04 +0000 (12:52 +0200)]
wireguard: stabilize the API

As per discussion on VPP call - since the APIs are used in CSIT tests,
and there has not been changes in a while, mark them as stable from
the API change process PoV.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Ia644e1dfcd9d182cc6f10089fc44397a61e8aaf6

7 months agocrypto-sw-scheduler: stabilize the API 41/39141/2
Andrew Yourtchenko [Tue, 1 Aug 2023 10:49:20 +0000 (12:49 +0200)]
crypto-sw-scheduler: stabilize the API

As per discussion on the VPP call: since the CSIT tests use these
APIs and the APIs have not changed in quite a while, stabilize the API
from the change process point of view.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id81999d03cce37764f6ed7d4f77ef5a71fe41ad1

7 months agohsa: fix coverity issue CID-313635 11/39411/3
Dave Wallace [Wed, 23 Aug 2023 03:17:54 +0000 (23:17 -0400)]
hsa: fix coverity issue CID-313635

Type: fix

Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agoapi: fix vlibmemory coverity warning CID-300152 13/39413/2
Dave Wallace [Wed, 23 Aug 2023 03:42:02 +0000 (23:42 -0400)]
api: fix vlibmemory coverity warning CID-300152

Type: fix

Change-Id: Icdebc8629946e0e7c8dde3e45ee93ff9027e7c68
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agovppinfra: add ARM Neoverse-N2 support 23/39523/3
Damjan Marion [Tue, 12 Sep 2023 13:08:58 +0000 (15:08 +0200)]
vppinfra: add ARM Neoverse-N2 support

Type: improvement

Change-Id: Ief77ae7338667ede290aece6933bb5ae2e76ffc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agobuild: fix clang-16 build 00/39500/3
Damjan Marion [Wed, 6 Sep 2023 19:18:18 +0000 (21:18 +0200)]
build: fix clang-16 build

Change-Id: I882bef6f45fd276587fb93944ff4e21dc57dbca2
Type: fix
Fixes: 1c82cd4
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agoidpf: make plugin default disabled until issues are fixed 22/39522/2
Damjan Marion [Tue, 12 Sep 2023 13:00:46 +0000 (15:00 +0200)]
idpf: make plugin default disabled until issues are fixed

Type: improvement
Change-Id: I2daa8fc338289555649135e7f0898e139807fdce
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
7 months agodocs: mention how to build VPP outside git 05/39505/7
Vratko Polak [Wed, 13 Sep 2023 08:22:57 +0000 (10:22 +0200)]
docs: mention how to build VPP outside git

Type: docs

Change-Id: Iceee9ef489f7f68049882651bb338311295ca12d
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agobuild: add vpp_plugins include directory 15/39415/3
Benoît Ganne [Mon, 21 Aug 2023 07:24:38 +0000 (09:24 +0200)]
build: add vpp_plugins include directory

Type: fix

Change-Id: Iacb04846c634231854f26348cc17cc729d6e0d87
Signed-off-by: Benoît Ganne <bganne@cisco.com>
7 months agovppinfra: fix coverity warning CID-313632 12/39412/2
Dave Wallace [Wed, 23 Aug 2023 03:24:01 +0000 (23:24 -0400)]
vppinfra: fix coverity warning CID-313632

Type: fix

Change-Id: Idc036d5967495cc2522b2a30e3acd3ec4c0cd3ff
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agovlib: deuglify the offset finding loop in pci.c 36/39436/2
Vratko Polak [Wed, 23 Aug 2023 16:39:25 +0000 (18:39 +0200)]
vlib: deuglify the offset finding loop in pci.c

Type: style
Fixes: 054229ebbdeb3f87d96c1abf93b511c86cd6ff0f

Change-Id: I7c3080db94566af249e5082d59a4e6373c616888
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agoperfmon: fix perf_user_access_enabled type 69/39469/2
Tianyu Li [Tue, 29 Aug 2023 07:59:12 +0000 (07:59 +0000)]
perfmon: fix perf_user_access_enabled type

perf_user_access_enabled is defined as u8,
clib_sysfs_read format type is %u, this is for unsigned int,
change type from u8 to u32.

Type: fix
Fixes: 268d7be66b8b ("perfmon: enable perfmon plugin for Arm")

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

7 months agovppinfra: fix setns typo 03/39503/2
Artem Glazychev [Thu, 7 Sep 2023 07:16:56 +0000 (14:16 +0700)]
vppinfra: fix setns typo

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ib8eb70336956bc2e8d0454f3c1f2c62ec98cb009

7 months agopci: fix coverity issue CID-322372 09/39409/2
Dave Wallace [Tue, 22 Aug 2023 16:51:09 +0000 (12:51 -0400)]
pci: fix coverity issue CID-322372

Type: fix

Change-Id: Iaf16bb720d76ea3ae04afb8123b7cac15771ef2b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
7 months agoipsec: improve fast path policy searching performance 33/38733/5
Xiaoming Jiang [Wed, 26 Apr 2023 11:58:25 +0000 (11:58 +0000)]
ipsec: improve fast path policy searching performance

Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Ib8bb300f5b62648f6b634046415742bdf5365982

7 months agocrypto: allow changing dispatch mode 86/39386/6
Vratko Polak [Thu, 17 Aug 2023 14:22:48 +0000 (16:22 +0200)]
crypto: allow changing dispatch mode

This change aims to affect crypto_sw_scheduler behavior,
but all the edits end up in vnet/crypto.

Previous release CSIT tests were testing async crypto in polling mode.
After 9a9604b09f15691d7c4ddf29afd99a31e7e31eed introduced adaptive mode
for crypto dispatch, the CSIT performance got way worse.

Possibly, there is another VPP bug related to adaptive mode
(it should not lose as many packets as seen in CSIT),
but the next release is too close for trying to fix that.

This change (instead of fixing adaptive mode)
allows CSIT to continue testing polling mode (after explicit API call),
while keeping the adaptive mode as default behavior.

The deprecated crypto_set_async_dispatch always disable adaptive mode,
crypto_set_async_dispatch_v2 has parameter to enable or disable it.
The mode parameter is still used for the inital state of adaptive mode.

Type: feature

Change-Id: Ib98080eefb4be291207af543884f2c3837f92f59
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agocrypto-sw-scheduler: improve function indentation 70/39370/3
Vratko Polak [Thu, 17 Aug 2023 14:15:38 +0000 (16:15 +0200)]
crypto-sw-scheduler: improve function indentation

The checkstyle --fix command remains confused
around the def/foreach/undef usage in convert_async_crypto_id,
but at least the other functions now look correctly indented to me.

Type: style

Change-Id: Ic8f7b580267386b7a6b07d33d9ba7ae9787c0e0a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 months agosession: make sure rx evt flag is cleared for builtin rx 02/39502/3
Florin Coras [Thu, 7 Sep 2023 02:38:44 +0000 (19:38 -0700)]
session: make sure rx evt flag is cleared for builtin rx

Type: fix

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

7 months agoipsec: clear L4-cksum flags when decap'ing packets 38/39238/8
Frédéric Perrin [Fri, 14 Jul 2023 10:13:42 +0000 (11:13 +0100)]
ipsec: clear L4-cksum flags when decap'ing packets

Type: fix

Signed-off-by: Frédéric Perrin <fred@fperrin.net>
Change-Id: I45191b7316c88038bcd57d62aeb07bb109cf4a4d

7 months agodpdk-cryptodev: fix cache ring stats cli command 91/39491/2
Piotr Bronowski [Tue, 5 Sep 2023 21:18:59 +0000 (21:18 +0000)]
dpdk-cryptodev: fix cache ring stats cli command

The logic for calcuating processed elements in the cache ring was broken.
In case tail and deq_tail equals and frame element pointed by the tile
is not NULL it means there is exactly one processed element in the ring.

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I69c978334fc952049393214ccc9cc5245351f7f7

7 months agobuild: add option to specify native -march= flag with VPP_BUILD_NATIVE_ARCH 62/39462/2
Damjan Marion [Thu, 31 Aug 2023 15:00:16 +0000 (17:00 +0200)]
build: add option to specify native -march= flag with VPP_BUILD_NATIVE_ARCH

Type: improvement
Change-Id: I98eeba1ad2f9ed0531a7c615e0e70e535f24f813
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 months agonat: improve nat44-ed outside address distribution 21/38521/3
Vladislav Grishenko [Thu, 16 Mar 2023 14:31:00 +0000 (19:31 +0500)]
nat: improve nat44-ed outside address distribution

Use client address hash to pick the first outside address
instead of just address high octet, becasue it may denegerate
into stable 10/172/192, depending on nat address count.

Fix outside address distribution test to acually test the
distribution, not the algo, so previous distribution will
fail with 65 nat addresses and 100 clients:

FAIL: Outside address distribution based on source address
Traceback (most recent call last):
  File ".../test/test_nat44_ed.py", line 2048, in test_outside_address_distribution
    msg="Bad outside address distribution")
AssertionError: 156.25 not less than 0.33 : Bad outside address distribution

Type: improvement
Change-Id: I604b1294422f20d211db5614c47559557a78a193
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agovirtio: add support for tx-queue-size 25/36725/6
Mohsin Kazmi [Tue, 29 Aug 2023 09:18:20 +0000 (09:18 +0000)]
virtio: add support for tx-queue-size

Type: improvement

DBGvpp# set loggin class virtio level debug
DBGvpp# create int virtio 0000:00:03.0 tx-queue-size 1024

show virtio pci
```
  Virtqueue (TX) 1
    qsz 1024, last_used_idx 0, desc_next 0, desc_in_use 0
    avail.flags 0x1 avail.idx 0 used.flags 0x0 used.idx 0
```

show logging
```
2022/07/22 23:20:22:557 debug      virtio         0000:00:03.0: tx-queue: number 1, default-size 256
2022/07/22 23:20:22:557 debug      virtio         0000:00:03.0: tx-queue: number 1, new size 1024
```

Change-Id: Ib1a3ebe742b3a6c9fe72bd1c5accfe07682cbdd1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
7 months agoip: punt add punt socket support for icmp6 84/39484/6
Ole Troan [Tue, 5 Sep 2023 06:27:53 +0000 (08:27 +0200)]
ip: punt add punt socket support for icmp6

Punt support for ICMP6 messages allows for an external IPv6 RA advertisement agent.

Type: feature
Change-Id: I0cc928b747ac1f8335ee9f7c42a3231424825dbc
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agoapi: fix mp-safe mark for some messages and add more 25/38525/2
Vladislav Grishenko [Sat, 18 Mar 2023 21:57:01 +0000 (02:57 +0500)]
api: fix mp-safe mark for some messages and add more

Several api messages were not mp-safe although marked as such
because non-zero base id was not taken into account, and therefore
some other (from zero base id) were falsely mp-safe instead.

Keep messages as mp-safe, as they falsely were before:
    10   get_first_msg_id                              0       1
    12   api_versions                                  0       1

Messages that are no longer mp-safe as they weren't marked:
    15   sockclnt_create                               0       1
    33   proxy_arp_intfc_dump                          0       1

Fix messages to be really mp-safe:
    809  bridge_domain_dump                            0       1
    920  ip_route_add_del                              0       1
    921  ip_route_add_del_v2                           0       1
    1362 get_node_graph                                0       1
    1671 create_vhost_user_if                          0       1
    1675 create_vhost_user_if_v2                       0       1

Additionally mark messages as mp-safe, seems they need no barrier:
    1360 show_threads                                  0       1
    1370 show_version                                  0       1
    1372 show_vpe_system_time                          0       1

Type: fix
Change-Id: Ie6c1e3aa89f26bf51bfbcb7e7c4d9fee885487b7
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
7 months agovapi: fix verification for reply message 92/39292/4
Sylvain Cadilhac [Wed, 26 Jul 2023 14:16:47 +0000 (16:16 +0200)]
vapi: fix verification for reply message

Type: fix
Byte swapping should be done before verifying message otherwise the message length will be wrongly computed.

Change-Id: I90b2f60bd33e5362e0edd5ee425f6a6f07886f1e
Signed-off-by: Sylvain Cadilhac <sylvain.cadilhac@freepro.com>
7 months agohs-test: point gdb to vpp source files 89/39489/2
Filip Tehlar [Tue, 5 Sep 2023 13:36:28 +0000 (15:36 +0200)]
hs-test: point gdb to vpp source files

Type: test

Change-Id: Ie5867737e5d49fd45cc15b690af3493263fb2f6f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agohs-test: verbose output on single test run 90/39490/1
Filip Tehlar [Tue, 5 Sep 2023 13:58:28 +0000 (15:58 +0200)]
hs-test: verbose output on single test run

Type: test

Change-Id: I12ae7db36a6f7f9758fd195088877dfcd5606f84
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agonpt66: make plugin default disabled 71/39471/4
Ole Troan [Fri, 1 Sep 2023 12:18:23 +0000 (14:18 +0200)]
npt66: make plugin default disabled

Plugin is still in experimental state. No reason why it needs
to be default enabled.

Type: fix
Change-Id: Ibf1810215d4c8079a068bfc60aa7dd49306ee4e4
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agohs-test: log external apps 61/39461/3
Filip Tehlar [Sat, 2 Sep 2023 06:54:21 +0000 (08:54 +0200)]
hs-test: log external apps

Type: test

Change-Id: Id2b0d408bd46f20b81422506f9db4eb655feddac
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agohs-test: fix gdb attach 74/39474/2
Filip Tehlar [Sat, 2 Sep 2023 06:39:25 +0000 (08:39 +0200)]
hs-test: fix gdb attach

Type: test

Change-Id: Ic48ca7a3aab47df50d4e38e6123c90140c944172
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 months agoudp: buffer packets for connections in accepting state 73/39473/3
Florin Coras [Sat, 2 Sep 2023 00:19:33 +0000 (17:19 -0700)]
udp: buffer packets for connections in accepting state

Type: fix
Fixes: 0242d30

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

7 months agoarping: api to return responder mac address 58/39458/4
Ole Troan [Thu, 31 Aug 2023 07:48:45 +0000 (09:48 +0200)]
arping: api to return responder mac address

The new arping_acd call includes the responders mac address in the reply.
Enabling a client doing address conflict detection to identify if it
is itself that is replying or that it is another host uses the IP
address.

Type: feature
Change-Id: Ia4bab2af1086f06ed71ba42e2e07368d4e330a27
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agonpt66: checksum applied to src address instead of dst address on rx 70/39470/2
Ole Troan [Fri, 1 Sep 2023 12:15:39 +0000 (14:15 +0200)]
npt66: checksum applied to src address instead of dst address on rx

Applied the checksum delta to the source address instead of the destination address
in the RX direction.

Cleaned up tests a little.

Type: fix
Change-Id: I871f3448365587e5319dfbca6ea356935321ff9b
Signed-off-by: Ole Troan <otroan@employees.org>
7 months agotracenode: filtering feature 13/39213/15
Maxime Peim [Tue, 11 Jul 2023 07:45:56 +0000 (09:45 +0200)]
tracenode: filtering feature

In order to be able to filter on encapsulated packet, a new node
has been added to the ip4/6-unicast arcs.

Type: feature
Change-Id: I1e8ee05bc6d0fce20cadd8319c81bab260c17d21
Signed-off-by: Maxime Peim <mpeim@cisco.com>
7 months agosession: fix allocation of proxy fifos 67/39467/7
Florin Coras [Fri, 1 Sep 2023 00:33:47 +0000 (17:33 -0700)]
session: fix allocation of proxy fifos

Fifos need to be synchronously allocated once a transport like tcp
accepts a session. Since events are now delivered asynchronously,
proxy apps must explicitly register a cb function that manages
fifo allocation prior to being notified of connect event.

Type: fix
Fixes: 0242d30

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

8 months agomap: test fix feature disabling 04/39304/8
Maxime Peim [Tue, 1 Aug 2023 09:29:15 +0000 (11:29 +0200)]
map: test fix feature disabling

Upon test teardown, MAP features were not disabled, potentially
leading packets to be treated by the wrong node.

Type: test
Change-Id: I0c1c614318d1308f825c5cc0bf95688e92f6d00a
Signed-off-by: Maxime Peim <mpeim@cisco.com>
8 months agovcl: set min threshold for tx ntf 48/39448/5
Florin Coras [Mon, 28 Aug 2023 06:14:50 +0000 (23:14 -0700)]
vcl: set min threshold for tx ntf

Make sure there's at least 3% space in the tx fifo before notifying vcl
of a tx event. The threshold is somewhat arbibrary but for a 4M fifo, it
now means that ~120kB of space should be available.

Should help minimize the amount of tx notifications generated by
session layer when apps are faster.

Type: improvement

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

8 months agofateshare: a plugin for managing child processes 38/35638/23
Andrew Yourtchenko [Mon, 14 Mar 2022 09:49:15 +0000 (09:49 +0000)]
fateshare: a plugin for managing child processes

For the reasons of modularity and security, it is useful
to have various functionality split into processes different from VPP.
However, this approach presents the challenges of managing those processes,
and is markedly different from simply running everything within VPP process.

This plugin is an experiment in having the VPP itself start off a monitor
process which in turn starts the child processes, and restarts them if they
quit.

If the VPP process ceases to exist, the monitor process terminates all
the descendant processes and quits itself.

This allows to preserve the "single entity to manage" approach of
simply running a barebones VPP.

An example of running it:

export DPDK_CONFIG=""
export DISABLED_PLUGINS=dpdk
export EXTRA_VPP_CONFIG="fateshare { monitor ./build-root/install-vpp_debug-native/vpp/bin/vpp_fateshare_monitor command ./test1 }"
make run

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I66221fd7403f220d9652fe76958ca499cfd070a7
Type: feature

8 months agosession: fix compilation when SESSION_DEBUG is on 50/39450/5
Florin Coras [Mon, 28 Aug 2023 06:30:39 +0000 (23:30 -0700)]
session: fix compilation when SESSION_DEBUG is on

Wrap SESSION_EVT in do loop to avoid complaints about if statement
having no arguments which can happen if debugging for groups is not
enabled.

Type: fix

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

8 months agompls: add mpls_interface_dump 22/39022/4
Pim van Pelt [Sat, 10 Jun 2023 14:46:34 +0000 (16:46 +0200)]
mpls: add mpls_interface_dump

Add an API call mpls_interface_dump() which returns a list of mpls_interface_details:
- If no sw_if_index is given, all MPLS enabled sw_if_index are returned.
- If a particular sw_if_index is given, and it doesn't exist, an empty list is returned.
- If a sw_if_index exists and has MPLS enabled, a list of that one sw_if_index is returned.

Tested:
- Create 3 loopback interfaces
- Call for ~0 and for sw_if_index 0..5 all return empty lists
- set int mpls loop0 enable
- set int mpls loop1 enable
- Call for ~0 returns 2, and the call for sw_if_index=1 and =2 (the loopbacks) returns
  each a list of one sw_if_index 1 resp 2, the other values of sw_if_index return empty list
- set int mpls loop0 disable
- Call for ~0 returns 1, and the call for sw_if_index=2 (loop1) returns both a list of one
  sw_if_index=2, the other values of sw_if_index return empty list
- set int mpls loop1 disable
- Call for ~0 and for sw_if_index 0..5 all return empty lists

Example Python3 API program:
```
api_response = vpp.api.mpls_interface_dump()
print(f"Response is {api_response}")

for i in [ 0, 1, 2, 3, 4, 5 ]:
  api_response = vpp.api.mpls_interface_dump(sw_if_index=i)
  print(f"Response[{i}] = {api_response}")
```

Type: improvement
Change-Id: If87f7d7f8972d99260e859757dbcb251c6fa54a8
Signed-off-by: Pim van Pelt <pim@ipng.nl>
8 months agoperftool: fix delsvec use of _vec_len 47/39447/3
Florin Coras [Sat, 26 Aug 2023 19:59:11 +0000 (12:59 -0700)]
perftool: fix delsvec use of _vec_len

Type: fix

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

8 months agonat: nat44-ed bug fix 42/38442/2
Wei Li [Wed, 8 Mar 2023 11:36:55 +0000 (11:36 +0000)]
nat: nat44-ed bug fix

fix lb static mapping
"nat44_ed_sm_o2i_add" laddr and lport

Type: fix

Signed-off-by: Wei Li <realbaseball2008@gmail.com>
Change-Id: I249a00919e8154d92cbce03f6db196c13612948f

8 months agonat: nat44-ed cli bug fix 40/38440/3
Wei Li [Wed, 8 Mar 2023 08:01:01 +0000 (08:01 +0000)]
nat: nat44-ed cli bug fix

lport and eport in Cli "nat44 add load-balancing static mapping" should hton()

Type: fix

Signed-off-by: Wei Li <realbaseball2008@gmail.com>
Change-Id: I2eadb7e341efb70cc406e10b3b189e5ebff09ff4

8 months agocnat: fix cnat_endpoint_encode 41/39441/1
Benoît Ganne [Thu, 24 Aug 2023 12:40:41 +0000 (14:40 +0200)]
cnat: fix cnat_endpoint_encode

Type: fix

Change-Id: I4ab713811626c097c7927228f3819b7785bbb951
Signed-off-by: Benoît Ganne <bganne@cisco.com>
8 months agonpt66: network prefix translation for ipv6 93/39393/5
Ole Troan [Thu, 17 Aug 2023 11:36:08 +0000 (13:36 +0200)]
npt66: network prefix translation for ipv6

This is the initial commit of a NPTv6 (RFC6296) implementation for VPP.
It's restricted to a single internal to external binding and runs
as an output/input feature on the egress interface.

Type: feature
Change-Id: I0e3497af97f1ebd99377b84dbf599ecea935ca24
Signed-off-by: Ole Troan <otroan@employees.org>
8 months agobuild: support linuxmint OS 07/39407/3
spencercoder [Tue, 22 Aug 2023 04:42:09 +0000 (12:42 +0800)]
build: support linuxmint OS

Support compiling in Linux Mint OS

Type: improvement

Change-Id: I08721227352b00127fe0acac67269775997fd974
Signed-off-by: spencercoder <xiexiaosong@ruijie.com.cn>
8 months agodpdk-cryptodev: fix coverity issues 04/39404/2
Piotr Bronowski [Mon, 21 Aug 2023 13:36:38 +0000 (13:36 +0000)]
dpdk-cryptodev: fix coverity issues

This patch addresses coverity issues CID 322716 and CID 322717.

Type: fix
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I59d6f40c1af8e829d8cb3c042a52e144aeaf1e6b

8 months agol2: fix prefetch 14/39214/3
Vratko Polak [Wed, 12 Jul 2023 11:24:45 +0000 (13:24 +0200)]
l2: fix prefetch

This is a clone of Gerrit 35419.
(It is abandoned and I am not the owner so I cannot reopen.)

Ticket: CSIT-1816
Type: fix
Fixes: 5e0ea09d96010e99a7ce0d2f3370f0de50c46c83

Change-Id: I2265cf38a9ce3155460a1025821c2749afca0add
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 months agosr: SRv6 Path Tracing midpoint processing performance improvement 67/39367/2
Julian Klaiber [Mon, 14 Aug 2023 11:39:13 +0000 (11:39 +0000)]
sr: SRv6 Path Tracing midpoint processing performance improvement

Moved the kernel call for the timestamp outside of the inner loop to improve the batch proccessing, and minimizing the kernel calls.

Type: improvement

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