aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Collapse)AuthorFilesLines
2021-05-05vlib: fix adaptive mode flag unset on nodes reforkingMaxime Peim1-0/+4
The adaptive mode flag is being unset on nodes reforking. The flag is copied in order to avoid this issue. Old flags are copied for all nodes. Type: fix Signed-off-by: Maxime Peim <mpeim@cisco.com> Change-Id: Ic29b20fc0e4454ce4b3765c478f55bf650b4572a
2021-05-03vlib: multiarch vlib_frame_queue_dequeue()Damjan Marion5-143/+131
Fact that it needs to copy buffer indices justifies this move. Type: improvement Change-Id: I5eb815ccc4cca0ef70b092eb83a49b713efdcbeb Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne2-40/+29
trajectory trace has been broken for a while because we used to save the buffer trajectory in a vector pointed to in opaque2. This does not work well when opaque2 is copied (eg. because of a clone) as 2 buffers end up sharing the same vector. This dedicates a full cacheline in the buffer metadata instead when trajectory is compiled in. No dynamic allocation, no sharing, no tears. Type: refactor Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-30build: declare some CMake variables as advancedDamjan Marion1-2/+2
Type: make Change-Id: I780c1c81a50cb92bc89c05856efd8ef88479c0ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30misc: experimental configure scriptDamjan Marion1-2/+2
Type: make Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30build: switch release build to -O3Damjan Marion1-1/+1
Type: make Change-Id: Ia39c2f847e7b4907fdd3fcac75897b8b4c545a65 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-28vppinfra: AArch64 NEON implementation of clib_compare_u16_x64()Damjan Marion1-1/+1
Type: improvement Change-Id: I1382813211ea20c6204d7a3b6e6d470aa51aed69 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-28pg: exec file fixesmdr781-1/+6
A number of the pg commands were being passed the whole exec file, instead of just a line from the file. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I2f96e7648b9b7d501088eddff7e4a761973e71f4
2021-04-27vlib: improve enqueue_to_next buffer indices extractionDamjan Marion1-100/+194
Type: improvement Change-Id: Ib7b2fa7d821f6d2708f6dc378a0f36f68c843f57 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27misc: add StatementMacros to .clang-formatDamjan Marion1-9/+12
Type: make Change-Id: I79d8d0aa8b8349df0b3c1f338861350e8df31ca6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-26vppinfra: clib_memcpy_u32() utilizing SIMD mask loads/storesDamjan Marion1-37/+1
Type: improvement Change-Id: I55c4688bd1feffae139ce12a66d15885373e5cd7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-22misc: add filter for specific error for pcap traceBenoît Ganne2-0/+35
Type: feature Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-21buffers: vlib_get_buffers() with 512-bit SIMDDamjan Marion1-5/+46
Type: improvement Change-Id: Id8ce3ffc1299a38171b82a7082454412c840a40c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21vlib: don't inline vlib_buffer_enqueue_to_*Damjan Marion4-236/+316
Function call in this case is not bad thing, as those functions are called once per frame. Type: improvement Change-Id: I7bd61cf746b905e2c8e3085ebb2ff001c0a52da8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-20vlib: remove unused codeDamjan Marion2-38/+0
Type: refactor Change-Id: I01dba12a7f8aa2fa6d2e4113c91dc97e638aca77 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-19vppinfra: momve clib_sysfs_list_to_bitmap to sysfs.cDamjan Marion1-27/+0
Type: refactor Change-Id: Ia5a7ebd5c8492326f5bf2f1264f1c5ef38ccb4dc Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion1-1/+0
For portabiliy reasons it is better to have all wrapped in clib code. I.e. instead of using getcpu() we have clib_get_current_numa_node () and clib_get_current_cpu_id(). Type: refactor Change-Id: I29b52d7f29bc7f93873402c4070561f564b71c63 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-15vlib: make vlib_pending_frame_t smallerDamjan Marion1-3/+3
Type: improvement Change-Id: I8715631718dca9bc7d7b364451b137484aadd58e Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-14vlib: fix access before check issue in foreach_vlib_main macroDamjan Marion1-9/+17
Type: fix Change-Id: Iefb150a60b39d419d7dde35c80fbcba3a3a0d1e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-06buffers: performance improvementRadu Nicolau1-7/+21
Initialize the local variables as to prevent first fall through one by one processing; skip prefetching rather than doing one by one when count below 12. Type: improvement Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: If02935da081e24f7cfe408811ccf6922cf982092
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion4-160/+133
Type: improvement Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion15-393/+439
Type: refactor Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion9-32/+38
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion10-53/+76
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-23vlib: add node adaptive mode flagFlorin Coras3-7/+25
Don't switch nodes from interrupt to polling state unless adaptive mode flag set. For starters, flag set only on interface input nodes with no polling rx queue and at least one in adaptive mode. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ica1c75f605ead82b7cf74c45c6a774461008f054
2021-03-22vlib: graphviz upgrade to allow filtersArthur de Kerhor5-34/+206
Possibility to draw only the active nodes on the graph. These are scaled and colored according to their utilization. Type: improvement Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: I7ddb7b62b3a141cb03750dca24f044138fcc577f
2021-03-15tests: use socket transport instead of shared memoryOle Troan1-4/+3
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I9e65c94a5a05047a5104e9361ea36eac77b40442 Signed-off-by: Ole Troan <ot@cisco.com>
2021-03-14ip: extend punt CLI for exception packetsMohammed Hawari2-15/+75
Change-Id: I20e48a5ac8068eccb8d998346d35227c4802bb68 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: feature
2021-03-11misc: fix gcc-11 buildDamjan Marion2-44/+33
Type: fix Change-Id: Ia17c8255806a2575bb75ed37050b47ddb347050c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-11vlib: refactor node function variantsDamjan Marion7-193/+218
It allows default variant selection from startup.conf Type: improvement Change-Id: Idff95e12dd0c105dab7c905089548b05a6e974e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-09vlib: remove unused functionDamjan Marion1-9/+0
Not used for a looong time.... Type: refactor Change-Id: I4b1d6216dbd349dd02c1d7c884f89ece66cd6045 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-07dispatch-trace: move dispatch trace pcap code to pluginDamjan Marion3-534/+45
Type: refactor Change-Id: I02a527f57853ebff797f0d85761b71127916d6ce Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-05interface: move vnet_pcap_t to vnetDamjan Marion1-18/+0
It naturally belogns there... Type: refactor Change-Id: I05f7ba01103a5e9b3756f1ea69c8cc5d8f26f0a0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-02-27vlib: fix clear trace buffer race conditionBenoît Ganne1-4/+15
Type: fix Change-Id: I2384e052bee91a275c3b97a00542819b1d646c88 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-18vlib: add a "vpplog" debug CLIDave Barach2-0/+25
To add arbitrary text to the vlib log. Combines nicely with comment/uncomment and the macro expander: define MY_FEATURE uncomment # or comment ... $(MY_FEATURE) { vpplog { My feature was enabled } } Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia019f0a8fa670d8593ae01595f5ef410796e5b1c
2021-02-11tests: tag the tests that do not work with multi-worker configurationAndrew Yourtchenko1-0/+2
If the multi-worker default VPP configuration is triggered by setting VPP_WORKER_CONFIG="workers 2", some of the tests fail for various reasons. It's a substantial number, so this change marks all of the testsets that have this issue, such that they can be addressed later independently. Type: test Change-Id: I4f77196499edef3300afe7eabef9cbff91f794d3 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-08vlib: ASSERT vm == vlib_get_main()Dave Barach1-0/+5
To catch coding mistakes: calling vlib_get_frame_to_node() from a worker thread with vm = &vlib_global_main instead of vm = vlib_mains[worker_thread_index] Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I5a8f01fdf9f35daeeada2d6eaa7180a60c4ca529
2021-02-08ping: fix aborting on keypressIvan Shvedunov2-7/+8
Type: fix Currently ping stops on events like SOCKET_READ_EVENT, which makes it hard to use over e.g. govpp as it aborts immediately most of the time. With this patch, ping only stops upon real CLI read / quit events. Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com> Change-Id: Id7a8d0b0fdeb7bbc7b85240e398d27bd5199345b
2021-02-04vlib: "revert startup multi-arch variant configuration fix for interfaces"Damjan Marion1-18/+4
Type: fix This reverts commit 5a48b3b9d88fa2793793e2bf3db8bf156fe2951f. Change-Id: Ifa91b18bdbbc32bb729abc09d95637d9cdf42c3b Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2021-02-04vlib: increase the stats epoch only when necessaryMiklos Tirpak2-16/+72
When the counter vectors are validated and they are already long enough to fit the given index in memory, there is no need to increase the stats segment epoch. In this case, the counter vectors do not change as a result of the validation. This optimization is necessary for the case when the configuration is changed at multiple thousands per second rate. The counter vectors grow at the beginning and their size stabilizes after a while. Without this improvement, it can still take several seconds for a stats reader to succeed. Type: improvement Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com> Change-Id: I5a6c30255832716a1460018d0bd0f63031de102b
2021-01-29vlib: acquire barrier before exit callKommula Shiva Shankar1-0/+2
Type: fix A plugin exit callback function registered via VLIB_MAIN_LOOP_EXIT_FUNCTION() is called without stopping worker cores doing data path processing. Following error is observed while exiting vpp. error log: vppctl# q 0: /vpp_master/src/vnet/interface.c:1058 (vnet_delete_hw_interface) assertion `ii == 0 || this_vlib_main->parked_at_barrier == 1' fails This patch calls all exit() functions after acquiring barrier Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com> Reviewed-by: Nitin Saxena <nsaxena@marvell.com> Change-Id: I2fd565f0afaa62cb0fb0389922f49e4d382f028c
2021-01-25vlib: add show trace limit warning at the end of output tooBenoît Ganne1-2/+4
Users tend to miss the warning too often, add it to the end of the output in hope it would be easier to catch. Type: improvement Change-Id: I264df7e3b6ab1ffb1a383807f4444d9cbaf40999 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-25vlib: startup multi-arch variant configuration fix for interfacesRadu Nicolau1-4/+18
Propagate the multi-arch variant selection to interfaces. Type: fix Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: I99c4a7896f172f0d14d2ded22a27383825529a7d
2021-01-22interface: let drivers control polling when downMohammed Hawari1-0/+2
Change-Id: I03e164d8d5a329497f422e99f8b0058135241b4e Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: fix
2021-01-21interface: rx queue infra rework, part oneDamjan Marion6-95/+36
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-20vlib: fix build with muslNathan Moos1-0/+1
Type: fix When building with musl, some transitive includes from glibc are not present. This patch adds direct includes for the necessary types, and it also defines _GNU_SOURCE to ensure that the socket types are complete. Change-Id: Ic69c307b9515fec764c32906b5bc7f1fb34f2525 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-15vlib: fix counter_will_expand predictionMiklos Tirpak1-6/+3
vlib_validate_combined_counter_will_expand() was calling _vec_resize_will_expand() with wrong arguments, which resulted in false return value. Apart from the initial call, it never indicated a vector resize. The callers relying on this function did not perform a barrier sync because of the wrong prediction even if the vector got extended by a subsequent vlib_validate_combined_counter() call. The fix introduces a new, simplified macro that is easier to call. vec_resize_will_expand() accepts the same arguments as vec_resize(). Type: fix Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com> Change-Id: Ib2c2c8afd3e665e0e3d6ae62ff5cfa287acf670f
2021-01-11dpdk: allow configure individual VMBUS devicesVladimir Ratnikov3-10/+33
now startup.conf supports confuguration for VMBUS devices as for PCI devices for whitelisting/blacklisting dpdk { dev fa5a6e7a-cf3a-4b98-9569-addb479b84bc } with sub-configuration as for PCI devices dpdk { blacklist fa5a6e7a-cf3a-4b98-9569-addb479b84bc } where fa5a6e7a-cf3a-4b98-9569-addb479b84bc - example of UUID struct vlib_vmbus_addr_t changed to union with UUID described fields Added device_config_index_by_vmbus_addr blacklist_by_vmbus_addr to enumerate available device configs hash_key is as_u32[0] field(last 4 bytes of UUID) Lost of precision against full UUID, but 2^32 is enough to handle all the devices available Added is_blacklisted check while creating vnet devices in order to supress creation of dev if it's blacklisted Type: feature Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com> Change-Id: Id82611e54fed082190e488c7e5fbe14ecbe5b2ab
2020-12-28vlib: add missing file template descriptionsPaul Vinciguerra1-1/+8
Add descriptions to clib_file_t template structures so that sockets can be identified via the 'show unix file' cli command. Type: fix Change-Id: Ibf82d55aa6c7b1126bd252b76d0dc8b7076f5046 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-12-18perfmon: new perfmon pluginDamjan Marion3-2/+22
Type: feature Change-Id: I2c14f82393d11fc05c6d229f5c58603ab5c0f14d Signed-off-by: Damjan Marion <damarion@cisco.com>