aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
11 daysvppinfra: Link against lib execinfo on FreeBSDTom Jones1-1/+6
Type: improvement Change-Id: Ie3d6cba886e0779949e8d574f82cff62abc7ebed Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-18vppinfra: Provide FreeBSD implementation of clib_mem functionsTom Jones1-0/+5
Working from the implementation in linux/mem.c add FreeBSD specific functionality. This duplicates parts of the Linux implementation and a depuplication job could be run in the future. Stub out some parts of the API for now, they are either use unavailable features on FreeBSD or require further implementation than this initial implementation. Type: improvement Change-Id: I1e443e32304d19776a9a4d5e34adfa16ec919427 Signed-off-by: Tom Jones <thj@freebsd.org>
2024-02-13vppinfra: Don't build perfmon on FreeBSDTom Jones1-3/+4
FreeBSD has platform specific APIs for interfacing with performance counters. Until we bring in FreeBSD support, don't build perfmon on platforms which aren't linux. Type: improvement Change-Id: Iabc418922c0d2e851c6098508761135f53433ae8 Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-12vppinfra: native AES-CTR implementationDamjan Marion1-0/+2
Type: feature Change-Id: I7ef3277edaeb266fbd3c8c9355d4443002ed2311 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-03vppinfra: refactor interrupt codeDamjan Marion1-0/+1
Type: improvement Change-Id: Ie6987736faf7d8a641762e276775da8ee0c03ea4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-04-17vppinfra: native poly1305 implementationDamjan Marion1-0/+2
Type: feature Signed-off-by: Damjan Marion <damarion@cisco.com> Change-Id: Ic170464d7c63f243e7e676567d41d800647ebec3
2023-03-23vppinfra: AES-CBC and AES-GCM refactor and optimizationsDamjan Marion1-1/+7
- crypto code moved to vppinfra for better testing and reuse - added 256-bit VAES support (Intel Client CPUs) - added AES_GMAC functions Change-Id: I960c8e14ca0a0126703e8f1589d86f32e2a98361 Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-03-23ipsec: make pre-shared keys harder to misuseBenoît Ganne1-0/+1
Using pre-shared keys is usually a bad idea, one should use eg. IKEv2 instead, but one does not always have the choice. For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix C) whereas for AES-CTR or AES-GCM, the IV should never be reused with the same key material (see NIST SP800-38a Appendix B and NIST SP800-38d section 8). If one uses pre-shared keys and VPP is restarted, the IV counter restarts at 0 and the same IVs are generated with the same pre-shared keys materials. To fix those issues we follow the recommendation from NIST SP800-38a and NIST SP800-38d: - we use a PRNG (not cryptographically secured) to generate IVs to avoid generating the same IV sequence between VPP restarts. The PRNG is chosen so that there is a low chance of generating the same sequence - for AES-CBC, the generated IV is encrypted as part of the message. This makes the (predictable) PRNG-generated IV unpredictable as it is encrypted with the secret key - for AES-CTR and GCM, we use the IV as-is as predictable IVs are fine Most of the changes in this patch are caused by the need to shoehorn an additional state of 2 u64 for the PRNG in the 1st cacheline of the SA object. Type: improvement Change-Id: I2af89c21ae4b2c4c33dd21aeffcfb79c13c9d84c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-03-22build: fix rpm build error with test_infraTianyu Li1-0/+1
RPM build errors: error: Installed (but unpackaged) file(s) found: /usr/bin/test_infra Add NO_INSTALL tag in CMakeLists to avoid installing test binary. Type: fix Fixes: c3542e17b5df ("vppinfra: widen the scope of test_vector_funcs") Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I359ba79af2e3cb32b47dda3bb8707a5d2fd8586b
2023-03-19vppinfra: fix pool free bitmap allocationVladislav Grishenko1-0/+1
Using clib_bitmap_vec_validate makes free bitmap vector to be x64 times bigger (assuming x86_64) than necessary when non-zero and possible oom due (u32)(0 - 1) math with zero alloc. Fix it with clib_bitmap_validate which takes bit size, not index and ensure at least one bit is allocated. Type: fix Change-Id: I7e191f4e2fb3722a06bb800e1d075f7c7e2dcec9 Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
2023-03-16vppinfra: add clib_crc32c testcase into infra testsAndrew Yourtchenko1-0/+1
Type: test Change-Id: Id96448ba3ab69a5b22dfc27812fc17194136b969 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2023-03-15vppinfra: widen the scope of test_vector_funcsDamjan Marion1-13/+13
Location changed and binary renamed to test_infra Also it is built by default. Type: improvement Change-Id: I27cd97f274501ceb7a01213e2bc9676cea00f39c Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-08vppinfra: introduce clib_perfmomDamjan Marion1-0/+4
Type: improvement Change-Id: I85a90774eb313020435c9bc2297c1bdf23d52efc Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-05vppinfra: refactor address sanitizerDamjan Marion1-2/+0
Type: refactor Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-23vppinfra: deprecate vppinfra/graph.[ch]Damjan Marion1-2/+0
Type: refactor Change-Id: Iba0466b60354955ba73f851435a7127435b7066d Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-22vppinfra: add bihash 12_4 templateDamjan Marion1-0/+1
Type: feature Change-Id: I8a6b2c7d7682a01c472d7375d444e8b43eb5db04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-14vppinfra: toeplitz hashDamjan Marion1-0/+3
Type: feature Change-Id: I0ccf280c4b769ee624cfb780146b847a0e8e4942 Signed-off-by: Damjan Marion <dmarion@me.com>
2021-12-06vppinfra: sha2 testsDamjan Marion1-0/+1
Type: improvement Change-Id: I8a5d8d5db4e4a8ee3a1164bfbe91badff181d06a Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-10vppinfra: new vectorized ip checksum functions incl. csum_and_copyDamjan Marion1-0/+2
Type: improvement Change-Id: Id5810b7f4a6d6e4ce16b73c235b50db5d475ebf7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-10vppinfra: new memcpy for x86_64Damjan Marion1-3/+2
Change-Id: I5a5055580479960ac53e3f989aa188faf57fb05d Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08vppinfra: vectorized index to pointer functionDamjan Marion1-0/+2
Type: improvement Change-Id: I05e1a8fa31761b113355123429d72da18881d4b0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08vppinfra: clib_count_equal_* testsDamjan Marion1-1/+2
Type: improvement Change-Id: I8f75cd9ce78ce686985e65c75dcddf498cef7621 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-06vppinfra: move clib_count_equal_* codeDamjan Marion1-2/+3
Type: refactor Change-Id: Ib9e8abdbf745ad6563fc79c9ebb6b2ea65917d08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-28api: API trace improvementsFilip Tehlar1-1/+3
Type: improvement * add support for JSON format in API trace * add ability to replay JSON API trace in both VPP and VAT2 * use CRC for backward compatibility check during JSON API replay * fix API trace CLI (and remove duplicits) * remove custom dump * remove vppapitrace.py * update docs accordingly Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
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-17vppinfra: move format_table from perfmonNathan Skrzypczak1-0/+2
This code seems really usefull for reuse in other plugins, for pretty table formatting Type: feature Change-Id: Ib5784a0dfc81b7d5a5d1f5ccdd02072e460a50fb Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-07-22vppinfra: add abstract socket & netns fnsNathan Skrzypczak1-0/+1
* Add clib_socket_init support for abstract sockets if name starts with an '@' * Add clib_socket_init_netns to open socket in netns * Add clib_netns_open Type: feature Change-Id: I89637ad657c702ec38ddecb5c03a1673d0dfb104 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-07-16vppinfra: add array mask funcMohsin Kazmi1-0/+2
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I6869221917f30f7e59709e20571b4615bc68dc8c
2021-07-13vppinfra: put each vector function into own fileDamjan Marion1-4/+5
Type: refactor Change-Id: I2dd9a18497992ac7e2686c14f5d17eccccda0cda Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-06-21vppinfra: asan: fix overflow supportBenoît Ganne1-0/+1
In some part of VPP we are accessing memory past what was allocated for efficiency when we know it is safe to do so. We need to tell ASan about it so it does not complain. The initial attempt was too simple and could not manage cases where the poisoned memory was scattered. This new attempt is more robust as we save and restore the full shadow state. Note it will still not work properly if we poison/unpoison memory while in an overflow context, but this should not be a big issue as overflow should only be temporary. Type: fix Change-Id: I636f44eb59aa8455a4d13929a3791b56619af7b4 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-07vppinfra: add universal array mask_compare and compress funcsDamjan Marion1-0/+18
Type: improvement Change-Id: I6d812339f626ea630ad9354632d2f9506122d379 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-26vppinfra: clib_memcpy_u32() utilizing SIMD mask loads/storesDamjan Marion1-0/+1
Type: improvement Change-Id: I55c4688bd1feffae139ce12a66d15885373e5cd7 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-15vppinfra: move bitmap format functions to .c file, add format_bitmap_listDamjan Marion1-0/+1
Type: improvement Change-Id: I9baa845ecab8655e0623453666092d2dbc674b0f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-21interface: rx queue infra rework, part oneDamjan Marion1-0/+2
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-21vppinfra: add bihash with 32 byte keyMatthew Smith1-0/+1
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>
2020-12-22vppinfra: add bulk memory allocatorDamjan Marion1-0/+1
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 Marion1-1/+0
Type: refactor Change-Id: I1303219f9f2a25d821737665903b0264edd3de32 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-0/+7
VAT2: A completely auto-generated replacement of VAT. Reads input message in JSON from stdin and outputs received messages in JSON. A VAT2 plugin is automatically built for a .api file. There no longer a need for a separate _test.c. Example: vat2 show_version {} { "_msgname": "show_version_reply", "retval": 0, "program": "vpe", "version": "21.01-rc0~411-gf6eb348a6", "build_date": "2020-11-19T09:49:25", "build_directory": "/vpp/autogen3" } vat2 sw_interface_dump '{"sw_if_index": -1, "name_filter_valid": 0, "name_filter": ""}' [{ "_msgname": "sw_interface_details", "sw_if_index": 0, "sup_sw_if_index": 0, "l2_address": "00:00:00:00:00:00", "flags": "Invalid ENUM", "type": "IF_API_TYPE_HARDWARE", "link_duplex": "LINK_DUPLEX_API_UNKNOWN", "link_speed": 0, "link_mtu": 0, "mtu": [0, 0, 0, 0], "sub_id": 0, "sub_number_of_tags": 0, "sub_outer_vlan_id": 0, "sub_inner_vlan_id": 0, "sub_if_flags": "Invalid ENUM", "vtr_op": 0, "vtr_push_dot1q": 0, "vtr_tag1": 0, "vtr_tag2": 0, "outer_tag": 0, "b_dmac": "00:00:00:00:00:00", "b_smac": "00:00:00:00:00:00", "b_vlanid": 0, "i_sid": 0, "interface_name": "local0", "interface_dev_type": "local", "tag": "" }] This is the first phase and vat2 is not integrated in packaging yet. Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876 Signed-off-by: Ole Troan <ot@cisco.com>
2020-11-05build: link time optimization for release buildsDamjan Marion1-0/+1
Type: improvement Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-23vppinfra: add bihash_8/24_16 to headers listjiangxiaoming1-0/+2
Type: improvement Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com> Change-Id: Ic67977995dbcba97240009373a4b9e9b57c63706
2020-10-17vppinfra: explicitly export symbolsDamjan Marion1-0/+2
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-09-28vppinfra: don't call dlmalloc API directly from the codeDamjan Marion1-1/+0
- 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-16vppinfra: introduce clib_mem_mainDamjan Marion1-0/+1
To hold more data later... Type: improvement Change-Id: I4006d22dcacd788988c4907f2c263fd4e4a9d398 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg1-0/+1
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-04-27build: add vppinfra/warnings.h to exported headers listBenoît Ganne1-0/+1
To allow the use of WARN_ON/OFF macros to selectively disable build warnings. Type: fix Change-Id: Iceb9d28b2b80c373afb51900880c23041be836db Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-22vppinfra: move unused code to extras/deprecated/vppinfraDave Barach1-23/+1
Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id28299a188feefa1899d835fd499f018af95d81b
2020-04-17vppinfra: install missing tw_timer_2t_2w_512sl header fileYu Sun1-0/+1
Type: improvement Signed-off-by: Yu Sun <yusun2@cisco.com> Change-Id: I68aea7c5776c5b31081c98388df4133d2062218a