summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
AgeCommit message (Collapse)AuthorFilesLines
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-18/+11
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/+20
Type: improvement Change-Id: I1382813211ea20c6204d7a3b6e6d470aa51aed69 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-28vppinfra: don't fail if config.h is missing, fallback to defaults insteadDamjan Marion2-0/+7
Type: improvement Change-Id: Idc82d40a16cbc8a401a8fb359bc63083f47361b9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27misc: fix dead storesDamjan Marion1-4/+1
Type: fix Change-Id: I08969e1c4a78f8ac92ec066a3b67e64dc931bc16 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27vlib: improve enqueue_to_next buffer indices extractionDamjan Marion6-330/+72
Type: improvement Change-Id: Ib7b2fa7d821f6d2708f6dc378a0f36f68c843f57 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27vppinfra: silence coverity warnings related to clib_memcpy_u32()Damjan Marion1-0/+10
Type: fix Change-Id: I17e7b3fca390c0b0150c4606f7c93771ee9bdbdc Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-27vppinfra: Fix a bug related to path_searchRyo Nishikawa1-1/+1
Type: fix Signed-off-by: Ryo Nishikawa <nishikawa0320@gmail.com> Change-Id: Iabf7e088245395ea3fff62a22266a31de3fc305e
2021-04-27perfmon: top down level 1 supportmdr781-0/+1
Adding perfmon node TMAM support on ICX. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I48a9a9ff6a72efc28eaf0cb11ef39fb62cebb126
2021-04-26vppinfra: clib_memcpy_u32() utilizing SIMD mask loads/storesDamjan Marion3-0/+158
Type: improvement Change-Id: I55c4688bd1feffae139ce12a66d15885373e5cd7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25vppinfra: add COMPILE_TIME_CONST() macroDamjan Marion2-1/+2
Type: improvement Change-Id: I10d7489f57bc60eb92049962b4e6ea84974f17b8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25vppinfra: AVX512 mask load/stores and compress storeDamjan Marion3-37/+55
Type: improvement Change-Id: Id6be598aade072653e408cca465e62931d060233 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-25vppinfra: add clear_lowest_set_bit() function, use BMI2 if availableDamjan Marion1-0/+10
Type: improvement Change-Id: I973cacd0cade0ca98e6261c1fb026a5eb38b44d3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21buffers: vlib_get_buffers() with 512-bit SIMDDamjan Marion1-0/+1
Type: improvement Change-Id: Id8ce3ffc1299a38171b82a7082454412c840a40c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)Damjan Marion2-30/+80
Type: improvement Change-Id: I4cb86cafba92ae70cea160b9bf45f28a916ab6db Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-20pmalloc: tolerate move_pages failure on numa node #0Klement Sekera1-1/+2
Type: fix Change-Id: I65dbc4f3db47c745a0187e015845e07b3b0568e5 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-04-19vppinfra: momve clib_sysfs_list_to_bitmap to sysfs.cDamjan Marion2-0/+29
Type: refactor Change-Id: Ia5a7ebd5c8492326f5bf2f1264f1c5ef38ccb4dc Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove outdated and unused unix format functionsDamjan Marion2-486/+0
Type: refactor Change-Id: If1772980dbdbde1fbf3d1989daa40599e9f23e8c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion9-136/+51
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-15vppinfra: move bitmap format functions to .c file, add format_bitmap_listDamjan Marion3-120/+172
Type: improvement Change-Id: I9baa845ecab8655e0623453666092d2dbc674b0f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-15vppinfra: correct intrinsic called by u16x16_from_u8x16Lijian.Zhang1-2/+2
u16x16_from_u8x16() and i16x16_from_i8x16() call intrisics _mm256_cvtepu8_epi64 and _mm256_cvtepi8_epi64. But they are not seems doing the right data conversion from the name of the wrappers. The correct intrinsics been called should be _mm256_cvtepu8_epi16 and _mm256_cvtepi8_epi16. Type: fix Change-Id: Id71de6ae1a266a370f11c33a46684202be766c43 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2021-03-25tests: move vppinfra tests to src/vppinfra/testDave Wallace1-0/+40
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Iceaeab769c08e541b31546663d0e402ced862e5b
2021-03-11vlib: refactor node function variantsDamjan Marion1-19/+22
It allows default variant selection from startup.conf Type: improvement Change-Id: Idff95e12dd0c105dab7c905089548b05a6e974e0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-07dispatch-trace: move dispatch trace pcap code to pluginDamjan Marion1-39/+0
Type: refactor Change-Id: I02a527f57853ebff797f0d85761b71127916d6ce Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-04vppinfra: fix compiling error due to incompatible udphdr field namesJieqiang Wang1-6/+3
Compiling VPP on CentOS 7 will fail shown as below. The root cause is that uh_sport/uh_dport field names for struct udphdr are chosen only if macro __FAVOR_BSD in /usr/include/netinet/udp.h is defined for glibc version less than 2.19. Fix this issue by using source and dest field names in struct udphdr for compatibility reasons. FAILED: vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o ccache /opt/rh/devtoolset-9/root/bin/cc -Dvppinfra_EXPORTS -I/vpp/src -I. -Iinclude -Wno-address-of-packed-member -g -fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx -O2 -fstack-protector -D_FORTIFY_SOURCE=2 -fno-common -flto -fno-fat-lto-objects -fPIC -fvisibility=hidden -ffunction-sections -fdata-sections -MD -MT vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -MF vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o.d -o vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -c /vpp/src/vppinfra/unix-formats.c /vpp/src/vppinfra/unix-formats.c: In function 'format_udp4_packet': /vpp/src/vppinfra/unix-formats.c:319:19: error: 'struct udphdr' has no member named 'uh_sport' 319 | u16 source = udp->uh_sport; | ^~ /vpp/src/vppinfra/unix-formats.c:320:17: error: 'struct udphdr' has no member named 'uh_dport' 320 | u16 dest = udp->uh_dport; Type: fix Change-Id: Ifc99c7286ea3fac463096152267033ac0518c230 Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Reviewed-by: Tianyu Li <tianyu.li@arm.com>
2021-02-26vppinfra: mem leak in show memory main-heapFlorin Coras1-1/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I23d1dda86c781ac077dbee7cb0e1ddeaa328c660
2021-02-19session vppinfra: asan fixesFlorin Coras1-4/+16
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie709d76438542783cbc8c6174b5e712ef18a6276
2021-02-16cjson: upgrade to new versionOle Troan1-14/+33
See if this fixes the coverity issues. Now at 324a6ac9a9b285ff7a5a3e5b2071e3624b94f2db Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I2cd281ebaeda69e214e6dc93a84888298741d0ee Signed-off-by: Ole Troan <ot@cisco.com>
2021-02-15vppinfra: fix memcpy undefined behaviourBenoît Ganne6-80/+123
Calling mem{cpy,move} with NULL pointers results in undefined behaviour. This in turns is exploited by GCC. For example, the sequence: memcpy (dst, src, n); if (!src) return; src[0] = 0xcafe; will be optimized as memcpy (dst, src, n); src[0] = 0xcafe; IOW the test for NULL is gone. vec_*() functions sometime call memcpy with NULL pointers and 0 length, triggering this optimization. For example, the sequence: vec_append(v1, v2); len = vec_len(v2); will crash if v2 is NULL, because the test for NULL pointer in vec_len() has been optimized out. This commit fixes occurrences of such undefined behaviour, and also introduces a memcpy wrapper to catch those in debug mode. Type: fix Change-Id: I175e2dd726a883f97cf7de3b15f66d4b237ddefd Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-02-11vppinfra: fix membulk coverity warningsFlorin Coras1-2/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4830656ad852de62211e31574a0e0afb62d00f37
2021-02-10vppinfra: fix bihash test-debug aarch64 sporadic failureDave Barach1-0/+3
Turns out that both the multi-core and single-core add / del tests run for just under 5 seconds (aarch64, debug image). Increase the vapi => debug CLI timeout to avoid spurious failures. Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia64bffa82a908172a21c34f3ae4402ad774af28a
2021-02-08virtio: add atomic call for kickingMohsin Kazmi1-0/+3
Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I41faa2ca249ff75e564a732af896e6b5d76bf665
2021-02-04vppinfra: fix mem map mt issue due to snprintfFlorin Coras1-1/+1
Type: fix Apparently snprintf is not thread safe!? Thread 6 "vpp_wk_3" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffeed1a3700 (LWP 819375)] 0x00007ffff58fc2b4 in __GI__IO_default_xsputn (n=<optimized out>, data=<optimized out>, f=<optimized out>) at genops.c:394 394 genops.c: No such file or directory. (gdb) bt 0 0x00007ffff58fc2b4 in __GI__IO_default_xsputn (n=<optimized out>, data=<optimized out>, f=<optimized out>) at genops.c:394 1 __GI__IO_default_xsputn (f=0x7ffeec35e050, data=<optimized out>, n=9) at genops.c:370 2 0x00007ffff58e127c in __vfprintf_internal (s=s@entry=0x7ffeec35e050, format=format@entry=0x7ffff5f833ce "%s", ap=ap@entry=0x7ffeec35e1d0, mode_flags=mode_flags@entry=2) at ../libio/libioP.h:948 3 0x00007ffff58f611a in __vsnprintf_internal (string=0x7ffed57ed018 "", maxlen=<optimized out>, format=0x7ffff5f833ce "%s", args=args@entry=0x7ffeec35e1d0, mode_flags=2) at vsnprintf.c:114 4 0x00007ffff5997fd1 in ___snprintf_chk (s=<optimized out>, maxlen=<optimized out>, flag=<optimized out>, slen=<optimized out>, format=<optimized out>) at snprintf_chk.c:38 5 0x00007ffff5f7fd74 in clib_mem_vm_map_internal (base=<optimized out>, log2_page_sz=<optimized out>, size=<optimized out>, fd=<optimized out>, offset=<optimized out>, name=0x0) at /scratch/fcoras/vpp/src/vppinfra/linux/mem.c:502 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8ff7cfed422273dbdc55068772e11f5e550a9b60
2021-02-04vlib: "revert startup multi-arch variant configuration fix for interfaces"Damjan Marion1-20/+0
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-01vppinfra: add defines for bihash add and deletePaul Atkins2-1/+4
When calling the bihash_add_del... functions some callers add a comment beside the value to indicate this is the is_add param. Make the code easier to read by adding defines for add and delete that the callers can use instead of having to use 0 or 1. Type: improvement Signed-off-by: Paul Atkins <patkins@graphiant.com> Change-Id: Iab5f7c8e8df12ac62fc7e726ca1798622dcdb42c
2021-01-25vlib: startup multi-arch variant configuration fix for interfacesRadu Nicolau1-0/+20
Propagate the multi-arch variant selection to interfaces. Type: fix Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: I99c4a7896f172f0d14d2ded22a27383825529a7d
2021-01-21avf: use write combining store for queues tail updateRadu Nicolau1-23/+32
Performance improvement: on supported platforms, currently only Intel Tremont, use a write combining store to update the tail pointers. Also, Tremont node variant is added for all. Type: improvement Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: Ie9606e403b7d9655184f778e3ffee3027c8c9edd
2021-01-21interface: rx queue infra rework, part oneDamjan Marion3-0/+236
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-21vppinfra: ensure _GNU_SOURCE is presentNathan Moos2-6/+13
Type: fix When building with musl, _GNU_SOURCE is required to be defined in more places. This patch defines it in those required places. Additionally, this patch changes the udphdr field names to the standard names. Change-Id: I0fec54214ccc8458289176488afb4218761e9d51 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-21vppinfra: add bihash with 32 byte keyMatthew Smith2-0/+108
Type: feature Add header to define bihash_32_8. Change-Id: Ia8a21a1e76cf0c05b8f8a2d1f5dbc0dc586d7801 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2021-01-20vppinfra: add option to use libexecinfoNathan Moos1-1/+5
Type: feature The musl libc does not provide <execinfo.h> or an implementation of the functions provided. This patch enables the use of libexecinfo as an alternative, which can be used on systems with musl. Change-Id: I76b5744ddf731b66e16144025a6fdedf72925260 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2021-01-15vlib: fix counter_will_expand predictionMiklos Tirpak1-0/+15
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
2020-12-23vppinfra: mem bulk testFlorin Coras1-1/+1
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Icd44ede9604c29839af250a2be93ecf467467aa0
2020-12-23svm: remove fifo segment heapFlorin Coras1-0/+3
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I518e096fe13847759806ff62009e73fd8f7451b7
2020-12-22vppinfra: add bulk memory allocatorDamjan Marion3-0/+249
Small fixed size object memory allocator. Type: improvement Change-Id: I727705d9d4292b6b38d41e239871103b15aa9038 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-18misc: deprecate old perfmonDamjan Marion2-47/+0
Type: refactor Change-Id: I1303219f9f2a25d821737665903b0264edd3de32 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-16vppinfra: fix vec_max_lenFlorin Coras1-1/+2
Return 0 if the supplied vector pointer is NULL. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Icb0aab70e0b7c9c1ddcf607c9dfb7e5715f177d1
2020-12-14misc: refactor clib_bitmap_foreach macroDamjan Marion3-9/+15
Type: refactor Change-Id: I077110e1a422722e20aa546a6f3224c06ab0cde5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion6-70/+70
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14vppinfra: simpler and faster pool_foreachDamjan Marion1-15/+31
- reduces number of instructions generated 4 times compared to old code - adds pool_foreach2 which is more friendly to clang-format Type: improvement Change-Id: I51e9c7fb09655c60d883987dadf5b2666c12b3f7 Signed-off-by: Damjan Marion <damarion@cisco.com>