aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
AgeCommit message (Collapse)AuthorFilesLines
2021-04-02build: create _objs target for each libraryDamjan Marion1-3/+10
Type: improvement Change-Id: I260580cf2d32ff949f44d80c764937ee6102486c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-02-08misc: support api generated dependency for multiarch sourceOle Troan4-15/+31
Fix dependency issues where multi-arch file is using API generated file. Type: improvement Change-Id: I5d4af7a630529bc138c35841723e38938f36d963 Signed-off-by: Ole Troan <ot@cisco.com>
2021-01-21avf: use write combining store for queues tail updateRadu Nicolau1-0/+4
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
2020-12-25build: add plugin dependencies only when presentRuslan Babayev1-1/+3
This fixes build for VPP_EXTERNAL_PROJECT plugin with missing PLUGIN_API_FILES. Type: fix Signed-off-by: Ruslan Babayev <ruslan@babayev.com> Change-Id: I687bedcd828d834b0a7de1363f0b2d063f75ee17
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan3-2/+57
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/+8
Type: improvement Change-Id: I0e24f1d2ad5c7a11a8bd40125428f86aca867bec Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-05build: run garbage collection while linking pluginsDamjan Marion1-0/+3
Ask linker to remove symbols which are not referenced or exported. Type: improvement Change-Id: Iec01fda7ec5b14bab8f36d25c2652bd6fe619961 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-19misc: don't export symbols from pluginsDamjan Marion1-0/+1
Type: improvement Change-Id: I2a176fe2871d2e54b010bffc4f1f7a3616f0c455 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-15build: forward dependencies to arch-specific libsAloys Augustin3-5/+10
Without this, if a multiarch source depends on a generated api header for instance, the build would be racy between the api header generation and the multiarch object compilation. Type: improvement Signed-off-by: Aloys Augustin <aloaugus@cisco.com> Change-Id: I08fcd0e5a1c51398ac1a8f37cf6562064b400d4a
2020-08-27vppinfra: Multiarch support for OCTEONTX2 SoCNitin Saxena1-0/+4
Type: feature - Added multiarch support for Marvell OCTEONTX2 - Corrected Marvell THUNDERX2 spelling Signed-off-by: Nitin Saxena <nsaxena@marvell.com> Change-Id: I42d3654aeda89759a2db9d695592ee3227b26c2b
2020-06-19build: add cmake dependency from test plugin to apiTom Seidenberg1-0/+3
Type: fix Signed-off-by: Tom Seidenberg <tseidenb@cisco.com> Change-Id: I00fa22733bd293e56eb6b81346fdf2d75ad9d88f
2020-06-17build: cmake cross-compilation fixesDamjan Marion1-1/+1
Type: fix Change-Id: I40337c208375b74b4dc3c35102c5e66a6e4568e8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-08build: various improvementsDamjan Marion4-5/+7
- 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-04-30build: rework x86 CPU variantsDamjan Marion1-5/+9
Type: improvement Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30build: support arch-specific compiling for Neoverse N1Lijian.Zhang1-0/+4
Enable arch-specific compiling and dynamic optimal function selection for Arm Neoverse-N1. Support for -march=armv8.2-a+crc+crypto -mtune=neoverse-n1 for Neoverse-N1 is added starting from gcc-9.2.0 without change with change improvement [L2 - 1x flows] 11.00 Mpps 11.46 Mpps 4% [L2 - 10Kx flows] 6.83 Mpps 7.17 Mpps 5% [L3 - 1x flows] 10.39 Mpps 10.78 Mpps 3.7% [L3 - 10Kx flows] 6.67 Mpps 7.19 Mpps 7.8% Type: feature Change-Id: I5d24d17820b3dd6909b913202e8c31fc7d48650f Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com> Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
2020-04-29build: detect GNU Assembler AVX-512 bug and disable AVX-512 variants if neededDamjan Marion1-4/+24
Type: fix Change-Id: I098f6c79be3c2e4db001edc0cf0a229bf6e0b13d Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-03-31vlib: move pci api types from vnet/pci to vlib/pciJakub Grajciar1-2/+1
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I1a60809a8bbbbb8ac8b65ab990d51aae1229647f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-01-27crypto-ia32: add VAES support for AES-CBCDamjan Marion1-0/+1
Type: feature Change-Id: Ic8aa6c48913677537301971469f9627b70c1cec8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-12-17build: export vapi generation in vpp-devOliver Giles4-10/+84
Adds the higher-level vapi generation to cmake/api.cmake and exposes the necessary python scripts in vpp-dev, so that out-of-tree/downstream plugins can also leverage the more convenient API. Type: feature Signed-off-by: Oliver Giles <oliver_g@radwin.com> Change-Id: I8c40a14d27ba3cb972c6907632e03c0e7b0ce982
2019-11-14vcl: Handle newer Glibc (>2.28) where fcntl is actually fcntl64Carl Smith1-0/+9
Glibc 2.28 now provides fcntl64 which is used instead of fcntl by defining fcntl as fcntl64 in fcntl.h Type: fix Change-Id: I87fedfbf3e0d241aafdc920e90f824d71353e0e6 Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
2019-11-04build: install generated api enum and type headersDave Barach1-0/+2
Otherwise, <api-name>.api_enum.h and <api-name>.api_types.h files are unavailable. If plugin B needs to send an API message to plugin A, it's out of luck. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I25fdb904b5cf57727d6196fa2c0c71be68f207ed Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-09-25api: split api generated filesOle Troan2-1/+3
Split generation of API message enum and the typedefs into separate files, so that the type file can be included from elsewhere. Generate a C file for VPP that contains the API registration, this was previously done via X macros by the C pre- processor. This allows deleting lots of skeleton/copy paste code for each feature. plugins/flowprobe plugins/map examples/sample-plugin vnet/ipip used as Guinea pigs. Generate a C Test file for VAT, that does the same for VAT plugins. Also add support for a per-message CLI option, that is currently limited to VAT help text. option vat_help = "<help text>"; Type: refactor Change-Id: I245e3104bb76f7e1fb69a59ab20cc7c8dfcdd460 Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-05build: fix unsupported CMake comparison operationjialv011-1/+1
VERSION_GREATER_EQUAL is not supported before CMake version 3.7. Type: fix Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com> Change-Id: Id690b7b7c26121f9d289ebd0aaea0860be63795f
2019-08-19build: fix vpp compilation failure on ThunderX2 and AmpJianlin Lv1-1/+1
fix compile issue that caused by enabling "-mtune=thunderx2t99" flag during compilation, such as "/opt/vpp-agent/dev/vpp/src/vnet/interface_stats.c:164:1: internal compiler error: Segmentation fault" Type: fix Change-Id: Iaf9f80a6c203a7e5b6a40523f14a62bb37091c92 Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
2019-07-31build: Append build number for cpack packagesYohanPipereau1-31/+32
add_vpp_packaging maccro was circumventing scripts/version causing: 1. build number not being appended to the package 2. invalid package name format (due to cmake cpack module) Change-Id: I2b9a985357a3f3bd501be6db6ca638d4430f4bbb Type: make Fixes: def35a2352c9a54f748d301ffa47a446d25a83e0 Signed-off-by: YohanPipereau <ypiperea@cisco.com>
2019-07-25build: vppapigen search VPP_INCLUDE_DIR if setBenoît Ganne1-2/+8
When building out-of-tree plugins, we must search for .api in VPP installed include directory. Type: fix Change-Id: I76b7bace69ff54a385d944313879e2aeb7293648 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-25build: package .api files in vpp-devBenoît Ganne1-1/+1
Type: fix Change-Id: I035ff638d346109e1b3b5e5a8cdd36d650c45e5e Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne3-3/+1
Type: refactor Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2 Signed-off-by: Benoît Ganne <bganne@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-05-14Build packages for generic Arm architectureLijian.Zhang1-0/+2
The current aarch64 version of VPP package distro in cloud repository (https://packagecloud.io/fdio/master/ubuntu), is built on a ThunderX server, using some arch-specific options, for example, 128Byte cache line size, T=arm64-thunderx-linuxapp-gcc, RTE_MACHINE=thunderx The patch is trying to build package distro with aarch64 generic features, for both binary type targets, e.g., build/build-release, and package type targets, e.g., pkg-deb/pkg-rpm, with the generic options, e.g., 128Byte cache line size, T=arm64-armv8a-linuxapp-gcc, RTE_MACHINE=armv8a If end users want to build arch specific optimized image, TARGET_PLATFORM variable could be used, as below example, $ make build-release/pkg-deb TARGET_PLATFORM=thunderx Change-Id: If78bca8709fe83db6a95e8c26346f206bf5ea71d Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Sirshak Das <Sirshak.Das@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2019-03-28cmake: add vpp_plugin_find_library macroDamjan Marion1-0/+9
Change-Id: I0b996460e05c40e74766563fb2a94c62a65063ce Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-18Fix build with newer linux headersDamjan Marion1-0/+10
Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-14Add -fno-common compile optionBenoît Ganne2-2/+2
-fno-common makes sure we do not have multiple declarations of the same global symbol across compilation units. It helps debug nasty linkage bugs by guaranteeing that all reference to a global symbol use the same underlying object. It also helps avoiding benign mistakes such as declaring enum as global objects instead of types in headers (hence the minor fixes scattered across the source). Change-Id: I55c16406dc54ff8a6860238b90ca990fa6b179f1 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-01-26cmake: add support for linking with DPDK shared libsDamjan Marion1-0/+13
Change-Id: I3423191c53ab6100ee9ecc4e24b06506ff1b25c8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-25cmake: execute git from src directoryDamjan Marion1-0/+1
Thanks Eliot.... Change-Id: I19c9557bf827d4a5b2af344f6f4eedf25cda86d7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-22cmake: don't set SONAME for pluginsDamjan Marion1-0/+2
Change-Id: I8cd782bb36a4c063afa312002192c254fd51bf5e Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-20Rework of debian packagingDamjan Marion1-2/+1
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-17cmake: initial cross-compilation supportDamjan Marion1-1/+4
Change-Id: Ib9c2aba1eda08a22465441e33553b9b744c79d56 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-30API: Add dependency on compiler for API .json and .api generation.Ole Troan1-2/+2
Add dependency on the API compiler, so that builds can deal with changes to the tool. Change-Id: I2587235fefa93a69955495870d49f36b4203bfea Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-01Support dynamic dual/quad loop selection on aarch64Lijian Zhang1-0/+16
Currently, there are three variants available on aarch64, qdf24xx, thunderx2t99, and cortex-a72. -DCLIB_N_PREFETCHES is passed to source code to select dual/quad implementation. Besides, different compiler options are applied on these critical functions. gcc-7.3.0 reports ICE(internal compiler error) with -mtune=thunderx2t99, so -mtune=thunderx2t99 is enabled only when gcc version is greater than 7.3.0 Cavium ThunderX2, Impermenter 0x43, Part 0x0af -march=armv8-a+crc+crypto -mtune=thunderx2t99 Qualcomm Centriq 2400, Impermenter 0x51, Part 0xc00 -march=armv8.1-a+crc+crypto -mtune=qdf24xx Cortex-A72, Impermenter 0x41, Part 0xd08 -march=armv8-a+crc+crypto -mtune=cortex-a72 Change-Id: Id5649c6325c1e642d0fd42535e3908793b13e02a Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion5-19/+91
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-14cmake: use VPP package in VOMDamjan Marion1-1/+3
Change-Id: I83b244be920521e580085beffb7e40613e67c8ee Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12cmake: create cmake VPP module, update sample-plugin so it uses itDamjan Marion4-8/+83
Change-Id: I32e91ba8e55797ffe169f98b09bdb42caa5c7de2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12Always use 'lib' instead of 'lib64'Damjan Marion3-7/+3
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-07cmake: set packaging component for different filesDamjan Marion3-10/+18
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07Cavium OcteonTX: cache line fixMarco Varlese1-5/+9
According to Nitin Saxena ThunderX2 machine has 64B cache line whilst all others are 128B. According to Damjan, Nitin's previous patch broke compilation for all non-Cavium machines. This patch should make everything happy again. Change-Id: I8c5c2661f9f2f9c3e9b0965a277712f9a1eefa5f Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-09-07cmake: Fix compilation for OCTEONTxNitin Saxena1-5/+5
Change-Id: I7b7183b4603076e5afac096545d820091ee7c495 Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
2018-09-02cmake: cache line size detectionDamjan Marion1-0/+35
Change-Id: I9a0df8d15deefdf31cfead56c96433cd7220b802 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-01cmake: respect TERMDamjan Marion1-8/+11
Change-Id: I8e2dd1902f57ee173dd266743b46f5602548a4c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-31cmake: detect vpp version, set soversion, pretty config printDamjan Marion2-0/+16
Change-Id: I5d0777421debe6c3e4b93d62ad6790912063a9e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: a bit of packaging workDamjan Marion3-18/+52
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9 Signed-off-by: Damjan Marion <damarion@cisco.com>