138 Commits

Author SHA1 Message Date
Mohammed Hawari
9db198556c ebuild: cleanup of DPDK options in external.mk
With the move to meson, most DPDK options in external.mk are not used
anymore

Type: improvement
Change-Id: I603ccd30c9e52bdc89a69aa4bece2394b3eed1fe
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-09-17 14:59:23 +00:00
Nick Brown
ae4ed3265f build: verbose dpdk build requiring meson 0.55
allow verbose dpdk build to be enabled. Useful for tools, like debian
blhc, that want to inspect build logs.
The '--verbose' option to 'meson compile' requires at least version
0.55.

Type: make
Change-Id: I54e91298f632e2b91247680d9295701b05353abe
Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-09-13 13:21:23 +00:00
Damjan Marion
a5167edc66 build: remove unused files and sections
Type: make
Change-Id: Ia1d8c53c5fb02f7e5c86efab6e6ccd0fdb16bc96
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-07-02 16:18:33 +00:00
Damjan Marion
88b2e3682b misc: experimental configure script
Type: make
Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-30 17:02:32 +00:00
Mohammed Hawari
b78607b1db build: do not _FORTIFY_SOURCE in debug mode
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-28 08:38:21 +00:00
Neale Ranns
2a81d9a4cc build: add the missing leading underscore to FORTIFY_SOURCE
Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
2021-01-20 11:00:11 +00:00
Mohammed Hawari
8f5c6107c9 ebuild: perform build and install at the same time for external.mk
Change-Id: I65379f346fe3f881ce4196d99882cd6013e5e154
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2020-12-01 07:55:21 +00:00
Damjan Marion
8c1afb56b6 misc: deprecate VOM
Type: make
Change-Id: Ifb3e52af93d24fcc2f2e6a0c408e16902a2fe553
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-16 15:33:18 +02:00
Damjan Marion
162330f25a build: rework x86 CPU variants
Type: improvement
Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30 13:25:29 +02:00
Damjan Marion
2baa115da3 build: use cmake build types
Type: make

Change-Id: If822c85d6ff26982516ea1d597ca81aa84773b2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-11-08 22:57:47 +00:00
Benoît Ganne
534de8b2a7 build: add missing ldflags to exe and shared
Type: fix

Change-Id: I859bc6ebc574ab09fd70b45f8c911769d00e7acf
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-10-22 08:15:01 +00:00
Nathan Skrzypczak
2973654033 build: add env variable to pass extra cmake args
If VPP_EXTRA_CMAKE_ARGS is set, its content will be
appended to the vpp cmake command cli

Type: feature

Change-Id: I825d4239e62b0a2fb70a652f0671f6c559630aad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-10-07 11:58:40 +00:00
juraj.linkes
1c887d9362 ebuild: Add MAKE_PARALLEL_FLAGS to VPP build
Align with other packages.

Type: make

Change-Id: I3c8f5c6a349ce9d4e05f546945ae2d8dcf3b1b61
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-09-23 12:40:09 +00:00
Benoît Ganne
49ee68443d build: add -Wall and -fno-common, fix reported issues
Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-07 11:21:59 +00:00
Lijian.Zhang
49c1bc845d Build packages for generic Arm architecture
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-05-14 15:32:11 +00:00
Dave Barach
ad64687e8b gcov / test framework: sigterm not sigkill
Otherwise, gcov data vanishes without a trace.

Add a __gcov_flush() call to the unix signal handler, under #ifdef
CLIB_GCOV. Add -DCLIB_GCOV to vpp_gcov_TAG_CFLAGS.

Change-Id: I2726e671b26dfbe7fae88f46a8207bb2b5106884
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-06 20:48:51 +00:00
Matthew Smith
84caa17a9d dpdk: update mlx[45] linking options
Upstream DPDK changed the names of the options to use dlopen()
with libibverbs and libmlx[45] from RTE_LIBRTE_MLX[45]_DLOPEN_DEPS
to RTE_IBVERBS_LINK_DLOPEN (handles both mlx4 and mlx5).

VPP's build option to enable this configuration when building DPDK
no longer worked starting when VPP moved to DPDK 19.02. Update VPP's
build options to enable the correct option name.

Change-Id: I8e34e1d3fc4ee8aac4fd6f2a7d27177f2b0dea50
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-03-01 20:26:47 +00:00
Michal Cmarada
4e633e1043 VPP-1504: Remove JVPP
As part of JVPP migration this removes JVPP completely from VPP.

Change-Id: I6b74e7961aa474ae471e63fe43a624cd9fc3659b
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2019-02-19 15:14:02 +00:00
Mohsin Kazmi
752f5b4302 deb-pkg: Add libvom package support
Change-Id: I370a5198ea5b768d8c505679662a19797bd2740d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-02-14 17:21:59 +00:00
Damjan Marion
e7ada526ac Remove -z now from LDFLAGS
It significantly increases link time, and slows down VPP startup.

