66 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Neale Ranns
5ee623e789 makefile set CXXFLAGS so they are propageted to sub-builds
Change-Id: I55d9953851062f7106c66701d46bcd9073cf1ee4
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-01-10 07:27:17 -08:00
Damjan Marion
ba3c77364c Handle CPU flags from autotools project
Change-Id: Id085c1e3cbc7bf03df02755f9e35896cdb57e9e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-11 00:18:25 +00:00
Dave Barach
7b0c6737ed Add --disable-vom config option
The vpp object model consumes more than half of the entire [initial]
build time, so it's worth adding a config option.

Change-Id: I86ad41f78160d93835804235b8b4a3fc7988f2f7
Signed-off-by: Dave Barach <dave@barachs.net>
2017-11-06 22:28:51 +00:00
Sergio Gonzalez Monroy
6be3255d46 dpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw
Change-Id: I62939592bd3cb151e02c55a3f1ee6e7d1ce469cb
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-14 14:24:31 +00:00
Dave Wallace
d756b35032 Fix unlinking of /dev/shm files.
- api-segment prefix not used when unlinking shm files
- unlink root region on exit if no clients referenced
- stale reference to freed segment name
- don't add fake client to /db unless CLIB_DEBUG > 2
- turn off the gmond plugin
- clean up unused vars in vpp/api

Change-Id: I66451fcfd6ee64a12466c2d6c209050e3cdb74b7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-17 21:00:52 -04:00
Damjan Marion
7bee80c823 Fix remaining 32-bit compile issues
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-09 17:52:43 +00:00
Damjan Marion
1664f9ba4a Add support for 32-bit x86 compilation in Makefiles
Change-Id: Ida73678b47b685abef4e81b5cad9fc13eb330850
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-25 07:38:49 +00:00
Damjan Marion
374e2c5fc3 Retire vpp_lite
vpp_lite platform is not needed anymore as same efect can be
achieved with following startup.conf config:

plugins {
	plugin dpdk_plugin.so { disable }
}

Change-Id: I690ea8ceb1c6e1fe32e01e7da54e9958019a93bf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-10 19:35:49 +00:00
Damjan Marion
78edb8e722 Multiple platofrm support for dpdk/Makefile, fix optimizations
Using -march=native was causing SIGILLs on Atoms.

Change-Id: I98c7fdaa139e3db70c972950dc9c167bf5803656
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-07 20:24:49 +00:00
Dave Barach
3ad7704fbb Prep work for Coverity upload processing via Jenkins
Change-Id: I2575d780d19e12ddf8a77e5596e5d7cc3dbf4233
Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-31 20:40:11 +00:00
Sergio Gonzalez Monroy
d04b60bfa9 dpdk: rework cryptodev ipsec build and setup
Build Cryptodev IPsec support by default when DPDK is enabled but only build
hardware Cryptodev PMDs.

To enable Cryptodev support, a new startup.conf option for dpdk has been
introduced 'enable-cryptodev'.

During VPP init, if Cryptodev support is not enabled or not enough cryptodev
resources are available then default to OpenSSL ipsec implementation.

Change-Id: I5aa7e0d5c2676bdb41d775ef40364536a081956d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-01-27 20:52:17 +00:00
Damjan Marion
a9a951f8e5 Add --without-libssl configure parameter
This replaces --without-ipsec and --without-ipv6sr
and allows other parts of the code to be disabled if
libssl is not available.

Change-Id: Id97ff3685a7924d7f86622952e0405d94ceb5957
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-16 23:19:46 +00:00
Marco
6ebca6c0fa Added a sub-case to take into Thunderx platform
Change-Id: Ib440414693af6fe29ffaf78fc3b2992911afbcc6
Signed-off-by: Marco <marco.varlese@suse.com>
2017-01-10 15:53:50 +00:00
Damjan Marion
cb034b9b37 Move java,lua api and remaining plugins to src/
Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-01 18:11:43 +01:00
Damjan Marion
7cd468a3d7 Reorganize source tree to use single autotools instance
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28 12:25:14 +01:00
Damjan Marion
696f1adec0 dpdk: Add support for Mellanox ConnectX-4 devices
Due to external library dependency support for Mellanox
devices is disabled. To enable it uncoment following line:

vpp_uses_dpdk_mlx5_pmd = yes

in build-data/platforms/vpp.mk and install OFED libraries.

Change-Id: I131d52b5d449a958349f31f9cc04311948f78b71
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-26 14:53:35 +00:00
Juraj Sloboda
0279b29f32 Add make test code coverage reporting using gcov
Change-Id: Ia8247841fdbe76e1d888aab49ae213b4216af273
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-09 20:09:35 +00:00
Sergio Gonzalez Monroy
a10f62b11e dpdk: add ipsec cryptodev support
DPDK Cryptodev support and related IPsec ESP nodes using DPDK Cryptodev APIs.

When DPDK Cryptodev support is enabled, the node graph is modified by adding
and replacing some of the nodes.

The following nodes are replaced:
* esp-encrypt -> dpdk-esp-encrypt
* esp-decrypt -> dpdk-esp-decrypt

The following nodes are added:
* dpdk-crypto-input : polling input node
* dpdk-esp-encrypt-post : internal node
* dpdk-esp-decrypt-post : internal node

Change-Id: I6dca9a890abaf4fb2a4fffce3fd08ac013e4d701
Signed-off-by: Zhang, Roy Fan <roy.fan.zhang@intel.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-11-28 11:29:50 +00:00
Damjan Marion
e30872e660 Add clang to 'make verify'
Change-Id: I9ba84632da93ffb7713064db51f2888fc212713a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-12 18:55:49 +00:00
Ole Troan
d575e69177 VPP-310 Mapping algorithm compute wrong ea-bits
Mapping of IPv4 prefixes ended up writing past IPv6 prefix + EA bits
length.
(Added some unit testing code).

