aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Collapse)AuthorFilesLines
2021-11-08vppinfra: vectorized index to pointer functionDamjan Marion1-92/+29
Type: improvement Change-Id: I05e1a8fa31761b113355123429d72da18881d4b0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08perfmon: fix iio-bw coverity issuesRay Kinsella2-2/+2
Fixes an number of coverity issues associated with the iio-bw feature. Type: fix Fixes: e15c999c3 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9ad2b336694132545d90a3483200a510226e9198
2021-11-06vppinfra: move clib_count_equal_* codeDamjan Marion1-0/+1
Type: refactor Change-Id: Ib9e8abdbf745ad6563fc79c9ebb6b2ea65917d08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05pci: remove dead codeDamjan Marion1-4/+0
Type: refactor Change-Id: Ic79e38aa6cf4ffe1eb677e7cef34351e7917d97b Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05vlib: remove dead codeDamjan Marion1-7/+0
Type: refactor Change-Id: I818bacdb068e825b38acdceb2566972819c64e82 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-03pci: allocate and set length pci product nameRay Kinsella1-1/+1
Original fix for this issue, allocated sufficent memory but didn't set the vector length correctly. Type: fix Fixes: 7d0ca6af0 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I3c8ce310d7a6266840a2d8d6b8620254acd042ab
2021-11-02vlib: retrieve the root bus of a given pci deviceRay Kinsella3-3/+70
Added a function to parse sysfs, determine the root bus & domain of a given pci device. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I36778116ecaa2d591617450fe5ae0bdb46b4424b
2021-11-02vlib: add format pci link portRay Kinsella2-0/+14
Added a function to nicely format pci link ports. Similar to the existing link_speed etc format functions. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ic1f104e0cb34dad274f6c959e776a32c0bab697d
2021-11-02vlib: allocate pci product_name with vec_allocRay Kinsella1-1/+1
The pci device product_name array was being allocated with vec_validate, not vec_alloc. This was allocating an additional byte at the end of the array, which was causing a spurious '\0' to be returned in the middle of format strings. Type: fix Fixes: cef87f1a5e Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I21e0aa4f0455ee03bd0acc675d0deae02eddea2b
2021-10-13vlib: fix vmbus error logBenoît Ganne1-3/+3
struct dirent *e is freed when calling closedir(). Use ifname instead. Type: fix Change-Id: Icc9ca52c33ecc1dee7a9e28802149e4e3e4c8ac0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-10-06tcp: fix severity infoFilip Tehlar1-3/+3
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibe39bc045c3b154209a83b59ef95a37c61b32c0c
2021-10-06vlib: doc nitfixesNathan Skrzypczak2-2/+2
Type: improvement Change-Id: I9e761f908d9d2becbc61eb0515dc6b7c1e1e036f Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-10-05build: don't hardcode triplet, allow specifying custom lib dirDamjan Marion2-1/+9
Type: fix Change-Id: I33f364fda88914f88f9b976cb83e6d3ff466f0bb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-09-29ipsec: Record the number of packets lost from an SANeale Ranns1-0/+14
Type: feature Gaps in the sequence numbers received on an SA indicate packets that were lost. Gaps are identified using the anti-replay window that records the sequences seen. Publish the number of lost packets in the stats segment at /net/ipsec/sa/lost Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8af1c09b7b25a705e18bf82e1623b3ce19e5a74d
2021-09-17build: use GNUInstallDirs install destinationsNick Brown1-1/+1
So as to be compliant with distribution layouts, as recommend by: https://cmake.org/cmake/help/latest/command/install.html#installing-files Type: make Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-15vlib: add option to plugin registration to prefer deep bindingDamjan Marion2-6/+7
Type: improvement Change-Id: I9ce7e1ee7e7afe8e9befe36ae8c59291beaaaf36 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-14vlib: add graceful termination with statusPierre Pfister2-1/+12
This commit allows a non-VPP thread to request VPP to gracefully shutdown and return a specific process status value. Type: improvement Change-Id: I9bf52b789e7ee28eb272630eaea495fd94349f79 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2021-09-09vlib: fix vlib_buffer_enqueue_to_next() overflowBenoît Ganne1-0/+25
vlib_buffer_enqueue_to_next() requires to allow overflow of up to 63 elements of 'buffer' and 'nexts' array. - add helper to compute the minimum size - fix occurences in session and async crypto Type: fix Change-Id: If8d7eebc5bf9beba71ba194aec0f79b8eb6d5843 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-08-31vlib: fixed the issue of vpp crash caused by interface up/downfangtong1-1/+1
When the interface status changes, the api of vnet_hw_interface_set_flags_helper calls the event processing function (vlib_process_signal_event_helper) for event processing. When the opinter data_vec is NULL, the _ven_len operation of an illegal address will cause vpp crash. Type:fix Signed-off-by: fangtong <fangtong2007@163.com> Change-Id: I7106b2aed7a1fc17f74bf6cb513912af97584f45
2021-08-27vlib: vpp banner is outputted to non-interactive vppctl sessionSteven Luong1-0/+11
Running a batch file which contains many vppctl commands, occasionally, VPP may spit out the banner for some of the commands. This happens when VPP erroneously views the vppctl session as interactive. A simple way to recreate the problem is to run a batch script as followed while [ 1 ] do vppctl create loopback interface vppctl delete loopback interface intfc loop0 done We have two processes which may display the banner, unix_cli_new_session_process and unix_cli_process. Normally, unix_cli_process parses the input tokens and displays the banner after it negotiates the terminal type with the vppctl app. unix_cli_new_session_process only displays the banner just in case the client fails to negotiate terminal type. It runs on a timer and expires in 1 second to display the banner if by then the terminal type is still not yet negotiated. The problem is when the session is killed or exitted, VPP does not remove the element that was enqueued for cli_new_session_process. The index for the connection (cf) is recycled. The timer for the queue element continues to run. When the timer expires for the queue element, it finds the wrong new session due to index recycling. If the new session has not had negotiated the terminal type, the banner is printed erroneously to the new session from cli_new_session_process. The fix is to clean up the queue element to stop cli_new_session_process from processing the wrong connection when the session is killed. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ife2f1b1c95661e442f0fc6b73505e330e6641fc1
2021-08-27bufmon: add buffer monitoring pluginBenoît Ganne3-24/+55
This plugin allow to keep track of buffer usage in VPP graph nodes. The main use is to detect buffer leakages. Type: feature Change-Id: Iadcf4ab98207fab6e2fa375060879bc2a25b711e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-08-20buffers: fix buffer linearizationBenoît Ganne1-95/+104
vlib_buffer_chain_linearize() truncates partial data in chained buffers in corner cases when current_data is negative. Strengthen test cases to reproduce the errors and fix it. Type: fix Change-Id: Ida621923711c5755508224bdc3842b31003c6c0b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-07-27vlib: don't ASSERT(vm) in worker thread bootstrapDave Barach1-2/+4
Otherwise, threads declared with .no_data_structure_clone=1 crash on startup. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I5dcb25d1b61330fc9eee5427b815fcfcb9bf2153
2021-07-15misc: replace CLIB_PREFETCH with clib_prefetch_{load,store}Damjan Marion2-3/+3
Type: refactor Change-Id: Id10cbf52e8f2dd809080a228d8fa282308be84ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-13vppinfra: put each vector function into own fileDamjan Marion1-1/+2
Type: refactor Change-Id: I2dd9a18497992ac7e2686c14f5d17eccccda0cda Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-02vlib: fix buffer pool alignment sizeTianyu Li1-1/+1
Alignment size should be CLIB_CACHE_LINE_BYTES(64) instead of CLIB_LOG2_CACHE_LINE_BYTES(6) Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: If2d5ae324093be64454377866297f5e76ccddc93
2021-06-21vlib: fix coverity warningDave Barach1-0/+3
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5
2021-06-13vlib: fix dangling reference in node_by_name hashDave Barach1-1/+4
When recycling a debug CLI process node, unix_cli_file_add() needs to delete and recreate the related node_by_name hash table entry. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I635da4918509d5b22eae37627c2d9b3608380ca6
2021-05-27vlib: handoff reworkDamjan Marion5-282/+177
Type: improvement Change-Id: I1e199ae31e969154319e94c5cd286b8d8adc6660 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-26pg: revert exec file fixesRay Kinsella1-6/+1
This reverts commit fd4fd0d1853ae7384e7a64c4cad17a3469720b95. Type: fix Change-Id: I6ef84f646372270ded486eacee81817067e49106 Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-05-26vlib: revert exec cmd handle scripts with blank linesRay Kinsella1-21/+3
This reverts commit 269e1569e1f7798bf7d7f539daf505b2f1997a08. Type: fix Change-Id: I40bd71ae3b5e9dc8345fb2460aae437de8a9a5ba Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
2021-05-14vlib: remove unused codeDamjan Marion2-127/+0
Type: refactor Change-Id: Ia5f670541dd43a4f6d731dda84b2d898195643fc Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-14vlib: pass node runtime to vlib_buffer_enqueue_to_thread()Damjan Marion3-8/+11
Mechanical change for patch following this one... Type: improvement Change-Id: Iee12f3a8851f35569e6c039494a94fc36e83d20f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-13tests: move test source to vpp/testDave Wallace3-156/+0
- Generate copyright year and version instead of using hard-coded data Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-05-11vlib: exec cmd handle scripts with blank linesDave Barach1-3/+21
Type: fix Fixes: 2f96e7648b9b7d501088eddff7e4a761973e71f4 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia75c863850c0df978f61bfc0343a167d8636ed97
2021-05-07vppinfra: add universal array mask_compare and compress funcsDamjan Marion1-126/+29
Type: improvement Change-Id: I6d812339f626ea630ad9354632d2f9506122d379 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-06vlib: remove unused simple counters fieldsOle Troan1-6/+0
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I46cfdcd02e5fda310367da17532cd2f355044811 Signed-off-by: Ole Troan <ot@cisco.com>
2021-05-06vlib: rename vl_counter_t to vlib_error_desc_tOle Troan3-10/+8
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I368b0410db2d633d3c52199c840e24d21952c1b4
2021-05-06stats: memory heap countersOle Troan2-0/+7
- Add counters for the main-heap - Add additional counters per heap: STAT_MEM_TOTAL STAT_MEM_USED, STAT_MEM_FREE, STAT_MEM_USED_MMAP, STAT_MEM_TOTAL_ALLOC, STAT_MEM_FREE_CHUNKS, STAT_MEM_RELEASABLE, The per-heap counters are organised as a two dimensional vector. total, used and free are directly available via symlinks. vpp_get_stats ls "^/mem/" /mem/stat segment /mem/stat segment/total /mem/stat segment/used /mem/stat segment/free /mem/main heap /mem/main heap/total /mem/main heap/used /mem/main heap/free vpp_get_stats dump "^/mem/main\ heap$" [0 @ 0]: 1073741776 packets /mem/main heap [1 @ 0]: 91586688 packets /mem/main heap [2 @ 0]: 982155088 packets /mem/main heap [3 @ 0]: 0 packets /mem/main heap [4 @ 0]: 1073741776 packets /mem/main heap [5 @ 0]: 433 packets /mem/main heap [6 @ 0]: 981708688 packets /mem/main heap Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I36725dde3b4b3befd27a8b4d3ba931f2d3b627cc
2021-05-06memif: add severity to countersOle Troan1-1/+1
Also rename counters in stat segment to make them more filesystem friendly. Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I8a3f3ec318931f5475fcb181f8b4a079a1fa4b9c Signed-off-by: Ole Troan <ot@cisco.com>
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>