Compare commits

..

1 Commits

Author SHA1 Message Date
24ba2fc8ce Whitespace probe for CI
Cherrypicked from https://gerrit.fd.io/r/#/c/1046/

Change-Id: I3744ee19a21dcea2885aef2800244c93aa19763a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit a20935192a)
2016-05-13 19:57:10 +00:00
2469 changed files with 272477 additions and 559892 deletions

View File

@ -1,38 +0,0 @@
---
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BinPackParameters: true
BreakBeforeBraces: GNU
ColumnLimit: 79
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpacesBeforeTrailingComments: 1
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
Cpp11BracedListStyle: true
Standard: Cpp11
SortIncludes: false
IndentWidth: 2
TabWidth: 4
UseTab: Never
IndentFunctionDeclarationAfterType: false
ContinuationIndentWidth: 4
...

45
.gitignore vendored
View File

@ -1,5 +1,4 @@
*~
*.sw[op]
/build-root/.ccache
/build-root/build-*/
@ -9,20 +8,12 @@
/build-root/packages-vpp/
/build-root/path_setup
/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/deb/.pybuild/
/build-root/*.deb
/build-root/*.rpm
/build-root/*.changes
/build-root/test-doc/
/build-root/test-cov/
/build-root/python/
/build-root/vapi_test/
/build-config.mk
/vpp-api/python/vpp_papi/vpp_papi.py
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/dpdk/vpp-dpdk*.deb
/dpdk/vpp-dpdk*.changes
/path_setup
/tools/
# start autotools ignore
@ -52,48 +43,20 @@ ltmain.sh
ylwrap
test-driver
.cproject
*.iml
.bootstrap.ok
.settings
.autotools
# stop autotools ignore
# OSX and some IDE
# OSX and some IDE
.DS_Store
.idea/
.project
.cproject
.vscode/
# cscope and ctags
/cscope.*
/tags
ID
TAGS
# ggtags
GPATH
GRTAGS
GTAGS
# Generated documentation
/build-root/docs
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
# indent backup files
*.BAK
# Python bytecode
*.pyc
# Python api generator
/src/vpp-api/python/build
/src/vpp-api/python/dist
/src/vpp-api/python/vpp_papi.egg-info
/src/vpp-api/python/vpp_papi/memclnt.py
/src/vpp-api/python/vpp_papi/vpe.py
# Build files in the test directory
/test/*.ok
# vppctl command list
/src/scripts/vppctl-cmd-list

View File

@ -2,4 +2,3 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1710

View File

@ -1,188 +0,0 @@
Descriptions of section entries:
M: Maintainer Full name and E-mail address: Full Name <address@domain>
One maintainer per line. Multiple M: lines acceptable.
F: Files and directories with wildcard patterns.
A trailing slash includes all files and subdirectory files.
F: drivers/net/ all files in and below drivers/net
F: drivers/net/* all files in drivers/net, but not below
One pattern per line. Multiple F: lines acceptable.
C: Single line comment related to current section.
-----------------------------------
Build System
M: Damjan Marion <damarion@cisco.com>
F: Makefile
F: src/*.ac
F: src/*.am
F: src/*.mk
F: src/m4/
Build System Internal
M: Dave Barach <dave@barachs.net>
F: build-root/Makefile
F: build-data/*
Doxygen
M: Chris Luke <chrisy@flirble.org>
F: doxygen/
DPDK Development Packaging
M: Damjan Marion <damarion@cisco.com>
F: dpdk/
F: dpdk/*
Infrastructure Library
M: Dave Barach <dave@barachs.net>
F: src/vppinfra/
VLIB Library
M: Dave Barach <dave@barachs.net>
M: Damjan Marion <damarion@cisco.com>
F: src/vlib/
VLIB API Libraries
M: Dave Barach <dave@barachs.net>
F: src/vlibapi/
F: src/vlibmemory/
F: src/vlibsocket/
VNET Bidirectonal Forwarding Detection (BFD)
M: Klement Sekera <ksekera@cisco.com>
F: src/vnet/bfd/
VNET Device Drivers
M: Damjan Marion <damarion@cisco.com>
F: src/vnet/devices/
VNET Device Drivers - DPDK Crypto
M: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
F: src/devices/dpdk/ipsec/
VNET Feature Arcs
M: Dave Barach <dave@barachs.net>
M: Damjan Marion <damarion@cisco.com>
F: src/vnet/feature/
VNET FIB
M: Neale Ranns <nranns@cisco.com>
F: src/vnet/fib/
F: src/vnet/mfib/
F: src/vnet/dpo
F: src/vnet/adj
VNET IPv4 and IPv6 LPM
M: Dave Barach <dave@barachs.net>
F: src/vnet/ip/
VNET Segment Routing (IPv6 and MPLS)
M: Pablo Camarillo <pcamaril@cisco.com>
F: src/vnet/srv6/
F: src/vnet/srmpls/
F: src/examples/srv6-sample-localsid/
VNET IPSec
M: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
M: Matus Fabian <matfabia@cisco.com>
F: src/vnet/ipsec/
VNET L2
M: John Lo <loj@cisco.com>
F: src/vnet/l2/
VNET Link Layer Discovery Protocol (LLDP)
M: Klement Sekera <ksekera@cisco.com>
F: src/vnet/lldp/
VNET LISP
M: Florin Coras <fcoras@cisco.com>
F: src/vnet/lisp-cp/
F: src/vnet/lisp-gpe/
VNET MAP
M: Ole Troan <ot@cisco.com>
F: src/vnet/map
VNET MPLS
M: Neale Ranns <nranns@cisco.com>
F: src/vnet/mpls/
VNET Host Stack Session Layer
M: Florin Coras <fcoras@cisco.com>
F: src/vnet/session
VNET TCP Stack
M: Florin Coras <fcoras@cisco.com>
F: src/vnet/tcp
VNET VXLAN
M: John Lo <loj@cisco.com>
F: src/vnet/vxlan/
VNET VXLAN-GPE
M: Keith Burns <alagalah@gmail.com>
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/vnet/vxlan-gpe/
Plugin - ACL
M: Andrew Yourtchenko <ayourtch@gmail.com>
F: src/plugins/acl/
F: src/plugins/acl.am
Plugin - flowprobe
M: Ole Troan <otroan@employees.org>
F: src/plugins/flowprobe/
F: src/plugins/flowprobe.am
Plugin - SIXRD
M: Ole Troan <ot@cisco.com>
F: src/plugins/sixrd/
F: src/plugins/sixrd.am
Plugin - GTPU
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/gtpu/
F: src/plugins/gtpu.am
Plugin - PPPoE
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/pppoe/
F: src/plugins/pppoe.am
Test Infrastructure
M: Klement Sekera <ksekera@cisco.com>
F: test/
SVM Library
M: Dave Barach <dave@barachs.net>
F: src/svm
VPP API TEST
M: Dave Barach <dave@barachs.net>
F: src/vat/
VPP Executable
M: Dave Barach <dave@barachs.net>
F: src/vpp/
Graphical Event Viewer
M: Dave Barach <dave@barachs.net>
F: src/tools/g2/
Performance Tooling
M: Dave Barach <dave@barachs.net>
F: src/tools/perftool/
Binary API Compiler
M: Dave Barach <dave@barachs.net>
F: src/tools/vppapigen/
Ganglia Telemetry Module
M: Dave Barach <dave@barachs.net>
F: gmod/
THE REST
C: Contact vpp-dev Mailing List <vpp-dev@fd.io>
F: *
F: */

