summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-08-16tests docs: update python3 venv packagesDave Wallace10-15/+4
- 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-16l2:Add doc for l2 rewrite, and add examplesyanlong1-18/+46
Supplemented the documentation of "l2 rewrite", and added examples Type:docs Change-Id: If49ae0b22989b3cd1c88a27a4e51b74be32d75e7 Signed-off-by: yanlong <dyl_wlc@163.com>
2023-08-16nat: mark several messages as productionAndrew Yourtchenko1-4/+0
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-15vcl: fix ldp epoll events array overrunFlorin Coras1-1/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3dd65946c220f958a4fda0551b053d690bf06c39
2023-08-15vcl: handle postponed disconnects with selectFlorin Coras1-5/+36
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia8449344a471129c0d148b39d97a5d310c2a1fc7
2023-08-15vcl: fix error state switch for vcl_handle_mq_eventwanghanlin1-2/+18
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-11session: fix coverity warningsFlorin Coras2-41/+25
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I910c8ce1713c6d346cc5ea4eb58a89c1c30a10a1
2023-08-10crypto-sw-scheduler: avoid crypto work on vpp_mainVratko Polak1-16/+18
+ Checkstyle demanded indentation edits. Type: fix Ticket: VPP-2083 Fixes: 9a9604b09f15691d7c4ddf29afd99a31e7e31eed Change-Id: Ie2d33d290330247d36435a073675b732bb64ae93 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-08-09session: async rx event notificationsFlorin Coras23-629/+949
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-09cnat: remove rwlock on tsNathan Skrzypczak7-61/+133
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-09cnat: add ip/client bihashNathan Skrzypczak4-52/+68
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-08cnat: flag to disable rsessionNathan Skrzypczak10-31/+54
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-08ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMACBenoît Ganne13-24/+3161
Type: improvement Change-Id: I830f7a2ea3ac0aff5185698b9fa7a278c45116b0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-08-08vcl: Fix the ldp init checkGao Feng1-1/+5
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-07vlib: support sibling node creation with vlib_register_node()Damjan Marion1-20/+54
Type: improvement Change-Id: I7e82a262692b2b6513f81889d78a43c10ca7bfb2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07vppinfra: add clib_file_get_resolved_basenameDamjan Marion8-46/+42
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-07vppinfra: add vec_foreach_pointer macroDamjan Marion1-0/+4
works with vectors of pointers... Type: improvement Change-Id: I530653978fcf981be299cf42a1133be000d74d0c Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-07vppinfra: add unformat_init_pathDamjan Marion4-49/+83
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-07vcl: fix error state switch for VCL_STATE_LISTEN_NO_MQ sessionswanghanlin1-3/+4
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-07cnat: Support offloaded check sumsNathan Skrzypczak4-215/+155
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-04nsh: fix nsh gre referencesBenoît Ganne1-10/+14
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-04vpp: detect early nosyslog and interactive flagsDamjan Marion1-0/+4
So error logs are displayed on console earlier.... Type: improvement Change-Id: If31b76c9d06254b0fec5b5b3f4e92a881b4cf786 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-02vppinfra: add pool_foreach_pointer()Damjan Marion1-0/+7
Works on pools of pointers... Type: improvement Change-Id: I194dec389ca4c5ec2ce3361b54a9968c9caecefc Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-08-02quic: fix closing of streamsFlorin Coras1-3/+1
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-02vlib: remove dependency on libuuidDamjan Marion2-30/+55
Type: improvement Change-Id: I4e2b2e4f227dfcb3df36166db13c8aa5c0b603f5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-31vppinfra: add unformat_c_string_arrayDamjan Marion2-0/+27
Type: improvement Change-Id: Iea5ecca5d4cbc6c7aea69104830afcfe78c708ee Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-07-31ipsec: fix IPv6 IPsec tunnel puntingSylvain Cadilhac1-0/+1
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-28vlib: fix gcc build breakageDave Wallace1-1/+3
Type: fix Fixes: 00ea98ad6 Change-Id: I4ac8c9c5902299d5f283ba4912d52d9bfcedef5c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
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>