Compare commits

...

251 Commits

Author SHA1 Message Date
Vratko Polak
095a953070 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)
2024-04-18 15:29:28 +00:00
Dave Wallace
401b53d939 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)
2024-04-08 22:43:41 +00:00
Alexander Skorichenko
6b287b5301 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)
2023-12-01 19:30:02 +00:00
Alexander Chernavin
f9c322be7d 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)
2023-12-01 19:29:55 +00:00
Matthew Smith
b75bde18c4 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)
2023-12-01 19:29:47 +00:00
Alexander Chernavin
a56e75fd71 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)
2023-12-01 19:29:38 +00:00
Alexander Chernavin
da5ddd1714 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)
2023-12-01 19:29:23 +00:00
Alexander Chernavin
bec4f4a7ab 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)
2023-12-01 19:29:08 +00:00
Alexander Chernavin
b8b02937b1 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)
2023-12-01 19:28:52 +00:00
Matthew Smith
0d7d22cf67 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)
2023-12-01 19:28:40 +00:00
Alexander Chernavin
6cc757eff7 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)
2023-12-01 19:28:14 +00:00
Alexander Chernavin
9dc9136ec4 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)
2023-12-01 19:26:58 +00:00
Alexander Chernavin
74a7a5ae08 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)
2023-12-01 19:26:17 +00:00
Alexander Chernavin
70591c147d 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)
2023-12-01 19:19:44 +00:00
Steven Luong
6c2464d032 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)
2023-12-01 16:36:09 +00:00
Neale Ranns
6d83dddeb1 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)
2023-11-30 16:24:53 +01:00
Florin Coras
d20bacd0e5 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)
2023-10-25 17:20:00 +00:00
Florin Coras
dcb10ce353 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)
2023-10-25 17:19:51 +00:00
Florin Coras
a98ef25fc7 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)
2023-10-25 17:19:43 +00:00
Florin Coras
bfa5a1a7fa 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)
2023-10-25 17:19:36 +00:00
Steven Luong
946cb7b22b 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)
2023-10-25 17:19:29 +00:00
Brian Morris
170ab64736 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)
2023-10-25 17:19:21 +00:00
Florin Coras
5a164283ad 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)
2023-10-25 17:18:59 +00:00
Piotr Bronowski
74209bac28 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)
2023-10-25 17:18:40 +00:00
Andrew Yourtchenko
7c4027fa5e misc: VPP 23.10 Release Notes
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Icd40064c06ccc53efba1cd9564613108b999b656
2023-10-20 11:24:41 +02:00
Florin Coras
fe95c23795 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)
2023-10-11 20:05:48 +00:00
Dave Wallace
015a6f7f17 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)
2023-10-11 03:13:11 +00:00
Florin Coras
471dc6b1e3 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)
2023-10-10 23:49:41 +00:00
Florin Coras
1ec3a70f66 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)
2023-10-09 23:39:49 +00:00
Florin Coras
9003233377 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)
2023-10-09 21:46:16 +00:00
Florin Coras
3c06859f9f 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)
2023-10-09 21:42:49 +00:00
Florin Coras
4ba523740f tls: no read after app close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I34f8ee2e36d07e8e55e21561528fc6b73feb852f
(cherry picked from commit 3843d0dd03a3ebbdb5d13b54e1b871a8ea72498c)
2023-10-09 21:41:12 +00:00
Florin Coras
05919da49d 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)
2023-10-09 21:40:38 +00:00
Damjan Marion
b53daca83f 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)
2023-10-09 21:38:26 +00:00
Florin Coras
15d0c7a3fb 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)
2023-10-09 21:37:55 +00:00
Florin Coras
f9af6b32ef 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)
2023-10-09 21:37:24 +00:00
Florin Coras
ee2e502736 tls: ignore tx events for not fully established sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I401a116a1a46c0dc5d591115de5ff0eef2f6440b
2023-10-09 21:36:45 +00:00
Florin Coras
e7295fd974 tls: fix formatting of half open connections
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If96dc748a716a261edfcb1020210bd73058e382f
2023-10-02 19:33:49 +00:00
Andrew Yourtchenko
14df6fc1ea misc: Initial changes for stable/2310 branch
Type: docs
Change-Id: I82d323c6e4585772e5c9a9f5b5bbb77b65c1da85
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2023-09-20 16:56:20 +02:00
Naveen Joy
df17a1f068 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>
2023-09-20 01:55:47 +00:00
Ole Troan
a05f93a9e5 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>
2023-09-19 14:16:28 +00:00
Florin Coras
ae036d3b7d 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
2023-09-18 10:22:35 -07:00
Dave Wallace
604c627dc3 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>
2023-09-16 07:50:17 +00:00
Andrew Yourtchenko
74cbed1497 misc: VPP 23.06 Release Notes
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id39d7d6a6340e65885ab0845b6fc9a2b81e4f565
(cherry picked from commit 493b8990d1185f818890560101e13e1b69f54b1d)
2023-09-16 04:54:53 +00:00
Gabriel Oginski
052b023488 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
2023-09-15 11:19:16 +02:00
Vladislav Grishenko
5b3e04c74f 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>
2023-09-13 16:56:19 +00:00
Florin Coras
e8a1dbf8da 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
2023-09-13 16:35:51 +00:00
Andrew Yourtchenko
238cf3bd49 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
2023-09-13 16:06:53 +00:00
Andrew Yourtchenko
b116bf8f37 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>
2023-09-13 16:06:29 +00:00
Andrew Yourtchenko
9c7e033488 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
2023-09-13 16:05:55 +00:00
Andrew Yourtchenko
f29d9f0604 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
2023-09-13 16:05:14 +00:00
Andrew Yourtchenko
a998f80cd9 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
2023-09-13 16:04:47 +00:00
Dave Wallace
4cae8f9bee hsa: fix coverity issue CID-313635
Type: fix

Change-Id: Ieb50ab548bb34bdbb44d973037ee452d48f412ea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-09-13 15:51:17 +00:00
Dave Wallace
7f9b690b06 api: fix vlibmemory coverity warning CID-300152
Type: fix

Change-Id: Icdebc8629946e0e7c8dde3e45ee93ff9027e7c68
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-09-13 15:50:15 +00:00
Damjan Marion
7bf8f5e484 vppinfra: add ARM Neoverse-N2 support
Type: improvement

Change-Id: Ief77ae7338667ede290aece6933bb5ae2e76ffc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-09-13 15:02:43 +00:00
Damjan Marion
3d2f718e6f build: fix clang-16 build
Change-Id: I882bef6f45fd276587fb93944ff4e21dc57dbca2
Type: fix
Fixes: 1c82cd4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-09-13 13:41:36 +00:00
Damjan Marion
aa9177c751 idpf: make plugin default disabled until issues are fixed
Type: improvement
Change-Id: I2daa8fc338289555649135e7f0898e139807fdce
Signed-off-by: Damjan Marion <damjan.marion@gmail.com>
2023-09-13 13:40:29 +00:00
Vratko Polak
c142cd115b docs: mention how to build VPP outside git
Type: docs

Change-Id: Iceee9ef489f7f68049882651bb338311295ca12d
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-09-13 13:37:22 +00:00
Benoît Ganne
e462e543b2 build: add vpp_plugins include directory
Type: fix

Change-Id: Iacb04846c634231854f26348cc17cc729d6e0d87
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-09-13 12:21:14 +00:00
Dave Wallace
73f23a806d vppinfra: fix coverity warning CID-313632
Type: fix

Change-Id: Idc036d5967495cc2522b2a30e3acd3ec4c0cd3ff
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-09-13 12:19:40 +00:00
Vratko Polak
fee945940c vlib: deuglify the offset finding loop in pci.c
Type: style
Fixes: 054229ebbdeb3f87d96c1abf93b511c86cd6ff0f

Change-Id: I7c3080db94566af249e5082d59a4e6373c616888
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-09-13 12:17:53 +00:00
Tianyu Li
4585bb121b 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
2023-09-13 12:15:53 +00:00
Artem Glazychev
986ca97311 vppinfra: fix setns typo
Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ib8eb70336956bc2e8d0454f3c1f2c62ec98cb009
2023-09-13 12:15:17 +00:00
Dave Wallace
63335e4898 pci: fix coverity issue CID-322372
Type: fix

Change-Id: Iaf16bb720d76ea3ae04afb8123b7cac15771ef2b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-09-13 12:14:18 +00:00
Xiaoming Jiang
7a72658665 ipsec: improve fast path policy searching performance
Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Ib8bb300f5b62648f6b634046415742bdf5365982
2023-09-12 12:42:56 +00:00
Vratko Polak
139aba2047 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>
2023-09-12 12:42:11 +00:00
Vratko Polak
ceb64add2a 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>
2023-09-12 12:38:08 +00:00
Florin Coras
48cd559fb5 session: make sure rx evt flag is cleared for builtin rx
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I99631b1be6e19f0cefd1cefa82a51e6f8e9be2ac
2023-09-07 16:46:50 +00:00
Frédéric Perrin
a4157aec1c ipsec: clear L4-cksum flags when decap'ing packets
Type: fix

Signed-off-by: Frédéric Perrin <fred@fperrin.net>
Change-Id: I45191b7316c88038bcd57d62aeb07bb109cf4a4d
2023-09-07 08:07:51 +00:00
Piotr Bronowski
c143cc8967 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
2023-09-07 08:05:54 +00:00
Damjan Marion
f0fc65a4b9 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>
2023-09-06 18:57:54 +00:00
Vladislav Grishenko
579a6fb89b 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>
2023-09-06 16:44:15 +00:00
Mohsin Kazmi
a181eaa59b 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>
2023-09-06 12:13:45 +00:00
Ole Troan
56b8abc07f 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>
2023-09-06 10:48:18 +00:00
Vladislav Grishenko
e7c57c45aa 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>
2023-09-06 08:34:33 +00:00
Sylvain Cadilhac
db8c285081 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>
2023-09-06 08:23:55 +00:00
Filip Tehlar
109f3ce4eb hs-test: point gdb to vpp source files
Type: test

Change-Id: Ie5867737e5d49fd45cc15b690af3493263fb2f6f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-05 15:55:55 +00:00
Filip Tehlar
3b770881b9 hs-test: verbose output on single test run
Type: test

Change-Id: I12ae7db36a6f7f9758fd195088877dfcd5606f84
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-05 15:58:28 +02:00
Ole Troan
9587d39993 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>
2023-09-05 08:47:08 +02:00
Filip Tehlar
4b3598e39a hs-test: log external apps
Type: test