426
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
Vector Packet Processing
========================
## Introduction
## Introduction.
The VPP platform is an extensible framework that provides out-of-the-box
production quality switch/router functionality. It is the open source version
@ -16,13 +16,7 @@ For more information on VPP and its features please visit the
[What is VPP?](https://wiki.fd.io/view/VPP/What_is_VPP%3F) pages.
## Changes
Details of the changes leading up to this version of VPP can be found under
@ref release_notes.
## Directory layout
## Directory layout.
Directory name | Description
---------------------- | -------------------------------------------
@ -30,24 +24,26 @@ Directory name | Description
build-root | Build output directory
doxygen | Documentation generator configuration
dpdk | DPDK patches and build infrastructure
@ref extras/libmemif | Client library for memif
@ref src/examples | VPP example code
@ref src/plugins | VPP bundled plugins directory
@ref src/svm | Shared virtual memory allocation library
src/tests | Standalone tests (not part of test harness)
src/vat | VPP API test program
@ref src/vlib | VPP application library
@ref src/vlibapi | VPP API library
@ref src/vlibmemory | VPP Memory management
@ref src/vlibsocket | VPP Socket I/O
@ref src/vnet | VPP networking
@ref src/vpp | VPP application
@ref src/vpp-api | VPP application API bindings
@ref src/vppinfra | VPP core library
@ref src/vpp/api | Not-yet-relocated API bindings
test | Unit tests and Python test harness
g2 | Event log visualization tool
gmod | perf related?
perftool | Performance tool
sample-plugin | A sample plugin
@ref svm | Shared virtual memory allocation library
test | Unit tests
@ref vlib | VPP application library source
@ref vlib-api | VPP API library source
@ref vnet | VPP networking source
@ref vpp | VPP application source
@ref vpp-api | VPP application API source
vppapigen | VPP API generator source
vpp-api-test | VPP API test program source
@ref vppinfra | VPP core library source
## Getting started
(If the page you are viewing is not generated by Doxygen then
ignore any @@ref labels in the above table.)
## Getting started.
In general anyone interested in building, developing or running VPP should
consult the [VPP wiki](https://wiki.fd.io/view/VPP) for more complete
@ -61,13 +57,13 @@ coverage of the topic.
For the impatient, some salient information is distilled below.
### Quick-start: On an existing Linux host
### Quick-start: On an existing Linux host.
To install system dependencies, build VPP and then install it, simply run the
build script. This should be performed a non-privileged user with `sudo`
access from the project base directory:
./extras/vagrant/build.sh
./build-root/vagrant/build.sh
If you want a more fine-grained approach because you intend to do some
development work, the `Makefile` in the root directory of the source tree
@ -77,9 +73,9 @@ interest. To see the available targets run:
make
### Quick-start: Vagrant
### Quick-start: Vagrant.
The directory `extras/vagrant` contains a `VagrantFile` and supporting
The directory `build-root/vagrant` contains a `VagrantFile` and supporting
scripts to bootstrap a working VPP inside a Vagrant-managed Virtual Machine.
This VM can then be used to test concepts with VPP or as a development
platform to extend VPP. Some obvious caveats apply when using a VM for VPP
@ -92,16 +88,7 @@ for this can be found [on the Setting up Vagrant wiki page]
(https://wiki.fd.io/view/DEV/Setting_Up_Vagrant).
## More information
Several modules provide documentation, see @subpage user_doc for more
end-user-oriented information. Also see @subpage dev_doc for developer notes.
## More information.
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
advanced building strategies and other development notes.
## Test Framework
There is PyDoc generated documentation available for the VPP test framework.
See @ref test_framework_doc for details.
advanced building strategies and development notes.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
# Temporary until Cavium upstreams their work
cavium-dpdk_configure = \
src_dir=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
dst_dir=$(PACKAGE_BUILD_DIR) ; \
tar -C $${src_dir} -cf - . | tar -C $${dst_dir} -xf - ; \
cd $${dst_dir} ; \
: colossal hemorrhoid to configure headroom ; \
if [ x$($(PACKAGE)_configure_args_$(PLATFORM)) = "x" ] ; then \
HR=256 ; \
else \
dpdk_configure_args=$($(PACKAGE)_configure_args_$(PLATFORM)) ; \
if [ $$dpdk_configure_args = "--with-headroom=256" ] ; then \
HR=256 ; \
elif [ $$dpdk_configure_args = "--with-headroom=384" ] ; then \
HR=384 ; \
else \
HR=256 ; \
fi ; \
fi ; \
env HR=$$HR \
spp -o \
$(PACKAGE_BUILD_DIR)/config/common_linuxapp \
$(PACKAGE_BUILD_DIR)/config/common_linuxapp.spp \
; \
env $(CONFIGURE_ENV) \
make config T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
CC=aarch64-thunderx-linux-gnu-gcc V=0 \
RTE_SDK=$(PACKAGE_BUILD_DIR) \
RTE_TARGET=arm-default-linuxapp-gcc
# Note: add e.g. "-O0" to EXTRA_CFLAGS if desired: EXTRA_CFLAGS='-g -O0'
cavium-dpdk_make_args = install T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
CC=aarch64-thunderx-linux-gnu-gcc V=0 \
RTE_SDK=$(PACKAGE_BUILD_DIR) \
RTE_TARGET=arm-default-linuxapp-gcc
cavium-dpdk_install = \
src_dir=$(PACKAGE_BUILD_DIR) ; \
dst_dir=$(PACKAGE_INSTALL_DIR) ; \
tar -h -C $${src_dir}/arm64-thunderx-linuxapp-gcc -cf - . \
| tar -C $${dst_dir} -xf -
# dpdk libraries end up in .../lib not .../lib64. Fix it.
cavium-dpdk_post_install = \
if [ "$(arch_lib_dir)" != "lib" ] ; then \
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) ; \
cd $(PACKAGE_INSTALL_DIR)/lib ; \
tar cf - . | ( cd $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir); tar xf - ) ; \
fi
# nothing to install, all static libraries
cavium-dpdk_image_include = echo

View File

@ -1,4 +1,9 @@
DPDK_MARCH = $(strip $($(PLATFORM)_dpdk_arch))
ifeq ($(DPDK_MARCH),)
DPDK_MARCH="native"
endif
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
@ -8,25 +13,12 @@ endif
DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_MARCH=$(DPDK_MARCH) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
ifneq ($(DPDK_PLATFORM_TARGET),)
DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
endif
dpdk_configure = echo
DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
endif
dpdk_make_args = $(DPDK_MAKE_ARGS) config
dpdk_configure = echo
dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install
dpdk_install = make $(DPDK_MAKE_ARGS) build

View File

@ -1,3 +1,5 @@
g2_source = src
g2_configure_depend = vppinfra-install
g2_configure_args = --disable-vlib --disable-svm --enable-g2
g2_CPPFLAGS = $(call installed_includes_fn, vppinfra)
g2_LDFLAGS = $(call installed_libs_fn, vppinfra)

View File

@ -1,9 +1,9 @@
gmod_configure_depend = vpp-install
gmod_configure_depend = vppinfra-install svm-install
gmod_configure_args = --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/ganglia
gmod_CPPFLAGS = $(call installed_includes_fn, vpp)
gmod_CPPFLAGS = $(call installed_includes_fn, vppinfra svm)
gmod_CPPFLAGS += -I/usr/include/apr-1.0 -I/usr/include/apr-1 -I/usr/include
gmod_LDFLAGS = $(call installed_libs_fn, vpp)
gmod_LDFLAGS = $(call installed_libs_fn, vppinfra svm)
gmod_image_include = echo $(arch_lib_dir)/ganglia/libgmodvpp.so etc

View File

@ -1,4 +1,5 @@
perftool_source = src
perftool_configure_depend = vppinfra-install
perftool_configure_args = --disable-vlib --disable-svm --enable-perftool
perftool_CPPFLAGS = $(call installed_includes_fn, vppinfra)
perftool_LDFLAGS = $(call installed_libs_fn, vppinfra)

View File

@ -1,5 +1,47 @@
sample-plugin_source = src
sample-plugin_configure_subdir = examples/sample-plugin
sample-plugin_configure_depend = vpp-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
sample-plugin_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install \
vnet-install \
vpp-install \
vpp-api-test-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
openssl \
svm \
vlib \
vlib-api \
vnet \
vpp \
vpp-api-test)
sample-plugin_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
openssl \
svm \
vlib \
vlib-api \
vnet \
vpp \
vpp-api-test)
sample-plugin_post_install = \
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
sample-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
ifneq ($($(PLATFORM)_uses_dpdk),no)
sample-plugin_configure_args = --with-dpdk
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
sample-plugin_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
sample-plugin_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
sample-plugin_configure_depend += dpdk-install
sample-plugin_CPPFLAGS += $(call installed_includes_fn, dpdk)
sample-plugin_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -0,0 +1,5 @@
svm_top_srcdir = $(call find_source_fn,svm)
svm_configure_depend = vppinfra-install
svm_CPPFLAGS = $(call installed_includes_fn, vppinfra)
svm_LDFLAGS = $(call installed_libs_fn, vppinfra)

