summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
AgeCommit message (Collapse)AuthorFilesLines
2020-10-20vppinfra: export elog_read_file_not_inline()Dave Barach1-1/+1
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib9fb1723b55bf322c9fd9f928a3e3b4a529bca5b
2020-10-19vppinfra: minor refactor in lock.hDave Barach1-2/+4
For whatever reason, "typedef struct { ... } *foo_t" gives cgo a horrible case of indigestion. A minor refactor makes the pain go away. Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I856b2abf9b16348d2f6145178e683e722914c756
2020-10-18vppinfra: add export symbolsDave Barach2-3/+3
format_one_elog_event() vec_len_not_inline() vec_free_not_inline() Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I0432c1b41b985de380e0b73886d0b03ecc19c703
2020-10-17vppinfra: export elog_get_events()Dave Barach1-1/+1
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ifc1bcbd8b5f8597796c993a2a5caf3a6c8d2471c
2020-10-17vppinfra: explicitly export symbolsDamjan Marion40-225/+229
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08vppinfra: memory leak be goneDave Barach1-1/+1
Type: fix Fixes: ab1a50cf7407e31097b550226c2b6954d6371bea / gerrit 29272 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic8146a66b54bb9ac6223cf984d4566554b73276d
2020-10-08vppinfra: fix coverity warningsDave Barach2-5/+5
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I654747d618cc4fe99b7774827303769fe43392ed
2020-10-06vppinfra: add heap header in front of dlmalloc spaceDamjan Marion7-188/+220
This patch adds smal header in front of dlmalloc space, and it stores some additional information about the heap. Immediate benefit of this patch is that we know the underlying page size si we can display heap page statistics / real memory usage. Type: improvement Change-Id: Ibd6989cc2f2f64630ab08734c9552e15029c5f3f Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-06misc: add xxx_not_inlineDave Barach1-2/+2
vlib_main_t *vlib_get_main_not_inline(void) vlib_thread_main_t *vlib_get_thread_main_not_inline(void) elog_main_t *vlib_get_elog_main_not_inline() Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6de306d567283ad28ef34c9be0cf27452aecbf6c
2020-10-05vppinfra: address sanitizer: do not instrument dlmalloc internalsBenoît Ganne1-0/+1
Type: fix Change-Id: I8b50777b6ce7df461e5256921591a58e52877628 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-02vppinfra: use clib_mem_create_heap() to create numa heap(s)Damjan Marion3-216/+0
Type: improvement Change-Id: Ie04302c576869bc7bfaa9f13ed2ea8a403a393d4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-02vppinfra: Function to check if a bihash has been initialisedNeale Ranns2-0/+7
Type: improvement Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ic31f7721f326ca9d78d645abcea63ce58df5bd5b
2020-10-02vppinfra: fix legacy huge pages creation for default sizeBenoît Ganne1-1/+14
Type: fix Change-Id: I941b92ebec66ccd9c9e9a12d485844313c9f117b Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-10-01svm: simplify memfd client segment mappingFlorin Coras2-59/+0
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I33c6a5d1686cc32a6cde149083256d6cf0770fc5
2020-09-30vpp: update 'show bihash' commandDamjan Marion2-14/+18
Type: improvement Change-Id: I6d00ba840d2168af0658f97c45a42d39be7cbbad Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-30vppinfra: use heap to store bihash dataDamjan Marion7-25/+196
Type: improvement Change-Id: Ifb0fa114414aa2fdc244f964612ca3ac3e29b5e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-28vppinfra: don't call dlmalloc API directly from the codeDamjan Marion6-87/+50
- it is confusing from end consumer perspective that some thing is somewhere called heap and somewhere mspace - this is base for additional work where heap pointer is not the same thing like mspace Type: improvement Change-Id: I644d5a0de17690d65d164d8cec3c5654571629ef Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-25vppinfra: dont complain about linux-vdso.so.1Dave Barach1-1/+7
It's not an elf file, yadda yadda. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ie02a058adab1068260d9baa0a19398dab8d912d1
2020-09-25vppinfra session: file platform independent private dataFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id43b0b6db2b42ee5801236df0bd7f7225e1e081c
2020-09-25vppinfra: add clib_mem_set_numa_affinity()Damjan Marion2-8/+60
Type: improvement Change-Id: I81a7fb71c8ce0c0d22e326a4ddd01bc1c1aea5f7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-18virtio: fix txq lockingBenoît Ganne1-0/+17
Initialize txq lock only if some txq are shared and check if another worker is already operating on the txq before processing gro timeouts in input node. Type: fix Change-Id: I89dab6c0e6eb6a7aa621fa1548b0a2c76e6c7581 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-09-17stats: configurable page sizeDamjan Marion4-78/+140
Type: improvement Change-Id: I9973bce20a0a2a8a7e227cf96518de5b79374425 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-17vlib: show FD in 'show memory map'Damjan Marion2-0/+4
Type: improvement Change-Id: I04752c011e4ca58f56aa53f6ae27bae93a5c4590 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-17vppinfra: support main heap with different page sizesDamjan Marion6-77/+450
Type: improvement Change-Id: I381fc3dec8580208d0e24637d791af69011aa83b Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-17vppinfra: detect memory attributes on clib_mem_initDamjan Marion3-4/+82
Type: improvement Change-Id: I298aadfdf17d98dfb1ada1ec4f87e0821e6aeb7f Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-16vppinfra: introduce clib_mem_mainDamjan Marion4-18/+53
To hold more data later... Type: improvement Change-Id: I4006d22dcacd788988c4907f2c263fd4e4a9d398 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-14vppinfra: add clib_log2_page_sz and format/unformat functionsDamjan Marion5-22/+98
Type: improvement Change-Id: Ie44dbf9396cfed19dba153810b7bd76ce5377cd4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-04ip: enhance vtep4_check of tunnel by vector wayZhiyong Yang1-0/+6
This patch aims to improve decap performance by reducing expensive hash_get callings as less as possible using AVX512 on XEON. e.g. vxlan, vxlan_gpe, geneve, gtpu. For the existing code, if vtep4 of the current packet match the last vtep4_key_t well, expensive hash computation can be avoided and the code returns directly. This patch improves tunnel decap multiple flows case greatly by leveraging 512bit vector register on XEON accommodating 8 vtep4_keys. It enhances the possiblity of avoiding unnecessary hash computing once hash key of the current packet hits any one of 8 in the 512bit cache. The oldest element in vtep4_cache_t is updated in round-robin order. vlib_get_buffers is also leveraged in the meanwhile. Type: improvement Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Signed-off-by: Junfeng Wang <drenfong.wang@intel.com> Change-Id: I313103202bd76f2dd638cd942554721b37ddad60
2020-09-01vppinfra: Fix bihash coverity warningNathan Skrzypczak1-2/+2
Type: fix Hitting a code not reachable when setting BIHASH_KVP_AT_BUCKET_LEVEL = 1 Change-Id: I24d539df67ae7650a3b1969f5709a6f7366d786b Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-08-31vppinfra: convert A_extend_to_B to B_from_A format of vector inlinesDamjan Marion3-6/+6
Make it shorter and same format when converting to biggor or smaller types. Type: refactor Change-Id: I443d67e18ae65d779b4d9a0dce5406f7d9f0e4ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-08-28vppinfra: add clib_mem_destroy_mspace(void *ms)Dave Barach2-0/+19
Also clib_mem_destroy() to destroy the current mspace. Handy when an application wants to make a memory allocation arena disappear. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I020db902fbe2473545506fecbc230c2b048992f8
2020-08-27vppinfra: Multiarch support for OCTEONTX2 SoCNitin Saxena1-4/+16
Type: feature - Added multiarch support for Marvell OCTEONTX2 - Corrected Marvell THUNDERX2 spelling Signed-off-by: Nitin Saxena <nsaxena@marvell.com> Change-Id: I42d3654aeda89759a2db9d695592ee3227b26c2b
2020-08-26vppinfra: elog multi-track g2 test patternDave Barach1-0/+64
Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia4504629cb5e87067a337d16f43e044399b87cac
2020-08-21vppinfra: add format_one_elog_eventDave Barach2-0/+10
To avoid ridiculous pointer gymnastics in golang Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic5a641c18281970e2b9bc3013a54cfc3ae92e372
2020-08-19vppinfra: minor tweaks for cgo interoperationDave Barach5-13/+67
'type' is a keyword in golang, so s/type/event_type/ in elog.h and elsewhere. Add vec_len_not_inline(...), elog_write_file_not_inline(...) and elog_read_file_not_inline(...) since the inline forms aren't usable. More such tweaks may follow. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9a80a6afa635f5cdedee554ee9abe400fafc1cb6
2020-08-17vppinfra: fix RC in bihash instantiationNathan Skrzypczak2-5/+5
There can be a race condition in the case a thread tries to do a bihash_search while another instantiates the bihash. Type: fix Change-Id: Ic61b590763beb409e112957c43a5a66cd10afb28 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2020-08-06vppinfra: harmonize function namesDave Barach3-16/+16
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Icce7eab4510785e15bdcf97e4d1881b0f46f6899
2020-08-06misc: harmonize namesDave Barach1-5/+5
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ibad744788e200ce012ad88ff59c2c34920742454
2020-08-03vppinfra: fix clib_count_equal_u8/16/32/64 overflowBenoît Ganne1-47/+30
Type: fix Change-Id: Id5ca868cd7a2abc9320206f0336aa3348f5906e3 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-23vppinfra: add *_zero() vector inlinesDamjan Marion1-0/+9
Type: improvement Change-Id: Ia63d1d7de273967ab7725d83634c0b6dd481c6c0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg3-4/+319
Callbacks for monitoring and performance measurement: - Add new callback list type, with context - Add callbacks for API, CLI, and barrier sync - Modify node dispatch callback to pass plugin-specific context - Modify perfmon plugin to keep PMC samples local to the plugin - Include process nodes in dispatch callback - Pass dispatch function return value to callback Type: refactor Signed-off-by: Tom Seidenberg <tseidenb@cisco.com> Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22
2020-07-16vlib: fix asan compilation with gccBenoît Ganne1-0/+12
clang tends to force alignment of all sections when compiling for address sanitizer, confusing VPP plugin infra. On the contrary, GCC does not support this attribute on sections. Selectively enable it depending upon the compiler. Type: fix Fixes: cea46522e79637f6ec37c03ec3fbeb87b160a378 Change-Id: I2dd6e52e70e6b4d89c101171cafc813e175ec472 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-16vppinfra: fix format_c_identifier vector overflowBenoît Ganne1-1/+1
In case of vector, we must check length before trying to access element. Also fix wrong DPDK plugin workaround. Type: fix Change-Id: I2ecef1c88ebef2362f48cab0d462699aa43cd4b9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-16vppinfra: enable STATIC_ASSERT with clangBenoît Ganne2-6/+3
For some reason clang does not support &((struct foo*)0)->field in static assertion contrary to gcc. Use offsetof() macro implementation provided by both compilers instead. Type: fix Change-Id: I3311cdd29c5861e45dc0ef92f2bbd66242ca73b8 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-07-15vppinfra: more vector inlinesDamjan Marion3-0/+60
Type: improvement Change-Id: Ie0de374b89ec3a17befecf3f08e94951597609ec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-01vlib: wake up workers if interrupts are postedBenoît Ganne1-1/+1
Type: fix Change-Id: If8dbbcb46193fd057fe8d704058609a3a8787d6c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-06-30tcp: avoid rcv wnd more than RX fifo can enqueueRyujiro Shibuya1-0/+6
Type: fix Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie358b731f8ecb1fcaebd6e79f5ce5c10802c2814
2020-06-25misc: add gdb macrosDave Barach1-2/+3
These gdb macros should prove very helpul when poking around in core files. Pifi (pool_is_free_index) is not straighforward. Best to work it out once. Others: bitmap_get = clib_bitmap_get vl = vec_len pe = pool_elts node_name_from_index, as described vnet_buffer_opaque, prints the primary buffer opaque vnet_buffer_opaque2, prints the secondary buffer opaque Fix vppinfra unit-test compile error Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id2a2391a47e5a07cf3757f473e3805cc04784161
2020-06-23vppinfra: fix u32x4_gather definitionDamjan Marion1-1/+1
Type: fix Change-Id: I3df8d3f277bfadee95bfc329e8ce8b929a986af6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-23vlib: debug CLI macro expander, part deuxDave Barach2-4/+14
Deal with circular macro definitions instead of crashing due to stack overflow. Separate macro tables, per CLI session Add documentation to the Sphinx docs Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I55fc9152bd37ad0c15fa3959f38b07b63100e634