summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-07-28session: regrab evt llist elt for app transports txFlorin Coras1-0/+6
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-28vnet: add vnet_register_device_class functionDamjan Marion2-21/+25
To allow dynamic registration of device classes..." Change-Id: Ie8435e8c55b7e300be06abe97b653c0c3ce7f732 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-28vlib: pci cleanup and improvementsDamjan Marion7-486/+531
Change-Id: Ieafbed6f2db3dec65e4b43d84a4661f6a1bbe891 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-28vlib: fix coverity issue in vlib_node_set_interrupt_pendingDamjan Marion1-2/+5
Type: fix Fixes: cc8249c Change-Id: Iebfbbd1e00782c4097cc840460b5177d18921131 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-27hsa: add total bytes parameter to vcl_test_clientFilip Tehlar1-1/+17
Type: test Change-Id: Ib1131eedb8eeaa9adfed9cfc47beeb1c7c8adb5c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-27session: remove unused codeFilip Tehlar1-17/+0
Type: improvement Change-Id: I7525aa81acf073707550b23541fdcc358b9bf49c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-27ipsec: fix sa bind cliMaxime Peim1-1/+1
Small mistake was made, reported by coverty scan. Type: fix Change-Id: I98ca16c0275a94b2def99831f9353d4ff3fe93a9 Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-27ikev2: cleanup stuck sessionsDenys Haryachyy3-23/+45
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-26vcl: allow rx of zero length dgramsFlorin Coras1-1/+2
Type: fix Change-Id: I438ef488357456e9415e51a17355e9eba8518808 Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-07-26vlib: rename vnet_log_get_class_dataVratko Polak2-3/+3
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-26stats: remove extra format lineSteven Luong1-2/+1
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-26session: use session error type instead of vnet errorFilip Tehlar14-92/+117
Type: improvement Change-Id: Ie0bad9e03ac2e29da23af01ee7f63cb44489ad9c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-25vlib: interrupt mode support for pre-input nodesDamjan Marion6-17/+53
Type: improvement Change-Id: Ic6e60597d2be63e3a0ae4399a81dbbd72392f30d Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-25classify: add bpf support to pcap classifierMaxime Peim9-5/+128
Type: feature Change-Id: I28fb38e49c89f4c4d4cc58c1a5c0aa8502678472 Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-07-25dpdk: fix signed single bit fieldTianyu Li1-8/+8
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-21vcl: ldp support SO_ORIGINAL_DSTqinyang14-12/+167
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-21ipsec: fix logic in ext_hdr_is_pre_espPiotr Bronowski1-3/+3
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-19vcl: zero out cmsg for recvmsg APISteven Luong1-0/+1
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-17docs: add api change process from wikiDave Wallace1-0/+193
- 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-14ipip: populate mode in tunnel detailsMatthew Smith1-2/+19
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-13hsa: fix echo client initFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb2d1e6e0949844a70c81b218ca7dc83690776ca
2023-07-13lb: Fix src_ip_sticky evaluation bug in per-port-vip case.Nobuhiro MIKI3-469/+74
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-12linux-cp: fix crash on processing dump of routesAlexander Chernavin1-3/+10
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-11avf: remove barrierDamjan Marion2-2/+1
Type: improvement Change-Id: I95023d2e6034b77952e0423d0430b433ea0dab15 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-11linux-cp: Basic MPLS support.Adrian Pistol5-11/+419
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-07stats: fix duplicate /if/names entrySteven Luong1-3/+7
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-07api: fix signed single bit fieldTianyu Li1-5/+5
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-06api: lcp - Mark old message versions as deprecatedOndrej Fabry1-2/+6
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-06api: ip - Mark old message versions as deprecatedOndrej Fabry1-0/+5
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-06api: memif - Mark old message versions as deprecatedOndrej Fabry1-0/+6
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-06api: memclnt - Mark old message versions as deprecatedOndrej Fabry1-0/+4
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-06api: pg - Mark old message versions as deprecatedOndrej Fabry1-0/+4
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-06api: sr - Mark old message versions as deprecatedOndrej Fabry1-0/+2
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-06api: ipsec - Mark old message versions as deprecatedOndrej Fabry1-0/+12
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-06dpdk-cryptodev: introduce sw_ring to the crypto op data pathPiotr Bronowski2-124/+235
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-06-30bpf_trace_filter: plugin for BPF Trace FilteringMohammed Hawari10-0/+396
Change-Id: I342de0a375b783725aa2b621c1c70bc8bf646450 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2023-06-30vlib: introduce trace filter functionsMohammed Hawari7-18/+292
Change-Id: I7a988fafe98599e4fcf7cdaa307a69b9d76650f0 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
2023-06-29dpdk-cryptodev: sync mbuf length with corresponding vlib bufferPiotr Bronowski1-12/+21
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-29ip-neighbor: add api for getting neighbor db configAlexander Chernavin4-1/+74
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-27session udp: add len check for tx dgramsFlorin Coras3-2/+22
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35391fb8c39defbe0e57a241a357c3c98e8cef54
2023-06-27api: af_packet - Mark old message versions as deprecatedOndrej Fabry1-0/+8
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-27api: tapv2 - Mark old message versions as deprecatedOndrej Fabry1-0/+4
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-27api: vxlan - Mark old message versions as deprecatedOndrej Fabry1-0/+12
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-27af_xdp: create_api_v3 without namespace keywordStanislav Zaikin3-0/+132
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-27virtio: use fast-path for ethernet-input if possibleStanislav Zaikin1-1/+26
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-26udp: pass cless hdr to transport through bufferFlorin Coras3-39/+60
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I7177ada23e5a69ec8e362ec98b98010c3b44b3d7
2023-06-25tcp: avoid initializing counters multiple timesFlorin Coras2-2/+10
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia98dae5fdde16426d5457742aff0a1b04db4d034
2023-06-23ipsec: manually binding an SA to a workerMaxime Peim6-6/+272
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-23fib: walk over adj glean per tableStanislav Zaikin1-24/+33
Type: fix Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com> Change-Id: I07f54bb643c24b1839a2d0e93acc593d13a43fed
2023-06-22tcp: add simple stats collectorFlorin Coras2-0/+51
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I435ff10fa3af15b0bed83607aca508a1c087a159