View File

@ -0,0 +1,6 @@
vlib-api-cavium-dpdk_source = vlib-api
vlib-api-cavium-dpdk_configure_depend = vppinfra-install svm-install vlib-cavium-dpdk-install
vlib-api-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib-cavium-dpdk)
vlib-api-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib-cavium-dpdk)

View File

@ -0,0 +1,4 @@
vlib-api_configure_depend = vppinfra-install svm-install vlib-install
vlib-api_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib)
vlib-api_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib)

View File

@ -0,0 +1,7 @@
vlib-cavium-dpdk_source = vlib
vlib-cavium-dpdk_configure_depend = vppinfra-install cavium-dpdk-install
vlib-cavium-dpdk_configure_args += --with-dpdk
vlib-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra cavium-dpdk)
vlib-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra cavium-dpdk)

View File

@ -0,0 +1,16 @@
vlib_configure_depend = vppinfra-install
vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra)
vlib_LDFLAGS = $(call installed_libs_fn, vppinfra)
ifneq ($($(PLATFORM)_uses_dpdk),no)
vlib_configure_args += --with-dpdk
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vlib_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vlib_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vlib_configure_depend += dpdk-install
vlib_CPPFLAGS += $(call installed_includes_fn, dpdk)
vlib_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -0,0 +1,29 @@
vnet-cavium-dpdk_source = vnet
vnet-cavium-dpdk_configure_depend = \
vppinfra-install \
cavium-dpdk-install \
svm-install \
vlib-api-cavium-dpdk-install \
vlib-cavium-dpdk-install
vnet-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
cavium-dpdk \
openssl \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk)
vnet-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
cavium-dpdk \
openssl \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk)
# Platform dependent configure flags
vnet-cavium-dpdk_configure_args += $(vnet-cavium-dpdk_configure_args_$(PLATFORM))

