Compare commits
1 Commits
v17.01-rc2
...
stable/tes
Author | SHA1 | Date | |
---|---|---|---|
24ba2fc8ce |
34
.gitignore
vendored
34
.gitignore
vendored
@ -1,5 +1,4 @@
|
||||
*~
|
||||
*.sw[op]
|
||||
|
||||
/build-root/.ccache
|
||||
/build-root/build-*/
|
||||
@ -9,16 +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-root/test-doc/
|
||||
/build-root/test-cov/
|
||||
/build-root/python/
|
||||
/build-config.mk
|
||||
/vpp-api/python/vpp_papi/vpp_papi.py
|
||||
/dpdk/*.tar.gz
|
||||
/dpdk/*.tar.xz
|
||||
/path_setup
|
||||
/tools/
|
||||
# start autotools ignore
|
||||
@ -54,7 +49,7 @@ test-driver
|
||||
.settings
|
||||
# stop autotools ignore
|
||||
|
||||
# OSX and some IDE
|
||||
# OSX and some IDE
|
||||
.DS_Store
|
||||
.idea/
|
||||
.project
|
||||
@ -62,29 +57,6 @@ test-driver
|
||||
# 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
|
||||
/vpp-api/python/build
|
||||
/vpp-api/python/dist
|
||||
/vpp-api/python/vpp_papi.egg-info
|
||||
/vpp-api/python/vpp_papi/memclnt.py
|
||||
/vpp-api/python/vpp_papi/vpe.py
|
||||
|
||||
# Build files in the test directory
|
||||
/test/*.ok
|
||||
|
@ -2,4 +2,3 @@
|
||||
host=gerrit.fd.io
|
||||
port=29418
|
||||
project=vpp
|
||||
defaultbranch=stable/1701
|
||||
|
24
README.md
24
README.md
@ -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
|
||||
---------------------- | -------------------------------------------
|
||||
@ -31,8 +25,9 @@ Directory name | Description
|
||||
doxygen | Documentation generator configuration
|
||||
dpdk | DPDK patches and build infrastructure
|
||||
g2 | Event log visualization tool
|
||||
gmod | perf related?
|
||||
perftool | Performance tool
|
||||
@ref 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
|
||||
@ -48,7 +43,7 @@ Directory name | Description
|
||||
ignore any @@ref labels in the above table.)
|
||||
|
||||
|
||||
## Getting started
|
||||
## 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
|
||||
@ -62,7 +57,7 @@ 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`
|
||||
@ -78,7 +73,7 @@ interest. To see the available targets run:
|
||||
make
|
||||
|
||||
|
||||
### Quick-start: Vagrant
|
||||
### Quick-start: Vagrant.
|
||||
|
||||
The directory `build-root/vagrant` contains a `VagrantFile` and supporting
|
||||
scripts to bootstrap a working VPP inside a Vagrant-managed Virtual Machine.
|
||||
@ -93,10 +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
|
||||
information.
|
||||
## More information.
|
||||
|
||||
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
|
||||
advanced building strategies and development notes.
|
||||
|
200
RELEASE.md
200
RELEASE.md
@ -1,200 +0,0 @@
|
||||
# Release Notes {#release_notes}
|
||||
|
||||
* @subpage release_notes_1701
|
||||
* @subpage release_notes_1609
|
||||
* @subpage release_notes_1606
|
||||
|
||||
@page release_notes_1701 Release notes for VPP 17.01
|
||||
|
||||
@note This release was for a while known as 16.12.
|
||||
@todo Release 17.01 needs release notes.
|
||||
|
||||
## Features
|
||||
|
||||
## Known issues
|
||||
|
||||
## Issues fixed
|
||||
|
||||
|
||||
@page release_notes_1609 Release notes for VPP 16.09
|
||||
|
||||
## Features
|
||||
|
||||
- [Integrated July 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_07.html)
|
||||
- DPDK-vhost is depreciated pending a complete rework of the original integration and
|
||||
addressing of rx performance deltas.
|
||||
- Patches required for DPDK 16.07:
|
||||
- Correctly setting the Packet Type in the IGB, IXGBE and i40e drivers.
|
||||
- Correctly setting checksum in the i40e driver.
|
||||
- NXP DPAA2 PMD Driver.
|
||||
- rte_delay (yield) functionality.
|
||||
|
||||
- Add “in tree” plugins:
|
||||
- IPv6 ILA.
|
||||
- iOAM.
|
||||
- Load Balancer.
|
||||
- SNAT.
|
||||
|
||||
- High-performance (line-rate) “neutron like” L4 port-filtering.
|
||||
|
||||
- API refactoring - addressing some of the issues around JVPP bindings.
|
||||
- Accommodating plugins [(e.g. NSH_SFC)](https://wiki.fd.io/view/NSH_SFC)
|
||||
- Binding for [python](https://wiki.fd.io/view/VPP/Python_API)
|
||||
|
||||
- LISP
|
||||
- L2 LISP overlays
|
||||
- Multitenancy
|
||||
- Multihoming
|
||||
- RTR mode
|
||||
- Map-resolver failover algorithm
|
||||
|
||||
- Support 64-bit vector lengths, huge shared-memory segments.
|
||||
|
||||
- Dynamic IP Feature ordering
|
||||
- IP Features can now specify features they appear before and after
|
||||
|
||||
- 16.09 Builds
|
||||
- Ubuntu 14.04 LTS - Trusty Tahr
|
||||
- Ubuntu 16.04 LTS - Xenial Xerus
|
||||
- CentOS 7
|
||||
- More information on [VPP wiki](https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages)
|
||||
|
||||
- Performance, characterize and document performance for this release
|
||||
[(more information on CSIT page)](https://wiki.fd.io/view/CSIT)
|
||||
|
||||
- IPv4 and IPv6 Scale - performance tests.
|
||||
- Bidirectional 10k/100k/1M flows.
|
||||
- 64B,570B, 1518B,9000B packet sizes.
|
||||
- IPv6 iACL - performance
|
||||
- DUT1 and DUT2 are configured with IPv6 routing, two static IPv6 /64 routes and IPv6 iAcl
|
||||
security whitelist ingress /64 filter entries applied on links.
|
||||
- TG traffic profile contains two L3 flow-groups (flow-group per direction, 253 flows per
|
||||
flow-group) with all packets containing Ethernet header, IPv6 header and generated payload.
|
||||
MAC addresses are matching MAC addresses of the TG node interfaces.
|
||||
|
||||
- L2XC VXLANoIPv4 - performance
|
||||
- DUT1 and DUT2 are configured with L2 cross-connect. VXLAN tunnels are configured between
|
||||
L2XCs on DUT1 and DUT2.
|
||||
- TG traffic profile contains two L3 flow-groups (flow-group per direction, 253 flows per
|
||||
flow-group) with all packets containing Ethernet header, IPv4 header with IP protocol=61
|
||||
and generated payload. MAC addresses are matching MAC addresses of the TG node interfaces.
|
||||
|
||||
- Documentation
|
||||
- Autogenerated CLI documentation.
|
||||
- Using doxygen to automate API/Node documentation.
|
||||
- [(available online)](https://docs.fd.io/vpp/16.09/)
|
||||
|
||||
- Resolved all static analysis issues found by Coverity
|
||||
- Beginning of 16.09 cycle: 505 issues.
|
||||
- Release: 0 outstanding issues.
|
||||
|
||||
|
||||
## Known issues
|
||||
|
||||
Issues in fd.io are tracked in [JIRA](https://jira.fd.io).
|
||||
|
||||
Issue | Description
|
||||
--- | ---
|
||||
VPP-391 | vpp debug version assert appeared in the process of start
|
||||
VPP-380 | Mapping algorithm compute wrong ea-bits when IPv4 prefix 0.0.0.0/0
|
||||
VPP-371 | load_one_plugin:63: Loaded plugin: message from vppctl
|
||||
VPP-367 | vpp packages need to depend on specific versions of each other
|
||||
VPP-312 | IP6 FIB gets in indeterminate state by duplicating commands
|
||||
VPP-224 | Lookup-in-vrf can not be set correctly
|
||||
VPP-206 | Fix classify table delete
|
||||
VPP-203 | Fix binary API for reading vpp node graph
|
||||
VPP-147 | Inconsistent behaviour when adding L2 FIB filter entry
|
||||
VPP-99 | VPP doesn't discard DHCPOFFER message with wrong XID
|
||||
|
||||
|
||||
## Issues fixed
|
||||
|
||||
Issues in fd.io are tracked in [JIRA](https://jira.fd.io).
|
||||
|
||||
Issue | Description
|
||||
--- | ---
|
||||
VPP-396 | Ubuntu systems Graphviz bug
|
||||
VPP-390 | vpp-lib rpm fails to include *.so symlinks, causing linking problems with out of tree builds
|
||||
VPP-388 | IPSec output feature assumes packets have been ethernet rewritten
|
||||
VPP-385 | ARP for indirect adjacencies not working correctly
|
||||
VPP-361 | Memory leak on delete of VXLAN over IPv6 tunnel
|
||||
VPP-357 | VNI not set correctly when removing LISP fwd entries
|
||||
VPP-349 | sw_interface_vhost_user_dump not working
|
||||
VPP-345 | net/enic: bad L4 checksum ptype set on ICMP packets
|
||||
VPP-340 | MAP-T wrong destination address
|
||||
VPP-330 | Use fifo to store LISP pending map-requests
|
||||
VPP-326 | map_add_domain VAT command: unable to configure domain with mtu parameter
|
||||
VPP-318 | The map_add_domain VAT command accepts invalid arguments
|
||||
VPP-315 | Fix "show vxlan-gpe" issue
|
||||
VPP-310 | Mapping algorithm compute wrong ea-bits
|
||||
VPP-239 | LISP IP forwarding does not tag packets that hit negative mapping entries
|
||||
VPP-235 | Invalid help in VAT for sw_interface_set_l2_bridge
|
||||
VPP-228 | Mapping algorithm sends packet to wrong IPv6 address
|
||||
VPP-214 | vpp-api-test: api_ipsec_sad_add_del_entry: vector "ck" not initialized
|
||||
VPP-200 | VPP - TAP port create problem
|
||||
VPP-189 | Coverity Issues for 16.09
|
||||
VPP-184 | u16 translating to char ,not short
|
||||
VPP-179 | Adjacency share-count botch
|
||||
VPP-163 | "show ip6 interface" ignores non-global addresses
|
||||
VPP-155 | Netmap: Inconsistency in interface state between "show hardware" and "show interface"
|
||||
VPP-145 | Dynamically compute IP feature ordering based on constraints
|
||||
VPP-137 | VPP sends ARP with wrong requested IP
|
||||
VPP-118 | JVpp: 0 length arrays not handled properly in VPP responses
|
||||
VPP-112 | linux kernel info missing from build log
|
||||
VPP-110 | vxlan encap node should never touch a deleted tunnel
|
||||
VPP-107 | RPM build broken in master
|
||||
VPP-92 | segment routing is not properly filling out the segment list
|
||||
VPP-91 | segment routing add/del tunnel lookup doesn't work
|
||||
VPP-84 | af_packet throws a fatal error on EAGAIN
|
||||
VPP-74 | Clang compile fails due to warning in vlib/unix/cli.c
|
||||
VPP-64 | Top level "make pkg-deb" fails if CDPATH is set in user env.
|
||||
VPP-48 | Traceroute does not terminate when VPP is the target
|
||||
VPP-23 | CLI pager does not gracefully handle lines longer than the terminal width
|
||||
|
||||
|
||||
@page release_notes_1606 Release notes for VPP 16.06
|
||||
|
||||
|
||||
The FD.io Project, relentlessly focused on data IO speed and efficiency
|
||||
supporting the creation of high performance, flexible, and scalable software
|
||||
defined infrastructures, announces the availability of the community’s first
|
||||
software release (16.06).
|
||||
|
||||
In the four months since launching, FD.io has brought together more than 75
|
||||
developers from 11 different companies including network operators, solution
|
||||
providers chip vendors, and network equipment vendors who are collaborating to
|
||||
enhance and innovate around the Vector Packet Processing (VPP) technology. The
|
||||
FD.io community has quickly formed to grow the number of projects from the
|
||||
initial VPP project to an additional 6 projects addressing a diverse set of
|
||||
requirements and usability across a variety of deployment environments.
|
||||
|
||||
The 16.06 release brings unprecedented performance: 480Gbps/200mpps with 8
|
||||
million routes and 2k whitelist entries on standard high volume x86 servers.
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
In addition to the existing full suite of vswitch/vrouter features, the new
|
||||
16.06 release adds:
|
||||
|
||||
* Enhanced Switching and Routing:
|
||||
* IPv6 Segment Routing multicast support.
|
||||
* LISP xTR support.
|
||||
* VXLAN over IPv6 underlay.
|
||||
* Per interface whitelists.
|
||||
* Shared adjacencies in FIB.
|
||||
|
||||
* New and improved interface support:
|
||||
* Jumbo frame support for vhost-user.
|
||||
* Netmap interface support.
|
||||
* AF_Packet interface support.
|
||||
|
||||
* Expanded and improved programmability:
|
||||
* Python API bindings.
|
||||
* Enhanced JVPP Java API bindings.
|
||||
* Debugging CLI.
|
||||
|
||||
* Expanded Hardware and Software Support:
|
||||
* Support for ARM 32 targets including Rasberry Pi single-board computer.
|
||||
* Support for DPDK 16.04.
|
||||
|
@ -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,23 +14,8 @@ 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_CRYPTO_PMD=$(strip $($(PLATFORM)_uses_dpdk_cryptodev))
|
||||
ifneq ($(DPDK_CRYPTO_PMD),)
|
||||
DPDK_MAKE_ARGS += DPDK_CRYPTO_PMD=y
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
plugins_configure_depend = \
|
||||
vppinfra-install \
|
||||
vlib-api-install \
|
||||
vpp-api-test-install \
|
||||
vnet-install \
|
||||
vlib-install \
|
||||
vpp-api-install
|
||||
|
||||
plugins_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
vlib \
|
||||
vnet \
|
||||
svm \
|
||||
vpp-api-test \
|
||||
vlib-api \
|
||||
vpp-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
|
47
build-data/packages/sample-plugin.mk
Normal file
47
build-data/packages/sample-plugin.mk
Normal 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
|
@ -38,7 +38,4 @@ vnet_configure_depend += dpdk-install
|
||||
vnet_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
vnet_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
|
||||
vnet_configure_args += --with-dpdk-crypto
|
||||
endif
|
||||
endif
|
||||
|
@ -33,7 +33,3 @@ vpp-api-test_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
vpp-api-test_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
endif
|
||||
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
|
||||
vpp-api-test_configure_args += --with-dpdk-crypto
|
||||
endif
|
||||
|
||||
|
@ -45,7 +45,4 @@ vpp_configure_depend += dpdk-install
|
||||
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)
|
||||
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
|
||||
endif
|
||||
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes)
|
||||
vpp_configure_args += --with-dpdk-crypto
|
||||
endif
|
||||
endif
|
||||
|
@ -28,33 +28,16 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
|
||||
| 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 ; \
|
||||
\
|
||||
: python-api package ; \
|
||||
./scripts/find-python-api-contents $(INSTALL_PREFIX)$(ARCH) \
|
||||
deb/debian/vpp-python-api.install ; \
|
||||
\
|
||||
: dpdk headers ; \
|
||||
./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH) \
|
||||
deb/debian/vpp-dpdk-dev.install ; \
|
||||
@ -68,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 \
|
||||
@ -95,11 +72,6 @@ install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
|
||||
$(ROOT_PACKAGES)) || exit 1; \
|
||||
\
|
||||
cd rpm ; \
|
||||
mkdir -p SOURCES ; \
|
||||
if test -f *.tar.gz ; then mv *.tar.gz SOURCES ; fi ; \
|
||||
rpmbuild -bb --define "_topdir $$PWD" --define \
|
||||
"_install_dir $(INSTALL_PREFIX)$(ARCH)" \
|
||||
--define "_mu_build_root_dir $(MU_BUILD_ROOT_DIR)" \
|
||||
vpp.spec ; \
|
||||
rpmbuild -bb --define "_topdir $$PWD" vpp.spec ; \
|
||||
mv $$(find RPMS -name \*.rpm -type f) ..
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
42
build-data/platforms/virl.mk
Normal file
42
build-data/platforms/virl.mk
Normal 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
|
@ -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,10 +29,7 @@ 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_dpdk_cryptodev = yes
|
||||
# vpp_uses_external_dpdk = yes
|
||||
# vpp_dpdk_inc_dir = /usr/include/dpdk
|
||||
# vpp_dpdk_lib_dir = /usr/lib
|
||||
@ -52,14 +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) \
|
||||
-fstack-protector -fPIC -Werror
|
||||
|
||||
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
|
||||
-fstack-protector -fPIC -Werror
|
||||
vpp_clang_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) \
|
||||
|
@ -13,39 +13,24 @@
|
||||
|
||||
# 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
|
||||
|
||||
# Uncoment to enable building unit tests
|
||||
#vpp_lite_enable_tests = yes
|
||||
|
||||
vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
|
||||
vpp-api gmod
|
||||
|
||||
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
|
||||
|
||||
vpp_lite_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
|
||||
-fPIC -Werror -fprofile-arcs -ftest-coverage
|
||||
vpp_lite_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
|
||||
-fPIC -Werror -coverage
|
||||
|
@ -1,27 +0,0 @@
|
||||
# Copyright (c) 2016 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.
|
||||
|
||||
# Shared suffix rules
|
||||
# Please do not set "SUFFIXES = .api.h .api" here
|
||||
|
||||
%.api.h: %.api
|
||||
@echo " APIGEN " $@ ; \
|
||||
mkdir -p `dirname $@` ; \
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --output $@ --show-name $@
|
||||
|
||||
%.api.json: %.api
|
||||
@echo " JSON APIGEN " $@ ; \
|
||||
mkdir -p `dirname $@` ; \
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --json $@
|
@ -220,11 +220,6 @@ else
|
||||
endif
|
||||
export MARCH
|
||||
|
||||
MTUNE = $(strip $($(PLATFORM)_mtune))
|
||||
ifeq ($(MTUNE),)
|
||||
MTUNE = generic
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# Generic build stuff
|
||||
######################################################################
|
||||
@ -1164,7 +1159,6 @@ distclean:
|
||||
rm -rf $(MU_BUILD_ROOT_DIR)/*.deb
|
||||
rm -rf $(MU_BUILD_ROOT_DIR)/*.rpm
|
||||
rm -rf $(MU_BUILD_ROOT_DIR)/*.changes
|
||||
rm -rf $(MU_BUILD_ROOT_DIR)/python
|
||||
if [ -e /usr/bin/dh ];then (cd $(MU_BUILD_ROOT_DIR)/deb/;debian/rules clean); fi
|
||||
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.install
|
||||
rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/*.dkms
|
||||
|
1
build-root/deb/debian/.gitignore
vendored
1
build-root/deb/debian/.gitignore
vendored
@ -11,4 +11,3 @@ vpp-dpdk-dev/
|
||||
vpp-dpdk-dkms/
|
||||
vpp-dbg/
|
||||
vppctl/
|
||||
vpp-python-api/
|
||||
|
@ -2,12 +2,12 @@ Source: vpp
|
||||
Section: net
|
||||
Priority: extra
|
||||
Maintainer: Cisco OpenVPP Packaging Team <bogus.address@cisco.com>
|
||||
Build-Depends: debhelper (>= 9), dkms, dh-systemd, chrpath
|
||||
Build-Depends: debhelper (>= 9), dkms, dh-systemd
|
||||
Standards-Version: 3.9.4
|
||||
|
||||
Package: vpp
|
||||
Architecture: any
|
||||
Depends: vpp-lib (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Vector Packet Processing--executables
|
||||
This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
|
||||
vpp - the vector packet engine
|
||||
@ -41,28 +41,14 @@ Description: Vector Packet Processing--runtime libraries
|
||||
This package contains the VPP shared libraries, including:
|
||||
.
|
||||
vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
|
||||
dpdk - DPDK library
|
||||
dpdk - Intel DPDK library
|
||||
svm - vm library
|
||||
vlib - vector processing library
|
||||
vlib-api - binary API library
|
||||
vnet - network stack library
|
||||
|
||||
Package: vpp-plugins
|
||||
Architecture: any
|
||||
Depends: vpp (= ${source:Version}), ${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}
|
||||
Description: DPDK 2.1 igb_uio_driver
|
||||
This package contains Linux kernel modules distributed with DPDK.
|
||||
|
||||
Package: vpp-python-api
|
||||
Architecture: any
|
||||
Depends: ${python:Depends}, ${misc:Depends}, vpp (= ${source:Version})
|
||||
Description: VPP Python API bindings
|
||||
This package contains VPP python api bindings
|
||||
.
|
||||
|
@ -18,11 +18,10 @@ include /usr/share/dpkg/default.mk
|
||||
|
||||
# main packaging script based on dh7 syntax
|
||||
%:
|
||||
dh $@ --with dkms --with systemd,python2
|
||||
dh $@ --with dkms --with systemd
|
||||
|
||||
override_dh_install:
|
||||
dh_install --exclude .git
|
||||
../scripts/remove-rpath .
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=vpp-dbg
|
||||
|
@ -1,21 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
removed=
|
||||
|
||||
# Unbind user-mode PCI drivers
|
||||
pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_generic -o -name vfio-pci`
|
||||
for d in $pci_dirs; do
|
||||
for f in ${d}/*; do
|
||||
[ -e "${f}/config" ] || continue
|
||||
echo 1 > ${f}/remove
|
||||
basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
|
||||
removed=y
|
||||
done
|
||||
done
|
||||
if [ -n "${removed}" ]; then
|
||||
echo "There are changes in PCI drivers, rescaning"
|
||||
echo 1 > /sys/bus/pci/rescan
|
||||
else
|
||||
echo "There weren't PCI devices binded"
|
||||
fi
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Add the vpp group
|
||||
groupadd -f -r vpp
|
@ -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))))
|
||||
|
||||
|
@ -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])
|
||||
")
|
||||
|
@ -23,7 +23,7 @@ nil
|
||||
'(setq PLUGIN-NAME (upcase plugin-name))
|
||||
"
|
||||
/*
|
||||
* " plugin-name ".c - skeleton vpp engine plug-in
|
||||
* " plugin-name ".c - skeleton vpp engine plug-in
|
||||
*
|
||||
* Copyright (c) <current-year> <your-organization>
|
||||
* Licensed under the Apache License, Version 2.0 (the \"License\");
|
||||
@ -52,18 +52,18 @@ nil
|
||||
|
||||
/* define message structures */
|
||||
#define vl_typedefs
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#undef vl_typedefs
|
||||
|
||||
/* define generated endian-swappers */
|
||||
#define vl_endianfun
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#undef vl_endianfun
|
||||
|
||||
/* instantiate all the print functions we know about */
|
||||
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
|
||||
#define vl_printfun
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#undef vl_printfun
|
||||
|
||||
/* Get the API version number */
|
||||
@ -71,7 +71,7 @@ nil
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#undef vl_api_version
|
||||
|
||||
/*
|
||||
/*
|
||||
* A handy macro to set up a message reply.
|
||||
* Assumes that the following variables are available:
|
||||
* mp - pointer to request message
|
||||
@ -100,14 +100,14 @@ do { \\
|
||||
#define foreach_" plugin-name "_plugin_api_msg \\
|
||||
_(" PLUGIN-NAME "_ENABLE_DISABLE, " plugin-name "_enable_disable)
|
||||
|
||||
/*
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
|
||||
clib_error_t *
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
@ -127,10 +127,11 @@ int " plugin-name "_enable_disable (" plugin-name "_main_t * sm, u32 sw_if_index
|
||||
int enable_disable)
|
||||
{
|
||||
vnet_sw_interface_t * sw;
|
||||
int rv = 0;
|
||||
int rv;
|
||||
u32 node_index = enable_disable ? " plugin-name "_node.index : ~0;
|
||||
|
||||
/* Utterly wrong? */
|
||||
if (pool_is_free_index (sm->vnet_main->interface_main.sw_interfaces,
|
||||
if (pool_is_free_index (sm->vnet_main->interface_main.sw_interfaces,
|
||||
sw_if_index))
|
||||
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
|
||||
|
||||
@ -138,10 +139,16 @@ int " plugin-name "_enable_disable (" plugin-name "_main_t * sm, u32 sw_if_index
|
||||
sw = vnet_get_sw_interface (sm->vnet_main, sw_if_index);
|
||||
if (sw->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
|
||||
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
|
||||
|
||||
vnet_feature_enable_disable (\"device-input\", \"" plugin-name "\",
|
||||
sw_if_index, enable_disable, 0, 0);
|
||||
|
||||
|
||||
/*
|
||||
* Redirect pkts from the driver to the macswap node.
|
||||
* Returns VNET_API_ERROR_UNIMPLEMENTED if the h/w driver
|
||||
* doesn't implement the API.
|
||||
*
|
||||
* Node_index = ~0 => shut off redirection
|
||||
*/
|
||||
rv = vnet_hw_interface_rx_redirect_to_node (sm->vnet_main, sw_if_index,
|
||||
node_index);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -153,7 +160,7 @@ static clib_error_t *
|
||||
" plugin-name "_main_t * sm = &" plugin-name "_main;
|
||||
u32 sw_if_index = ~0;
|
||||
int enable_disable = 1;
|
||||
|
||||
|
||||
int rv;
|
||||
|
||||
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
|
||||
@ -168,7 +175,7 @@ static clib_error_t *
|
||||
|
||||
if (sw_if_index == ~0)
|
||||
return clib_error_return (0, \"Please specify an interface...\");
|
||||
|
||||
|
||||
rv = " plugin-name "_enable_disable (sm, sw_if_index, enable_disable);
|
||||
|
||||
switch(rv) {
|
||||
@ -176,7 +183,7 @@ static clib_error_t *
|
||||
break;
|
||||
|
||||
case VNET_API_ERROR_INVALID_SW_IF_INDEX:
|
||||
return clib_error_return
|
||||
return clib_error_return
|
||||
(0, \"Invalid interface, only works on physical ports\");
|
||||
break;
|
||||
|
||||
@ -193,7 +200,7 @@ static clib_error_t *
|
||||
|
||||
VLIB_CLI_COMMAND (" plugin-name "_enable_disable_command, static) = {
|
||||
.path = \"" plugin-name " enable-disable\",
|
||||
.short_help =
|
||||
.short_help =
|
||||
\"" plugin-name " enable-disable <interface-name> [disable]\",
|
||||
.function = " plugin-name "_enable_disable_command_fn,
|
||||
};
|
||||
@ -206,9 +213,9 @@ static void vl_api_" plugin-name "_enable_disable_t_handler
|
||||
" plugin-name "_main_t * sm = &" plugin-name "_main;
|
||||
int rv;
|
||||
|
||||
rv = " plugin-name "_enable_disable (sm, ntohl(mp->sw_if_index),
|
||||
rv = " plugin-name "_enable_disable (sm, ntohl(mp->sw_if_index),
|
||||
(int) (mp->enable_disable));
|
||||
|
||||
|
||||
REPLY_MACRO(VL_API_" PLUGIN-NAME "_ENABLE_DISABLE_REPLY);
|
||||
}
|
||||
|
||||
@ -224,26 +231,13 @@ static clib_error_t *
|
||||
vl_noop_handler, \\
|
||||
vl_api_##n##_t_endian, \\
|
||||
vl_api_##n##_t_print, \\
|
||||
sizeof(vl_api_##n##_t), 1);
|
||||
sizeof(vl_api_##n##_t), 1);
|
||||
foreach_" plugin-name "_plugin_api_msg;
|
||||
#undef _
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define vl_msg_name_crc_list
|
||||
#include <" plugin-name "/" plugin-name "_all_api_h.h>
|
||||
#undef vl_msg_name_crc_list
|
||||
|
||||
static void
|
||||
setup_message_id_table (" plugin-name "_main_t * sm, api_main_t * am)
|
||||
{
|
||||
#define _(id,n,crc) \
|
||||
vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + sm->msg_id_base);
|
||||
foreach_vl_msg_name_crc_" plugin-name" ;
|
||||
#undef _
|
||||
}
|
||||
|
||||
static clib_error_t * " plugin-name "_init (vlib_main_t * vm)
|
||||
{
|
||||
" plugin-name "_main_t * sm = &" plugin-name "_main;
|
||||
@ -253,7 +247,7 @@ static clib_error_t * " plugin-name "_init (vlib_main_t * vm)
|
||||
name = format (0, \"" plugin-name "_%08x%c\", api_version, 0);
|
||||
|
||||
/* Ask for a correctly-sized block of API message decode slots */
|
||||
sm->msg_id_base = vl_msg_api_get_msg_ids
|
||||
sm->msg_id_base = vl_msg_api_get_msg_ids
|
||||
((char *) name, VL_MSG_FIRST_AVAILABLE);
|
||||
|
||||
error = " plugin-name "_plugin_api_hookup (vm);
|
||||
@ -264,12 +258,5 @@ static clib_error_t * " plugin-name "_init (vlib_main_t * vm)
|
||||
}
|
||||
|
||||
VLIB_INIT_FUNCTION (" plugin-name "_init);
|
||||
|
||||
VNET_FEATURE_INIT (" plugin-name ", static) =
|
||||
{
|
||||
.arc_name = \"device-input\",
|
||||
.node_name = \"" plugin-name "\",
|
||||
.runs_before = VNET_FEATURES (\"ethernet-input\"),
|
||||
};
|
||||
")
|
||||
|
||||
|
@ -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,16 +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
|
||||
")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user