Change-Id: Id2b0d408bd46f20b81422506f9db4eb655feddac
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-04 20:56:14 +00:00
Filip Tehlar
a6b1a7d809 hs-test: fix gdb attach
Type: test

Change-Id: Ic48ca7a3aab47df50d4e38e6123c90140c944172
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-04 20:55:56 +00:00
Florin Coras
931a32876a udp: buffer packets for connections in accepting state
Type: fix
Fixes: 0242d30

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6e313000bccce749b813f20a52432154bfd494ed
2023-09-04 18:33:41 +00:00
Ole Troan
8af78b8e36 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>
2023-09-04 17:05:48 +00:00
Ole Troan
34850e0187 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>
2023-09-04 15:14:46 +00:00
Maxime Peim
77812045e7 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>
2023-09-04 07:57:44 +00:00
Florin Coras
2ceb818f8e 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
2023-09-04 00:08:40 +00:00
Maxime Peim
23d13c071e 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>
2023-09-01 08:43:23 +00:00
Florin Coras
da652cc466 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
2023-09-01 02:31:42 +00:00
Andrew Yourtchenko
f234b0d462 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
2023-08-31 09:50:00 +00:00
Florin Coras
1765f014bc 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
2023-08-31 01:05:15 +00:00
Pim van Pelt
8d61c59c3f 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>
2023-08-29 12:42:13 +00:00
Florin Coras
7e43005d4d perftool: fix delsvec use of _vec_len
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iab80e009d8717f759edb8133beaa55ed05e57bd5
2023-08-26 13:14:46 -07:00
Wei Li
d7c94ce18e 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
2023-08-26 13:46:26 +00:00
Wei Li
942e78aa98 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
2023-08-26 13:45:55 +00:00
Benoît Ganne
19c22a42c2 cnat: fix cnat_endpoint_encode
Type: fix

Change-Id: I4ab713811626c097c7927228f3819b7785bbb951
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-08-25 15:32:03 +02:00
Ole Troan
6ee3aa41c3 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>
2023-08-25 09:15:32 +02:00
spencercoder
ecb62d2e5d build: support linuxmint OS
Support compiling in Linux Mint OS

Type: improvement

Change-Id: I08721227352b00127fe0acac67269775997fd974
Signed-off-by: spencercoder <xiexiaosong@ruijie.com.cn>
2023-08-22 15:44:10 +00:00
Piotr Bronowski
feda2ff640 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
2023-08-22 15:42:49 +00:00
Vratko Polak
6d4b3fd19c 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>
2023-08-22 11:52:22 +00:00
Julian Klaiber
e3ce81e56a 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>
2023-08-21 13:03:07 +00:00
Steven Luong
a3808ee5b2 nat: documention fix
s/nat44 enable sessions/nat44 plugin enable sessions/

Type: docs

Change-Id: I93dbd161f085bff5b98df50cd29c9bedf5038307
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-08-18 11:21:55 -07:00
Piotr Bronowski
45e8a672f0 dpdk-cryptodev: improve cryptodev cache ring implementation
Sw ring is renamed to the cache ring. This name better reflects the
puropse of this ring. We've introduced push/pop functions, as well as
other utility functions which remove code repetition. Error handlig
is improved: previously in case of an error all frame elements were
marked as bad, now only these for which errors occured have the error
status set.
Unnecessary stats counters have been removed.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2fd42a529ac84ce5ad260611d6b35a861d441c79
2023-08-18 15:20:02 +00:00
Klement Sekera
03e1d559f9 vapi: improve vl_api_string_t handling
Define vl_api_string_t to correspond with vlibapi/api_types.h
Fix allocation and size calculation routine generation.

Type: improvement
Change-Id: I6b0a3eb3459d75d326e67bfb76dac8125e480afa
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2023-08-18 06:09:41 +00:00
Stanislav Zaikin
56777b9409 vapi: support services
Add missing support for

service { rpc X_get returns X_get_reply stream X_details; }

Type: improvement

Change-Id: I27555f61a2974e414cb6554f32c550b8ee5eb037
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2023-08-18 06:09:10 +00:00
HediBouattour
f6beee077e cnat: add host tag to bitmap in cnat snat
Type: feature

this patch adds a new tag "host" to interfaces for cnat-snat
if an interface is tagged pod and host we do not snat traffic outgoing through it

Change-Id: I71f5bfcb85581bb8508ba547374f0603f1079ac6
Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
2023-08-18 02:42:33 +00:00
Klement Sekera
c5fa5391ed tests: more descriptive error message
Type: improvement
Change-Id: Icf8a5dc711e1e11ec919b515d7af2f487a1c04c2
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-17 17:24:56 -04:00
Ting Xu
737edea328 idpf: add native idpf driver plugin
Add a new native idpf driver. This patch enables the device
initialization. Add some necessary functions and definations
for input and output. A new version of virtchnl is introduced.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Ibbd9cd645e64469f1c4c8b33346c1301be3f6927
2023-08-17 01:37:44 +00:00
nucleo
cc22d38100 dpdk: Newer meson 0.55.3
Fixes error with python 3.12

No module named 'pkg_resources'

'import pkg_resources' removed in 0.55.3

Type: fix

Change-Id: I15c8cf195fd07a0eb2f3b58f895ef4b26cc17b90
Signed-off-by: nucleo <alekcejk@googlemail.com>
2023-08-17 01:23:31 +00:00
Dave Wallace
7b8b465269 tests docs: update python3 venv packages
- Package update performed by
  1. updating pip, pip-tools, setuptools
  2. 'make test-refresh-deps' on ubuntu 22.04
  3. fixing 'make test' and 'make docs' issues
     on ubuntu 22.04
  4. 'make test-refresh-deps' on ubuntu 20.04
- Add dependency for 'make test-refresh-deps'
  to insure python venv is set up.
- Update of python formatter, black,
  caused reformating of 41 python code
  files.

Type: make

Change-Id: I7cafdf4b5189065ac57cb6b254937f6e0897a924
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-16 19:53:12 +00:00
yanlong
d826a60269 l2:Add doc for l2 rewrite, and add examples
Supplemented the documentation of "l2 rewrite", and added examples

Type:docs

Change-Id: If49ae0b22989b3cd1c88a27a4e51b74be32d75e7
Signed-off-by: yanlong <dyl_wlc@163.com>
2023-08-16 15:51:22 +00:00
Andrew Yourtchenko
ad417a8e6d nat: mark several messages as production
As per discussion on the VPP call, since they are being
used in CSIT tests and have not seen changes in a while,
mark the messages as production from the change process
standpoint.

Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I7fda71edd923b798d034380320a869f7c35cb5a6
2023-08-16 15:08:33 +00:00
Florin Coras
55c699e098 vcl: fix ldp epoll events array overrun
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3dd65946c220f958a4fda0551b053d690bf06c39
2023-08-15 20:58:35 +00:00
Florin Coras
5e9ed0dc81 vcl: handle postponed disconnects with select
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia8449344a471129c0d148b39d97a5d310c2a1fc7
2023-08-15 11:54:13 -07:00
wanghanlin
4747b346d0 vcl: fix error state switch for vcl_handle_mq_event
When a listen session receives an ACCEPTED message, but then
receives either a RESET or DISCONNECTED message from VPP before the
session is accepted, the listen session state is switched to
VPP_CLOSING or DISCONNECT.
The subsequent CLEANUP message handler attempts to send a
disconneted or reset reply message to VPP, but since the vpp_evt_q
for the listen session is null, this leads to a crash.

Type: fix
Change-Id: Ic51f78f631fe8d15bf8c56b795f4a900c3e2f724
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
2023-08-15 18:06:10 +00:00
Dave Wallace
61ab094721 dpdk: bump rdma-core to 46.1
- Per dpdk 23.07 release notes (rdma-core >= 46.0)

Type: feature

Change-Id: I7c15e15e1cf4b6f652711f9446d9f8324f6c4092
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-14 16:19:46 -04:00
Kai Ji
4421898491 dpdk: bump to DPDK 23.07
This patch bumps DPDK version from 23.03 to 23.07.

Type: feature

Change-Id: I15140cecd008bfafb358f6348a1cb8fc08f70f02
Signed-off-by: Kai Ji <kai.ji@intel.com>
2023-08-14 15:46:34 +00:00
Florin Coras
09c0e8fac2 session: fix coverity warnings
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I910c8ce1713c6d346cc5ea4eb58a89c1c30a10a1
2023-08-11 21:33:58 +00:00
Dave Wallace
ef68bb57db tests: filter coverage report output
- Remove test code & non-vpp code from coverage report
- Remove driver/hardware vpp code which cannot be tested
  in 'make test' from coverage report

Type: fix

Change-Id: I04b50c14bc3437b845f2afafae47297189e61e3f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-11 02:15:07 +00:00
Vratko Polak
11af9e6bfe crypto-sw-scheduler: avoid crypto work on vpp_main
+ Checkstyle demanded indentation edits.

Type: fix
Ticket: VPP-2083
Fixes: 9a9604b09f15691d7c4ddf29afd99a31e7e31eed

Change-Id: Ie2d33d290330247d36435a073675b732bb64ae93
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-08-10 11:33:17 +00:00
Steven Luong
2faac91f67 docs: correct the directory path for index.html
Type: fix

Change-Id: Ia0d6f57790dbca92662c6d8b986c325f1c399131
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-08-09 19:01:24 +00:00
Florin Coras
0242d30fc7 session: async rx event notifications
Move from synchronous flushing of io and ctrl events from transports to
applications to an async model via a new session_input input node that
runs in interrupt mode. Events are coalesced per application worker.

On the one hand, this helps by minimizing message queue locking churn.
And on the other, it opens the possibility for further optimizations of
event message generation, obviates need for rx rescheduling rpcs and is
a first step towards a fully async data/io rx path.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id6bebcb65fc9feef8aa02ddf1af6d9ba6f6745ce
2023-08-09 18:45:26 +00:00
Nathan Skrzypczak
6d733a93b2 cnat: remove rwlock on ts
Type: improvement

Remove rwlock contention on timestamps. ~10% pps with
10k sessions. Use fixed-size-pools of increasing sizes
starting with 4K, and with a x2 step each time.
We don't free/shrink allocated pools.

Change-Id: I5fea51faba40430106c823275a6356e81709d118
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-08-09 08:23:45 +00:00
Nathan Skrzypczak
897844d1e9 cnat: add ip/client bihash
This replace the cnat ip4/ip6 to client
lookups previously done with a regular
hash, by a bihash lookup.

Type: improvement

Do the client lookup in a bihash instead of
a hash.