View File

@ -0,0 +1,41 @@
vnet_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install
vnet_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
svm \
vlib \
vlib-api)
vnet_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
svm \
vlib \
vlib-api)
ifeq ($($(PLATFORM)_enable_tests),yes)
vnet_configure_args += --enable-tests
endif
# Platform dependent configure flags
vnet_configure_args += $(vnet_configure_args_$(PLATFORM))
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
vnet_CPPFLAGS += $(call installed_includes_fn, openssl)
vnet_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vnet_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vnet_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vnet_configure_depend += dpdk-install
vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -0,0 +1,32 @@
vpp-api-test-cavium-dpdk_source = vpp-api-test
vpp-api-test-cavium-dpdk_configure_depend = \
vppinfra-install \
cavium-dpdk-install \
svm-install \
vlib-api-cavium-dpdk-install \
vlib-cavium-dpdk-install \
vnet-cavium-dpdk-install \
vpp-cavium-dpdk-install
#
vpp-api-test-cavium-dpdk_configure_args = --with-dpdk
vpp-api-test-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
cavium-dpdk \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk \
vnet-cavium-dpdk \
vpp-cavium-dpdk)
vpp-api-test-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
cavium-dpdk \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk \
vnet-cavium-dpdk \
vpp-cavium-dpdk)

