115 Commits

Author SHA1 Message Date
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
Billy McFall
28cf3b7da2 VPP-899: Run VPP under SELinux
Add an SELinux profile such that VPP can run under SELinux on RPM based
platforms. The SELinux Policy is currently only implemented for RPM
packages, specifically, Fedora, CentOS and RHEL. Doxygen User
Documentation has been included (selinux_doc.md). Once some discussion
on file locations has completed (see vpp-devlist), updates to the Debug
CLI documentation will also need to be updated.

Additional changes:
Patch Set 2:
- Rework selinux_doc.md such that each line is only 80 characters
  instead of each sentence on a line. Made additonal minor chnages
  to the text.
- Update vHost Debug CLI documentation to reflex new socket location.
  Cleaned up some text from when I originally wrote it, to better
  reflex proper use.
- Update exec Debug CLI documentation to be more inline with suggested
  helptext, added text regarding recommended script file location.
- For Debian builds, create the /var/log/vpp/ directory. I don't use
  Debian very much, so please pay extra attention to
  build-data/platforms.mk and build-root/deb/debian/.gitignore.
- Per discussion on VPP call, changed the default log location to
  /var/log/vpp/vpp.log.
- Changed the socket location for vHost in AutoConfig to
  /var/run/vpp/.
Patch Set 3:
- Update selinux_doc.md based on comments.

Change-Id: I400520dc33f1ca51012d09ef8fe5a7b7b96c631e
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2018-01-30 13:26:20 +00:00
Ole Troan
9d42087149 VPPAPIGEN: vppapigen replacement in Python PLY.
This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.

Changes:
 - vl_api_version to option version = "major.minor.patch"
 - enum support
 - Added error checking and reporting
 - import support (removed the C pre-processor)
 - services (tying request/reply together)

Version:
 option version = "1.0.0";

Enum:
 enum colours {
   RED,
   BLUE = 50,
 };
 define foo {
  vl_api_colours_t colours;
 };

Services:
 service {
  rpc foo returns foo_reply;
  rpc foo_dump returns stream foo_details;
  rpc want_stats returns want_stats_reply
      events ip4_counters, ip6_counters;
 };

Future planned features:
 - unions
 - bool, text
 - array support (including length)
 - proto3 output plugin
 - Refactor C/C++ generator as a plugin
 - Refactor Java generator as a plugin

Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf
Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-23 13:03:53 +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
Nitin Saxena
9cfb11787f Fix Debian Packaging on AARCH64
Error msg:
pkg-shlibdeps: error: couldn't find library libvppinfra.so.0 needed by
debian/vpp/usr/bin/vpp_json_test (ELF format: 'elf64-littleaarch64'; RPATH: '')
dpkg-shlibdeps: error: couldn't find library libvppinfra.so.0 needed by
debian/vpp/usr/bin/svmdbtool (ELF format: 'elf64-littleaarch64'; RPATH: '')
...

Changes to create architecture specific folder in /usr/lib/

Change-Id: Id0e42b175348e32e2c72b404ff60eb87c9146968
Signed-off-by: Nitin Saxena <nsaxena@cavium.com>
2018-01-08 01:29:34 +00: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
Marco Varlese
edfa2fddf8 The build system still builds the DPDK plugin when the option
vpp_uses_dpdk is set to "no" in build-data/platforms/vpp.mk causing the
build to fail.

This patch addresses that issue.

Change-Id: Icc1aaa508e730c9b8715119e1259e4c82f974048
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-01 14:46:23 +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
Filip Tehlar
816f437d94 Fix vnet unit tests
Change-Id: Ibe55e4399c6b78d83268d7c49ed498cab7bfdb43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-05-03 15:19:23 +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
686c1c8454 Extend ebuild to specify "configure" subdir, enable verify for sample-plugin
Change-Id: I2056e5d19bc3713e7a13e015dabf3b2431800973
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-20 11:30:28 +00:00
Damjan Marion
c06eeb0e3c Fix "make dist" to include version number, docouple it from rpm packaging
Change-Id: If2f9976d668089026c97b897cf449bff09050631
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-19 20:16:14 +00:00
Ole Troan
afaa85f873 Python API: Fixup of debian package after cFFI changes.
Change-Id: I4c2a1a818f28d4c6cf52af45f3b7dbfa41d77ccb
Signed-off-by: Ole Troan <ot@cisco.com>
2017-03-27 18:58:11 +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
2ce7f9834a Add dpdk development packaging
Change-Id: I6aa2a6709241d99ce734c29e47487eb456907351
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 15:02:12 +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
Padraig Connolly
69915cba2d vppctl: new bash completion for vppctl commands
Bash completion for vppctl
*vppctl_completion uses generated list vppctl-cmd-list to provide bash completion
*List of commands generated using grep, then moved by vpp packaging
*Once vpp package installed restart bash to use

Change-Id: I3b25e55a432c395af421231cf7c37c2e243fee61
Signed-off-by: Padraig Connolly <padraig.connolly@intel.com>
2017-01-13 20:18:18 +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