Change-Id: I730c1893525c002b44ada8e290a36802835e88e9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-08-09 07:59:09 +00:00
Dave Wallace
878a9f5706 tests: fix setting gcov flag for test-cov target
Type: fix

Change-Id: I3c663babe4f32f5d2870265336b5d272cc029ce7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-08 21:22:54 +00:00
Nathan Skrzypczak
6631032791 cnat: flag to disable rsession
This adds a flag on the translation
asking the VIP & input-feature nodes
not to create the return session when
translating / load-balancing an incoming
flow. This is needed with maglev & DSR

Type: feature

Change-Id: I699012310ddc59f6ceeeb4878638eac6da5128dc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-08-08 14:06:08 +00:00
yanlong
cad2111129 docs:Improve the README of vpp docs
Type:fix

Change-Id: Ie2ae728450ef123379b697cdf9c873d5bec01b47
Signed-off-by: yanlong <dyl_wlc@163.com>
2023-08-08 12:36:33 +00:00
Benoît Ganne
84e6658486 ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMAC
Type: improvement

Change-Id: I830f7a2ea3ac0aff5185698b9fa7a278c45116b0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-08-08 10:16:26 +00:00
Gao Feng
96600f9077 vcl: Fix the ldp init check
Maybe some function calls the wrapper funtion like read which invokes
the ldp_init_check in the other libs as a constructor before
ldp_constructor. Then the ldp has been initialized already when
ldp_constructor is invoked. And it's normal case, we shouldn't treat it
as an error.

So ldp_init should return success if ldp is initialized already instead
of an assert.

Type: fix

Change-Id: Ifa2a7b1d5471981a3f840b14a4fa5d48fb1f1374
Signed-off-by: Gao Feng <gfree.wind@outlook.com>
2023-08-08 04:24:58 +00:00
Damjan Marion
6508ed51a8 vlib: support sibling node creation with vlib_register_node()
Type: improvement
Change-Id: I7e82a262692b2b6513f81889d78a43c10ca7bfb2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07 18:03:19 +00:00
Damjan Marion
40f481037e vppinfra: add clib_file_get_resolved_basename
more generic version of clib_sysfs_link_to_name with support for
format strings...

Type: improvement
Change-Id: I0cb263748970378c661415196eb7e08450370677
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07 18:00:10 +00:00
Damjan Marion
993735913c vppinfra: add vec_foreach_pointer macro
works with vectors of pointers...

Type: improvement
Change-Id: I530653978fcf981be299cf42a1133be000d74d0c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07 17:33:25 +00:00
Damjan Marion
8d0c0c6821 vppinfra: add unformat_init_path
More conveninet way to unformat file by providing filesystem path.
Takes format string for easier constuction of path...

Type: improvement
Change-Id: I433204fa20dc98e2b11c53914883d047a7fc62c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07 17:33:09 +00:00
wanghanlin
696db20e33 vcl: fix error state switch for VCL_STATE_LISTEN_NO_MQ sessions
When a VCL_STATE_LISTEN_NO_MQ session receives an ACCEPTED message,
but then receives either a RESET or DISCONNECTED message from VPP
before the session is unlistened, the listen session state is
switched to DISCONNECT.
The subsequent CLEANUP message handler attempts to send a reset
reply message to VPP, but since the vpp_evt_q for the listen
session is null, this leads to a crash.

Type: fix
Change-Id: Id7e88dcb16df3eda912b3f763730ec8d8973473a
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
2023-08-07 16:58:07 +00:00
Nathan Skrzypczak
b22da9c7d1 cnat: Support offloaded check sums
This patch removes zero checks for new_addr, new_port
meaning sessions with zero values will rewrite the packet
with a 0 value instead of leaving it in place. This allows
to reduce branchiness in the code, and sessions are fully
resolved at creation time anyway.

This also adds support for checksum offloads:
- IP checksum offload : we always compute the checksum to
avoid issues with drivers. We'll revert this if we realize
cost gets too important.
- TCP/UDP checksum offload : we add the implementation for
pseudo header checksum computation. This is needed for the
drivers that do not re-compute this pseudo-checksum before
the packet is TX-ed (e.g. a few DPDK drivers).

Type: improvement

Change-Id: I6543f3aec8c120ec50f4219108609138283620ef
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-08-07 11:34:48 +02:00
Benoît Ganne
994a58997d nsh: fix nsh gre references
Since gre is a plugin, nsh should not use symbol names directly.

Type: fix
Fixes: cefb178aa487a217d4ac75d7d4fa62db4b7d70fd

Change-Id: I1a1c20740aabdaafd69f507cd71016c3109b0205
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-08-04 16:13:43 +02:00
Damjan Marion
faeadca89e vpp: detect early nosyslog and interactive flags
So error logs are displayed on console earlier....

Type: improvement
Change-Id: If31b76c9d06254b0fec5b5b3f4e92a881b4cf786
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-04 10:52:07 +00:00
Damjan Marion
91ff0e965a vppinfra: add pool_foreach_pointer()
Works on pools of pointers...

Type: improvement
Change-Id: I194dec389ca4c5ec2ce3361b54a9968c9caecefc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-02 17:41:22 +00:00
Florin Coras
39a8e16448 quic: fix closing of streams
Avoid explicit manipulation of session state and generate closing event
if need be.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I07cda1db08a2673b27b496ea1371b0dfd8e6f98a
2023-08-02 16:36:44 +00:00
Damjan Marion
3706636ca0 vlib: remove dependency on libuuid
Type: improvement
Change-Id: I4e2b2e4f227dfcb3df36166db13c8aa5c0b603f5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-02 16:07:06 +00:00
Damjan Marion
f566524a21 vppinfra: add unformat_c_string_array
Type: improvement
Change-Id: Iea5ecca5d4cbc6c7aea69104830afcfe78c708ee
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-31 20:10:57 +02:00
Sylvain Cadilhac
83ca6e66d0 ipsec: fix IPv6 IPsec tunnel punting
Type: fix
Buffer needs to be rewinded before being passed to punt-dispatch node.

Change-Id: I43d103515d372e425f4c3b08ca1779398f1fced4
Signed-off-by: Sylvain Cadilhac <sylvain.cadilhac@freepro.com>
2023-07-31 13:00:31 +00:00
Mohsin Kazmi
c709f2cd9d libmemif: add support for buffer size
Type: improvement

buffer size can be configurable:
./test_app -b 9216

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Id77f6baac27d45dec3d5b7ea8a9a53acf2a302fc
2023-07-31 09:55:41 +00:00
Dave Wallace
054229ebbd vlib: fix gcc build breakage
Type: fix
Fixes: 00ea98ad6

Change-Id: I4ac8c9c5902299d5f283ba4912d52d9bfcedef5c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-07-28 16:36:22 -04:00
Filip Tehlar
543cd57ea2 hs-test: improve get stats
Type: test

Change-Id: Ie681ee43007f4fe787d51d80bda9b433dcb6c09a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-28 18:55:55 +00:00
Florin Coras
8f3147d102 session: regrab evt llist elt for app transports tx
App transports like TLS can close sessions on tx and consequently
generate new events. That can realloc the event pool.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I58a97502acc1182b3d051ba1aa9e0e98c16f4593
2023-07-28 16:05:56 +00:00
Damjan Marion
8797956bac vnet: add vnet_register_device_class function
To allow dynamic registration of device classes..."

Change-Id: Ie8435e8c55b7e300be06abe97b653c0c3ce7f732
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-28 15:52:35 +00:00
Damjan Marion
00ea98ad60 vlib: pci cleanup and improvements
Change-Id: Ieafbed6f2db3dec65e4b43d84a4661f6a1bbe891
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-28 15:51:12 +00:00
Damjan Marion
c5c0d0cf8a vlib: fix coverity issue in vlib_node_set_interrupt_pending
Type: fix
Fixes: cc8249c
Change-Id: Iebfbbd1e00782c4097cc840460b5177d18921131
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-28 12:57:24 +02:00
Filip Tehlar
229dab615a hsa: add total bytes parameter to vcl_test_client
Type: test

Change-Id: Ib1131eedb8eeaa9adfed9cfc47beeb1c7c8adb5c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-27 17:16:00 +00:00
Filip Tehlar
6fc5311f41 session: remove unused code
Type: improvement

Change-Id: I7525aa81acf073707550b23541fdcc358b9bf49c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-27 16:35:34 +00:00
Maxime Peim
f902ba534a ipsec: fix sa bind cli
Small mistake was made, reported by coverty scan.

Type: fix
Change-Id: I98ca16c0275a94b2def99831f9353d4ff3fe93a9
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-27 16:32:27 +00:00
Denys Haryachyy
2652867480 ikev2: cleanup stuck sessions
The following issues are fixed:
* in responder code: do lookup again as the old pointer could be
  invalidated during the cleanup operation
* in initiar code: do the cleanup of session if there're no child SAs or
  if there's no response from the responder during initial request (this
  can easily happen if the response packet was lost/dropped/etc)
* print the state of ikev2 profile (for easier tshooting)

Type: fix

Change-Id: I853d9851c0cf131696585e3c98fa97e66789badd
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2023-07-27 07:45:01 +00:00
Florin Coras
0eff4e722c vcl: allow rx of zero length dgrams
Type: fix

Change-Id: I438ef488357456e9415e51a17355e9eba8518808
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-07-26 11:28:03 -07:00
Vratko Polak
e9ea7d5216 vlib: rename vnet_log_get_class_data
It is a function in vlib, so no reason to mention vnet.

Type: fix
Fixes: bf179a91d8d224c64d08643a2bb52580f68ce96b

Change-Id: Ic5f601d94d88b667f7ce44a017a0e1d5b4db5da1
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-07-26 13:48:20 +02:00
Steven Luong
116392b174 stats: remove extra format line
The extra format line was added for no reason from patch ff27c9f8e.

Type: fix
Fixes: ff27c9f8e

Change-Id: Ib25149cc8a17c29d0c8a0dbc06f0ea12ca4f328c
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-07-26 01:57:13 +00:00
Filip Tehlar
0028e6f316 session: use session error type instead of vnet error
Type: improvement