View File

@ -0,0 +1,35 @@
vpp-api-test_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install \
vnet-install \
vpp-install
vpp-api-test_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
svm \
vlib \
vlib-api \
vnet \
vpp)
vpp-api-test_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
svm \
vlib \
vlib-api \
vnet \
vpp)
ifneq ($($(PLATFORM)_uses_dpdk),no)
vpp-api-test_configure_args = --with-dpdk
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vpp-api-test_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vpp-api-test_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vpp-api-test_configure_depend += dpdk-install
vpp-api-test_CPPFLAGS += $(call installed_includes_fn, dpdk)
vpp-api-test_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -0,0 +1,23 @@
vpp-api_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install \
vnet-install \
vpp-install
vpp-api_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
svm \
vlib \
vlib-api \
vnet \
vpp)
vpp-api_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
svm \
vlib \
vlib-api)
vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include

View File

@ -0,0 +1,30 @@
vpp-cavium-dpdk_source = vpp
vpp-cavium-dpdk_configure_depend = \
vppinfra-install \
cavium-dpdk-install \
svm-install \
vlib-api-cavium-dpdk-install \
vlib-cavium-dpdk-install \
vnet-cavium-dpdk-install
# Platform dependent configure flags
vpp-cavium-dpdk_configure_args += $(vpp-cavium-dpdk_configure_args_$(PLATFORM))
vpp-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
cavium-dpdk \
openssl \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk \
vnet-cavium-dpdk)
vpp-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
cavium-dpdk \
openssl \
svm \
vlib-cavium-dpdk \
vlib-api-cavium-dpdk \
vnet-cavium-dpdk)