Change-Id: I59893b44eea5cebf00a23afc405832741f84cf4f
Signed-off-by: Ole Troan <ot@cisco.com>
2016-08-29 11:57:31 +00:00
Sachin
3f0cb9efad VPP: NXP dpaa2 platform porting to dpdk-16.07
This patch will temporary add the "dpaa2" driver support in VPP in-built DPDK v16.07

Change-Id: Ieb7005c73bdb72e5eac88e17c21474479ad087f0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-08-12 07:48:38 +00:00
Marek Gradzki
948b95a9a0 VPP-123: remove japi (the old Java API)
MANUAL_JAVA flag (used only by the japi)
was also removed.

Change-Id: Ied21521b2410af1c357afb04cbf9e849632ddc5f
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-07-21 09:30:48 +00:00
Damjan Marion
ad476c7861 Add plugins debian packaging
New debian package "vpp-plugins" is created with enabled plugins.

Change-Id: I8920178e8874f12e075858001ec44257dfaf497d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-13 13:42:39 +02:00
Damjan Marion
905a7f5520 Multiple changes in the plugin build infra
- configure.ac - some plugins are enabled by default
- Plugin .so files are placed into corresponding subdirs
- WITH_PLUGIN_TOOLKIT macro is retired - not needed anymore
- plugins/build-data is removed
- plugin makefiles are not building static libs anymore
- plugin makefiles are not installing header files to /usr/include
  anymore

Change-Id: I55681bd9ce34811f7eb1b2b24d9f0ca42df1cf04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 10:43:38 +00:00
Damjan Marion
137c7c6126 Retire PLATFORM=virl
Change-Id: Iaf9735258f456574534c1a581b983326badea171
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06 22:56:56 +00:00
Dave Barach
20c02cb133 Simple ip4 NAT plugin
Change-Id: Iffe77bf2a05ced41474540ff54a842101aad7c41
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-01 18:20:13 +00:00
Damjan Marion
154d445f7f Fix native build on non x86_64 systems
Change-Id: Iab9f6793112f19a5b54a555623d84099aa8bb03e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-28 19:10:41 +02:00
Ole Troan
ea3e1fc875 Plugins: Clean up the plugin directory so that each plugin has its own
directory and GNU autotools setup.

Change-Id: I6c59d1297389c9413db0c0b9bdf3b759080bf1b8
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-27 15:04:00 +00:00
Sachin
808b2db964 Improving cross_ldflags arguments for dpaa2 platform
- This helps in avoiding manual export of
   LD_LIBRARY_PATH for /usr/lib64/

Change-Id: I15fc9c9f961848411b093c891ca9517ef4e074a0
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-19 13:25:05 +00:00
Sachin
bd05e17d79 NXP DPAA2 Poll Mode Driver Support in DPDK
Upstreaming of DPAA2 driver changes is in progress.This patch will
 temporary add the support in VPP in built DPDK.

 Two types of changes:
     1. Driver specfic independent files. No impact on any other functionality.
     2. Changes in common EAL framework. These changes are done in compile time DPAA2
        specific flag, so no impact is expected on other existing features if not
	compiling for DPAA2.

Change-Id: I02abe7189313835b51ff654b4d7e566bc0fb8327
Signed-off-by: Sachin <sachin.saxena@nxp.com>
2016-06-17 12:33:43 +00:00
Sachin Saxena
725c59cfc7 NXP dpaa2 platform initial support
- On ARMv8 aarch64 CPU
 - TARGET is aarch64-linux-gnu
 - Cross compilation enabled with "gcc-linaro-4.9" toolchain

	make PLATFORM=dpaa2 TAG=dpaa2 ...

Change-Id: I8faf5c8b0d3c81d33a2834c6429a05c8379309c1
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
2016-06-10 19:50:52 +05:30
Damjan Marion
1c80e831b7 Add support for multiple microarchitectures in single binary
* compiler -march= parameter is changed from native to corei7
   so code is always genereted with instructions which are available
   on the Nehalem microarchitecture (up to SSE4.2)

 * compiler -mtune= parameter is added so code is optimized for
   corei7-avx which equals to Sandy Bridge microarchitecture

 * set of macros is added which allows run-time detection of available
   cpu instructions (e.g. clib_cpu_supports_avx())

 * set of macros is added which allows us to clone graph node funcitons
   where cloned function is optmized for different microarchitecture
   Those macros are using following attributes:
     __attribute__((flatten))
     __attribute__((target("arch=core-avx2)))

   I.e. If applied to foo_node_fn() macro will generate cloned
   functions foo_node_fn_avx2() and foo_node_fn_avx512() (future)
   It will also generate function void * foo_node_fn_multiarch_select()
   which detects available instruction set and returns pointer to the
   best matching function clone.

Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-19 18:14:38 +02:00
Christophe Fontaine
737547efc3 dpdk/Makefile - Allow dpdk target to be set according to the platform
Allows DPDK parameters to be overriden from the platform
definition.

$(PLATFORM)_dpdk_arch = "armv7a"
$(PLATFORM)_dpdk_target = "arm-armv7a-linuxapp-gcc"
$(PLATFORM)_dpdk_make_extra_args = "CONFIG_RTE_EAL_IGB_UIO=y"

Change-Id: I8c0f233942744cb82ca3ed2d65e33acee845cb4e
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-05-17 19:39:25 +00:00