Change-Id: Ie0bad9e03ac2e29da23af01ee7f63cb44489ad9c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-26 01:09:17 +00:00
Damjan Marion
cc8249c5fd vlib: interrupt mode support for pre-input nodes
Type: improvement
Change-Id: Ic6e60597d2be63e3a0ae4399a81dbbd72392f30d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-25 20:10:29 +00:00
Maxime Peim
3f40755749 classify: add bpf support to pcap classifier
Type: feature
Change-Id: I28fb38e49c89f4c4d4cc58c1a5c0aa8502678472
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-25 10:06:16 +00:00
Tianyu Li
4ab1aa3145 dpdk: fix signed single bit field
clang-16 complains about signed one-bit bitfield value changes
from 1 to -1. Use unsigned type instead.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I84f8cf314d36183a5e6f544cd756c01d1d10a1a5
2023-07-25 08:13:26 +00:00
Gabriel Oginski
c3f505fe7b vpp-swan: fix handler API messages
In the current implementation there is a bug related to the incorrect
message handling due to the wrong id.

The fix changes logic responsible for handling incoming API messages
by correcting their ids.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iea29506053c9fd2e1d01bce83e7f4a6e1de39321
2023-07-24 08:15:21 +00:00
qinyang
af9b7156c8 vcl: ldp support SO_ORIGINAL_DST
Type: improvement

Support SO_ORIGINAL_DST socket option to get original dst_ip4 and dst_port if nat44 rule enabled.

Change-Id: If00e00d03e48f3b78a23a68f1b078954d79dd0f7
Signed-off-by: qinyang <qiny@yusur.tech>
2023-07-21 16:27:14 +00:00
Naveen Joy
ae916b3904 tests: Add checksum offload interface tests
Type: test

Change-Id: I6edc8858b802d3d32159d71c1e867a06cc1025d5
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-07-21 13:00:05 +00:00
Piotr Bronowski
3a6bc6f127 ipsec: fix logic in ext_hdr_is_pre_esp
When _VEC128 instructions are not enabled logic is buggy.
The function always returned 1.

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I603200637e8d65813f4e49ef15d798e74b79b9cf
2023-07-21 00:28:05 +00:00
Steven Luong
2da272e3da vcl: zero out cmsg for recvmsg API
When msg->msg_controllen is set in recvmsg, the caller wants to receive
additional information about the messages. However, they might not
always be available. In that case, we should clear cmsg since
the caller uses CMSG_NXTHDR which might access uninitialized fields in
cmsg.

Type: fix

Change-Id: Ifdf9634bfcb1427f7ae3812014a46bfd7f4bc473
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-07-19 06:37:29 +00:00
Gabriel Oginski
0e1fe7ba86 vpp-swan: change flow in function for add route
This patch addresses the issue when the list of available interfaces
is not up to date. Due to this issue adding a new route fails
and finally the connection is not established.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3a63c0dd99ebc28ea149b4b23867440937682761
2023-07-19 02:38:00 +00:00
Gabriel Oginski
efd2350d65 vpp-swan: fix incorrect msg ID in register_event
This patch addresses the issue where the message ID registration
in the register_event function is incorrect. Due to this incorrect
registration, the lookup for the corresponding callback on received
messages fails, eventually leading to a segmentation fault
and double-free memory space.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: If95182f972f64adb44d514e18c831cc9627d8f0f
2023-07-19 02:32:11 +00:00
Gabriel Oginski
73d82d1273 vpp-swan: fix function to get sw_if_index
In the current implementation there is a bug in the function
responsible for getting software interface index by the name of the
interface. Incorrect function is used to send the API message, also
the handler with replied message is incorrect.

The fix changes function to send dump message and also adds handler
with replied message in the correct way.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Id1a3ba2ce7e92d216907f344431b9e2acb1d5572
2023-07-19 02:31:21 +00:00
Dave Wallace
f72a32a1e4 docs: add api change process from wiki
- Move the VPP API Change Process documentation
  from the wiki page into the in-tree VPP docs

Type: docs

Change-Id: I42f661618b8632230bebe3aa8fbad455b9a05d01
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-07-17 14:55:06 +00:00
Matthew Smith
e870d5b6ac ipip: populate mode in tunnel details
Type: improvement

There is a mode field in ipip_tunnel_details. The handler for the dump
API does not do anything to populate it so it always contains 0
(TUNNEL_API_MODE_P2P). This is correct for p2p tunnels but is wrong for
multipoint tunnels.

Populate the field with the correct mode.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I6c1288a0d3929db0f67100748b5760c36b594f97
2023-07-14 17:42:26 +00:00
Florin Coras
5464134288 hsa: fix echo client init
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ieb2d1e6e0949844a70c81b218ca7dc83690776ca
2023-07-13 10:43:19 +00:00
Nobuhiro MIKI
95c2da7c25 lb: Fix src_ip_sticky evaluation bug in per-port-vip case.
Before this fix, the src_ip_sticky flag was passed as an argument to
the lb_node_get_hash function, which computes a hash value for a packet.
However, in per-port-vip case, the value of src_ip_sticky flag may be
different for each port number. As a result, the value is the same for
all port numbers, even though it is a per-port-vip case.

This commit fixes the src_ip_sticky evaluation by delaying it until the
packet is received, so that the correct value is obtained. Also, the
unit test case has been enhanced for this bug fix.

The steps to reproduce this bug are described below:
https://lists.fd.io/g/vpp-dev/message/23248

Type: fix
Fixes: 613e6dc0bf92 ("lb: add source ip based sticky load balancing")
Change-Id: I483492b214a1768e7a21fd86edd5151b3c46528b
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2023-07-13 08:10:26 +00:00
Alexander Chernavin
df4d342d76 linux-cp: fix crash on processing dump of routes
nl_route_add() recently started to use its optional argument to check
whether replace flag is set for the message. When notification messages
are processed, the argument is a pointer to the corresponding message
info. However, when dump replies are processed, the argument is a null
pointer. This leads to null pointer dereference and crash when dump of
routes is processed.

With this fix, check for replace flag only if message info was passed
to nl_route_add(). Otherwise, assume the flag is not set. Dump replies
do not have it set.

Type: fix
Change-Id: Icb04a1146e09cc965b623018c28f91b347be0eab
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-07-12 17:03:49 +00:00
Damjan Marion
cf1880284c avf: remove barrier
Type: improvement

Change-Id: I95023d2e6034b77952e0423d0430b433ea0dab15
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-11 20:37:23 +00:00
Adrian Pistol
44b3abe86a linux-cp: Basic MPLS support.
1) Imports ENCAP_MPLS labels from IPv4/IPv6 routes.
Note that this requires libnl 3.6.0 or newer.

In previous patches, the fib_path_ext_t had a path ID of -1.
After a long investigation, it turned out to be caused by route weight
being set to 0. There is a comment explaining more details.

2) Handles MPLS routes.
MPLS routes were wrongly added as IPv4 routes before.

POP and SWAP are now both supported.
All the routes are installed as NON-EOS and EOS routes,
as the Linux kernel does not differentiate.

EOS POP used in PHP uses the next-hop address family
to determine the resulting address family.

This patch is sufficient for P setups.
PE setups with implicit null should also function okay, as long as a
seperate label gets programmed per address family.

PE setups with explicit null will also forward packets,
but punting is a bit odd and needs MPLS input enabled on the LCP host
device.

3) Propagate MPLS input state to LCP Pair and Linux.
Since the Linux kernel uses the MPLS routes itself,
the LCP pair tap needs MPLS enabled to allow host originated packets.

This also syncs the Linux `net.mpls.conf.<host_if>.input` sysctl to
allow punted packets to have MPLS labels, mostly explicit nulls.

In addition, a special feature is enabled to cross connect MPLS packets
coming from Linux directly to interface-output untouched.

Make sure to enable MPLS/add a table in VPP first and load the
MPLS kernel modules!!

Type: feature
Change-Id: Ie4184bb4cc96905bf8b483a27e7ca6d251697374
Signed-off-by: Adrian Pistol <vifino@posteo.net>
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2023-07-11 17:09:25 +00:00
Steven Luong
ff27c9f8ec stats: fix duplicate /if/names entry
stats entries /if/names are never deleted as it is a vector of the
sw_if_index value. When the interface is deleted and then created again
later, and if the new interface takes a different sw_if_index, we may
end up with duplicate entries for the same interface name. For example,
the following configuration sequence causes problem

create loopback interface
create loopback interface
delete loopback interface intfc loop0
delete loopback interface intfc loop1
create loopback interface

vpp_get_stats dump /if/names
[0]: local0 /if/names
[1]: loop0 /if/names
[2]: loop0 /if/names

The fix is to set the delete /if/names entry to deleted when the interface is deleted.

Type: fix

Change-Id: I7d811b12d56e3cf8c7deffe14736ea0f24814d02
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-07-07 16:55:31 +00:00
Tianyu Li
becfab0f17 api: fix signed single bit field
clang-16 complains about signed one-bit bitfield value
changes from 1 to -1. Use unsigned type instead.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Iab006c036d4068af2fe3caaefc871a95b26cc578
2023-07-07 18:06:15 +08:00
Ondrej Fabry
fa6d21b4ff api: lcp - Mark old message versions as deprecated
List of changed messages:
- lcp_itf_pair_add_del
- lcp_itf_pair_add_del_reply
- lcp_itf_pair_add_del_v2
- lcp_itf_pair_add_del_v2_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: Ic20a852dd1fb27858c8776095f9c98757b89bfe8
2023-07-06 18:44:01 +00:00
Ondrej Fabry
755e3aa54f api: ip - Mark old message versions as deprecated
List of changed messages:
- ip_punt_redirect_dump
- ip_punt_redirect_details

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: Icf91f760b9bd328110b0f9fc2e421bb954033d21
2023-07-06 18:30:57 +00:00
Ondrej Fabry
cfd8e4ec88 api: memif - Mark old message versions as deprecated
List of changed messages:
- memif_socket_filename_add_del
- memif_socket_filename_add_del_reply
- memif_create
- memif_create_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: Id334990584b64a0efa3c28a3d8b6b641adab8c09
2023-07-06 18:30:11 +00:00
Ondrej Fabry
7108cb15ca api: memclnt - Mark old message versions as deprecated
List of changed messages:
- memclnt_create
- memclnt_create_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I0031cc2f1604ca4c34574c8e1ee28e358c2bbe5d
2023-07-06 18:29:34 +00:00
Ondrej Fabry
be56761663 api: pg - Mark old message versions as deprecated
List of changed messages:
- pg_create_interface
- pg_create_interface_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I574927f0820c54d748f27fd96a45afec5243b645
2023-07-06 18:28:21 +00:00
Ondrej Fabry
5c476e7ac3 api: sr - Mark old message versions as deprecated
List of changed messages:
- sr_policies_dump

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I16ae1bed83ad8c73e3254b6d195251702de84f97
2023-07-06 18:27:57 +00:00
Ondrej Fabry
63305843e2 api: ipsec - Mark old message versions as deprecated
List of changed messages:
- ipsec_sad_entry_add_del_v2
- ipsec_sad_entry_add_del_v2_reply
- ipsec_sa_v2_dump
- ipsec_sa_v2_details

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I8fd6906e9684ef7ebc0688dc8b0637ae2dc8d0a2
2023-07-06 18:26:32 +00:00
Laszlo Kiraly
6b4aa2b7f4 build: generate debug info rpm packages for opensuse
Enabling debug info RPM creation in spec file.