View File

@ -1,5 +1,11 @@
vpp_source = src
vpp_configure_depend = \
vppinfra-install \
svm-install \
vlib-api-install \
vlib-install \
vnet-install \
#
ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
vpp_configure_args = --enable-dpdk-shared
else
@ -10,8 +16,25 @@ endif
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
vpp_CPPFLAGS =
vpp_LDFLAGS =
vpp_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
svm \
vlib \
vlib-api \
vnet)
vpp_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
svm \
vlib \
vlib-api \
vnet)
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
vpp_CPPFLAGS += $(call installed_includes_fn, openssl)
vpp_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
@ -19,17 +42,7 @@ vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vpp_configure_depend += dpdk-install
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
vpp_CPPFLAGS += -I/usr/include/dpdk
endif
ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
vpp_configure_args += --with-dpdk-mlx5-pmd
endif
else
vpp_configure_args += --disable-dpdk-plugin
endif
ifeq ($($(PLATFORM)_enable_tests),yes)
vpp_configure_args += --enable-tests
endif

View File

@ -0,0 +1,5 @@
ifeq ($($(PLATFORM)_enable_tests),yes)
vppinfra_configure_args += --enable-tests
endif

View File

@ -25,65 +25,34 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
\
: generate file manifests ; \
find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
| sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
| sed -e 's:.*:../& /usr/bin:' \
> deb/debian/vpp.install ; \
\
: core api definitions ; \
./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp.install ; \
\
: need symbolic links in the lib pkg ; \
find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
-print | egrep -e '*\.so\.*\.*\.*' \
| grep -v plugins\/ \
| sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:' \
> deb/debian/vpp-lib.install ; \
\
: vnet api definitions ; \
./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-lib.install ; \
\
: dev package ; \
./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dev.install ; \
\
: plugins package ; \
./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-plugins.install ; \
\
: vpp-api-lua package ; \
./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-lua.install ; \
\
: vpp-api-java package ; \
./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-api-java.install ; \
: dpdk headers ; \
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dpdk-dev.install ; \
\
: bin package needs startup config ; \
echo ../../src/vpp/conf/startup.conf /etc/vpp \
echo ../../vpp/conf/startup.conf /etc/vpp \
>> deb/debian/vpp.install ; \
\
: and sysctl config ; \
echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
>> deb/debian/vpp.install ; \
\
: bash completion for vppctl ; \
echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
>> deb/debian/vpp.install ; \
\
: move dictionary of vppctl commands ; \
echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
echo ../../vpp/conf/80-vpp.conf /etc/sysctl.d \
>> deb/debian/vpp.install ; \
\
: dev package needs a couple of additions ; \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
>> deb/debian/vpp-dev.install; \
done; \
echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
\
: generate changelog; \
./scripts/generate-deb-changelog \
@ -94,3 +63,15 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
dpkg-buildpackage -us -uc -b \
)
.PHONY: install-rpm
install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
@$(BUILD_ENV) ; \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) \
$(patsubst %,%-install, \
$(ROOT_PACKAGES)) || exit 1; \
\
cd rpm ; \
rpmbuild -bb --define "_topdir $$PWD" vpp.spec ; \
mv $$(find RPMS -name \*.rpm -type f) ..

