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
879 changed files with 86503 additions and 215817 deletions

12
.gitignore vendored
View File

@ -8,14 +8,12 @@
/build-root/packages-vpp/
/build-root/path_setup
/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/*.deb
/build-root/*.rpm
/build-root/*.changes
/build-config.mk
/vpp-api/python/vpp_papi/vpp_papi.py
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/path_setup
/tools/
# start autotools ignore
@ -59,16 +57,6 @@ test-driver
# cscope and ctags
/cscope.*
/tags
# ggtags
GPATH
GRTAGS
GTAGS
# Generated documentation
/build-root/docs
# indent backup files
*.BAK
# Python bytecode
*.pyc

View File

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

View File

@ -30,7 +30,6 @@ OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
DEB_DEPENDS += doxygen graphviz
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
else
@ -40,8 +39,9 @@ endif
RPM_DEPENDS_GROUPS = 'Development Tools'
RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
RPM_DEPENDS += doxygen graphviz
#RPM_DEPENDS += doxygen # TODO
EPEL_DEPENDS = libconfuse-devel ganglia-devel
#EPEL_DEPENDS += graphviz # TODO
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
@ -49,12 +49,11 @@ endif
ifeq ($(findstring y,$(UNATTENDED)),y)
CONFIRM=-y
FORCE=--force-yes
endif
.PHONY: help bootstrap wipe wipe-release build build-release rebuild rebuild-release
.PHONY: run run-release debug debug-release build-vat run-vat pkg-deb pkg-rpm
.PHONY: ctags cscope doxygen wipe-doxygen plugins plugins-release
.PHONY: ctags cscope
help:
@echo "Make Targets:"
@ -64,8 +63,6 @@ help:
@echo " wipe-release - wipe all products of release build "
@echo " build - build debug binaries"
@echo " build-release - build release binaries"
@echo " plugins - build debug plugin binaries"
@echo " plugins-release - build release plugin binaries"
@echo " rebuild - wipe and build debug binares"
@echo " rebuild-release - wipe and build release binares"
@echo " run - run debug binary"
@ -77,10 +74,7 @@ help:
@echo " pkg-deb - build DEB packages"
@echo " pkg-rpm - build RPM packages"
@echo " ctags - (re)generate ctags database"
@echo " gtags - (re)generate gtags database"
@echo " cscope - (re)generate cscope database"
@echo " doxygen - (re)generate documentation"
@echo " wipe-doxygen - wipe all generated documentation"
@echo ""
@echo "Make Arguments:"
@echo " V=[0|1] - set build verbosity level"
@ -132,11 +126,11 @@ bootstrap: $(BR)/.bootstrap.ok
install-dep:
ifeq ($(OS_ID),ubuntu)
ifeq ($(OS_VERSION_ID),14.04)
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
@sudo -E add-apt-repository ppa:openjdk-r/ppa $(CONFIRM)
@sudo -E apt-get update
@sudo apt-get $(CONFIRM) install software-properties-common
@sudo add-apt-repository $(CONFIRM) ppa:openjdk-r/ppa
@sudo apt-get update
endif
@sudo -E apt-get $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
@sudo apt-get $(CONFIRM) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo yum install $(CONFIRM) $(RPM_DEPENDS)
@ -166,24 +160,16 @@ wipe-release: $(BR)/.bootstrap.ok
rebuild-release: wipe-release build-release
plugins: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,plugins-install)
plugins-release: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM),plugins-install)
STARTUP_DIR ?= $(PWD)
ifeq ("$(wildcard $(STARTUP_CONF))","")
define run
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
@echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n"
@cd $(STARTUP_DIR) && \
sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64/vpp_plugins
@cd $(STARTUP_DIR) && sudo $(1) $(MINIMAL_STARTUP_CONF)
endef
else
define run
@cd $(STARTUP_DIR) && \
sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64/vpp_plugins
@cd $(STARTUP_DIR) && sudo $(1) -c $(STARTUP_CONF)
endef
endif
@ -195,16 +181,16 @@ endif
.FORCE:
run:
$(call run, $(BR)/install-$(PLATFORM)_debug-native)
$(call run, $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp)
run-release:
$(call run, $(BR)/install-$(PLATFORM)-native)
$(call run, $(BR)/install-$(PLATFORM)-native/vpp/bin/vpp)
debug:
$(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
$(call run, $(GDB) $(GDB_ARGS) --args $(BR)/install-$(PLATFORM)_debug-native/vpp/bin/vpp)
debug-release:
$(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args)
$(call run, $(GDB) $(GDB_ARGS) --args $(BR)/install-$(PLATFORM)-native/vpp/bin/vpp)
build-vat:
$(call make,$(PLATFORM)_debug,vpp-api-test-install)
@ -222,18 +208,11 @@ ctags: ctags.files
@ctags --totals --tag-relative -L $<
@rm $<
gtags: ctags
@gtags --gtagslabel=ctags
cscope: cscope.files
@cscope -b -q -v
#
# Build the documentation
#
DOXY_INPUT ?= \
DOXY_INPUT = \
README.md \
vppinfra \
svm \
@ -243,6 +222,7 @@ DOXY_INPUT ?= \
vpp \
vpp-api
.PHONY: doxygen
doxygen:
@mkdir -p "$(BR)/docs"
ROOT="$(WS_ROOT)" \

View File

@ -27,7 +27,7 @@ Directory name | Description
g2 | Event log visualization tool
gmod | perf related?
perftool | Performance tool
plugins | VPP bundled plugins directory
sample-plugin | A sample plugin
@ref svm | Shared virtual memory allocation library
test | Unit tests
@ref vlib | VPP application library source

View File

@ -4,11 +4,6 @@ ifeq ($(DPDK_MARCH),)
DPDK_MARCH="native"
endif
DPDK_TUNE = $(strip $($(PLATFORM)_mtune))
ifeq ($(DPDK_TUNE),)
DPDK_TUNE="generic"
endif
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
@ -19,20 +14,9 @@ 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_TUNE=$(DPDK_TUNE) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
ifneq ($(DPDK_PLATFORM_TARGET),)
DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
endif
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_configure = echo
dpdk_make_args = $(DPDK_MAKE_ARGS) config

View File

@ -1,43 +0,0 @@
plugins_configure_depend = \
vppinfra-install \
vlib-api-install \
vpp-api-test-install \
vnet-install \
vlib-install
plugins_CPPFLAGS = $(call installed_includes_fn, \
vppinfra \
vlib \
vnet \
svm \
vpp-api-test \
vlib-api)
plugins_LDFLAGS = $(call installed_libs_fn, \
vppinfra \
vlib \
vlib-api)
ifeq ($($(PLATFORM)_enable_tests),yes)
plugins_configure_args += --enable-tests
endif
# Platform dependent configure flags
plugins_configure_args += $(plugins_configure_args_$(PLATFORM))
# include & link with openssl only if needed
ifneq ($($(PLATFORM)_uses_openssl),no)
plugins_CPPFLAGS += $(call installed_includes_fn, openssl)
plugins_LDFLAGS += $(call installed_libs_fn, openssl)
endif
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
plugins_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
plugins_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
plugins_configure_depend += dpdk-install
plugins_CPPFLAGS += $(call installed_includes_fn, dpdk)
plugins_LDFLAGS += $(call installed_libs_fn, dpdk)
endif
endif

View File

@ -0,0 +1,47 @@
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

@ -31,7 +31,6 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
: 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 ; \
\
@ -39,10 +38,6 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
./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 ; \
\
: dpdk headers ; \
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
deb/debian/vpp-dpdk-dev.install ; \
@ -56,14 +51,8 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
>> deb/debian/vpp.install ; \
\
: dev package needs a couple of additions ; \
echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../../vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../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 \
@ -83,7 +72,6 @@ install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
$(ROOT_PACKAGES)) || exit 1; \
\
cd rpm ; \
rpmbuild -bb --define "_topdir $$PWD" --define \
"_install_dir $(INSTALL_PREFIX)$(ARCH)" vpp.spec ; \
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-ipsec --without-ipv6sr
vpp_configure_args_arm32 = --with-dpdk --without-ipsec --without-ipv6sr
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-ipsec \
--without-ipv6sr --with-sysroot=$(SYSROOT)
vnet_configure_args_dpaa2 = --with-dpdk --without-ipsec \
--without-ipv6sr --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

View File

@ -11,10 +11,10 @@ qppc_root_packages = vppinfra vlib vlib-api vnet svm \
vpp vpp-api-test
vnet_configure_args_qppc = \
--without-ipsec --without-ipv6sr
--without-ipsec --without-vcgn --without-ipv6sr
vpp_configure_args_qppc = \
--without-ipsec --without-ipv6sr
--without-ipsec --without-vcgn --without-ipv6sr
vlib_configure_args_qppc = --with-pre-data=128

View File

@ -15,10 +15,10 @@ thunder_root_packages = vppinfra vlib-cavium-dpdk vnet-cavium-dpdk cavium-dpdk \
vpp-cavium-dpdk vpp-api-test-cavium-dpdk
vnet-cavium-dpdk_configure_args_thunder = \
--with-dpdk --without-ipsec --without-ipv6sr
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
vpp-cavium-dpdk_configure_args_thunder = \
--with-dpdk --without-ipsec --without-ipv6sr
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
cavium-dpdk_configure_args_thunder = --with-headroom=256

View File

@ -0,0 +1,42 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# 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.
# vector packet processor
virl_arch = native
virl_native_tools = vppapigen
virl_uses_dpdk = yes
virl_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
vpp-api
vpp_configure_args_virl = --with-dpdk
vnet_configure_args_virl = --with-dpdk --with-virl
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_virl = --with-pre-data=128
# Override default -march and CONFIG_RTE_MACHINE settings
# Otherwise, illgal instructions will result
virl_march=corei7
virl_dpdk_arch=corei7
virl_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
virl_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
virl_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC
virl_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC

View File

@ -13,15 +13,6 @@
# vector packet processor
vpp_arch = native
ifeq ($(shell uname -m),x86_64)
vpp_march = corei7 # Nehalem Instruction set
vpp_mtune = corei7-avx # Optimize for Sandy Bridge
vpp_dpdk_arch = corei7
else
vpp_march = native
vpp_mtune = generic
vpp_dpdk_arch = native
endif
vpp_native_tools = vppapigen
vpp_uses_dpdk = yes
@ -30,7 +21,7 @@ vpp_uses_dpdk = yes
# vpp_enable_tests = yes
vpp_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
vpp-api gmod plugins
vpp-api gmod
vpp_configure_args_vpp = --with-dpdk
vnet_configure_args_vpp = --with-dpdk
@ -38,8 +29,6 @@ vnet_configure_args_vpp = --with-dpdk
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
vlib_configure_args_vpp = --with-pre-data=128
plugins_configure_args_vpp = --with-dpdk
# DPDK configuration parameters
# vpp_uses_external_dpdk = yes
# vpp_dpdk_inc_dir = /usr/include/dpdk
@ -51,9 +40,9 @@ vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \

View File

@ -13,13 +13,6 @@
# vector packet processor
vpp_lite_arch = native
ifeq ($(shell uname -m),x86_64)
vpp_lite_march = corei7 # Nehalem Instruction set
vpp_lite_mtune = corei7-avx # Optimize for Sandy Bridge
else
vpp_lite_march = native
vpp_lite_mtune = generic
endif
vpp_lite_native_tools = vppapigen
vpp_lite_uses_dpdk = no
@ -29,15 +22,15 @@ vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
vlib_configure_args_vpp_lite = --with-pre-data=128
vnet_configure_args_vpp_lite =
vpp_configure_args_vpp_lite =
vnet_configure_args_vpp_lite = --without-vcgn
vpp_configure_args_vpp_lite = --without-vcgn
vpp_lite_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_lite_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC -Werror
vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC -Werror
vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector -fPIC -Werror

View File

@ -220,11 +220,6 @@ else
endif
export MARCH
MTUNE = $(strip $($(PLATFORM)_mtune))
ifeq ($(MTUNE),)
MTUNE = generic
endif
######################################################################
# Generic build stuff
######################################################################

View File

@ -47,13 +47,6 @@ Description: Vector Packet Processing--runtime libraries
vlib-api - binary API library
vnet - network stack library
Package: vpp-plugins
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Vector Packet Processing--runtime plugins
This package contains VPP plugins
.
Package: vpp-dpdk-dkms
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}

View File

@ -1,4 +0,0 @@
#!/bin/sh -e
# Add the vpp group
groupadd -f -r vpp

View File

@ -1,162 +0,0 @@
#!/usr/bin/emacs --script
;; Insert style boilerplate if it's not already there
;;
;; Breaking the string in half keeps emacs
;; from trying to interpret the local variable
;; settings e.g. when it reads the lisp source code
(defun insert-style-boilerplate () (interactive)
(save-excursion
(goto-char (point-min))
(if (eq nil (search-forward "coding-style-patch-verification"
(point-max) t))
(let ((junk 0)) (goto-char (point-max))
(insert "
/*
* fd.io coding-style-patch-verification: ON
*
* Local Var" "iables:
* eval: (c-set-style \"gnu\")
* End:
*/")))))
;; (cons xxx <list>) means insert xxx at the head of <list>
;; Build a sorted list of *INDENT-OFF* lines, by searching
;; backwards. The initial (setq indent-offset-list nil)
;; results in (cdr <last-cell>) nil, which makes it a proper list
(defun find-indent-offs () (interactive)
(save-excursion
(if (boundp 'indent-offset-list)
(makunbound 'indent-offset-list))
(setq indent-offset-list nil)
(goto-char (point-max))
(while (search-backward "*INDENT-OFF*" (point-min) t)
(move-beginning-of-line nil)
(setq indent-offset-list (cons (point) indent-offset-list))
(previous-line))))
;; Insert indent-off ... indent-on brackets around
;; a certain xxx_foreach macro, etc. which "indent"
;; completely screws up. Doesn't handle nesting, of which there
;; are few examples (fortunately).
(defun fix-initializer (what) (interactive)
(find-indent-offs)
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp what (point-max) t)
(move-beginning-of-line nil)
(previous-line)
(let ((index 0)(pointval 0))
(while (and (< pointval (point))(elt indent-offset-list index))
(setq pointval (elt indent-offset-list index))
(setq index (1+ index)))
(if (not (eq pointval (point)))
(let ((junk 0))
(next-line)
(open-line 1)
(c-indent-line-or-region)
(insert "/* *INDENT-OFF* */")
(search-forward "{")
(backward-char)
(forward-sexp)
(move-end-of-line nil)
(newline 1)
(c-indent-line-or-region)
(insert "/* *INDENT-ON* */")
(find-indent-offs))
(search-forward "*INDENT-ON*"))))))
(defun fix-pool-foreach () (interactive)
(fix-initializer "pool_foreach *("))
(defun fix-pool-foreach-index () (interactive)
(fix-initializer "pool_foreach_index *("))
(defun fix-hash-foreach () (interactive)
(fix-initializer "hash_foreach *("))
(defun fix-hash-foreach-pair () (interactive)
(fix-initializer "hash_foreach_pair *("))
(defun fix-hash-foreach-mem () (interactive)
(fix-initializer "hash_foreach_mem *("))
(defun fix-clib-fifo-foreach () (interactive)
(fix-initializer "clib_fifo_foreach *("))
(defun fix-clib-bitmap-foreach () (interactive)
(fix-initializer "clib_bitmap_foreach *("))
(defun fix-foreach-ip-interface-address () (interactive)
(fix-initializer "foreach_ip_interface_address *("))
(defun fix-vlib-register-thread () (interactive)
(fix-initializer "VLIB_REGISTER_THREAD *("))
(defun fix-vlib-cli-command () (interactive)
(fix-initializer "VLIB_CLI_COMMAND *("))
(defun fix-vlib-register-node () (interactive)
(fix-initializer "VLIB_REGISTER_NODE *("))
(defun fix-reply-macro2 () (interactive)
(fix-initializer "REPLY_MACRO2 *("))
(defun fix-vnet-device-class () (interactive)
(fix-initializer "VNET_DEVICE_CLASS *("))
(defun fix-vnet-hw-interface-class () (interactive)
(fix-initializer "VNET_HW_INTERFACE_CLASS *("))
(defun fix-clib-packed () (interactive)
(fix-initializer "CLIB_PACKED *("))
(defun fix-vl-api-packed () (interactive)
(fix-initializer "VL_API_PACKED *("))
;; Driver routine which runs the set of functions
;; defined above, as well as the bottom boilerplate function
(defun fd-io-styleify () (interactive)
(fix-pool-foreach)
(fix-pool-foreach-index)
(fix-hash-foreach)
(fix-hash-foreach-pair)
(fix-hash-foreach-mem)
(fix-foreach-ip-interface-address)
(fix-clib-fifo-foreach)
(fix-clib-bitmap-foreach)
(fix-vlib-register-thread)
(fix-vlib-cli-command)
(fix-vlib-register-node)
(fix-reply-macro2)
(fix-vnet-device-class)
(fix-vnet-hw-interface-class)
(fix-clib-packed)
(fix-vl-api-packed)
(insert-style-boilerplate)
(if (boundp 'indent-offset-list)
(makunbound 'indent-offset-list)))
;; When run as a script, this sexp
;; walks the list of files supplied on the command line.
;;
;; (elt argv index) returns nil if you M-x eval-buffer
;; or M-x load-file the file, so we won't accidentally
;; evaluate (save-buffers-kill-emacs)...
(let ((file-index 0))
(if (elt argv file-index)
(while (elt argv file-index)
(find-file (elt argv file-index))
(fd-io-styleify)
(message "Done %s..." (elt argv file-index))
(setq file-index (1+ file-index))))
(if (> file-index 0)
(let ((junk 0))
(message "Save and quit...")
(save-buffers-kill-emacs t))))

View File

@ -24,10 +24,19 @@ nil
"
AC_INIT(" plugin-name "_plugin, 1.0)
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PROG_LIBTOOL
AM_PROG_AS
AC_PROG_CC
AM_PROG_CC_C_O
AC_ARG_WITH(plugin-toolkit,
AC_HELP_STRING([--with-plugin-toolkit],
[build using the vpp toolkit]),
[with_plugin_toolkit=${prefix}/include],
[with_plugin_toolkit=.])
AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test \"$with_plugin_toolkit\" != \".\")
AC_OUTPUT([Makefile])
")

View File

@ -26,9 +26,9 @@ nil
# 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.
@ -37,18 +37,12 @@ nil
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall
AM_LDFLAGS = -module -shared -avoid-version
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
vpppluginsdir = ${libdir}/vpp_plugins
vppplugins_LTLIBRARIES = " plugin-name "_plugin.la
vppapitestplugins_LTLIBRARIES = " plugin-name "_test_plugin.la
AM_CFLAGS = -Wall -I@TOOLKIT_INCLUDE@
lib_LTLIBRARIES = " plugin-name "_plugin.la " plugin-name "_test_plugin.la
" plugin-name "_plugin_la_SOURCES = " plugin-name "/" plugin-name ".c \\
" plugin-name "/node.c \\
" plugin-name "/" plugin-name "_plugin.api.h
" plugin-name "/" plugin-name "_plugin.api.h
" plugin-name "_plugin_la_LDFLAGS = -module
BUILT_SOURCES = " plugin-name "/" plugin-name ".api.h
@ -60,17 +54,23 @@ SUFFIXES = .api.h .api
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \\
| vppapigen --input - --output $@ --show-name $@
noinst_HEADERS = \\
nobase_include_HEADERS = \\
" plugin-name "/" plugin-name "_all_api_h.h \\
" plugin-name "/" plugin-name "_msg_enum.h \\
" plugin-name "/" plugin-name ".api.h
" plugin-name "_test_plugin_la_SOURCES = \\
" plugin-name "/" plugin-name "_test.c " plugin-name "/" plugin-name "_plugin.api.h
" plugin-name "_test_plugin_la_LDFLAGS = -module
# Remove *.la files
if WITH_PLUGIN_TOOLKIT
install-data-hook:
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
mkdir /usr/lib/vpp_plugins || true
mkdir /usr/lib/vpp_api_test_plugins || true
cp $(prefix)/lib/" plugin-name "_plugin.so.*.*.* /usr/lib/vpp_plugins
cp $(prefix)/lib/" plugin-name "_test_plugin.so.*.*.* \\
/usr/lib/vpp_api_test_plugins
rm -f $(prefix)/lib/" plugin-name "_plugin.*
rm -f $(prefix)/lib/" plugin-name "_test_plugin.*
endif
")

View File

@ -3,8 +3,6 @@ Description=Vector Packet Processing Process
After=syslog.target network.target auditd.service
[Service]
ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
ExecStartPre=-/sbin/modprobe uio_pci_generic
ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf
Type=simple
Restart=on-failure

View File

@ -1,4 +1,4 @@
%define _vpp_install_dir ../%{_install_dir}
%define _vpp_install_dir ../install-vpp-native
%define _vpp_build_dir ../build-tool-native
%define _unitdir /lib/systemd/system
%define _topdir %(pwd)
@ -49,10 +49,6 @@ allocator (mheap.c), extendable printf-like interface built on top of vectors
time-based function calls (timer.c).
TODO: reference and describe only the .h files
%pre
# Add the vpp group
groupadd -f -r vpp
%install
#
# binaries
@ -67,7 +63,7 @@ install -p -m 755 %{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir}
mkdir -p -m755 %{buildroot}/etc/vpp
mkdir -p -m755 %{buildroot}/etc/sysctl.d
install -p -m 644 vpp.service %{buildroot}%{_unitdir}
install -p -m 644 ../../vpp/conf/startup.uiopcigeneric.conf %{buildroot}/etc/vpp/startup.conf
install -p -m 644 ../../vpp/conf/startup.conf %{buildroot}/etc/vpp
install -p -m 644 ../../vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
#
# libraries

View File

@ -1,77 +0,0 @@
#!/bin/bash
VPP_DIR=`dirname $0`/../../
EXIT_CODE=0
FIX="0"
CHECKSTYLED_FILES=""
UNCHECKSTYLED_FILES=""
# If the user provides --fix, then actually fix things
# Note: this is meant for use outside of the CI Jobs, by users cleaning things up
if [ $# -gt 0 ] && [ ${1} == '--fix' ]; then
FIX="1"
fi
# Check to make sure we have indent. Exit if we don't with an error message, but
# don't *fail*.
command -v indent > /dev/null
if [ $? != 0 ]; then
echo "Cound not find required commend \"indent\". Checkstyle aborted"
exit ${EXIT_CODE}
fi
indent --version
cd ${VPP_DIR}
git status
for i in `git ls-tree -r HEAD --name-only`;do
if [ -f ${i} ] && [ ${i} != "build-root/scripts/checkstyle.sh" ] && [ ${i} != "build-root/emacs-lisp/fix-coding-style.el" ]; then
grep -q "fd.io coding-style-patch-verification: ON" ${i}
if [ $? == 0 ]; then
CHECKSTYLED_FILES="${CHECKSTYLED_FILES} ${i}"
if [ ${FIX} == 0 ]; then
indent ${i} -o ${i}.out1 > /dev/null 2>&1
indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}.out2
diff -q ${i} ${i}.out2
else
indent ${i}
indent ${i}
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}
fi
if [ $? != 0 ]; then
EXIT_CODE=1
echo
echo "Checkstyle failed for ${i}."
echo "Run indent (twice!) as shown to fix the problem:"
echo "indent ${VPP_DIR}${i}"
echo "indent ${VPP_DIR}${i}"
fi
if [ -f ${i}.out1 ]; then
rm ${i}.out1
fi
if [ -f ${i}.out2 ]; then
rm ${i}.out2
fi
else
UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}"
fi
else
UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}"
fi
done
if [ ${EXIT_CODE} == 0 ]; then
echo "*******************************************************************"
echo "* VPP CHECKSTYLE SUCCESSFULLY COMPLETED"
echo "*******************************************************************"
else
echo "*******************************************************************"
echo "* VPP CHECKSTYLE FAILED"
echo "* CONSULT FAILURE LOG ABOVE"
echo "* NOTE: Running 'build-root/scripts/checkstyle.sh --fix' *MAY* fix the issue"
echo "*******************************************************************"
fi
exit ${EXIT_CODE}

View File

@ -1,2 +0,0 @@
#!/bin/sh
echo oper-160815

View File

@ -16,16 +16,16 @@ do
done
# sample plugin
paths=`(cd ..; find plugins/sample-plugin -type f -print | grep -v autom4te)`
paths=`(cd ..; find sample-plugin -type f -print | grep -v autom4te)`
for path in $paths
do
relpath=`echo $path | sed -e 's:.*plugins/::'`
relpath=`echo $path | sed -e 's:.*/sample-plugin/::'`
dir=`dirname $relpath`
if [ $dir = "sample-plugin" ] ; then
echo ../../$path /usr/share/doc/vpp/examples/plugins/sample-plugin >> $2
echo ../../$path /usr/share/doc/vpp/examples/sample-plugin >> $2
else
echo ../../$path \
/usr/share/doc/vpp/examples/plugins/$dir >> $2
/usr/share/doc/vpp/examples/$dir >> $2
fi
done

View File

@ -5,15 +5,6 @@ rm -rf dpdk-includes
mkdir dpdk-includes
(cd $1/dpdk/include; tar cfh - . | (cd ../../../dpdk-includes; tar xf -))
# If CDPATH is set, the "Change Directory" builtin (cd) will output the
# destination directory when a relative path is passed as an argument.
# In this case, this has the negative side effect of polluting the "paths"
# variable with the destination directory, breaking the package generation.
#
# Patient: Doctor! Doctor! It hurts when I do this...
# Doctor: Don't do that!
#
unset CDPATH
paths=`cd dpdk-includes; find . -type f -print`
rm -f $2

View File

@ -1,11 +0,0 @@
#!/bin/bash
rm -f $2
for i in ${1}/plugins/lib64/vpp_plugins/*.so; do
echo ../${i} /usr/lib/vpp_plugins >> ${2}
done
for i in ${1}/plugins/lib64/vpp_api_test_plugins/*.so; do
echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2}
done

View File

@ -30,7 +30,7 @@ if [ -n "${ADDS}" ]; then
print_changelog_item
fi
for TAG in $(git tag -l 'v[0-9][0-9].[0-9][0-9]' | sort -r ); do
for TAG in $(git tag -l 'v[0-9].[0-9].[0-9]' | sort -r ); do
VER=$(echo ${TAG}| sed -e 's/^v//')
DESC=$(git tag -l -n20 ${TAG} | tail -n+2 | sed -e 's/^ */ /')
print_changelog_item

View File

@ -4,10 +4,6 @@ TAG=$(git describe | cut -d- -f1 | sed -e 's/^v//')
ADD=$(git describe | cut -s -d- -f2)
CMT=$(git describe --dirty --match 'v*'| cut -s -d- -f3,4)
if [ -n "${BUILD_NUMBER}" ]; then
BLD="~b${BUILD_NUMBER}"
fi
if [ "$1" = "rpm-version" ]; then
echo ${TAG}
exit
@ -16,12 +12,12 @@ fi
if [ "$1" = "rpm-release" ]; then
[ -z "${ADD}" ] && echo release && exit
CMT=$(git describe --dirty --match 'v*'| cut -s -d- -f3,4 | sed 's/-/_/')
echo ${ADD}${CMT:+~${CMT}}${BLD}
echo ${ADD}~${CMT}
exit
fi
if [ -n "${ADD}" ]; then
echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
echo ${TAG}-${ADD}~${CMT}
else
echo ${TAG}
fi

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