Type: fix

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Id284b135ec4125905145f7902a6e1cf42ba65aa4
2023-07-06 14:46:41 +00:00
Laszlo Kiraly
3ff76761f4 build: add missing dependences for opensuse
VPP build failed when build xdp-tool on opensuse
Add the missing libraries and headers.

Type: fix

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: I8c3f28ac6e88cd61a1bf0a823ffa1d5f3097be40
2023-07-06 11:36:42 +02:00
Piotr Bronowski
ea7111ed40 dpdk-cryptodev: introduce sw_ring to the crypto op data path
This patch introduces sw_ring to the crypto op data path implementation,
so that raw data path and crypto op data path use same mechanism of processing
async frames. Crypto op ring has been removed from the implementation.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Id823f80a88cfa0ff40252616a36de8bb044c7f45
2023-07-06 07:55:04 +00:00
Ting Xu
61762c7aac packetforge: fix has_key invalid in python3
Python Dict attribute "has_key" was removed in Python3. Use "in"
operation instead.

Type: fix

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I7b63b0689e9970ca798921368c5616875f7d5682
2023-07-04 06:45:17 +00:00
Benoît Ganne
8aa47b7a76 docs: fix packages path in tutorial
Type: fix

Change-Id: I84bbb28490d9c66c5bf55839ab75b3aec1bf5854
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-30 20:45:46 +00:00
Mohammed Hawari
ccd3070958 bpf_trace_filter: plugin for BPF Trace Filtering
Change-Id: I342de0a375b783725aa2b621c1c70bc8bf646450
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2023-06-30 11:53:06 +00:00
Mohammed Hawari
52fa5f21b9 vlib: introduce trace filter functions
Change-Id: I7a988fafe98599e4fcf7cdaa307a69b9d76650f0
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
2023-06-30 11:35:44 +00:00
Piotr Bronowski
60527bd6df dpdk-cryptodev: sync mbuf length with corresponding vlib buffer
When vlib buffer is processed on vnet side its length is corrected by
cipher padding and icv_sz. These changes need to be reflected in
the mbuf internals.

Type: fix
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I0aa03f67f556dfc8f9a577ca1967210527221e02
2023-06-29 08:20:38 +00:00
Alexander Chernavin
e1cc875360 ip-neighbor: add api for getting neighbor db config
There is an API call to change neighbor database configuration (i.e.
limit on peer number, aging, and recycling). With this change, make
getting current values of these settings available via the API.

Type: improvement

Change-Id: Ie9394e086b68cf9b28ad98dea162f203f8043cbb
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-06-29 05:11:10 +00:00
Florin Coras
c8767c42aa session udp: add len check for tx dgrams
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I35391fb8c39defbe0e57a241a357c3c98e8cef54
2023-06-27 20:34:21 -07:00
Filip Tehlar
31eaea9eef hs-test: add nginx+quic test
Type: test

Change-Id: I15e4f2fb84cb4f34b6fea95978db000854a63e78
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-27 15:58:47 +00:00
Ondrej Fabry
fe965a3a17 api: af_packet - Mark old message versions as deprecated
List of changed messages:
- af_packet_create
- af_packet_create_reply
- af_packet_create_v2
- af_packet_create_v2_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: Ia065c3bbc2c7923de64f47417099aea1aa1216b1
2023-06-27 14:47:50 +00:00
Ondrej Fabry
74d9f0ae3b api: tapv2 - Mark old message versions as deprecated
List of changed messages:
- tap_create_v2
- tap_create_v2_reply

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I7b1b22cc4a0e31f5c19fe48e7a0f30631576f9df
2023-06-27 14:47:14 +00:00
Ondrej Fabry
9ebd2b92e3 api: vxlan - Mark old message versions as deprecated
List of changed messages:
- vxlan_add_del_tunnel
- vxlan_add_del_tunnel_v2
- vxlan_add_del_tunnel_reply
- vxlan_add_del_tunnel_v2_reply
- vxlan_tunnel_dump
- vxlan_tunnel_details

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I0a7227e76a493731fd136f8e6310ad372fab2494
2023-06-27 14:46:50 +00:00
Stanislav Zaikin
7f27ed666e af_xdp: create_api_v3 without namespace keyword
Namespace keyword is reverved c++ word, so it's not possible to include
vapi header for af_xdp plugin and use it.

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I42a0e0a89ff2c407090d3c18c1bc5a5605ddf032
2023-06-27 11:42:42 +00:00
Stanislav Zaikin
5fe1cf80ca virtio: use fast-path for ethernet-input if possible
If a frame should be sent to 'ethernet-input' set the
ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX flag. It will force 'ethernet-input'
to use a fast-path for such frames.
This patch also aligns the behaviour with other input nodes.

Type: improvement

Change-Id: Icff0fa31204d5304a2ea0a4f4e7bc418dedbfe32
Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2023-06-27 08:18:10 +00:00
Florin Coras
d96859f09b udp: pass cless hdr to transport through buffer
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I7177ada23e5a69ec8e362ec98b98010c3b44b3d7
2023-06-26 10:33:49 +02:00
Florin Coras
503480d772 tcp: avoid initializing counters multiple times
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia98dae5fdde16426d5457742aff0a1b04db4d034
2023-06-25 01:49:58 +00:00
Maxime Peim
1271e3a2a1 ipsec: manually binding an SA to a worker
An SA is normally bound to the first thread using it. However, one
could want to manually bind an SA to a specific worker.

Type: improvement
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I05cbbf753e44a01d9964ee47812c964db9bbb488
2023-06-23 17:38:55 +00:00
Stanislav Zaikin
601972bb20 fib: walk over adj glean per table
Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I07f54bb643c24b1839a2d0e93acc593d13a43fed
2023-06-23 17:32:31 +00:00
Florin Coras
6052f4b9d8 tcp: add simple stats collector
Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I435ff10fa3af15b0bed83607aca508a1c087a159
2023-06-22 20:14:49 +00:00
Dave Wallace
1c95e12b0d tests docs: fix lcov code coverage report generation
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199

Type: test
Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-22 13:35:28 +00:00
Maxime Peim
fdf6fbe2e7 tcp: options support into pg
Packet-generator does not support TCP options.
Along with its support, a formatting function has been added.
Further work will be needed to update header formatting functions
to take into account TCP connection options. For now, TCP options
are taken on a per-packet basis.

Type: improvement
Change-Id: Id800887853c4941d893be353ce6d8624ed8bbc5d
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-06-22 12:39:35 +00:00
Andrew Yourtchenko
9ba6dcf558 tests: do not run qemu interface tests if the environment does not allow it
cdf73b973181ff4c67147900408216e37bae897a has added the qemu tests as part of the default test run,
which results in "make test" failure in more restricted environments which do not allow the
namespace creation.

Add a config flag to skip those tests, and skip them if the namespace creation fails.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Ie631f7fb2a80864f77c79619eba4a43712e950e5
2023-06-21 17:20:03 +00:00
Florin Coras
4aeba37762 session: mark half-open transport closed on ntf
Make sure half-open sessions are marked as transport closed once
connected notification is provided. This ensures that if they've been
scheduled for tx, the event is ignored.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8c44584e843d93365ec737ae4e1bcb74eba35506
2023-06-21 16:52:22 +00:00
Benoît Ganne
a9edb9a168 af_xdp: fix chained buffer free on failure
Type: fix

Change-Id: I7c6fb783e5200773cbd02c86d39fd241efcc39f9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-21 09:21:51 +00:00
Florin Coras
5cca669fc7 vcl: fix epoll lt coverity warning
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6900d9ab147d35f99f944bf741f6bb329c8ea0df
2023-06-20 08:47:37 -07:00
Piotr Bronowski
f0c67adfb2 dpdk-cryptodev: enq/deq scheme rework
This rework tries to address issues found on SPR QAT, for traffic
reaching max possible throughoutput for single QAT PF packet drops were
observed.
Fix changes enq/deq scheme by utilizing software ring in enq call from
VNET but enq and deq to QAT happens only in deq callback function what
should enable better utlization of hardware resources.

Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2e8c473d20a269fd5e93f0c8d1f8c8aa193712bd
2023-06-19 18:12:09 +00:00
Florin Coras
30ecfa8ceb vcl: no hup events in lt mode if session not epolled
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9f7dfe086bf7e11b7e0de7392f020c1052ba656a
2023-06-16 19:47:53 -07:00
Dave Wallace
cdf73b9731 tests: Run interface tests as a regular test
Type: test

Change-Id: I5cf5a0e6437b274e565066f1012d7225c62b87a8
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-06-15 13:27:23 -07:00
Florin Coras
1f40ab467a vcl: fix debug logging of mapped segments
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I73034cdba51157466713884c3fbeae7054d92ad7
2023-06-14 17:51:01 +00:00
Shmuel Hazan
07e6c82950 af_xdp: linearize buffer chains before TX
The af_xdp plugin does not support chained buffers; attempting to send
chain buffers will result truncated packets or even send other packet's
data. As a workaround, turn any buffer chain into a single buffer before
tx.

Type: fix

Change-Id: I05dec912455eb2bb6c8122a28cd646f88983aa9a
Signed-off-by: Shmuel Hazan <shmuel.h@siklu.com>
2023-06-14 14:16:27 +00:00
Dave Wallace
39c40fa349 vppapigen: fix crash with autoendian arrays
Type: fix
Ticket: VPP-2078

Change-Id: I418269632bdfc823c5f0ba7652957277276d294d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-13 13:25:18 +00:00
Piotr Bronowski
d53a95cead dpdk-cryptodev: introduce sw_ring
This patch introduces sw_ring. This ring is used in next set of patchas
and plays role of a buffer for QAT, allowing collecting frame elements
in case QAT queue is fully utilized, and assembling frame
from QAT dequeued elements.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Change-Id: I20718e200986ab4dba5cbc31c05a904072a6981a
2023-06-13 12:08:54 +00:00
Artem Glazychev
84fb83def4 af_xdp: set frame_no_append flag
Make sure the same frame is not used for multiple interfaces, otherwise it breaks the ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX promise.

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I02546259ceaea36f65cb9f78b9b3ee45ed4075c9
2023-06-13 11:01:02 +07:00
Florin Coras
9a1fbb5244 tcp: cleanup next nodes and drop logic
TCP nodes consume the buffers so they have no nexts. To avoid long drop
path through vlib graph, add drop node.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibe6e075e83612ed16270934398c6a013f236ae35
2023-06-08 21:19:00 -07:00
Florin Coras
81e3243c1b svm: convert fifo want_deq_ntf ops to atomics
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba2e4de24ff0724e31859f5d2f4ffa3cfe2cf284
2023-06-08 19:23:51 +00:00
Filip Tehlar
5aa59c7cfc hs-test: increase test run timeout
Type: test

