summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10vcl: fix iperf3 server crash issue when it runs over vpp host stack.Liangxing Wang1-1/+8
Issue: Let iperf3 server run via ldp and vcl on top of vpp's host stack. If iperf3 client connects this iperf3 server with tcp MSS setting option, iperf3 server will always crash. Root cause: When MSS option is specified by iperf3 client, iperf3 server will recreate the listening socket firstly, then call setsockopt() to set MSS immediately. Iperf3 code can be referred here: https://github.com/esnet/iperf/blob/58332f8154e2140e40a6e0ea060a418138291718/src/iperf_tcp.c#L186. However, in vcl layer vpp_evt_q of this recreated session is not allocated yet. So iperf3 server crashes with vpp_evt_q null pointer access. Fix: Add session vpp_evt_q null pointer check in vcl_session_transport_attr(). Add a vcl test case for this MSS option scenario. Type: fix Signed-off-by: Liangxing Wang <liangxing.wang@arm.com> Change-Id: I2863bd0cffbe6e60108ab333f97c00530c006ba7
2022-06-10vppinfra: fix bihash_8_16 entry format functionBenoît Ganne1-2/+1
Type: fix Change-Id: I1e8655baaf09b455f7f0052452402a372f738d0f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-06-10hsa: allow first segments larger than 4g for proxyFlorin Coras2-14/+5
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9c502a491ff56806a2e631f7a4c18903a2e93ab2
2022-06-10ip: improve ip ACL tracesBenoît Ganne3-10/+26
Type: improvement Change-Id: I85c73cb940d81d0b249eda0d57de135bcd798418 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-06-09vppinfra: missing __clib_export for clib_pmalloc_alloc_alignedDamjan Marion1-2/+2
Type: improvement Change-Id: I7489327d8b9c5f69b4ceb2159456f00f8a3612df Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-06-08udp: add cli to dump registered portsBenoît Ganne1-0/+93
Type: improvement Change-Id: Ic949e3136a7cf27011d098a50e91920f83226ea9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-06-08wireguard: increment interface RX countersMatthew Smith1-0/+15
Type: improvement When packets were received and processed successfully, increment the byte/packet counters for the tunnel interface. Change-Id: I42855607ac6916de641be42aac86c9942cc97140 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2022-06-07classify: fix sesssion details apiNathan Skrzypczak1-1/+1
We were not allocating space for the variable length payload in the response message. Type: fix Change-Id: I345102f4555f66c5632ab0882ca1dd178e98eb7b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-06-07vlib: fix crash on packet on deleted interfacePim van Pelt1-3/+6
If ip4_neighbor_probe (or any other) is sending packet to a deleted interface, ASSERT trips and dataplane crashes. Example: create loopback interface instance 0 set interface ip address loop0 10.0.0.1/32 set interface state GigabitEthernet3/0/1 up set interface state loop0 up set interface state loop0 down set interface ip address del loop0 10.0.0.1/32 delete loopback interface intfc loop0 set interface state GigabitEthernet3/0/1 down set interface state GigabitEthernet3/0/1 up comment { the following crashes VPP } set interface state GigabitEthernet3/0/1 down This sequence reliably crashes VPP: (gdb)p n->name $4 = (u8 *) 0x7fff82b47578 "interface-3-output-deleted” If the interface doesn't exist, return ~0 and be tolerant of this in the two call sites of counter_index() Type: fix Signed-off-by: Pim van Pelt <pim@ipng.nl> Change-Id: I90ec58fc0d14b20c9822703fe914f2ce89acb18d
2022-06-07sr: SRv6 TEF behavior supportAhmed Abdelsalam3-3/+87
Adding support for the SRv6 TEF (Timestamp, Encapsulation and Forward) behavior defined in draft-filsfils-spring-path-tracing (https://datatracker.ietf.org/doc/draft-filsfils-spring-path-tracing/). Type: feature Change-Id: I7f38b593147daf8d27af9c983448cf82947e5bed Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2022-06-05wireguard: fix crash by not sending arp via wg interfaceAlexander Chernavin2-1/+9
Type: fix Currently, neighbor adjacencies on a wg interface are converted into a midchain only if one of the peers has a matching allowed prefix configured. If create a route that goes through a wg interface but the next-hop address does not match any allowed prefixes, an ARP/ND request will try to be sent via the wg interface to resolve the next-hop address when matching traffic occurs. And sending an ARP request will cause VPP to crash while copying hardware address of the wg interface which is NULL. Sending an ND message will not cause VPP to crash but the error logged will be unclear (no source address). With this fix, convert all neighbor adjacencies on a wg interface into a midchain and update tests to cover the case. If there is no matching allowed prefix configured, traffic going such routes will be dropped because of "Peer error". No changes if there is matching allowed prefix configured. Also, fix getting peer by adjacency index. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I15bc1e1f83de719e97edf3f7210a5359a35bddbd
2022-06-03hsa: dealloc proxy fifos on right threadFlorin Coras2-1/+46
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia66c12e1da126d0d8d101b645e6dc8454c3826d6
2022-06-03hsa: refactor proxy session lookup and cleanupFlorin Coras2-103/+52
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic68627bbca676cc78b0be05bc1fa0f386f5d27fa
2022-06-03session: fix double free in CLIFilip Tehlar1-7/+2
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I646ac946d0b07929dfdd1966a4f4a3b697768040
2022-06-02ipfix-export: Fix frame leak in flow_report_process_send()Jon Loeliger1-1/+9
The flow_report_process_send() function always allocates a frame. However, when no template_send is needed, template_bi is ~0. When this happens, no vectors are placed in the frame. When the frame is then "put", a check for n_vectors == 0 prevents the frame from actually being placed back on the free list. Fix that by using a direct call to vlib_frame_free() when there are no frame vctors. Type: fix Signed-off-by: Jon Loeliger <jdl@netgate.com> Change-Id: I936b5cea4cb3c358247c3d2e1a77d034a322ea76
2022-06-01session: make sure fifos are freed on right threadFlorin Coras1-0/+4
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3c573641bd95fe899823b66f6c59a2525a18d293
2022-06-01stats: swap used and total statsLeland Krych1-2/+2
Type: fix reported stats seem to have mixed up used and total counters Signed-off-by: Leland Krych <leland.krych@gmail.com> Change-Id: I221c7b114c0da2ed53171d7f047a4bda07ee6cb2
2022-06-01papi: vpp_serializer.py - replace slow bytes() with fast bytearray()Viktor Velichkin1-8/+8
https://docs.python.org/3/library/stdtypes.html "if concatenating bytes objects, you can similarly use bytes.join() or io.BytesIO, or you can do in-place concatenation with a bytearray object. bytearray objects are mutable and have an efficient overallocation mechanism" Type: improvement Signed-off-by: Viktor Velichkin <avisom@yandex.ru> Change-Id: Id20d337f909cce83fcd9e08e8049bb0bf5970fbc
2022-06-01vlib: add VLIB_NUM_WORKERS_CHANGE_FN() handlerDamjan Marion4-10/+15
Allows features to update their data structures after change in number of worker threads. Type: improvement Change-Id: Icd4d197e28608f5bbb1edd13eb624cd98e33cafe Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-06-01ip: unformat_ip_address should no modify its argument on failureBenoît Ganne2-16/+18
When failing to match an ip address, we should not reset the ip address that could have been initialized by a previous match. Type: fix Change-Id: I026766391eb3eb8230f75f66bf4b681e774741d9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-05-31nat: disable nat44-ei-in2out-output ttl checkAlexander Skorichenko1-3/+3
Type: fix A packet passing through nat44-ei-in2out-output, has its ttl value validated in earlier nodes. "ip4-input" node checks ttl for locally generated packets. "ip4-rewrite" node validates ttl in forwarded packets. Thus for example, the ED counterpart disables ttl checks in its "nat44-ed-in2out-output" node. This patch updates nat44 EI conditions for ttl checks to those currently used in nat44 ED case, meaning no extra ttl validation for in2out when output-feature is enabled. Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com> Change-Id: Idd15d7c9a746b60c0a6dac5537d00ef10c257fdc
2022-05-30vppapigen: fix make go-api for go1.18Nathan Skrzypczak1-58/+71
This patch updates the go-api-files logic for supporting go1.18. Notable changes are that `go get ...` changed to `go install` and that we need to bump the govpp binapigen version to integrate a go1.18 fix. This patch also simplifies the cli execution syntax Type: fix Change-Id: I1d8aac65490fe3ea4c1965a4775b6bf8d5c05d26 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-05-27ip: reassembly - Fixing buffer leaks, corruption in v6 reasmVijayabhaskar Katamreddy2-42/+117
Type: fix *Buffer leaks and corruptions during internal errors, either overriding or missing to add the buffer to the list Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I1ead1eca1cde10a36d60dbfcfe36ca6375690b03
2022-05-26ip: reassembly - pacing reassembly timeouts for v6Vijayabhaskar Katamreddy1-9/+35
Type: fix Pace the main thread activity for reassembly timeouts, to avoid barrier syncs Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: Iebe9a38d2a7a6471afa6621f12bb545668dc8384
2022-05-25docs: update spelling word list and fix typosDave Wallace1-5/+5
- update wordlist and fix typos so that 'make docs-spell' passes - sort spelling_wordlist.txt - update docs maintainers list Type: docs Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I38ac7850c604c323427d2bb6877ea98bd10bcc38
2022-05-24devices: add af-packet v3 apiMohsin Kazmi2-0/+114
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I4679acbe4fd4400d57c0a79b0a6c74c8f1639703
2022-05-24flow: support generic flow and RSS action in vapiTing Xu4-3/+232
Add generic flow type and rss action type to vapi. It is to support creating generic flow rule via vapi. Type: feature Signed-off-by: Ting Xu <ting.xu@intel.com> Change-Id: Ifeaa007679487e02bd2903dc591d80a1caba33bc
2022-05-24vppinfra: fix memory traceLeung Lai Yung1-0/+5
Type: fix reset the memory trace if mem trace is turned on Signed-off-by: Leung Lai Yung <benkerbuild@gmail.com> Change-Id: Ib99355b9ed42ff66c720bbea5cbbf03c65820d12
2022-05-24vlib: implement aux data handoffMohammed Hawari7-19/+128
Type: improvement Change-Id: I20b41537a249a55f01004e45392b34adaa8fd792 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2022-05-24api: start enum values from 0Filip Varga1-1/+1
C enum values by default start from 0. All unassigned names should get value as value of previous name plus one. The problem was that default value was 0 and adding one for the first value would make generated api files start from 1 instead of 0. Type: fix Change-Id: I772d6411435648de3ec514f57025ef1acae87338 Signed-off-by: Filip Varga <fivarga@cisco.com>
2022-05-23dpdk: fix update link stateAlexander Skorichenko1-18/+13
Type: fix Correct vnet_hw_interface_t flags update on link state changes. Currently incomplete set of flags is applied on each change, only flags related to the most recent change are being set correct. E.g. setting the link up would erase the duplex part of the flags. Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com> Change-Id: I5b95e1c0eaea0c283b108dbf7f809682ec9064eb
2022-05-23linux-cp: fix display of link_speedAnton Nikolaev1-1/+2
Type: fix Don't set link speed for tap interface when link speed is unknown Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ia97277b3bf7c958fa665e4ead8d0e48f02921e69
2022-05-23ip: reassembly - fixing stepping index in a better wayVijayabhaskar Katamreddy2-18/+13
Type: fix pool_is_free_index() check is performed only for the first element Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: Icadc715a9b54761ec69805a134a69a262137536d
2022-05-23ip: reassembly - adding custom reassembly nodeVijayabhaskar Katamreddy1-13/+75
Type: fix Custom node functionality is missing in v6, so bringing in similar to v4 functionality into ip6 as well Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I28b0be2fc55a00bfc0b456b1caaa1dcf5641a44e
2022-05-20virtio: use the internal hdr offsets of buffer metadata for offloadsMohsin Kazmi2-39/+23
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ie63c360f2e42e9e5799f5c536453823ea95ed3b8
2022-05-19api: refactor api data storageDamjan Marion25-293/+258
single struct to hold all api handler, flags, etc. Provide functions to toggle flags instead of writing directly to internal data. Type: refactor Change-Id: I4730d7290e57489de8eda34a72211527e015b721 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-19ikev2: fix tunnel directionStanislav Zaikin1-4/+4
Type: fix Change-Id: I480b1fcace1c27a5cb2d2956cec80b379105b55d Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com>
2022-05-19 ip: reassembly - pacing reassembly timeoutsVijayabhaskar Katamreddy2-9/+45
Type: fix Pace the main thread activity for reassembly timeouts, to avoid barrier syncs Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: If8c62a05c7d28bfa6ac530c2cd5124834b4e8a70
2022-05-19stats: fix collector updates of symlinksArthur de Kerhor1-3/+9
A node name is not bound to a node index. For example, if an interface is deleted and re-added, the indexes of its nodes "<itfc_name>-tx" and "<itfc_name>-output" may change. Thus, when the collector updates the nodes stats, it should first delete all the symlinks for nodes that have changed their names before adding new symlinks. Otherwise, it could attempt to add already existing symlinks or delete valid ones. Example of a series of command that triggers a crash in the assert `ASSERT (node_data[i].symlinks[j] != CLIB_U32_MAX);`: ``` create loopback interface create loopback interface ``` Wait for the nodes stats to update, then: ``` delete loopback interface intfc loop0 delete loopback interface intfc loop1 create loopback interface create loopback interface ``` Type: fix Change-Id: Ief8e7135e5c02dc6bc64dc94b76cff21ea9ab3a9 Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2022-05-19ip: reassembly - increasing the nbuckets for reassVijayabhaskar Katamreddy2-47/+84
Type: fix Adding stats from debugging point of view Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I3118d3fd5d630fad80a42ab960e30459789123cf
2022-05-18vppinfra: fix non-vector build on x86_64Damjan Marion1-1/+3
Type: fix Fixes: 56f54af Change-Id: Id03185953eb16da3a3276d2f21d64499784bbf17 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-18ip: reassembly - increasing the nbuckets for reassVijayabhaskar Katamreddy2-2/+6
Type: fix as number of reass contexts increasing based on workers, increasing the number of nbuckets for bihash Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: I83d061a709ecb8845ce745b18d03fdefc795787f
2022-05-17interface: fix overflow of link speed.Anton Nikolaev4-8/+13
Type: fix There were several places where mbps were converted to kbps for link_speed, but often drivers of devices set link speed to unknown (0xFFFFFFFF) on initialization, so there was multiplication of link_speed equal 0xFFFFFFFF(UINT32_MAX) by 1000, this provides overflow of unsigned int, and as result link_speed was equal 4295 Gbps, but actually link_speed is unknown. Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ib462ed6ed685654af4687041e115bfb74e640f13
2022-05-16acl: memory leak in acl_fa_session_cleaner_processSteven Luong1-0/+1
The statement pw0->pending_clear_sw_if_index_bitmap = clib_bitmap_dup (pw0->serviced_sw_if_index_bitmap); will cause pw0->pending_clear_sw_if_index_bitmap's previous vector to be gone. Need to free it prior to calling clib_bitmap_dup() Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I20de780e73daea7be17efa0bf660af2592cd4680
2022-05-16flowprobe: add api messages to obtain current stateAlexander Chernavin3-6/+383
Type: improvement With this change: - add dump/details messages to obtain interfaces for which IPFIX flow record generation is enabled; - add get message to obtain parameters; - add a new message to set parameters with validation present and to correspond with get/set naming; - add tests for get/set parameters and dump/details interfaces. Change-Id: I09f6ec990171ac8bcb9d2f5c92629803b8ab6c28 Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2022-05-16ip: format table ids with %uNathan Skrzypczak1-2/+2
Type: fix Change-Id: I69f7e23b23e8cfcfe57ba019862470e0eb4b06db Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2022-05-16vlib: exec cli line-by-line processing and script updatesDamjan Marion56-1153/+1145
Type: improvement Change-Id: I82e7c0acc547794bcc7c42f4b8881a8251bf7a9b Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-14session: revert "fix session cli maybe parse wrong args if executed in files"Damjan Marion3-79/+27
Fixed at infra level. Type: improvement Change-Id: I43cf16870c1d2e12189073f7786d62375c46e2c2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-13vlib: process startup config exec scripts line by lineDamjan Marion4-2/+73
This fixes long standing annoyance that CLIs with optional args cannot be executed from file, as they cannot distinguish between valid optional args and next line in the file. Multiline statements can be provided simply by using backslash before \n. Also comments are supported - everything after # is ignored up to the end of the line. Example: # multiline cli using backslash show version \ verbose # end of line comment packet-generator new { \ name x \ limit 5 \ # comment inside cmultiline cli \ size 128-128 \ interface local0 \ node null-node \ data { \ incrementing 30 \ } \ } Type: fix Change-Id: Ia6d588169bae14e6e3f18effe94820d05ace1dbf Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-13dpdk: fix overflow in mtu arithmeticMohammed Hawari2-2/+2
When the driver's max_rx_pktlen is >= 65536, max_supported_frame_size overflows and queue creation fails. Change-Id: If78707cb698adf8619ec44a852dd05d570917577 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix