aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
AgeCommit message (Collapse)AuthorFilesLines
2024-06-24build: conditional dependency handling of depfileOle Troan1-6/+18
Older distributions like Ubuntu 20.04 uses an old version of cmake that does not handle absolute paths. Leave .api dependency handling like before, i.e. not handle interdependency between .api files for those older builds. Type: fix Change-Id: I3f15a4506f6c95fca7a5b00893dc354cbed42a29 Signed-off-by: Ole Troan <otroan@employees.org>
2024-06-19build: vppapigen dependency handlingOle Troan1-4/+20
Add dependency generation to the vppapigen compiler, so that when an API file depends on another, that's registered as a dependency with the build system. Add a build dependency on vppapigen submodules so that all api files are regenerated if the compiler itself changes. Type: improvement Change-Id: I392853754129778ef15532d1b04813786b943b44 Signed-off-by: Ole Troan <otroan@employees.org>
2024-05-28octeon: add support for Marvell Octeon9 SoCMonendra Singh Kushwaha1-0/+4
Type: feature Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com> Change-Id: I5db58b8ec41b45596bc03b4a336a184c17871294
2024-04-10build: use GNUInstallDirs where possibleWim de With3-8/+8
Some installation destinations were already converted to the GNUInstallDirs standard in e3cf4d0cf. This patch converts the share and include directories (typically /usr/share and /usr/include respectively) as well. Type: improvement Change-Id: Id481b16604f3f52203166a5c0647f43d6eb05239 Signed-off-by: Wim de With <wf@dewith.io>
2024-03-18build: add option to specify supported OS list for pluginDamjan Marion1-1/+5
Type: improvement Change-Id: I0d6f11d5ece19c5e0e00dfdadc9d4c09274ae8e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-29api: provide api definition over apiOle Troan1-1/+1
This patch allows a client to bootstrap itself by downloading the JSON API definitions over the API itself. This patch enables it for Python (probably need a dynamic language). Call VPPApiClient with the new bootstrapapi=True parameter. Example (Python): from vpp_papi import VPPApiClient vpp = VPPApiClient(bootstrapapi=True) rv = vpp.connect("foobar") assert rv == 0 print(f'SHOW VERSION: {vpp.api.show_version()}') vpp.disconnect() Type: feature Change-Id: Id903fdccc82b2e22aa1994331d2c150253f2ccae Signed-off-by: Ole Troan <otroan@employees.org>
2024-01-20buffers: add compile-time option to set buffer alignmentDamjan Marion1-0/+1
Type: improvement Change-Id: I88c4c45bed0bdd8686e17e4f77a7d32a08c995aa Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-17octeon: native driver for Marvell Octeon SoCDamjan Marion2-15/+34
Type: feature Change-Id: I6898625c4e8854f777407dac3159e4c639a54860 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-01build: modify N_PREFETCH on Arm N2 to achieve best perfJieqiang Wang1-3/+2
From GCC 12, march=armv9-a option is supported, which includes the sve and crc options needed. Furthermore, VPP L3Fwd benchmark results on N2 based servers show that N_PREFETCH set to 6 gives the best performance. Type: feature Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> Change-Id: I9c4fcad84d4db1189d956dabab22b26d020fbfd6
2023-09-13vppinfra: add ARM Neoverse-N2 supportDamjan Marion1-0/+7
Type: improvement Change-Id: Ief77ae7338667ede290aece6933bb5ae2e76ffc6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-09-13build: add vpp_plugins include directoryBenoît Ganne1-0/+1
Type: fix Change-Id: Iacb04846c634231854f26348cc17cc729d6e0d87 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-09-06build: add option to specify native -march= flag with VPP_BUILD_NATIVE_ARCHDamjan Marion1-8/+8
Type: improvement Change-Id: I98eeba1ad2f9ed0531a7c615e0e70e535f24f813 Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-04-26build: plugin disable vat2 test2 plugin buildOle Troan1-2/+2
A plugin can set "VAT_AUTO_TEST_ OFF" to disable building of the autogenerated Type: improvement Change-Id: I856fbfd83bbc5c7df0759e550b20ac75df77d9d7 Signed-off-by: Ole Troan <otroan@employees.org>
2023-04-18vppinfra: Multiarch support for AMD EPYC processorsSivaprasad Tummala1-0/+10
Type: feature - Added multiarch support for AMD Zen architectures Change-Id: I65d3fe94b6cc622ebecbe1ac803efa674e87c87a Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
2023-04-17build: add scalar (no-simd) march variantDamjan Marion1-0/+5
for testing purposes, disabled by default Type: improvement Signed-off-by: Damjan Marion <damarion@cisco.com> Change-Id: Id616e2b3b21ae0f0b44e2b55ecefd501afacc7f2
2023-03-14build: add support for intel alderlake and sapphirerapidsDamjan Marion1-0/+10
Disabled by default.. Type: improvement Change-Id: I36176c009e0873c048874ae38a7ea0a91449235c Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-01-18build: use CMAKE_C_COMPILER_LAUNCHER for ccacheGuillaume Solignac1-2/+2
In some situations, CMake will find ccache in /usr/bin but /usr/bin might not present in PATH. The former fix for this was to place the ccache configuration logic before the project() declaration, but since CMake 3.4 there is a new variable to be used which handles this case. For the original problem, see also https://crascit.com/2016/04/09/using-ccache-with-cmake/ Type: fix Signed-off-by: Guillaume Solignac <gsoligna@cisco.com> Change-Id: Ie026e02b2b06e2dca2d62da5fea7b1a104bcc7c3
2023-01-13build: cmake NAMELINK_COMPONENT in vpp librariesNick Brown1-2/+4
Installs the unversioned .so symlink in the -dev component. This prevent debian lintian error: link-to-shared-library-in-wrong-package NAMELINK_COMPONENT was added in cmake 3.12 Type: make Change-Id: I9d743218fa1f6b677659d745525e399ff66e73f4 Signed-off-by: Nick Brown <nickbroon@gmail.com>
2022-09-01build: set OS_ID_LIKE only if unsetBenoît Ganne1-1/+1
cmake MATCHES directive with the empty regex "" always match, including non-empty strings. Type: fix Fixes: 534dfc1f18db74f4a2c78d62fe6893daba56dc86 Change-Id: If085b29da15a6d7fc680cebb823183fd3c7eea68 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2022-04-25build: add option to build only for native CPUDamjan Marion1-1/+15
Significantly reduces compilation time for uses who are interested to run binaries only on the build machine. Type: make Change-Id: I431f6f7374b6dfa8b3f7c72dc69f3d5cafd1f6bb Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-03-24build: set OS_ID_LIKE on to be OS_ID on Debian properAndrew Yourtchenko1-0/+5
OS_ID_LIKE from /etc/os-release is used to determine the type of packaging. On Debian it ends up being empty, so the "ninja package" does not work for out of tree plugin builds. Solution: if OS_ID_LIKE is not set, set it to OS_ID Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I077d4fdb509ea94b187d11391b1f49edb94c4e30 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2022-03-02build: fix missing dependency for libraryGuillaume Solignac1-0/+4
When building a VPP library out of tree using add_vpp_library, the build sometimes fails because the library API files are not necessarily generated before compiling this library. This is fixed by adding the lib API files as dependencies of the lib compilation. Type: fix Signed-off-by: Guillaume Solignac <gsoligna@cisco.com> Change-Id: I69dffaecbfd547f10115504494a47358c4624258
2021-11-08build: -Wno-stringop-overflow during LTO phaseDamjan Marion1-0/+3
Type: make Change-Id: I735fa411366c41981e255921eceb18ebbb4b5fe1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-27misc: move part of vpe apis to vlibmemoryFlorin Coras1-0/+30
VPE apis are actually vlib apis. This moves those that are not tightly coupled with vapi to vlib_api Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e Signed-off-by: Ole Troan <ot@cisco.com>
2021-08-20build: fix external plugin buildBenoît Ganne1-0/+1
Type: fix Fixes: 88b2e3682be6303973fc59c3c62141d64a9e10d7 Change-Id: I4b29924246e2cdc307cf238c5cb8624f14317452 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-08-18vat2: add shared memory argumentOle Troan1-6/+5
Add prefix argument to specifiy shared memory segment. Add long arguments. Add argument to dump apis. Add help. Add template argument E.g: vat2 --template sw_interface_add_del_address { "_msgname": "sw_interface_add_del_address", "sw_if_index": 0, "is_add": false, "del_all": false, "prefix": "0.0.0.0" } Usage: vat2 [OPTION] <message-name> <JSON object> Send API message to VPP and print reply -d, --debug Print additional information -p, --prefix Specify shared memory prefix to connect to a given VPP instance -f, --file File containing a JSON object with the arguments for the message to send --dump-apis List all APIs available from connected VPP instance Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I2d32483a727bc16990c9a30dfa9bc1fa7b1fa85a Signed-off-by: Ole Troan <ot@cisco.com>
2021-07-27vppinfra: introduce CLIB_CACHE_PREFETCH_BYTESDamjan Marion1-37/+27
Type: improvement Change-Id: Ic07010f11ef303f5213a33b0faf24aaedb62f110 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-16build: fix formatting of CMake config outputDamjan Marion1-1/+3
Type: make Change-Id: I6e40817609d022cb70887f70aa3608dc759fcd76 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-27build: kindly ask python not to polute src/Damjan Marion1-4/+4
Type: make Change-Id: I1ec82e0f3c19dee79f942996339240c73d4e380c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-11build: compiler flags handling cleanupDamjan Marion4-3/+8
Type: make Change-Id: I51f30edb91e09525ba116fe3941f2e43f9718da7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-06build: add FORCE_ON option for multiarch variantsDamjan Marion2-4/+24
Type: make Change-Id: I37fb925a9cc2dfc21dd7874f4b20a6943b28efc8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-01build: add option to turn off some march variantsDamjan Marion1-41/+81
Type: make Change-Id: I53f7995c7e7a7ff829c662d71f37d88780bdd140 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30build: declare some CMake variables as advancedDamjan Marion2-0/+10
Type: make Change-Id: I780c1c81a50cb92bc89c05856efd8ef88479c0ab Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30misc: experimental configure scriptDamjan Marion1-6/+6
Type: make Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18vppinfra: remove linux/syscall.hDamjan Marion1-23/+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-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>