Change-Id: Ica211c79373777c3352d6ccbb619c0d67b70fa06
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-08 17:33:15 +00:00
Filip Tehlar
3a910ab768 hs-test: rename address allocator
Type: test

Change-Id: I1745719315d4e0785df5a03aa4312f84c40cb18f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-08 17:04:36 +00:00
Mohammed Hawari
d5b6f9c0ef misc: fix INFO.yaml mistakes
Change-Id: If4e7911788b6aab67672b7e7228ecbdb402a85d5
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2023-06-08 13:16:56 +00:00
Benoît Ganne
f40bdbb80d af_xdp: make sure all packets are transmitted
AF_XDP socket will only tx enqueued packets up to a max batch size so
we need to retry until everything has been sent.

Type: fix

Change-Id: Ia487ab63d3e85a478471cd1d679c5fb471804ba3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-08 11:53:21 +00:00
gaoginskx
f441b5d0ed crypto: use fixed crypto frame pool
The async frames pool may be resized once drained. This will cause 2 problems: original pool pointer is invalidated and pool size changed, both problems will confuse the crypto infra user graph nodes (like IPsec and Wireguard) and crypto engines if they expect the pool pointers always valid and the pool size never changed (for performance reason).

This patch introduces fixed size of the async frames pool. This helps zeroing surprise to the components shown above and avoiding segmentation fault when pool resizing happened. In addition, the crypto engine may take advantage of the feature to sync its own pool/vector with crypto infra.

Type: improvement

Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2a71783b90149fa376848b9c4f84ce8c6c034bef
2023-06-08 09:18:58 +00:00
Artem Glazychev
f50929d370 af_xdp: remove the previous program before loading a new one
Otherwise, we will get an error. The program could remain from the previous run.

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: I68e4072bd3b327592013804d67ccab7eb0ed3a0e
2023-06-08 09:15:09 +00:00
Florin Coras
470d72f54a vcl: fix epoll ctl frequent deq ntf requests
SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL should be treated as a
config option that is not frequently changed. Or alternatively, it
should be set together with SVM_FIFO_WANT_DEQ_NOTIF to elicit a one time
tx notification.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie4132c7789ee87227a875ff981eb98f9f4d898a9
2023-06-06 18:39:14 +00:00
Mohsin Kazmi
e3d058fc75 misc: fix the license header
Type: style

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I6b3ecf0bdb6cfdf260cf4ccae89b6bc2335ff54c
2023-06-06 15:52:21 +00:00
Florin Coras
acecd0d9c2 vcl: avoid duplicate tx events with epoll lt
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic6436426ead561e47fb77ed9a95afbd85f2998ae
2023-06-05 17:28:35 +00:00
Benoît Ganne
d52f80f422 udp: improve port validity check
- do not allocate port sparse vector when only checking if a port is
   already in use
 - do not display port that have been unregistered by default

Type: improvement

Change-Id: I6cc94e35806dd8d415cd5d1c1c51e6b066ac26a1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-06-05 16:23:43 +00:00
Pim van Pelt
af4fa965e9 linux-cp: Fix add vs update on routes
Linux uses NLM_F_REPLACE in the netlink message to signal a FIB update
The code invariably does a FIB update for IPv4 and a addition for IPv6.
Without this fix, the following:
 ip route add 2001:db8::/48 via 2001:db8::1
 ip route replace 2001:db8::/48 via 2001:db8::2

ends up as two separate FIB entries in VPP. With the fix, there will be one FIB entry (the second one with nexthop ::2).

Type: fix
Change-Id: I8f98d6ded52ae0c60bfddaa7fc39acbbaa19d34a
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2023-06-05 15:27:21 +00:00
Mohammed Hawari
ce93f125d0 misc: update INFO.yaml
Change-Id: I55ea2c11148421aef8f891829671d88be171daa2
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2023-06-02 17:55:40 +00:00
Florin Coras
607eb203b1 vcl: refactor want deq ntf checks for null fifos
Type: refactor

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5d0445ca381f1a4943bb2fe454433b3454043b56
2023-06-02 16:19:33 +00:00
Florin Coras
645ac119e8 session: cleanup cless listeners from session lookup
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I46b8194ff00c6a0a4a2bc19df9991f037856cede
2023-06-02 16:04:59 +00:00
Alexander Chernavin
f2b6edb149 wireguard: add support for chained buffers
Type: feature

With this change, packets that are larger than a single buffer can fit
will be able to be sent and received over a Wireguard tunnel. Also,
cover this with tests.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ifaf7325676d728580097bc389b51a9be39e44d88
2023-06-02 14:41:53 +00:00
Ondrej Fabry
b1239c4887 api: nat44_ed - Mark old message versions as deprecated
List of changed messages:
 - nat44_add_del_static_mapping
 - nat44_user_session_dump
 - nat44_user_session_details
 - nat44_user_session_v2_dump
 - nat44_user_session_v2_details

This change is part of VPP API cleanup initiative.

Type: fix
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Change-Id: I317ae93a0e763c3759a8c24fd550e1c97f6f4987
2023-06-02 13:18:28 +00:00
Filip Tehlar
d3b47c6d79 hs-test: fix vcl test parameter
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ieb6e46439d8e66a792f9c508e7dc49ecdd392487
2023-06-01 15:50:59 +00:00
Xiaoming Jiang
9a9604b09f crypto: make crypto-dispatch node working in adaptive mode
This patch can make crypto dispatch node adaptively switching
between pooling and interrupt mode, and improve vpp overall
performance.

Type: improvement
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I845ed1d29ba9f3c507ea95a337f6dca7f8d6e24e
2023-06-01 10:17:50 +00:00
Stanislav Zaikin
8340b24997 fib: fix memory leak in fib_attached_export_purge
Type: fix

Change-Id: I879594fcade4e081190e8dfb1dbcfc53e8431edf
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
2023-05-31 21:52:29 +00:00
Maxime Peim
94a0f57a62 misc: fix tracedump API
In some cases, in the trace dump v2 dump function, we iterate over the
client cache even though this one could be empty.

Type: fix
Change-Id: Ice5cefa25bb93dabe86fe565347cdc32faa674ac
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-05-30 09:16:22 +00:00
Mohsin Kazmi
562ac2f4e4 virtio: fix the packet buffering initialization order
Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Idada695432d2bfac8808f35f1e8cd16f84d963c6
2023-05-30 09:15:25 +00:00
Mohsin Kazmi
7280e3f866 libmemif: add testing application
Type: test

This application creates two memif interfaces which connect
to an external application i.e. VPP.

Usage:
1) Start VPP with following config.
create interface memif id 0 master
create interface memif id 1 master
set int state memif0/0 up
set int state memif0/1 up
create packet-generator interface pg0
set int state pg0 up
create packet-generator interface pg1
set int state pg1 up

set int l2 xconn pg0 memif0/0
set int l2 xconn memif0/0 pg0
set int l2 xconn pg1 memif0/1
set int l2 xconn memif0/1 pg1

packet-generator new { \
  name memif           \
  limit -1             \
  node ethernet-input  \
  size 64-64           \
  interface pg0        \
  worker 0             \
  data {               \
    IP4: 42:01:0a:00:00:0a -> 02:fe:4b:6e:4d:c1 \
    UDP: 172.16.2.2 -> 172.16.0.2               \
    UDP: 1234 -> 1234                           \
      length 30 checksum 0 incrementing 1       \
  }                                             \
}

2) Compile and Run the test_app in another terminal.
mkdir -p extras/libmemif/build
cd extras/libmemif/build
cmake ..
make
sudo ./examples/test_app

3) Run in VPP cli
vpp# packet enable

4) Run monitor to see the throughput and pps
vpp# monitor interface memif0/0
Or
vpp# monitor interface memif0/1

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4b9062fca8ad3020225adb7b1b09e5d66b1a7d48
2023-05-30 09:01:53 +00:00
Xiaoming Jiang
0c1454c1f3 ipsec: fix ipsec_set_next_index set with wrong sa index when async frame commit failed
Type: fix
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: Ib4c61906a9cbb3eea1214394d164ecffb38fd36d
2023-05-29 09:52:59 +00:00
Damjan Marion
1000125395 vppinfra: add bit_extract_u32 and bit_extract_u64
Type: improvement
Change-Id: Icfaa856aa4b50ad5c6828f1690ce3fb6ba08ec00
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-05-27 17:44:23 +00:00
Damjan Marion
7e58d9b625 vlib: add foreach_vlib_frame_bitmap_set_bit_index to .clang-format
Type: improvement
Change-Id: I6b999bcc6394bcc9325de1568dba98d1eb5a7b15
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-05-27 17:41:45 +00:00
Damjan Marion
bf179a91d8 vlib: add vlib_log_is_enabled
Type: improvement
Change-Id: I052e0d56cc6d89cd66c83a9bb81e2273d396d510
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-05-27 17:41:28 +00:00
Alexander Chernavin
2355e49733 linux-cp: update adjs for subifs too when mac changes
The plugin creates and manages adjacencies for the physical interface in
each interface pair (they are part of the x-connect feature). When a
link update notification is received from the host system, MAC address
of the corresponding physical interface is updated (as needed) as well
as previously created adjacencies for it (because a new rewrite string
needs to be generated).

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 in the plugin. After MAC address update on the parent
interface, packets sent from subinterfaces might have wrong source MAC
address. For example, IPv6 Neighbor Solicitation messages will be sent
with the wrong (previous) MAC address and neighbor discovery will fail.

With this fix, when the plugin updates adjacencies for a physical
interface, it will also update adjacencies for the subinterfaces with
existing interface pair.

