summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-0/+9
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-05-01build: add option to turn off some march variantsDamjan Marion1-1/+1
Type: make Change-Id: I53f7995c7e7a7ff829c662d71f37d88780bdd140 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30misc: experimental configure scriptDamjan Marion1-3/+33
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-14misc: clang-12 supportDamjan Marion1-1/+9
Type: improvement Change-Id: Ie8ebbbcf5e93337036998d6ba8dac393b20ebc72 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-01-28build: do not _FORTIFY_SOURCE in debug modeMohammed Hawari1-1/+0
When compiling in -O0, the glibc feature.h ignores _FORTIFY_SOURCE and, in some distributions, throws a #warning, which fails the build. This patch removes -D_FORTIFY_SOURCE in all debug configurations. Change-Id: Ic30229c038353e49ff9419779e082a7083c1ea5f Type: fix Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-20build: add the missing leading underscore to FORTIFY_SOURCENeale Ranns1-2/+2
Type: fix Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
2021-01-18build: make rpath optionalNathan Moos1-1/+4
Type: feature This patch begins enabling support for building VPP as a package for a Yocto-based embedded Linux distribution. Yocto QA complains about executables and libraries with an rpath configured, as the paths may not be valid on the target system. Therefore, this patch adds a new CMake option named `VPP_SET_RPATH`, which is enabled by default but can be disabled by a Yocto-based build. Change-Id: I90e9c4ba07138032b0f76cb72a98e58470885d55 Signed-off-by: Nathan Moos <nmoos@cisco.com>
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-1/+1
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-1/+12
Type: improvement Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-12misc: clang-11 and gcc-10 supportDamjan Marion1-1/+1
clang-11 complains: error: field 'buffer_template' with variable sized type 'vlib_buffer_t' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end] Type: improvement Change-Id: I2cb6b4fde723a05b42cf33dd8130df074f0362ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16vlib: address sanitizer support for stack switch, enable clangDamjan Marion1-1/+1
Type: improvement Change-Id: I81df4b61d1f0b8c1df77c1ee9bebcb491e155b69 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-06-16build: fix address sanitizer default argsBenoît Ganne1-1/+1
Type: fix Fixes: ec3a3f16e4cd3b33e2a409fb01b8d8826e05f9fa Change-Id: Iea3acd93a96b4bfc9f335e37ec04c00e8fa5ff27 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-05-27build: make address sanitizer options configurable with cmakeDamjan Marion1-0/+6
Type: improvement Change-Id: I9ee0407e0634f773862dd65ff5d5594814294c2c Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08build: various improvementsDamjan Marion1-6/+11
- add option to install only host tools - add option to specify lib and runtime dir Type: improvement Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-07misc: deprecate elftoolDamjan Marion1-1/+1
Type: make Change-Id: I34fec1c40ef660177c266517eaf41d60827609f4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30build: rework x86 CPU variantsDamjan Marion1-1/+1
Type: improvement Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29misc: switch to clang-9Damjan Marion1-0/+2
Type: improvement Change-Id: Iebf77a63c0c19b130a3fbd26b5293304a9fed4c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne1-0/+11
Introduce AddressSanitizer support: https://github.com/google/sanitizers/ This starts with heap instrumentation. vlib_buffer, bihash and stack instrumentation should follow. Type: feature Change-Id: I7f20e235b2f79db72efd0e756f22c75f717a9884 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-11-22build: add build types helpstring to cmake projectDamjan Marion1-0/+9
Type: feature Change-Id: Ia016fee107859d5ad22fe7959c8e9d32758e0787 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-08build: use cmake build typesDamjan Marion1-8/+33
Type: make Change-Id: If822c85d6ff26982516ea1d597ca81aa84773b2b Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28AppImage packagingDave Barach1-1/+1
Disabled by default. To kick the the tires: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy sudo chmod +x linuxdeploy-x86_64.AppImage Enable VPP_BUILD_APPIMAGE e.g. in ccmake make build | make build-release The vpp AppImage lands in .../install-xxx-native/VPP-x86_64.AppImage. To run it: ./VPP-x86_64.AppImage vpp unix interactive To run it (as root) and inhale the usual startup.conf: sudo ./VPP-x86_64.AppImage \${HERE}/bin/vpp -c \${HERE}/etc/vpp/startup.conf To run vppctl, or any of the usual vpp binaries: ./VPP-x86_64.AppImage vppctl [etc] Change-Id: Ide8cf4658cbb56f1d36a1ce7fc8f7338f8d38278 Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-18Fix build with newer linux headersDamjan Marion1-1/+1
Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-29cmake: fix out-of-git-tree buildDamjan Marion1-10/+1
Change-Id: Ib94637ec09799c23f3179599b54a2be6e2768425 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-26cmake: add support for linking with DPDK shared libsDamjan Marion1-1/+1
Change-Id: I3423191c53ab6100ee9ecc4e24b06506ff1b25c8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-20Rework of debian packagingDamjan Marion1-1/+1
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-18cmake: print all flagsDamjan Marion1-8/+19
Change-Id: Ie80ed430d8c9e2b8fe736402d357ac8b190ca6b7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-18Look for plugins in target triplet subdirDamjan Marion1-0/+1
Change-Id: I3bab0ab05b4f552ad64392439fb48409ab0ab8c0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-17cmake: initial cross-compilation supportDamjan Marion1-0/+11
Change-Id: Ib9c2aba1eda08a22465441e33553b9b744c79d56 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-20rename vpp-dpdk-dev to vpp-ext-depsDamjan Marion1-0/+1
We need to have new tenants in the development package. This is first of series of patches which will allow us to have multiple external libs and tools packaged for developer's convenience. Change-Id: I884bd75fba96005bbf8cea92774682b2228e0e22 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion1-0/+9
This allows easy packaging of external projects, including VOM and sample plugin. i.e. $ make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install $ ninja -C build-root/build-vpp-native/sample-plugin package ninja: Entering directory `build-root/build-vpp-native/sample-plugin' [0/1] Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Install project: sample-plugin CPack: - Install component: vpp-plugin-sample CPack: - Install component: vpp-plugin-sample-dev CPack: Create package CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample_18.10~rc0~413~g1433e9d1-1_amd64.deb generated. CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample-dev_18.10~rc0~413~g1433e9d1-1_amd64.deb generated. Change-Id: I6b3ec2433961e53edd976b19659ce214d272c40a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12cmake: create cmake VPP module, update sample-plugin so it uses itDamjan Marion1-1/+2
Change-Id: I32e91ba8e55797ffe169f98b09bdb42caa5c7de2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion1-1/+1
It is packaging responsibility to put libs in the right place. Use of lib64 resulted in huge amount of files with hardcoded lib64. This patch simplifies things... Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-03Compile vppinfra on macOSDamjan Marion1-6/+12
Add missing calls to clib_mem_init to vppinfra test codes. Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-02Switch to cmakeDamjan Marion1-0/+1
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-31cmake: detect vpp version, set soversion, pretty config printDamjan Marion1-5/+41
Change-Id: I5d0777421debe6c3e4b93d62ad6790912063a9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: a bit of packaging workDamjan Marion1-1/+1
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28cmake: Add perftool to cmake buildMohsin Kazmi1-1/+1
Change-Id: I921e92473a9dedde5952172d19676d47ffc4b53d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-28cmake: add g2 and elftool toolsDamjan Marion1-1/+1
Change-Id: I901c5a2c0ac81421a69b8ade9307c304aa38582b Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28cmake: install vppapigenDamjan Marion1-3/+7
Change-Id: If5bf1708a07acde73ed34639eeed95babdcf1ccd Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: fix clang build and few minor fixesDamjan Marion1-0/+5
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27CMake: fix install lib and iOMA missing symbolNeale Ranns1-1/+1
Change-Id: I929a5c3779cb40c9fde64e88ebe5183a95faf6ff Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27cmake: add vapi buildDamjan Marion1-1/+1
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion1-10/+2
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26cmake: move functions to src/cmakeDamjan Marion1-151/+7
Change-Id: Ibcb7105fa7e3c09efdce01bccd4de235fe33ea99 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25cmake: add more headers to the install listDamjan Marion1-1/+1
Change-Id: I3a0f48381232fcac1727034aa6d2504a8d1edb04 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-23CMake: Add Cmake support for VatMohsin Kazmi1-3/+1
Change-Id: I3e8efce9eacba46ec9913d4024d66f00fe326095 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-22CMake: install .json files in ROOT/share/... for papi.Neale Ranns1-4/+11
Change-Id: I1a5325c5f026ba5e8d89608c285e934a6e1c16e6 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-20CMake: generate .json from .api filesNeale Ranns1-3/+20
Change-Id: Ic18aa0fb42a72b5e0ebbfbebdefc7582cb46b5ea Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-20Detect support for memfd_create at compilationPierre Pfister1-1/+14
Compilation was failing on systems without memfd_create. This uses check_c_source_compiles to check whether the memfd_create function is available on the system. Credits to Damjan for his help troubleshooting. Change-Id: I136d9504d7978e3a09438d0d76b2de1042702b2c Signed-off-by: Pierre Pfister <ppfister@cisco.com>