View File

@ -15,24 +15,16 @@
arm32_arch = native
arm32_native_tools = vppapigen
arm32_uses_dpdk = yes
arm32_uses_dpdk = no
arm32_uses_openssl = no
arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
jvpp gmod
vpp-japi gmod
vlib_configure_args_arm32 = --with-pre-data=128
vnet_configure_args_arm32 = --with-dpdk --without-libssl
vpp_configure_args_arm32 = --with-dpdk --without-libssl
arm32_dpdk_arch = "armv7a"
arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
CONFIG_RTE_EAL_IGB_UIO=y \
CONFIG_RTE_LIBRTE_E1000_PMD=y \
CONFIG_RTE_MAX_LCORE=4 \
CONFIG_RTE_MAX_NUMA_NODES=1"
vnet_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr
vpp_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror

View File

@ -1,66 +0,0 @@
# Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration for NXP DPAA2 ARM64 based platform
dpaa2_arch = aarch64
dpaa2_os = linux-gnu
dpaa2_target = aarch64-linux-gnu
dpaa2_mtune = cortex-A57
dpaa2_march = "armv8-a+fp+simd+crc+crypto"
dpaa2_cross_ldflags = \
-Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
-Wl,-rpath=/usr/lib64
dpaa2_native_tools = vppapigen
dpaa2_root_packages = vpp vlib vlib-api vnet svm vpp-api-test
# DPDK configuration parameters
dpaa2_uses_dpdk = yes
# Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
# installed DPDK libraries and headers.
ifeq ($(PLATFORM),dpaa2)
ifneq ($(DPDK_PATH),)
dpaa2_uses_dpdk = yes
dpaa2_uses_external_dpdk = yes
dpaa2_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
dpaa2_dpdk_lib_dir = $(DPDK_PATH)/lib
else
# compile using internal DPDK + NXP DPAA2 Driver patch
dpaa2_dpdk_arch = "armv8a"
dpaa2_dpdk_target = "arm64-dpaa2-linuxapp-gcc"
dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
endif
endif
vpp_configure_args_dpaa2 = --with-dpdk --without-libssl \
--with-sysroot=$(SYSROOT)
vnet_configure_args_dpaa2 = --with-dpdk --without-libssl \
--with-sysroot=$(SYSROOT)
# Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
vlib_configure_args_dpaa2 = --with-pre-data=256
dpaa2_debug_TAG_CFLAGS = -g -O2 -DCLIB_DEBUG -fPIC -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_debug_TAG_LDFLAGS = -g -O2 -DCLIB_DEBUG -fstack-protector-all \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
# Use -rdynamic is for stack tracing, O0 for debugging....default is O2
# Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
dpaa2_TAG_CFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
dpaa2_TAG_LDFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
-mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6

Some files were not shown because too many files have changed in this diff Show More