Type: fix
Change-Id: Ia5f617197e33cb79b9b025c02c2c126c31a551ec
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-05-26 21:52:18 +00:00
Xiaoming Jiang
4778164869 tls: fix memory leak when client/server init error
Type: fix
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I484f3759b6c27052e08741398ec389729285f035
2023-05-26 00:32:25 +00:00
Florin Coras
d921b89880 udp: fix local port reuse check
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I323946f7838507110c663f5a904399a74fc76691
2023-05-25 13:21:46 -07:00
Filip Tehlar
71fc194703 hs-test: add vcl echo tests
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3e543cb292c7ed0f9d240f8f2473a1db07aff0fd
2023-05-24 17:38:10 +00:00
Mohsin Kazmi
5e42eae58b hash: add hash documentation
Type: docs

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I36764aa3c0e9657d228413aeafa0a54bbd755e49
2023-05-24 14:47:42 +00:00
439 changed files with 24562 additions and 5527 deletions

View File

@ -13,13 +13,16 @@ ForEachMacros:
- 'clib_bitmap_foreach'
- 'pool_foreach'
- 'pool_foreach_index'
- 'pool_foreach_pointer'
- 'vec_foreach'
- 'vec_foreach_backwards'
- 'vec_foreach_index'
- 'vec_foreach_index_backwards'
- 'vec_foreach_pointer'
- 'vlib_foreach_rx_tx'
- 'foreach_vlib_main'
- 'foreach_set_bit_index'
- 'foreach_vlib_frame_bitmap_set_bit_index'
- 'FOREACH_ARRAY_ELT'
- 'RTE_ETH_FOREACH_DEV'

8
.gitignore vendored
View File

