Compare commits
49 Commits
v20.05.1
...
stable/160
Author | SHA1 | Date | |
---|---|---|---|
22665d23e1 | |||
d1f3123795 | |||
638aee3e84 | |||
c021053491 | |||
019886e7e6 | |||
dd8e9a5dc5 | |||
21bc8624f5 | |||
9b15f28295 | |||
2dfd08242d | |||
bcc0cf6137 | |||
0f53393c82 | |||
1a30f38192 | |||
4eaae3d363 | |||
56ca4b7688 | |||
0d49712e05 | |||
861698f9f1 | |||
a4b01cb2b4 | |||
61a7a7fb9f | |||
0024dfb307 | |||
2cb4e68aae | |||
331f1a8eac | |||
73a52de862 | |||
fcaa2f1010 | |||
78e0e3af70 | |||
c1ac47b61c | |||
c278ebdd39 | |||
d193b8e41d | |||
c2787a42ff | |||
c16427e794 | |||
7d3322a388 | |||
73bb1458f7 | |||
88ccc91ba9 | |||
6b85ac7fa1 | |||
a7601b44ac | |||
6214326f41 | |||
08377f8ff7 | |||
2544ca81c3 | |||
eb5cad76ea | |||
d7935e8c42 | |||
94195c85fe | |||
ab4e86cb95 | |||
ea60221218 | |||
217872424d | |||
aa4338556e | |||
52ecf85946 | |||
78c7daaf6d | |||
8b66c77920 | |||
a20d317e63 | |||
dbc6e3f0bb |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
*~
|
*~
|
||||||
|
*.sw[op]
|
||||||
|
|
||||||
/build-root/.ccache
|
/build-root/.ccache
|
||||||
/build-root/build-*/
|
/build-root/build-*/
|
||||||
@ -66,6 +67,8 @@ GTAGS
|
|||||||
|
|
||||||
# Generated documentation
|
# Generated documentation
|
||||||
/build-root/docs
|
/build-root/docs
|
||||||
|
/build-root/.doxygen-bootstrap.ok
|
||||||
|
/build-root/.doxygen-siphon.dep
|
||||||
|
|
||||||
# indent backup files
|
# indent backup files
|
||||||
*.BAK
|
*.BAK
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
host=gerrit.fd.io
|
host=gerrit.fd.io
|
||||||
port=29418
|
port=29418
|
||||||
project=vpp
|
project=vpp
|
||||||
|
defaultbranch=stable/1609
|
||||||
|
38
Makefile
38
Makefile
@ -30,7 +30,7 @@ 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 = curl build-essential autoconf automake bison libssl-dev ccache
|
||||||
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
|
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
|
||||||
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
|
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope
|
||||||
DEB_DEPENDS += doxygen graphviz
|
DEB_DEPENDS += python-dev
|
||||||
ifeq ($(OS_VERSION_ID),14.04)
|
ifeq ($(OS_VERSION_ID),14.04)
|
||||||
DEB_DEPENDS += openjdk-8-jdk-headless
|
DEB_DEPENDS += openjdk-8-jdk-headless
|
||||||
else
|
else
|
||||||
@ -40,7 +40,7 @@ endif
|
|||||||
RPM_DEPENDS_GROUPS = 'Development Tools'
|
RPM_DEPENDS_GROUPS = 'Development Tools'
|
||||||
RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
|
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 += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
|
||||||
RPM_DEPENDS += doxygen graphviz
|
RPM_DEPENDS += python-devel
|
||||||
EPEL_DEPENDS = libconfuse-devel ganglia-devel
|
EPEL_DEPENDS = libconfuse-devel ganglia-devel
|
||||||
|
|
||||||
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
|
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
|
||||||
@ -54,7 +54,7 @@ endif
|
|||||||
|
|
||||||
.PHONY: help bootstrap wipe wipe-release build build-release rebuild rebuild-release
|
.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: 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 plugins plugins-release build-vpp-api
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Make Targets:"
|
@echo "Make Targets:"
|
||||||
@ -80,6 +80,7 @@ help:
|
|||||||
@echo " gtags - (re)generate gtags database"
|
@echo " gtags - (re)generate gtags database"
|
||||||
@echo " cscope - (re)generate cscope database"
|
@echo " cscope - (re)generate cscope database"
|
||||||
@echo " doxygen - (re)generate documentation"
|
@echo " doxygen - (re)generate documentation"
|
||||||
|
@echo " bootstrap-doxygen - setup Doxygen dependencies"
|
||||||
@echo " wipe-doxygen - wipe all generated documentation"
|
@echo " wipe-doxygen - wipe all generated documentation"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Make Arguments:"
|
@echo "Make Arguments:"
|
||||||
@ -233,24 +234,21 @@ cscope: cscope.files
|
|||||||
# Build the documentation
|
# Build the documentation
|
||||||
#
|
#
|
||||||
|
|
||||||
DOXY_INPUT ?= \
|
# Doxygen configuration and our utility scripts
|
||||||
README.md \
|
export DOXY_DIR ?= $(WS_ROOT)/doxygen
|
||||||
vppinfra \
|
|
||||||
svm \
|
define make-doxy
|
||||||
vlib \
|
@OS_ID="$(OS_ID)" WS_ROOT="$(WS_ROOT)" BR="$(BR)" make -C $(DOXY_DIR) $@
|
||||||
vlib-api \
|
endef
|
||||||
vnet \
|
|
||||||
vpp \
|
.PHONY: bootstrap-doxygen doxygen wipe-doxygen
|
||||||
vpp-api
|
|
||||||
|
bootstrap-doxygen:
|
||||||
|
$(call make-doxy)
|
||||||
|
|
||||||
doxygen:
|
doxygen:
|
||||||
@mkdir -p "$(BR)/docs"
|
$(call make-doxy)
|
||||||
ROOT="$(WS_ROOT)" \
|
|
||||||
BUILD_ROOT="$(BR)" \
|
|
||||||
INPUT="$(addprefix $(WS_ROOT)/,$(DOXY_INPUT))" \
|
|
||||||
HTML=YES \
|
|
||||||
VERSION="`git describe --tags --dirty`" \
|
|
||||||
doxygen doxygen/doxygen.cfg
|
|
||||||
|
|
||||||
wipe-doxygen:
|
wipe-doxygen:
|
||||||
rm -rf "$(BR)/docs"
|
$(call make-doxy)
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ Directory name | Description
|
|||||||
doxygen | Documentation generator configuration
|
doxygen | Documentation generator configuration
|
||||||
dpdk | DPDK patches and build infrastructure
|
dpdk | DPDK patches and build infrastructure
|
||||||
g2 | Event log visualization tool
|
g2 | Event log visualization tool
|
||||||
gmod | perf related?
|
|
||||||
perftool | Performance tool
|
perftool | Performance tool
|
||||||
plugins | VPP bundled plugins directory
|
plugins | VPP bundled plugins directory
|
||||||
@ref svm | Shared virtual memory allocation library
|
@ref svm | Shared virtual memory allocation library
|
||||||
@ -90,5 +89,8 @@ for this can be found [on the Setting up Vagrant wiki page]
|
|||||||
|
|
||||||
## More information.
|
## More information.
|
||||||
|
|
||||||
|
Several modules provide documentation, see @subpage user_doc for more
|
||||||
|
information.
|
||||||
|
|
||||||
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
|
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
|
||||||
advanced building strategies and development notes.
|
advanced building strategies and development notes.
|
||||||
|
137
RELEASE.md
Normal file
137
RELEASE.md
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
Release Notes
|
||||||
|
=============
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ Standards-Version: 3.9.4
|
|||||||
|
|
||||||
Package: vpp
|
Package: vpp
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: vpp-lib (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: Vector Packet Processing--executables
|
Description: Vector Packet Processing--executables
|
||||||
This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
|
This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
|
||||||
vpp - the vector packet engine
|
vpp - the vector packet engine
|
||||||
@ -49,7 +49,7 @@ Description: Vector Packet Processing--runtime libraries
|
|||||||
|
|
||||||
Package: vpp-plugins
|
Package: vpp-plugins
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: vpp (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: Vector Packet Processing--runtime plugins
|
Description: Vector Packet Processing--runtime plugins
|
||||||
This package contains VPP plugins
|
This package contains VPP plugins
|
||||||
.
|
.
|
||||||
|
@ -49,6 +49,13 @@ allocator (mheap.c), extendable printf-like interface built on top of vectors
|
|||||||
time-based function calls (timer.c).
|
time-based function calls (timer.c).
|
||||||
TODO: reference and describe only the .h files
|
TODO: reference and describe only the .h files
|
||||||
|
|
||||||
|
%package plugins
|
||||||
|
Summary: Vector Packet Processing--runtime plugins
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: vpp = %{_version}-%{_release}
|
||||||
|
%description plugins
|
||||||
|
This package contains VPP plugins
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
# Add the vpp group
|
# Add the vpp group
|
||||||
groupadd -f -r vpp
|
groupadd -f -r vpp
|
||||||
@ -82,7 +89,10 @@ do
|
|||||||
# make lib symlinks
|
# make lib symlinks
|
||||||
( cd %{buildroot}%{_libdir} &&
|
( cd %{buildroot}%{_libdir} &&
|
||||||
ln -fs $file $(echo $file | sed -e 's/\(\.so\.[0-9]\+\).*/\1/') )
|
ln -fs $file $(echo $file | sed -e 's/\(\.so\.[0-9]\+\).*/\1/') )
|
||||||
|
( cd %{buildroot}%{_libdir} &&
|
||||||
|
ln -fs $file $(echo $file | sed -e 's/\(\.so\)\.[0-9]\+.*/\1/') )
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# devel
|
# devel
|
||||||
#
|
#
|
||||||
@ -97,6 +107,13 @@ do
|
|||||||
install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file
|
install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
mkdir -p -m755 %{buildroot}%{python2_sitelib}/jvppgen
|
||||||
|
install -p -m755 ../../vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin
|
||||||
|
for i in $(ls ../../vpp-api/java/jvpp/gen/jvppgen/*.py); do
|
||||||
|
install -p -m666 ${i} %{buildroot}%{python2_sitelib}/jvppgen
|
||||||
|
done;
|
||||||
|
|
||||||
# sample plugin
|
# sample plugin
|
||||||
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
|
mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
|
||||||
for file in $(cd %{_vpp_install_dir}/../../sample-plugin && find -type f -print)
|
for file in $(cd %{_vpp_install_dir}/../../sample-plugin && find -type f -print)
|
||||||
@ -105,6 +122,24 @@ do
|
|||||||
%{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file
|
%{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# vpp-plugins
|
||||||
|
#
|
||||||
|
mkdir -p -m755 %{buildroot}/usr/lib/vpp_plugins
|
||||||
|
mkdir -p -m755 %{buildroot}/usr/lib/vpp_api_test_plugins
|
||||||
|
for file in $(cd %{_vpp_install_dir}/plugins/lib64/vpp_plugins && find -type f -print)
|
||||||
|
do
|
||||||
|
install -p -m 644 %{_vpp_install_dir}/plugins/lib64/vpp_plugins/$file \
|
||||||
|
%{buildroot}/usr/lib/vpp_plugins/$file
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in $(cd %{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins && find -type f -print)
|
||||||
|
do
|
||||||
|
install -p -m 644 %{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins/$file \
|
||||||
|
%{buildroot}/usr/lib/vpp_api_test_plugins/$file
|
||||||
|
done
|
||||||
|
|
||||||
%post
|
%post
|
||||||
sysctl --system
|
sysctl --system
|
||||||
%systemd_post vpp.service
|
%systemd_post vpp.service
|
||||||
@ -123,10 +158,19 @@ sysctl --system
|
|||||||
|
|
||||||
%files lib
|
%files lib
|
||||||
%defattr(-,bin,bin)
|
%defattr(-,bin,bin)
|
||||||
|
%exclude %{_libdir}/vpp_plugins
|
||||||
|
%exclude %{_libdir}/vpp_api_test_plugins
|
||||||
%{_libdir}/*
|
%{_libdir}/*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,bin,bin)
|
%defattr(-,bin,bin)
|
||||||
/usr/bin/vppapigen
|
/usr/bin/vppapigen
|
||||||
|
/usr/bin/jvpp_gen.py
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
|
%{python2_sitelib}/jvppgen/*
|
||||||
/usr/share/doc/vpp/examples/sample-plugin
|
/usr/share/doc/vpp/examples/sample-plugin
|
||||||
|
|
||||||
|
%files plugins
|
||||||
|
%defattr(-,bin,bin)
|
||||||
|
/usr/lib/vpp_plugins/*
|
||||||
|
/usr/lib/vpp_api_test_plugins/*
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo oper-160815
|
echo rls1609
|
||||||
|
10
build-root/vagrant/Vagrantfile
vendored
10
build-root/vagrant/Vagrantfile
vendored
@ -14,8 +14,9 @@ Vagrant.configure(2) do |config|
|
|||||||
config.vm.box_check_update = false
|
config.vm.box_check_update = false
|
||||||
|
|
||||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"update.sh")
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"update.sh")
|
||||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"build.sh"), :args => "/vpp vagrant"
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clone.sh")
|
||||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp"
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"build.sh"), :args => "/home/vagrant/git/vpp vagrant"
|
||||||
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/home/vagrant/git/vpp"
|
||||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh")
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh")
|
||||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh")
|
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh")
|
||||||
|
|
||||||
@ -59,8 +60,11 @@ Vagrant.configure(2) do |config|
|
|||||||
|
|
||||||
vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2)
|
vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2)
|
||||||
vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096)
|
vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096)
|
||||||
|
|
||||||
|
config.ssh.forward_agent = true
|
||||||
|
|
||||||
config.vm.synced_folder "../../", "/vpp", disabled: false
|
config.vm.synced_folder "../../", "/vpp", disabled: false
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
config.vm.provider "virtualbox" do |vb|
|
||||||
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||||
vb.memory = "#{vmram}"
|
vb.memory = "#{vmram}"
|
||||||
|
@ -47,8 +47,8 @@ make UNATTENDED=yes install-dep
|
|||||||
|
|
||||||
# Really really clean things up so we can be sure
|
# Really really clean things up so we can be sure
|
||||||
# that the build works even when switching distros
|
# that the build works even when switching distros
|
||||||
make wipe
|
$SUDOCMD make wipe
|
||||||
(cd build-root/;make distclean)
|
(cd build-root/;$SUDOCMD make distclean)
|
||||||
rm -f build-root/.bootstrap.ok
|
rm -f build-root/.bootstrap.ok
|
||||||
|
|
||||||
if [ $DISTRIB_ID == "CentOS" ]; then
|
if [ $DISTRIB_ID == "CentOS" ]; then
|
||||||
|
54
build-root/vagrant/clone.sh
Executable file
54
build-root/vagrant/clone.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Figure out what system we are running on
|
||||||
|
if [ -f /etc/lsb-release ];then
|
||||||
|
. /etc/lsb-release
|
||||||
|
elif [ -f /etc/redhat-release ];then
|
||||||
|
sudo yum install -y redhat-lsb
|
||||||
|
DISTRIB_ID=`lsb_release -si`
|
||||||
|
DISTRIB_RELEASE=`lsb_release -sr`
|
||||||
|
DISTRIB_CODENAME=`lsb_release -sc`
|
||||||
|
DISTRIB_DESCRIPTION=`lsb_release -sd`
|
||||||
|
fi
|
||||||
|
KERNEL_OS=`uname -o`
|
||||||
|
KERNEL_MACHINE=`uname -m`
|
||||||
|
KERNEL_RELEASE=`uname -r`
|
||||||
|
KERNEL_VERSION=`uname -v`
|
||||||
|
|
||||||
|
echo KERNEL_OS: $KERNEL_OS
|
||||||
|
echo KERNEL_MACHINE: $KERNEL_MACHINE
|
||||||
|
echo KERNEL_RELEASE: $KERNEL_RELEASE
|
||||||
|
echo KERNEL_VERSION: $KERNEL_VERSION
|
||||||
|
echo DISTRIB_ID: $DISTRIB_ID
|
||||||
|
echo DISTRIB_RELEASE: $DISTRIB_RELEASE
|
||||||
|
echo DISTRIB_CODENAME: $DISTRIB_CODENAME
|
||||||
|
echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
|
||||||
|
|
||||||
|
# Make sure git is installed
|
||||||
|
if [ $DISTRIB_ID == "CentOS" ]; then
|
||||||
|
yum -y install git
|
||||||
|
elif [ $DISTRIB_ID == "Ubuntu" ]; then
|
||||||
|
apt-get -y install git
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup the vpp code
|
||||||
|
cd ~vagrant/
|
||||||
|
sudo -u vagrant mkdir git
|
||||||
|
cd git/
|
||||||
|
echo "SSH_AUTH_SOCK $SSH_AUTH_SOCK x"
|
||||||
|
chmod 777 $SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
CLONE_URL=`cd /vpp;git remote -v | grep origin |grep fetch |awk '{print $2}'`
|
||||||
|
echo "CLONE_URL $CLONE_URL"
|
||||||
|
echo $CLONE_URL | grep -q "^ssh:"
|
||||||
|
if [ $? == 0 ]; then
|
||||||
|
SSH_HOST=`echo $CLONE_URL| awk -F/ '{print $3}'`
|
||||||
|
SSH_PORT=`echo $SSH_HOST| awk -F: '{print $2}'`
|
||||||
|
if [ -n $SSH_PORT ]; then
|
||||||
|
SSH_PORT="-p $SSH_PORT"
|
||||||
|
fi
|
||||||
|
SSH_HOST=`echo $SSH_HOST| awk -F: '{print $1}'`
|
||||||
|
echo "SSH_HOST $SSH_HOST"
|
||||||
|
echo "SSH_PORT $SSH_PORT"
|
||||||
|
sudo -HE -u vagrant ssh -oStrictHostKeyChecking=no -v $SSH_PORT $SSH_HOST
|
||||||
|
fi
|
||||||
|
sudo -HE -u vagrant git clone $CLONE_URL
|
160
doxygen/Makefile
Normal file
160
doxygen/Makefile
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
# Copyright (c) 2016 Comcast Cable Communications Management, LLC.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build the documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# These should be passed in by the root Makefile
|
||||||
|
WS_ROOT ?= $(CURDIR)/..
|
||||||
|
BR ?= $(WS_ROOT)/build-root
|
||||||
|
OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
||||||
|
|
||||||
|
# Package dependencies
|
||||||
|
DOC_DEB_DEPENDS = doxygen graphviz python-pyparsing
|
||||||
|
DOC_RPM_DEPENDS = doxygen graphviz pyparsing
|
||||||
|
|
||||||
|
# Doxygen configuration and our utility scripts
|
||||||
|
DOXY_DIR ?= $(WS_ROOT)/doxygen
|
||||||
|
|
||||||
|
# Input directories and files
|
||||||
|
DOXY_INPUT ?= \
|
||||||
|
README.md \
|
||||||
|
doxygen/user_doc.md \
|
||||||
|
RELEASE.md \
|
||||||
|
vppinfra \
|
||||||
|
svm \
|
||||||
|
vlib \
|
||||||
|
vlib-api \
|
||||||
|
vnet \
|
||||||
|
vpp \
|
||||||
|
vpp-api \
|
||||||
|
plugins
|
||||||
|
|
||||||
|
# Files to exclude, from pre-Doxygen steps, eg because they're
|
||||||
|
# selectively compiled.
|
||||||
|
# Examples would be to exclude non-DPDK related sources when
|
||||||
|
# there's a DPDK equivalent that conflicts.
|
||||||
|
# This is specifically for the pre-Doxygen steps; Doxygen uses
|
||||||
|
# @cond for this instead.
|
||||||
|
DOXY_PRE_EXCLUDE ?= \
|
||||||
|
vlib/vlib/buffer.c
|
||||||
|
|
||||||
|
# Generate a regexp for filenames to exclude
|
||||||
|
DOXY_PRE_EXCLUDE_REGEXP = ($(subst .,\.,$(shell echo '$(strip $(DOXY_PRE_EXCLUDE))' | sed -e 's/ /|/g')))
|
||||||
|
|
||||||
|
# Discover all the directories we might, possibly, maybe, have include files in
|
||||||
|
DOXY_INCLUDE_PATH = $(shell set -e; cd $(WS_ROOT); for item in $(DOXY_INPUT); do find $$item -type d; done)
|
||||||
|
|
||||||
|
# Discover if we have CPP available
|
||||||
|
CPP ?= $(shell which cpp)
|
||||||
|
ifneq ($(strip $(CPP)),)
|
||||||
|
# Add whatever directories CPP normally includes
|
||||||
|
DOXY_INCLUDE_PATH += $(shell set -e; $(CPP) -v </dev/null 2>&1 | grep -A 1000 '\#include' | awk '/^ /{print $$1}')
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Target directory for doxygen output
|
||||||
|
DOXY_OUTPUT ?= $(BR)/docs
|
||||||
|
|
||||||
|
# Siphoned fragments end up in here
|
||||||
|
SIPHON_INPUT ?= $(DOXY_OUTPUT)/siphon_fragments
|
||||||
|
|
||||||
|
# Siphoned fragements are processed into here
|
||||||
|
SIPHON_OUTPUT ?= $(DOXY_OUTPUT)/siphon_docs
|
||||||
|
|
||||||
|
# Extra document inputs that are processed in addition to DOXY_INPUT
|
||||||
|
EXTRA_DOXY_INPUT += $(SIPHON_OUTPUT)
|
||||||
|
|
||||||
|
# All the siphon types we know about
|
||||||
|
SIPHONS ?= clicmd
|
||||||
|
|
||||||
|
SIPHON_FILES = $(addprefix $(SIPHON_INPUT)/,$(addsuffix .siphon,$(SIPHONS)))
|
||||||
|
SIPHON_DOCS = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .md,$(SIPHONS)))
|
||||||
|
|
||||||
|
$(BR)/.doxygen-bootstrap.ok:
|
||||||
|
ifeq ($(OS_ID),ubuntu)
|
||||||
|
@set -e; inst=; \
|
||||||
|
for i in $(DOC_DEB_DEPENDS); do \
|
||||||
|
dpkg-query --show $$i >/dev/null 2>&1 || inst="$$inst $$i"; \
|
||||||
|
done; \
|
||||||
|
if [ "$$inst" ]; then sudo apt-get $(CONFIRM) $(FORCE) install $$inst; fi
|
||||||
|
@if [ ! -s /usr/lib/graphviz/config6a ]; then \
|
||||||
|
echo "Rebuidlding system Graphviz configuration."; \
|
||||||
|
sudo dot -c; \
|
||||||
|
fi
|
||||||
|
else ifneq ("$(wildcard /etc/redhat-release)","")
|
||||||
|
@sudo yum install $(CONFIRM) $(DOC_RPM_DEPENDS)
|
||||||
|
else
|
||||||
|
$(error "This option currently works only on Ubuntu or Centos systems")
|
||||||
|
endif
|
||||||
|
@touch $@
|
||||||
|
|
||||||
|
.PHONY: bootstrap-doxygen
|
||||||
|
bootstrap-doxygen: $(BR)/.doxygen-bootstrap.ok
|
||||||
|
|
||||||
|
.DELETE_ON_ERROR: $(BR)/.doxygen-siphon.dep
|
||||||
|
$(BR)/.doxygen-siphon.dep: Makefile
|
||||||
|
set -e; rm -f "$@"; for input in $(DOXY_INPUT); do \
|
||||||
|
find "$(WS_ROOT)/$$input" -type f \
|
||||||
|
\( -name '*.[ch]' -or -name '*.dox' \) -print \
|
||||||
|
| grep -v -E '^$(WS_ROOT)/$(DOXY_PRE_EXCLUDE_REGEXP)$$' \
|
||||||
|
| sed -e "s/^/\$$(SIPHON_FILES): /" \
|
||||||
|
>> $@; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# Include the source -> siphon dependencies
|
||||||
|
-include $(BR)/.doxygen-siphon.dep
|
||||||
|
|
||||||
|
.NOTPARALLEL: $(SIPHON_FILES)
|
||||||
|
$(SIPHON_FILES): $(DOXY_DIR)/siphon_generate.py $(BR)/.doxygen-bootstrap.ok
|
||||||
|
@rm -rf "$(SIPHON_INPUT)" "$(SIPHON_OUTPUT)"
|
||||||
|
@mkdir -p "$(SIPHON_INPUT)" "$(SIPHON_OUTPUT)"
|
||||||
|
@touch $(SIPHON_INPUT)/files
|
||||||
|
for input in $(DOXY_INPUT); do \
|
||||||
|
cd "$(WS_ROOT)"; \
|
||||||
|
find "$$input" -type f \
|
||||||
|
\( -name '*.[ch]' -or -name '*.dox' \) -print \
|
||||||
|
| grep -v -E '^$(DOXY_PRE_EXCLUDE_REGEXP)$$' \
|
||||||
|
>> $(SIPHON_INPUT)/files; \
|
||||||
|
done
|
||||||
|
set -e; cd "$(WS_ROOT)"; $(DOXY_DIR)/siphon_generate.py \
|
||||||
|
--output="$(SIPHON_INPUT)" \
|
||||||
|
"@$(SIPHON_INPUT)/files"
|
||||||
|
|
||||||
|
|
||||||
|
.DELETE_ON_ERROR: $(SIPHON_DOCS)
|
||||||
|
$(SIPHON_OUTPUT)/%.md: $(SIPHON_INPUT)/%.siphon $(DOXY_DIR)/siphon_process.py
|
||||||
|
set -e; cd "$(WS_ROOT)"; \
|
||||||
|
$(DOXY_DIR)/siphon_process.py --type=$(basename $(notdir $<)) \
|
||||||
|
--output="$(SIPHON_OUTPUT)" $< > $@
|
||||||
|
|
||||||
|
# This target can be used just to generate the siphoned docs
|
||||||
|
.PHONY: doxygen-siphon
|
||||||
|
doxygen-siphon: $(SIPHON_DOCS)
|
||||||
|
|
||||||
|
# Generate the doxygen docs
|
||||||
|
doxygen: $(SIPHON_DOCS)
|
||||||
|
@mkdir -p "$(DOXY_OUTPUT)"
|
||||||
|
set -e; cd "$(WS_ROOT)"; \
|
||||||
|
ROOT="$(WS_ROOT)" \
|
||||||
|
BUILD_ROOT="$(BR)" \
|
||||||
|
INPUT="$(addprefix $(WS_ROOT)/,$(DOXY_INPUT)) $(EXTRA_DOXY_INPUT)" \
|
||||||
|
INCLUDE_PATH="$(DOXY_INCLUDE_PATH)" \
|
||||||
|
HTML=YES \
|
||||||
|
VERSION="v`./build-root/scripts/version rpm-version`" \
|
||||||
|
doxygen $(DOXY_DIR)/doxygen.cfg
|
||||||
|
|
||||||
|
wipe-doxygen:
|
||||||
|
rm -rf "$(BR)/docs" "$(BR)/.doxygen-siphon.d"
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@dir
|
@dir
|
||||||
@brief Someone please fix this description
|
@brief Someone please fix this description.
|
||||||
@todo This directory needs a description.
|
@todo This directory needs a description.
|
||||||
|
|
||||||
This is where you would document the contents of a directory.
|
This is where you would document the contents of a directory.
|
||||||
@ -26,3 +26,4 @@ This is where you would document the contents of a directory.
|
|||||||
This looks like a C file but it is not part of the build; it is purely
|
This looks like a C file but it is not part of the build; it is purely
|
||||||
for documentation.
|
for documentation.
|
||||||
*/
|
*/
|
||||||
|
/*? %%clicmd:group_label CLI section description%% ?*/
|
||||||
|
@ -229,8 +229,22 @@ TAB_SIZE = 8
|
|||||||
# newlines.
|
# newlines.
|
||||||
|
|
||||||
ALIASES =
|
ALIASES =
|
||||||
|
|
||||||
|
## Indexes VPP graph nodes
|
||||||
ALIASES += "node=@xrefitem nodes \"Node Identifier\" \"Node Identifiers\" @c "
|
ALIASES += "node=@xrefitem nodes \"Node Identifier\" \"Node Identifiers\" @c "
|
||||||
|
|
||||||
|
## Formatting for CLI commands and output
|
||||||
|
ALIASES += "cli{1}=<code><pre>\1</code></pre>"
|
||||||
|
ALIASES += "clistart=<code><pre>"
|
||||||
|
ALIASES += "cliend=</pre></code>"
|
||||||
|
|
||||||
|
## Formatting for CLI example paragraphs
|
||||||
|
ALIASES += "cliexpar=@par Example usage"
|
||||||
|
ALIASES += "cliexcmd{1}=@clistart<b>vpp# <em>\1</em></b>@cliend"
|
||||||
|
ALIASES += "cliexstart{1}=@cliexcmd{\1}@clistart"
|
||||||
|
ALIASES += "cliexend=@cliend"
|
||||||
|
|
||||||
|
|
||||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||||
# will allow you to use the command class in the itcl::class meaning.
|
# will allow you to use the command class in the itcl::class meaning.
|
||||||
@ -630,7 +644,7 @@ GENERATE_DEPRECATEDLIST= YES
|
|||||||
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
|
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
|
||||||
# ... \endcond blocks.
|
# ... \endcond blocks.
|
||||||
|
|
||||||
ENABLED_SECTIONS =
|
ENABLED_SECTIONS = DPDK
|
||||||
|
|
||||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
|
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
|
||||||
# initial value of a variable or macro / define can have for it to appear in the
|
# initial value of a variable or macro / define can have for it to appear in the
|
||||||
@ -901,6 +915,7 @@ INPUT_FILTER =
|
|||||||
|
|
||||||
FILTER_PATTERNS = \
|
FILTER_PATTERNS = \
|
||||||
*.c=$(ROOT)/doxygen/filter_c.py \
|
*.c=$(ROOT)/doxygen/filter_c.py \
|
||||||
|
*.h=$(ROOT)/doxygen/filter_h.py \
|
||||||
*.api=$(ROOT)/doxygen/filter_api.py
|
*.api=$(ROOT)/doxygen/filter_api.py
|
||||||
|
|
||||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||||
@ -2022,7 +2037,7 @@ SEARCH_INCLUDES = YES
|
|||||||
# preprocessor.
|
# preprocessor.
|
||||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||||
|
|
||||||
INCLUDE_PATH = $(INPUT)
|
INCLUDE_PATH = $(INCLUDE_PATH)
|
||||||
|
|
||||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||||
@ -2046,7 +2061,8 @@ PREDEFINED = \
|
|||||||
__ORDER_LITTLE_ENDIAN__=1234 \
|
__ORDER_LITTLE_ENDIAN__=1234 \
|
||||||
__BYTE_ORDER__=1234 \
|
__BYTE_ORDER__=1234 \
|
||||||
__FLOAT_WORD_ORDER__=1234 \
|
__FLOAT_WORD_ORDER__=1234 \
|
||||||
DPDK=1
|
DPDK=1 \
|
||||||
|
always_inline:="static inline"
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
# tag can be used to specify a list of macro names that should be expanded. The
|
# tag can be used to specify a list of macro names that should be expanded. The
|
||||||
|
@ -15,38 +15,73 @@
|
|||||||
|
|
||||||
# Filter for .c files to make various preprocessor tricks Doxygenish
|
# Filter for .c files to make various preprocessor tricks Doxygenish
|
||||||
|
|
||||||
import sys, re
|
import os, sys, re
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
sys.stderr.write("Usage: %s <filename>\n" % (sys.argv[0]))
|
sys.stderr.write("Usage: %s <filename>\n" % (sys.argv[0]))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
patterns = [
|
replace_patterns = [
|
||||||
# Search for VLIB_CLI_COMMAND, extract its parameter and add a docblock for it
|
# Search for VLIB_CLI_COMMAND, extract its parameters and add a docblock for it
|
||||||
( re.compile("(?P<m>VLIB_CLI_COMMAND)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (\g<name>) */ vlib_cli_command_t \g<name>"),
|
( re.compile("(?P<m>VLIB_CLI_COMMAND)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (\g<name>) */ vlib_cli_command_t \g<name>"),
|
||||||
|
( re.compile("(?P<m>VLIB_CLI_COMMAND)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<qual>[^)]*)[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (\g<name>) */ \g<qual> vlib_cli_command_t \g<name>"),
|
||||||
|
|
||||||
# Search for VLIB_REGISTER_NODE, extract its parameter and add a docblock for it
|
# Search for VLIB_REGISTER_NODE, extract its parameters and add a docblock for it
|
||||||
( re.compile("(?P<m>VLIB_REGISTER_NODE)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (\g<name>) */ vlib_node_registration_t \g<name>"),
|
( re.compile("(?P<m>VLIB_REGISTER_NODE)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (\g<name>) */ vlib_node_registration_t \g<name>"),
|
||||||
|
( re.compile("(?P<m>VLIB_REGISTER_NODE)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<qual>[^)]*)[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (\g<name>) */ \g<qual> vlib_node_registration_t \g<name>"),
|
||||||
|
|
||||||
# Search for VLIB_INIT_FUNCTION, extract its parameter and add a docblock for it
|
# Search for VLIB_INIT_FUNCTION, extract its parameter and add a docblock for it
|
||||||
( re.compile("(?P<m>VLIB_INIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"), r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ vlib_init_function_t * _vlib_init_function_\g<name>"),
|
( re.compile("(?P<m>VLIB_INIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"),
|
||||||
( re.compile("(?P<m>VLIB_DECLARE_INIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"), r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ vlib_init_function_t * _vlib_init_function_\g<name>"),
|
r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ vlib_init_function_t * _vlib_init_function_\g<name>"),
|
||||||
|
( re.compile("(?P<m>VLIB_DECLARE_INIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ vlib_init_function_t * _vlib_init_function_\g<name>"),
|
||||||
|
|
||||||
# Search for VLIB_LOOP_ENTER_FUNCTION, extract the 1st parameter (ignore any others) and add a docblock for it
|
# Search for VLIB_LOOP_ENTER_FUNCTION, extract the parameters and add a docblock for it
|
||||||
( re.compile("(?P<m>VLIB_MAIN_LOOP_ENTER_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ _vlib_main_loop_enter_\g<name>"),
|
( re.compile("(?P<m>VLIB_MAIN_LOOP_ENTER_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"),
|
||||||
( re.compile("(?P<m>VLIB_MAIN_LOOP_EXIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ _vlib_main_loop_exit_\g<name>"),
|
r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ _vlib_main_loop_enter_\g<name>"),
|
||||||
|
( re.compile("(?P<m>VLIB_MAIN_LOOP_EXIT_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+)(,[^)]*)?[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (@ref \g<name>) */ _vlib_main_loop_exit_\g<name>"),
|
||||||
|
|
||||||
# Search for VLIB_CONFIG_FUNCTION, extract the 1st parameter (ignore any others) and add a docblock for it
|
# Search for VLIB_CONFIG_FUNCTION, extract the parameters and add a docblock for it
|
||||||
( re.compile("(?P<m>VLIB_CONFIG_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<n>\"[^\"]+\")(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (\g<name>, \g<n>) */ vlib_config_function_runtime_t _vlib_config_function_\g<name>"),
|
( re.compile("(?P<m>VLIB_CONFIG_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<n>\"[^\"]+\")(,[^)]*)?[)]"),
|
||||||
( re.compile("(?P<m>VLIB_EARLY_CONFIG_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<n>\"[^\"]+\")(,[^)]*)?[)]"), r"/** @brief (@em constructor) \g<m> (\g<name>, \g<n>) */ vlib_config_function_runtime_t _vlib_config_function_\g<name>"),
|
r"/** @brief (@em constructor) \g<m> (\g<name>, \g<n>) */ vlib_config_function_runtime_t _vlib_config_function_\g<name>"),
|
||||||
|
( re.compile("(?P<m>VLIB_EARLY_CONFIG_FUNCTION)\s*[(](?P<name>[a-zA-Z0-9_]+),\s*(?P<n>\"[^\"]+\")(,[^)]*)?[)]"),
|
||||||
|
r"/** @brief (@em constructor) \g<m> (\g<name>, \g<n>) */ vlib_config_function_runtime_t _vlib_config_function_\g<name>"),
|
||||||
|
|
||||||
# Search for "format_thing" and "unformat_thing" when used as a function pointer and add parens
|
# Search for "format_thing" and "unformat_thing" when used as a function pointer and add parens
|
||||||
( re.compile("(?P<pre>(^|,)\s*)(?P<name>(un)?format_[a-zA-Z0-9_]+)(?P<post>\s*(,|$))") , r"\g<pre>\g<name>()\g<post>" ),
|
( re.compile("(?P<pre>(^|,)\s*)(?P<name>(un)?format_[a-zA-Z0-9_]+)(?P<post>\s*(,|$))"),
|
||||||
|
r"\g<pre>\g<name>()\g<post>" ),
|
||||||
|
|
||||||
|
# Search for CLIB_PAD_FROM_TO(...); and replace with padding
|
||||||
|
# #define CLIB_PAD_FROM_TO(from,to) u8 pad_##from[(to) - (from)]
|
||||||
|
( re.compile("(?P<m>CLIB_PAD_FROM_TO)\s*[(](?P<from>[^,]+),\s*(?P<to>[^)]+)[)]"),
|
||||||
|
r"/** Padding. */ u8 pad_\g<from>[(\g<to>) - (\g<from>)]" ),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
with open(sys.argv[1]) as fd:
|
|
||||||
|
filename = sys.argv[1]
|
||||||
|
cwd = os.getcwd()
|
||||||
|
if filename[0:len(cwd)] == cwd:
|
||||||
|
filename = filename[len(cwd):]
|
||||||
|
if filename[0] == "/":
|
||||||
|
filename = filename[1:]
|
||||||
|
|
||||||
|
with open(filename) as fd:
|
||||||
|
line_num = 0
|
||||||
|
|
||||||
for line in fd:
|
for line in fd:
|
||||||
|
line_num += 1
|
||||||
str = line[:-1] # filter \n
|
str = line[:-1] # filter \n
|
||||||
for p in patterns:
|
|
||||||
|
# Look for search/replace patterns
|
||||||
|
for p in replace_patterns:
|
||||||
str = p[0].sub(p[1], str)
|
str = p[0].sub(p[1], str)
|
||||||
|
|
||||||
sys.stdout.write(str+"\n")
|
sys.stdout.write(str+"\n")
|
||||||
|
|
||||||
|
# All done
|
||||||
|
53
doxygen/filter_h.py
Executable file
53
doxygen/filter_h.py
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# Copyright (c) 2016 Comcast Cable Communications Management, LLC.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# Filter for .c files to make various preprocessor tricks Doxygenish
|
||||||
|
|
||||||
|
import os, sys, re
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
sys.stderr.write("Usage: %s <filename>\n" % (sys.argv[0]))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
replace_patterns = [
|
||||||
|
# Search for CLIB_PAD_FROM_TO(...); and replace with padding
|
||||||
|
# #define CLIB_PAD_FROM_TO(from,to) u8 pad_##from[(to) - (from)]
|
||||||
|
( re.compile("(?P<m>CLIB_PAD_FROM_TO)\s*[(](?P<from>[^,]+),\s*(?P<to>[^)]+)[)]"),
|
||||||
|
r"/** Padding. */ u8 pad_\g<from>[(\g<to>) - (\g<from>)]" ),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
filename = sys.argv[1]
|
||||||
|
cwd = os.getcwd()
|
||||||
|
if filename[0:len(cwd)] == cwd:
|
||||||
|
filename = filename[len(cwd):]
|
||||||
|
if filename[0] == "/":
|
||||||
|
filename = filename[1:]
|
||||||
|
|
||||||
|
with open(filename) as fd:
|
||||||
|
line_num = 0
|
||||||
|
|
||||||
|
for line in fd:
|
||||||
|
line_num += 1
|
||||||
|
str = line[:-1] # filter \n
|
||||||
|
|
||||||
|
# Look for search/replace patterns
|
||||||
|
for p in replace_patterns:
|
||||||
|
str = p[0].sub(p[1], str)
|
||||||
|
|
||||||
|
sys.stdout.write(str+"\n")
|
||||||
|
|
||||||
|
# All done
|
322
doxygen/siphon_generate.py
Executable file
322
doxygen/siphon_generate.py
Executable file
File diff suppressed because it is too large
Load Diff
323
doxygen/siphon_process.py
Executable file
323
doxygen/siphon_process.py
Executable file
File diff suppressed because it is too large
Load Diff
11
doxygen/user_doc.md
Normal file
11
doxygen/user_doc.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
User Configuration Examples {#user_doc}
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Several modules provide operational documentation.
|
||||||
|
|
||||||
|
- [GUI guided user demo](https://wiki.fd.io/view/VPP_Sandbox/vpp-userdemo)
|
||||||
|
- @subpage ipsec_gre_doc
|
||||||
|
- @subpage map_doc
|
||||||
|
- @subpage ioam_plugin_doc
|
||||||
|
- @subpage lb_plugin_doc
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
|
||||||
|
index 50f0b28..ad59613 100644
|
||||||
|
--- a/drivers/net/enic/enic_rxtx.c
|
||||||
|
+++ b/drivers/net/enic/enic_rxtx.c
|
||||||
|
@@ -212,9 +212,12 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
|
||||||
|
/* checksum flags */
|
||||||
|
if (!enic_cq_rx_desc_csum_not_calc(cqrd) &&
|
||||||
|
(mbuf->packet_type & RTE_PTYPE_L3_IPV4)) {
|
||||||
|
+ uint32_t l4_flags = mbuf->packet_type & RTE_PTYPE_L4_MASK;
|
||||||
|
+
|
||||||
|
if (unlikely(!enic_cq_rx_desc_ipv4_csum_ok(cqrd)))
|
||||||
|
pkt_flags |= PKT_RX_IP_CKSUM_BAD;
|
||||||
|
- if (mbuf->packet_type & (RTE_PTYPE_L4_UDP | RTE_PTYPE_L4_TCP)) {
|
||||||
|
+ if (l4_flags == RTE_PTYPE_L4_UDP ||
|
||||||
|
+ l4_flags == RTE_PTYPE_L4_TCP) {
|
||||||
|
if (unlikely(!enic_cq_rx_desc_tcp_udp_csum_ok(cqrd)))
|
||||||
|
pkt_flags |= PKT_RX_L4_CKSUM_BAD;
|
||||||
|
}
|
@ -53,13 +53,13 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1")
|
|||||||
# SUBDIRS += new-plugin
|
# SUBDIRS += new-plugin
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
PLUGIN_ENABLED(sixrd)
|
|
||||||
PLUGIN_ENABLED(ioam)
|
PLUGIN_ENABLED(ioam)
|
||||||
PLUGIN_ENABLED(snat)
|
PLUGIN_ENABLED(snat)
|
||||||
PLUGIN_ENABLED(ila)
|
PLUGIN_ENABLED(ila)
|
||||||
PLUGIN_ENABLED(lb)
|
PLUGIN_ENABLED(lb)
|
||||||
|
|
||||||
# Disabled plugins, require --enable-XXX-plugin
|
# Disabled plugins, require --enable-XXX-plugin
|
||||||
|
PLUGIN_DISABLED(sixrd)
|
||||||
PLUGIN_DISABLED(vcgn)
|
PLUGIN_DISABLED(vcgn)
|
||||||
PLUGIN_DISABLED(sample)
|
PLUGIN_DISABLED(sample)
|
||||||
|
|
||||||
|
@ -16,14 +16,27 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
|
|||||||
AM_CFLAGS = -Wall
|
AM_CFLAGS = -Wall
|
||||||
AM_LDFLAGS = -module -shared -avoid-version
|
AM_LDFLAGS = -module -shared -avoid-version
|
||||||
|
|
||||||
|
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||||
vpppluginsdir = ${libdir}/vpp_plugins
|
vpppluginsdir = ${libdir}/vpp_plugins
|
||||||
|
|
||||||
|
vppapitestplugins_LTLIBRARIES = ila_test_plugin.la
|
||||||
vppplugins_LTLIBRARIES = ila_plugin.la
|
vppplugins_LTLIBRARIES = ila_plugin.la
|
||||||
|
|
||||||
ila_plugin_la_SOURCES = ila/ila.c
|
ila_plugin_la_SOURCES = ila/ila.c ila/ila_api.c
|
||||||
|
|
||||||
noinst_HEADERS = ila/ila.h
|
SUFFIXES = .api.h .api
|
||||||
|
|
||||||
|
%.api.h: %.api
|
||||||
|
mkdir -p `dirname $@` ; \
|
||||||
|
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||||
|
| vppapigen --input - --output $@ --show-name $@
|
||||||
|
|
||||||
|
noinst_HEADERS = ila/ila.h ila/ila.api.h
|
||||||
|
|
||||||
|
ila_test_plugin_la_SOURCES = \
|
||||||
|
ila/ila_api_test.c
|
||||||
|
|
||||||
# Remove *.la files
|
# Remove *.la files
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||||
|
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
|
||||||
|
62
plugins/ila-plugin/ila/ila.api
Normal file
62
plugins/ila-plugin/ila/ila.api
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/** \brief Enable ILA processing of SIR-to-ILA packets on a given interface.
|
||||||
|
@param client_index - opaque cookie to identify the sender
|
||||||
|
@param context - sender context, to match reply w/ request
|
||||||
|
@param sw_if_index - The software interface index.
|
||||||
|
@param enable - Enable if not null, disable otherwise.
|
||||||
|
*/
|
||||||
|
define ila_iface
|
||||||
|
{
|
||||||
|
u32 client_index;
|
||||||
|
u32 context;
|
||||||
|
u32 sw_if_index;
|
||||||
|
u8 enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
define ila_iface_reply {
|
||||||
|
u32 context;
|
||||||
|
i32 retval;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** \brief Add or delete an ILA entry.
|
||||||
|
@param client_index - opaque cookie to identify the sender
|
||||||
|
@param context - sender context, to match reply w/ request
|
||||||
|
@param type - The ILA type to be used.
|
||||||
|
Supported values:
|
||||||
|
0: Interface Identifier (iid)
|
||||||
|
1: Locally Unique Identifier (luid)
|
||||||
|
3: IPv6 Virtual Network Identifier (vnid-ip6)
|
||||||
|
4: Multicast Virtual Network Identifier (vnid-multicast)
|
||||||
|
@param sir_address - Standard Identifier Representation address which uniquely
|
||||||
|
identifies the ILA entry.
|
||||||
|
@param local_adj_index - The local FIB index if the entry is a local entry,
|
||||||
|
~0 if the entry is not local (only used to translate from SIR to ILA).
|
||||||
|
@param csum_mode - The checksum mode for this entry.
|
||||||
|
Supported values:
|
||||||
|
0: No action
|
||||||
|
1: Neutral Mapping
|
||||||
|
2: Adjust for Transport Layer
|
||||||
|
@param dir - The translation direction
|
||||||
|
Supported values:
|
||||||
|
0: Bidirection
|
||||||
|
1: SIR to ILA only
|
||||||
|
2: ILA to SIR only
|
||||||
|
@param is_del - Whether the entry with the given SIR address should be deleted.
|
||||||
|
*/
|
||||||
|
define ila_add_del_entry {
|
||||||
|
u32 client_index;
|
||||||
|
u32 context;
|
||||||
|
u8 type;
|
||||||
|
u8 sir_address[16];
|
||||||
|
u64 locator;
|
||||||
|
u32 vnid;
|
||||||
|
u32 local_adj_index;
|
||||||
|
u8 csum_mode;
|
||||||
|
u8 dir;
|
||||||
|
u8 is_del;
|
||||||
|
};
|
||||||
|
|
||||||
|
define ila_add_del_entry_reply {
|
||||||
|
u32 context;
|
||||||
|
i32 retval;
|
||||||
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,10 @@
|
|||||||
_(VNID6, 3, "vnid-ip6") \
|
_(VNID6, 3, "vnid-ip6") \
|
||||||
_(VNIDM, 4, "vnid-multicast")
|
_(VNIDM, 4, "vnid-multicast")
|
||||||
|
|
||||||
typedef enum {
|
#define ila_type_list "iid,luid,vnid-ip4,vnid-ip6,vnid-multicast"
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
#define _(i,n,s) ILA_TYPE_##i = n,
|
#define _(i,n,s) ILA_TYPE_##i = n,
|
||||||
ila_foreach_type
|
ila_foreach_type
|
||||||
#undef _
|
#undef _
|
||||||
@ -40,7 +43,10 @@ _(NO_ACTION, 0, "no-action") \
|
|||||||
_(NEUTRAL_MAP, 1, "neutral-map") \
|
_(NEUTRAL_MAP, 1, "neutral-map") \
|
||||||
_(ADJUST_TRANSPORT, 2, "adjust-transport")
|
_(ADJUST_TRANSPORT, 2, "adjust-transport")
|
||||||
|
|
||||||
typedef enum {
|
#define ila_csum_list "no-action,neutral-map,adjust-transport"
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
#define _(i,n,s) ILA_CSUM_MODE_##i = n,
|
#define _(i,n,s) ILA_CSUM_MODE_##i = n,
|
||||||
ila_csum_foreach_type
|
ila_csum_foreach_type
|
||||||
#undef _
|
#undef _
|
||||||
@ -52,13 +58,17 @@ _(BIDIR, 0, "bidir") \
|
|||||||
_(SIR2ILA, 1, "sir2ila") \
|
_(SIR2ILA, 1, "sir2ila") \
|
||||||
_(ILA2SIR, 2, "ila2sir")
|
_(ILA2SIR, 2, "ila2sir")
|
||||||
|
|
||||||
typedef enum {
|
#define ila_direction_list "bidir,sir2ila,ila2sir"
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
#define _(i,n,s) ILA_DIR_##i = n,
|
#define _(i,n,s) ILA_DIR_##i = n,
|
||||||
ila_foreach_direction
|
ila_foreach_direction
|
||||||
#undef _
|
#undef _
|
||||||
} ila_direction_t;
|
} ila_direction_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
ila_type_t type;
|
ila_type_t type;
|
||||||
ip6_address_t sir_address;
|
ip6_address_t sir_address;
|
||||||
ip6_address_t ila_address;
|
ip6_address_t ila_address;
|
||||||
@ -67,11 +77,13 @@ typedef struct {
|
|||||||
ila_direction_t dir;
|
ila_direction_t dir;
|
||||||
} ila_entry_t;
|
} ila_entry_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
u32 entry_index;
|
u32 entry_index;
|
||||||
} ila_adj_data_t;
|
} ila_adj_data_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
ila_entry_t *entries; //Pool of ILA entries
|
ila_entry_t *entries; //Pool of ILA entries
|
||||||
|
|
||||||
u64 lookup_table_nbuckets;
|
u64 lookup_table_nbuckets;
|
||||||
@ -84,7 +96,8 @@ typedef struct {
|
|||||||
} ila_main_t;
|
} ila_main_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
ila_type_t type;
|
ila_type_t type;
|
||||||
ip6_address_t sir_address;
|
ip6_address_t sir_address;
|
||||||
u64 locator;
|
u64 locator;
|
||||||
@ -98,4 +111,9 @@ typedef struct {
|
|||||||
int ila_add_del_entry (ila_add_del_entry_args_t * args);
|
int ila_add_del_entry (ila_add_del_entry_args_t * args);
|
||||||
int ila_interface (u32 sw_if_index, u8 disable);
|
int ila_interface (u32 sw_if_index, u8 disable);
|
||||||
|
|
||||||
|
u8 *format_half_ip6_address (u8 * s, va_list * va);
|
||||||
|
u8 *format_ila_direction (u8 * s, va_list * args);
|
||||||
|
u8 *format_ila_csum_mode (u8 * s, va_list * va);
|
||||||
|
u8 *format_ila_type (u8 * s, va_list * args);
|
||||||
|
|
||||||
#endif //ILA_H
|
#endif //ILA_H
|
||||||
|
159
plugins/ila-plugin/ila/ila_api.c
Normal file
159
plugins/ila-plugin/ila/ila_api.c
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ila/ila.h>
|
||||||
|
|
||||||
|
#include <vppinfra/byte_order.h>
|
||||||
|
#include <vlibapi/api.h>
|
||||||
|
#include <vlibapi/api.h>
|
||||||
|
#include <vlibmemory/api.h>
|
||||||
|
#include <vlibsocket/api.h>
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
u16 msg_id_base;
|
||||||
|
} ila_api_main_t;
|
||||||
|
|
||||||
|
ila_api_main_t ila_api_main;
|
||||||
|
|
||||||
|
#define vl_msg_id(n,h) n,
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
#include <ila/ila.api.h>
|
||||||
|
/* We'll want to know how many messages IDs we need... */
|
||||||
|
VL_MSG_FIRST_AVAILABLE,
|
||||||
|
} vl_msg_id_t;
|
||||||
|
#undef vl_msg_id
|
||||||
|
|
||||||
|
/* define message structures */
|
||||||
|
#define vl_typedefs
|
||||||
|
#include <ila/ila.api.h>
|
||||||
|
#undef vl_typedefs
|
||||||
|
|
||||||
|
/* define generated endian-swappers */
|
||||||
|
#define vl_endianfun
|
||||||
|
#include <ila/ila.api.h>
|
||||||
|
#undef vl_endianfun
|
||||||
|
|
||||||
|
#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
|
||||||
|
|
||||||
|
/* Get the API version number */
|
||||||
|
#define vl_api_version(n,v) static u32 api_version=(v);
|
||||||
|
#include <ila/ila.api.h>
|
||||||
|
#undef vl_api_version
|
||||||
|
|
||||||
|
#define FINISH \
|
||||||
|
vec_add1 (s, 0); \
|
||||||
|
vl_print (handle, (char *)s); \
|
||||||
|
vec_free (s); \
|
||||||
|
return handle;
|
||||||
|
|
||||||
|
#define REPLY_MACRO(t) \
|
||||||
|
do { \
|
||||||
|
unix_shared_memory_queue_t * q = \
|
||||||
|
vl_api_client_index_to_input_queue (mp->client_index); \
|
||||||
|
if (!q) \
|
||||||
|
return; \
|
||||||
|
\
|
||||||
|
rmp = vl_msg_api_alloc (sizeof (*rmp)); \
|
||||||
|
rmp->_vl_msg_id = ntohs((t)+ila_api_main.msg_id_base); \
|
||||||
|
rmp->context = mp->context; \
|
||||||
|
rmp->retval = ntohl(rv); \
|
||||||
|
\
|
||||||
|
vl_msg_api_send_shmem (q, (u8 *)&rmp); \
|
||||||
|
} while(0);
|
||||||
|
|
||||||
|
static void
|
||||||
|
vl_api_ila_iface_t_handler (vl_api_ila_iface_t * mp)
|
||||||
|
{
|
||||||
|
vl_api_ila_iface_reply_t *rmp;
|
||||||
|
int rv = 0;
|
||||||
|
rv = ila_interface (mp->sw_if_index, !mp->enable);
|
||||||
|
|
||||||
|
REPLY_MACRO (VL_API_ILA_IFACE_REPLY);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
|
vl_api_ila_iface_t_print (vl_api_ila_iface_t * mp, void *handle)
|
||||||
|
{
|
||||||
|
u8 *s;
|
||||||
|
s = format (0, "SCRIPT: ila_iface ");
|
||||||
|
s = format (s, "%d ", mp->sw_if_index);
|
||||||
|
s = format (s, "%s", mp->enable ? "enable" : "disable");
|
||||||
|
FINISH;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
vl_api_ila_add_del_entry_t_handler (vl_api_ila_add_del_entry_t * mp)
|
||||||
|
{
|
||||||
|
vl_api_ila_add_del_entry_reply_t *rmp;
|
||||||
|
int rv = 0;
|
||||||
|
ila_add_del_entry_args_t args;
|
||||||
|
args.type = mp->type;
|
||||||
|
memcpy (&args.sir_address, mp->sir_address, sizeof (args.sir_address));
|
||||||
|
args.locator = mp->locator;
|
||||||
|
args.vnid = mp->vnid;
|
||||||
|
args.local_adj_index = mp->local_adj_index;
|
||||||
|
args.csum_mode = mp->csum_mode;
|
||||||
|
args.dir = mp->dir;
|
||||||
|
args.is_del = mp->is_del;
|
||||||
|
|
||||||
|
rv = ila_add_del_entry (&args);
|
||||||
|
REPLY_MACRO (VL_API_ILA_ADD_DEL_ENTRY_REPLY);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *vl_api_ila_add_del_entry_t_print
|
||||||
|
(vl_api_ila_add_del_entry_t * mp, void *handle)
|
||||||
|
{
|
||||||
|
u8 *s;
|
||||||
|
s = format (0, "SCRIPT: ila_add_del_entry ");
|
||||||
|
s = format (s, "%U ", format_ila_type, mp->type);
|
||||||
|
s = format (s, "%U ", format_ip6_address, mp->sir_address);
|
||||||
|
s = format (s, "%U ", format_half_ip6_address, mp->locator);
|
||||||
|
s = format (s, "%d ", mp->vnid);
|
||||||
|
s = format (s, "%d ", mp->local_adj_index);
|
||||||
|
s = format (s, "%U ", format_ila_csum_mode, mp->csum_mode);
|
||||||
|
s = format (s, "%U ", format_ila_direction, mp->dir);
|
||||||
|
s = format (s, "%s ", mp->is_del ? "del" : "add");
|
||||||
|
FINISH;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* List of message types that this plugin understands */
|
||||||
|
#define foreach_ila_plugin_api_msg \
|
||||||
|
_(ILA_IFACE, ila_iface) \
|
||||||
|
_(ILA_ADD_DEL_ENTRY, ila_add_del_entry)
|
||||||
|
|
||||||
|
static clib_error_t *
|
||||||
|
ila_api_init (vlib_main_t * vm)
|
||||||
|
{
|
||||||
|
u8 *name = format (0, "ila_%08x%c", api_version, 0);
|
||||||
|
ila_api_main.msg_id_base = vl_msg_api_get_msg_ids
|
||||||
|
((char *) name, VL_MSG_FIRST_AVAILABLE);
|
||||||
|
|
||||||
|
#define _(N,n) \
|
||||||
|
vl_msg_api_set_handlers((VL_API_##N + ila_api_main.msg_id_base), \
|
||||||
|
#n, \
|
||||||
|
vl_api_##n##_t_handler, \
|
||||||
|
vl_noop_handler, \
|
||||||
|
vl_api_##n##_t_endian, \
|
||||||
|
vl_api_##n##_t_print, \
|
||||||
|
sizeof(vl_api_##n##_t), 1);
|
||||||
|
foreach_ila_plugin_api_msg;
|
||||||
|
#undef _
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
VLIB_INIT_FUNCTION (ila_api_init);
|
319
plugins/ila-plugin/ila/ila_api_test.c
Normal file
319
plugins/ila-plugin/ila/ila_api_test.c
Normal file
File diff suppressed because it is too large
Load Diff
18
plugins/ioam-plugin/ioam/dir.dox
Normal file
18
plugins/ioam-plugin/ioam/dir.dox
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
@dir
|
||||||
|
@brief Inband OAM (iOAM) implementation
|
||||||
|
*/
|
464
plugins/ioam-plugin/ioam/ioam_plugin_doc.md
Normal file
464
plugins/ioam-plugin/ioam/ioam_plugin_doc.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
# Load Balancer plugin for VPP
|
# Load Balancer plugin for VPP {#lb_plugin_doc}
|
||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user