Change-Id: I200448212a3254b1292d4e52d2751214240e2bc4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-01 14:59:39 +01:00
Damjan Marion
4d2f86a1eb Rework of debian packaging
Change-Id: Ifede85d3af36f3ee6c6f8f92dcf5db0ed8f1bfeb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2019-01-20 16:14:24 +00:00
msardara
8f554b793c Added CMake building system for libmemif
Added Cpack support for building libmemif DEB/RPM packages
Fixed compilation errors in libmemif test and examples

Change-Id: I59a237a4ca8eb08840857d5b0e666f3a8d74411d
Signed-off-by: msardara <msardara+fdio@cisco.com>
2018-12-17 09:25:18 +00:00
Mohsin Kazmi
24195081f1 japi: Move Java API binding to cmake
Change-Id: I264d547a06e3636d021a74cd26efb8137f629cbc
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-11-13 16:13:24 +00:00
Damjan Marion
09cce66888 Revert "japi: Move Java API binding to cmake"
components:  Development
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find JNI (missing: JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindJNI.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeOutput.log".
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeError.log".
Makefile:640: recipe for target 'japi-configure' failed
make[2]: *** [japi-configure] Error 1
make[2]: Leaving directory '/scratch/vpp-tmp/build-root'


This reverts commit a33db2528485ac39e8987bec7b138dbdad21dc5a.

Change-Id: I8a818ce70a8379656c1134432e22db418a4690fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-27 20:00:43 +00:00
Sirshak Das
c263e48bdb dpdk_plugin: fix mlx5 build and runtime issues
There are issues with VPP finding and linking the mlx5 shared glue
library which was built by default if mlx5 was enabled.

Runtime Errors this patch fixes:

net_mlx5: cannot load glue library: librte_pmd_mlx5_glue.so.18.05.0:
cannot open shared object file: No such file or directory

net_mlx5: cannot initialize PMD due to missing run-time dependency on
rdma-core libraries (libibverbs, libmlx5)

This patch introduces additional config parameter to disable glue
library building and instead statically link ibverbs and mlx5
libraries to the PMD and dpdk_plugin.

Change-Id: I0b2f67652a57854c778e991780903fb15706ace8
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-09-27 18:33:07 +00:00
Mohsin Kazmi
a33db25284 japi: Move Java API binding to cmake
Change-Id: Ia7ddd9f9e2e2d9c133967593c3e187fe42501eac
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-26 15:50:15 +00:00
Lijian Zhang
2e08b1aa6a Enable verbose output during VPP cmake compiling
During VPP compiling, the command “make build-release V=1” gives verbose output on dpdk part.
This is to enable verbose output on vpp part, with CMAKE_VERBOSE_MAKEFILE:BOOL=ON passed to cmake.
It would help to get more cmake compiling information.

Change-Id: I2b01c8e234beb3189fe401801ff339f224c14470
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
2018-09-25 07:41:54 +00:00
Damjan Marion
561f2730e8 add: nasm and ipsec-mb into vpp-ext-deps packaging
Change-Id: Ie5d85af84ae0d8b15edf5962213ed1b1953bee2f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-21 17:51:25 +00:00
Damjan Marion
4a6cb83d33 rename vpp-dpdk-dev to vpp-ext-deps
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-20 14:30:54 +02:00
Paul Vinciguerra
9ce6a21aaa Fix: vppapigen make build fails on fresh install
Steps to reproduce:
  vagrant@localhost:/vagrant$ build-root/vagrant/build.sh
  ...
  @@@@ Building vpp in /vagrant/build-root/build-vpp-native/vpp @@@@
  [51/1169] Generating API header /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  FAILED: cd /vagrant/build-root/build-vpp-native/vpp/vlibmemory && mkdir -p /vagrant/build-root/build-vpp-native/vpp/vlibmemory && /vagrant/src/tools/vppapigen/vppapigen --includedir /vagrant/src --input /vagrant/src/vlibmemory/memclnt.api JSON --output /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  AttributeError: 'module' object has no attribute 'dumps'

  This seems to be due to JSON.py namespace colliding with the standard lib json.py

Change-Id: If389e4e05ef0c166b0c2b3bef7ec0185298679a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-13 00:32:35 +00:00
Damjan Marion
0fa900e482 cmake: create cmake VPP module, update sample-plugin so it uses it
Change-Id: I32e91ba8e55797ffe169f98b09bdb42caa5c7de2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 17:04:36 +00:00
Damjan Marion
79dcbc74cd Always use 'lib' instead of 'lib64'
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-12 16:38:59 +00:00
Neale Ranns
255299c265 cmake VOM: j factor chosen based on number of cores
Change-Id: If1c27359cd93f6de6da9a93c3573997a51201959
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-10 15:42:17 +00:00
Mohsin Kazmi
d4d7e8ad84 cmake: Move VOM to cmake
Change-Id: I352dbb8e972e59a4caae4acd507153446470ce6b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-09 20:24:47 +00:00
Damjan Marion
a85e0de8ae post move-to-cmake cleanup
Change-Id: I87b8f054bbb54895429578dfe565e72331beb5b2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07 09:52:39 +00:00
Damjan Marion
855e26868f Switch to cmake
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-02 11:24:12 +02:00
Damjan Marion
ad1e1c5b2d cmake: pass linker flags, use devtoolset on centos 7
Change-Id: I8439fd070dc47a080e2df859c9f9ac67d8a08f04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-01 20:06:50 +02:00
Damjan Marion
612dd6a955 CMake as an alternative to autotools (experimental)
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17 22:14:39 +00:00
Damjan Marion
cc4a5e8089 Move java api to extras/
Change-Id: Ibd5cbbdfb22a235442cddaebc9eae9a3c4e35ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-01 20:28:53 +00:00
Dave Barach
db0a7ec72a -DCLIB_DEBUG => turn on extra checks in dlmalloc
Also: call os_panic() on a heap botch crash, attempt to generate a
post-mortem API dump, etc.

Add an "ugly" test case to vec_test.c, to cause a configurable block
overrun.

Change-Id: I7b29a7645277f9e485e06ff83335306fedc24b71
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-27 07:50:11 +00:00
Dave Barach
6a5adc3695 Add config option to use dlmalloc instead of mheap
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk

src/vppinfra/dlmalloc.[ch] are slightly modified versions of the
well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no
inherent size limit.

Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-18 12:09:42 +00:00
Neale Ranns
d1812d023b Enable Position Independent Executable for production VPP
Change-Id: I0f81423b854be1dc456df696416e5f3747393208
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-04 08:01:24 +00:00
Sachin Saxena
5914f30d3f VPP-1284: Fix for TLS corruption on ARM platforms
- The issue is appearing on ARM platofrms where DPDK drivers are also using
   __thread TLS vairables.
 - The issue was only appearing with dpdk as plgin to VPP and not if used
   as statically link with VPP.
 - Using traditional TLS scheme resolved the issue.

Change-Id: Ifb4c667fdd217c2b1d79be8a541a2c983222d95a
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-05-28 12:03:02 +00:00
Sachin Saxena
ee6ddceaf5 Fix broken compilation for non-numa aware platforms
- The dpdk plugin always looks for libnuma library during compilation.
   For non-numa aware platforms compilation breaks, if third party
   libnuma lib is not available.
 - Issue is more severe with Cross Compilation scenario where one has to
   download and cross compile libnuma-dev package even when target platofrom
   is NUMA disabled.
   Like when cross compiling for ARM platforms, Linaro tool-chain doesn't have
   libnuma by default.

Change-Id: Ib85b3188b787c23ba33b47e3f6123c74fd37190e
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-05-16 20:00:04 +00:00
Rui Cai
60bd302827 dpdk: Add build related keywords for failsafe PMD
Added build related keywords for TAP, FAILSAFE PMD
and also added some missing keywords for mlx4 PMD

This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure (1/4).

Change-Id: I2aebf209fbc6db030185f41971b51a593a003a3a
Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-12 07:13:46 +00:00
Sachin Saxena
c44f0f238a build-data: Common makefile for NXP DPAA1/DPAA2 platforms
- Same makefile will be used to support DPAA1 and DPAA2 platforms.
 - Support added to have both on Host compilation as well as Cross compilation.
 - If Cross compiling, by default NXP cutomized toolchain "aarch64-fsl-linux" will be used.
   To use Linaro toolchains, please set env variable CROSS_PREFIX.
   Like: export CROSS_PREFIX=aarch64-linux-gnu

 - Added CPU_MTUNE to modify xxx_mtune , if CPU is not A72 which is default.
 - You may set DPDK_PATH to dpdk installation folder, if wish to use locally compiled DPDK.
 - In case of Cross compilation, OPENSSL_PATH will be required to include OPENSSL libs.

Change-Id: I9057dfc57522b60e306810f684b3085bfccf85e9
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2018-05-04 21:51:51 +00:00
Damjan Marion
164e5f8c63 Move VOM to extras/vom
Change-Id: Iea174f03dfba3bd06024db0f0cc373532300dcae
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-27 11:35:07 +00:00
Damjan Marion
23d4e8a6b5 Build libmemif as part of verify job
Change-Id: I7e808b5bcbb74343a4ed6782f115ed07e9bfe3a6
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-03-28 13:41:15 +00:00
Damjan Marion
92b44ea50a use system provided ccache links
Change-Id: I0860bbd0cf368fc3638b861504ebf642ee9d3807
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-15 02:09:05 +01:00
Dave Barach
8d0f2f0031 License text cleanup
Change-Id: I105375c653b1a1dce8f0f71005b281ff137c6f42
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-12 15:08:44 +00:00