@ -16,14 +16,8 @@
/build-root/*.tar.xz
/build-root/*.changes
/build-root/rpmbuild/
/build-root/test-doc/
/build-root/test-cov/
/build-root/test-coverage/
/build-root/test/
/test/run/
/test/build/
/test/coverage/
/test/vapi_test/
/test/doc/build/
/build-config.mk
/build/external/*.tar.gz
/build/external/*.tar.xz

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2310

View File

@ -86,6 +86,10 @@ committers:
company: 'intel'
email: 'roy.fan.zhang@intel.com'
id: 'royzhang1980'
- name: 'Mohammed HAWARI'
company: 'cisco'
email: 'momohawari@gmail.com'
id: 'momohawari'
tsc:
# yamllint disable rule:line-length
approval: 'https://wiki.fd.io/view/TSC/Meeting_Minutes'
@ -96,3 +100,6 @@ tsc:
- type: 'Addition'
name: 'Fan Zhang'
link: 'https://lists.fd.io/g/vpp-dev/message/19068'
- type: 'Approval'
name: 'Mohammed HAWARI'
link: 'https://ircbot.wl.linuxfoundation.org/meetings/fdio-meeting/2023/fd_io_tsc/fdio-meeting-fd_io_tsc.2023-06-01-15.00.html'

View File

@ -428,6 +428,11 @@ Y: src/plugins/flowprobe/FEATURE.yaml
M: Ole Troan <otroan@employees.org>
F: src/plugins/flowprobe/
Plugin - fateshare
I: fateshare
M: Andrew Yourtchenko <ayourtch@gmail.com>
F: src/plugins/fateshare/
Plugin - http_static
I: http_static
M: Dave Barach <vpp@barachs.net>
@ -571,6 +576,11 @@ M: Dave Barach <vpp@barachs.net>
M: Florin Coras <fcoras@cisco.com>
F: src/plugins/unittest/
Plugin - IDPF Device driver
I: idpf
M: Ting Xu <ting.xu@intel.com>
F: src/plugins/idpf/
Plugin - Intel DMA engines
I: dma_intel
M: Marvin Liu <yong.liu@intel.com>
@ -806,6 +816,21 @@ I: prom
M: Florin Coras <fcoras@cisco.com>
F: src/plugins/prom
Plugin - BPF Trace Filter
I: bpf_trace_filter
M: Mohammed Hawari <mohammed@hawari.fr>
F: src/plugins/bpf_trace_filter
Plugin - NPTv6
I: npt66
M: Ole Troan <otroan@employees.org>
F: src/plugins/npt66
Plugin - Trace node
I: tracenode
M: Maxime Peim <mpeim@cisco.com>
F: src/plugins/tracenode
cJSON
I: cjson
M: Ole Troan <ot@cisco.com>

View File

@ -40,6 +40,7 @@ unix { \
$(if $(wildcard startup.vpp),"exec startup.vpp",) \
} \
$(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
$(if $(EXTRA_VPP_CONFIG), "$(EXTRA_VPP_CONFIG)",) \
$(call disable_plugins,$(DISABLED_PLUGINS)) \
"
@ -54,7 +55,7 @@ OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"
OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
endif
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
PKG=deb
else ifeq ($(filter rhel centos fedora opensuse-leap rocky,$(OS_ID)),$(OS_ID))
PKG=rpm
@ -65,10 +66,10 @@ endif
DEB_DEPENDS = curl build-essential autoconf automake ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-python
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += lcov chrpath autoconf libnuma-dev
DEB_DEPENDS += gcovr lcov chrpath autoconf libnuma-dev
DEB_DEPENDS += python3-all python3-setuptools check
DEB_DEPENDS += libffi-dev python3-ply
DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml
DEB_DEPENDS += cmake ninja-build python3-jsonschema python3-yaml
DEB_DEPENDS += python3-venv # ensurepip
DEB_DEPENDS += python3-dev python3-pip
DEB_DEPENDS += libnl-3-dev libnl-route-3-dev libmnl-dev
@ -79,6 +80,7 @@ DEB_DEPENDS += libelf-dev libpcap-dev # for libxdp (af_xdp)
DEB_DEPENDS += iperf3 # for 'make test TEST=vcl'
DEB_DEPENDS += nasm
DEB_DEPENDS += iperf ethtool # for 'make test TEST=vm_vpp_interfaces'
DEB_DEPENDS += libpcap-dev
LIBFFI=libffi6 # works on all but 20.04 and debian-testing
@ -117,7 +119,6 @@ RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check check-devel
RPM_DEPENDS += selinux-policy selinux-policy-devel
RPM_DEPENDS += ninja-build
RPM_DEPENDS += libuuid-devel
RPM_DEPENDS += ccache
RPM_DEPENDS += xmlto
RPM_DEPENDS += elfutils-libelf-devel libpcap-devel
@ -175,7 +176,8 @@ RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python3-ply
RPM_SUSE_DEVEL_DEPS = glibc-devel-static libnuma-devel libelf-devel
RPM_SUSE_DEVEL_DEPS += libopenssl-devel libuuid-devel lsb-release
RPM_SUSE_DEVEL_DEPS += libopenssl-devel lsb-release
RPM_SUSE_DEVEL_DEPS += libpcap-devel llvm-devel
RPM_SUSE_DEVEL_DEPS += curl libstdc++-devel bison gcc-c++ zlib-devel
RPM_SUSE_PYTHON_DEPS = python3-devel python3-pip python3-rpm-macros
@ -290,7 +292,7 @@ $(BR)/.deps.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)
make install-dep
endif
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
if [ -n "$$MISSING" ] ; then \
echo "\nPlease install missing packages: \n$$MISSING\n" ; \
@ -318,7 +320,7 @@ bootstrap:
.PHONY: install-dep
install-dep:
ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
@sudo -E apt-get update
@sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@ -426,13 +428,14 @@ rebuild-release: wipe-release build-release
export TEST_DIR ?= $(WS_ROOT)/test
define test
$(if $(filter-out $(2),retest),make -C $(BR) PLATFORM=vpp TAG=$(1) vpp-install,)
$(if $(filter-out $(2),retest),make -C $(BR) PLATFORM=vpp TAG=$(1) CC=$(CC) vpp-install,)
$(eval libs:=lib lib64)
make -C test \
VPP_BUILD_DIR=$(BR)/build-$(1)-native/vpp \
VPP_BIN=$(BR)/install-$(1)-native/vpp/bin/vpp \
VPP_INSTALL_PATH=$(BR)/install-$(1)-native/ \
EXTENDED_TESTS=$(EXTENDED_TESTS) \
TEST_GCOV=$(TEST_GCOV) \
PYTHON=$(PYTHON) \
OS_ID=$(OS_ID) \
RND_SEED=$(RND_SEED) \
@ -449,10 +452,28 @@ test:
test-debug:
$(call test,vpp_debug,test)
.PHONY: test-gcov
test-gcov:
.PHONY: test-cov
test-cov:
$(eval CC=gcc)
$(eval TEST_GCOV=1)
$(call test,vpp_gcov,cov)
.PHONY: test-cov-build
test-cov-build:
$(eval CC=gcc)
$(eval TEST_GCOV=1)
$(call test,vpp_gcov,test)
.PHONY: test-cov-prep
test-cov-prep:
$(eval CC=gcc)
$(call test,vpp_gcov,cov-prep)
.PHONY: test-cov-post
test-cov-post:
$(eval CC=gcc)
$(call test,vpp_gcov,cov-post)
.PHONY: test-all
test-all:
$(eval EXTENDED_TESTS=1)
@ -463,6 +484,13 @@ test-all-debug:
$(eval EXTENDED_TESTS=1)
$(call test,vpp_debug,test)
.PHONY: test-all-cov
test-all-cov:
$(eval CC=gcc)
$(eval TEST_GCOV=1)
$(eval EXTENDED_TESTS=1)
$(call test,vpp_gcov,test)
.PHONY: papi-wipe
papi-wipe: test-wipe-papi
$(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
@ -487,8 +515,10 @@ test-shell:
test-shell-debug:
$(call test,vpp_debug,shell)
.PHONY: test-shell-gcov
test-shell-gcov:
.PHONY: test-shell-cov
test-shell-cov:
$(eval CC=gcc)
$(eval TEST_GCOV=1)
$(call test,vpp_gcov,shell)
.PHONY: test-dep
@ -505,13 +535,9 @@ test-wipe-doc:
@echo "make test-wipe-doc is DEPRECATED"
sleep 300
.PHONY: test-cov
test-cov:
$(eval EXTENDED_TESTS=1)
$(call test,vpp_gcov,cov)
.PHONY: test-wipe-cov
test-wipe-cov:
$(call make,$(PLATFORM)_gcov,$(addsuffix -wipe,$(TARGETS)))
@make -C test wipe-cov
.PHONY: test-wipe-all

View File

@ -1,3 +1,2 @@
rdma=41.0 dpdk=22.07
rdma=43.0 dpdk=22.11.1
rdma=45.0 dpdk=23.03
rdma=46.1 dpdk=23.07

View File

@ -19,9 +19,10 @@ DPDK_FAILSAFE_PMD ?= n
DPDK_MACHINE ?= default
DPDK_MLX_IBV_LINK ?= static
dpdk_version ?= 23.03
dpdk_version ?= 23.07
dpdk_base_url ?= http://fast.dpdk.org/rel
dpdk_tarball := dpdk-$(dpdk_version).tar.xz
dpdk_tarball_md5sum_23.07 := 2b6d57f077585cb15b885482362fd47f
dpdk_tarball_md5sum_23.03 := 3cf8ebbcd412d5726db230f2eeb90cc9
dpdk_tarball_md5sum_22.11.1 := 0594708fe42ce186a55b0235c6e20cfe
dpdk_tarball_md5sum_22.07 := fb73b58b80b1349cd05fe9cf6984afd4
@ -181,8 +182,8 @@ define dpdk_config_cmds
mkdir -p ../dpdk-meson-venv && \
python3 -m venv ../dpdk-meson-venv && \
source ../dpdk-meson-venv/bin/activate && \
(if ! ls $(PIP_DOWNLOAD_DIR)meson* ; then pip3 download -d $(PIP_DOWNLOAD_DIR) -f $(DL_CACHE_DIR) meson==0.55 setuptools wheel pyelftools; fi) && \
pip3 install --no-index --find-links=$(PIP_DOWNLOAD_DIR) meson==0.55 pyelftools && \
(if ! ls $(PIP_DOWNLOAD_DIR)meson* ; then pip3 download -d $(PIP_DOWNLOAD_DIR) -f $(DL_CACHE_DIR) meson==0.55.3 setuptools wheel pyelftools; fi) && \
pip3 install --no-index --find-links=$(PIP_DOWNLOAD_DIR) meson==0.55.3 pyelftools && \
PKG_CONFIG_PATH=$(dpdk_install_dir)/lib/pkgconfig meson setup $(dpdk_src_dir) \
$(dpdk_build_dir) \
$(DPDK_MESON_ARGS) \

View File

@ -23,12 +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 := 45.0
rdma-core_version := 46.1
rdma-core_tarball := rdma-core-$(rdma-core_version).tar.gz
rdma-core_tarball_md5sum_39.1 := 63ba4632fd01173a2331e5b990373330
rdma-core_tarball_md5sum_41.0 := 2250389cb61a7130133e6411fdeef2f9
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 := $(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

@ -1,49 +1,2 @@
Building VPP Documents
These instructions show how the VPP documentation sources are built.
To build your files, you can either Create a Virtual Environment using
virtualenv, which installs all the required applications for you.
Create a Virtual Environment using virtualenv
============================
For more information on how to use the Python virtual environment check
out https://packaging.python.org/guides/installing-using-pip-and-virtualenv
Get the Documents
------------------------------
For example start with a clone of the vpp.
$ git clone https://gerrit.fd.io/r/vpp
$ cd vpp
Install the virtual environment
----------------------------------------------
$ python -m pip install --user virtualenv
$ python -m virtualenv env
$ source env/bin/activate
$ pip install -r docs/etc/requirements.txt
$ cd docs
Which installs all the required applications into it's own, isolated,
virtual environment, so as to not interfere with other builds that may
use different versions of software.
Build the html files
----------------------------
Be sure you are in your vpp/docs directory, since that is where Sphinx will
look for your conf.py file, and build the documents into an index.html file
$ make html
View the results
------------------------
If there are no errors during the build process, you should now have an
index.html file in your vpp/docs/_build/html directory, which you can
then view in your browser.
If you want to build a VPP documentation source, please refer to the VPP user documentation:
https://fd.io/docs/vpp/master/contributing/writingdocs.html

View File

@ -251,7 +251,6 @@ class Siphon(object):
output."""
def process(self, out=None):
if out is None:
out = sys.stdout

View File

@ -19,7 +19,6 @@ import os
class SiphonCLICMD(process.Siphon):
name = "clicmd"
identifier = "VLIB_CLI_COMMAND"

View File

@ -18,7 +18,6 @@ from . import process, parsers
class SiphonSYSCFG(process.Siphon):
name = "syscfg"
identifier = "VLIB_CONFIG_FUNCTION"

View File

@ -6,6 +6,8 @@ Release notes
.. toctree::
:maxdepth: 2
v23.10
v23.06
v23.02
v22.10.1
v22.10

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -69,7 +69,7 @@ master_doc = "index"
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "English"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.

View File

@ -33,7 +33,7 @@ Delete all the generated files with the following:
View the results
----------------
If there are no errors during the build process, you should now have an ``index.html`` file in your ``vpp/docs/_build/html`` directory, which you can then view in your browser.
If there are no errors during the build process, you should now have an ``index.html`` file in your ``vpp/build-root/docs/html`` directory, which you can then view in your browser.
Whenever you make changes to your ``.rst`` files that you want to see, repeat this build process.

View File

@ -116,6 +116,22 @@ To get the VPP sources that are used to create the build, run the following comm
$ git clone https://gerrit.fd.io/r/vpp
$ cd vpp
As VPP version is derived from git description (which is based on git tags),
if the github generated tarballs are used, the version information
will be missing from the version file (.../src/scripts/.version)
which is required by the version script when building
in a non-git based workspace or the build will fail.
In that case, put the desired version string into
.../src/scripts/.version to satisfy the requirements of the version script.
Alternatively, the ``make dist`` command in a cloned git workspace
will generate an xz compressed tarball of the source
including the .../src/scripts/.version file containing the git hash
using the standard nomenclature for VPP images.
Extract the tarball using the -J option to decompress it using xz. For example,
``tar xvJf ./build-root/vpp-23.10-rc0~184-g48cd559fb.tar.xz``
Build VPP Dependencies
--------------------------------------
@ -255,7 +271,7 @@ Once the packages are built they can be found in the build-root directory.
.. code-block:: console
$ ls *.deb
$ ls build-root/*.deb
If the packages are built correctly, then this should be the corresponding output:
@ -271,12 +287,10 @@ For Ubuntu:
.. code-block:: console
$ sudo bash
# dpkg -i *.deb
$ sudo dpkg -i build-root/*.deb
For Centos or Redhat:
.. code-block:: console
$ sudo bash
# rpm -ivh *.rpm
$ sudo rpm -ivh build-root/*.rpm

View File

@ -0,0 +1,45 @@
.. _lcov_code_coverage:
Code coverage with lcov
=======================
Prerequisites
-------------
Ensure required packages are installed:
::
$ make install-deps
The Linux gcov and lcov tools can be fussy about gcc / g++ compiler
versions. As of this writing, Ubuntu 22.04 gcov / lcov works with
the latest gcc version (``11.3.0``).
Generate coverage for a test case
---------------------------------
As a first run, in order to generate the coverage report of
a specific plugin or test, run for example
::
$ make test-cov TEST=fib
Then open the file ``.build-root/test-coverage/html/index.html`` in a Chrome browser.
Improving test coverage
-----------------------
When doing modifications on the test cases, you can run
::
# This will run the test & report the result in the coverage data
$ make test-cov-build TEST=fib
# This will generate the html report with the current coverage data
$ make test-cov-post
# To reset the coverage data use
$ make test-cov-prep

View File

@ -12,3 +12,4 @@ Build, Run & Debug
testing_vpp
gdb_examples
cross_compile_macos
code_coverage

View File

@ -0,0 +1 @@
../../../src/vnet/hash/hash.rst

View File

@ -23,3 +23,4 @@ Core Features
stats
selinux_doc
policer
hash

View File

@ -7,7 +7,6 @@ VPP extra tools
.. toctree::
:maxdepth: 2
lcov
snap
strongswan
vpp_config

View File

@ -1 +0,0 @@
../../../extras/lcov/README.rst

View File

@ -0,0 +1 @@
../../../src/plugins/bpf_trace_filter/bpf_trace_filter.rst

View File

@ -41,3 +41,4 @@ For more on plugins please refer to :ref:`add_plugin`.
acl_lookup_context
bufmon_doc
ip_session_redirect_doc
bpf_trace_filter

View File

@ -14,8 +14,11 @@ AddressSanitizer
`AddressSanitizer <https://github.com/google/sanitizers/wiki/AddressSanitizer>`_ (aka ASan) is a memory
error detector for C/C++. Think Valgrind but much faster.
In order to use it, VPP must be recompiled with ASan support. It is implemented as a cmake
build option, so all VPP targets should be supported. For example:
In order to use it, VPP must be recompiled with ASan support.
See developer documentation on prerequisites for :ref:`building VPP <building>`.
ASan support is implemented as a cmake build option,
so all VPP targets should be supported. For example:
.. code-block:: console

View File

@ -102,6 +102,7 @@ bms
Bn
boolean
bootup
bpf
Brockners
bsid
bss
@ -189,6 +190,7 @@ CPPFLAGS
cpu
cPython
crc
crcchecker
crcs
crit
criterias
@ -345,6 +347,7 @@ extranet
Extranets
failover
fallback
fateshare
favour
favoured
favours
@ -397,7 +400,6 @@ Gerrit
gethostbyname
gettingsources
gettingstarted
ggcov
gid
Gigabit
GigE
@ -409,6 +411,7 @@ Golang
Goncalves
govpp
gpe
graphviz
gre
grep
grepping
@ -467,6 +470,8 @@ IBverbs
iccrg
icmp
icmpr
idpf
Idpf
ietf
iface
ifndef
@ -746,6 +751,7 @@ netmap
Netmap
netplan
Netplan
newfile
nexthop
nginx
NIC
@ -757,6 +763,8 @@ nodaemon
noevaluate
nonaddress
nosyslog
npt
npt66
ns
nsess
nsh
@ -778,6 +786,7 @@ oddbuf
Oddbuf
offline
ofr
oldfile
online
onlink
ooo
@ -800,6 +809,7 @@ params
parsable
passthrough
passwordless
patchset
pathname
pbb
pcap
@ -992,6 +1002,7 @@ seg
segfault
selinux
semodule
semver
setjmp
settingupenvironment
setUp
@ -1138,6 +1149,8 @@ tpv
TPv
tracedump
Tracedump
tracenode
Tracenode
TRex
Tsou
ttl
@ -1339,6 +1352,7 @@ XXhash
xxx
XXX
xyz
xz
yaml
Yaml
YYMM

View File

@ -1099,7 +1099,7 @@ class TestGBP(VppTestCase):
# adj-fibs due to the fact the the BVI address has /32 and
# the subnet is not attached.
#
for (ip, fip) in zip(ep.ips, ep.fips):
for ip, fip in zip(ep.ips, ep.fips):
# Add static mappings for each EP from the 10/8 to 11/8 network
if ip_address(ip).version == 4:
flags = self.nat_config_flags.NAT_IS_ADDR_ONLY

Some files were not shown because too many files have changed in this diff Show More