From a23197980e40d4d9414bcfaf59005a1dc2a89251 Mon Sep 17 00:00:00 2001 From: sreejith Date: Wed, 29 Mar 2017 01:15:02 -0400 Subject: Added vpp intial source code from master branch 17.01.1 Change-Id: I81bdace6f330825a1746a853766779dfb24765fd Signed-off-by: sreejith --- vpp/.gitignore | 90 + vpp/.gitreview | 5 + vpp/LICENSE | 202 + vpp/Makefile | 375 + vpp/README.md | 102 + vpp/RELEASE.md | 280 + vpp/build-data/packages/cavium-dpdk.mk | 55 + vpp/build-data/packages/dpdk.mk | 44 + vpp/build-data/packages/g2.mk | 5 + vpp/build-data/packages/gmod.mk | 9 + vpp/build-data/packages/perftool.mk | 5 + vpp/build-data/packages/plugins.mk | 45 + vpp/build-data/packages/svm.mk | 5 + vpp/build-data/packages/vlib-api-cavium-dpdk.mk | 6 + vpp/build-data/packages/vlib-api.mk | 4 + vpp/build-data/packages/vlib-cavium-dpdk.mk | 7 + vpp/build-data/packages/vlib.mk | 16 + vpp/build-data/packages/vnet-cavium-dpdk.mk | 29 + vpp/build-data/packages/vnet.mk | 44 + .../packages/vpp-api-test-cavium-dpdk.mk | 32 + vpp/build-data/packages/vpp-api-test.mk | 39 + vpp/build-data/packages/vpp-api.mk | 23 + vpp/build-data/packages/vpp-cavium-dpdk.mk | 30 + vpp/build-data/packages/vpp-platform-scripts.mk | 1 + vpp/build-data/packages/vpp.mk | 51 + vpp/build-data/packages/vppinfra.mk | 5 + vpp/build-data/platforms.mk | 105 + vpp/build-data/platforms/arm32.mk | 45 + vpp/build-data/platforms/dpaa2.mk | 66 + vpp/build-data/platforms/qppc.mk | 34 + vpp/build-data/platforms/thunder.mk | 36 + vpp/build-data/platforms/vpp.mk | 68 + vpp/build-data/platforms/vpp_lite.mk | 51 + vpp/build-data/suffix-rules.mk | 27 + vpp/build-root/Makefile | 1171 + vpp/build-root/autowank | 307 + vpp/build-root/bootstrap.sh | 52 + vpp/build-root/build-config.mk.README | 3 + vpp/build-root/config.site | 105 + vpp/build-root/copyimg | 83 + vpp/build-root/deb/debian/.gitignore | 14 + vpp/build-root/deb/debian/README.vpp | 56 + vpp/build-root/deb/debian/compat | 1 + vpp/build-root/deb/debian/control | 68 + vpp/build-root/deb/debian/copyright | 9 + vpp/build-root/deb/debian/rules | 31 + vpp/build-root/deb/debian/source/format | 1 + vpp/build-root/deb/debian/vpp-bin.README.Debian | 53 + vpp/build-root/deb/debian/vpp-python-api.postinst | 5 + vpp/build-root/deb/debian/vpp-python-api.prerm | 8 + vpp/build-root/deb/debian/vpp.postinst | 8 + vpp/build-root/deb/debian/vpp.postrm | 21 + vpp/build-root/deb/debian/vpp.preinst | 4 + vpp/build-root/deb/debian/vpp.service | 14 + vpp/build-root/deb/debian/vpp.upstart | 21 + vpp/build-root/emacs-lisp/README | 86 + vpp/build-root/emacs-lisp/all-skel.el | 41 + vpp/build-root/emacs-lisp/cli-cmd-skel.el | 32 + vpp/build-root/emacs-lisp/config-skel.el | 28 + vpp/build-root/emacs-lisp/dual-loop-skel.el | 302 + vpp/build-root/emacs-lisp/elog-4-int-skel.el | 31 + vpp/build-root/emacs-lisp/elog-4-int-track-skel.el | 34 + vpp/build-root/emacs-lisp/elog-enum-skel.el | 35 + vpp/build-root/emacs-lisp/elog-one-datum-skel.el | 28 + vpp/build-root/emacs-lisp/fix-coding-style.el | 162 + vpp/build-root/emacs-lisp/make-plugin.sh | 4 + vpp/build-root/emacs-lisp/periodic-skel.el | 86 + vpp/build-root/emacs-lisp/pipe-skel.el | 132 + vpp/build-root/emacs-lisp/plugin-all-apih-skel.el | 43 + vpp/build-root/emacs-lisp/plugin-api-skel.el | 48 + vpp/build-root/emacs-lisp/plugin-configure-skel.el | 33 + vpp/build-root/emacs-lisp/plugin-h-skel.el | 66 + vpp/build-root/emacs-lisp/plugin-main-skel.el | 275 + vpp/build-root/emacs-lisp/plugin-makefile-skel.el | 75 + vpp/build-root/emacs-lisp/plugin-msg-enum-skel.el | 55 + vpp/build-root/emacs-lisp/plugin-node-skel.el | 320 + vpp/build-root/emacs-lisp/plugin-test-skel.el | 235 + vpp/build-root/emacs-lisp/plugin.el | 35 + vpp/build-root/emacs-lisp/tunnel-c-skel.el | 441 + vpp/build-root/emacs-lisp/tunnel-decap-skel.el | 299 + vpp/build-root/emacs-lisp/tunnel-encap-skel.el | 245 + vpp/build-root/emacs-lisp/tunnel-h-skel.el | 128 + vpp/build-root/packages/vppapigen.mk | 5 + vpp/build-root/packages/vppinfra.mk | 4 + vpp/build-root/platforms.mk | 50 + vpp/build-root/rpm/vpp.service | 14 + vpp/build-root/rpm/vpp.spec | 264 + vpp/build-root/scripts/checkstyle.sh | 92 + vpp/build-root/scripts/csit-test-branch | 2 + vpp/build-root/scripts/find-api-core-contents | 9 + vpp/build-root/scripts/find-api-lib-contents | 6 + vpp/build-root/scripts/find-dev-contents | 31 + vpp/build-root/scripts/find-dpdk-contents | 29 + vpp/build-root/scripts/find-plugins-contents | 15 + vpp/build-root/scripts/find-python-api-contents | 8 + vpp/build-root/scripts/generate-deb-changelog | 37 + vpp/build-root/scripts/lsnet | 20 + vpp/build-root/scripts/make-plugin-toolkit | 40 + vpp/build-root/scripts/pci-nic-bind | 94 + vpp/build-root/scripts/pci-nic-bind-to-kernel | 19 + vpp/build-root/scripts/remove-rpath | 24 + vpp/build-root/scripts/verdist | 31 + vpp/build-root/scripts/version | 54 + vpp/build-root/vagrant/.gitignore | 1 + vpp/build-root/vagrant/README | 28 + vpp/build-root/vagrant/Vagrantfile | 113 + vpp/build-root/vagrant/WELCOME | 61 + vpp/build-root/vagrant/build.sh | 74 + vpp/build-root/vagrant/clearinterfaces.sh | 17 + vpp/build-root/vagrant/env.sh | 6 + vpp/build-root/vagrant/install.sh | 30 + vpp/build-root/vagrant/run.sh | 23 + vpp/build-root/vagrant/update.sh | 48 + vpp/doxygen/Makefile | 256 + vpp/doxygen/assets/doxy-vpp.css | 47 + vpp/doxygen/assets/logo_fdio.png | Bin 0 -> 3092 bytes vpp/doxygen/dir.dox.sample | 30 + vpp/doxygen/doxygen.cfg | 2456 ++ vpp/doxygen/filter_api.py | 45 + vpp/doxygen/filter_c.py | 87 + vpp/doxygen/filter_h.py | 53 + vpp/doxygen/layout.xml | 194 + vpp/doxygen/siphon-generate | 74 + vpp/doxygen/siphon-process | 71 + vpp/doxygen/siphon/__init__.py | 24 + vpp/doxygen/siphon/generate.py | 304 + vpp/doxygen/siphon/generate_clicmd.py | 22 + vpp/doxygen/siphon/generate_syscfg.py | 22 + vpp/doxygen/siphon/parsers.py | 149 + vpp/doxygen/siphon/process.py | 311 + vpp/doxygen/siphon/process_clicmd.py | 56 + vpp/doxygen/siphon/process_syscfg.py | 30 + .../itemlist/clicmd/item_format.itemlist | 17 + .../itemlist/default/index_entry.itemlist | 15 + .../itemlist/default/index_header.itemlist | 15 + .../itemlist/default/index_section.itemlist | 15 + .../itemlist/default/item_format.itemlist | 16 + .../itemlist/default/item_header.itemlist | 15 + .../itemlist/syscfg/item_format.itemlist | 17 + .../markdown/clicmd/index_entry.md | 17 + .../markdown/clicmd/index_header.md | 130 + .../markdown/clicmd/item_format.md | 59 + .../markdown/default/index_entry.md | 16 + .../markdown/default/index_section.md | 18 + .../markdown/default/item_format.md | 16 + .../markdown/default/item_header.md | 18 + .../markdown/syscfg/index_header.md | 111 + .../markdown/syscfg/item_format.md | 42 + vpp/doxygen/user_doc.md | 14 + vpp/dpdk/Makefile | 197 + vpp/dpdk/README | 34 + vpp/dpdk/dkms/Makefile | 10 + vpp/dpdk/dkms/create_deb_manifest.sh | 28 + ...Add-packet_type-metadata-in-the-i40e-vPMD.patch | 1210 + ...0e-Enable-bad-checksum-flags-in-i40e-vPMD.patch | 111 + ...T_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch | 42 + ...vert-ixgbe-fix-packet-type-from-vector-Rx.patch | 133 + ...DPAA2-Poll-Mode-Driver-Support-dpdk-16.07.patch | 40106 +++++++++++++++++++ ...ers-reset-packet_type-before-using-buffer.patch | 70 + ...low-applications-to-override-rte_delay_us.patch | 43 + ...rash-in-igb_uio-driver-when-the-device-is.patch | 38 + ...mporarily-disable-unthrottled-log-message.patch | 26 + ...bad-L4-checksum-ptype-set-on-ICMP-packets.patch | 18 + ...irtio-enable-indirect-descriptors-feature.patch | 34 + ...io-tx-with-can_push-when-VERSION_1-is-set.patch | 38 + vpp/g2/Makefile.am | 34 + vpp/g2/clib.c | 154 + vpp/g2/configure.ac | 12 + vpp/g2/cpel.c | 470 + vpp/g2/cpel.h | 83 + vpp/g2/events.c | 475 + vpp/g2/g2.h | 195 + vpp/g2/g2version.c | 19 + vpp/g2/main.c | 196 + vpp/g2/menu1.c | 565 + vpp/g2/mkversion.c | 77 + vpp/g2/pointsel.c | 854 + vpp/g2/props.c | 279 + vpp/g2/props.h | 21 + vpp/g2/view1.c | 3077 ++ vpp/gmod/Makefile.am | 27 + vpp/gmod/configure.ac | 8 + vpp/gmod/gmod/mod_vpp.c | 156 + vpp/gmod/gmod/vpp.conf | 31 + vpp/perftool/Makefile.am | 44 + vpp/perftool/c2cpel.c | 248 + vpp/perftool/configure.ac | 12 + vpp/perftool/cpel.h | 83 + vpp/perftool/cpel_util.c | 456 + vpp/perftool/cpel_util.h | 68 + vpp/perftool/cpelatency.c | 927 + vpp/perftool/cpeldump.c | 638 + vpp/perftool/cpelinreg.c | 892 + vpp/perftool/cpelstate.c | 822 + vpp/perftool/delsvec.c | 315 + vpp/perftool/linreg.c | 78 + vpp/perftool/new.cpel | Bin 0 -> 1672 bytes vpp/perftool/new.elog | Bin 0 -> 4525 bytes vpp/perftool/props.c | 280 + vpp/plugins/Makefile.am | 61 + vpp/plugins/acl-plugin/Makefile.am | 114 + vpp/plugins/acl-plugin/acl/acl.api | 444 + vpp/plugins/acl-plugin/acl/acl.c | 1952 + vpp/plugins/acl-plugin/acl/acl.h | 147 + vpp/plugins/acl-plugin/acl/acl_all_api_h.h | 321 + vpp/plugins/acl-plugin/acl/acl_msg_enum.h | 28 + vpp/plugins/acl-plugin/acl/acl_test.c | 1024 + .../fd/vpp/jvpp/acl/test/AclExpectedDumpData.java | 135 + .../jvpp/io/fd/vpp/jvpp/acl/test/AclTestData.java | 101 + .../io/fd/vpp/jvpp/acl/test/AclTestRequests.java | 141 + .../io/fd/vpp/jvpp/acl/test/FutureApiTest.java | 68 + .../acl/jvpp/io/fd/vpp/jvpp/acl/test/Readme.txt | 1 + vpp/plugins/acl-plugin/acl/jvpp_acl.c | 124 + vpp/plugins/acl-plugin/acl/jvpp_acl.h | 45 + vpp/plugins/acl-plugin/acl/l2sess.c | 251 + vpp/plugins/acl-plugin/acl/l2sess.h | 149 + vpp/plugins/acl-plugin/acl/l2sess_node.c | 763 + vpp/plugins/acl-plugin/acl/node_in.c | 168 + vpp/plugins/acl-plugin/acl/node_in.h | 12 + vpp/plugins/acl-plugin/acl/node_out.c | 169 + vpp/plugins/acl-plugin/acl/node_out.h | 12 + vpp/plugins/acl-plugin/configure.ac | 24 + vpp/plugins/acl-plugin/test/run-python | 28 + vpp/plugins/acl-plugin/test/run-scapy | 26 + vpp/plugins/acl-plugin/test/test_acl_plugin.py | 118 + vpp/plugins/configure.ac | 68 + vpp/plugins/flowperpkt-plugin/Makefile.am | 63 + vpp/plugins/flowperpkt-plugin/configure.ac | 9 + .../flowperpkt-plugin/flowperpkt/flowperpkt.api | 42 + .../flowperpkt-plugin/flowperpkt/flowperpkt.c | 518 + .../flowperpkt-plugin/flowperpkt/flowperpkt.h | 72 + .../flowperpkt/flowperpkt_all_api_h.h | 18 + .../flowperpkt/flowperpkt_msg_enum.h | 31 + .../flowperpkt-plugin/flowperpkt/flowperpkt_test.c | 231 + vpp/plugins/flowperpkt-plugin/flowperpkt/node.c | 552 + .../flowperpkt-plugin/flowperpkt_plugin_doc.md | 13 + vpp/plugins/ila-plugin/Makefile.am | 29 + vpp/plugins/ila-plugin/configure.ac | 9 + vpp/plugins/ila-plugin/ila/ila.c | 1070 + vpp/plugins/ila-plugin/ila/ila.h | 116 + vpp/plugins/ioam-plugin/Makefile.am | 359 + vpp/plugins/ioam-plugin/configure.ac | 25 + vpp/plugins/ioam-plugin/ioam/dir.dox | 18 + vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c | 216 + vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.h | 47 + vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c | 276 + .../ioam-plugin/ioam/encap/ip6_ioam_seqno.c | 109 + .../ioam-plugin/ioam/encap/ip6_ioam_seqno.h | 70 + .../ioam/encap/ip6_ioam_seqno_analyse.c | 141 + .../ioam-plugin/ioam/encap/ip6_ioam_trace.c | 451 + .../ioam-plugin/ioam/export-common/ioam_export.h | 617 + .../export-vxlan-gpe/vxlan_gpe_ioam_export.api | 42 + .../ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c | 271 + .../vxlan_gpe_ioam_export_all_api_h.h | 16 + .../vxlan_gpe_ioam_export_msg_enum.h | 28 + .../export-vxlan-gpe/vxlan_gpe_ioam_export_test.c | 215 + .../vxlan_gpe_ioam_export_thread.c | 49 + .../ioam/export-vxlan-gpe/vxlan_gpe_node.c | 162 + .../ioam-plugin/ioam/export/ioam_export.api | 42 + vpp/plugins/ioam-plugin/ioam/export/ioam_export.c | 265 + .../ioam/export/ioam_export_all_api_h.h | 16 + .../ioam-plugin/ioam/export/ioam_export_msg_enum.h | 28 + .../ioam-plugin/ioam/export/ioam_export_test.c | 206 + .../ioam-plugin/ioam/export/ioam_export_thread.c | 38 + .../ioam-plugin/ioam/export/jvpp_ioam_export.c | 124 + .../ioam-plugin/ioam/export/jvpp_ioam_export.h | 45 + vpp/plugins/ioam-plugin/ioam/export/node.c | 151 + vpp/plugins/ioam-plugin/ioam/ioam_plugin_doc.md | 464 + .../jvpp/ioamexport/test/IoamExportApiTest.java | 56 + .../jvpp/io/fd/vpp/jvpp/ioamexport/test/Readme.txt | 1 + .../fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java | 75 + .../jvpp/io/fd/vpp/jvpp/ioampot/test/Readme.txt | 1 + .../vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java | 77 + .../jvpp/io/fd/vpp/jvpp/ioamtrace/test/Readme.txt | 1 + .../ioam-plugin/ioam/lib-pot/jvpp_ioam_pot.c | 124 + .../ioam-plugin/ioam/lib-pot/jvpp_ioam_pot.h | 45 + vpp/plugins/ioam-plugin/ioam/lib-pot/math64.h | 159 + vpp/plugins/ioam-plugin/ioam/lib-pot/pot.api | 133 + .../ioam-plugin/ioam/lib-pot/pot_all_api_h.h | 16 + vpp/plugins/ioam-plugin/ioam/lib-pot/pot_api.c | 276 + .../ioam-plugin/ioam/lib-pot/pot_msg_enum.h | 28 + vpp/plugins/ioam-plugin/ioam/lib-pot/pot_test.c | 365 + vpp/plugins/ioam-plugin/ioam/lib-pot/pot_util.c | 445 + vpp/plugins/ioam-plugin/ioam/lib-pot/pot_util.h | 195 + .../ioam-plugin/ioam/lib-trace/jvpp_ioam_trace.c | 124 + .../ioam-plugin/ioam/lib-trace/jvpp_ioam_trace.h | 45 + vpp/plugins/ioam-plugin/ioam/lib-trace/trace.api | 92 + .../ioam-plugin/ioam/lib-trace/trace_all_api_h.h | 16 + vpp/plugins/ioam-plugin/ioam/lib-trace/trace_api.c | 237 + .../ioam-plugin/ioam/lib-trace/trace_msg_enum.h | 28 + .../ioam-plugin/ioam/lib-trace/trace_test.c | 292 + .../ioam-plugin/ioam/lib-trace/trace_util.c | 206 + .../ioam-plugin/ioam/lib-trace/trace_util.h | 247 + .../ioam-plugin/ioam/lib-vxlan-gpe/ioam_decap.c | 223 + .../ioam-plugin/ioam/lib-vxlan-gpe/ioam_encap.c | 194 + .../ioam-plugin/ioam/lib-vxlan-gpe/ioam_pop.c | 353 + .../ioam-plugin/ioam/lib-vxlan-gpe/ioam_transit.c | 188 + .../ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe.api | 181 + .../ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h | 16 + .../ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c | 361 + .../ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c | 773 + .../ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h | 183 + .../ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h | 61 + .../ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c | 552 + .../ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h | 172 + .../ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h | 28 + .../ioam/lib-vxlan-gpe/vxlan_gpe_test.c | 600 + vpp/plugins/lb-plugin/Makefile.am | 55 + vpp/plugins/lb-plugin/configure.ac | 9 + vpp/plugins/lb-plugin/lb/api.c | 228 + vpp/plugins/lb-plugin/lb/cli.c | 250 + vpp/plugins/lb-plugin/lb/lb.api | 71 + vpp/plugins/lb-plugin/lb/lb.c | 844 + vpp/plugins/lb-plugin/lb/lb.h | 333 + vpp/plugins/lb-plugin/lb/lb_test.c | 293 + vpp/plugins/lb-plugin/lb/lbhash.h | 216 + vpp/plugins/lb-plugin/lb/node.c | 419 + vpp/plugins/lb-plugin/lb/refcount.c | 41 + vpp/plugins/lb-plugin/lb/refcount.h | 67 + vpp/plugins/lb-plugin/lb/util.c | 72 + vpp/plugins/lb-plugin/lb/util.h | 40 + vpp/plugins/lb-plugin/lb_plugin_doc.md | 141 + vpp/plugins/sample-plugin/Makefile.am | 56 + vpp/plugins/sample-plugin/configure.ac | 9 + vpp/plugins/sample-plugin/sample/node.c | 295 + vpp/plugins/sample-plugin/sample/sample.api | 39 + vpp/plugins/sample-plugin/sample/sample.c | 255 + vpp/plugins/sample-plugin/sample/sample.h | 40 + .../sample-plugin/sample/sample_all_api_h.h | 16 + vpp/plugins/sample-plugin/sample/sample_msg_enum.h | 28 + vpp/plugins/sample-plugin/sample/sample_test.c | 213 + vpp/plugins/sixrd-plugin/Makefile.am | 38 + vpp/plugins/sixrd-plugin/configure.ac | 9 + vpp/plugins/sixrd-plugin/sixrd/ip4_sixrd.c | 127 + vpp/plugins/sixrd-plugin/sixrd/ip6_sixrd.c | 129 + vpp/plugins/sixrd-plugin/sixrd/sixrd.c | 369 + vpp/plugins/sixrd-plugin/sixrd/sixrd.h | 141 + vpp/plugins/sixrd-plugin/sixrd/sixrd_dpo.c | 132 + vpp/plugins/sixrd-plugin/sixrd/sixrd_dpo.h | 61 + vpp/plugins/snat-plugin/Makefile.am | 113 + vpp/plugins/snat-plugin/configure.ac | 32 + vpp/plugins/snat-plugin/snat/in2out.c | 1597 + .../io/fd/vpp/jvpp/snat/test/CallbackApiTest.java | 68 + .../snat/jvpp/io/fd/vpp/jvpp/snat/test/Readme.txt | 1 + vpp/plugins/snat-plugin/snat/jvpp_snat.c | 124 + vpp/plugins/snat-plugin/snat/jvpp_snat.h | 45 + vpp/plugins/snat-plugin/snat/out2in.c | 1268 + vpp/plugins/snat-plugin/snat/snat.api | 283 + vpp/plugins/snat-plugin/snat/snat.c | 1957 + vpp/plugins/snat-plugin/snat/snat.h | 259 + vpp/plugins/snat-plugin/snat/snat_all_api_h.h | 19 + vpp/plugins/snat-plugin/snat/snat_msg_enum.h | 31 + vpp/plugins/snat-plugin/snat/snat_test.c | 602 + vpp/plugins/vcgn-plugin/Makefile.am | 97 + vpp/plugins/vcgn-plugin/configure.ac | 9 + vpp/plugins/vcgn-plugin/vcgn/README | 100 + vpp/plugins/vcgn-plugin/vcgn/cgn_bitmap.h | 133 + vpp/plugins/vcgn-plugin/vcgn/cgse_defs.h | 88 + vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port.c | 964 + vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port.h | 157 + vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port_defs.h | 57 + vpp/plugins/vcgn-plugin/vcgn/cnat_cli.h | 206 + vpp/plugins/vcgn-plugin/vcgn/cnat_cli_handler.c | 961 + vpp/plugins/vcgn-plugin/vcgn/cnat_common_api.h | 22 + vpp/plugins/vcgn-plugin/vcgn/cnat_config.c | 77 + vpp/plugins/vcgn-plugin/vcgn/cnat_config.h | 582 + vpp/plugins/vcgn-plugin/vcgn/cnat_config_api.h | 46 + vpp/plugins/vcgn-plugin/vcgn/cnat_db.h | 701 + vpp/plugins/vcgn-plugin/vcgn/cnat_db_scanner.c | 493 + vpp/plugins/vcgn-plugin/vcgn/cnat_db_v2.c | 3806 ++ .../vcgn-plugin/vcgn/cnat_debug_msg_handler.c | 1780 + vpp/plugins/vcgn-plugin/vcgn/cnat_global.c | 79 + vpp/plugins/vcgn-plugin/vcgn/cnat_global.h | 87 + vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp.h | 60 + .../vcgn/cnat_ipv4_icmp_error_inside_input.c | 476 + .../vcgn/cnat_ipv4_icmp_error_outside_input.c | 452 + .../vcgn/cnat_ipv4_icmp_query_inside_input.c | 404 + .../cnat_ipv4_icmp_query_inside_input_exception.c | 235 + .../vcgn/cnat_ipv4_icmp_query_outside_input.c | 381 + .../vcgn-plugin/vcgn/cnat_ipv4_tcp_inside_input.c | 424 + .../vcgn/cnat_ipv4_tcp_inside_input_exceptions.c | 314 + .../vcgn-plugin/vcgn/cnat_ipv4_tcp_outside_input.c | 382 + vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_udp.h | 41 + .../vcgn-plugin/vcgn/cnat_ipv4_udp_inside_input.c | 508 + .../vcgn/cnat_ipv4_udp_inside_input_exceptions.c | 283 + .../vcgn-plugin/vcgn/cnat_ipv4_udp_outside_input.c | 605 + vpp/plugins/vcgn-plugin/vcgn/cnat_log_api.h | 114 + vpp/plugins/vcgn-plugin/vcgn/cnat_log_common.h | 79 + vpp/plugins/vcgn-plugin/vcgn/cnat_logging.c | 3500 ++ vpp/plugins/vcgn-plugin/vcgn/cnat_logging.h | 1091 + vpp/plugins/vcgn-plugin/vcgn/cnat_pcp_server.h | 398 + vpp/plugins/vcgn-plugin/vcgn/cnat_ports.c | 1113 + vpp/plugins/vcgn-plugin/vcgn/cnat_ports.h | 208 + vpp/plugins/vcgn-plugin/vcgn/cnat_show.c | 810 + vpp/plugins/vcgn-plugin/vcgn/cnat_show_api.h | 40 + vpp/plugins/vcgn-plugin/vcgn/cnat_show_response.h | 580 + vpp/plugins/vcgn-plugin/vcgn/cnat_syslog.c | 1787 + vpp/plugins/vcgn-plugin/vcgn/cnat_syslog.h | 190 + vpp/plugins/vcgn-plugin/vcgn/cnat_util.c | 2256 ++ vpp/plugins/vcgn-plugin/vcgn/cnat_v4_ftp_alg.h | 133 + vpp/plugins/vcgn-plugin/vcgn/cnat_v4_functions.c | 364 + vpp/plugins/vcgn-plugin/vcgn/cnat_v4_functions.h | 342 + vpp/plugins/vcgn-plugin/vcgn/cnat_v4_pptp_alg.h | 150 + .../vcgn-plugin/vcgn/cnat_v4_tcp_in2out_stages.c | 679 + vpp/plugins/vcgn-plugin/vcgn/cnat_va_db.c | 286 + vpp/plugins/vcgn-plugin/vcgn/cnat_va_db.h | 121 + vpp/plugins/vcgn-plugin/vcgn/dslite_db.h | 170 + vpp/plugins/vcgn-plugin/vcgn/dslite_defs.h | 336 + vpp/plugins/vcgn-plugin/vcgn/index_list.c | 336 + vpp/plugins/vcgn-plugin/vcgn/index_list.h | 118 + vpp/plugins/vcgn-plugin/vcgn/nat64_db.h | 480 + vpp/plugins/vcgn-plugin/vcgn/nat64_defs.h | 576 + vpp/plugins/vcgn-plugin/vcgn/nat64_tcp_sm.h | 91 + vpp/plugins/vcgn-plugin/vcgn/platform_common.h | 136 + .../vcgn-plugin/vcgn/platform_common_override.h | 304 + vpp/plugins/vcgn-plugin/vcgn/spp_ctx.h | 76 + .../vcgn-plugin/vcgn/spp_platform_trace_log.c | 989 + .../vcgn-plugin/vcgn/spp_platform_trace_log.h | 358 + vpp/plugins/vcgn-plugin/vcgn/spp_timers.h | 139 + .../vcgn-plugin/vcgn/tcp_header_definitions.h | 1582 + vpp/plugins/vcgn-plugin/vcgn/vcgn_classify.c | 1508 + vpp/plugins/vcgn-plugin/vcgn/vcgn_db.h | 117 + vpp/svm/Makefile.am | 30 + vpp/svm/configure.ac | 7 + vpp/svm/dir.dox | 21 + vpp/svm/persist.c | 258 + vpp/svm/ssvm.c | 178 + vpp/svm/ssvm.h | 155 + vpp/svm/svm.c | 1237 + vpp/svm/svm.h | 207 + vpp/svm/svm_test.c | 79 + vpp/svm/svmdb.c | 671 + vpp/svm/svmdb.h | 135 + vpp/svm/svmdbtool.c | 537 + vpp/svm/svmtool.c | 528 + vpp/test/Makefile | 109 + vpp/test/bfd.py | 217 + vpp/test/doc/Makefile | 243 + vpp/test/doc/conf.py | 341 + vpp/test/doc/index.rst | 165 + vpp/test/framework.py | 697 + vpp/test/hook.py | 227 + vpp/test/log.py | 72 + vpp/test/patches/scapy-2.3.3/gre-layers.patch | 25 + vpp/test/patches/scapy-2.3.3/mpls.py.patch | 13 + vpp/test/run_tests.py | 12 + vpp/test/scapy_handlers/__init__.py | 0 vpp/test/template_bd.py | 174 + vpp/test/test_bfd.py | 275 + vpp/test/test_classifier.py | 343 + vpp/test/test_fib.py | 30 + vpp/test/test_gre.py | 672 + vpp/test/test_ip4.py | 469 + vpp/test/test_ip4_irb.py | 266 + vpp/test/test_ip6.py | 212 + vpp/test/test_l2_fib.py | 382 + vpp/test/test_l2bd.py | 286 + vpp/test/test_l2bd_multi_instance.py | 498 + vpp/test/test_l2xc.py | 230 + vpp/test/test_l2xc_multi_instance.py | 345 + vpp/test/test_lb.py | 217 + vpp/test/test_mpls.py | 743 + vpp/test/test_snat.py | 626 + vpp/test/test_span.py | 193 + vpp/test/test_vxlan.py | 196 + vpp/test/util.py | 87 + vpp/test/vpp_gre_interface.py | 36 + vpp/test/vpp_interface.py | 264 + vpp/test/vpp_ip_route.py | 116 + vpp/test/vpp_lo_interface.py | 13 + vpp/test/vpp_object.py | 79 + vpp/test/vpp_papi_provider.py | 986 + vpp/test/vpp_pg_interface.py | 326 + vpp/test/vpp_sub_interface.py | 140 + vpp/vlib-api/Makefile.am | 84 + vpp/vlib-api/configure.ac | 9 + vpp/vlib-api/suffix-rules.mk | 1 + vpp/vlib-api/vlibapi/api.h | 281 + vpp/vlib-api/vlibapi/api_helper_macros.h | 243 + vpp/vlib-api/vlibapi/api_shared.c | 1377 + vpp/vlib-api/vlibapi/node_serialize.c | 399 + vpp/vlib-api/vlibmemory/api.h | 163 + vpp/vlib-api/vlibmemory/memclnt.api | 91 + vpp/vlib-api/vlibmemory/memory_client.c | 283 + vpp/vlib-api/vlibmemory/memory_shared.c | 847 + vpp/vlib-api/vlibmemory/memory_vlib.c | 1349 + vpp/vlib-api/vlibmemory/unix_shared_memory_queue.c | 324 + vpp/vlib-api/vlibmemory/unix_shared_memory_queue.h | 69 + vpp/vlib-api/vlibmemory/vl_memory_api_h.h | 32 + vpp/vlib-api/vlibmemory/vl_memory_msg_enum.h | 42 + vpp/vlib-api/vlibsocket/api.h | 87 + vpp/vlib-api/vlibsocket/sock_test.c | 155 + vpp/vlib-api/vlibsocket/sockclnt.api | 50 + vpp/vlib-api/vlibsocket/sockclnt_vlib.c | 209 + vpp/vlib-api/vlibsocket/socksvr_vlib.c | 706 + vpp/vlib-api/vlibsocket/vl_socket_api_h.h | 33 + vpp/vlib-api/vlibsocket/vl_socket_msg_enum.h | 42 + vpp/vlib/.gitignore | 1 + vpp/vlib/Makefile.am | 104 + vpp/vlib/configure.ac | 25 + vpp/vlib/dir.dox | 21 + vpp/vlib/example/dir.dox | 22 + vpp/vlib/example/main_stub.c | 418 + vpp/vlib/example/mc_test.c | 384 + vpp/vlib/example/plex_test.c | 527 + vpp/vlib/vlib/buffer.c | 1987 + vpp/vlib/vlib/buffer.h | 417 + vpp/vlib/vlib/buffer_funcs.h | 755 + vpp/vlib/vlib/buffer_node.h | 337 + vpp/vlib/vlib/cli.c | 1173 + vpp/vlib/vlib/cli.h | 192 + vpp/vlib/vlib/cli_funcs.h | 58 + vpp/vlib/vlib/counter.c | 151 + vpp/vlib/vlib/counter.h | 379 + vpp/vlib/vlib/defs.h | 82 + vpp/vlib/vlib/dir.dox | 23 + vpp/vlib/vlib/elog_samples.c | 122 + vpp/vlib/vlib/error.c | 338 + vpp/vlib/vlib/error.h | 101 + vpp/vlib/vlib/error_funcs.h | 88 + vpp/vlib/vlib/format.c | 196 + vpp/vlib/vlib/format_funcs.h | 75 + vpp/vlib/vlib/global_funcs.h | 45 + vpp/vlib/vlib/i2c.c | 231 + vpp/vlib/vlib/i2c.h | 67 + vpp/vlib/vlib/init.c | 168 + vpp/vlib/vlib/init.h | 238 + vpp/vlib/vlib/lex.c | 271 + vpp/vlib/vlib/lex.h | 145 + vpp/vlib/vlib/main.c | 1703 + vpp/vlib/vlib/main.h | 333 + vpp/vlib/vlib/mc.c | 2609 ++ vpp/vlib/vlib/mc.h | 687 + vpp/vlib/vlib/node.c | 631 + vpp/vlib/vlib/node.h | 725 + vpp/vlib/vlib/node_cli.c | 466 + vpp/vlib/vlib/node_format.c | 187 + vpp/vlib/vlib/node_funcs.h | 1130 + vpp/vlib/vlib/parse.c | 1007 + vpp/vlib/vlib/parse.h | 221 + vpp/vlib/vlib/parse_builtin.c | 150 + vpp/vlib/vlib/pci/linux_pci.c | 642 + vpp/vlib/vlib/pci/pci.c | 178 + vpp/vlib/vlib/pci/pci.h | 249 + vpp/vlib/vlib/pci/pci_config.h | 731 + vpp/vlib/vlib/physmem.h | 108 + vpp/vlib/vlib/threads.c | 1492 + vpp/vlib/vlib/threads.h | 470 + vpp/vlib/vlib/threads_cli.c | 579 + vpp/vlib/vlib/trace.c | 545 + vpp/vlib/vlib/trace.h | 100 + vpp/vlib/vlib/trace_funcs.h | 185 + vpp/vlib/vlib/unix/cj.c | 271 + vpp/vlib/vlib/unix/cj.h | 79 + vpp/vlib/vlib/unix/cli.c | 2989 ++ vpp/vlib/vlib/unix/dir.dox | 28 + vpp/vlib/vlib/unix/input.c | 265 + vpp/vlib/vlib/unix/main.c | 557 + vpp/vlib/vlib/unix/mc_socket.c | 1049 + vpp/vlib/vlib/unix/mc_socket.h | 137 + vpp/vlib/vlib/unix/physmem.c | 470 + vpp/vlib/vlib/unix/physmem.h | 65 + vpp/vlib/vlib/unix/plugin.c | 260 + vpp/vlib/vlib/unix/plugin.h | 98 + vpp/vlib/vlib/unix/unix.h | 232 + vpp/vlib/vlib/unix/util.c | 231 + vpp/vlib/vlib/vlib.h | 86 + vpp/vlib/vlib/vlib_process_doc.h | 147 + vpp/vnet/.gitignore | 1 + vpp/vnet/Makefile.am | 947 + vpp/vnet/configure.ac | 49 + vpp/vnet/etc/scripts/arp4 | 21 + vpp/vnet/etc/scripts/arp4-mpls | 24 + vpp/vnet/etc/scripts/arp6 | 21 + vpp/vnet/etc/scripts/bvi | 76 + vpp/vnet/etc/scripts/dhcp/dhcpd.conf | 8 + vpp/vnet/etc/scripts/dhcp/left-ping-target.sh | 4 + vpp/vnet/etc/scripts/dhcp/leftpeer.conf | 17 + vpp/vnet/etc/scripts/icmp | 16 + vpp/vnet/etc/scripts/icmp6 | 16 + vpp/vnet/etc/scripts/ige | 19 + vpp/vnet/etc/scripts/ip6 | 15 + vpp/vnet/etc/scripts/ip6-hbh | 84 + vpp/vnet/etc/scripts/ixge | 15 + vpp/vnet/etc/scripts/l2efpfilter | 83 + vpp/vnet/etc/scripts/l2efpfilter_perf | 58 + vpp/vnet/etc/scripts/l2fib | 46 + vpp/vnet/etc/scripts/l2fib_perf | 29 + vpp/vnet/etc/scripts/l2fib_xc | 31 + vpp/vnet/etc/scripts/l2flood | 42 + vpp/vnet/etc/scripts/l2tp | 134 + vpp/vnet/etc/scripts/leftpeer/leftpeer-classify | 8 + vpp/vnet/etc/scripts/leftpeer/leftpeer-classify6 | 5 + vpp/vnet/etc/scripts/leftpeer/leftpeer-classifyl2 | 8 + vpp/vnet/etc/scripts/leftpeer/leftpeer-dhcp | 23 + vpp/vnet/etc/scripts/leftpeer/leftpeer-ioam.conf | 15 + .../etc/scripts/leftpeer/leftpeer-l3vxlan.conf | 12 + vpp/vnet/etc/scripts/leftpeer/leftpeer-lisp.conf | 18 + vpp/vnet/etc/scripts/leftpeer/leftpeer-mpls.conf | 17 + vpp/vnet/etc/scripts/leftpeer/leftpeer-sr.conf | 24 + vpp/vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf | 17 + vpp/vnet/etc/scripts/leftpeer/leftpeer.script | 9 + vpp/vnet/etc/scripts/lfib/ip4-to-mpls | 26 + vpp/vnet/etc/scripts/lfib/mpls-pop-to-mpls | 28 + vpp/vnet/etc/scripts/lfib/mpls-to-ip4 | 27 + vpp/vnet/etc/scripts/lfib/mpls-to-mpls | 26 + vpp/vnet/etc/scripts/mpls-o-ethernet/leftpeer.conf | 17 + vpp/vnet/etc/scripts/mpls-o-ethernet/pg | 10 + .../etc/scripts/mpls-o-ethernet/rightpeer.conf | 15 + vpp/vnet/etc/scripts/mpls-o-ethernet/single.conf | 17 + vpp/vnet/etc/scripts/mpls-o-gre/dhcpd.conf | 116 + vpp/vnet/etc/scripts/mpls-o-gre/leftpeer.conf | 14 + vpp/vnet/etc/scripts/mpls-o-gre/rightpeer.conf | 14 + vpp/vnet/etc/scripts/mpls-tunnel | 87 + vpp/vnet/etc/scripts/pcap | 18 + vpp/vnet/etc/scripts/probe4 | 11 + vpp/vnet/etc/scripts/probe6 | 7 + vpp/vnet/etc/scripts/rewrite | 62 + vpp/vnet/etc/scripts/rightpeer/rightpeer-ioam.conf | 14 + .../etc/scripts/rightpeer/rightpeer-l3vxlan.conf | 9 + vpp/vnet/etc/scripts/rightpeer/rightpeer-lisp.conf | 16 + .../etc/scripts/rightpeer/rightpeer-mpls-l2.conf | 24 + vpp/vnet/etc/scripts/rightpeer/rightpeer-mpls.conf | 17 + vpp/vnet/etc/scripts/rightpeer/rightpeer-sr.conf | 28 + .../etc/scripts/rightpeer/rightpeer-vxlan.conf | 16 + vpp/vnet/etc/scripts/rightpeer/rightpeer.script | 9 + vpp/vnet/etc/scripts/rpf | 18 + vpp/vnet/etc/scripts/rtt-test | 31 + vpp/vnet/etc/scripts/snat | 34 + vpp/vnet/etc/scripts/snat_static | 44 + vpp/vnet/etc/scripts/snat_static_with_port | 44 + vpp/vnet/etc/scripts/source_and_port_range_check | 63 + vpp/vnet/etc/scripts/speed | 14 + vpp/vnet/etc/scripts/sr/left-linux-ping.sh | 3 + vpp/vnet/etc/scripts/sr/leftpeer.conf | 27 + vpp/vnet/etc/scripts/sr/right-linux-ping.sh | 4 + vpp/vnet/etc/scripts/sr/rightpeer.conf | 22 + vpp/vnet/etc/scripts/sr/srlocal.sh | 4 + vpp/vnet/etc/scripts/srp | 27 + vpp/vnet/etc/scripts/tcp | 16 + vpp/vnet/etc/scripts/tcp-test | 6 + vpp/vnet/etc/scripts/tf-ucs-1 | 16 + vpp/vnet/etc/scripts/urpf | 86 + vpp/vnet/etc/scripts/virl/ip6sr.virl | 874 + vpp/vnet/etc/scripts/virl/ip6sr_notes.txt | 38 + vpp/vnet/etc/scripts/virl/mplsogre.virl | 319 + vpp/vnet/etc/scripts/virl/simple.virl | 389 + vpp/vnet/etc/scripts/vlan | 23 + vpp/vnet/suffix-rules.mk | 1 + vpp/vnet/test/README | 10 + vpp/vnet/test/lisp-cp/test_cp_serdes.c | 635 + vpp/vnet/test/lisp-cp/test_lisp_types.c | 561 + vpp/vnet/test/lisp-gpe/test.c | 18 + vpp/vnet/vnet/adj/adj.c | 454 + vpp/vnet/vnet/adj/adj.h | 122 + vpp/vnet/vnet/adj/adj_glean.c | 285 + vpp/vnet/vnet/adj/adj_glean.h | 61 + vpp/vnet/vnet/adj/adj_internal.h | 104 + vpp/vnet/vnet/adj/adj_l2.c | 194 + vpp/vnet/vnet/adj/adj_l2.h | 24 + vpp/vnet/vnet/adj/adj_midchain.c | 559 + vpp/vnet/vnet/adj/adj_midchain.h | 102 + vpp/vnet/vnet/adj/adj_nbr.c | 1087 + vpp/vnet/vnet/adj/adj_nbr.h | 176 + vpp/vnet/vnet/adj/adj_rewrite.c | 53 + vpp/vnet/vnet/adj/adj_rewrite.h | 49 + vpp/vnet/vnet/adj/adj_types.h | 53 + vpp/vnet/vnet/api_errno.h | 113 + vpp/vnet/vnet/bfd/bfd_api.h | 46 + vpp/vnet/vnet/bfd/bfd_debug.h | 79 + vpp/vnet/vnet/bfd/bfd_doc.md | 1 + vpp/vnet/vnet/bfd/bfd_main.c | 969 + vpp/vnet/vnet/bfd/bfd_main.h | 220 + vpp/vnet/vnet/bfd/bfd_protocol.c | 74 + vpp/vnet/vnet/bfd/bfd_protocol.h | 154 + vpp/vnet/vnet/bfd/bfd_udp.c | 639 + vpp/vnet/vnet/bfd/bfd_udp.h | 56 + vpp/vnet/vnet/bfd/dir.dox | 18 + vpp/vnet/vnet/buffer.h | 381 + vpp/vnet/vnet/cdp/cdp.pg | 7 + vpp/vnet/vnet/cdp/cdp_input.c | 506 + vpp/vnet/vnet/cdp/cdp_node.c | 208 + vpp/vnet/vnet/cdp/cdp_node.h | 147 + vpp/vnet/vnet/cdp/cdp_periodic.c | 512 + vpp/vnet/vnet/cdp/cdp_protocol.h | 186 + vpp/vnet/vnet/classify/README | 180 + vpp/vnet/vnet/classify/flow_classify.c | 212 + vpp/vnet/vnet/classify/flow_classify.h | 51 + vpp/vnet/vnet/classify/flow_classify_node.c | 338 + vpp/vnet/vnet/classify/input_acl.c | 283 + vpp/vnet/vnet/classify/input_acl.h | 54 + vpp/vnet/vnet/classify/ip_classify.c | 365 + vpp/vnet/vnet/classify/policer_classify.c | 227 + vpp/vnet/vnet/classify/policer_classify.h | 55 + vpp/vnet/vnet/classify/vnet_classify.c | 2436 ++ vpp/vnet/vnet/classify/vnet_classify.h | 523 + vpp/vnet/vnet/config.c | 361 + vpp/vnet/vnet/config.h | 176 + vpp/vnet/vnet/cop/cop.c | 387 + vpp/vnet/vnet/cop/cop.h | 89 + vpp/vnet/vnet/cop/ip4_whitelist.c | 356 + vpp/vnet/vnet/cop/ip6_whitelist.c | 298 + vpp/vnet/vnet/cop/node1.c | 319 + vpp/vnet/vnet/devices/af_packet/af_packet.c | 366 + vpp/vnet/vnet/devices/af_packet/af_packet.h | 69 + vpp/vnet/vnet/devices/af_packet/cli.c | 144 + vpp/vnet/vnet/devices/af_packet/device.c | 250 + vpp/vnet/vnet/devices/af_packet/node.c | 288 + vpp/vnet/vnet/devices/devices.c | 91 + vpp/vnet/vnet/devices/devices.h | 53 + vpp/vnet/vnet/devices/dpdk/cli.c | 1296 + vpp/vnet/vnet/devices/dpdk/device.c | 840 + vpp/vnet/vnet/devices/dpdk/dpdk.h | 532 + vpp/vnet/vnet/devices/dpdk/dpdk_priv.h | 137 + vpp/vnet/vnet/devices/dpdk/format.c | 755 + vpp/vnet/vnet/devices/dpdk/hqos.c | 775 + vpp/vnet/vnet/devices/dpdk/init.c | 1769 + vpp/vnet/vnet/devices/dpdk/ipsec/cli.c | 141 + vpp/vnet/vnet/devices/dpdk/ipsec/crypto_node.c | 210 + vpp/vnet/vnet/devices/dpdk/ipsec/dir.dox | 18 + .../devices/dpdk/ipsec/dpdk_crypto_ipsec_doc.md | 73 + vpp/vnet/vnet/devices/dpdk/ipsec/esp.h | 295 + vpp/vnet/vnet/devices/dpdk/ipsec/esp_decrypt.c | 583 + vpp/vnet/vnet/devices/dpdk/ipsec/esp_encrypt.c | 598 + vpp/vnet/vnet/devices/dpdk/ipsec/ipsec.c | 313 + vpp/vnet/vnet/devices/dpdk/ipsec/ipsec.h | 227 + vpp/vnet/vnet/devices/dpdk/node.c | 687 + vpp/vnet/vnet/devices/dpdk/qos_doc.md | 404 + vpp/vnet/vnet/devices/netmap/cli.c | 146 + vpp/vnet/vnet/devices/netmap/device.c | 261 + vpp/vnet/vnet/devices/netmap/net_netmap.h | 650 + vpp/vnet/vnet/devices/netmap/netmap.c | 316 + vpp/vnet/vnet/devices/netmap/netmap.h | 164 + vpp/vnet/vnet/devices/netmap/node.c | 300 + vpp/vnet/vnet/devices/nic/ixge.c | 2938 ++ vpp/vnet/vnet/devices/nic/ixge.h | 1293 + vpp/vnet/vnet/devices/nic/sfp.c | 117 + vpp/vnet/vnet/devices/nic/sfp.h | 117 + vpp/vnet/vnet/devices/ssvm/node.c | 343 + vpp/vnet/vnet/devices/ssvm/ssvm_eth.c | 491 + vpp/vnet/vnet/devices/ssvm/ssvm_eth.h | 141 + vpp/vnet/vnet/devices/virtio/dir.dox | 27 + vpp/vnet/vnet/devices/virtio/vhost-user.c | 3322 ++ vpp/vnet/vnet/devices/virtio/vhost-user.h | 350 + vpp/vnet/vnet/dhcp/client.c | 1031 + vpp/vnet/vnet/dhcp/client.h | 118 + vpp/vnet/vnet/dhcp/packet.h | 61 + vpp/vnet/vnet/dhcp/proxy.h | 92 + vpp/vnet/vnet/dhcp/proxy_error.def | 30 + vpp/vnet/vnet/dhcp/proxy_node.c | 1114 + vpp/vnet/vnet/dhcpv6/packet.h | 183 + vpp/vnet/vnet/dhcpv6/proxy.h | 95 + vpp/vnet/vnet/dhcpv6/proxy_error.def | 29 + vpp/vnet/vnet/dhcpv6/proxy_node.c | 1195 + vpp/vnet/vnet/dpo/classify_dpo.c | 131 + vpp/vnet/vnet/dpo/classify_dpo.h | 56 + vpp/vnet/vnet/dpo/dpo.c | 500 + vpp/vnet/vnet/dpo/dpo.h | 381 + vpp/vnet/vnet/dpo/drop_dpo.c | 106 + vpp/vnet/vnet/dpo/drop_dpo.h | 31 + vpp/vnet/vnet/dpo/ip_null_dpo.c | 408 + vpp/vnet/vnet/dpo/ip_null_dpo.h | 56 + vpp/vnet/vnet/dpo/load_balance.c | 996 + vpp/vnet/vnet/dpo/load_balance.h | 211 + vpp/vnet/vnet/dpo/load_balance_map.c | 575 + vpp/vnet/vnet/dpo/load_balance_map.h | 79 + vpp/vnet/vnet/dpo/lookup_dpo.c | 1185 + vpp/vnet/vnet/dpo/lookup_dpo.h | 108 + vpp/vnet/vnet/dpo/mpls_label_dpo.c | 570 + vpp/vnet/vnet/dpo/mpls_label_dpo.h | 101 + vpp/vnet/vnet/dpo/punt_dpo.c | 100 + vpp/vnet/vnet/dpo/punt_dpo.h | 30 + vpp/vnet/vnet/dpo/receive_dpo.c | 165 + vpp/vnet/vnet/dpo/receive_dpo.h | 62 + vpp/vnet/vnet/ethernet/arp.c | 2368 ++ vpp/vnet/vnet/ethernet/arp_packet.h | 173 + vpp/vnet/vnet/ethernet/dir.dox | 24 + vpp/vnet/vnet/ethernet/error.def | 46 + vpp/vnet/vnet/ethernet/ethernet.h | 561 + vpp/vnet/vnet/ethernet/format.c | 366 + vpp/vnet/vnet/ethernet/init.c | 128 + vpp/vnet/vnet/ethernet/interface.c | 730 + vpp/vnet/vnet/ethernet/mac_swap.c | 397 + vpp/vnet/vnet/ethernet/node.c | 1368 + vpp/vnet/vnet/ethernet/packet.h | 152 + vpp/vnet/vnet/ethernet/pg.c | 183 + vpp/vnet/vnet/ethernet/types.def | 113 + vpp/vnet/vnet/feature/feature.c | 463 + vpp/vnet/vnet/feature/feature.h | 382 + vpp/vnet/vnet/feature/registration.c | 301 + vpp/vnet/vnet/fib/fib.c | 41 + vpp/vnet/vnet/fib/fib.h | 652 + vpp/vnet/vnet/fib/fib_api.h | 54 + vpp/vnet/vnet/fib/fib_attached_export.c | 580 + vpp/vnet/vnet/fib/fib_attached_export.h | 57 + vpp/vnet/vnet/fib/fib_entry.c | 1504 + vpp/vnet/vnet/fib/fib_entry.h | 530 + vpp/vnet/vnet/fib/fib_entry_cover.c | 225 + vpp/vnet/vnet/fib/fib_entry_cover.h | 47 + vpp/vnet/vnet/fib/fib_entry_delegate.c | 149 + vpp/vnet/vnet/fib/fib_entry_delegate.h | 124 + vpp/vnet/vnet/fib/fib_entry_src.c | 1464 + vpp/vnet/vnet/fib/fib_entry_src.h | 296 + vpp/vnet/vnet/fib/fib_entry_src_adj.c | 207 + vpp/vnet/vnet/fib/fib_entry_src_api.c | 119 + vpp/vnet/vnet/fib/fib_entry_src_default.c | 121 + vpp/vnet/vnet/fib/fib_entry_src_default_route.c | 58 + vpp/vnet/vnet/fib/fib_entry_src_interface.c | 195 + vpp/vnet/vnet/fib/fib_entry_src_lisp.c | 133 + vpp/vnet/vnet/fib/fib_entry_src_mpls.c | 196 + vpp/vnet/vnet/fib/fib_entry_src_rr.c | 293 + vpp/vnet/vnet/fib/fib_entry_src_special.c | 71 + vpp/vnet/vnet/fib/fib_internal.h | 69 + vpp/vnet/vnet/fib/fib_node.c | 277 + vpp/vnet/vnet/fib/fib_node.h | 371 + vpp/vnet/vnet/fib/fib_node_list.c | 390 + vpp/vnet/vnet/fib/fib_node_list.h | 64 + vpp/vnet/vnet/fib/fib_path.c | 2001 + vpp/vnet/vnet/fib/fib_path.h | 158 + vpp/vnet/vnet/fib/fib_path_ext.c | 231 + vpp/vnet/vnet/fib/fib_path_ext.h | 69 + vpp/vnet/vnet/fib/fib_path_list.c | 1233 + vpp/vnet/vnet/fib/fib_path_list.h | 160 + vpp/vnet/vnet/fib/fib_table.c | 1104 + vpp/vnet/vnet/fib/fib_table.h | 732 + vpp/vnet/vnet/fib/fib_test.c | 7112 ++++ vpp/vnet/vnet/fib/fib_types.c | 326 + vpp/vnet/vnet/fib/fib_types.h | 340 + vpp/vnet/vnet/fib/fib_urpf_list.c | 260 + vpp/vnet/vnet/fib/fib_urpf_list.h | 146 + vpp/vnet/vnet/fib/fib_walk.c | 1108 + vpp/vnet/vnet/fib/fib_walk.h | 58 + vpp/vnet/vnet/fib/ip4_fib.c | 664 + vpp/vnet/vnet/fib/ip4_fib.h | 141 + vpp/vnet/vnet/fib/ip6_fib.c | 784 + vpp/vnet/vnet/fib/ip6_fib.h | 130 + vpp/vnet/vnet/fib/mpls_fib.c | 439 + vpp/vnet/vnet/fib/mpls_fib.h | 106 + vpp/vnet/vnet/flow/flow_report.c | 482 + vpp/vnet/vnet/flow/flow_report.h | 145 + vpp/vnet/vnet/flow/flow_report_classify.c | 529 + vpp/vnet/vnet/flow/flow_report_classify.h | 122 + vpp/vnet/vnet/flow/ipfix_info_elements.h | 429 + vpp/vnet/vnet/flow/ipfix_packet.h | 188 + vpp/vnet/vnet/global_funcs.h | 32 + vpp/vnet/vnet/gre/error.def | 23 + vpp/vnet/vnet/gre/gre.c | 455 + vpp/vnet/vnet/gre/gre.h | 235 + vpp/vnet/vnet/gre/interface.c | 606 + vpp/vnet/vnet/gre/node.c | 531 + vpp/vnet/vnet/gre/packet.h | 55 + vpp/vnet/vnet/gre/pg.c | 77 + vpp/vnet/vnet/handoff.c | 594 + vpp/vnet/vnet/handoff.h | 259 + vpp/vnet/vnet/hdlc/error.def | 42 + vpp/vnet/vnet/hdlc/hdlc.c | 249 + vpp/vnet/vnet/hdlc/hdlc.h | 127 + vpp/vnet/vnet/hdlc/node.c | 351 + vpp/vnet/vnet/hdlc/packet.h | 72 + vpp/vnet/vnet/hdlc/pg.c | 105 + vpp/vnet/vnet/interface.api | 339 + vpp/vnet/vnet/interface.c | 1408 + vpp/vnet/vnet/interface.h | 658 + vpp/vnet/vnet/interface_api.c | 725 + vpp/vnet/vnet/interface_cli.c | 1165 + vpp/vnet/vnet/interface_format.c | 401 + vpp/vnet/vnet/interface_funcs.h | 318 + vpp/vnet/vnet/interface_output.c | 1404 + vpp/vnet/vnet/ip/dir.dox | 26 + vpp/vnet/vnet/ip/format.c | 121 + vpp/vnet/vnet/ip/format.h | 114 + vpp/vnet/vnet/ip/icmp4.c | 784 + vpp/vnet/vnet/ip/icmp4.h | 60 + vpp/vnet/vnet/ip/icmp46_packet.h | 398 + vpp/vnet/vnet/ip/icmp6.c | 882 + vpp/vnet/vnet/ip/icmp6.h | 86 + vpp/vnet/vnet/ip/igmp_packet.h | 155 + vpp/vnet/vnet/ip/ip.api | 434 + vpp/vnet/vnet/ip/ip.h | 195 + vpp/vnet/vnet/ip/ip4.h | 322 + vpp/vnet/vnet/ip/ip46_cli.c | 236 + vpp/vnet/vnet/ip/ip4_error.h | 95 + vpp/vnet/vnet/ip/ip4_format.c | 256 + vpp/vnet/vnet/ip/ip4_forward.c | 3345 ++ vpp/vnet/vnet/ip/ip4_input.c | 507 + vpp/vnet/vnet/ip/ip4_mtrie.c | 568 + vpp/vnet/vnet/ip/ip4_mtrie.h | 188 + vpp/vnet/vnet/ip/ip4_packet.h | 384 + vpp/vnet/vnet/ip/ip4_pg.c | 387 + vpp/vnet/vnet/ip/ip4_source_and_port_range_check.c | 1415 + vpp/vnet/vnet/ip/ip4_source_check.c | 573 + vpp/vnet/vnet/ip/ip4_test.c | 340 + vpp/vnet/vnet/ip/ip6.h | 476 + vpp/vnet/vnet/ip/ip6_error.h | 92 + vpp/vnet/vnet/ip/ip6_format.c | 383 + vpp/vnet/vnet/ip/ip6_forward.c | 3402 ++ vpp/vnet/vnet/ip/ip6_hop_by_hop.c | 1194 + vpp/vnet/vnet/ip/ip6_hop_by_hop.h | 217 + vpp/vnet/vnet/ip/ip6_hop_by_hop_packet.h | 66 + vpp/vnet/vnet/ip/ip6_input.c | 353 + vpp/vnet/vnet/ip/ip6_neighbor.c | 4079 ++ vpp/vnet/vnet/ip/ip6_neighbor.h | 52 + vpp/vnet/vnet/ip/ip6_packet.h | 499 + vpp/vnet/vnet/ip/ip6_pg.c | 231 + vpp/vnet/vnet/ip/ip_api.c | 1196 + vpp/vnet/vnet/ip/ip_checksum.c | 228 + vpp/vnet/vnet/ip/ip_frag.c | 581 + vpp/vnet/vnet/ip/ip_frag.h | 96 + vpp/vnet/vnet/ip/ip_init.c | 152 + vpp/vnet/vnet/ip/ip_input_acl.c | 450 + vpp/vnet/vnet/ip/ip_packet.h | 180 + vpp/vnet/vnet/ip/ip_source_and_port_range_check.h | 148 + vpp/vnet/vnet/ip/lookup.c | 967 + vpp/vnet/vnet/ip/lookup.h | 498 + vpp/vnet/vnet/ip/ping.c | 888 + vpp/vnet/vnet/ip/ping.h | 108 + vpp/vnet/vnet/ip/ports.def | 757 + vpp/vnet/vnet/ip/protocols.def | 162 + vpp/vnet/vnet/ip/punt.c | 323 + vpp/vnet/vnet/ip/punt.h | 43 + vpp/vnet/vnet/ip/punt_error.def | 19 + vpp/vnet/vnet/ip/tcp_packet.h | 138 + vpp/vnet/vnet/ip/udp.h | 313 + vpp/vnet/vnet/ip/udp_error.def | 21 + vpp/vnet/vnet/ip/udp_format.c | 91 + vpp/vnet/vnet/ip/udp_init.c | 71 + vpp/vnet/vnet/ip/udp_local.c | 645 + vpp/vnet/vnet/ip/udp_packet.h | 65 + vpp/vnet/vnet/ip/udp_pg.c | 237 + vpp/vnet/vnet/ipsec-gre/dir.dox | 18 + vpp/vnet/vnet/ipsec-gre/error.def | 26 + vpp/vnet/vnet/ipsec-gre/interface.c | 311 + vpp/vnet/vnet/ipsec-gre/ipsec_gre.c | 407 + vpp/vnet/vnet/ipsec-gre/ipsec_gre.h | 114 + vpp/vnet/vnet/ipsec-gre/ipsec_gre_doc.md | 74 + vpp/vnet/vnet/ipsec-gre/node.c | 433 + vpp/vnet/vnet/ipsec/esp.h | 320 + vpp/vnet/vnet/ipsec/esp_decrypt.c | 430 + vpp/vnet/vnet/ipsec/esp_encrypt.c | 425 + vpp/vnet/vnet/ipsec/ikev2.c | 2186 + vpp/vnet/vnet/ipsec/ikev2.h | 410 + vpp/vnet/vnet/ipsec/ikev2_cli.c | 479 + vpp/vnet/vnet/ipsec/ikev2_crypto.c | 765 + vpp/vnet/vnet/ipsec/ikev2_format.c | 155 + vpp/vnet/vnet/ipsec/ikev2_payload.c | 535 + vpp/vnet/vnet/ipsec/ikev2_priv.h | 321 + vpp/vnet/vnet/ipsec/ipsec.c | 581 + vpp/vnet/vnet/ipsec/ipsec.h | 344 + vpp/vnet/vnet/ipsec/ipsec_cli.c | 807 + vpp/vnet/vnet/ipsec/ipsec_format.c | 141 + vpp/vnet/vnet/ipsec/ipsec_if.c | 372 + vpp/vnet/vnet/ipsec/ipsec_if_in.c | 175 + vpp/vnet/vnet/ipsec/ipsec_if_out.c | 161 + vpp/vnet/vnet/ipsec/ipsec_input.c | 455 + vpp/vnet/vnet/ipsec/ipsec_output.c | 478 + vpp/vnet/vnet/l2/dir.dox | 24 + vpp/vnet/vnet/l2/feat_bitmap.c | 185 + vpp/vnet/vnet/l2/feat_bitmap.h | 96 + vpp/vnet/vnet/l2/l2.api | 38 + vpp/vnet/vnet/l2/l2_api.c | 140 + vpp/vnet/vnet/l2/l2_bd.c | 1079 + vpp/vnet/vnet/l2/l2_bd.h | 150 + vpp/vnet/vnet/l2/l2_bvi.c | 40 + vpp/vnet/vnet/l2/l2_bvi.h | 117 + vpp/vnet/vnet/l2/l2_classify.h | 116 + vpp/vnet/vnet/l2/l2_efp_filter.c | 614 + vpp/vnet/vnet/l2/l2_efp_filter.h | 33 + vpp/vnet/vnet/l2/l2_fib.c | 857 + vpp/vnet/vnet/l2/l2_fib.h | 341 + vpp/vnet/vnet/l2/l2_flood.c | 568 + vpp/vnet/vnet/l2/l2_flood.h | 35 + vpp/vnet/vnet/l2/l2_fwd.c | 544 + vpp/vnet/vnet/l2/l2_fwd.h | 36 + vpp/vnet/vnet/l2/l2_input.c | 1117 + vpp/vnet/vnet/l2/l2_input.h | 266 + vpp/vnet/vnet/l2/l2_input_acl.c | 434 + vpp/vnet/vnet/l2/l2_input_classify.c | 655 + vpp/vnet/vnet/l2/l2_input_vtr.c | 401 + vpp/vnet/vnet/l2/l2_input_vtr.h | 54 + vpp/vnet/vnet/l2/l2_learn.c | 597 + vpp/vnet/vnet/l2/l2_learn.h | 64 + vpp/vnet/vnet/l2/l2_output.c | 708 + vpp/vnet/vnet/l2/l2_output.h | 298 + vpp/vnet/vnet/l2/l2_output_acl.c | 358 + vpp/vnet/vnet/l2/l2_output_classify.c | 657 + vpp/vnet/vnet/l2/l2_patch.c | 452 + vpp/vnet/vnet/l2/l2_rw.c | 719 + vpp/vnet/vnet/l2/l2_rw.h | 95 + vpp/vnet/vnet/l2/l2_vtr.c | 770 + vpp/vnet/vnet/l2/l2_vtr.h | 270 + vpp/vnet/vnet/l2/l2_xcrw.c | 591 + vpp/vnet/vnet/l2/l2_xcrw.h | 91 + vpp/vnet/vnet/l2tp/decap.c | 309 + vpp/vnet/vnet/l2tp/encap.c | 238 + vpp/vnet/vnet/l2tp/l2tp.c | 739 + vpp/vnet/vnet/l2tp/l2tp.h | 147 + vpp/vnet/vnet/l2tp/packet.h | 44 + vpp/vnet/vnet/l2tp/pg.c | 106 + vpp/vnet/vnet/l3_types.h | 59 + vpp/vnet/vnet/lawful-intercept/lawful_intercept.c | 112 + vpp/vnet/vnet/lawful-intercept/lawful_intercept.h | 45 + vpp/vnet/vnet/lawful-intercept/node.c | 275 + vpp/vnet/vnet/lisp-cp/control.c | 4955 +++ vpp/vnet/vnet/lisp-cp/control.h | 314 + vpp/vnet/vnet/lisp-cp/gid_dictionary.c | 865 + vpp/vnet/vnet/lisp-cp/gid_dictionary.h | 120 + vpp/vnet/vnet/lisp-cp/lisp_cp_dpo.c | 117 + vpp/vnet/vnet/lisp-cp/lisp_cp_dpo.h | 45 + vpp/vnet/vnet/lisp-cp/lisp_cp_messages.h | 613 + vpp/vnet/vnet/lisp-cp/lisp_msg_serdes.c | 372 + vpp/vnet/vnet/lisp-cp/lisp_msg_serdes.h | 58 + vpp/vnet/vnet/lisp-cp/lisp_types.c | 1577 + vpp/vnet/vnet/lisp-cp/lisp_types.h | 354 + vpp/vnet/vnet/lisp-cp/packets.c | 269 + vpp/vnet/vnet/lisp-cp/packets.h | 82 + vpp/vnet/vnet/lisp-gpe/decap.c | 501 + vpp/vnet/vnet/lisp-gpe/dir.dox | 26 + vpp/vnet/vnet/lisp-gpe/interface.c | 709 + vpp/vnet/vnet/lisp-gpe/lisp_gpe.c | 327 + vpp/vnet/vnet/lisp-gpe/lisp_gpe.h | 257 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c | 542 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h | 136 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_error.def | 18 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c | 1053 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.h | 188 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_packet.h | 149 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_sub_interface.c | 278 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_sub_interface.h | 157 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_tenant.c | 330 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_tenant.h | 88 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c | 289 + vpp/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.h | 89 + vpp/vnet/vnet/lisp-gpe/rfc.txt | 826 + vpp/vnet/vnet/llc/llc.c | 241 + vpp/vnet/vnet/llc/llc.h | 194 + vpp/vnet/vnet/llc/node.c | 331 + vpp/vnet/vnet/llc/pg.c | 113 + vpp/vnet/vnet/lldp/dir.dox | 18 + vpp/vnet/vnet/lldp/lldp_cli.c | 646 + vpp/vnet/vnet/lldp/lldp_doc.md | 84 + vpp/vnet/vnet/lldp/lldp_input.c | 302 + vpp/vnet/vnet/lldp/lldp_node.c | 341 + vpp/vnet/vnet/lldp/lldp_node.h | 145 + vpp/vnet/vnet/lldp/lldp_output.c | 216 + vpp/vnet/vnet/lldp/lldp_protocol.h | 142 + vpp/vnet/vnet/map/examples/gen-rules.py | 186 + vpp/vnet/vnet/map/examples/health_check.c | 109 + vpp/vnet/vnet/map/examples/test_map.py | 141 + vpp/vnet/vnet/map/gen-rules.py | 107 + vpp/vnet/vnet/map/ip4_map.c | 813 + vpp/vnet/vnet/map/ip4_map_t.c | 1363 + vpp/vnet/vnet/map/ip6_map.c | 1269 + vpp/vnet/vnet/map/ip6_map_t.c | 1517 + vpp/vnet/vnet/map/map.api | 178 + vpp/vnet/vnet/map/map.c | 2166 + vpp/vnet/vnet/map/map.h | 591 + vpp/vnet/vnet/map/map_api.c | 295 + vpp/vnet/vnet/map/map_doc.md | 69 + vpp/vnet/vnet/map/map_dpo.c | 191 + vpp/vnet/vnet/map/map_dpo.h | 67 + vpp/vnet/vnet/map/test.c | 205 + vpp/vnet/vnet/mcast/mcast.c | 565 + vpp/vnet/vnet/mcast/mcast.h | 50 + vpp/vnet/vnet/mcast/mcast_test.c | 149 + vpp/vnet/vnet/misc.c | 124 + vpp/vnet/vnet/mpls/error.def | 31 + vpp/vnet/vnet/mpls/interface.c | 121 + vpp/vnet/vnet/mpls/mpls.c | 511 + vpp/vnet/vnet/mpls/mpls.h | 172 + vpp/vnet/vnet/mpls/mpls_features.c | 156 + vpp/vnet/vnet/mpls/mpls_lookup.c | 531 + vpp/vnet/vnet/mpls/mpls_output.c | 479 + vpp/vnet/vnet/mpls/mpls_tunnel.c | 787 + vpp/vnet/vnet/mpls/mpls_tunnel.h | 98 + vpp/vnet/vnet/mpls/mpls_types.h | 39 + vpp/vnet/vnet/mpls/node.c | 303 + vpp/vnet/vnet/mpls/packet.h | 125 + vpp/vnet/vnet/mpls/pg.c | 71 + vpp/vnet/vnet/osi/node.c | 326 + vpp/vnet/vnet/osi/osi.c | 201 + vpp/vnet/vnet/osi/osi.h | 171 + vpp/vnet/vnet/osi/pg.c | 106 + vpp/vnet/vnet/pg/cli.c | 636 + vpp/vnet/vnet/pg/edit.c | 186 + vpp/vnet/vnet/pg/edit.h | 210 + vpp/vnet/vnet/pg/example.script | 6 + vpp/vnet/vnet/pg/init.c | 72 + vpp/vnet/vnet/pg/input.c | 1667 + vpp/vnet/vnet/pg/output.c | 85 + vpp/vnet/vnet/pg/pg.h | 383 + vpp/vnet/vnet/pg/stream.c | 497 + vpp/vnet/vnet/pipeline.h | 456 + vpp/vnet/vnet/plugin/p1.c | 52 + vpp/vnet/vnet/plugin/plugin.h | 32 + vpp/vnet/vnet/policer/node_funcs.c | 938 + vpp/vnet/vnet/policer/police.h | 214 + vpp/vnet/vnet/policer/policer.c | 528 + vpp/vnet/vnet/policer/policer.h | 107 + vpp/vnet/vnet/policer/xlate.c | 1505 + vpp/vnet/vnet/policer/xlate.h | 186 + vpp/vnet/vnet/ppp/error.def | 42 + vpp/vnet/vnet/ppp/node.c | 368 + vpp/vnet/vnet/ppp/packet.h | 199 + vpp/vnet/vnet/ppp/pg.c | 114 + vpp/vnet/vnet/ppp/ppp.c | 261 + vpp/vnet/vnet/ppp/ppp.h | 135 + vpp/vnet/vnet/replication.c | 293 + vpp/vnet/vnet/replication.h | 136 + vpp/vnet/vnet/rewrite.c | 329 + vpp/vnet/vnet/rewrite.h | 305 + vpp/vnet/vnet/snap/node.c | 353 + vpp/vnet/vnet/snap/pg.c | 116 + vpp/vnet/vnet/snap/snap.c | 204 + vpp/vnet/vnet/snap/snap.h | 209 + vpp/vnet/vnet/span/node.c | 286 + vpp/vnet/vnet/span/span.api | 60 + vpp/vnet/vnet/span/span.c | 197 + vpp/vnet/vnet/span/span.h | 62 + vpp/vnet/vnet/span/span.md | 65 + vpp/vnet/vnet/span/span_api.c | 153 + vpp/vnet/vnet/sr/dir.dox | 25 + vpp/vnet/vnet/sr/examples/sr_multicastmap.script | 4 + vpp/vnet/vnet/sr/rfc_draft_05.txt | 1265 + vpp/vnet/vnet/sr/sr.c | 3333 ++ vpp/vnet/vnet/sr/sr.h | 262 + vpp/vnet/vnet/sr/sr_error.def | 20 + vpp/vnet/vnet/sr/sr_fix_dst_error.def | 17 + vpp/vnet/vnet/sr/sr_packet.h | 251 + vpp/vnet/vnet/sr/sr_replicate.c | 490 + vpp/vnet/vnet/srp/format.c | 147 + vpp/vnet/vnet/srp/interface.c | 458 + vpp/vnet/vnet/srp/node.c | 932 + vpp/vnet/vnet/srp/packet.h | 204 + vpp/vnet/vnet/srp/pg.c | 157 + vpp/vnet/vnet/srp/srp.h | 222 + vpp/vnet/vnet/unix/gdb_funcs.c | 171 + vpp/vnet/vnet/unix/pcap.c | 241 + vpp/vnet/vnet/unix/pcap.h | 230 + vpp/vnet/vnet/unix/pcap2pg.c | 182 + vpp/vnet/vnet/unix/tap.api | 123 + vpp/vnet/vnet/unix/tap_api.c | 257 + vpp/vnet/vnet/unix/tapcli.c | 1328 + vpp/vnet/vnet/unix/tapcli.h | 52 + vpp/vnet/vnet/unix/tuntap.c | 1000 + vpp/vnet/vnet/unix/tuntap.h | 36 + vpp/vnet/vnet/vnet.h | 96 + vpp/vnet/vnet/vnet_all_api_h.h | 45 + vpp/vnet/vnet/vnet_msg_enum.h | 37 + vpp/vnet/vnet/vxlan-gpe/decap.c | 733 + vpp/vnet/vnet/vxlan-gpe/dir.dox | 32 + vpp/vnet/vnet/vxlan-gpe/encap.c | 388 + vpp/vnet/vnet/vxlan-gpe/vxlan-gpe-rfc.txt | 868 + vpp/vnet/vnet/vxlan-gpe/vxlan_gpe.c | 659 + vpp/vnet/vnet/vxlan-gpe/vxlan_gpe.h | 221 + vpp/vnet/vnet/vxlan-gpe/vxlan_gpe_error.def | 16 + vpp/vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h | 110 + vpp/vnet/vnet/vxlan/decap.c | 1130 + vpp/vnet/vnet/vxlan/dir.dox | 24 + vpp/vnet/vnet/vxlan/encap.c | 553 + vpp/vnet/vnet/vxlan/vxlan.c | 903 + vpp/vnet/vnet/vxlan/vxlan.h | 199 + vpp/vnet/vnet/vxlan/vxlan_error.def | 17 + vpp/vnet/vnet/vxlan/vxlan_packet.h | 69 + vpp/vpp-api-test/Makefile.am | 37 + vpp/vpp-api-test/configure.ac | 40 + vpp/vpp-api-test/scripts/vppctl | 121 + vpp/vpp-api-test/vat/api_format.c | 17806 ++++++++ vpp/vpp-api-test/vat/json_format.c | 304 + vpp/vpp-api-test/vat/json_format.h | 254 + vpp/vpp-api-test/vat/json_test.c | 75 + vpp/vpp-api-test/vat/main.c | 401 + vpp/vpp-api-test/vat/plugin.c | 201 + vpp/vpp-api-test/vat/plugin.h | 61 + vpp/vpp-api-test/vat/plugin_api.c | 216 + vpp/vpp-api-test/vat/restart.c | 246 + vpp/vpp-api-test/vat/vat.h | 232 + vpp/vpp-api/Makefile.am | 2 + vpp/vpp-api/configure.ac | 13 + vpp/vpp-api/java/Makefile.am | 121 + vpp/vpp-api/java/Readme.txt | 236 + vpp/vpp-api/java/configure.ac | 24 + vpp/vpp-api/java/jvpp-common/jvpp_common.c | 65 + vpp/vpp-api/java/jvpp-common/jvpp_common.h | 67 + .../io/fd/vpp/jvpp/core/test/CallbackApiTest.java | 96 + .../test/CallbackJVppFacadeNotificationTest.java | 87 + .../vpp/jvpp/core/test/CallbackJVppFacadeTest.java | 103 + .../core/test/CallbackNotificationApiTest.java | 94 + .../io/fd/vpp/jvpp/core/test/ControlPingTest.java | 68 + .../vpp/jvpp/core/test/CreateSubInterfaceTest.java | 120 + .../jvpp/core/test/FutureApiNotificationTest.java | 55 + .../io/fd/vpp/jvpp/core/test/FutureApiTest.java | 123 + .../io/fd/vpp/jvpp/core/test/L2AclTest.java | 195 + .../fd/vpp/jvpp/core/test/LispAdjacencyTest.java | 124 + .../fd/vpp/jvpp/core/test/NotificationUtils.java | 53 + .../jvpp-core/io/fd/vpp/jvpp/core/test/Readme.txt | 17 + vpp/vpp-api/java/jvpp-core/jvpp_core.c | 117 + .../java/jvpp-registry/io/fd/vpp/jvpp/JVpp.java | 56 + .../jvpp-registry/io/fd/vpp/jvpp/JVppRegistry.java | 76 + .../io/fd/vpp/jvpp/JVppRegistryImpl.java | 147 + .../io/fd/vpp/jvpp/NativeLibraryLoader.java | 73 + .../io/fd/vpp/jvpp/VppBaseCallException.java | 60 + .../io/fd/vpp/jvpp/VppCallbackException.java | 47 + .../io/fd/vpp/jvpp/VppConnection.java | 45 + .../io/fd/vpp/jvpp/VppInvocationException.java | 33 + .../io/fd/vpp/jvpp/VppJNIConnection.java | 137 + .../fd/vpp/jvpp/callback/ControlPingCallback.java | 29 + .../io/fd/vpp/jvpp/callback/JVppCallback.java | 29 + .../jvpp/callback/JVppNotificationCallback.java | 24 + .../io/fd/vpp/jvpp/dto/ControlPing.java | 34 + .../io/fd/vpp/jvpp/dto/ControlPingReply.java | 58 + .../jvpp-registry/io/fd/vpp/jvpp/dto/JVppDump.java | 24 + .../io/fd/vpp/jvpp/dto/JVppNotification.java | 23 + .../io/fd/vpp/jvpp/dto/JVppReply.java | 24 + .../io/fd/vpp/jvpp/dto/JVppReplyDump.java | 25 + .../io/fd/vpp/jvpp/dto/JVppRequest.java | 34 + .../vpp/jvpp/future/AbstractFutureJVppInvoker.java | 141 + .../io/fd/vpp/jvpp/future/FutureJVppInvoker.java | 49 + .../jvpp/notification/NotificationRegistry.java | 25 + .../notification/NotificationRegistryProvider.java | 28 + .../io/fd/vpp/jvpp/test/ConnectionTest.java | 44 + vpp/vpp-api/java/jvpp-registry/jvpp_registry.c | 352 + vpp/vpp-api/java/jvpp/gen/jvpp_gen.py | 166 + vpp/vpp-api/java/jvpp/gen/jvppgen/__init__.py | 0 vpp/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py | 105 + vpp/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py | 308 + vpp/vpp-api/java/jvpp/gen/jvppgen/jni_gen.py | 295 + vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py | 343 + .../jvpp/gen/jvppgen/jvpp_callback_facade_gen.py | 324 + .../jvpp/gen/jvppgen/jvpp_future_facade_gen.py | 331 + vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py | 219 + .../java/jvpp/gen/jvppgen/notification_gen.py | 199 + vpp/vpp-api/java/jvpp/gen/jvppgen/types_gen.py | 227 + vpp/vpp-api/java/jvpp/gen/jvppgen/util.py | 220 + vpp/vpp-api/java/m4/ax_check_java_home.m4 | 80 + vpp/vpp-api/java/m4/ax_check_java_plugin.m4 | 101 + vpp/vpp-api/java/m4/ax_java_check_class.m4 | 85 + vpp/vpp-api/java/m4/ax_java_options.m4 | 48 + vpp/vpp-api/java/m4/ax_libgcj_jar.m4 | 83 + vpp/vpp-api/java/m4/ax_prog_jar.m4 | 49 + vpp/vpp-api/java/m4/ax_prog_java.m4 | 115 + vpp/vpp-api/java/m4/ax_prog_java_cc.m4 | 104 + vpp/vpp-api/java/m4/ax_prog_java_works.m4 | 134 + vpp/vpp-api/java/m4/ax_prog_javac.m4 | 79 + vpp/vpp-api/java/m4/ax_prog_javac_works.m4 | 72 + vpp/vpp-api/java/m4/ax_prog_javadoc.m4 | 50 + vpp/vpp-api/java/m4/ax_prog_javah.m4 | 64 + vpp/vpp-api/java/m4/ax_try_compile_java.m4 | 55 + vpp/vpp-api/java/m4/ax_try_run_java.m4 | 56 + vpp/vpp-api/lua/README.md | 50 + vpp/vpp-api/lua/bench.lua | 70 + vpp/vpp-api/lua/examples/cli/README.md | 5 + vpp/vpp-api/lua/examples/cli/lua-cli.lua | 747 + vpp/vpp-api/lua/examples/example-acl-plugin.lua | 110 + vpp/vpp-api/lua/examples/example-classifier.lua | 51 + vpp/vpp-api/lua/examples/example-cli.lua | 44 + vpp/vpp-api/lua/examples/lute/README.md | 66 + vpp/vpp-api/lua/examples/lute/lute.lua | 777 + .../lua/examples/lute/script-inout-acl-noacl.lute | 329 + .../lua/examples/lute/script-inout-acl-old.lute | 329 + .../lua/examples/lute/script-inout-acl.lute | 329 + vpp/vpp-api/lua/examples/lute/script.lute | 7 + vpp/vpp-api/lua/examples/lute/sessions-acl.lute | 308 + vpp/vpp-api/lua/vpp-lapi.lua | 989 + vpp/vpp-api/python/Makefile.am | 51 + vpp/vpp-api/python/README.rst | 0 vpp/vpp-api/python/pneum/pneum.c | 259 + vpp/vpp-api/python/pneum/pneum.h | 31 + vpp/vpp-api/python/pneum/test_pneum.c | 143 + vpp/vpp-api/python/setup.cfg | 5 + vpp/vpp-api/python/setup.py | 35 + vpp/vpp-api/python/tests/test_cli.py | 52 + vpp/vpp-api/python/tests/test_modules.py | 18 + vpp/vpp-api/python/tests/test_papi.py | 119 + vpp/vpp-api/python/tests/test_version.py | 35 + vpp/vpp-api/python/tests/test_vpp_papi2.py | 487 + vpp/vpp-api/python/vpp_papi/__init__.py | 3 + vpp/vpp-api/python/vpp_papi/pneum_wrap.c | 200 + vpp/vpp-api/python/vpp_papi/vpp_papi.py | 585 + vpp/vpp/Makefile.am | 155 + vpp/vpp/app/l2t.c | 557 + vpp/vpp/app/l2t_l2.c | 267 + vpp/vpp/app/sticky_hash.c | 581 + vpp/vpp/app/version.c | 102 + vpp/vpp/app/vpe_cli.c | 123 + vpp/vpp/conf/80-vpp.conf | 15 + vpp/vpp/conf/startup.conf | 99 + vpp/vpp/conf/startup.uiopcigeneric.conf | 18 + vpp/vpp/configure.ac | 67 + vpp/vpp/oam/oam.c | 648 + vpp/vpp/oam/oam.h | 96 + vpp/vpp/stats/stats.c | 987 + vpp/vpp/stats/stats.h | 76 + vpp/vpp/suffix-rules.mk | 1 + vpp/vpp/vnet/main.c | 414 + vpp/vpp/vpp-api/api.c | 7485 ++++ vpp/vpp/vpp-api/custom_dump.c | 3139 ++ vpp/vpp/vpp-api/gmon.c | 319 + vpp/vpp/vpp-api/summary_stats_client.c | 302 + vpp/vpp/vpp-api/test_client.c | 1531 + vpp/vpp/vpp-api/test_ha.c | 249 + vpp/vpp/vpp-api/vpe.api | 4848 +++ vpp/vpp/vpp-api/vpe_all_api_h.h | 37 + vpp/vpp/vpp-api/vpe_msg_enum.h | 37 + vpp/vpp/vpp-api/vpp_get_metrics.c | 253 + vpp/vppapigen/Makefile.am | 29 + vpp/vppapigen/configure.ac | 14 + vpp/vppapigen/gram.y | 90 + vpp/vppapigen/lex.c | 1067 + vpp/vppapigen/lex.h | 50 + vpp/vppapigen/node.c | 1531 + vpp/vppapigen/node.h | 94 + vpp/vppinfra/.gitignore | 1 + vpp/vppinfra/INSTALL | 236 + vpp/vppinfra/Make.defs | 129 + vpp/vppinfra/Makefile.am | 275 + vpp/vppinfra/README | 43 + vpp/vppinfra/configure.ac | 52 + vpp/vppinfra/dir.dox | 19 + vpp/vppinfra/mkinstalldirs | 111 + vpp/vppinfra/tools/dir.dox | 19 + vpp/vppinfra/tools/elftool.c | 464 + vpp/vppinfra/unix_error.def | 145 + vpp/vppinfra/vppinfra/anneal.c | 172 + vpp/vppinfra/vppinfra/anneal.h | 89 + vpp/vppinfra/vppinfra/asm_mips.h | 351 + vpp/vppinfra/vppinfra/asm_x86.c | 1947 + vpp/vppinfra/vppinfra/asm_x86.h | 125 + vpp/vppinfra/vppinfra/backtrace.c | 267 + vpp/vppinfra/vppinfra/bihash_24_8.h | 85 + vpp/vppinfra/vppinfra/bihash_8_8.h | 98 + vpp/vppinfra/vppinfra/bihash_doc.h | 149 + vpp/vppinfra/vppinfra/bihash_template.c | 455 + vpp/vppinfra/vppinfra/bihash_template.h | 214 + vpp/vppinfra/vppinfra/bitmap.h | 774 + vpp/vppinfra/vppinfra/bitops.h | 179 + vpp/vppinfra/vppinfra/byte_order.h | 202 + vpp/vppinfra/vppinfra/cache.h | 104 + vpp/vppinfra/vppinfra/clib.h | 359 + vpp/vppinfra/vppinfra/cpu.c | 133 + vpp/vppinfra/vppinfra/cpu.h | 112 + vpp/vppinfra/vppinfra/dir.dox | 19 + vpp/vppinfra/vppinfra/dlist.h | 156 + vpp/vppinfra/vppinfra/elf.c | 2040 + vpp/vppinfra/vppinfra/elf.h | 1062 + vpp/vppinfra/vppinfra/elf_clib.c | 377 + vpp/vppinfra/vppinfra/elf_clib.h | 144 + vpp/vppinfra/vppinfra/elog.c | 1061 + vpp/vppinfra/vppinfra/elog.h | 460 + vpp/vppinfra/vppinfra/error.c | 292 + vpp/vppinfra/vppinfra/error.h | 201 + vpp/vppinfra/vppinfra/error_bootstrap.h | 106 + vpp/vppinfra/vppinfra/fheap.c | 473 + vpp/vppinfra/vppinfra/fheap.h | 140 + vpp/vppinfra/vppinfra/fifo.c | 137 + vpp/vppinfra/vppinfra/fifo.h | 304 + vpp/vppinfra/vppinfra/format.c | 814 + vpp/vppinfra/vppinfra/format.h | 331 + vpp/vppinfra/vppinfra/graph.c | 182 + vpp/vppinfra/vppinfra/graph.h | 127 + vpp/vppinfra/vppinfra/hash.c | 1095 + vpp/vppinfra/vppinfra/hash.h | 699 + vpp/vppinfra/vppinfra/heap.c | 828 + vpp/vppinfra/vppinfra/heap.h | 357 + vpp/vppinfra/vppinfra/longjmp.S | 690 + vpp/vppinfra/vppinfra/longjmp.h | 124 + vpp/vppinfra/vppinfra/macros.c | 266 + vpp/vppinfra/vppinfra/macros.h | 54 + vpp/vppinfra/vppinfra/math.h | 63 + vpp/vppinfra/vppinfra/md5.c | 317 + vpp/vppinfra/vppinfra/md5.h | 57 + vpp/vppinfra/vppinfra/mem.h | 291 + vpp/vppinfra/vppinfra/mem_mheap.c | 165 + vpp/vppinfra/vppinfra/memcheck.h | 317 + vpp/vppinfra/vppinfra/memcpy_avx.h | 293 + vpp/vppinfra/vppinfra/memcpy_sse3.h | 355 + vpp/vppinfra/vppinfra/mhash.c | 408 + vpp/vppinfra/vppinfra/mhash.h | 179 + vpp/vppinfra/vppinfra/mheap.c | 1649 + vpp/vppinfra/vppinfra/mheap.h | 94 + vpp/vppinfra/vppinfra/mheap_bootstrap.h | 374 + vpp/vppinfra/vppinfra/mod_test_hash.c | 27 + vpp/vppinfra/vppinfra/os.h | 72 + vpp/vppinfra/vppinfra/pfhash.c | 689 + vpp/vppinfra/vppinfra/pfhash.h | 276 + vpp/vppinfra/vppinfra/phash.c | 1017 + vpp/vppinfra/vppinfra/phash.h | 194 + vpp/vppinfra/vppinfra/pipeline.h | 176 + vpp/vppinfra/vppinfra/pool.h | 405 + vpp/vppinfra/vppinfra/ptclosure.c | 125 + vpp/vppinfra/vppinfra/ptclosure.h | 40 + vpp/vppinfra/vppinfra/qhash.c | 858 + vpp/vppinfra/vppinfra/qhash.h | 169 + vpp/vppinfra/vppinfra/qsort.c | 269 + vpp/vppinfra/vppinfra/random.c | 51 + vpp/vppinfra/vppinfra/random.h | 178 + vpp/vppinfra/vppinfra/random_buffer.c | 86 + vpp/vppinfra/vppinfra/random_buffer.h | 118 + vpp/vppinfra/vppinfra/random_isaac.c | 434 + vpp/vppinfra/vppinfra/random_isaac.h | 81 + vpp/vppinfra/vppinfra/serialize.c | 1254 + vpp/vppinfra/vppinfra/serialize.h | 443 + vpp/vppinfra/vppinfra/slist.c | 336 + vpp/vppinfra/vppinfra/slist.h | 145 + vpp/vppinfra/vppinfra/smp.c | 325 + vpp/vppinfra/vppinfra/smp.h | 81 + vpp/vppinfra/vppinfra/smp_fifo.c | 91 + vpp/vppinfra/vppinfra/smp_fifo.h | 313 + vpp/vppinfra/vppinfra/socket.c | 422 + vpp/vppinfra/vppinfra/socket.h | 160 + vpp/vppinfra/vppinfra/sparse_vec.h | 244 + vpp/vppinfra/vppinfra/std-formats.c | 330 + vpp/vppinfra/vppinfra/string.c | 94 + vpp/vppinfra/vppinfra/string.h | 83 + vpp/vppinfra/vppinfra/test_bihash_template.c | 297 + vpp/vppinfra/vppinfra/test_dlist.c | 193 + vpp/vppinfra/vppinfra/test_elf.c | 217 + vpp/vppinfra/vppinfra/test_elog.c | 262 + vpp/vppinfra/vppinfra/test_fifo.c | 144 + vpp/vppinfra/vppinfra/test_format.c | 199 + vpp/vppinfra/vppinfra/test_hash.c | 458 + vpp/vppinfra/vppinfra/test_heap.c | 198 + vpp/vppinfra/vppinfra/test_longjmp.c | 129 + vpp/vppinfra/vppinfra/test_macros.c | 64 + vpp/vppinfra/vppinfra/test_md5.c | 141 + vpp/vppinfra/vppinfra/test_mheap.c | 242 + vpp/vppinfra/vppinfra/test_pfhash.c | 322 + vpp/vppinfra/vppinfra/test_phash.c | 149 + vpp/vppinfra/vppinfra/test_pool.c | 86 + vpp/vppinfra/vppinfra/test_pool_iterate.c | 59 + vpp/vppinfra/vppinfra/test_ptclosure.c | 212 + vpp/vppinfra/vppinfra/test_qhash.c | 333 + vpp/vppinfra/vppinfra/test_random.c | 148 + vpp/vppinfra/vppinfra/test_random_isaac.c | 142 + vpp/vppinfra/vppinfra/test_serialize.c | 274 + vpp/vppinfra/vppinfra/test_slist.c | 228 + vpp/vppinfra/vppinfra/test_socket.c | 134 + vpp/vppinfra/vppinfra/test_time.c | 104 + vpp/vppinfra/vppinfra/test_timing_wheel.c | 389 + vpp/vppinfra/vppinfra/test_vec.c | 1159 + vpp/vppinfra/vppinfra/test_vec.h | 243 + vpp/vppinfra/vppinfra/test_vhash.c | 757 + vpp/vppinfra/vppinfra/test_zvec.c | 117 + vpp/vppinfra/vppinfra/time.c | 226 + vpp/vppinfra/vppinfra/time.h | 298 + vpp/vppinfra/vppinfra/timer.c | 322 + vpp/vppinfra/vppinfra/timer.h | 46 + vpp/vppinfra/vppinfra/timing_wheel.c | 750 + vpp/vppinfra/vppinfra/timing_wheel.h | 155 + vpp/vppinfra/vppinfra/types.h | 174 + vpp/vppinfra/vppinfra/unformat.c | 1077 + vpp/vppinfra/vppinfra/unix-formats.c | 918 + vpp/vppinfra/vppinfra/unix-kelog.c | 415 + vpp/vppinfra/vppinfra/unix-misc.c | 242 + vpp/vppinfra/vppinfra/unix.h | 64 + vpp/vppinfra/vppinfra/valgrind.h | 4030 ++ vpp/vppinfra/vppinfra/vec.c | 171 + vpp/vppinfra/vppinfra/vec.h | 973 + vpp/vppinfra/vppinfra/vec_bootstrap.h | 201 + vpp/vppinfra/vppinfra/vector.c | 54 + vpp/vppinfra/vppinfra/vector.h | 268 + vpp/vppinfra/vppinfra/vector_altivec.h | 178 + vpp/vppinfra/vppinfra/vector_funcs.h | 334 + vpp/vppinfra/vppinfra/vector_iwmmxt.h | 149 + vpp/vppinfra/vppinfra/vector_neon.h | 71 + vpp/vppinfra/vppinfra/vector_sse2.h | 711 + vpp/vppinfra/vppinfra/vhash.c | 772 + vpp/vppinfra/vppinfra/vhash.h | 850 + vpp/vppinfra/vppinfra/vm_linux_kernel.h | 78 + vpp/vppinfra/vppinfra/vm_standalone.h | 74 + vpp/vppinfra/vppinfra/vm_unix.h | 106 + vpp/vppinfra/vppinfra/xxhash.h | 86 + vpp/vppinfra/vppinfra/xy.h | 56 + vpp/vppinfra/vppinfra/zvec.c | 442 + vpp/vppinfra/vppinfra/zvec.h | 166 + 1474 files changed, 520405 insertions(+) create mode 100644 vpp/.gitignore create mode 100644 vpp/.gitreview create mode 100644 vpp/LICENSE create mode 100644 vpp/Makefile create mode 100644 vpp/README.md create mode 100644 vpp/RELEASE.md create mode 100644 vpp/build-data/packages/cavium-dpdk.mk create mode 100644 vpp/build-data/packages/dpdk.mk create mode 100644 vpp/build-data/packages/g2.mk create mode 100644 vpp/build-data/packages/gmod.mk create mode 100644 vpp/build-data/packages/perftool.mk create mode 100644 vpp/build-data/packages/plugins.mk create mode 100644 vpp/build-data/packages/svm.mk create mode 100644 vpp/build-data/packages/vlib-api-cavium-dpdk.mk create mode 100644 vpp/build-data/packages/vlib-api.mk create mode 100644 vpp/build-data/packages/vlib-cavium-dpdk.mk create mode 100644 vpp/build-data/packages/vlib.mk create mode 100644 vpp/build-data/packages/vnet-cavium-dpdk.mk create mode 100644 vpp/build-data/packages/vnet.mk create mode 100644 vpp/build-data/packages/vpp-api-test-cavium-dpdk.mk create mode 100644 vpp/build-data/packages/vpp-api-test.mk create mode 100644 vpp/build-data/packages/vpp-api.mk create mode 100644 vpp/build-data/packages/vpp-cavium-dpdk.mk create mode 100644 vpp/build-data/packages/vpp-platform-scripts.mk create mode 100644 vpp/build-data/packages/vpp.mk create mode 100644 vpp/build-data/packages/vppinfra.mk create mode 100644 vpp/build-data/platforms.mk create mode 100644 vpp/build-data/platforms/arm32.mk create mode 100644 vpp/build-data/platforms/dpaa2.mk create mode 100644 vpp/build-data/platforms/qppc.mk create mode 100644 vpp/build-data/platforms/thunder.mk create mode 100644 vpp/build-data/platforms/vpp.mk create mode 100644 vpp/build-data/platforms/vpp_lite.mk create mode 100644 vpp/build-data/suffix-rules.mk create mode 100644 vpp/build-root/Makefile create mode 100755 vpp/build-root/autowank create mode 100755 vpp/build-root/bootstrap.sh create mode 100644 vpp/build-root/build-config.mk.README create mode 100644 vpp/build-root/config.site create mode 100755 vpp/build-root/copyimg create mode 100644 vpp/build-root/deb/debian/.gitignore create mode 100755 vpp/build-root/deb/debian/README.vpp create mode 100755 vpp/build-root/deb/debian/compat create mode 100644 vpp/build-root/deb/debian/control create mode 100644 vpp/build-root/deb/debian/copyright create mode 100755 vpp/build-root/deb/debian/rules create mode 100755 vpp/build-root/deb/debian/source/format create mode 100644 vpp/build-root/deb/debian/vpp-bin.README.Debian create mode 100644 vpp/build-root/deb/debian/vpp-python-api.postinst create mode 100644 vpp/build-root/deb/debian/vpp-python-api.prerm create mode 100644 vpp/build-root/deb/debian/vpp.postinst create mode 100644 vpp/build-root/deb/debian/vpp.postrm create mode 100644 vpp/build-root/deb/debian/vpp.preinst create mode 100644 vpp/build-root/deb/debian/vpp.service create mode 100644 vpp/build-root/deb/debian/vpp.upstart create mode 100644 vpp/build-root/emacs-lisp/README create mode 100644 vpp/build-root/emacs-lisp/all-skel.el create mode 100644 vpp/build-root/emacs-lisp/cli-cmd-skel.el create mode 100644 vpp/build-root/emacs-lisp/config-skel.el create mode 100644 vpp/build-root/emacs-lisp/dual-loop-skel.el create mode 100644 vpp/build-root/emacs-lisp/elog-4-int-skel.el create mode 100644 vpp/build-root/emacs-lisp/elog-4-int-track-skel.el create mode 100644 vpp/build-root/emacs-lisp/elog-enum-skel.el create mode 100644 vpp/build-root/emacs-lisp/elog-one-datum-skel.el create mode 100755 vpp/build-root/emacs-lisp/fix-coding-style.el create mode 100755 vpp/build-root/emacs-lisp/make-plugin.sh create mode 100644 vpp/build-root/emacs-lisp/periodic-skel.el create mode 100644 vpp/build-root/emacs-lisp/pipe-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-all-apih-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-api-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-configure-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-h-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-main-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-makefile-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-msg-enum-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-node-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin-test-skel.el create mode 100644 vpp/build-root/emacs-lisp/plugin.el create mode 100644 vpp/build-root/emacs-lisp/tunnel-c-skel.el create mode 100644 vpp/build-root/emacs-lisp/tunnel-decap-skel.el create mode 100644 vpp/build-root/emacs-lisp/tunnel-encap-skel.el create mode 100644 vpp/build-root/emacs-lisp/tunnel-h-skel.el create mode 100644 vpp/build-root/packages/vppapigen.mk create mode 100644 vpp/build-root/packages/vppinfra.mk create mode 100644 vpp/build-root/platforms.mk create mode 100644 vpp/build-root/rpm/vpp.service create mode 100644 vpp/build-root/rpm/vpp.spec create mode 100755 vpp/build-root/scripts/checkstyle.sh create mode 100755 vpp/build-root/scripts/csit-test-branch create mode 100755 vpp/build-root/scripts/find-api-core-contents create mode 100755 vpp/build-root/scripts/find-api-lib-contents create mode 100755 vpp/build-root/scripts/find-dev-contents create mode 100755 vpp/build-root/scripts/find-dpdk-contents create mode 100755 vpp/build-root/scripts/find-plugins-contents create mode 100755 vpp/build-root/scripts/find-python-api-contents create mode 100755 vpp/build-root/scripts/generate-deb-changelog create mode 100755 vpp/build-root/scripts/lsnet create mode 100755 vpp/build-root/scripts/make-plugin-toolkit create mode 100755 vpp/build-root/scripts/pci-nic-bind create mode 100755 vpp/build-root/scripts/pci-nic-bind-to-kernel create mode 100755 vpp/build-root/scripts/remove-rpath create mode 100755 vpp/build-root/scripts/verdist create mode 100755 vpp/build-root/scripts/version create mode 100644 vpp/build-root/vagrant/.gitignore create mode 100644 vpp/build-root/vagrant/README create mode 100644 vpp/build-root/vagrant/Vagrantfile create mode 100644 vpp/build-root/vagrant/WELCOME create mode 100755 vpp/build-root/vagrant/build.sh create mode 100755 vpp/build-root/vagrant/clearinterfaces.sh create mode 100644 vpp/build-root/vagrant/env.sh create mode 100644 vpp/build-root/vagrant/install.sh create mode 100755 vpp/build-root/vagrant/run.sh create mode 100755 vpp/build-root/vagrant/update.sh create mode 100644 vpp/doxygen/Makefile create mode 100644 vpp/doxygen/assets/doxy-vpp.css create mode 100644 vpp/doxygen/assets/logo_fdio.png create mode 100644 vpp/doxygen/dir.dox.sample create mode 100644 vpp/doxygen/doxygen.cfg create mode 100755 vpp/doxygen/filter_api.py create mode 100755 vpp/doxygen/filter_c.py create mode 100755 vpp/doxygen/filter_h.py create mode 100644 vpp/doxygen/layout.xml create mode 100755 vpp/doxygen/siphon-generate create mode 100755 vpp/doxygen/siphon-process create mode 100644 vpp/doxygen/siphon/__init__.py create mode 100644 vpp/doxygen/siphon/generate.py create mode 100644 vpp/doxygen/siphon/generate_clicmd.py create mode 100644 vpp/doxygen/siphon/generate_syscfg.py create mode 100644 vpp/doxygen/siphon/parsers.py create mode 100644 vpp/doxygen/siphon/process.py create mode 100644 vpp/doxygen/siphon/process_clicmd.py create mode 100644 vpp/doxygen/siphon/process_syscfg.py create mode 100644 vpp/doxygen/siphon_templates/itemlist/clicmd/item_format.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/default/index_entry.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/default/index_header.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/default/index_section.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/default/item_format.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/default/item_header.itemlist create mode 100644 vpp/doxygen/siphon_templates/itemlist/syscfg/item_format.itemlist create mode 100644 vpp/doxygen/siphon_templates/markdown/clicmd/index_entry.md create mode 100644 vpp/doxygen/siphon_templates/markdown/clicmd/index_header.md create mode 100644 vpp/doxygen/siphon_templates/markdown/clicmd/item_format.md create mode 100644 vpp/doxygen/siphon_templates/markdown/default/index_entry.md create mode 100644 vpp/doxygen/siphon_templates/markdown/default/index_section.md create mode 100644 vpp/doxygen/siphon_templates/markdown/default/item_format.md create mode 100644 vpp/doxygen/siphon_templates/markdown/default/item_header.md create mode 100644 vpp/doxygen/siphon_templates/markdown/syscfg/index_header.md create mode 100644 vpp/doxygen/siphon_templates/markdown/syscfg/item_format.md create mode 100644 vpp/doxygen/user_doc.md create mode 100644 vpp/dpdk/Makefile create mode 100644 vpp/dpdk/README create mode 100644 vpp/dpdk/dkms/Makefile create mode 100755 vpp/dpdk/dkms/create_deb_manifest.sh create mode 100644 vpp/dpdk/dpdk-16.07_patches/0001-i40e-Add-packet_type-metadata-in-the-i40e-vPMD.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0002-i40e-Enable-bad-checksum-flags-in-i40e-vPMD.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0003-enic-Set-PKT_RX_VLAN_PKT-iff-returned-packet-has-VLA.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0004-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0005-NXP-DPAA2-Poll-Mode-Driver-Support-dpdk-16.07.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0005-drivers-reset-packet_type-before-using-buffer.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0008-Temporarily-disable-unthrottled-log-message.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0009-enic-bad-L4-checksum-ptype-set-on-ICMP-packets.patch create mode 100644 vpp/dpdk/dpdk-16.07_patches/0010-virtio-enable-indirect-descriptors-feature.patch create mode 100644 vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch create mode 100644 vpp/g2/Makefile.am create mode 100644 vpp/g2/clib.c create mode 100644 vpp/g2/configure.ac create mode 100644 vpp/g2/cpel.c create mode 100644 vpp/g2/cpel.h create mode 100644 vpp/g2/events.c create mode 100644 vpp/g2/g2.h create mode 100644 vpp/g2/g2version.c create mode 100644 vpp/g2/main.c create mode 100644 vpp/g2/menu1.c create mode 100644 vpp/g2/mkversion.c create mode 100644 vpp/g2/pointsel.c create mode 100644 vpp/g2/props.c create mode 100644 vpp/g2/props.h create mode 100644 vpp/g2/view1.c create mode 100644 vpp/gmod/Makefile.am create mode 100644 vpp/gmod/configure.ac create mode 100644 vpp/gmod/gmod/mod_vpp.c create mode 100644 vpp/gmod/gmod/vpp.conf create mode 100644 vpp/perftool/Makefile.am create mode 100644 vpp/perftool/c2cpel.c create mode 100644 vpp/perftool/configure.ac create mode 100644 vpp/perftool/cpel.h create mode 100644 vpp/perftool/cpel_util.c create mode 100644 vpp/perftool/cpel_util.h create mode 100644 vpp/perftool/cpelatency.c create mode 100644 vpp/perftool/cpeldump.c create mode 100644 vpp/perftool/cpelinreg.c create mode 100644 vpp/perftool/cpelstate.c create mode 100644 vpp/perftool/delsvec.c create mode 100644 vpp/perftool/linreg.c create mode 100644 vpp/perftool/new.cpel create mode 100644 vpp/perftool/new.elog create mode 100644 vpp/perftool/props.c create mode 100644 vpp/plugins/Makefile.am create mode 100644 vpp/plugins/acl-plugin/Makefile.am create mode 100644 vpp/plugins/acl-plugin/acl/acl.api create mode 100644 vpp/plugins/acl-plugin/acl/acl.c create mode 100644 vpp/plugins/acl-plugin/acl/acl.h create mode 100644 vpp/plugins/acl-plugin/acl/acl_all_api_h.h create mode 100644 vpp/plugins/acl-plugin/acl/acl_msg_enum.h create mode 100644 vpp/plugins/acl-plugin/acl/acl_test.c create mode 100644 vpp/plugins/acl-plugin/acl/jvpp/io/fd/vpp/jvpp/acl/test/AclExpectedDumpData.java create mode 100644 vpp/plugins/acl-plugin/acl/jvpp/io/fd/vpp/jvpp/acl/test/AclTestData.java create mode 100644 vpp/plugins/acl-plugin/acl/jvpp/io/fd/vpp/jvpp/acl/test/AclTestRequests.java create mode 100644 vpp/plugins/acl-plugin/acl/jvpp/io/fd/vpp/jvpp/acl/test/FutureApiTest.java create mode 100644 vpp/plugins/acl-plugin/acl/jvpp/io/fd/vpp/jvpp/acl/test/Readme.txt create mode 100644 vpp/plugins/acl-plugin/acl/jvpp_acl.c create mode 100644 vpp/plugins/acl-plugin/acl/jvpp_acl.h create mode 100644 vpp/plugins/acl-plugin/acl/l2sess.c create mode 100644 vpp/plugins/acl-plugin/acl/l2sess.h create mode 100644 vpp/plugins/acl-plugin/acl/l2sess_node.c create mode 100644 vpp/plugins/acl-plugin/acl/node_in.c create mode 100644 vpp/plugins/acl-plugin/acl/node_in.h create mode 100644 vpp/plugins/acl-plugin/acl/node_out.c create mode 100644 vpp/plugins/acl-plugin/acl/node_out.h create mode 100644 vpp/plugins/acl-plugin/configure.ac create mode 100755 vpp/plugins/acl-plugin/test/run-python create mode 100755 vpp/plugins/acl-plugin/test/run-scapy create mode 100644 vpp/plugins/acl-plugin/test/test_acl_plugin.py create mode 100644 vpp/plugins/configure.ac create mode 100644 vpp/plugins/flowperpkt-plugin/Makefile.am create mode 100644 vpp/plugins/flowperpkt-plugin/configure.ac create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.api create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.c create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt.h create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt_all_api_h.h create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt_msg_enum.h create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/flowperpkt_test.c create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt/node.c create mode 100644 vpp/plugins/flowperpkt-plugin/flowperpkt_plugin_doc.md create mode 100644 vpp/plugins/ila-plugin/Makefile.am create mode 100644 vpp/plugins/ila-plugin/configure.ac create mode 100644 vpp/plugins/ila-plugin/ila/ila.c create mode 100644 vpp/plugins/ila-plugin/ila/ila.h create mode 100644 vpp/plugins/ioam-plugin/Makefile.am create mode 100644 vpp/plugins/ioam-plugin/configure.ac create mode 100644 vpp/plugins/ioam-plugin/ioam/dir.dox create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.h create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_pot.c create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_seqno.c create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_seqno.h create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_seqno_analyse.c create mode 100644 vpp/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export-common/ioam_export.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export.api create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export_all_api_h.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export_msg_enum.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export_test.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export/ioam_export_thread.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export/jvpp_ioam_export.c create mode 100644 vpp/plugins/ioam-plugin/ioam/export/jvpp_ioam_export.h create mode 100644 vpp/plugins/ioam-plugin/ioam/export/node.c create mode 100644 vpp/plugins/ioam-plugin/ioam/ioam_plugin_doc.md create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamexport/test/IoamExportApiTest.java create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamexport/test/Readme.txt create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioampot/test/IoamPotApiTest.java create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioampot/test/Readme.txt create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java create mode 100644 vpp/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/Readme.txt create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/jvpp_ioam_pot.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/jvpp_ioam_pot.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/math64.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot.api create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_all_api_h.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_api.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_msg_enum.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_test.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_util.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-pot/pot_util.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/jvpp_ioam_trace.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/jvpp_ioam_trace.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace.api create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_all_api_h.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_api.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_msg_enum.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_test.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_util.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-trace/trace_util.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/ioam_decap.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/ioam_encap.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/ioam_pop.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/ioam_transit.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe.api create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h create mode 100644 vpp/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_test.c create mode 100644 vpp/plugins/lb-plugin/Makefile.am create mode 100644 vpp/plugins/lb-plugin/configure.ac create mode 100644 vpp/plugins/lb-plugin/lb/api.c create mode 100644 vpp/plugins/lb-plugin/lb/cli.c create mode 100644 vpp/plugins/lb-plugin/lb/lb.api create mode 100644 vpp/plugins/lb-plugin/lb/lb.c create mode 100644 vpp/plugins/lb-plugin/lb/lb.h create mode 100644 vpp/plugins/lb-plugin/lb/lb_test.c create mode 100644 vpp/plugins/lb-plugin/lb/lbhash.h create mode 100644 vpp/plugins/lb-plugin/lb/node.c create mode 100644 vpp/plugins/lb-plugin/lb/refcount.c create mode 100644 vpp/plugins/lb-plugin/lb/refcount.h create mode 100644 vpp/plugins/lb-plugin/lb/util.c create mode 100644 vpp/plugins/lb-plugin/lb/util.h create mode 100644 vpp/plugins/lb-plugin/lb_plugin_doc.md create mode 100644 vpp/plugins/sample-plugin/Makefile.am create mode 100644 vpp/plugins/sample-plugin/configure.ac create mode 100644 vpp/plugins/sample-plugin/sample/node.c create mode 100644 vpp/plugins/sample-plugin/sample/sample.api create mode 100644 vpp/plugins/sample-plugin/sample/sample.c create mode 100644 vpp/plugins/sample-plugin/sample/sample.h create mode 100644 vpp/plugins/sample-plugin/sample/sample_all_api_h.h create mode 100644 vpp/plugins/sample-plugin/sample/sample_msg_enum.h create mode 100644 vpp/plugins/sample-plugin/sample/sample_test.c create mode 100644 vpp/plugins/sixrd-plugin/Makefile.am create mode 100644 vpp/plugins/sixrd-plugin/configure.ac create mode 100644 vpp/plugins/sixrd-plugin/sixrd/ip4_sixrd.c create mode 100644 vpp/plugins/sixrd-plugin/sixrd/ip6_sixrd.c create mode 100644 vpp/plugins/sixrd-plugin/sixrd/sixrd.c create mode 100644 vpp/plugins/sixrd-plugin/sixrd/sixrd.h create mode 100644 vpp/plugins/sixrd-plugin/sixrd/sixrd_dpo.c create mode 100644 vpp/plugins/sixrd-plugin/sixrd/sixrd_dpo.h create mode 100644 vpp/plugins/snat-plugin/Makefile.am create mode 100644 vpp/plugins/snat-plugin/configure.ac create mode 100644 vpp/plugins/snat-plugin/snat/in2out.c create mode 100644 vpp/plugins/snat-plugin/snat/jvpp/io/fd/vpp/jvpp/snat/test/CallbackApiTest.java create mode 100644 vpp/plugins/snat-plugin/snat/jvpp/io/fd/vpp/jvpp/snat/test/Readme.txt create mode 100644 vpp/plugins/snat-plugin/snat/jvpp_snat.c create mode 100644 vpp/plugins/snat-plugin/snat/jvpp_snat.h create mode 100644 vpp/plugins/snat-plugin/snat/out2in.c create mode 100644 vpp/plugins/snat-plugin/snat/snat.api create mode 100644 vpp/plugins/snat-plugin/snat/snat.c create mode 100644 vpp/plugins/snat-plugin/snat/snat.h create mode 100644 vpp/plugins/snat-plugin/snat/snat_all_api_h.h create mode 100644 vpp/plugins/snat-plugin/snat/snat_msg_enum.h create mode 100644 vpp/plugins/snat-plugin/snat/snat_test.c create mode 100644 vpp/plugins/vcgn-plugin/Makefile.am create mode 100644 vpp/plugins/vcgn-plugin/configure.ac create mode 100644 vpp/plugins/vcgn-plugin/vcgn/README create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cgn_bitmap.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cgse_defs.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_bulk_port_defs.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_cli.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_cli_handler.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_common_api.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_config.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_config.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_config_api.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_db.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_db_scanner.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_db_v2.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_debug_msg_handler.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_global.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_global.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp_error_inside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp_error_outside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp_query_inside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_icmp_query_outside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_tcp_inside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_tcp_outside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_udp.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_udp_inside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_udp_inside_input_exceptions.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ipv4_udp_outside_input.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_log_api.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_log_common.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_logging.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_logging.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_pcp_server.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ports.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_ports.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_show.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_show_api.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_show_response.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_syslog.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_syslog.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_util.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_v4_ftp_alg.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_v4_functions.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_v4_functions.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_v4_pptp_alg.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_v4_tcp_in2out_stages.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_va_db.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/cnat_va_db.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/dslite_db.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/dslite_defs.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/index_list.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/index_list.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/nat64_db.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/nat64_defs.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/nat64_tcp_sm.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/platform_common.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/platform_common_override.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/spp_ctx.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/spp_platform_trace_log.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/spp_platform_trace_log.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/spp_timers.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/tcp_header_definitions.h create mode 100644 vpp/plugins/vcgn-plugin/vcgn/vcgn_classify.c create mode 100644 vpp/plugins/vcgn-plugin/vcgn/vcgn_db.h create mode 100644 vpp/svm/Makefile.am create mode 100644 vpp/svm/configure.ac create mode 100644 vpp/svm/dir.dox create mode 100644 vpp/svm/persist.c create mode 100644 vpp/svm/ssvm.c create mode 100644 vpp/svm/ssvm.h create mode 100644 vpp/svm/svm.c create mode 100644 vpp/svm/svm.h create mode 100644 vpp/svm/svm_test.c create mode 100644 vpp/svm/svmdb.c create mode 100644 vpp/svm/svmdb.h create mode 100644 vpp/svm/svmdbtool.c create mode 100644 vpp/svm/svmtool.c create mode 100644 vpp/test/Makefile create mode 100644 vpp/test/bfd.py create mode 100644 vpp/test/doc/Makefile create mode 100644 vpp/test/doc/conf.py create mode 100644 vpp/test/doc/index.rst create mode 100644 vpp/test/framework.py create mode 100644 vpp/test/hook.py create mode 100644 vpp/test/log.py create mode 100644 vpp/test/patches/scapy-2.3.3/gre-layers.patch create mode 100644 vpp/test/patches/scapy-2.3.3/mpls.py.patch create mode 100644 vpp/test/run_tests.py create mode 100644 vpp/test/scapy_handlers/__init__.py create mode 100644 vpp/test/template_bd.py create mode 100644 vpp/test/test_bfd.py create mode 100644 vpp/test/test_classifier.py create mode 100644 vpp/test/test_fib.py create mode 100644 vpp/test/test_gre.py create mode 100644 vpp/test/test_ip4.py create mode 100644 vpp/test/test_ip4_irb.py create mode 100644 vpp/test/test_ip6.py create mode 100644 vpp/test/test_l2_fib.py create mode 100644 vpp/test/test_l2bd.py create mode 100644 vpp/test/test_l2bd_multi_instance.py create mode 100644 vpp/test/test_l2xc.py create mode 100644 vpp/test/test_l2xc_multi_instance.py create mode 100644 vpp/test/test_lb.py create mode 100644 vpp/test/test_mpls.py create mode 100644 vpp/test/test_snat.py create mode 100644 vpp/test/test_span.py create mode 100644 vpp/test/test_vxlan.py create mode 100644 vpp/test/util.py create mode 100644 vpp/test/vpp_gre_interface.py create mode 100644 vpp/test/vpp_interface.py create mode 100644 vpp/test/vpp_ip_route.py create mode 100644 vpp/test/vpp_lo_interface.py create mode 100644 vpp/test/vpp_object.py create mode 100644 vpp/test/vpp_papi_provider.py create mode 100644 vpp/test/vpp_pg_interface.py create mode 100644 vpp/test/vpp_sub_interface.py create mode 100644 vpp/vlib-api/Makefile.am create mode 100644 vpp/vlib-api/configure.ac create mode 120000 vpp/vlib-api/suffix-rules.mk create mode 100644 vpp/vlib-api/vlibapi/api.h create mode 100644 vpp/vlib-api/vlibapi/api_helper_macros.h create mode 100644 vpp/vlib-api/vlibapi/api_shared.c create mode 100644 vpp/vlib-api/vlibapi/node_serialize.c create mode 100644 vpp/vlib-api/vlibmemory/api.h create mode 100644 vpp/vlib-api/vlibmemory/memclnt.api create mode 100644 vpp/vlib-api/vlibmemory/memory_client.c create mode 100644 vpp/vlib-api/vlibmemory/memory_shared.c create mode 100644 vpp/vlib-api/vlibmemory/memory_vlib.c create mode 100644 vpp/vlib-api/vlibmemory/unix_shared_memory_queue.c create mode 100644 vpp/vlib-api/vlibmemory/unix_shared_memory_queue.h create mode 100644 vpp/vlib-api/vlibmemory/vl_memory_api_h.h create mode 100644 vpp/vlib-api/vlibmemory/vl_memory_msg_enum.h create mode 100644 vpp/vlib-api/vlibsocket/api.h create mode 100644 vpp/vlib-api/vlibsocket/sock_test.c create mode 100644 vpp/vlib-api/vlibsocket/sockclnt.api create mode 100644 vpp/vlib-api/vlibsocket/sockclnt_vlib.c create mode 100644 vpp/vlib-api/vlibsocket/socksvr_vlib.c create mode 100644 vpp/vlib-api/vlibsocket/vl_socket_api_h.h create mode 100644 vpp/vlib-api/vlibsocket/vl_socket_msg_enum.h create mode 100644 vpp/vlib/.gitignore create mode 100644 vpp/vlib/Makefile.am create mode 100644 vpp/vlib/configure.ac create mode 100644 vpp/vlib/dir.dox create mode 100644 vpp/vlib/example/dir.dox create mode 100644 vpp/vlib/example/main_stub.c create mode 100644 vpp/vlib/example/mc_test.c create mode 100644 vpp/vlib/example/plex_test.c create mode 100644 vpp/vlib/vlib/buffer.c create mode 100644 vpp/vlib/vlib/buffer.h create mode 100644 vpp/vlib/vlib/buffer_funcs.h create mode 100644 vpp/vlib/vlib/buffer_node.h create mode 100644 vpp/vlib/vlib/cli.c create mode 100644 vpp/vlib/vlib/cli.h create mode 100644 vpp/vlib/vlib/cli_funcs.h create mode 100644 vpp/vlib/vlib/counter.c create mode 100644 vpp/vlib/vlib/counter.h create mode 100644 vpp/vlib/vlib/defs.h create mode 100644 vpp/vlib/vlib/dir.dox create mode 100644 vpp/vlib/vlib/elog_samples.c create mode 100644 vpp/vlib/vlib/error.c create mode 100644 vpp/vlib/vlib/error.h create mode 100644 vpp/vlib/vlib/error_funcs.h create mode 100644 vpp/vlib/vlib/format.c create mode 100644 vpp/vlib/vlib/format_funcs.h create mode 100644 vpp/vlib/vlib/global_funcs.h create mode 100644 vpp/vlib/vlib/i2c.c create mode 100644 vpp/vlib/vlib/i2c.h create mode 100644 vpp/vlib/vlib/init.c create mode 100644 vpp/vlib/vlib/init.h create mode 100644 vpp/vlib/vlib/lex.c create mode 100644 vpp/vlib/vlib/lex.h create mode 100644 vpp/vlib/vlib/main.c create mode 100644 vpp/vlib/vlib/main.h create mode 100644 vpp/vlib/vlib/mc.c create mode 100644 vpp/vlib/vlib/mc.h create mode 100644 vpp/vlib/vlib/node.c create mode 100644 vpp/vlib/vlib/node.h create mode 100644 vpp/vlib/vlib/node_cli.c create mode 100644 vpp/vlib/vlib/node_format.c create mode 100644 vpp/vlib/vlib/node_funcs.h create mode 100644 vpp/vlib/vlib/parse.c create mode 100644 vpp/vlib/vlib/parse.h create mode 100644 vpp/vlib/vlib/parse_builtin.c create mode 100644 vpp/vlib/vlib/pci/linux_pci.c create mode 100644 vpp/vlib/vlib/pci/pci.c create mode 100644 vpp/vlib/vlib/pci/pci.h create mode 100644 vpp/vlib/vlib/pci/pci_config.h create mode 100644 vpp/vlib/vlib/physmem.h create mode 100644 vpp/vlib/vlib/threads.c create mode 100644 vpp/vlib/vlib/threads.h create mode 100644 vpp/vlib/vlib/threads_cli.c create mode 100644 vpp/vlib/vlib/trace.c create mode 100644 vpp/vlib/vlib/trace.h create mode 100644 vpp/vlib/vlib/trace_funcs.h create mode 100644 vpp/vlib/vlib/unix/cj.c create mode 100644 vpp/vlib/vlib/unix/cj.h create mode 100644 vpp/vlib/vlib/unix/cli.c create mode 100644 vpp/vlib/vlib/unix/dir.dox create mode 100644 vpp/vlib/vlib/unix/input.c create mode 100644 vpp/vlib/vlib/unix/main.c create mode 100644 vpp/vlib/vlib/unix/mc_socket.c create mode 100644 vpp/vlib/vlib/unix/mc_socket.h create mode 100644 vpp/vlib/vlib/unix/physmem.c create mode 100644 vpp/vlib/vlib/unix/physmem.h create mode 100644 vpp/vlib/vlib/unix/plugin.c create mode 100644 vpp/vlib/vlib/unix/plugin.h create mode 100644 vpp/vlib/vlib/unix/unix.h create mode 100644 vpp/vlib/vlib/unix/util.c create mode 100644 vpp/vlib/vlib/vlib.h create mode 100644 vpp/vlib/vlib/vlib_process_doc.h create mode 100644 vpp/vnet/.gitignore create mode 100644 vpp/vnet/Makefile.am create mode 100644 vpp/vnet/configure.ac create mode 100644 vpp/vnet/etc/scripts/arp4 create mode 100644 vpp/vnet/etc/scripts/arp4-mpls create mode 100644 vpp/vnet/etc/scripts/arp6 create mode 100644 vpp/vnet/etc/scripts/bvi create mode 100644 vpp/vnet/etc/scripts/dhcp/dhcpd.conf create mode 100644 vpp/vnet/etc/scripts/dhcp/left-ping-target.sh create mode 100644 vpp/vnet/etc/scripts/dhcp/leftpeer.conf create mode 100644 vpp/vnet/etc/scripts/icmp create mode 100644 vpp/vnet/etc/scripts/icmp6 create mode 100644 vpp/vnet/etc/scripts/ige create mode 100644 vpp/vnet/etc/scripts/ip6 create mode 100644 vpp/vnet/etc/scripts/ip6-hbh create mode 100644 vpp/vnet/etc/scripts/ixge create mode 100644 vpp/vnet/etc/scripts/l2efpfilter create mode 100644 vpp/vnet/etc/scripts/l2efpfilter_perf create mode 100644 vpp/vnet/etc/scripts/l2fib create mode 100644 vpp/vnet/etc/scripts/l2fib_perf create mode 100644 vpp/vnet/etc/scripts/l2fib_xc create mode 100644 vpp/vnet/etc/scripts/l2flood create mode 100644 vpp/vnet/etc/scripts/l2tp create mode 100755 vpp/vnet/etc/scripts/leftpeer/leftpeer-classify create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-classify6 create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-classifyl2 create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-dhcp create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-ioam.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-l3vxlan.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-lisp.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-mpls.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-sr.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer-vxlan.conf create mode 100644 vpp/vnet/etc/scripts/leftpeer/leftpeer.script create mode 100644 vpp/vnet/etc/scripts/lfib/ip4-to-mpls create mode 100644 vpp/vnet/etc/scripts/lfib/mpls-pop-to-mpls create mode 100644 vpp/vnet/etc/scripts/lfib/mpls-to-ip4 create mode 100644 vpp/vnet/etc/scripts/lfib/mpls-to-mpls create mode 100644 vpp/vnet/etc/scripts/mpls-o-ethernet/leftpeer.conf create mode 100644 vpp/vnet/etc/scripts/mpls-o-ethernet/pg create mode 100644 vpp/vnet/etc/scripts/mpls-o-ethernet/rightpeer.conf create mode 100644 vpp/vnet/etc/scripts/mpls-o-ethernet/single.conf create mode 100644 vpp/vnet/etc/scripts/mpls-o-gre/dhcpd.conf create mode 100644 vpp/vnet/etc/scripts/mpls-o-gre/leftpeer.conf create mode 100644 vpp/vnet/etc/scripts/mpls-o-gre/rightpeer.conf create mode 100644 vpp/vnet/etc/scripts/mpls-tunnel create mode 100644 vpp/vnet/etc/scripts/pcap create mode 100644 vpp/vnet/etc/scripts/probe4 create mode 100644 vpp/vnet/etc/scripts/probe6 create mode 100644 vpp/vnet/etc/scripts/rewrite create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-ioam.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-l3vxlan.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-lisp.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-mpls-l2.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-mpls.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-sr.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer-vxlan.conf create mode 100644 vpp/vnet/etc/scripts/rightpeer/rightpeer.script create mode 100644 vpp/vnet/etc/scripts/rpf create mode 100644 vpp/vnet/etc/scripts/rtt-test create mode 100644 vpp/vnet/etc/scripts/snat create mode 100644 vpp/vnet/etc/scripts/snat_static create mode 100644 vpp/vnet/etc/scripts/snat_static_with_port create mode 100644 vpp/vnet/etc/scripts/source_and_port_range_check create mode 100644 vpp/vnet/etc/scripts/speed create mode 100755 vpp/vnet/etc/scripts/sr/left-linux-ping.sh create mode 100644 vpp/vnet/etc/scripts/sr/leftpeer.conf create mode 100755 vpp/vnet/etc/scripts/sr/right-linux-ping.sh create mode 100644 vpp/vnet/etc/scripts/sr/rightpeer.conf create mode 100755 vpp/vnet/etc/scripts/sr/srlocal.sh create mode 100644 vpp/vnet/etc/scripts/srp create mode 100644 vpp/vnet/etc/scripts/tcp create mode 100644 vpp/vnet/etc/scripts/tcp-test create mode 100644 vpp/vnet/etc/scripts/tf-ucs-1 create mode 100644 vpp/vnet/etc/scripts/urpf create mode 100644 vpp/vnet/etc/scripts/virl/ip6sr.virl create mode 100644 vpp/vnet/etc/scripts/virl/ip6sr_notes.txt create mode 100644 vpp/vnet/etc/scripts/virl/mplsogre.virl create mode 100644 vpp/vnet/etc/scripts/virl/simple.virl create mode 100644 vpp/vnet/etc/scripts/vlan create mode 120000 vpp/vnet/suffix-rules.mk create mode 100644 vpp/vnet/test/README create mode 100644 vpp/vnet/test/lisp-cp/test_cp_serdes.c create mode 100644 vpp/vnet/test/lisp-cp/test_lisp_types.c create mode 100644 vpp/vnet/test/lisp-gpe/test.c create mode 100644 vpp/vnet/vnet/adj/adj.c create mode 100644 vpp/vnet/vnet/adj/adj.h create mode 100644 vpp/vnet/vnet/adj/adj_glean.c create mode 100644 vpp/vnet/vnet/adj/adj_glean.h create mode 100644 vpp/vnet/vnet/adj/adj_internal.h create mode 100644 vpp/vnet/vnet/adj/adj_l2.c create mode 100644 vpp/vnet/vnet/adj/adj_l2.h create mode 100644 vpp/vnet/vnet/adj/adj_midchain.c create mode 100644 vpp/vnet/vnet/adj/adj_midchain.h create mode 100644 vpp/vnet/vnet/adj/adj_nbr.c create mode 100644 vpp/vnet/vnet/adj/adj_nbr.h create mode 100644 vpp/vnet/vnet/adj/adj_rewrite.c create mode 100644 vpp/vnet/vnet/adj/adj_rewrite.h create mode 100644 vpp/vnet/vnet/adj/adj_types.h create mode 100644 vpp/vnet/vnet/api_errno.h create mode 100644 vpp/vnet/vnet/bfd/bfd_api.h create mode 100644 vpp/vnet/vnet/bfd/bfd_debug.h create mode 100644 vpp/vnet/vnet/bfd/bfd_doc.md create mode 100644 vpp/vnet/vnet/bfd/bfd_main.c create mode 100644 vpp/vnet/vnet/bfd/bfd_main.h create mode 100644 vpp/vnet/vnet/bfd/bfd_protocol.c create mode 100644 vpp/vnet/vnet/bfd/bfd_protocol.h create mode 100644 vpp/vnet/vnet/bfd/bfd_udp.c create mode 100644 vpp/vnet/vnet/bfd/bfd_udp.h create mode 100644 vpp/vnet/vnet/bfd/dir.dox create mode 100644 vpp/vnet/vnet/buffer.h create mode 100644 vpp/vnet/vnet/cdp/cdp.pg create mode 100644 vpp/vnet/vnet/cdp/cdp_input.c create mode 100644 vpp/vnet/vnet/cdp/cdp_node.c create mode 100644 vpp/vnet/vnet/cdp/cdp_node.h create mode 100644 vpp/vnet/vnet/cdp/cdp_periodic.c create mode 100644 vpp/vnet/vnet/cdp/cdp_protocol.h create mode 100644 vpp/vnet/vnet/classify/README create mode 100644 vpp/vnet/vnet/classify/flow_classify.c create mode 100644 vpp/vnet/vnet/classify/flow_classify.h create mode 100644 vpp/vnet/vnet/classify/flow_classify_node.c create mode 100644 vpp/vnet/vnet/classify/input_acl.c create mode 100644 vpp/vnet/vnet/classify/input_acl.h create mode 100644 vpp/vnet/vnet/classify/ip_classify.c create mode 100644 vpp/vnet/vnet/classify/policer_classify.c create mode 100644 vpp/vnet/vnet/classify/policer_classify.h create mode 100644 vpp/vnet/vnet/classify/vnet_classify.c create mode 100644 vpp/vnet/vnet/classify/vnet_classify.h create mode 100644 vpp/vnet/vnet/config.c create mode 100644 vpp/vnet/vnet/config.h create mode 100644 vpp/vnet/vnet/cop/cop.c create mode 100644 vpp/vnet/vnet/cop/cop.h create mode 100644 vpp/vnet/vnet/cop/ip4_whitelist.c create mode 100644 vpp/vnet/vnet/cop/ip6_whitelist.c create mode 100644 vpp/vnet/vnet/cop/node1.c create mode 100644 vpp/vnet/vnet/devices/af_packet/af_packet.c create mode 100644 vpp/vnet/vnet/devices/af_packet/af_packet.h create mode 100644 vpp/vnet/vnet/devices/af_packet/cli.c create mode 100644 vpp/vnet/vnet/devices/af_packet/device.c create mode 100644 vpp/vnet/vnet/devices/af_packet/node.c create mode 100644 vpp/vnet/vnet/devices/devices.c create mode 100644 vpp/vnet/vnet/devices/devices.h create mode 100644 vpp/vnet/vnet/devices/dpdk/cli.c create mode 100644 vpp/vnet/vnet/devices/dpdk/device.c create mode 100644 vpp/vnet/vnet/devices/dpdk/dpdk.h create mode 100644 vpp/vnet/vnet/devices/dpdk/dpdk_priv.h create mode 100644 vpp/vnet/vnet/devices/dpdk/format.c create mode 100644 vpp/vnet/vnet/devices/dpdk/hqos.c create mode 100755 vpp/vnet/vnet/devices/dpdk/init.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/cli.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/crypto_node.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/dir.dox create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/dpdk_crypto_ipsec_doc.md create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/esp.h create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/esp_decrypt.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/esp_encrypt.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/ipsec.c create mode 100644 vpp/vnet/vnet/devices/dpdk/ipsec/ipsec.h create mode 100644 vpp/vnet/vnet/devices/dpdk/node.c create mode 100644 vpp/vnet/vnet/devices/dpdk/qos_doc.md create mode 100644 vpp/vnet/vnet/devices/netmap/cli.c create mode 100644 vpp/vnet/vnet/devices/netmap/device.c create mode 100644 vpp/vnet/vnet/devices/netmap/net_netmap.h create mode 100644 vpp/vnet/vnet/devices/netmap/netmap.c create mode 100644 vpp/vnet/vnet/devices/netmap/netmap.h create mode 100644 vpp/vnet/vnet/devices/netmap/node.c create mode 100644 vpp/vnet/vnet/devices/nic/ixge.c create mode 100644 vpp/vnet/vnet/devices/nic/ixge.h create mode 100644 vpp/vnet/vnet/devices/nic/sfp.c create mode 100644 vpp/vnet/vnet/devices/nic/sfp.h create mode 100644 vpp/vnet/vnet/devices/ssvm/node.c create mode 100644 vpp/vnet/vnet/devices/ssvm/ssvm_eth.c create mode 100644 vpp/vnet/vnet/devices/ssvm/ssvm_eth.h create mode 100644 vpp/vnet/vnet/devices/virtio/dir.dox create mode 100644 vpp/vnet/vnet/devices/virtio/vhost-user.c create mode 100644 vpp/vnet/vnet/devices/virtio/vhost-user.h create mode 100644 vpp/vnet/vnet/dhcp/client.c create mode 100644 vpp/vnet/vnet/dhcp/client.h create mode 100644 vpp/vnet/vnet/dhcp/packet.h create mode 100644 vpp/vnet/vnet/dhcp/proxy.h create mode 100644 vpp/vnet/vnet/dhcp/proxy_error.def create mode 100644 vpp/vnet/vnet/dhcp/proxy_node.c create mode 100644 vpp/vnet/vnet/dhcpv6/packet.h create mode 100644 vpp/vnet/vnet/dhcpv6/proxy.h create mode 100644 vpp/vnet/vnet/dhcpv6/proxy_error.def create mode 100644 vpp/vnet/vnet/dhcpv6/proxy_node.c create mode 100644 vpp/vnet/vnet/dpo/classify_dpo.c create mode 100644 vpp/vnet/vnet/dpo/classify_dpo.h create mode 100644 vpp/vnet/vnet/dpo/dpo.c create mode 100644 vpp/vnet/vnet/dpo/dpo.h create mode 100644 vpp/vnet/vnet/dpo/drop_dpo.c create mode 100644 vpp/vnet/vnet/dpo/drop_dpo.h create mode 100644 vpp/vnet/vnet/dpo/ip_null_dpo.c create mode 100644 vpp/vnet/vnet/dpo/ip_null_dpo.h create mode 100644 vpp/vnet/vnet/dpo/load_balance.c create mode 100644 vpp/vnet/vnet/dpo/load_balance.h create mode 100644 vpp/vnet/vnet/dpo/load_balance_map.c create mode 100644 vpp/vnet/vnet/dpo/load_balance_map.h create mode 100644 vpp/vnet/vnet/dpo/lookup_dpo.c create mode 100644 vpp/vnet/vnet/dpo/lookup_dpo.h create mode 100644 vpp/vnet/vnet/dpo/mpls_label_dpo.c create mode 100644 vpp/vnet/vnet/dpo/mpls_label_dpo.h create mode 100644 vpp/vnet/vnet/dpo/punt_dpo.c create mode 100644 vpp/vnet/vnet/dpo/punt_dpo.h create mode 100644 vpp/vnet/vnet/dpo/receive_dpo.c create mode 100644 vpp/vnet/vnet/dpo/receive_dpo.h create mode 100644 vpp/vnet/vnet/ethernet/arp.c create mode 100644 vpp/vnet/vnet/ethernet/arp_packet.h create mode 100644 vpp/vnet/vnet/ethernet/dir.dox create mode 100644 vpp/vnet/vnet/ethernet/error.def create mode 100644 vpp/vnet/vnet/ethernet/ethernet.h create mode 100644 vpp/vnet/vnet/ethernet/format.c create mode 100644 vpp/vnet/vnet/ethernet/init.c create mode 100644 vpp/vnet/vnet/ethernet/interface.c create mode 100644 vpp/vnet/vnet/ethernet/mac_swap.c create mode 100755 vpp/vnet/vnet/ethernet/node.c create mode 100644 vpp/vnet/vnet/ethernet/packet.h create mode 100644 vpp/vnet/vnet/ethernet/pg.c create mode 100644 vpp/vnet/vnet/ethernet/types.def create mode 100644 vpp/vnet/vnet/feature/feature.c create mode 100644 vpp/vnet/vnet/feature/feature.h create mode 100644 vpp/vnet/vnet/feature/registration.c create mode 100644 vpp/vnet/vnet/fib/fib.c create mode 100644 vpp/vnet/vnet/fib/fib.h create mode 100644 vpp/vnet/vnet/fib/fib_api.h create mode 100644 vpp/vnet/vnet/fib/fib_attached_export.c create mode 100644 vpp/vnet/vnet/fib/fib_attached_export.h create mode 100644 vpp/vnet/vnet/fib/fib_entry.c create mode 100644 vpp/vnet/vnet/fib/fib_entry.h create mode 100644 vpp/vnet/vnet/fib/fib_entry_cover.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_cover.h create mode 100644 vpp/vnet/vnet/fib/fib_entry_delegate.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_delegate.h create mode 100644 vpp/vnet/vnet/fib/fib_entry_src.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src.h create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_adj.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_api.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_default.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_default_route.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_interface.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_lisp.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_mpls.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_rr.c create mode 100644 vpp/vnet/vnet/fib/fib_entry_src_special.c create mode 100644 vpp/vnet/vnet/fib/fib_internal.h create mode 100644 vpp/vnet/vnet/fib/fib_node.c create mode 100644 vpp/vnet/vnet/fib/fib_node.h create mode 100644 vpp/vnet/vnet/fib/fib_node_list.c create mode 100644 vpp/vnet/vnet/fib/fib_node_list.h create mode 100644 vpp/vnet/vnet/fib/fib_path.c create mode 100644 vpp/vnet/vnet/fib/fib_path.h create mode 100644 vpp/vnet/vnet/fib/fib_path_ext.c create mode 100644 vpp/vnet/vnet/fib/fib_path_ext.h create mode 100644 vpp/vnet/vnet/fib/fib_path_list.c create mode 100644 vpp/vnet/vnet/fib/fib_path_list.h create mode 100644 vpp/vnet/vnet/fib/fib_table.c create mode 100644 vpp/vnet/vnet/fib/fib_table.h create mode 100644 vpp/vnet/vnet/fib/fib_test.c create mode 100644 vpp/vnet/vnet/fib/fib_types.c create mode 100644 vpp/vnet/vnet/fib/fib_types.h create mode 100644 vpp/vnet/vnet/fib/fib_urpf_list.c create mode 100644 vpp/vnet/vnet/fib/fib_urpf_list.h create mode 100644 vpp/vnet/vnet/fib/fib_walk.c create mode 100644 vpp/vnet/vnet/fib/fib_walk.h create mode 100644 vpp/vnet/vnet/fib/ip4_fib.c create mode 100644 vpp/vnet/vnet/fib/ip4_fib.h create mode 100644 vpp/vnet/vnet/fib/ip6_fib.c create mode 100644 vpp/vnet/vnet/fib/ip6_fib.h create mode 100644 vpp/vnet/vnet/fib/mpls_fib.c create mode 100644 vpp/vnet/vnet/fib/mpls_fib.h create mode 100644 vpp/vnet/vnet/flow/flow_report.c create mode 100644 vpp/vnet/vnet/flow/flow_report.h create mode 100644 vpp/vnet/vnet/flow/flow_report_classify.c create mode 100644 vpp/vnet/vnet/flow/flow_report_classify.h create mode 100644 vpp/vnet/vnet/flow/ipfix_info_elements.h create mode 100644 vpp/vnet/vnet/flow/ipfix_packet.h create mode 100644 vpp/vnet/vnet/global_funcs.h create mode 100644 vpp/vnet/vnet/gre/error.def create mode 100644 vpp/vnet/vnet/gre/gre.c create mode 100644 vpp/vnet/vnet/gre/gre.h create mode 100644 vpp/vnet/vnet/gre/interface.c create mode 100644 vpp/vnet/vnet/gre/node.c create mode 100644 vpp/vnet/vnet/gre/packet.h create mode 100644 vpp/vnet/vnet/gre/pg.c create mode 100644 vpp/vnet/vnet/handoff.c create mode 100644 vpp/vnet/vnet/handoff.h create mode 100644 vpp/vnet/vnet/hdlc/error.def create mode 100644 vpp/vnet/vnet/hdlc/hdlc.c create mode 100644 vpp/vnet/vnet/hdlc/hdlc.h create mode 100644 vpp/vnet/vnet/hdlc/node.c create mode 100644 vpp/vnet/vnet/hdlc/packet.h create mode 100644 vpp/vnet/vnet/hdlc/pg.c create mode 100644 vpp/vnet/vnet/interface.api create mode 100644 vpp/vnet/vnet/interface.c create mode 100644 vpp/vnet/vnet/interface.h create mode 100644 vpp/vnet/vnet/interface_api.c create mode 100644 vpp/vnet/vnet/interface_cli.c create mode 100644 vpp/vnet/vnet/interface_format.c create mode 100644 vpp/vnet/vnet/interface_funcs.h create mode 100644 vpp/vnet/vnet/interface_output.c create mode 100644 vpp/vnet/vnet/ip/dir.dox create mode 100644 vpp/vnet/vnet/ip/format.c create mode 100644 vpp/vnet/vnet/ip/format.h create mode 100644 vpp/vnet/vnet/ip/icmp4.c create mode 100644 vpp/vnet/vnet/ip/icmp4.h create mode 100644 vpp/vnet/vnet/ip/icmp46_packet.h create mode 100644 vpp/vnet/vnet/ip/icmp6.c create mode 100644 vpp/vnet/vnet/ip/icmp6.h create mode 100644 vpp/vnet/vnet/ip/igmp_packet.h create mode 100644 vpp/vnet/vnet/ip/ip.api create mode 100644 vpp/vnet/vnet/ip/ip.h create mode 100644 vpp/vnet/vnet/ip/ip4.h create mode 100644 vpp/vnet/vnet/ip/ip46_cli.c create mode 100644 vpp/vnet/vnet/ip/ip4_error.h create mode 100644 vpp/vnet/vnet/ip/ip4_format.c create mode 100644 vpp/vnet/vnet/ip/ip4_forward.c create mode 100644 vpp/vnet/vnet/ip/ip4_input.c create mode 100644 vpp/vnet/vnet/ip/ip4_mtrie.c create mode 100644 vpp/vnet/vnet/ip/ip4_mtrie.h create mode 100644 vpp/vnet/vnet/ip/ip4_packet.h create mode 100644 vpp/vnet/vnet/ip/ip4_pg.c create mode 100644 vpp/vnet/vnet/ip/ip4_source_and_port_range_check.c create mode 100644 vpp/vnet/vnet/ip/ip4_source_check.c create mode 100644 vpp/vnet/vnet/ip/ip4_test.c create mode 100644 vpp/vnet/vnet/ip/ip6.h create mode 100644 vpp/vnet/vnet/ip/ip6_error.h create mode 100644 vpp/vnet/vnet/ip/ip6_format.c create mode 100644 vpp/vnet/vnet/ip/ip6_forward.c create mode 100644 vpp/vnet/vnet/ip/ip6_hop_by_hop.c create mode 100644 vpp/vnet/vnet/ip/ip6_hop_by_hop.h create mode 100644 vpp/vnet/vnet/ip/ip6_hop_by_hop_packet.h create mode 100644 vpp/vnet/vnet/ip/ip6_input.c create mode 100644 vpp/vnet/vnet/ip/ip6_neighbor.c create mode 100644 vpp/vnet/vnet/ip/ip6_neighbor.h create mode 100644 vpp/vnet/vnet/ip/ip6_packet.h create mode 100644 vpp/vnet/vnet/ip/ip6_pg.c create mode 100644 vpp/vnet/vnet/ip/ip_api.c create mode 100644 vpp/vnet/vnet/ip/ip_checksum.c create mode 100644 vpp/vnet/vnet/ip/ip_frag.c create mode 100644 vpp/vnet/vnet/ip/ip_frag.h create mode 100644 vpp/vnet/vnet/ip/ip_init.c create mode 100644 vpp/vnet/vnet/ip/ip_input_acl.c create mode 100644 vpp/vnet/vnet/ip/ip_packet.h create mode 100644 vpp/vnet/vnet/ip/ip_source_and_port_range_check.h create mode 100644 vpp/vnet/vnet/ip/lookup.c create mode 100644 vpp/vnet/vnet/ip/lookup.h create mode 100644 vpp/vnet/vnet/ip/ping.c create mode 100644 vpp/vnet/vnet/ip/ping.h create mode 100644 vpp/vnet/vnet/ip/ports.def create mode 100644 vpp/vnet/vnet/ip/protocols.def create mode 100644 vpp/vnet/vnet/ip/punt.c create mode 100644 vpp/vnet/vnet/ip/punt.h create mode 100644 vpp/vnet/vnet/ip/punt_error.def create mode 100644 vpp/vnet/vnet/ip/tcp_packet.h create mode 100644 vpp/vnet/vnet/ip/udp.h create mode 100644 vpp/vnet/vnet/ip/udp_error.def create mode 100644 vpp/vnet/vnet/ip/udp_format.c create mode 100644 vpp/vnet/vnet/ip/udp_init.c create mode 100644 vpp/vnet/vnet/ip/udp_local.c create mode 100644 vpp/vnet/vnet/ip/udp_packet.h create mode 100644 vpp/vnet/vnet/ip/udp_pg.c create mode 100644 vpp/vnet/vnet/ipsec-gre/dir.dox create mode 100644 vpp/vnet/vnet/ipsec-gre/error.def create mode 100644 vpp/vnet/vnet/ipsec-gre/interface.c create mode 100644 vpp/vnet/vnet/ipsec-gre/ipsec_gre.c create mode 100644 vpp/vnet/vnet/ipsec-gre/ipsec_gre.h create mode 100644 vpp/vnet/vnet/ipsec-gre/ipsec_gre_doc.md create mode 100644 vpp/vnet/vnet/ipsec-gre/node.c create mode 100644 vpp/vnet/vnet/ipsec/esp.h create mode 100644 vpp/vnet/vnet/ipsec/esp_decrypt.c create mode 100644 vpp/vnet/vnet/ipsec/esp_encrypt.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2.h create mode 100644 vpp/vnet/vnet/ipsec/ikev2_cli.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2_crypto.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2_format.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2_payload.c create mode 100644 vpp/vnet/vnet/ipsec/ikev2_priv.h create mode 100644 vpp/vnet/vnet/ipsec/ipsec.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec.h create mode 100644 vpp/vnet/vnet/ipsec/ipsec_cli.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_format.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_if.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_if_in.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_if_out.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_input.c create mode 100644 vpp/vnet/vnet/ipsec/ipsec_output.c create mode 100644 vpp/vnet/vnet/l2/dir.dox create mode 100644 vpp/vnet/vnet/l2/feat_bitmap.c create mode 100644 vpp/vnet/vnet/l2/feat_bitmap.h create mode 100644 vpp/vnet/vnet/l2/l2.api create mode 100644 vpp/vnet/vnet/l2/l2_api.c create mode 100644 vpp/vnet/vnet/l2/l2_bd.c create mode 100644 vpp/vnet/vnet/l2/l2_bd.h create mode 100644 vpp/vnet/vnet/l2/l2_bvi.c create mode 100644 vpp/vnet/vnet/l2/l2_bvi.h create mode 100644 vpp/vnet/vnet/l2/l2_classify.h create mode 100644 vpp/vnet/vnet/l2/l2_efp_filter.c create mode 100644 vpp/vnet/vnet/l2/l2_efp_filter.h create mode 100644 vpp/vnet/vnet/l2/l2_fib.c create mode 100644 vpp/vnet/vnet/l2/l2_fib.h create mode 100644 vpp/vnet/vnet/l2/l2_flood.c create mode 100644 vpp/vnet/vnet/l2/l2_flood.h create mode 100644 vpp/vnet/vnet/l2/l2_fwd.c create mode 100644 vpp/vnet/vnet/l2/l2_fwd.h create mode 100644 vpp/vnet/vnet/l2/l2_input.c create mode 100644 vpp/vnet/vnet/l2/l2_input.h create mode 100644 vpp/vnet/vnet/l2/l2_input_acl.c create mode 100644 vpp/vnet/vnet/l2/l2_input_classify.c create mode 100644 vpp/vnet/vnet/l2/l2_input_vtr.c create mode 100644 vpp/vnet/vnet/l2/l2_input_vtr.h create mode 100644 vpp/vnet/vnet/l2/l2_learn.c create mode 100644 vpp/vnet/vnet/l2/l2_learn.h create mode 100644 vpp/vnet/vnet/l2/l2_output.c create mode 100644 vpp/vnet/vnet/l2/l2_output.h create mode 100644 vpp/vnet/vnet/l2/l2_output_acl.c create mode 100644 vpp/vnet/vnet/l2/l2_output_classify.c create mode 100644 vpp/vnet/vnet/l2/l2_patch.c create mode 100644 vpp/vnet/vnet/l2/l2_rw.c create mode 100644 vpp/vnet/vnet/l2/l2_rw.h create mode 100644 vpp/vnet/vnet/l2/l2_vtr.c create mode 100644 vpp/vnet/vnet/l2/l2_vtr.h create mode 100644 vpp/vnet/vnet/l2/l2_xcrw.c create mode 100644 vpp/vnet/vnet/l2/l2_xcrw.h create mode 100644 vpp/vnet/vnet/l2tp/decap.c create mode 100644 vpp/vnet/vnet/l2tp/encap.c create mode 100644 vpp/vnet/vnet/l2tp/l2tp.c create mode 100644 vpp/vnet/vnet/l2tp/l2tp.h create mode 100644 vpp/vnet/vnet/l2tp/packet.h create mode 100644 vpp/vnet/vnet/l2tp/pg.c create mode 100644 vpp/vnet/vnet/l3_types.h create mode 100644 vpp/vnet/vnet/lawful-intercept/lawful_intercept.c create mode 100644 vpp/vnet/vnet/lawful-intercept/lawful_intercept.h create mode 100644 vpp/vnet/vnet/lawful-intercept/node.c create mode 100644 vpp/vnet/vnet/lisp-cp/control.c create mode 100644 vpp/vnet/vnet/lisp-cp/control.h create mode 100644 vpp/vnet/vnet/lisp-cp/gid_dictionary.c create mode 100644 vpp/vnet/vnet/lisp-cp/gid_dictionary.h create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_cp_dpo.c create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_cp_dpo.h create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_cp_messages.h create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_msg_serdes.c create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_msg_serdes.h create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_types.c create mode 100644 vpp/vnet/vnet/lisp-cp/lisp_types.h create mode 100644 vpp/vnet/vnet/lisp-cp/packets.c create mode 100644 vpp/vnet/vnet/lisp-cp/packets.h create mode 100644 vpp/vnet/vnet/lisp-gpe/decap.c create mode 100644 vpp/vnet/vnet/lisp-gpe/dir.dox create mode 100644 vpp/vnet/vnet/lisp-gpe/interface.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_adjacency.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_error.def create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_packet.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_sub_interface.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_sub_interface.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_tenant.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_tenant.h create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c create mode 100644 vpp/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.h create mode 100644 vpp/vnet/vnet/lisp-gpe/rfc.txt create mode 100644 vpp/vnet/vnet/llc/llc.c create mode 100644 vpp/vnet/vnet/llc/llc.h create mode 100644 vpp/vnet/vnet/llc/node.c create mode 100644 vpp/vnet/vnet/llc/pg.c create mode 100644 vpp/vnet/vnet/lldp/dir.dox create mode 100644 vpp/vnet/vnet/lldp/lldp_cli.c create mode 100644 vpp/vnet/vnet/lldp/lldp_doc.md create mode 100644 vpp/vnet/vnet/lldp/lldp_input.c create mode 100644 vpp/vnet/vnet/lldp/lldp_node.c create mode 100644 vpp/vnet/vnet/lldp/lldp_node.h create mode 100644 vpp/vnet/vnet/lldp/lldp_output.c create mode 100644 vpp/vnet/vnet/lldp/lldp_protocol.h create mode 100755 vpp/vnet/vnet/map/examples/gen-rules.py create mode 100644 vpp/vnet/vnet/map/examples/health_check.c create mode 100755 vpp/vnet/vnet/map/examples/test_map.py create mode 100755 vpp/vnet/vnet/map/gen-rules.py create mode 100644 vpp/vnet/vnet/map/ip4_map.c create mode 100644 vpp/vnet/vnet/map/ip4_map_t.c create mode 100644 vpp/vnet/vnet/map/ip6_map.c create mode 100644 vpp/vnet/vnet/map/ip6_map_t.c create mode 100644 vpp/vnet/vnet/map/map.api create mode 100644 vpp/vnet/vnet/map/map.c create mode 100644 vpp/vnet/vnet/map/map.h create mode 100644 vpp/vnet/vnet/map/map_api.c create mode 100644 vpp/vnet/vnet/map/map_doc.md create mode 100644 vpp/vnet/vnet/map/map_dpo.c create mode 100644 vpp/vnet/vnet/map/map_dpo.h create mode 100644 vpp/vnet/vnet/map/test.c create mode 100644 vpp/vnet/vnet/mcast/mcast.c create mode 100644 vpp/vnet/vnet/mcast/mcast.h create mode 100644 vpp/vnet/vnet/mcast/mcast_test.c create mode 100644 vpp/vnet/vnet/misc.c create mode 100644 vpp/vnet/vnet/mpls/error.def create mode 100644 vpp/vnet/vnet/mpls/interface.c create mode 100644 vpp/vnet/vnet/mpls/mpls.c create mode 100644 vpp/vnet/vnet/mpls/mpls.h create mode 100644 vpp/vnet/vnet/mpls/mpls_features.c create mode 100644 vpp/vnet/vnet/mpls/mpls_lookup.c create mode 100644 vpp/vnet/vnet/mpls/mpls_output.c create mode 100644 vpp/vnet/vnet/mpls/mpls_tunnel.c create mode 100644 vpp/vnet/vnet/mpls/mpls_tunnel.h create mode 100644 vpp/vnet/vnet/mpls/mpls_types.h create mode 100644 vpp/vnet/vnet/mpls/node.c create mode 100644 vpp/vnet/vnet/mpls/packet.h create mode 100644 vpp/vnet/vnet/mpls/pg.c create mode 100644 vpp/vnet/vnet/osi/node.c create mode 100644 vpp/vnet/vnet/osi/osi.c create mode 100644 vpp/vnet/vnet/osi/osi.h create mode 100644 vpp/vnet/vnet/osi/pg.c create mode 100644 vpp/vnet/vnet/pg/cli.c create mode 100644 vpp/vnet/vnet/pg/edit.c create mode 100644 vpp/vnet/vnet/pg/edit.h create mode 100644 vpp/vnet/vnet/pg/example.script create mode 100644 vpp/vnet/vnet/pg/init.c create mode 100644 vpp/vnet/vnet/pg/input.c create mode 100644 vpp/vnet/vnet/pg/output.c create mode 100644 vpp/vnet/vnet/pg/pg.h create mode 100644 vpp/vnet/vnet/pg/stream.c create mode 100644 vpp/vnet/vnet/pipeline.h create mode 100644 vpp/vnet/vnet/plugin/p1.c create mode 100644 vpp/vnet/vnet/plugin/plugin.h create mode 100644 vpp/vnet/vnet/policer/node_funcs.c create mode 100644 vpp/vnet/vnet/policer/police.h create mode 100644 vpp/vnet/vnet/policer/policer.c create mode 100644 vpp/vnet/vnet/policer/policer.h create mode 100644 vpp/vnet/vnet/policer/xlate.c create mode 100644 vpp/vnet/vnet/policer/xlate.h create mode 100644 vpp/vnet/vnet/ppp/error.def create mode 100644 vpp/vnet/vnet/ppp/node.c create mode 100644 vpp/vnet/vnet/ppp/packet.h create mode 100644 vpp/vnet/vnet/ppp/pg.c create mode 100644 vpp/vnet/vnet/ppp/ppp.c create mode 100644 vpp/vnet/vnet/ppp/ppp.h create mode 100644 vpp/vnet/vnet/replication.c create mode 100644 vpp/vnet/vnet/replication.h create mode 100644 vpp/vnet/vnet/rewrite.c create mode 100644 vpp/vnet/vnet/rewrite.h create mode 100644 vpp/vnet/vnet/snap/node.c create mode 100644 vpp/vnet/vnet/snap/pg.c create mode 100644 vpp/vnet/vnet/snap/snap.c create mode 100644 vpp/vnet/vnet/snap/snap.h create mode 100644 vpp/vnet/vnet/span/node.c create mode 100644 vpp/vnet/vnet/span/span.api create mode 100644 vpp/vnet/vnet/span/span.c create mode 100644 vpp/vnet/vnet/span/span.h create mode 100644 vpp/vnet/vnet/span/span.md create mode 100644 vpp/vnet/vnet/span/span_api.c create mode 100644 vpp/vnet/vnet/sr/dir.dox create mode 100644 vpp/vnet/vnet/sr/examples/sr_multicastmap.script create mode 100644 vpp/vnet/vnet/sr/rfc_draft_05.txt create mode 100644 vpp/vnet/vnet/sr/sr.c create mode 100644 vpp/vnet/vnet/sr/sr.h create mode 100644 vpp/vnet/vnet/sr/sr_error.def create mode 100644 vpp/vnet/vnet/sr/sr_fix_dst_error.def create mode 100644 vpp/vnet/vnet/sr/sr_packet.h create mode 100644 vpp/vnet/vnet/sr/sr_replicate.c create mode 100644 vpp/vnet/vnet/srp/format.c create mode 100644 vpp/vnet/vnet/srp/interface.c create mode 100644 vpp/vnet/vnet/srp/node.c create mode 100644 vpp/vnet/vnet/srp/packet.h create mode 100644 vpp/vnet/vnet/srp/pg.c create mode 100644 vpp/vnet/vnet/srp/srp.h create mode 100644 vpp/vnet/vnet/unix/gdb_funcs.c create mode 100644 vpp/vnet/vnet/unix/pcap.c create mode 100644 vpp/vnet/vnet/unix/pcap.h create mode 100644 vpp/vnet/vnet/unix/pcap2pg.c create mode 100644 vpp/vnet/vnet/unix/tap.api create mode 100644 vpp/vnet/vnet/unix/tap_api.c create mode 100644 vpp/vnet/vnet/unix/tapcli.c create mode 100644 vpp/vnet/vnet/unix/tapcli.h create mode 100644 vpp/vnet/vnet/unix/tuntap.c create mode 100644 vpp/vnet/vnet/unix/tuntap.h create mode 100644 vpp/vnet/vnet/vnet.h create mode 100644 vpp/vnet/vnet/vnet_all_api_h.h create mode 100644 vpp/vnet/vnet/vnet_msg_enum.h create mode 100644 vpp/vnet/vnet/vxlan-gpe/decap.c create mode 100644 vpp/vnet/vnet/vxlan-gpe/dir.dox create mode 100644 vpp/vnet/vnet/vxlan-gpe/encap.c create mode 100644 vpp/vnet/vnet/vxlan-gpe/vxlan-gpe-rfc.txt create mode 100644 vpp/vnet/vnet/vxlan-gpe/vxlan_gpe.c create mode 100644 vpp/vnet/vnet/vxlan-gpe/vxlan_gpe.h create mode 100644 vpp/vnet/vnet/vxlan-gpe/vxlan_gpe_error.def create mode 100644 vpp/vnet/vnet/vxlan-gpe/vxlan_gpe_packet.h create mode 100644 vpp/vnet/vnet/vxlan/decap.c create mode 100644 vpp/vnet/vnet/vxlan/dir.dox create mode 100644 vpp/vnet/vnet/vxlan/encap.c create mode 100644 vpp/vnet/vnet/vxlan/vxlan.c create mode 100644 vpp/vnet/vnet/vxlan/vxlan.h create mode 100644 vpp/vnet/vnet/vxlan/vxlan_error.def create mode 100644 vpp/vnet/vnet/vxlan/vxlan_packet.h create mode 100644 vpp/vpp-api-test/Makefile.am create mode 100644 vpp/vpp-api-test/configure.ac create mode 100755 vpp/vpp-api-test/scripts/vppctl create mode 100644 vpp/vpp-api-test/vat/api_format.c create mode 100644 vpp/vpp-api-test/vat/json_format.c create mode 100644 vpp/vpp-api-test/vat/json_format.h create mode 100644 vpp/vpp-api-test/vat/json_test.c create mode 100644 vpp/vpp-api-test/vat/main.c create mode 100644 vpp/vpp-api-test/vat/plugin.c create mode 100644 vpp/vpp-api-test/vat/plugin.h create mode 100644 vpp/vpp-api-test/vat/plugin_api.c create mode 100644 vpp/vpp-api-test/vat/restart.c create mode 100644 vpp/vpp-api-test/vat/vat.h create mode 100644 vpp/vpp-api/Makefile.am create mode 100644 vpp/vpp-api/configure.ac create mode 100644 vpp/vpp-api/java/Makefile.am create mode 100644 vpp/vpp-api/java/Readme.txt create mode 100644 vpp/vpp-api/java/configure.ac create mode 100644 vpp/vpp-api/java/jvpp-common/jvpp_common.c create mode 100644 vpp/vpp-api/java/jvpp-common/jvpp_common.h create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackApiTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeNotificationTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackJVppFacadeTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CallbackNotificationApiTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/ControlPingTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/CreateSubInterfaceTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiNotificationTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/FutureApiTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/L2AclTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/LispAdjacencyTest.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/NotificationUtils.java create mode 100644 vpp/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/test/Readme.txt create mode 100644 vpp/vpp-api/java/jvpp-core/jvpp_core.c create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/JVpp.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/JVppRegistry.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/JVppRegistryImpl.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/NativeLibraryLoader.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/VppBaseCallException.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/VppCallbackException.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/VppConnection.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/VppInvocationException.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/VppJNIConnection.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/callback/ControlPingCallback.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/callback/JVppCallback.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/callback/JVppNotificationCallback.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/ControlPing.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/ControlPingReply.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppDump.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppNotification.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppReply.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppReplyDump.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppRequest.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/AbstractFutureJVppInvoker.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistry.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistryProvider.java create mode 100644 vpp/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/test/ConnectionTest.java create mode 100644 vpp/vpp-api/java/jvpp-registry/jvpp_registry.c create mode 100755 vpp/vpp-api/java/jvpp/gen/jvpp_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/__init__.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/jni_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/notification_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/types_gen.py create mode 100644 vpp/vpp-api/java/jvpp/gen/jvppgen/util.py create mode 100644 vpp/vpp-api/java/m4/ax_check_java_home.m4 create mode 100644 vpp/vpp-api/java/m4/ax_check_java_plugin.m4 create mode 100644 vpp/vpp-api/java/m4/ax_java_check_class.m4 create mode 100644 vpp/vpp-api/java/m4/ax_java_options.m4 create mode 100644 vpp/vpp-api/java/m4/ax_libgcj_jar.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_jar.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_java.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_java_cc.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_java_works.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_javac.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_javac_works.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_javadoc.m4 create mode 100644 vpp/vpp-api/java/m4/ax_prog_javah.m4 create mode 100644 vpp/vpp-api/java/m4/ax_try_compile_java.m4 create mode 100644 vpp/vpp-api/java/m4/ax_try_run_java.m4 create mode 100644 vpp/vpp-api/lua/README.md create mode 100644 vpp/vpp-api/lua/bench.lua create mode 100644 vpp/vpp-api/lua/examples/cli/README.md create mode 100644 vpp/vpp-api/lua/examples/cli/lua-cli.lua create mode 100644 vpp/vpp-api/lua/examples/example-acl-plugin.lua create mode 100644 vpp/vpp-api/lua/examples/example-classifier.lua create mode 100644 vpp/vpp-api/lua/examples/example-cli.lua create mode 100644 vpp/vpp-api/lua/examples/lute/README.md create mode 100644 vpp/vpp-api/lua/examples/lute/lute.lua create mode 100644 vpp/vpp-api/lua/examples/lute/script-inout-acl-noacl.lute create mode 100644 vpp/vpp-api/lua/examples/lute/script-inout-acl-old.lute create mode 100644 vpp/vpp-api/lua/examples/lute/script-inout-acl.lute create mode 100644 vpp/vpp-api/lua/examples/lute/script.lute create mode 100644 vpp/vpp-api/lua/examples/lute/sessions-acl.lute create mode 100644 vpp/vpp-api/lua/vpp-lapi.lua create mode 100644 vpp/vpp-api/python/Makefile.am create mode 100644 vpp/vpp-api/python/README.rst create mode 100644 vpp/vpp-api/python/pneum/pneum.c create mode 100644 vpp/vpp-api/python/pneum/pneum.h create mode 100644 vpp/vpp-api/python/pneum/test_pneum.c create mode 100644 vpp/vpp-api/python/setup.cfg create mode 100644 vpp/vpp-api/python/setup.py create mode 100755 vpp/vpp-api/python/tests/test_cli.py create mode 100755 vpp/vpp-api/python/tests/test_modules.py create mode 100755 vpp/vpp-api/python/tests/test_papi.py create mode 100755 vpp/vpp-api/python/tests/test_version.py create mode 100755 vpp/vpp-api/python/tests/test_vpp_papi2.py create mode 100644 vpp/vpp-api/python/vpp_papi/__init__.py create mode 100644 vpp/vpp-api/python/vpp_papi/pneum_wrap.c create mode 100644 vpp/vpp-api/python/vpp_papi/vpp_papi.py create mode 100644 vpp/vpp/Makefile.am create mode 100644 vpp/vpp/app/l2t.c create mode 100644 vpp/vpp/app/l2t_l2.c create mode 100644 vpp/vpp/app/sticky_hash.c create mode 100644 vpp/vpp/app/version.c create mode 100644 vpp/vpp/app/vpe_cli.c create mode 100644 vpp/vpp/conf/80-vpp.conf create mode 100644 vpp/vpp/conf/startup.conf create mode 100644 vpp/vpp/conf/startup.uiopcigeneric.conf create mode 100644 vpp/vpp/configure.ac create mode 100644 vpp/vpp/oam/oam.c create mode 100644 vpp/vpp/oam/oam.h create mode 100644 vpp/vpp/stats/stats.c create mode 100644 vpp/vpp/stats/stats.h create mode 120000 vpp/vpp/suffix-rules.mk create mode 100644 vpp/vpp/vnet/main.c create mode 100644 vpp/vpp/vpp-api/api.c create mode 100644 vpp/vpp/vpp-api/custom_dump.c create mode 100644 vpp/vpp/vpp-api/gmon.c create mode 100644 vpp/vpp/vpp-api/summary_stats_client.c create mode 100644 vpp/vpp/vpp-api/test_client.c create mode 100644 vpp/vpp/vpp-api/test_ha.c create mode 100644 vpp/vpp/vpp-api/vpe.api create mode 100644 vpp/vpp/vpp-api/vpe_all_api_h.h create mode 100644 vpp/vpp/vpp-api/vpe_msg_enum.h create mode 100644 vpp/vpp/vpp-api/vpp_get_metrics.c create mode 100644 vpp/vppapigen/Makefile.am create mode 100644 vpp/vppapigen/configure.ac create mode 100644 vpp/vppapigen/gram.y create mode 100644 vpp/vppapigen/lex.c create mode 100644 vpp/vppapigen/lex.h create mode 100644 vpp/vppapigen/node.c create mode 100644 vpp/vppapigen/node.h create mode 100644 vpp/vppinfra/.gitignore create mode 100644 vpp/vppinfra/INSTALL create mode 100644 vpp/vppinfra/Make.defs create mode 100644 vpp/vppinfra/Makefile.am create mode 100644 vpp/vppinfra/README create mode 100644 vpp/vppinfra/configure.ac create mode 100644 vpp/vppinfra/dir.dox create mode 100755 vpp/vppinfra/mkinstalldirs create mode 100644 vpp/vppinfra/tools/dir.dox create mode 100644 vpp/vppinfra/tools/elftool.c create mode 100644 vpp/vppinfra/unix_error.def create mode 100644 vpp/vppinfra/vppinfra/anneal.c create mode 100644 vpp/vppinfra/vppinfra/anneal.h create mode 100644 vpp/vppinfra/vppinfra/asm_mips.h create mode 100644 vpp/vppinfra/vppinfra/asm_x86.c create mode 100644 vpp/vppinfra/vppinfra/asm_x86.h create mode 100644 vpp/vppinfra/vppinfra/backtrace.c create mode 100644 vpp/vppinfra/vppinfra/bihash_24_8.h create mode 100644 vpp/vppinfra/vppinfra/bihash_8_8.h create mode 100644 vpp/vppinfra/vppinfra/bihash_doc.h create mode 100644 vpp/vppinfra/vppinfra/bihash_template.c create mode 100644 vpp/vppinfra/vppinfra/bihash_template.h create mode 100644 vpp/vppinfra/vppinfra/bitmap.h create mode 100644 vpp/vppinfra/vppinfra/bitops.h create mode 100644 vpp/vppinfra/vppinfra/byte_order.h create mode 100644 vpp/vppinfra/vppinfra/cache.h create mode 100644 vpp/vppinfra/vppinfra/clib.h create mode 100644 vpp/vppinfra/vppinfra/cpu.c create mode 100644 vpp/vppinfra/vppinfra/cpu.h create mode 100644 vpp/vppinfra/vppinfra/dir.dox create mode 100644 vpp/vppinfra/vppinfra/dlist.h create mode 100644 vpp/vppinfra/vppinfra/elf.c create mode 100644 vpp/vppinfra/vppinfra/elf.h create mode 100644 vpp/vppinfra/vppinfra/elf_clib.c create mode 100644 vpp/vppinfra/vppinfra/elf_clib.h create mode 100644 vpp/vppinfra/vppinfra/elog.c create mode 100644 vpp/vppinfra/vppinfra/elog.h create mode 100644 vpp/vppinfra/vppinfra/error.c create mode 100644 vpp/vppinfra/vppinfra/error.h create mode 100644 vpp/vppinfra/vppinfra/error_bootstrap.h create mode 100644 vpp/vppinfra/vppinfra/fheap.c create mode 100644 vpp/vppinfra/vppinfra/fheap.h create mode 100644 vpp/vppinfra/vppinfra/fifo.c create mode 100644 vpp/vppinfra/vppinfra/fifo.h create mode 100644 vpp/vppinfra/vppinfra/format.c create mode 100644 vpp/vppinfra/vppinfra/format.h create mode 100644 vpp/vppinfra/vppinfra/graph.c create mode 100644 vpp/vppinfra/vppinfra/graph.h create mode 100644 vpp/vppinfra/vppinfra/hash.c create mode 100644 vpp/vppinfra/vppinfra/hash.h create mode 100644 vpp/vppinfra/vppinfra/heap.c create mode 100644 vpp/vppinfra/vppinfra/heap.h create mode 100644 vpp/vppinfra/vppinfra/longjmp.S create mode 100644 vpp/vppinfra/vppinfra/longjmp.h create mode 100644 vpp/vppinfra/vppinfra/macros.c create mode 100644 vpp/vppinfra/vppinfra/macros.h create mode 100644 vpp/vppinfra/vppinfra/math.h create mode 100644 vpp/vppinfra/vppinfra/md5.c create mode 100644 vpp/vppinfra/vppinfra/md5.h create mode 100644 vpp/vppinfra/vppinfra/mem.h create mode 100644 vpp/vppinfra/vppinfra/mem_mheap.c create mode 100644 vpp/vppinfra/vppinfra/memcheck.h create mode 100644 vpp/vppinfra/vppinfra/memcpy_avx.h create mode 100644 vpp/vppinfra/vppinfra/memcpy_sse3.h create mode 100644 vpp/vppinfra/vppinfra/mhash.c create mode 100644 vpp/vppinfra/vppinfra/mhash.h create mode 100644 vpp/vppinfra/vppinfra/mheap.c create mode 100644 vpp/vppinfra/vppinfra/mheap.h create mode 100644 vpp/vppinfra/vppinfra/mheap_bootstrap.h create mode 100644 vpp/vppinfra/vppinfra/mod_test_hash.c create mode 100644 vpp/vppinfra/vppinfra/os.h create mode 100644 vpp/vppinfra/vppinfra/pfhash.c create mode 100644 vpp/vppinfra/vppinfra/pfhash.h create mode 100644 vpp/vppinfra/vppinfra/phash.c create mode 100644 vpp/vppinfra/vppinfra/phash.h create mode 100644 vpp/vppinfra/vppinfra/pipeline.h create mode 100644 vpp/vppinfra/vppinfra/pool.h create mode 100644 vpp/vppinfra/vppinfra/ptclosure.c create mode 100644 vpp/vppinfra/vppinfra/ptclosure.h create mode 100644 vpp/vppinfra/vppinfra/qhash.c create mode 100644 vpp/vppinfra/vppinfra/qhash.h create mode 100644 vpp/vppinfra/vppinfra/qsort.c create mode 100644 vpp/vppinfra/vppinfra/random.c create mode 100644 vpp/vppinfra/vppinfra/random.h create mode 100644 vpp/vppinfra/vppinfra/random_buffer.c create mode 100644 vpp/vppinfra/vppinfra/random_buffer.h create mode 100644 vpp/vppinfra/vppinfra/random_isaac.c create mode 100644 vpp/vppinfra/vppinfra/random_isaac.h create mode 100644 vpp/vppinfra/vppinfra/serialize.c create mode 100644 vpp/vppinfra/vppinfra/serialize.h create mode 100644 vpp/vppinfra/vppinfra/slist.c create mode 100644 vpp/vppinfra/vppinfra/slist.h create mode 100644 vpp/vppinfra/vppinfra/smp.c create mode 100644 vpp/vppinfra/vppinfra/smp.h create mode 100644 vpp/vppinfra/vppinfra/smp_fifo.c create mode 100644 vpp/vppinfra/vppinfra/smp_fifo.h create mode 100644 vpp/vppinfra/vppinfra/socket.c create mode 100644 vpp/vppinfra/vppinfra/socket.h create mode 100644 vpp/vppinfra/vppinfra/sparse_vec.h create mode 100644 vpp/vppinfra/vppinfra/std-formats.c create mode 100644 vpp/vppinfra/vppinfra/string.c create mode 100644 vpp/vppinfra/vppinfra/string.h create mode 100644 vpp/vppinfra/vppinfra/test_bihash_template.c create mode 100644 vpp/vppinfra/vppinfra/test_dlist.c create mode 100644 vpp/vppinfra/vppinfra/test_elf.c create mode 100644 vpp/vppinfra/vppinfra/test_elog.c create mode 100644 vpp/vppinfra/vppinfra/test_fifo.c create mode 100644 vpp/vppinfra/vppinfra/test_format.c create mode 100644 vpp/vppinfra/vppinfra/test_hash.c create mode 100644 vpp/vppinfra/vppinfra/test_heap.c create mode 100644 vpp/vppinfra/vppinfra/test_longjmp.c create mode 100644 vpp/vppinfra/vppinfra/test_macros.c create mode 100644 vpp/vppinfra/vppinfra/test_md5.c create mode 100644 vpp/vppinfra/vppinfra/test_mheap.c create mode 100644 vpp/vppinfra/vppinfra/test_pfhash.c create mode 100644 vpp/vppinfra/vppinfra/test_phash.c create mode 100644 vpp/vppinfra/vppinfra/test_pool.c create mode 100644 vpp/vppinfra/vppinfra/test_pool_iterate.c create mode 100644 vpp/vppinfra/vppinfra/test_ptclosure.c create mode 100644 vpp/vppinfra/vppinfra/test_qhash.c create mode 100644 vpp/vppinfra/vppinfra/test_random.c create mode 100644 vpp/vppinfra/vppinfra/test_random_isaac.c create mode 100644 vpp/vppinfra/vppinfra/test_serialize.c create mode 100644 vpp/vppinfra/vppinfra/test_slist.c create mode 100644 vpp/vppinfra/vppinfra/test_socket.c create mode 100644 vpp/vppinfra/vppinfra/test_time.c create mode 100644 vpp/vppinfra/vppinfra/test_timing_wheel.c create mode 100644 vpp/vppinfra/vppinfra/test_vec.c create mode 100644 vpp/vppinfra/vppinfra/test_vec.h create mode 100644 vpp/vppinfra/vppinfra/test_vhash.c create mode 100644 vpp/vppinfra/vppinfra/test_zvec.c create mode 100644 vpp/vppinfra/vppinfra/time.c create mode 100644 vpp/vppinfra/vppinfra/time.h create mode 100644 vpp/vppinfra/vppinfra/timer.c create mode 100644 vpp/vppinfra/vppinfra/timer.h create mode 100644 vpp/vppinfra/vppinfra/timing_wheel.c create mode 100644 vpp/vppinfra/vppinfra/timing_wheel.h create mode 100644 vpp/vppinfra/vppinfra/types.h create mode 100644 vpp/vppinfra/vppinfra/unformat.c create mode 100644 vpp/vppinfra/vppinfra/unix-formats.c create mode 100644 vpp/vppinfra/vppinfra/unix-kelog.c create mode 100644 vpp/vppinfra/vppinfra/unix-misc.c create mode 100644 vpp/vppinfra/vppinfra/unix.h create mode 100644 vpp/vppinfra/vppinfra/valgrind.h create mode 100644 vpp/vppinfra/vppinfra/vec.c create mode 100644 vpp/vppinfra/vppinfra/vec.h create mode 100644 vpp/vppinfra/vppinfra/vec_bootstrap.h create mode 100644 vpp/vppinfra/vppinfra/vector.c create mode 100644 vpp/vppinfra/vppinfra/vector.h create mode 100644 vpp/vppinfra/vppinfra/vector_altivec.h create mode 100644 vpp/vppinfra/vppinfra/vector_funcs.h create mode 100644 vpp/vppinfra/vppinfra/vector_iwmmxt.h create mode 100644 vpp/vppinfra/vppinfra/vector_neon.h create mode 100644 vpp/vppinfra/vppinfra/vector_sse2.h create mode 100644 vpp/vppinfra/vppinfra/vhash.c create mode 100644 vpp/vppinfra/vppinfra/vhash.h create mode 100644 vpp/vppinfra/vppinfra/vm_linux_kernel.h create mode 100644 vpp/vppinfra/vppinfra/vm_standalone.h create mode 100644 vpp/vppinfra/vppinfra/vm_unix.h create mode 100644 vpp/vppinfra/vppinfra/xxhash.h create mode 100644 vpp/vppinfra/vppinfra/xy.h create mode 100644 vpp/vppinfra/vppinfra/zvec.c create mode 100644 vpp/vppinfra/vppinfra/zvec.h diff --git a/vpp/.gitignore b/vpp/.gitignore new file mode 100644 index 00000000..c12eedfb --- /dev/null +++ b/vpp/.gitignore @@ -0,0 +1,90 @@ +*~ +*.sw[op] + +/build-root/.ccache +/build-root/build-*/ +/build-root/install-*/ +/build-root/tools +/build-root/dpdk-includes/ +/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 +/dpdk/*.tar.gz +/dpdk/*.tar.xz +/path_setup +/tools/ +# start autotools ignore +autom4te.cache/ +config/ +Makefile +Makefile.in +aclocal.m4 +app.info +compile +config.h +config.h.in +config.log +config.guess +config.sub +config.status +configure +configure.scan +coverage_report +depcomp +install-sh +libtool +m4 +missing +stamp-h1 +ltmain.sh +ylwrap +test-driver + +.cproject +*.iml +.bootstrap.ok +.settings +# stop autotools ignore + +# OSX and some IDE +.DS_Store +.idea/ +.project + +# 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 diff --git a/vpp/.gitreview b/vpp/.gitreview new file mode 100644 index 00000000..3f0281cf --- /dev/null +++ b/vpp/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.fd.io +port=29418 +project=vpp +defaultbranch=stable/1701 diff --git a/vpp/LICENSE b/vpp/LICENSE new file mode 100644 index 00000000..7a4a3ea2 --- /dev/null +++ b/vpp/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. \ No newline at end of file diff --git a/vpp/Makefile b/vpp/Makefile new file mode 100644 index 00000000..31b00196 --- /dev/null +++ b/vpp/Makefile @@ -0,0 +1,375 @@ +# 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. + +WS_ROOT=$(CURDIR) +BR=$(WS_ROOT)/build-root +CCACHE_DIR?=$(BR)/.ccache +GDB?=gdb +PLATFORM?=vpp + +MINIMAL_STARTUP_CONF="unix { interactive }" + +GDB_ARGS= -ex "handle SIGUSR1 noprint nostop" + +# +# OS Detection +# +# We allow Darwin (MacOS) for docs generation; VPP build will still fail. +ifneq ($(shell uname),Darwin) +OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +endif + +DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache +DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd +DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope +DEB_DEPENDS += python-dev python-virtualenv python-pip lcov chrpath autoconf +ifeq ($(OS_VERSION_ID),14.04) + DEB_DEPENDS += openjdk-8-jdk-headless +else + DEB_DEPENDS += default-jdk-headless +endif + +RPM_DEPENDS_GROUPS = 'Development Tools' +RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils +RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel +RPM_DEPENDS += python-devel python-virtualenv lcov chrpath +EPEL_DEPENDS = libconfuse-devel ganglia-devel + +ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),) + STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf +endif + +ifeq ($(findstring y,$(UNATTENDED)),y) +CONFIRM=-y +FORCE=--force-yes +endif + +.PHONY: help bootstrap wipe wipe-release build build-release rebuild rebuild-release +.PHONY: run run-release debug debug-release build-vat run-vat pkg-deb pkg-rpm +.PHONY: ctags cscope plugins plugins-release build-vpp-api +.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe +.PHONY: test-cov test-wipe-cov + +help: + @echo "Make Targets:" + @echo " bootstrap - prepare tree for build" + @echo " install-dep - install software dependencies" + @echo " wipe - wipe all products of debug build " + @echo " wipe-release - wipe all products of release build " + @echo " build - build debug binaries" + @echo " build-release - build release binaries" + @echo " plugins - build debug plugin binaries" + @echo " plugins-release - build release plugin binaries" + @echo " rebuild - wipe and build debug binares" + @echo " rebuild-release - wipe and build release binares" + @echo " run - run debug binary" + @echo " run-release - run release binary" + @echo " debug - run debug binary with debugger" + @echo " debug-release - run release binary with debugger" + @echo " test - build and run functional tests" + @echo " test-debug - build and run functional tests (debug build)" + @echo " test-wipe - wipe files generated by unit tests" + @echo " retest - run functional tests" + @echo " retest-debug - run functional tests (debug build)" + @echo " test-help - show help on test framework" + @echo " build-vat - build vpp-api-test tool" + @echo " build-vpp-api - build vpp-api" + @echo " run-vat - run vpp-api-test tool" + @echo " pkg-deb - build DEB packages" + @echo " pkg-rpm - build RPM packages" + @echo " ctags - (re)generate ctags database" + @echo " gtags - (re)generate gtags database" + @echo " cscope - (re)generate cscope database" + @echo " checkstyle - check coding style" + @echo " fixstyle - fix coding style" + @echo " doxygen - (re)generate documentation" + @echo " bootstrap-doxygen - setup Doxygen dependencies" + @echo " wipe-doxygen - wipe all generated documentation" + @echo " test-doc - generate documentation for test framework" + @echo " test-wipe-doc - wipe documentation for test framework" + @echo " test-cov - generate code coverage report for test framework" + @echo " test-wipe-cov - wipe code coverage report for test framework" + @echo "" + @echo "Make Arguments:" + @echo " V=[0|1] - set build verbosity level" + @echo " STARTUP_CONF= - startup configuration file" + @echo " (e.g. /etc/vpp/startup.conf)" + @echo " STARTUP_DIR= - startup drectory (e.g. /etc/vpp)" + @echo " It also sets STARTUP_CONF if" + @echo " startup.conf file is present" + @echo " GDB= - gdb binary to use for debugging" + @echo " PLATFORM= - target platform. default is vpp" + @echo " TEST= - only run specific test" + @echo "" + @echo "Current Argument Values:" + @echo " V = $(V)" + @echo " STARTUP_CONF = $(STARTUP_CONF)" + @echo " STARTUP_DIR = $(STARTUP_DIR)" + @echo " GDB = $(GDB)" + @echo " PLATFORM = $(PLATFORM)" + @echo " DPDK_VERSION = $(DPDK_VERSION)" + +$(BR)/.bootstrap.ok: +ifeq ($(findstring y,$(UNATTENDED)),y) + make install-dep +endif +ifeq ($(OS_ID),ubuntu) + @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \ + if [ -n "$$MISSING" ] ; then \ + echo "\nPlease install missing packages: \n$$MISSING\n" ; \ + echo "by executing \"make install-dep\"\n" ; \ + exit 1 ; \ + fi ; \ + exit 0 +endif + @echo "SOURCE_PATH = $(WS_ROOT)" > $(BR)/build-config.mk + @echo "#!/bin/bash\n" > $(BR)/path_setup + @echo 'export PATH=$(BR)/tools/ccache-bin:$$PATH' >> $(BR)/path_setup + @echo 'export PATH=$(BR)/tools/bin:$$PATH' >> $(BR)/path_setup + @echo 'export CCACHE_DIR=$(CCACHE_DIR)' >> $(BR)/path_setup + +ifeq ("$(wildcard /usr/bin/ccache )","") + @echo "WARNING: Please install ccache AYEC and re-run this script" +else + @rm -rf $(BR)/tools/ccache-bin + @mkdir -p $(BR)/tools/ccache-bin + @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/gcc + @ln -s /usr/bin/ccache $(BR)/tools/ccache-bin/g++ +endif + @make -C $(BR) V=$(V) is_build_tool=yes vppapigen-install + @touch $@ + +bootstrap: $(BR)/.bootstrap.ok + +install-dep: +ifeq ($(OS_ID),ubuntu) +ifeq ($(OS_VERSION_ID),14.04) + @sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common + @sudo -E add-apt-repository ppa:openjdk-r/ppa $(CONFIRM) +endif + @sudo -E apt-get update + @sudo -E apt-get $(CONFIRM) $(FORCE) install $(DEB_DEPENDS) +else ifneq ("$(wildcard /etc/redhat-release)","") + @sudo yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS) + @sudo yum install $(CONFIRM) $(RPM_DEPENDS) + @sudo yum install $(CONFIRM) --enablerepo=epel $(EPEL_DEPENDS) + @sudo debuginfo-install $(CONFIRM) glibc-2.17-106.el7_2.4.x86_64 openssl-libs-1.0.1e-51.el7_2.4.x86_64 zlib-1.2.7-15.el7.x86_64 +else + $(error "This option currently works only on Ubuntu or Centos systems") +endif + +define make + @make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2) +endef + +$(BR)/scripts/.version: +ifneq ("$(wildcard /etc/redhat-release)","") + $(shell $(BR)/scripts/version rpm-string > $(BR)/scripts/.version) +else + $(shell $(BR)/scripts/version > $(BR)/scripts/.version) +endif + +dist: $(BR)/scripts/.version + $(MAKE) verstring=$(PLATFORM)-$(shell cat $(BR)/scripts/.version) prefix=$(PLATFORM) distversion + +distversion: $(BR)/scripts/.version + $(BR)/scripts/verdist ${BR} ${prefix}-$(shell $(BR)/scripts/version rpm-version) ${verstring} + mv $(verstring).tar.gz $(BR)/rpm + +build: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM)_debug,vpp-install) + +wipedist: + $(RM) $(BR)/scripts/.version $(BR)/rpm/*.tar.gz + +wipe: wipedist $(BR)/.bootstrap.ok + $(call make,$(PLATFORM)_debug,vpp-wipe) + +rebuild: wipe build + +build-release: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM),vpp-install) + +wipe-release: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM),vpp-wipe) + +rebuild-release: wipe-release build-release + +plugins: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM)_debug,plugins-install) + +plugins-release: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM),plugins-install) + +build-vpp-api: $(BR)/.bootstrap.ok + $(call make,$(PLATFORM)_debug,vpp-api-install) + +VPP_PYTHON_PREFIX=$(BR)/python + +define test + $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-api-install plugins-install vpp-install,) + make -C test \ + BR=$(BR) \ + VPP_TEST_BUILD_DIR=$(BR)/build-$(2)-native \ + VPP_TEST_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \ + VPP_TEST_API_TEST_BIN=$(BR)/install-$(2)-native/vpp-api-test/bin/vpp_api_test \ + VPP_TEST_PLUGIN_PATH=$(BR)/install-$(2)-native/plugins/lib64/vpp_plugins \ + VPP_TEST_INSTALL_PATH=$(BR)/install-$(2)-native/ \ + LD_LIBRARY_PATH=$(BR)/install-$(2)-native/vpp-api/lib64/ \ + WS_ROOT=$(WS_ROOT) V=$(V) TEST=$(TEST) VPP_PYTHON_PREFIX=$(VPP_PYTHON_PREFIX) $(3) +endef + +test: bootstrap + $(call test,vpp_lite,vpp_lite,test) + +test-debug: bootstrap + $(call test,vpp_lite,vpp_lite_debug,test) + +test-help: + @make -C test help + +test-wipe: + @make -C test wipe + +test-doc: + @make -C test WS_ROOT=$(WS_ROOT) BR=$(BR) VPP_PYTHON_PREFIX=$(VPP_PYTHON_PREFIX) doc + +test-wipe-doc: + @make -C test wipe-doc BR=$(BR) + +test-cov: bootstrap + $(call test,vpp_lite,vpp_lite_gcov,cov) + +test-wipe-cov: + @make -C test wipe-cov BR=$(BR) + +retest: + $(call test,vpp_lite,vpp_lite,retest) + +retest-debug: + $(call test,vpp_lite,vpp_lite_debug,retest) + +STARTUP_DIR ?= $(PWD) +ifeq ("$(wildcard $(STARTUP_CONF))","") +define run + @echo "WARNING: STARTUP_CONF not defined or file doesn't exist." + @echo " Running with minimal startup config: $(MINIMAL_STARTUP_CONF)\n" + @cd $(STARTUP_DIR) && \ + sudo $(2) $(1)/vpp/bin/vpp $(MINIMAL_STARTUP_CONF) plugin_path $(1)/plugins/lib64/vpp_plugins +endef +else +define run + @cd $(STARTUP_DIR) && \ + sudo $(2) $(1)/vpp/bin/vpp $(shell cat $(STARTUP_CONF) | sed -e 's/#.*//') plugin_path $(1)/plugins/lib64/vpp_plugins +endef +endif + +%.files: .FORCE + @find . \( -name '*\.[chyS]' -o -name '*\.java' -o -name '*\.lex' \) -and \ + \( -not -path './build-root*' -o -path \ + './build-root/build-vpp_debug-native/dpdk*' \) > $@ + +.FORCE: + +run: + $(call run, $(BR)/install-$(PLATFORM)_debug-native) + +run-release: + $(call run, $(BR)/install-$(PLATFORM)-native) + +debug: + $(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args) + +debug-release: + $(call run, $(BR)/install-$(PLATFORM)-native,$(GDB) $(GDB_ARGS) --args) + +build-vat: + $(call make,$(PLATFORM)_debug,vpp-api-test-install) + +run-vat: + @sudo $(BR)/install-$(PLATFORM)_debug-native/vpp-api-test/bin/vpp_api_test + +pkg-deb: + $(call make,$(PLATFORM),install-deb) + +pkg-rpm: dist + $(call make,$(PLATFORM),install-rpm) + +ctags: ctags.files + @ctags --totals --tag-relative -L $< + @rm $< + +gtags: ctags + @gtags --gtagslabel=ctags + +cscope: cscope.files + @cscope -b -q -v + +checkstyle: + @build-root/scripts/checkstyle.sh + +fixstyle: + @build-root/scripts/checkstyle.sh --fix + +# +# Build the documentation +# + +# Doxygen configuration and our utility scripts +export DOXY_DIR ?= $(WS_ROOT)/doxygen + +define make-doxy + @OS_ID="$(OS_ID)" WS_ROOT="$(WS_ROOT)" BR="$(BR)" make -C $(DOXY_DIR) $@ +endef + +.PHONY: bootstrap-doxygen doxygen wipe-doxygen + +bootstrap-doxygen: + $(call make-doxy) + +doxygen: + $(call make-doxy) + +wipe-doxygen: + $(call make-doxy) + +define banner + @echo "========================================================================" + @echo " $(1)" + @echo "========================================================================" + @echo " " +endef + +verify: install-dep $(BR)/.bootstrap.ok + $(call banner,"Building for PLATFORM=vpp using gcc") + @make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages + $(call banner,"Building for PLATFORM=vpp_lite using gcc") + @make -C build-root PLATFORM=vpp_lite TAG=vpp_lite wipe-all install-packages +ifeq ($(OS_ID),ubuntu) +ifeq ($(OS_VERSION_ID),16.04) + $(call banner,"Installing dependencies") + @sudo -E apt-get update + @sudo -E apt-get $(CONFIRM) $(FORCE) install clang + $(call banner,"Building for PLATFORM=vpp using clang") + @make -C build-root CC=clang PLATFORM=vpp TAG=vpp_clang wipe-all install-packages +endif + $(call banner,"Building deb packages") + @make pkg-deb +endif +ifeq ($(OS_ID),centos) + $(call banner,"Building rpm packages") + @make pkg-rpm +endif + + diff --git a/vpp/README.md b/vpp/README.md new file mode 100644 index 00000000..cf43a4df --- /dev/null +++ b/vpp/README.md @@ -0,0 +1,102 @@ +Vector Packet Processing +======================== + +## 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 +of Cisco's Vector Packet Processing (VPP) technology: a high performance, +packet-processing stack that can run on commodity CPUs. + +The benefits of this implementation of VPP are its high performance, proven +technology, its modularity and flexibility, and rich feature set. + +For more information on VPP and its features please visit the +[FD.io website](http://fd.io/) and +[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 name | Description +---------------------- | ------------------------------------------- + build-data | Build metadata + build-root | Build output directory + doxygen | Documentation generator configuration + dpdk | DPDK patches and build infrastructure + g2 | Event log visualization tool + perftool | Performance tool +@ref plugins | VPP bundled plugins directory +@ref svm | Shared virtual memory allocation library + test | Unit tests +@ref vlib | VPP application library source +@ref vlib-api | VPP API library source +@ref vnet | VPP networking source +@ref vpp | VPP application source +@ref vpp-api | VPP application API source + vppapigen | VPP API generator source + vpp-api-test | VPP API test program source +@ref vppinfra | VPP core library source + +(If the page you are viewing is not generated by Doxygen then +ignore any @@ref labels in the above table.) + + +## Getting started + +In general anyone interested in building, developing or running VPP should +consult the [VPP wiki](https://wiki.fd.io/view/VPP) for more complete +documentation. + +In particular, readers are recommended to take a look at [Pulling, Building, +Running, Hacking, Pushing](https://wiki.fd.io/view/VPP/Pulling,_Building,_Run +ning,_Hacking_and_Pushing_VPP_Code) which provides extensive step-by-step +coverage of the topic. + +For the impatient, some salient information is distilled below. + + +### Quick-start: On an existing Linux host + +To install system dependencies, build VPP and then install it, simply run the +build script. This should be performed a non-privileged user with `sudo` +access from the project base directory: + + ./build-root/vagrant/build.sh + +If you want a more fine-grained approach because you intend to do some +development work, the `Makefile` in the root directory of the source tree +provides several convenience shortcuts as `make` targets that may be of +interest. To see the available targets run: + + make + + +### 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. +This VM can then be used to test concepts with VPP or as a development +platform to extend VPP. Some obvious caveats apply when using a VM for VPP +since its performance will never match that of bare metal; if your work is +timing or performance sensitive, consider using bare metal in addition or +instead of the VM. + +For this to work you will need a working installation of Vagrant. Instructions +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. + +Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more +advanced building strategies and development notes. diff --git a/vpp/RELEASE.md b/vpp/RELEASE.md new file mode 100644 index 00000000..d86cfd69 --- /dev/null +++ b/vpp/RELEASE.md @@ -0,0 +1,280 @@ +# Release Notes {#release_notes} + +* @subpage release_notes_17011 +* @subpage release_notes_1701 +* @subpage release_notes_1609 +* @subpage release_notes_1606 + +@page release_notes_17011 Release notes for VPP 17.01.1 + +This is bug fix release. + +For the full list of fixed issues please reffer to: +- fd.io [JIRA](https://jira.fd.io) +- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701) + +@page release_notes_1701 Release notes for VPP 17.01 + +@note This release was for a while known as 16.12. + +## Features + +- [Integrated November 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_11.html) + +- Complete rework of Forwarding Information Base (FIB) + +- Performance Improvements + - Improvements in DPDK input and output nodes + - Improvements in L2 path + - Improvmeents in IPv4 lookup node + +- Feature Arcs Improvements + - Consolidation of the code + - New feature arcs + - device-input + - interface-output + +- DPDK Cryptodev Support + - Software and Hardware Crypto Support + +- DPDK HQoS support + +- Simple Port Analyzer (SPAN) + +- Bidirectional Forwarding Detection + - Basic implementation + +- IPFIX Improvements + +- L2 GRE over IPSec tunnels + +- Link Layer Discovery Protocol (LLDP) + +- Vhost-user Improvements + - Performance Improvements + - Multiqueue + - Reconnect + +- LISP Enhancements + - Source/Dest control plane support + - L2 over LISP and GRE + - Map-Register/Map-Notify/RLOC-probing support + - L2 API improvements, overall code hardening + +- Plugins: + - New: ACL + - New: Flow per Packet + - Improved: SNAT + - Mutlithreading + - Flow export + +- Doxygen Enhancements + +- Luajit API bindings + +- API Refactoring + - file split + - message signatures + +- Python and Scapy based unit testing infrastructure + - Infrastructure + - Various tests + +- Packet Generator improvements + +- TUN/TAP jumbo frames support + +- Other various bug fixes and improvements + +## Known issues + +For the full list of issues please reffer to fd.io [JIRA](https://jira.fd.io). + +## Issues fixed + +For the full list of fixed issues please reffer to: +- fd.io [JIRA](https://jira.fd.io) +- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701) + +@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. + diff --git a/vpp/build-data/packages/cavium-dpdk.mk b/vpp/build-data/packages/cavium-dpdk.mk new file mode 100644 index 00000000..ce8ee228 --- /dev/null +++ b/vpp/build-data/packages/cavium-dpdk.mk @@ -0,0 +1,55 @@ +# Temporary until Cavium upstreams their work + +cavium-dpdk_configure = \ + src_dir=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \ + dst_dir=$(PACKAGE_BUILD_DIR) ; \ + tar -C $${src_dir} -cf - . | tar -C $${dst_dir} -xf - ; \ + cd $${dst_dir} ; \ + : colossal hemorrhoid to configure headroom ; \ + if [ x$($(PACKAGE)_configure_args_$(PLATFORM)) = "x" ] ; then \ + HR=256 ; \ + else \ + dpdk_configure_args=$($(PACKAGE)_configure_args_$(PLATFORM)) ; \ + if [ $$dpdk_configure_args = "--with-headroom=256" ] ; then \ + HR=256 ; \ + elif [ $$dpdk_configure_args = "--with-headroom=384" ] ; then \ + HR=384 ; \ + else \ + HR=256 ; \ + fi ; \ + fi ; \ + env HR=$$HR \ + spp -o \ + $(PACKAGE_BUILD_DIR)/config/common_linuxapp \ + $(PACKAGE_BUILD_DIR)/config/common_linuxapp.spp \ + ; \ + env $(CONFIGURE_ENV) \ + make config T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \ + CC=aarch64-thunderx-linux-gnu-gcc V=0 \ + RTE_SDK=$(PACKAGE_BUILD_DIR) \ + RTE_TARGET=arm-default-linuxapp-gcc + +# Note: add e.g. "-O0" to EXTRA_CFLAGS if desired: EXTRA_CFLAGS='-g -O0' + +cavium-dpdk_make_args = install T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \ + CC=aarch64-thunderx-linux-gnu-gcc V=0 \ + RTE_SDK=$(PACKAGE_BUILD_DIR) \ + RTE_TARGET=arm-default-linuxapp-gcc + +cavium-dpdk_install = \ + src_dir=$(PACKAGE_BUILD_DIR) ; \ + dst_dir=$(PACKAGE_INSTALL_DIR) ; \ + tar -h -C $${src_dir}/arm64-thunderx-linuxapp-gcc -cf - . \ + | tar -C $${dst_dir} -xf - + +# dpdk libraries end up in .../lib not .../lib64. Fix it. +cavium-dpdk_post_install = \ + if [ "$(arch_lib_dir)" != "lib" ] ; then \ + mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) ; \ + cd $(PACKAGE_INSTALL_DIR)/lib ; \ + tar cf - . | ( cd $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir); tar xf - ) ; \ + fi + +# nothing to install, all static libraries +cavium-dpdk_image_include = echo + diff --git a/vpp/build-data/packages/dpdk.mk b/vpp/build-data/packages/dpdk.mk new file mode 100644 index 00000000..a529e365 --- /dev/null +++ b/vpp/build-data/packages/dpdk.mk @@ -0,0 +1,44 @@ + +DPDK_MARCH = $(strip $($(PLATFORM)_dpdk_arch)) +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 + DPDK_DEBUG=n +endif + +DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \ + DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \ + DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \ + DPDK_MARCH=$(DPDK_MARCH) \ + DPDK_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 + +dpdk_make_args = $(DPDK_MAKE_ARGS) config + +dpdk_install = make $(DPDK_MAKE_ARGS) build diff --git a/vpp/build-data/packages/g2.mk b/vpp/build-data/packages/g2.mk new file mode 100644 index 00000000..258eff1d --- /dev/null +++ b/vpp/build-data/packages/g2.mk @@ -0,0 +1,5 @@ +g2_configure_depend = vppinfra-install + +g2_CPPFLAGS = $(call installed_includes_fn, vppinfra) + +g2_LDFLAGS = $(call installed_libs_fn, vppinfra) diff --git a/vpp/build-data/packages/gmod.mk b/vpp/build-data/packages/gmod.mk new file mode 100644 index 00000000..a6ba42d0 --- /dev/null +++ b/vpp/build-data/packages/gmod.mk @@ -0,0 +1,9 @@ +gmod_configure_depend = vppinfra-install svm-install + +gmod_configure_args = --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/ganglia + +gmod_CPPFLAGS = $(call installed_includes_fn, vppinfra svm) +gmod_CPPFLAGS += -I/usr/include/apr-1.0 -I/usr/include/apr-1 -I/usr/include +gmod_LDFLAGS = $(call installed_libs_fn, vppinfra svm) + +gmod_image_include = echo $(arch_lib_dir)/ganglia/libgmodvpp.so etc diff --git a/vpp/build-data/packages/perftool.mk b/vpp/build-data/packages/perftool.mk new file mode 100644 index 00000000..300f902b --- /dev/null +++ b/vpp/build-data/packages/perftool.mk @@ -0,0 +1,5 @@ +perftool_configure_depend = vppinfra-install + +perftool_CPPFLAGS = $(call installed_includes_fn, vppinfra) + +perftool_LDFLAGS = $(call installed_libs_fn, vppinfra) diff --git a/vpp/build-data/packages/plugins.mk b/vpp/build-data/packages/plugins.mk new file mode 100644 index 00000000..44a8e2bd --- /dev/null +++ b/vpp/build-data/packages/plugins.mk @@ -0,0 +1,45 @@ +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 diff --git a/vpp/build-data/packages/svm.mk b/vpp/build-data/packages/svm.mk new file mode 100644 index 00000000..3971fe82 --- /dev/null +++ b/vpp/build-data/packages/svm.mk @@ -0,0 +1,5 @@ +svm_top_srcdir = $(call find_source_fn,svm) +svm_configure_depend = vppinfra-install + +svm_CPPFLAGS = $(call installed_includes_fn, vppinfra) +svm_LDFLAGS = $(call installed_libs_fn, vppinfra) diff --git a/vpp/build-data/packages/vlib-api-cavium-dpdk.mk b/vpp/build-data/packages/vlib-api-cavium-dpdk.mk new file mode 100644 index 00000000..7a4fe2cd --- /dev/null +++ b/vpp/build-data/packages/vlib-api-cavium-dpdk.mk @@ -0,0 +1,6 @@ +vlib-api-cavium-dpdk_source = vlib-api + +vlib-api-cavium-dpdk_configure_depend = vppinfra-install svm-install vlib-cavium-dpdk-install + +vlib-api-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib-cavium-dpdk) +vlib-api-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib-cavium-dpdk) diff --git a/vpp/build-data/packages/vlib-api.mk b/vpp/build-data/packages/vlib-api.mk new file mode 100644 index 00000000..29b0d17d --- /dev/null +++ b/vpp/build-data/packages/vlib-api.mk @@ -0,0 +1,4 @@ +vlib-api_configure_depend = vppinfra-install svm-install vlib-install + +vlib-api_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib) +vlib-api_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib) diff --git a/vpp/build-data/packages/vlib-cavium-dpdk.mk b/vpp/build-data/packages/vlib-cavium-dpdk.mk new file mode 100644 index 00000000..0f2f132d --- /dev/null +++ b/vpp/build-data/packages/vlib-cavium-dpdk.mk @@ -0,0 +1,7 @@ +vlib-cavium-dpdk_source = vlib +vlib-cavium-dpdk_configure_depend = vppinfra-install cavium-dpdk-install + +vlib-cavium-dpdk_configure_args += --with-dpdk + +vlib-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra cavium-dpdk) +vlib-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra cavium-dpdk) diff --git a/vpp/build-data/packages/vlib.mk b/vpp/build-data/packages/vlib.mk new file mode 100644 index 00000000..2172708d --- /dev/null +++ b/vpp/build-data/packages/vlib.mk @@ -0,0 +1,16 @@ +vlib_configure_depend = vppinfra-install + +vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra) +vlib_LDFLAGS = $(call installed_libs_fn, vppinfra) + +ifneq ($($(PLATFORM)_uses_dpdk),no) +vlib_configure_args += --with-dpdk +ifeq ($($(PLATFORM)_uses_external_dpdk),yes) +vlib_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir) +vlib_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir) +else +vlib_configure_depend += dpdk-install +vlib_CPPFLAGS += $(call installed_includes_fn, dpdk) +vlib_LDFLAGS += $(call installed_libs_fn, dpdk) +endif +endif diff --git a/vpp/build-data/packages/vnet-cavium-dpdk.mk b/vpp/build-data/packages/vnet-cavium-dpdk.mk new file mode 100644 index 00000000..4c35b04d --- /dev/null +++ b/vpp/build-data/packages/vnet-cavium-dpdk.mk @@ -0,0 +1,29 @@ +vnet-cavium-dpdk_source = vnet + +vnet-cavium-dpdk_configure_depend = \ + vppinfra-install \ + cavium-dpdk-install \ + svm-install \ + vlib-api-cavium-dpdk-install \ + vlib-cavium-dpdk-install + + +vnet-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + cavium-dpdk \ + openssl \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk) + +vnet-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + cavium-dpdk \ + openssl \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk) + +# Platform dependent configure flags +vnet-cavium-dpdk_configure_args += $(vnet-cavium-dpdk_configure_args_$(PLATFORM)) + diff --git a/vpp/build-data/packages/vnet.mk b/vpp/build-data/packages/vnet.mk new file mode 100644 index 00000000..399ca1b4 --- /dev/null +++ b/vpp/build-data/packages/vnet.mk @@ -0,0 +1,44 @@ +vnet_configure_depend = \ + vppinfra-install \ + svm-install \ + vlib-api-install \ + vlib-install + +vnet_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api) + +vnet_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api) + +ifeq ($($(PLATFORM)_enable_tests),yes) +vnet_configure_args += --enable-tests +endif + +# Platform dependent configure flags +vnet_configure_args += $(vnet_configure_args_$(PLATFORM)) + +# include & link with openssl only if needed +ifneq ($($(PLATFORM)_uses_openssl),no) +vnet_CPPFLAGS += $(call installed_includes_fn, openssl) +vnet_LDFLAGS += $(call installed_libs_fn, openssl) +endif + +ifneq ($($(PLATFORM)_uses_dpdk),no) +ifeq ($($(PLATFORM)_uses_external_dpdk),yes) +vnet_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir) +vnet_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir) +else +vnet_configure_depend += dpdk-install +vnet_CPPFLAGS += $(call installed_includes_fn, dpdk) +vnet_LDFLAGS += $(call installed_libs_fn, dpdk) +endif +ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes) +vnet_configure_args += --with-dpdk-crypto +endif +endif diff --git a/vpp/build-data/packages/vpp-api-test-cavium-dpdk.mk b/vpp/build-data/packages/vpp-api-test-cavium-dpdk.mk new file mode 100644 index 00000000..e352317f --- /dev/null +++ b/vpp/build-data/packages/vpp-api-test-cavium-dpdk.mk @@ -0,0 +1,32 @@ +vpp-api-test-cavium-dpdk_source = vpp-api-test + +vpp-api-test-cavium-dpdk_configure_depend = \ + vppinfra-install \ + cavium-dpdk-install \ + svm-install \ + vlib-api-cavium-dpdk-install \ + vlib-cavium-dpdk-install \ + vnet-cavium-dpdk-install \ + vpp-cavium-dpdk-install + +# +vpp-api-test-cavium-dpdk_configure_args = --with-dpdk + +vpp-api-test-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + cavium-dpdk \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk \ + vnet-cavium-dpdk \ + vpp-cavium-dpdk) + +vpp-api-test-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + cavium-dpdk \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk \ + vnet-cavium-dpdk \ + vpp-cavium-dpdk) + diff --git a/vpp/build-data/packages/vpp-api-test.mk b/vpp/build-data/packages/vpp-api-test.mk new file mode 100644 index 00000000..c9eae367 --- /dev/null +++ b/vpp/build-data/packages/vpp-api-test.mk @@ -0,0 +1,39 @@ +vpp-api-test_configure_depend = \ + vppinfra-install \ + svm-install \ + vlib-api-install \ + vlib-install \ + vnet-install \ + vpp-install + +vpp-api-test_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet \ + vpp) + +vpp-api-test_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet \ + vpp) + +ifneq ($($(PLATFORM)_uses_dpdk),no) +vpp-api-test_configure_args = --with-dpdk +ifeq ($($(PLATFORM)_uses_external_dpdk),yes) +vpp-api-test_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir) +vpp-api-test_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir) +else +vpp-api-test_configure_depend += dpdk-install +vpp-api-test_CPPFLAGS += $(call installed_includes_fn, dpdk) +vpp-api-test_LDFLAGS += $(call installed_libs_fn, dpdk) +endif +endif +ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes) +vpp-api-test_configure_args += --with-dpdk-crypto +endif + diff --git a/vpp/build-data/packages/vpp-api.mk b/vpp/build-data/packages/vpp-api.mk new file mode 100644 index 00000000..4937023a --- /dev/null +++ b/vpp/build-data/packages/vpp-api.mk @@ -0,0 +1,23 @@ +vpp-api_configure_depend = \ + vppinfra-install \ + svm-install \ + vlib-api-install \ + vlib-install \ + vnet-install \ + vpp-install + +vpp-api_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet \ + vpp) + +vpp-api_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api) + +vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include diff --git a/vpp/build-data/packages/vpp-cavium-dpdk.mk b/vpp/build-data/packages/vpp-cavium-dpdk.mk new file mode 100644 index 00000000..704e3a95 --- /dev/null +++ b/vpp/build-data/packages/vpp-cavium-dpdk.mk @@ -0,0 +1,30 @@ +vpp-cavium-dpdk_source = vpp + +vpp-cavium-dpdk_configure_depend = \ + vppinfra-install \ + cavium-dpdk-install \ + svm-install \ + vlib-api-cavium-dpdk-install \ + vlib-cavium-dpdk-install \ + vnet-cavium-dpdk-install + +# Platform dependent configure flags +vpp-cavium-dpdk_configure_args += $(vpp-cavium-dpdk_configure_args_$(PLATFORM)) + +vpp-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + cavium-dpdk \ + openssl \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk \ + vnet-cavium-dpdk) + +vpp-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + cavium-dpdk \ + openssl \ + svm \ + vlib-cavium-dpdk \ + vlib-api-cavium-dpdk \ + vnet-cavium-dpdk) diff --git a/vpp/build-data/packages/vpp-platform-scripts.mk b/vpp/build-data/packages/vpp-platform-scripts.mk new file mode 100644 index 00000000..792d6005 --- /dev/null +++ b/vpp/build-data/packages/vpp-platform-scripts.mk @@ -0,0 +1 @@ +# diff --git a/vpp/build-data/packages/vpp.mk b/vpp/build-data/packages/vpp.mk new file mode 100644 index 00000000..6831c6b8 --- /dev/null +++ b/vpp/build-data/packages/vpp.mk @@ -0,0 +1,51 @@ +vpp_configure_depend = \ + vppinfra-install \ + svm-install \ + vlib-api-install \ + vlib-install \ + vnet-install \ + +# +ifeq ($($(PLATFORM)_dpdk_shared_lib),yes) +vpp_configure_args = --enable-dpdk-shared +else +vpp_configure_args = +endif + +# Platform dependent configure flags +vpp_configure_args += $(vpp_configure_args_$(PLATFORM)) + + +vpp_CPPFLAGS = $(call installed_includes_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet) + +vpp_LDFLAGS = $(call installed_libs_fn, \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet) + +# include & link with openssl only if needed +ifneq ($($(PLATFORM)_uses_openssl),no) +vpp_CPPFLAGS += $(call installed_includes_fn, openssl) +vpp_LDFLAGS += $(call installed_libs_fn, openssl) +endif + +ifneq ($($(PLATFORM)_uses_dpdk),no) +ifeq ($($(PLATFORM)_uses_external_dpdk),yes) +vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir) +vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir) +else +vpp_configure_depend += dpdk-install +vpp_CPPFLAGS += $(call installed_includes_fn, dpdk) +vpp_LDFLAGS += $(call installed_libs_fn, dpdk) +endif +ifeq ($($(PLATFORM)_uses_dpdk_cryptodev),yes) +vpp_configure_args += --with-dpdk-crypto +endif +endif diff --git a/vpp/build-data/packages/vppinfra.mk b/vpp/build-data/packages/vppinfra.mk new file mode 100644 index 00000000..6ca6eb24 --- /dev/null +++ b/vpp/build-data/packages/vppinfra.mk @@ -0,0 +1,5 @@ + +ifeq ($($(PLATFORM)_enable_tests),yes) +vppinfra_configure_args += --enable-tests +endif + diff --git a/vpp/build-data/platforms.mk b/vpp/build-data/platforms.mk new file mode 100644 index 00000000..a568c7a0 --- /dev/null +++ b/vpp/build-data/platforms.mk @@ -0,0 +1,105 @@ +# 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. + +# Pick up per-platform makefile fragments +$(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \ + $(eval -include $(d)/platforms/*.mk)) + +.PHONY: install-deb +install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) + @$(BUILD_ENV) ; \ + set -eu$(BUILD_DEBUG) ; \ + $(MAKE) -C $(MU_BUILD_ROOT_DIR) \ + $(patsubst %,%-install, \ + $(ROOT_PACKAGES)) || exit 1; \ + \ + : generate file manifests ; \ + find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \ + | 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 ; \ + \ + : bin package needs startup config ; \ + echo ../../vpp/conf/startup.conf /etc/vpp \ + >> deb/debian/vpp.install ; \ + \ + : and sysctl config ; \ + echo ../../vpp/conf/80-vpp.conf /etc/sysctl.d \ + >> 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; \ + \ + : generate changelog; \ + ./scripts/generate-deb-changelog \ + \ + : Go fabricate the actual Debian packages ; \ + ( \ + cd deb && \ + dpkg-buildpackage -us -uc -b \ + ) + +.PHONY: install-rpm +install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) + @$(BUILD_ENV) ; \ + set -eu$(BUILD_DEBUG) ; \ + $(MAKE) -C $(MU_BUILD_ROOT_DIR) \ + $(patsubst %,%-install, \ + $(ROOT_PACKAGES)) || exit 1; \ + \ + cd rpm ; \ + 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 ; \ + mv $$(find RPMS -name \*.rpm -type f) .. + diff --git a/vpp/build-data/platforms/arm32.mk b/vpp/build-data/platforms/arm32.mk new file mode 100644 index 00000000..7b80061b --- /dev/null +++ b/vpp/build-data/platforms/arm32.mk @@ -0,0 +1,45 @@ +# 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. + +# vector packet processor +arm32_arch = native +arm32_native_tools = vppapigen + +arm32_uses_dpdk = yes +arm32_uses_openssl = no + +arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \ + jvpp 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" + + +arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \ + -fstack-protector-all -fPIC -Werror +arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \ + -fstack-protector-all -fPIC -Werror + +arm32_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \ + -fstack-protector -fPIC -Werror +arm32_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \ + -fstack-protector -fPIC -Werror diff --git a/vpp/build-data/platforms/dpaa2.mk b/vpp/build-data/platforms/dpaa2.mk new file mode 100644 index 00000000..0ec627a4 --- /dev/null +++ b/vpp/build-data/platforms/dpaa2.mk @@ -0,0 +1,66 @@ +# 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 + + diff --git a/vpp/build-data/platforms/qppc.mk b/vpp/build-data/platforms/qppc.mk new file mode 100644 index 00000000..244747e7 --- /dev/null +++ b/vpp/build-data/platforms/qppc.mk @@ -0,0 +1,34 @@ +# Qemu "p-series" powerpc64 + +qppc_os = linux-gnu + +qppc_cross_ldflags = \ + -Wl,--dynamic-linker=/lib64/ld64.so.1 + +qppc_arch = powerpc + +qppc_root_packages = vppinfra vlib vlib-api vnet svm \ + vpp vpp-api-test + +vnet_configure_args_qppc = \ + --without-ipsec --without-ipv6sr + +vpp_configure_args_qppc = \ + --without-ipsec --without-ipv6sr + +vlib_configure_args_qppc = --with-pre-data=128 + +qppc_march=powerpc64 + +# native tool chain additions for this platform +qppc_native_tools = vppapigen + +qppc_uses_dpdk = no + +qppc_debug_TAG_CFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec +qppc_debug_TAG_LDFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec + +qppc_TAG_CFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec +qppc_TAG_LDFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec + + diff --git a/vpp/build-data/platforms/thunder.mk b/vpp/build-data/platforms/thunder.mk new file mode 100644 index 00000000..f891f4a1 --- /dev/null +++ b/vpp/build-data/platforms/thunder.mk @@ -0,0 +1,36 @@ +# Override OS so we can use the sdk toolchain instead of building one +thunder_os = thunderx-linux-gnu + +# Override CROSS_LDFLAGS so we can use +# /lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 instead of building glibc +thunder_cross_ldflags = \ + -Wl,--dynamic-linker=/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 \ + -Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR) + +thunder_arch = aarch64 +# suppress -march=foo, the cross compiler doesn't understand it +thunder_march = " " + +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 + +vpp-cavium-dpdk_configure_args_thunder = \ + --with-dpdk --without-ipsec --without-ipv6sr + +cavium-dpdk_configure_args_thunder = --with-headroom=256 + +vlib-cavium-dpdk_configure_args_thunder = --with-pre-data=128 + +# native tool chain additions for this platform +thunder_native_tools = vppapigen + +thunder_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG +thunder_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG + +thunder_TAG_CFLAGS = -g -O2 +thunder_TAG_LDFLAGS = -g -O2 + + diff --git a/vpp/build-data/platforms/vpp.mk b/vpp/build-data/platforms/vpp.mk new file mode 100644 index 00000000..15d4dc39 --- /dev/null +++ b/vpp/build-data/platforms/vpp.mk @@ -0,0 +1,68 @@ +# 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 +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 + +# Uncoment to enable building unit tests +# vpp_enable_tests = yes + +vpp_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \ + vpp-api gmod plugins + +vpp_configure_args_vpp = --with-dpdk +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 +# vpp_dpdk_shared_lib = yes + +vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \ + -fstack-protector-all -fPIC -Werror +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) \ + -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) \ + -fstack-protector -fPIC -Werror + +vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \ + -fPIC -Werror -fprofile-arcs -ftest-coverage +vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \ + -fPIC -Werror -coverage diff --git a/vpp/build-data/platforms/vpp_lite.mk b/vpp/build-data/platforms/vpp_lite.mk new file mode 100644 index 00000000..ef2ec444 --- /dev/null +++ b/vpp/build-data/platforms/vpp_lite.mk @@ -0,0 +1,51 @@ +# 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. + +# 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 = + +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) \ + -fstack-protector -fPIC -Werror +vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \ + -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 diff --git a/vpp/build-data/suffix-rules.mk b/vpp/build-data/suffix-rules.mk new file mode 100644 index 00000000..e3eeb922 --- /dev/null +++ b/vpp/build-data/suffix-rules.mk @@ -0,0 +1,27 @@ +# 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 $@ diff --git a/vpp/build-root/Makefile b/vpp/build-root/Makefile new file mode 100644 index 00000000..6e26e90e --- /dev/null +++ b/vpp/build-root/Makefile @@ -0,0 +1,1171 @@ +# 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. + +# +# Copyright (c) 2007-2008 Eliot Dresselhaus +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +###################################################################### +# Collect makefile fragments +###################################################################### + +# Scripts require non-POSIX parts of bash +SHELL := /bin/bash + +# Where this makefile lives +MU_BUILD_ROOT_DIR = $(shell pwd) +MU_BUILD_NAME = $(shell basename $(MU_BUILD_ROOT_DIR)) + +# Search path (e.g. multiple directories) where sources are found. +SOURCE_PATH = + +# Pick up user's definitions for variables e.g. SOURCE_PATH, etc. +-include build-config.mk + +MU_BUILD_ROOT_NAME = $(shell basename $(MU_BUILD_ROOT_DIR)) +MU_BUILD_DATA_DIR_NAME = build-data + +ABSOLUTE_SOURCE_PATH = $(foreach d,$(SOURCE_PATH),$(shell cd $(d) && pwd)) + +SOURCE_PATH_BUILD_ROOT_DIRS = $(addsuffix /$(MU_BUILD_NAME),$(ABSOLUTE_SOURCE_PATH)) +SOURCE_PATH_BUILD_DATA_DIRS = $(addsuffix /$(MU_BUILD_DATA_DIR_NAME),$(ABSOLUTE_SOURCE_PATH)) + +# For tools use build-root as source path, otherwise use given source path +FIND_SOURCE_PATH = \ + $(if $(is_build_tool), \ + $(SOURCE_PATH_BUILD_ROOT_DIRS) $(MU_BUILD_ROOT_DIR), \ + $(SOURCE_PATH_BUILD_DATA_DIRS)) + +# First search given source path, then default to build-root +FULL_SOURCE_PATH = $(SOURCE_PATH_BUILD_DATA_DIRS) $(MU_BUILD_ROOT_DIR) + +# Misc functions +is_in_fn = $(strip $(filter $(1),$(2))) +last_fn = $(lastword $1) +chop_fn = $(wordlist 2,$(words $1),x $1) +uniq_fn = $(strip $(if $1,$(call uniq_fn,$(call chop_fn,$1)) \ + $(if $(filter $(call last_fn,$1),$(call chop_fn,$1)),,$(call last_fn,$1)))) +ifdef3_fn = $(if $(patsubst undefined,,$(origin $(1))),$(3),$(2)) +ifdef_fn = $(call ifdef3_fn,$(1),$(2),$($(1))) + +_mu_debug = $(warning "$(1) = $($(1))") + +$(foreach d,$(FIND_SOURCE_PATH), \ + $(eval _mu_package_mk_in_$(d) = $(shell find $(d)/packages/*.mk 2> /dev/null)) \ + $(eval _mu_srcdirs_in_$(d) = \ + $(shell find $(d)/.. \ + -maxdepth 1 \ + -type d \ + -and -not -name ".." \ + -and -not -name $(MU_BUILD_ROOT_NAME) \ + -and -not -name $(MU_BUILD_DATA_DIR_NAME))) \ + $(eval _mu_non_package_files_in_$(d) = \ + $(shell find $(d)/packages \ + -type f \ + -and -not -name '*.mk' \ + -and -not -name '*~' 2> /dev/null)) \ + $(foreach p,$(patsubst %.mk,%,$(notdir $(_mu_package_mk_in_$(d)))), \ + $(eval _mu_package_dir_$(p) = $(d)) \ + $(eval _mu_package_mk_$(p) = $(d)/packages/$(p).mk) \ + ) \ + $(foreach p,$(notdir $(_mu_srcdirs_in_$(d))), \ + $(eval _mu_package_srcdir_$(p) = $(shell cd $(d)/../$(p) && pwd)) \ + ) \ +) + +# Find root directory for package based on presence of package .mk +# makefile fragment on source path. +_find_build_data_dir_for_package_fn = $(shell \ + set -eu$(BUILD_DEBUG) ; \ + for d in $(FIND_SOURCE_PATH) ; do \ + f="$${d}/packages/$(1).mk" ; \ + [[ -f $${f} ]] && echo `cd $${d} && pwd` && exit 0 ; \ + done ; \ + echo "") +find_build_data_dir_for_package_fn = $(call ifdef_fn,_mu_package_dir_$(1),) + +# dir/PACKAGE +_find_source_fn = $(shell \ + set -eu$(BUILD_DEBUG) ; \ + d="$(call find_build_data_dir_for_package_fn,$(1))" ; \ + [[ -n "$${d}" ]] && d="$${d}/../$(1)" ; \ + echo "$${d}") +find_source_fn = $(call ifdef3_fn,_mu_package_dir_$(1),,$(_mu_package_dir_$(1))/../$(1)) + +# Find given FILE in source path as build-data/packages/FILE +find_package_file_fn = $(shell \ + set -eu$(BUILD_DEBUG) ; \ + d="$(call find_build_data_dir_for_package_fn,$(1))" ; \ + [[ -n "$${d}" ]] && d="$${d}/packages/$(2)" ; \ + [[ -f "$${d}" ]] && echo "$${d}") + +# Find first FILE in source path with name PATH/build-data/FILE +find_build_data_file_fn = $(shell \ + set -eu$(BUILD_DEBUG) ; \ + for d in $(FIND_SOURCE_PATH) ; do \ + f="$${d}/$(1)" ; \ + [[ -f $${f} ]] && echo `cd $${d} && pwd`/$(1) && exit 0 ; \ + done ; \ + echo "") + +###################################################################### +# ARCH, PLATFORM +###################################################################### + +NATIVE_ARCH = $(shell gcc -dumpmachine | sed -e 's/\([a-zA-Z_0-9]*\)-.*/\1/') + +# Find all platforms.mk that we can, including those from build-root +$(foreach d,$(FULL_SOURCE_PATH), \ + $(eval -include $(d)/platforms.mk)) + +# Platform should be defined somewhere by specifying $($(PLATFORM)_arch) +ARCH = $(strip $($(PLATFORM)_arch)) +ifeq ($(ARCH),) + $(error "Unknown platform `$(PLATFORM)'") +endif + +# map e.g. ppc7450 -> ppc +BASIC_ARCH = \ + ${shell case '$(ARCH)' in \ + (native) echo $(NATIVE_ARCH) ;; \ + (i*86*) echo i386 ;; \ + (ppc*|powerpc*) echo ppc ;; \ + (*) echo '$(ARCH)' ;; \ + esac } + +# x86_64 can be either 32/64. set BIACH=32 to get 32 bit libraries. +BIARCH = 64 + +x86_64_libdir = $(BIARCH) +native_libdir = $($(NATIVE_ARCH)_libdir) + +# lib or lib64 depending +arch_lib_dir = lib$($(BASIC_ARCH)_libdir) + +# OS to configure for. configure --host will be set to $(ARCH)-$(OS) +# Allow per-platform overrides + +OS = $(strip $($(PLATFORM)_os)) +ifeq ($(OS),) + OS = mu-linux +endif + +spu_target = spu +native_target = + +is_native = $(if $(ARCH:native=),,true) +not_native = $(if $(ARCH:native=),true,) + +ARCH_TARGET_tmp = $(call ifdef_fn,$(ARCH)_target,$(ARCH)-$(OS)) +TARGET = $(call ifdef_fn,$(PLATFORM)_target,$(ARCH_TARGET_tmp)) +TARGET_PREFIX = $(if $(not_native),$(TARGET)-,) + +# CPU microarchitecture detection. +# Either set _march in build-data/platforms/.mk, +# or detect and use the build-host instruction set + +MARCH = $(strip $($(PLATFORM)_march)) +ifeq ($(MARCH),) + ifneq ($(wildcard $(TOOL_INSTALL_DIR)/bin/$(TARGET)-gcc),) + TARGET_GCC = $(TOOL_INSTALL_DIR)/bin/$(TARGET)-gcc + else ifneq ($(wildcard $(MU_BUILD_ROOT_DIR)/tools/bin/$(TARGET)-gcc),) + TARGET_GCC = $(MU_BUILD_ROOT_DIR)/tools/bin/$(TARGET)-gcc + endif + ifneq ($(TARGET_GCC),) + MARCH = $(shell $(TARGET_GCC) -Q --help=target -march=native | grep march | sed -e 's/.*march=[[:space:]]*//') + else + MARCH = native + endif +else + ifeq ($(MARCH),nehalem) + override MARCH = corei7 + else ifeq ($(MARCH),westmere) + override MARCH = corei7 + else ifeq ($(MARCH),sandybridge) + override MARCH = corei7-avx + else ifeq ($(MARCH),ivybridge) + override MARCH = core-avx-i + else ifeq ($(MARCH),haswell) + override MARCH = core-avx2 + endif +endif +export MARCH + +MTUNE = $(strip $($(PLATFORM)_mtune)) +ifeq ($(MTUNE),) + MTUNE = generic +endif + +###################################################################### +# Generic build stuff +###################################################################### + +# The package we are currently working on +PACKAGE = $* + +# Build/install tags. This lets you have different CFLAGS/CPPFLAGS/LDFLAGS +# for e.g. debug versus optimized compiles. Each tag has its own set of build/install +# areas. +TAG = +TAG_PREFIX = $(if $(TAG),$(TAG)-) + +# yes you need the space +tag_var_with_added_space_fn = $(if $($(TAG)_TAG_$(1)),$($(TAG)_TAG_$(1)) ) + +# TAG=debug for debugging +debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \ + -fstack-protector-all -fPIC +debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \ + -fstack-protector-all -fPIC + +BUILD_PREFIX_package = build-$(TAG_PREFIX) +BUILD_PREFIX_tool = build-tool-$(TAG_PREFIX) +INSTALL_PREFIX = install-$(TAG_PREFIX) +IMAGES_PREFIX = images-$(TAG_PREFIX) + +# Whether we are building a tool or not +tool_or_package_fn = $(if $(is_build_tool),tool,package) + +# Directory where packages are built & installed +BUILD_DIR = $(MU_BUILD_ROOT_DIR)/$(BUILD_PREFIX_$(call tool_or_package_fn))$(ARCH) + +## BURT +# we will deprecate INSTALL_DIR shortly for DFLT_INSTALL_DIR +INSTALL_DIR = $(MU_BUILD_ROOT_DIR)/$(INSTALL_PREFIX)$(ARCH) +# DFLT_INSTALL_DIR used in platforms.mk for $(PLATFORM)_DESTDIR_BASE +DFLT_INSTALL_DIR := $(MU_BUILD_ROOT_DIR)/$(INSTALL_PREFIX)$(ARCH) +## BURT + +PLATFORM_IMAGE_DIR = $(MU_BUILD_ROOT_DIR)/$(IMAGES_PREFIX)$(PLATFORM) + +# $(call VAR,DEFAULT) +override_var_with_default_fn = $(if $($(1)),$($(1)),$(2)) + +# $(call if_directory_exists_fn,D1,D2) returns D1 if it exists else D2 +define if_directory_exists_fn +$(shell if test -d $(1); then echo $(1); else echo $(2); fi) +endef + +# $(call if_file_exists_fn,F1,F2) returns F1 if it exists else F2 +define if_file_exists_fn +$(shell if test -f $(1); then echo $(1); else echo $(2); fi) +endef + +# Default VAR, package specified override of default PACKAGE_VAR +package_var_fn = $(call override_var_with_default_fn,$(1)_$(2),$(1)) + +package_build_dir_fn = $(call package_var_fn,$(1),build_dir) + +package_install_dir_fn = \ + $(if $(is_build_tool),$(TOOL_INSTALL_DIR),$(INSTALL_DIR)/$(call package_build_dir_fn,$(1))) + +PACKAGE_BUILD_DIR = \ + $(BUILD_DIR)/$(call package_build_dir_fn,$(PACKAGE)) +PACKAGE_INSTALL_DIR = \ + $(call package_install_dir_fn,$(PACKAGE)) + +# Tools (gcc, binutils, glibc...) are installed here +TOOL_INSTALL_DIR = $(MU_BUILD_ROOT_DIR)/tools + +# Target specific tools go here e.g. mu-build/tools/ppc-mu-linux +TARGET_TOOL_INSTALL_DIR = $(TOOL_INSTALL_DIR)/$(TARGET) + +# Set BUILD_DEBUG to vx or x enable shell command tracing. +BUILD_DEBUG = + +# Message from build system itself (as opposed to make or shell commands) +build_msg_fn = echo "@@@@ $(1) @@@@" + +# Allow CCACHE_DIR to be overridden, e.g. in .../build-root/build-config.mk +ifeq ($(CCACHE_DIR),) + CCACHE_DIR=$(MU_BUILD_ROOT_DIR)/.ccache +endif + +# Always prefer our own tools to those installed on system. +# Note: ccache-bin must be before tool bin. +BUILD_ENV = \ + export CCACHE_DIR=$(CCACHE_DIR) ; \ + export PATH=$(TOOL_INSTALL_DIR)/ccache-bin:$(TOOL_INSTALL_DIR)/bin:$${PATH} ; \ + export PATH="`echo $${PATH} | sed -e s/[.]://`" ; \ + $(if $(not_native),export CONFIG_SITE=$(MU_BUILD_ROOT_DIR)/config.site ;,) \ + export LD_LIBRARY_PATH=$(TOOL_INSTALL_DIR)/lib64:$(TOOL_INSTALL_DIR)/lib ; \ + set -eu$(BUILD_DEBUG) ; \ + set -o pipefail + +###################################################################### +# Package build generic definitions +###################################################################### + +package_dir_fn = \ + $(call find_build_data_dir_for_package_fn,$(1))/packages + +package_mk_fn = $(call package_dir_fn,$(1))/$(1).mk + +### BURT + +#next version +#pkgPhaseDependMacro = $(foreach x,configure build install, \ + $(eval $(1)_$(x)_depend := $($(1)_depend:%=%-$(x)))) +#version equivalent to original code +pkgPhaseDependMacro = $(eval $(1)_configure_depend := $($(1)_depend:%=%-install)) + +### BURT + +# Pick up built-root/pre-package-include.mk for all source directories +$(foreach d,$(SOURCE_PATH_BUILD_ROOT_DIRS), \ + $(eval -include $(d)/pre-package-include.mk)) + +$(foreach d,$(addsuffix /packages,$(FIND_SOURCE_PATH)), \ + $(eval -include $(d)/*.mk) \ + $(eval ALL_PACKAGES += $(patsubst $(d)/%.mk,%,$(wildcard $(d)/*.mk))) \ +) + +# Pick up built-root/post-package-include.mk for all source directories +$(foreach d,$(SOURCE_PATH_BUILD_ROOT_DIRS), \ + $(eval -include $(d)/post-package-include.mk)) + +# Linux specific native build tools +NATIVE_TOOLS_LINUX = \ + e2fsimage \ + e2fsprogs \ + fakeroot \ + jffs2 \ + mkimage \ + zlib \ + xz \ + squashfs + +IS_LINUX = $(if $(findstring no,$($(PLATFORM)_uses_linux)),no,yes) + +NATIVE_TOOLS_$(IS_LINUX) += $(NATIVE_TOOLS_LINUX) + +# only build glibc for linux installs +CROSS_TOOLS_$(IS_LINUX) += glibc gcc + +# must be first for bootstrapping +NATIVE_TOOLS = findutils make + +# basic tools needed for build system +NATIVE_TOOLS += git automake autoconf libtool texinfo bison flex tar + +# needed to compile gcc +NATIVE_TOOLS += mpfr gmp mpc + +# Tool to sign binaries +NATIVE_TOOLS += sign + +# ccache +NATIVE_TOOLS += ccache + +# Tools needed on native host to build for platform +NATIVE_TOOLS += $(call ifdef_fn,$(PLATFORM)_native_tools,) + +# Tools for cross-compiling from native -> ARCH +CROSS_TOOLS = binutils gcc-bootstrap gdb + +# Tools needed on native host to build for platform +CROSS_TOOLS += $(call ifdef_fn,$(PLATFORM)_cross_tools,) + +NATIVE_TOOLS += $(NATIVE_TOOLS_yes) +CROSS_TOOLS += $(CROSS_TOOLS_yes) + +timestamp_name_fn = .mu_build_$(1)_timestamp +CONFIGURE_TIMESTAMP = $(call timestamp_name_fn,configure) +BUILD_TIMESTAMP = $(call timestamp_name_fn,build) +INSTALL_TIMESTAMP = $(call timestamp_name_fn,install) + +TIMESTAMP_DIR = $(PACKAGE_BUILD_DIR) + +find_newer_files_fn = \ + "`for i in $(2) ; do \ + [[ -f $$i && $$i -nt $(1) ]] && echo "$$i" && exit 0; \ + done ; \ + exit 0;`" + +find_filter = -not -name '*~' +find_filter += -and -not -path '*/.git*' +find_filter += -and -not -path '*/.svn*' +find_filter += -and -not -path '*/.CVS*' +find_filter += -and -not -path '*/manual/*' +find_filter += -and -not -path '*/autom4te.cache/*' +find_filter += -and -not -path '*/doc/all-cfg.texi' +find_filter += -and -not -path '*/.mu_build_*' + +find_newer_filtered_fn = \ + (! -f $(1) \ + || -n $(call find_newer_files_fn,$(1),$(3)) \ + || -n "`find -H $(2) \ + -type f \ + -and -newer $(1) \ + -and \( $(4) \) \ + -print -quit`") + +find_newer_fn = \ + $(call find_newer_filtered_fn,$(1),$(2),$(3),$(find_filter)) + +###################################################################### +# Package dependencies +###################################################################### + +# This must come before %-configure, %-build, %-install pattern rules +# or else dependencies will not work. + +package_dependencies_fn = \ + $(patsubst %-install, %, \ + $(filter %-install,$($(1)_configure_depend))) + +PACKAGE_DEPENDENCIES = $(call package_dependencies_fn,$(PACKAGE)) + +# package specific configure, build, install dependencies +add_package_dependency_fn = \ + $(if $($(1)_$(2)_depend), \ + $(eval $(1)-$(2) : $($(1)_$(2)_depend))) + +$(foreach p,$(ALL_PACKAGES), \ + $(call add_package_dependency_fn,$(p),configure) \ + $(call add_package_dependency_fn,$(p),build) \ + $(call add_package_dependency_fn,$(p),install)) + +TARGETS_RESPECTING_DEPENDENCIES = image_install wipe diff push-all pull-all find-source + +# carry over packages dependencies to image install, wipe, pull-all, push-all +$(foreach p,$(ALL_PACKAGES), \ + $(if $($(p)_configure_depend), \ + $(foreach s,$(TARGETS_RESPECTING_DEPENDENCIES), \ + $(eval $(p)-$(s): \ + $(addsuffix -$(s), $(call package_dependencies_fn,$(p))))))) + +# recursively resolve dependencies +resolve_dependencies2_fn = $(strip \ + $(eval __added = $(filter-out $(4), \ + $(call uniq_fn, \ + $(foreach l,$(3), \ + $(call ifdef3_fn,$(l)$(1),,$(call $(2),$($(l)$(1)))) \ + )))) \ + $(eval __known = $(call uniq_fn,$(4) $(3) $(__added))) \ + $(if $(__added), \ + $(call resolve_dependencies2_fn,$(1),$(2),$(__added),$(__known)), \ + $(__known)) \ +) + +resolve_dependencies_null_fn = $(1) + +resolve_dependencies_fn = $(call resolve_dependencies2_fn,$(1),resolve_dependencies_null_fn,$(2)) + +###################################################################### +# Package configure +###################################################################### + +# x86_64 can be either 32/64. set BIACH=32 to get 32 bit libraries. +BIARCH = 64 + +x86_64_libdir = $(BIARCH) +native_libdir = $($(NATIVE_ARCH)_libdir) + +# lib or lib64 depending +arch_lib_dir = lib$($(BASIC_ARCH)_libdir) + +# find dynamic linker as absolute path +TOOL_INSTALL_LIB_DIR=$(TOOL_INSTALL_DIR)/$(TARGET)/$(arch_lib_dir) +DYNAMIC_LINKER=${shell cd $(TOOL_INSTALL_LIB_DIR); echo ld*.so.*} + +# Pad dynamic linker & rpath so elftool will never have to change ELF section sizes. +# Yes, this is a kludge. +lots_of_slashes_to_pad_names = "/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" + +# When PLATFORM != native we *always* use our own versions of GLIBC and dynamic linker +# Allow per-platform overrides +CROSS_LDFLAGS = $(strip $($(PLATFORM)_cross_ldflags)) +ifeq ($(CROSS_LDFLAGS),) + CROSS_LDFLAGS = \ + -Wl,--dynamic-linker=$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)/$(DYNAMIC_LINKER) \ + -Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR) +endif + +cross_ldflags = $(if $(is_native)$(is_build_tool),,$(CROSS_LDFLAGS) ) + +# $(call installed_libs_fn,PACKAGE) +# Return install library directory for given package. +# Some packages (e.g. openssl) don't install under lib64; instead they use lib +define installed_lib_fn +$(call if_directory_exists_fn, + $(call package_install_dir_fn,$(1))/$(arch_lib_dir), + $(call package_install_dir_fn,$(1))/lib) +endef + +# Set -L and rpath to point to dependent libraries previously built by us. +installed_libs_fn = \ + $(foreach i,$(1), \ + -L$(call installed_lib_fn,$(i)) \ + -Wl,-rpath -Wl,$(call installed_lib_fn,$(i))) + +# As above for include files +installed_include_fn = $(call package_install_dir_fn,$(1))/include + +installed_includes_fn = $(foreach i,$(1),-I$(call installed_include_fn,$(i))) + +# By default package CPPFLAGS (to set include path -I) and LDFLAGS (to set link path -L) +# point at dependent install directories. +DEFAULT_CPPFLAGS = $(call installed_includes_fn, $(PACKAGE_DEPENDENCIES)) +DEFAULT_LDFLAGS = $(call installed_libs_fn, $(PACKAGE_DEPENDENCIES)) + +configure_var_fn = \ + $(call tag_var_with_added_space_fn,$(1))$(call override_var_with_default_fn,$(PACKAGE)_$(1),$(DEFAULT_$(1))) +configure_ldflags_fn = \ + $(cross_ldflags)$(call configure_var_fn,LDFLAGS) + +# Allow packages to override CPPFLAGS, CFLAGS, and LDFLAGS +CONFIGURE_ENV = \ + $(if $(call configure_var_fn,CPPFLAGS), \ + CPPFLAGS="$(CPPFLAGS) $(call configure_var_fn,CPPFLAGS)") \ + $(if $(call configure_var_fn,CFLAGS), \ + CFLAGS="$(CFLAGS) $(call configure_var_fn,CFLAGS)") \ + $(if $(call configure_var_fn,CCASFLAGS), \ + CCASFLAGS="$(CCASFLAGS) $(call configure_var_fn,CCASFLAGS)") \ + $(if $(call configure_ldflags_fn), \ + LDFLAGS="$(LDFLAGS) $(call configure_ldflags_fn)") \ + $(if $($(PACKAGE)_configure_env),$($(PACKAGE)_configure_env)) + +### BURT +# only partially used now (used in a few .mk files) +ifeq ($(is_build_tool),yes) +prefix = $(PACKAGE_INSTALL_DIR) +libdir = $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) +libexecdir = $(PACKAGE_INSTALL_DIR)/usr/libexec +DESTDIR = / +else +# Eventually simplify this with no per package DESTDIR or prefix +ppdMacro = $(if $(PER_PACKAGE_DESTDIR),$(call package_build_dir_fn,$(1))) +pppMacro = $(if $(PER_PACKAGE_PREFIX),$(call package_build_dir_fn,$(1))) +prefixMacro = $($(PLATFORM)_PREFIX_BASE)/$(pppMacro) +prefix = $(call prefixMacro,$(PACKAGE)) +libdir = $($(PLATFORM)_LIBDIR) +libexecdir = $($(PLATFORM)_LIBEXECDIR) +destdirMacro = $($(PLATFORM)_DESTDIR_BASE)$(ppdMacro) +DESTDIR = $(call destdirMacro,$(PACKAGE)) +endif +### BURT +### dbarach +image_extra_dependencies = $($(PLATFORM)_image_extra_dependencies) +### dbarach + +configure_package_gnu = \ + s=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \ + if [ ! -f $$s/configure ] ; then \ + autoreconf -i -f $$s ; \ + fi ; \ + cd $(PACKAGE_BUILD_DIR) ; \ + env $(CONFIGURE_ENV) \ + $$s/configure \ + $(if $($(PACKAGE)_configure_host_and_target), \ + $($(PACKAGE)_configure_host_and_target), \ + $(if $(not_native),--host=$(TARGET),)) \ + $(if $($(PACKAGE)_configure_prefix), \ + $($(PACKAGE)_configure_prefix), \ + --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) \ + --prefix=$(PACKAGE_INSTALL_DIR)) \ + $($(PACKAGE)_configure_args) \ + $($(PACKAGE)_configure_args_$(PLATFORM)) + +configure_package = \ + $(call build_msg_fn,Configuring $(PACKAGE) in $(PACKAGE_BUILD_DIR)) ; \ + mkdir -p $(PACKAGE_BUILD_DIR) ; \ + $(if $($(PACKAGE)_configure), \ + $($(PACKAGE)_configure), \ + $(configure_package_gnu)) + +# Tools (e.g. gcc, binutils, gdb) required a platform to build for +check_platform = \ + is_tool="$(is_build_tool)" ; \ + is_cross_package="$(findstring $(PACKAGE),$(CROSS_TOOLS))" ; \ + is_arch_native="$(if $(subst native,,$(ARCH)),,yes)" ; \ + if [ "$${is_tool}" == "yes" \ + -a "$${is_cross_package}" != "" \ + -a "$${is_arch_native}" != "" ]; then \ + $(call build_msg_fn,You must specify PLATFORM for building tools) ; \ + exit 1 ; \ + fi ; \ + : check that platform gcc can be found ; \ + target_gcc=gcc ; \ + if [ "$${is_arch_native}" != "yes" ] ; then \ + target_gcc=$(TARGET)-gcc ; \ + fi ; \ + if [ "$${is_tool}" != "yes" \ + -a "$${is_arch_native}" != "yes" \ + -a ! -x "`which 2> /dev/null $${target_gcc}`" ] ; then \ + $(call build_msg_fn, \ + No cross-compiler found for platform $(PLATFORM) target $(TARGET); \ + try make PLATFORM=$(PLATFORM) install-tools) ; \ + exit 1 ; \ + fi + +configure_check_timestamp = \ + @$(BUILD_ENV) ; \ + $(check_platform) ; \ + mkdir -p $(PACKAGE_BUILD_DIR) ; \ + mkdir -p $(PACKAGE_INSTALL_DIR) ; \ + conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \ + dirs="$(call package_mk_fn,$(PACKAGE)) \ + $(wildcard $(call find_source_fn,$(PACKAGE_SOURCE))/configure) \ + $(MU_BUILD_ROOT_DIR)/config.site" ; \ + if [[ $(call find_newer_fn, $${conf}, $${dirs}, $?) ]]; then \ + $(configure_package) ; \ + touch $${conf} ; \ + else \ + $(call build_msg_fn,Configuring $(PACKAGE): nothing to do) ; \ + fi + +.PHONY: %-configure +%-configure: %-find-source + $(configure_check_timestamp) + +###################################################################### +# Package build +###################################################################### + +linux_n_cpus = `grep '^processor' /proc/cpuinfo | wc -l` + +MAKE_PARALLEL_JOBS = \ + -j $(shell \ + if [ -f /proc/cpuinfo ] ; then \ + expr 2 '*' $(linux_n_cpus) ; \ + else \ + echo 1 ; \ + fi) + +MAKE_PARALLEL_FLAGS = $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS)) + +# Make command shorthand for packages & tools. +PACKAGE_MAKE = \ + $(MAKE) \ + -C $(PACKAGE_BUILD_DIR) \ + $($(PACKAGE)_make_args) \ + $(MAKE_PARALLEL_FLAGS) + +build_package = \ + $(call build_msg_fn,Building $* in $(PACKAGE_BUILD_DIR)) ; \ + mkdir -p $(PACKAGE_BUILD_DIR) ; \ + cd $(PACKAGE_BUILD_DIR) ; \ + $(if $($(PACKAGE)_build), \ + $($(PACKAGE)_build), \ + $(PACKAGE_MAKE)) + +build_check_timestamp = \ + @$(BUILD_ENV) ; \ + comp="$(TIMESTAMP_DIR)/$(BUILD_TIMESTAMP)" ; \ + conf="$(TIMESTAMP_DIR)/$(CONFIGURE_TIMESTAMP)" ; \ + dirs="$(call find_source_fn,$(PACKAGE_SOURCE)) \ + $($(PACKAGE)_build_timestamp_depends) \ + $(if $(is_build_tool),,$(addprefix $(INSTALL_DIR)/,$(PACKAGE_DEPENDENCIES)))" ; \ + if [[ $${conf} -nt $${comp} \ + || $(call find_newer_fn, $${comp}, $${dirs}, $?) ]]; then \ + $(build_package) ; \ + touch $${comp} ; \ + else \ + $(call build_msg_fn,Building $(PACKAGE): nothing to do) ; \ + fi + +.PHONY: %-build +%-build: %-configure + $(build_check_timestamp) + +.PHONY: %-rebuild +%-rebuild: %-wipe %-build + @ : + +###################################################################### +# Package install +###################################################################### + +install_package = \ + : by default, for non-tools, remove any previously installed bits ; \ + $(if $(is_build_tool)$($(PACKAGE)_keep_instdir), \ + true, \ + rm -rf $(PACKAGE_INSTALL_DIR)); \ + mkdir -p $(PACKAGE_INSTALL_DIR) ; \ + $(if $($(PACKAGE)_pre_install),$($(PACKAGE)_pre_install),true); \ + $(if $($(PACKAGE)_install), \ + $($(PACKAGE)_install), \ + $(PACKAGE_MAKE) \ + $($(PACKAGE)_install_args) \ + install) ; \ + $(if $($(PACKAGE)_post_install),$($(PACKAGE)_post_install),true) + +install_check_timestamp = \ + @$(BUILD_ENV) ; \ + inst=$(TIMESTAMP_DIR)/$(INSTALL_TIMESTAMP) ; \ + dirs="$(PACKAGE_BUILD_DIR) \ + $($(PACKAGE)_install_dependencies)" ; \ + if [[ $(call find_newer_fn, $${inst}, $${dirs}, $?) ]]; then \ + $(call build_msg_fn,Installing $(PACKAGE)) ; \ + $(install_package) ; \ + touch $${inst} ; \ + else \ + $(call build_msg_fn,Installing $(PACKAGE): nothing to do) ; \ + fi + +.PHONY: %-install +%-install: %-build + $(install_check_timestamp) + +###################################################################### +# Source code managment +###################################################################### + +GIT = git + +# Maps package name to source directory root. +# Multiple packages may use a single source tree. +# For example, gcc-bootstrap package shares gcc source. +PACKAGE_SOURCE = $(if $($(PACKAGE)_source),$($(PACKAGE)_source),$(PACKAGE)) + +# Use git to download source if directory is not found +find_source_for_package = \ + @$(BUILD_ENV) ; \ + $(call build_msg_fn,Arch for platform '$(PLATFORM)' is $(ARCH)) ; \ + $(call build_msg_fn,Finding source for $(PACKAGE)) ; \ + s="$(call find_source_fn,$(PACKAGE_SOURCE))" ; \ + [[ -z "$${s}" ]] \ + && $(call build_msg_fn,Package $(PACKAGE) not found with path $(SOURCE_PATH)) \ + && exit 1; \ + mk="$(call find_build_data_dir_for_package_fn,$(PACKAGE_SOURCE))/packages/$(PACKAGE).mk"; \ + $(call build_msg_fn,Makefile fragment found in $${mk}) ; \ + if [ ! -d "$${s}" ] ; then \ + d=`dirname $${mk}` ; \ + i=`cd $${d}/.. && ($(GIT) config remote.origin.url || \ + awk '/URL/ { print $$2; }' .git/remotes/origin)`; \ + g=`dirname $${i}` ; \ + $(call build_msg_fn,Fetching source: $(GIT) clone $${g}/$(PACKAGE_SOURCE) $$s) ; \ + if ! $(GIT) clone $${g}/$(PACKAGE_SOURCE) $$s; then \ + $(call build_msg_fn,No source for $(PACKAGE) in $${g}); \ + exit 1; \ + fi ; \ + $(call build_msg_fn,Fix file dates in $${g}/$(PACKAGE_SOURCE)) ; \ + (cd $${s} ; $(MU_BUILD_ROOT_DIR)/autowank --touch) ; \ + fi ; \ + s=`cd $${s} && pwd` ; \ + $(call build_msg_fn,Source found in $${s}) + +.PHONY: %-find-source +%-find-source: + $(find_source_for_package) + +.PHONY: %-push %-pull %-push-all %-pull-all +%-push %-pull %-push-all %-pull-all: + @$(BUILD_ENV) ; \ + push_or_pull=$(patsubst %-all,%,$(subst $(PACKAGE)-,,$@)) ; \ + $(call build_msg_fn,Git $${push_or_pull} source for $(PACKAGE)) ; \ + s=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \ + if [ "x$$s" = "x" ]; then \ + $(call build_msg_fn,No source for $(PACKAGE)) ; \ + exit 1; \ + fi ; \ + cd $$s && $(GIT) $${push_or_pull} + +# Pull all packages for platform +.PHONY: pull-all +pull-all: + @$(BUILD_ENV) ; \ + $(call build_msg_fn,Git pull build system) ; \ + for d in $(MU_BUILD_ROOT_DIR) \ + $(SOURCE_PATH_BUILD_ROOT_DIRS) \ + $(SOURCE_PATH_BUILD_DATA_DIRS); do \ + $(call build_msg_fn,Git pull $${d}) ; \ + pushd $${d} >& /dev/null && $(GIT) pull && popd >& /dev/null ; \ + done ; \ + $(call build_msg_fn,Git pull build tools) ; \ + $(call tool_make_target_fn,pull-all) ; \ + $(call build_msg_fn,Git pull packages for platform $(PLATFORM)) ; \ + make PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES)) + +.PHONY: %-diff +%-diff: + @$(BUILD_ENV) ; \ + d=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \ + $(call build_msg_fn,Git diff $(PACKAGE)) ; \ + if [ -d $${d}/.git ] ; then \ + cd $${d} && $(GIT) --no-pager diff 2>/dev/null; \ + else \ + $(call build_msg_fn, $(PACKAGE) not a git directory) ; \ + fi + + + +# generate diffs for everything in source path +.PHONY: diff-all +diff-all: + @$(BUILD_ENV) ; \ + $(call build_msg_fn,Generate diffs) ; \ + for r in $(ABSOLUTE_SOURCE_PATH); do \ + for d in $${r}/* ; do \ + if [ -d $${d} ] ; then \ + $(call build_msg_fn,Git diff $${d}) ; \ + if [ -d $${d}/.git ] ; then \ + cd $${d} && $(GIT) --no-pager diff 2>/dev/null; \ + else \ + $(call build_msg_fn, $${d} not a git directory) ; \ + fi ; \ + fi ; \ + done ; \ + done + +###################################################################### +# System images +###################################################################### + +IMAGE_DIR = $(MU_BUILD_ROOT_DIR)/image-$(PLATFORM) + +# Reports shared libraries in given directory +find_shared_libs_fn = \ + find $(1) \ + -maxdepth 1 \ + -regex '.*/lib[a-z0-9_]+\+?\+?.so' \ + -o -regex '.*/lib[a-z0-9_]+-[0-9.]+\+?\+?.so' \ + -o -regex '.*/lib[a-z0-9_]+\+?\+?.so.[0-9.]+' + +# By default pick up files from binary directories and /etc. +# Also include shared libraries. +DEFAULT_IMAGE_INCLUDE = \ + for d in bin sbin libexec \ + usr/bin usr/sbin usr/libexec \ + etc; do \ + [[ -d $$d ]] && echo $$d; \ + done ; \ + [[ -d $(arch_lib_dir) ]] \ + && $(call find_shared_libs_fn,$(arch_lib_dir)) + +# Define any shell functions needed by install scripts +image_install_functions = \ + $(foreach p,$(ALL_PACKAGES), \ + $(if $($(p)_image_install_functions), \ + $($(p)_image_install_functions))) + +# Should always be over-written by temp dir in %-root-image rule +IMAGE_INSTALL_DIR = $(error you need to set IMAGE_INSTALL_DIR) + +image_install_fn = \ + @$(BUILD_ENV) ; \ + $(call build_msg_fn,Image-install $(1) for platform $(PLATFORM)) ; \ + inst_dir=$(IMAGE_INSTALL_DIR) ; \ + mkdir -p $${inst_dir} ; \ + cd $(2) ; \ + : select files to include in image ; \ + image_include_files=" \ + `$(call ifdef_fn,$(1)_image_include,$(DEFAULT_IMAGE_INCLUDE)) ; \ + echo "" ; \ + exit 0 ; `"; \ + : select files regexps to exclude from image ; \ + image_exclude_files="" ; \ + if [ ! -z "$($(1)_image_exclude)" ] ; then \ + image_exclude_files="${image_exclude_files} \ + $(patsubst %,--exclude=%,$($(1)_image_exclude))" ; \ + fi ; \ + [[ -z "$${image_include_files}" || $${image_include_files} == " " ]] \ + || tar cf - $${image_include_files} $${image_exclude_files} \ + | tar xf - -C $${inst_dir} ; \ + : copy files from copyimg directories on source path if present ; \ + for build_data_dir in $(SOURCE_PATH_BUILD_DATA_DIRS) ; do \ + d="$${build_data_dir}/packages/$(1).copyimg" ; \ + if [ -d "$${d}" ] ; then \ + env $($(PLATFORM)_copyimg_env) \ + $(MU_BUILD_ROOT_DIR)/copyimg $${d} $${inst_dir} ; \ + fi ; \ + done ; \ + : run package dependent install script ; \ + $(if $($(1)_image_install), \ + $(image_install_functions) \ + cd $${inst_dir} ; \ + $($(1)_image_install)) + +.PHONY: %-image_install +%-image_install: %-install + $(call image_install_fn,$(PACKAGE),$(PACKAGE_INSTALL_DIR)) + +basic_system_image_include = \ + $(call ifdef_fn,$(PLATFORM)_basic_system_image_include, \ + echo bin/ldd ; \ + echo $(arch_lib_dir)/ld*.so* ; \ + $(call find_shared_libs_fn, $(arch_lib_dir))) + +basic_system_image_install = \ + mkdir -p bin lib mnt proc root sbin sys tmp etc ; \ + mkdir -p usr usr/{bin,sbin} usr/lib ; \ + mkdir -p var var/{lib,lock,log,run,tmp} ; \ + mkdir -p var/lock/subsys var/lib/urandom + +.PHONY: basic_system-image_install +basic_system-image_install: # linuxrc-install + $(if $(not_native), \ + $(call image_install_fn,basic_system,$(TARGET_TOOL_INSTALL_DIR)),) + +ROOT_PACKAGES = $(if $($(PLATFORM)_root_packages),$($(PLATFORM)_root_packages),$(default_root_packages)) + +.PHONY: install-packages +install-packages: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) + @$(BUILD_ENV) ; \ + set -eu$(BUILD_DEBUG) ; \ + d=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM) ; \ + rm -rf $${d} ; \ + mkdir -p $${d}; \ + $(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${d} \ + $(patsubst %,%-image_install, \ + basic_system \ + $(ROOT_PACKAGES)) || exit 1; \ + $(call build_msg_fn, Relocating ELF executables to run in $${d}) ; \ + find $${d} -type f \ + -exec elftool quiet in '{}' out '{}' \ + set-interpreter \ + $${d}/$(arch_lib_dir)/$(DYNAMIC_LINKER) \ + set-rpath $${d}/$(arch_lib_dir):$${d}/lib ';' ; \ + : strip symbols from files ; \ + if [ $${strip_symbols:-no} = 'yes' ] ; then \ + $(call build_msg_fn, Stripping symbols from files) ; \ + find $${d} -type f \ + -exec \ + $(TARGET_PREFIX)strip \ + --strip-unneeded '{}' ';' \ + >& /dev/null ; \ + else \ + $(call build_msg_fn, NOT stripping symbols) ; \ + fi + +# readonly root squashfs image +# Note: $(call build_msg_fn) does not seem to work inside of fakeroot so we use echo +.PHONY: ro-image +$(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGES)) + @$(BUILD_ENV) ; \ + d=$(PLATFORM_IMAGE_DIR) ; \ + mkdir -p $$d; \ + ro_image=$$d/ro.img ; \ + rm -f $${ro_image} ; \ + tmp_dir="`mktemp -d $$d/ro-image-XXXXXX`" ; \ + chmod 0755 $${tmp_dir} ; \ + cd $${tmp_dir} ; \ + trap "rm -rf $${tmp_dir}" err ; \ + fakeroot /bin/bash -c "{ \ + set -eu$(BUILD_DEBUG) ; \ + $(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \ + $(patsubst %,%-image_install, \ + basic_system \ + $(ROOT_PACKAGES)) ; \ + : make dev directory ; \ + $(linuxrc_makedev) ; \ + echo @@@@ Relocating ELF executables to run in / @@@@ ; \ + find $${d} -type f \ + -exec elftool quiet in '{}' out '{}' \ + set-interpreter \ + /$(arch_lib_dir)/$(DYNAMIC_LINKER) \ + set-rpath /$(arch_lib_dir):/lib ';' ; \ + : strip symbols from files ; \ + if [ '$${strip_symbols:-yes}' = 'yes' ] ; then \ + echo @@@@ Stripping symbols from files @@@@ ; \ + find $${tmp_dir} -type f \ + -exec \ + $(TARGET_PREFIX)strip \ + --strip-unneeded '{}' ';' \ + >& /dev/null ; \ + else \ + echo @@@@ NOT stripping symbols @@@@ ; \ + fi ; \ + if [ $${sign_executables:-yes} = 'yes' \ + -a -n "$($(PLATFORM)_public_key)" ] ; then \ + echo @@@@ Signing executables @@@@ ; \ + find $${tmp_dir} -type f \ + | xargs sign $($(PLATFORM)_public_key) \ + $($(PLATFORM)_private_key_passphrase) ; \ + fi ; \ + : make read-only file system ; \ + mksquashfs \ + $${tmp_dir} $${ro_image} \ + -no-exports -no-progress -no-recovery ; \ + }" ; \ + : cleanup tmp directory ; \ + rm -rf $${tmp_dir} + +MKFS_JFFS2_BYTE_ORDER_x86_64 = -l +MKFS_JFFS2_BYTE_ORDER_i686 = -l +MKFS_JFFS2_BYTE_ORDER_ppc = -b +MKFS_JFFS2_BYTE_ORDER_mips = -b +MKFS_JFFS2_BYTE_ORDER_native = $(MKFS_JFFS2_BYTE_ORDER_$(NATIVE_ARCH)) + +MKFS_JFFS2_SECTOR_SIZE_IN_KBYTES = \ + $(call ifdef_fn,$(PLATFORM)_jffs2_sector_size_in_kbytes,256) + +mkfs_fn_jffs2 = mkfs.jffs2 \ + --eraseblock=$(MKFS_JFFS2_SECTOR_SIZE_IN_KBYTES)KiB \ + --root=$(1) --output=$(2) \ + $(MKFS_JFFS2_BYTE_ORDER_$(BASIC_ARCH)) + +# As things stand the actual initrd size parameter +# is set in .../open-repo/build-data/packages/linuxrc.mk. +EXT2_RW_IMAGE_SIZE=notused + +mkfs_fn_ext2 = \ + e2fsimage -d $(1) -f $(2) -s $(EXT2_RW_IMAGE_SIZE) + +RW_IMAGE_TYPE=jffs2 + +make_rw_image_fn = \ + $(call mkfs_fn_$(RW_IMAGE_TYPE),$(1),$(2)) + +rw_image_embed_ro_image_fn = \ + mkdir -p proc initrd images ro rw union ; \ + cp $(PLATFORM_IMAGE_DIR)/$(1) images/$(1) ; \ + md5sum images/$(1) > images/$(1).md5 ; \ + echo Built by $(LOGNAME) at `date` > images/$(1).stamp ; \ + mkdir -p changes/$(1) + +# make sure RW_IMAGE_TYPE is a type we know how to build +.PHONY: rw-image-check-type +rw-image-check-type: + @$(BUILD_ENV) ; \ + if [ -z "$(make_rw_image_fn)" ] ; then \ + $(call build_msg_fn,Unknown read/write fs image type; \ + try RW_IMAGE_TYPE=ext2 or RW_IMAGE_TYPE=jffs2) ; \ + exit 1; \ + fi + +# read write image +.PHONY: rw-image +rw-image: rw-image-check-type ro-image + @$(BUILD_ENV) ; \ + d=$(PLATFORM_IMAGE_DIR) ; \ + mkdir -p $$d ; \ + rw_image="$$d/rw.$(RW_IMAGE_TYPE)" ; \ + ro_image="ro.img" ; \ + rm -f $$rw_image ; \ + tmp_dir="`mktemp -d $$d/rw-image-XXXXXX`" ; \ + chmod 0755 $${tmp_dir} ; \ + cd $${tmp_dir} ; \ + trap "rm -rf $${tmp_dir}" err ; \ + fakeroot /bin/bash -c "{ \ + set -eu$(BUILD_DEBUG) ; \ + $(linuxrc_makedev) ; \ + $(call rw_image_embed_ro_image_fn,$${ro_image}) ; \ + $(call make_rw_image_fn,$${tmp_dir},$${rw_image}) ; \ + }" ; \ + : cleanup tmp directory ; \ + rm -rf $${tmp_dir} + +images: linuxrc-install linux-install $(image_extra_dependencies) rw-image + @$(BUILD_ENV) ; \ + d=$(PLATFORM_IMAGE_DIR) ; \ + cd $(BUILD_DIR)/linux-$(PLATFORM) ; \ + i="" ; \ + [[ -z $$i && -f bzImage ]] && i=bzImage ; \ + [[ -z $$i && -f zImage ]] && i=zImage ; \ + [[ -z $$i && -f linux ]] && i=linux ; \ + [[ -z $$i && -f vmlinux ]] && i=vmlinux ; \ + [[ -z $$i ]] \ + && $(call build_msg_fn,no linux image to install \ + in $(BUILD_DIR)/linux-$(PLATFORM)) \ + && exit 1 ; \ + cp $$i $$d + +###################################################################### +# Tool chain build/install +###################################################################### + +.PHONY: ccache-install +ccache-install: + $(MAKE) -C $(MU_BUILD_ROOT_DIR) ccache-build + mkdir -p $(TOOL_INSTALL_DIR)/ccache-bin + ln -sf $(MU_BUILD_ROOT_DIR)/build-tool-native/ccache/ccache \ + $(TOOL_INSTALL_DIR)/ccache-bin/$(TARGET_PREFIX)gcc + +TOOL_MAKE = $(MAKE) is_build_tool=yes + +tool_make_target_fn = \ + $(if $(strip $(NATIVE_TOOLS)), \ + $(TOOL_MAKE) $(patsubst %,%-$(1),$(NATIVE_TOOLS)) ARCH=native || exit 1 ;) \ + $(TOOL_MAKE) $(patsubst %,%-$(1),$(CROSS_TOOLS)) + +.PHONY: install-tools +install-tools: + $(call tool_make_target_fn,install) + +.PHONY: bootstrap-tools +bootstrap-tools: + $(TOOL_MAKE) make-install findutils-install git-install \ + automake-install autoconf-install libtool-install fakeroot-install + + +###################################################################### +# Clean +###################################################################### + +package_clean_script = \ + @$(call build_msg_fn, Cleaning $* in $(PACKAGE_INSTALL_DIR)) ; \ + $(BUILD_ENV) ; \ + $(if $(is_build_tool),,rm -rf $(PACKAGE_INSTALL_DIR) ;) \ + rm -rf $(TIMESTAMP_DIR)/$(call timestamp_name_fn,*) ; \ + $(if $($(PACKAGE)_clean), \ + $($(PACKAGE)_clean), \ + $(PACKAGE_MAKE) clean) + +.PHONY: %-clean +%-clean: + $(package_clean_script) + +# Wipe e.g. remove build and install directories for packages. +package_wipe_script = \ + @message=$(if $(is_build_tool),"Wiping build $(PACKAGE)","Wiping build/install $(PACKAGE)") ; \ + $(call build_msg_fn,$$message) ; \ + $(BUILD_ENV) ; \ + rm -rf $(if $(is_build_tool),$(PACKAGE_BUILD_DIR),$(PACKAGE_INSTALL_DIR) $(PACKAGE_BUILD_DIR)) + +.PHONY: %-wipe +%-wipe: + $(package_wipe_script) + +# Wipe entire build/install area for TAG and PLATFORM +.PHONY: wipe-all +wipe-all: + @$(call build_msg_fn, Wiping $(BUILD_DIR) $(INSTALL_DIR)) ; \ + $(BUILD_ENV) ; \ + rm -rf $(BUILD_DIR) $(INSTALL_DIR) + +# Clean everything +distclean: + rm -rf $(MU_BUILD_ROOT_DIR)/$(BUILD_PREFIX_package)*/ + rm -rf $(MU_BUILD_ROOT_DIR)/$(BUILD_PREFIX_tool)* + rm -rf $(MU_BUILD_ROOT_DIR)/$(INSTALL_PREFIX)* + rm -rf $(MU_BUILD_ROOT_DIR)/$(IMAGES_PREFIX)* + rm -rf $(TOOL_INSTALL_DIR) + 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 + rm -f $(MU_BUILD_ROOT_DIR)/deb/debian/changelog diff --git a/vpp/build-root/autowank b/vpp/build-root/autowank new file mode 100755 index 00000000..21a440df --- /dev/null +++ b/vpp/build-root/autowank @@ -0,0 +1,307 @@ +#!/bin/bash + +# 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. + +# This aptly-named script verifies and fixes time ordering +# problems with Makefile.{am,in} aclocal.m4 configure* files. + +set -eu +#set -vx + +touch="" +commit="" +comma_v="" +aclocal="" +optimize="" + +# The old autowank scheme used "touch ; sleep 1" +# to ensure differentiable, ordered timestamps. Worked, but +# took N seconds given N files to fix. We have an example +# which wastes multiple minutes given the old scheme. +# +# This version generates a sequence of timestamps +# starting an hour ago. That gives us +# lots to play with, in case some obnoxious program feels the need +# to complain about timestamps in the future. + +# If we're in UTC+N land, generate UTC+(N+1) +# If we're in UTC-N land, generate UTC-(N-1) + +my_tz=`date +%z` +sign=`echo $my_tz | sed -n -e 's/^\(.\{1\}\).*$/\1/p'` +t=`echo $my_tz | sed -n -e 's/^\(.\{1\}\)//p'` +tz_hour=`echo $t | sed -n -e 's/^\(.\{2\}\).*$/\1/p'` +tz_hour=`echo $tz_hour | sed 's/^0//'` + +if [ $sign = "-" ] ; then + sign="+" + let tz_hour=$tz_hour+1 + if [[ $tz_hour -ge "24" ]] ; then + tz_hour=0 + fi +else + sign="-" + let tz_hour=$tz_hour-1 || true + if [[ $tz_hour -lt "0" ]] ; then + tz_hour=23 + fi +fi + +# Timestamp, an hour ago: +ts_begin=`TZ=UTC${sign}${tz_hour} date +%Y%m%d%H%M.%S` + +# break into constituent parts +year=`echo $ts_begin | sed -n -e 's/^\(.\{4\}\).*$/\1/p'` +t=`echo $ts_begin | sed -n -e 's/^\(.\{4\}\)//p'` +month=`echo $t | sed -n -e 's/^\(.\{2\}\).*$/\1/p'` +t=`echo $t | sed -n -e 's/^\(.\{2\}\)//p'` +day=`echo $t | sed -n -e 's/^\(.\{2\}\).*$/\1/p'` +t=`echo $t | sed -n -e 's/^\(.\{2\}\)//p'` +hour=`echo $t | sed -n -e 's/^\(.\{2\}\).*$/\1/p'` +t=`echo $t | sed -n -e 's/^\(.\{2\}\)//p'` +min=`echo $t | sed -n -e 's/^\(.\{2\}\).*$/\1/p'` +t=`echo $t | sed -n -e 's/^\(.\{2\}\)//p'` +sec=`echo $t | sed -n -e 's/\.//p'` + +# How many days in the current month? +# Good until someone changes the calendar rules +days_in_current_month() { + if [[ $month -eq 9 || $month -eq 4 \ + || $month -eq 6 || $month -eq 11 ]] ; then + return 30; + fi + if [[ $month -eq 2 ]] ; then + let t=($year/400)*400 + if [[ $t -eq $year ]] ; then + return 29; + fi + let t=($year/100)*100 + if [[ $t -eq $year ]] ; then + return 28; + fi + let t=($year/4)*4 + if [[ $t -eq $year ]] ; then + return 29; + fi + return 28; + fi + return 31; +} + +# The next timestamp to issue via touch +# A real hemorrhoid because bash isnt easily convinced +# that 08 is a decimal number +next_ts() { + sec=`echo $sec | sed 's/^0//'` + let sec=$sec+1 + if [[ "$sec" -lt "60" ]] ; then + if [[ "$sec" -lt "10" ]] ; then + sec=0$sec + fi + return 0; + fi + sec="00" + min=`echo $min | sed 's/^0//'` + let min=$min+1 + if [[ "$min" -lt "60" ]] ; then + if [[ "$min" -lt "10" ]] ; then + min=0$min + fi + return 0; + fi + min="00" + hour=`echo $hour | sed 's/^0//'` + let hour=$hour+1 + if [[ "$hour" -lt "24" ]] ; then + if [[ "$hour" -lt "10" ]] ; then + hour=0$hour + fi + return 0; + fi + hour="00" + days_in_current_month + days_in_month=$? + if [[ "$day" -lt "$days_in_month" ]] ; then + day=`echo $day | sed 's/^0//'` + let day=$day+1 + if [[ "$day" -lt "10" ]] ; then + day=0$day + fi + return 0; + fi + day="01" + month=`echo $month | sed 's/^0//'` + let month=$month+1 + if [[ "$month" -lt "13" ]] ; then + if [[ "$month" -lt "10" ]] ; then + month=0$month + fi + return 0; + fi + month="01" + let year=$year+1 + return 0; +} + +while [ $# != 0 ] ; do + case "$1" in + (--commav) comma_v=",v" ;; + (--touch) touch=yes ;; + (--aclocal) aclocal=yes ;; + (--nooptimize) optimize="" ;; + (--commit=*) commit="$1" ;; + (*) echo "$0: usage [--touch|--commit|]" > /dev/stderr + exit 17 ;; + esac + shift +done + +if [ "${aclocal}" != "" ] ; then + if [ -f aclocal.m4 ] ; then + echo touching aclocal.m4 + sleep 1 + touch aclocal.m4 + else + echo aclocal.m4 not found + fi +fi + +if [ "${comma_v}" != "" -a "${commit}" != "" ] ; then + echo "No, you may NOT molest ,v files directly. Go away." > /dev/stderr + exit 1 +fi + +function touchme () +{ + local victim="${1}" + shift + local touchmebaby="" + local sein="is" + local newer="no" + local older="no" + + if [ ! -r "$victim" ] ; then + return + fi + + while [ $# != 0 ] ; do + if [ "${1}" -nt "${victim}" ] ; then + newer="yes" + fi + if [ "${1}" -ot "${victim}" ] ; then + older="yes" + fi + if [ "${newer}" = "no" -a "${older}" = "no" ] ; then + newer="yes" + fi + + if [ "${newer}" = "yes" ] ; then + if [ "${touchmebaby}" = "" ] ; then + touchmebaby="${1}" + else + sein="are" + touchmebaby="${touchmebaby} ${1}" + fi + fi + shift + done + if [ -n "${touchmebaby}" ] ; then + echo "*** ${touchmebaby} ${sein} newer than ${victim} " + if [ -n "${touch}" ] ; then + # + # This is the old version, in case something backfires... + if [ "${optimize}" != "yes" ] ; then + echo "Fixing " ;touch -c "$victim" ; sleep 1 + else + echo "Fixing " + # echo touch -c -t $year$month$day$hour$min.$sec "$victim" + touch -c -t $year$month$day$hour$min.$sec "$victim" + next_ts + fi + fi + fi +} + +makefileins="`/usr/bin/find . -name Attic -prune -o -name Makefile.in${comma_v}`" + +# aclocal.m4 depends on ***/Makefile.am, configure.ac, acinclude.m4, *.m4 crap +touchme aclocal.m4${comma_v} \ + `/usr/bin/find . -name Attic -prune -o -name Makefile.am${comma_v}` \ + "configure.in${comma_v}" "configure.ac${comma_v}" \ + "acinclude.m4${comma_v}" + +# Makefile.in must be newer than Makefile.am +for f in $makefileins ; do + d="`dirname ${f}`" + touchme "${d}/Makefile.in${comma_v}" "${d}/Makefile.am${comma_v}" +done + +# Makefile.in depends on aclocal.m4 +for f in $makefileins ; do + d="`dirname $f`" + touchme "${d}/Makefile.in${comma_v}" "aclocal.m4${comma_v}" +done + +# config.in must be newer than aclocal.m4 and configure.ac +if [ -f "config.in${comma_v}" ] ; then + touchme "config.in${comma_v}" "aclocal.m4${comma_v}" \ + "configure.ac${comma_v}" \ + "configure.in${comma_v}" +fi + +# config.h.in (or More Thoroughly Modern configh.in) +# must be newer than aclocal.m4 and (obsolete) acconfig.h +for c_h_in in config.h.in configh.in ; do + if [ -f "${c_h_in}${comma_v}" ]; then + touchme "${c_h_in}${comma_v}" "aclocal.m4${comma_v}" "acconfig.h${comma_v}" + #>>>> WTF? Why? This is nonsensical + ## ***/Makefile.in must be newer than config.h.in + #for f in $makefileins ; do + # touchme "$f" "${c_h_in}${comma_v}" + #done + fi +done + +# configure must be newer than everything +# touchme configure $makefileins -- why would this be needed? +touchme "configure${comma_v}" "aclocal.m4${comma_v}" "acconfig.h${comma_v}" \ + "config.in${comma_v}" "config.h.in${comma_v}" \ + "configh.in${comma_v}" + +if [ -n "${commit}" ] ; then + commit="${commit:9}" # strip off "--commit=" + # First ***/Makefile.am, + # configure.in, configure.ac, + # ***/*.m4 + # acconfig.h + cvs commit -m "${commit}" \ + `for f in ${makefileins} ; do \ + [ -f "$${f%.in}.am" ] && echo "$${f%.in}.am" ; \ + done` \ + `[ -f configure.in ] && echo configure.in` \ + `[ -f configure.ac ] && echo configure.ac` \ + `[ -f acconfig.h ] && echo acconfig.h` \ + `/usr/bin/find . -name '*.m4' -mindepth 2` + + # Next aclocal.m4 + [ -f "aclocal.m4" ] && cvs commit -m "${commit}" aclocal.m4 + + # Next config.in, config.h.in, configh.in + [ -f "config.in" ] && cvs commit -m "${commit}" config.in + [ -f "config.h.in" ] && cvs commit -m "${commit}" config.h.in + [ -f "configh.in" ] && cvs commit -m "${commit}" configh.in + + # Last ***/Makefile.in, configure + cvs commit -m "${commit}" ${makefileins} configure +fi diff --git a/vpp/build-root/bootstrap.sh b/vpp/build-root/bootstrap.sh new file mode 100755 index 00000000..f83734fd --- /dev/null +++ b/vpp/build-root/bootstrap.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +build_root=`pwd` +cd ../ +wsroot=`pwd` + +# PATH +if [[ ! $CCACHE_DIR ]];then + CCACHE_DIR="$build_root/.ccache" +fi +ADD_TO_PATH="$build_root/tools/ccache-bin:$build_root/tools/bin" + +# Construct build-config.mk +cd $build_root +echo SOURCE_PATH = $wsroot > build-config.mk +echo +echo Saving PATH settings in `pwd`/path_setup +echo Source this file later, as needed +cat >path_setup < +Build-Depends: debhelper (>= 9), dkms, dh-systemd, chrpath +Standards-Version: 3.9.4 + +Package: vpp +Architecture: any +Depends: vpp-lib (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} +Description: Vector Packet Processing--executables + This package provides VPP executables: vpp, vpp_api_test, vpp_json_test + vpp - the vector packet engine + vpp_api_test - vector packet engine API test tool + vpp_json_test - vector packet engine JSON test tool + +Package: vpp-dbg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Vector Packet Processing--debug symbols + +Package: vpp-dev +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Vector Packet Processing--development support + This package contains development support files for the VPP libraries + . + +Package: vpp-dpdk-dev +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Vector Packet Processing--development support + This package contains dpdk header files which match the dpdk version + compiled into the vpp executable + . + +Package: vpp-lib +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +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 + 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 + . diff --git a/vpp/build-root/deb/debian/copyright b/vpp/build-root/deb/debian/copyright new file mode 100644 index 00000000..f9775c15 --- /dev/null +++ b/vpp/build-root/deb/debian/copyright @@ -0,0 +1,9 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: optional. +Upstream-Contact: optional. +Source: optional. +Disclaimer: optional. +Comment: optional. +License: Apache-2.0 +Copyright: 2015 Cisco and/or its affiliates and others. + diff --git a/vpp/build-root/deb/debian/rules b/vpp/build-root/deb/debian/rules new file mode 100755 index 00000000..186fa840 --- /dev/null +++ b/vpp/build-root/deb/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +# main packaging script based on dh7 syntax +%: + dh $@ --with dkms --with systemd,python2 + +override_dh_install: + dh_install --exclude .git + ../scripts/remove-rpath . + +override_dh_strip: + dh_strip --dbg-package=vpp-dbg + +override_dh_dkms: + dh_dkms -pvpp-dpdk-dkms diff --git a/vpp/build-root/deb/debian/source/format b/vpp/build-root/deb/debian/source/format new file mode 100755 index 00000000..89ae9db8 --- /dev/null +++ b/vpp/build-root/deb/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/vpp/build-root/deb/debian/vpp-bin.README.Debian b/vpp/build-root/deb/debian/vpp-bin.README.Debian new file mode 100644 index 00000000..19228969 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp-bin.README.Debian @@ -0,0 +1,53 @@ +To run vpp with the debug shell: + +sudo vpp unix interactive + +which will result in a prompt that looks like: + +DBGvpd# + +To give it a spin, we can create a tap interface and try a simple ping +(with trace). + +To create the tap: + +DBGvpd# tap connect foobar +Created tap-0 for Linux tap 'foobar' +DBGvpd# show int + +To assign it an ip address (and 'up' the interface): + +DBGvpd# set int ip address tap-0 192.168.1.1/24 +DBGvpd# set int state tap-0 up + +To turn on packet tracing for the tap interface: +DBGvpd# trace add tapcli-rx 10 + +Now, to set up and try the other end from the unix prompt: +vagrant@vagrant-ubuntu-trusty-64:~$ sudo ip addr add 192.168.1.2/24 dev foobar +vagrant@vagrant-ubuntu-trusty-64:~$ ping -c 3 192.168.1.1 + +To look at the trace, back in the vpp CLI: +DBGvpd# show trace + +And to stop tracing: + +DBGvpd# clear trace + +Other fun things to look at: + +The vlib packet processing graph: +DBGvpd# show vlib graph + +which will produce output like: + + Name Next Previous +ip4-icmp-input error-punt [0] ip4-local + ip4-icmp-echo-request [1] + vpe-icmp4-oam [2] + +To read this, the first column (Name) is the name of the node. +The second column (Next) is the name of the children of that node. +The third column (Previous) is the name of the parents of this node. + +END diff --git a/vpp/build-root/deb/debian/vpp-python-api.postinst b/vpp/build-root/deb/debian/vpp-python-api.postinst new file mode 100644 index 00000000..ca1c856f --- /dev/null +++ b/vpp/build-root/deb/debian/vpp-python-api.postinst @@ -0,0 +1,5 @@ +#!/bin/sh -e + +# after installing python-api files +python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +easy_install --install-dir=$python2_sitedir -z $python2_sitedir/vpp_papi/vpp_papi-*.egg diff --git a/vpp/build-root/deb/debian/vpp-python-api.prerm b/vpp/build-root/deb/debian/vpp-python-api.prerm new file mode 100644 index 00000000..e6d92df9 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp-python-api.prerm @@ -0,0 +1,8 @@ +#!/bin/sh -e + +# before removing python-api files +python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +easy_install --install-dir=$python2_sitedir -mxNq vpp_papi + +# the egg has been copied during install +rm $python2_sitedir/vpp_papi-*.egg diff --git a/vpp/build-root/deb/debian/vpp.postinst b/vpp/build-root/deb/debian/vpp.postinst new file mode 100644 index 00000000..78fcac22 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp.postinst @@ -0,0 +1,8 @@ +#!/bin/sh -e + +# try to set the required values now. This may or may not work. +sysctl --system + +#DEBHELPER# + +exit 0 diff --git a/vpp/build-root/deb/debian/vpp.postrm b/vpp/build-root/deb/debian/vpp.postrm new file mode 100644 index 00000000..ac16a459 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp.postrm @@ -0,0 +1,21 @@ +#!/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 + diff --git a/vpp/build-root/deb/debian/vpp.preinst b/vpp/build-root/deb/debian/vpp.preinst new file mode 100644 index 00000000..d33cacfc --- /dev/null +++ b/vpp/build-root/deb/debian/vpp.preinst @@ -0,0 +1,4 @@ +#!/bin/sh -e + +# Add the vpp group +groupadd -f -r vpp diff --git a/vpp/build-root/deb/debian/vpp.service b/vpp/build-root/deb/debian/vpp.service new file mode 100644 index 00000000..40549856 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp.service @@ -0,0 +1,14 @@ +[Unit] +Description=vector packet processing engine +After=network.target + +[Service] +Type=simple +ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api +ExecStartPre=-/sbin/modprobe igb_uio +ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf +ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/vpp/build-root/deb/debian/vpp.upstart b/vpp/build-root/deb/debian/vpp.upstart new file mode 100644 index 00000000..f5908783 --- /dev/null +++ b/vpp/build-root/deb/debian/vpp.upstart @@ -0,0 +1,21 @@ +description "vector packet processing engine" +author "Cisco Systems, Inc " + +manual + +respawn + +pre-start script + rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || true + # should be there via dkms, but if not, start anyway + modprobe igb_uio || true +end script + + +script + exec vpp -c /etc/vpp/startup.conf +end script + +post-stop script + rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || true +end script diff --git a/vpp/build-root/emacs-lisp/README b/vpp/build-root/emacs-lisp/README new file mode 100644 index 00000000..483e1c39 --- /dev/null +++ b/vpp/build-root/emacs-lisp/README @@ -0,0 +1,86 @@ +How to construct a complete plugin using the emacs skeletons + +0. Install open-vpp, including the development package. + +1. Load emacs skeletons + + M-x find-file all-skel.el + M-x eval-buffer + +2. Pick a single-word, lower-case name for your plugin. For example: macswap. +Hereafter, we'll refer to the selected name as . + +3. Generate the entire plugin: + + M-x make-plugin + Plugin-name: + +Or, generate each file individually: + +3. Create the required directories, e.g. under .../vpp + + $ mkdir -p -plugin/ + +4. Create -plugin/{configure.ac,Makefile.am} + + M-x find-file -plugin/configure.ac + M-x plugin-configure-skel + + M-x find-file -plugin/Makefile.am + M-x skel-plugin-makefile + +5. Create the api skeleton + M-x find-file -plugin//.api + M-x skel-plugin-api + +6. Create the api message enumeration header file + M-x find-file -plugin//_msg_enum.h + M-x skel-plugin-msg-enum + +7. Create the "all-api" header file + M-x find-file -plugin//_all_api_h.h + M-x skel-plugin-all-apih + +8. Create the main data structure definition header file + M-x find-file -plugin//.h + M-x skel-plugin-h + +9. Create the plugin main C file + M-x find-file -plugin//.c + M-x skel-plugin-main + +10. Create the vpp-api-test plugin main C file + M-x find-file -plugin//_test.c + M-x skel-plugin-test + +11. Create the data plane packet processing node + M-x find-file -plugin//node.c + M-x skel-plugin-node + +12. Process autotools input files + + $ cd -plugin + $ autoreconf -i -f + +13. Build the plugin skeleton + + $ mkdir build + $ cd build + $ ../configure --with-plugin-toolkit + $ make + $ sudo make install + + + + + + + + + + + + + + + diff --git a/vpp/build-root/emacs-lisp/all-skel.el b/vpp/build-root/emacs-lisp/all-skel.el new file mode 100644 index 00000000..2bf15b24 --- /dev/null +++ b/vpp/build-root/emacs-lisp/all-skel.el @@ -0,0 +1,41 @@ +;;; 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. + +;; plugin all-in-1 program + +(load-file "./plugin.el") + +;; list of clib / vlib / vnet / vpp skeleton files + +(load-file "./cli-cmd-skel.el") +(load-file "./config-skel.el") +(load-file "./dual-loop-skel.el") +(load-file "./periodic-skel.el") +(load-file "./pipe-skel.el") +(load-file "./plugin-all-apih-skel.el") +(load-file "./plugin-api-skel.el") +(load-file "./plugin-configure-skel.el") +(load-file "./plugin-h-skel.el") +(load-file "./plugin-main-skel.el") +(load-file "./plugin-makefile-skel.el") +(load-file "./plugin-msg-enum-skel.el") +(load-file "./plugin-node-skel.el") +(load-file "./plugin-test-skel.el") +(load-file "./tunnel-c-skel.el") +(load-file "./tunnel-decap-skel.el") +(load-file "./tunnel-encap-skel.el") +(load-file "./tunnel-h-skel.el") +(load-file "./elog-4-int-skel.el") +(load-file "./elog-4-int-track-skel.el") +(load-file "./elog-enum-skel.el") +(load-file "./elog-one-datum-skel.el") diff --git a/vpp/build-root/emacs-lisp/cli-cmd-skel.el b/vpp/build-root/emacs-lisp/cli-cmd-skel.el new file mode 100644 index 00000000..cf8658c4 --- /dev/null +++ b/vpp/build-root/emacs-lisp/cli-cmd-skel.el @@ -0,0 +1,32 @@ +;;; cli-cmd-skel.el - cli command skeleton + +(require 'skeleton) + +(define-skeleton skel-cli-cmd +"Insert a CLI command " +nil +'(setq cmd-name (skeleton-read "Command Name: ")) +'(setq path (skeleton-read "Path: ")) + +" +static clib_error_t * +" cmd-name "_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { + if (unformat (input, \"whatever %d\", &whatever)) + ; + else + return clib_error_return (0, \"unknown input `%U'\", + format_unformat_error, input); + } + return 0; +} + +VLIB_CLI_COMMAND (" cmd-name "_command, static) = { + .path = \"" path "\", + .short_help = \"" path "\", + .function = " cmd-name "_command_fn, +}; +") diff --git a/vpp/build-root/emacs-lisp/config-skel.el b/vpp/build-root/emacs-lisp/config-skel.el new file mode 100644 index 00000000..dc2ec380 --- /dev/null +++ b/vpp/build-root/emacs-lisp/config-skel.el @@ -0,0 +1,28 @@ +;;; config-skel.el - config function command skeleton + +(require 'skeleton) + +(define-skeleton skel-config +"Insert a vlib config skeleton " +nil +'(setq cfg-name (skeleton-read "Config Class Name: ")) + +" +static clib_error_t * +" cfg-name "_config (vlib_main_t * vm, unformat_input_t * input) +{ + u32 whatever; + + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { + if (unformat (input, \"whatever %d\", &whatever)) + ; + else + return clib_error_return (0, \"unknown input `%U'\", + format_unformat_error, input); + } + + return 0; +} + +VLIB_CONFIG_FUNCTION (" cfg-name "_config, \"" cfg-name "\"); +") diff --git a/vpp/build-root/emacs-lisp/dual-loop-skel.el b/vpp/build-root/emacs-lisp/dual-loop-skel.el new file mode 100644 index 00000000..b23d65ac --- /dev/null +++ b/vpp/build-root/emacs-lisp/dual-loop-skel.el @@ -0,0 +1,302 @@ +;;; dual-loop-skel.el - Eliotic dual-loop node skeleton + +(require 'skeleton) + +(define-skeleton skel-dual-loop +"Insert a skeleton dual-loop graph node" +nil +'(setq node-name (skeleton-read "Node Name: ")) +'(setq uc-node-name (upcase node-name)) +" +#include +#include +#include + +#include +#include + +#include +#include +#include + +typedef struct { + /* convenience */ + vlib_main_t * vlib_main; + vnet_main_t * vnet_main; + ethernet_main_t * ethernet_main; +} " node-name "_main_t; + +" node-name "_main_t " node-name "_main; + +vlib_node_registration_t " node-name "_node; + +typedef struct { + u32 next_index; + u32 sw_if_index; +} " node-name "_trace_t; + +/* packet trace format function */ +static u8 * format_" node-name "_trace (u8 * s, va_list * args) +{ + CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); + CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); + " node-name "_trace_t * t = va_arg (*args, " node-name "_trace_t *); + + s = format (s, \"" uc-node-name ": sw_if_index %d, next index %d\", + t->sw_if_index, t->next_index); + return s; +} + +vlib_node_registration_t " node-name "_node; + +#define foreach_" node-name "_error \\ +_(SWAPPED, \"Mac swap packets processed\") + +typedef enum { +#define _(sym,str) " uc-node-name "_ERROR_##sym, + foreach_" node-name "_error +#undef _ + " uc-node-name "_N_ERROR, +} " node-name "_error_t; + +static char * " node-name "_error_strings[] = { +#define _(sym,string) string, + foreach_" node-name "_error +#undef _ +}; + +typedef enum { + " uc-node-name "_NEXT_INTERFACE_OUTPUT, + " uc-node-name "_N_NEXT, +} " node-name "_next_t; + +#define foreach_mac_address_offset \\ +_(0) \\ +_(1) \\ +_(2) \\ +_(3) \\ +_(4) \\ +_(5) + +static uword +" node-name "_node_fn (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) +{ + u32 n_left_from, * from, * to_next; + " node-name "_next_t next_index; + u32 pkts_swapped = 0; + + from = vlib_frame_vector_args (frame); + n_left_from = frame->n_vectors; + next_index = node->cached_next_index; + + while (n_left_from > 0) + { + u32 n_left_to_next; + + vlib_get_next_frame (vm, node, next_index, + to_next, n_left_to_next); + + while (n_left_from >= 4 && n_left_to_next >= 2) + { + u32 next0 = " uc-node-name "_NEXT_INTERFACE_OUTPUT; + u32 next1 = " uc-node-name "_NEXT_INTERFACE_OUTPUT; + u32 sw_if_index0, sw_if_index1; + u8 tmp0[6], tmp1[6]; + ethernet_header_t *en0, *en1; + u32 bi0, bi1; + vlib_buffer_t * b0, * b1; + + /* Prefetch next iteration. */ + { + vlib_buffer_t * p2, * p3; + + p2 = vlib_get_buffer (vm, from[2]); + p3 = vlib_get_buffer (vm, from[3]); + + vlib_prefetch_buffer_header (p2, LOAD); + vlib_prefetch_buffer_header (p3, LOAD); + + CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE); + CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE); + } + + /* speculatively enqueue b0 and b1 to the current next frame */ + to_next[0] = bi0 = from[0]; + to_next[1] = bi1 = from[1]; + from += 2; + to_next += 2; + n_left_from -= 2; + n_left_to_next -= 2; + + b0 = vlib_get_buffer (vm, bi0); + b1 = vlib_get_buffer (vm, bi1); + + /* $$$$$ Dual loop: process 2 x packets here $$$$$ */ + ASSERT (b0->current_data == 0); + ASSERT (b1->current_data == 0); + + en0 = vlib_buffer_get_current (b0); + en1 = vlib_buffer_get_current (b1); + + /* This is not the fastest way to swap src + dst mac addresses */ +#define _(a) tmp0[a] = en0->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->src_address[a] = en0->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->dst_address[a] = tmp0[a]; + foreach_mac_address_offset; +#undef _ + +#define _(a) tmp1[a] = en1->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en1->src_address[a] = en1->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en1->dst_address[a] = tmp1[a]; + foreach_mac_address_offset; +#undef _ + + sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX]; + sw_if_index1 = vnet_buffer(b1)->sw_if_index[VLIB_RX]; + + /* Send pkt back out the RX interface */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0; + vnet_buffer(b1)->sw_if_index[VLIB_TX] = sw_if_index1; + + pkts_swapped += 2; + /* $$$$$ End of processing 2 x packets $$$$$ */ + + if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE))) + { + if (b0->flags & VLIB_BUFFER_IS_TRACED) + { + " node-name "_trace_t *t = + vlib_add_trace (vm, node, b0, sizeof (*t)); + t->sw_if_index = sw_if_index0; + t->next_index = next0; + } + if (b1->flags & VLIB_BUFFER_IS_TRACED) + { + " node-name "_trace_t *t = + vlib_add_trace (vm, node, b1, sizeof (*t)); + t->sw_if_index = sw_if_index1; + t->next_index = next1; + } + } + + /* verify speculative enqueues, maybe switch current next frame */ + vlib_validate_buffer_enqueue_x2 (vm, node, next_index, + to_next, n_left_to_next, + bi0, bi1, next0, next1); + } + + while (n_left_from > 0 && n_left_to_next > 0) + { + u32 bi0; + vlib_buffer_t * b0; + u32 next0 = " uc-node-name "_NEXT_INTERFACE_OUTPUT; + u32 sw_if_index0; + u8 tmp0[6]; + ethernet_header_t *en0; + + /* speculatively enqueue b0 to the current next frame */ + bi0 = from[0]; + to_next[0] = bi0; + from += 1; + to_next += 1; + n_left_from -= 1; + n_left_to_next -= 1; + + b0 = vlib_get_buffer (vm, bi0); + + /* $$$$$ Single loop: process 1 packet here $$$$$ */ + + /* + * Direct from the driver, we should be at offset 0 + * aka at &b0->data[0] + */ + ASSERT (b0->current_data == 0); + + en0 = vlib_buffer_get_current (b0); + + /* This is not the fastest way to swap src + dst mac addresses */ +#define _(a) tmp0[a] = en0->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->src_address[a] = en0->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->dst_address[a] = tmp0[a]; + foreach_mac_address_offset; +#undef _ + + sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX]; + + /* Send pkt back out the RX interface */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0; + + if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE) + && (b0->flags & VLIB_BUFFER_IS_TRACED))) + { + " node-name "_trace_t *t = + vlib_add_trace (vm, node, b0, sizeof (*t)); + t->sw_if_index = sw_if_index0; + t->next_index = next0; + } + + pkts_swapped += 1; + + /* $$$$$ Done processing 1 packet here $$$$$ */ + + /* verify speculative enqueue, maybe switch current next frame */ + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, + to_next, n_left_to_next, + bi0, next0); + } + + vlib_put_next_frame (vm, node, next_index, n_left_to_next); + } + + vlib_node_increment_counter (vm, " node-name "_node.index, + " uc-node-name "_ERROR_SWAPPED, pkts_swapped); + return frame->n_vectors; +} + +VLIB_REGISTER_NODE (" node-name "_node) = { + .function = " node-name "_node_fn, + .name = \"" node-name "\", + .vector_size = sizeof (u32), + .format_trace = format_" node-name "_trace, + .type = VLIB_NODE_TYPE_INTERNAL, + + .n_errors = ARRAY_LEN(" node-name "_error_strings), + .error_strings = " node-name "_error_strings, + + .n_next_nodes = " uc-node-name "_N_NEXT, + + /* edit / add dispositions here */ + .next_nodes = { + [" uc-node-name "_NEXT_INTERFACE_OUTPUT] = \"interface-output\", + }, +}; + +clib_error_t *" node-name "_init (vlib_main_t *vm) +{ + " node-name "_main_t *msm = &" node-name "_main; + + /* $$$$$ Initialize " node-name "_main_t structure here. $$$$$ */ + msm->vlib_main = vm; + msm->vnet_main = vnet_get_main(); + msm->ethernet_main = ethernet_get_main(vm); + + return 0; +} + +VLIB_INIT_FUNCTION(" node-name "_init); +") + diff --git a/vpp/build-root/emacs-lisp/elog-4-int-skel.el b/vpp/build-root/emacs-lisp/elog-4-int-skel.el new file mode 100644 index 00000000..fda412a7 --- /dev/null +++ b/vpp/build-root/emacs-lisp/elog-4-int-skel.el @@ -0,0 +1,31 @@ +;;; elog-4-int-skel.el - 4 integer elog skeleton + +(require 'skeleton) + +(define-skeleton skel-elog-4-int +"Insert a skeleton 4-integer event definition" +nil +'(setq function-name (skeleton-read "Function: ")) +'(setq label (skeleton-read "Label: ")) + +" + +/* $$$ May or may not be needed */ +#include +#include + +static inline void " function-name " (u32 *data) +{ + ELOG_TYPE_DECLARE(e) = + { + .format = \"" label ": first %d second %d third %d fourth %d\", + .format_args = \"i4i4i4i4\", + }; + struct { u32 data[4];} * ed; + ed = ELOG_DATA (&vlib_global_main.elog_main, e); + ed->data[0] = data[0]; + ed->data[1] = data[1]; + ed->data[2] = data[2]; + ed->data[3] = data[3]; +} +") diff --git a/vpp/build-root/emacs-lisp/elog-4-int-track-skel.el b/vpp/build-root/emacs-lisp/elog-4-int-track-skel.el new file mode 100644 index 00000000..506cc3a2 --- /dev/null +++ b/vpp/build-root/emacs-lisp/elog-4-int-track-skel.el @@ -0,0 +1,34 @@ +;;; elog-4-int-skel.el - 4 integer elog skeleton + +(require 'skeleton) + +(define-skeleton skel-elog-4-int-track +"Insert a skeleton 4-integer-with-track event definition" +nil +'(setq function-name (skeleton-read "Function: ")) +'(setq track-label (skeleton-read "Track Label: ")) +'(setq label (skeleton-read "Label: ")) + +" + +/* $$$ May or may not be needed */ +#include +#include + +static inline void " function-name " (u32 *data) +{ + ELOG_TYPE_DECLARE(e) = + { + .format = \"" label ": first %d second %d third %d fourth %d\", + .format_args = \"i4i4i4i4\", + }; + struct { u32 data[4];} * ed; + ELOG_TRACK(" track-label "); + ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, " track-label "); + ed->data[0] = data[0]; + ed->data[1] = data[1]; + ed->data[2] = data[2]; + ed->data[3] = data[3]; +} + +") diff --git a/vpp/build-root/emacs-lisp/elog-enum-skel.el b/vpp/build-root/emacs-lisp/elog-enum-skel.el new file mode 100644 index 00000000..836ce86a --- /dev/null +++ b/vpp/build-root/emacs-lisp/elog-enum-skel.el @@ -0,0 +1,35 @@ +;;; elog-enum-skel.el - enum elog skeleton + +(require 'skeleton) + +(define-skeleton skel-elog-enum +"Insert a skeleton enum event definition" +nil +'(setq function-name (skeleton-read "Function: ")) +'(setq label (skeleton-read "Label: ")) + +" + +/* $$$ May or may not be needed */ +#include +#include + +static inline void " function-name " (u8 which) +{ + ELOG_TYPE_DECLARE (e) = + { + .format = \"" label ": %s\", + .format_args = \"t1\", + .n_enum_strings = 2, + .enum_strings = + { + \"string 1\", + \"string 2\", + }, + }; + struct { u8 which;} * ed; + ed = ELOG_DATA (&vlib_global_main.elog_main, e); + ed->which = which; +} + +") diff --git a/vpp/build-root/emacs-lisp/elog-one-datum-skel.el b/vpp/build-root/emacs-lisp/elog-one-datum-skel.el new file mode 100644 index 00000000..11f83896 --- /dev/null +++ b/vpp/build-root/emacs-lisp/elog-one-datum-skel.el @@ -0,0 +1,28 @@ +;;; elog-one-datum-skel.el - single u32 datum elog skeleton + +(require 'skeleton) + +(define-skeleton skel-elog-one-datum +"Insert a skeleton single datum event definition" +nil +'(setq function-name (skeleton-read "Function: ")) +'(setq label (skeleton-read "Label: ")) + +" + +/* $$$ May or may not be needed */ +#include +#include + +static inline void " function-name " (u32 data) +{ + ELOG_TYPE_DECLARE (e) = + { + .format = \"" label ": %d\", + .format_args = \"i4\", + }; + + elog (&vlib_global_main.elog_main, &e, data); +} + +") diff --git a/vpp/build-root/emacs-lisp/fix-coding-style.el b/vpp/build-root/emacs-lisp/fix-coding-style.el new file mode 100755 index 00000000..0bb63483 --- /dev/null +++ b/vpp/build-root/emacs-lisp/fix-coding-style.el @@ -0,0 +1,162 @@ +#!/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 ) means insert xxx at the head of +;; Build a sorted list of *INDENT-OFF* lines, by searching +;; backwards. The initial (setq indent-offset-list nil) +;; results in (cdr ) 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)))) + + diff --git a/vpp/build-root/emacs-lisp/make-plugin.sh b/vpp/build-root/emacs-lisp/make-plugin.sh new file mode 100755 index 00000000..4985974c --- /dev/null +++ b/vpp/build-root/emacs-lisp/make-plugin.sh @@ -0,0 +1,4 @@ +#!/usr/bin/emacs --script +(load-file "./all-skel.el") +(make-plugin) +(save-some-buffers t) diff --git a/vpp/build-root/emacs-lisp/periodic-skel.el b/vpp/build-root/emacs-lisp/periodic-skel.el new file mode 100644 index 00000000..a8f3ef6d --- /dev/null +++ b/vpp/build-root/emacs-lisp/periodic-skel.el @@ -0,0 +1,86 @@ +;;; pipe-skel.el - pipelined graph node skeleton + +(require 'skeleton) + +(define-skeleton skel-periodic +"Insert a skeleton periodic process node" +nil +'(setq node-name (skeleton-read "Name: ")) +'(setq uc-node-name (upcase node-name)) +'(setq poll-period (skeleton-read "Poll period (f64 seconds, e.g. 10.0): ")) + +" +#define " uc-node-name "_POLL_PERIOD " poll-period " + +static uword +" node-name "_process (vlib_main_t * vm, + vlib_node_runtime_t * rt, + vlib_frame_t * f) +{ + f64 poll_time_remaining; + uword event_type, * event_data = 0; + + poll_time_remaining = " uc-node-name "_POLL_PERIOD; + while (1) { + int i; + + /* + * Sleep until next periodic call due, or until we receive event(s) + */ + poll_time_remaining = + vlib_process_wait_for_event_or_clock (vm, poll_time_remaining); + + event_type = vlib_process_get_events (vm, &event_data); + switch (event_type) { + case ~0: /* no events => timeout */ + break; + + /* + * $$$$ FIXME: add cases / handlers for each event type + */ + case EVENT1: + for (i = 0; i < vec_len (event_data); i++) + handle_event1 (mm, event_data[i]); + break; + + case EVENT2: + for (i = 0; i < vec_len (event_data); i++) + handle_event2 (vm, event_data[i]); + break; + + /* ... and so forth for each event type */ + + default: + /* This should never happen... */ + clib_warning (\"BUG: unhandled event type %d\", event_type); + break; + } + if (event_data) + _vec_len (event_data) = 0; + + /* Timer expired, call periodic function */ + if (vlib_process_suspend_time_is_zero (poll_time_remaining)) { + " node-name "_periodic (vm); + poll_time_remaining = " uc-node-name "_POLL_PERIOD; + } + } + + return 0; +} + +/* + * " node-name " periodic node declaration + */ +static VLIB_REGISTER_NODE (" node-name "_node) = { + .function = " node-name "_process, + .type = VLIB_NODE_TYPE_PROCESS, + .name = \"" node-name "-process\", +}; + +/* + * To signal an event: + * + * vlib_process_signal_event (vm, " node-name "_node.index, EVENTn, datum); + * + */ +") diff --git a/vpp/build-root/emacs-lisp/pipe-skel.el b/vpp/build-root/emacs-lisp/pipe-skel.el new file mode 100644 index 00000000..911e0d07 --- /dev/null +++ b/vpp/build-root/emacs-lisp/pipe-skel.el @@ -0,0 +1,132 @@ +;;; pipe-skel.el - pipelined graph node skeleton + +(require 'skeleton) + +(define-skeleton skel-pipeline-node +"Insert a skeleton pipelined graph node" +nil +'(setq node-name (skeleton-read "Node Name: ")) +'(setq uc-node-name (upcase node-name)) +'(setq nstages (skeleton-read "Number of pipeline stages: ")) +" +#include +#include + +/* + * Dump these counters via the \"show error\" CLI command + * FIXME: Add packet counter / error strings as desired + */ + +#define foreach_" node-name "_error \\ +_(ERROR1, \"sample counter/ error string\") + +static char * " node-name "_error_strings[] = { +#define _(sym,string) string, + foreach_" node-name "_error +#undef _ +}; + +/* + * packet error / counter enumeration + * + * To count and drop a vlib_buffer_t *b: + * + * Set b->error = node->errors[" uc-node-name "_ERROR_xxx]; + * last_stage returns a disposition index bound to \"error-drop\" + * + * To manually increment the specific counter " uc-node-name "_ERROR1 + * + * vlib_node_t *n = vlib_get_node (vm, " node-name ".index); + * u32 node_counter_base_index = n->error_heap_index; + * vlib_error_main_t * em = &vm->error_main; + * em->counters[node_counter_base_index + " uc-node-name "_ERROR1] += 1; + * + */ + +typedef enum { +#define _(sym,str) " uc-node-name "_ERROR_##sym, + foreach_" node-name "_error +#undef _ + " uc-node-name "_N_ERROR, +} " node-name "_error_t; + +/* + * enumeration of per-packet dispositions + * FIXME: add dispositions as desired + */ + +typedef enum { \n" +" " uc-node-name "_NEXT_NORMAL,\n" +" " uc-node-name "_N_NEXT, +} " node-name "_next_t; + +#define NSTAGES " nstages " + +/* + * Use the generic buffer metadata + first line of packet data prefetch + * stage function from . This is usually a Good Idea. + */ +#define stage0 generic_stage0 + +/* + * FIXME: add stage functions. Here is the function prototype: + * + * static inline void stageN (vlib_main_t * vm, + * vlib_node_runtime_t * node, + * u32 buffer_index) + */ + +/* + * FIXME: the last pipeline stage returns the desired pkt next node index, + * from the " node-name "_next_t enum above + */ +static inline u32 last_stage (vlib_main_t *vm, vlib_node_runtime_t *node, + u32 bi) +{ + vlib_buffer_t *b = vlib_get_buffer (vm, bi); + + b->error = node->errors[EXAMPLE_ERROR_ERROR1]; + + return " uc-node-name "_NEXT_NORMAL; +} + +#include + +static uword " node-name "_node_fn (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) +{ + return dispatch_pipeline (vm, node, frame); +} + +static VLIB_REGISTER_NODE (example_node) = { + .function = " node-name "_node_fn, + .name = \"" node-name "-node\", + .vector_size = sizeof (u32), + .type = VLIB_NODE_TYPE_INTERNAL, + + .n_errors = ARRAY_LEN(" node-name "_error_strings), + .error_strings = " node-name "_error_strings, + + .n_next_nodes = " uc-node-name "_N_NEXT, + + /* edit / add dispositions here */ + .next_nodes = { + [" uc-node-name "_NEXT_NORMAL] = \"error-drop\", + }, +}; + +/* + * packet generator definition to push superframes of data into the + * new graph node. Cut and paste into , then + * \"exec \", \"pa enable test\" at the QVNET prompt... + * +packet-generator new { + name test + limit 100 + node " node-name "-node + size 374-374 + data { hex 0x02b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2043333735304520536f66747761726520284333373530452d554e4956455253414c2d4d292c2056657273696f6e2031322e32283335295345352c2052454c4541534520534f4654574152452028666331290a436f707972696768742028632920313938362d3230303720627920436973636f2053797374656d732c20496e632e0a436f6d70696c6564205468752031392d4a756c2d30372031363a3137206279206e616368656e00060018636973636f2057532d4333373530452d3234544400020011000000010101cc0004000000000003001b54656e4769676162697445746865726e6574312f302f3100040008000000280008002400000c011200000000ffffffff010221ff000000000000001e7a50f000ff000000090004000a00060001000b0005010012000500001300050000160011000000010101cc000400000000001a00100000000100000000ffffffff } +} + */ +") diff --git a/vpp/build-root/emacs-lisp/plugin-all-apih-skel.el b/vpp/build-root/emacs-lisp/plugin-all-apih-skel.el new file mode 100644 index 00000000..0f073f9c --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-all-apih-skel.el @@ -0,0 +1,43 @@ +;;; plugin-all-apih-skel.el - vpp engine plug-in "all-apih.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-all-apih +"Insert a plug-in 'all_api_h.h' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * " plugin-name "_all_api_h.h - skeleton vpp engine plug-in api #include file + * + * Copyright (c) + * 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 the generated file, see BUILT_SOURCES in Makefile.am */ +#include <" plugin-name "/" plugin-name ".api.h> +") diff --git a/vpp/build-root/emacs-lisp/plugin-api-skel.el b/vpp/build-root/emacs-lisp/plugin-api-skel.el new file mode 100644 index 00000000..74519e70 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-api-skel.el @@ -0,0 +1,48 @@ +;;; plugin-api-skel.el - vpp engine plug-in "all-apih.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-api +"Insert a plug-in '.api' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* Define a simple enable-disable binary API to control the feature */ + +define " plugin-name "_enable_disable { + /* Client identifier, set from api_main.my_client_index */ + u32 client_index; + + /* Arbitrary context, so client can match reply to request */ + u32 context; + + /* Enable / disable the feature */ + u8 enable_disable; + + /* Interface handle */ + u32 sw_if_index; +}; + +define " plugin-name "_enable_disable_reply { + /* From the request */ + u32 context; + + /* Return value, zero means all OK */ + i32 retval; +}; +") diff --git a/vpp/build-root/emacs-lisp/plugin-configure-skel.el b/vpp/build-root/emacs-lisp/plugin-configure-skel.el new file mode 100644 index 00000000..ebf0bf69 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-configure-skel.el @@ -0,0 +1,33 @@ +;;; plugin-configure-skel.el - vpp engine plug-in "main.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-configure +"Insert a plug-in 'configure.ac' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +AC_INIT(" plugin-name "_plugin, 1.0) +AM_INIT_AUTOMAKE +AM_SILENT_RULES([yes]) + +AC_PROG_LIBTOOL +AC_PROG_CC + +AC_OUTPUT([Makefile]) +") diff --git a/vpp/build-root/emacs-lisp/plugin-h-skel.el b/vpp/build-root/emacs-lisp/plugin-h-skel.el new file mode 100644 index 00000000..8bf9b6fe --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-h-skel.el @@ -0,0 +1,66 @@ +;;; plugin-h-skel.el - vpp engine plug-in "main.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-h +"Insert a plug-in 'main.c' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * " plugin-name ".h - skeleton vpp engine plug-in header file + * + * Copyright (c) + * 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. + */ +#ifndef __included_" plugin-name "_h__ +#define __included_" plugin-name "_h__ + +#include +#include +#include + +#include +#include + +typedef struct { + /* API message ID base */ + u16 msg_id_base; + + /* convenience */ + vlib_main_t * vlib_main; + vnet_main_t * vnet_main; + ethernet_main_t * ethernet_main; +} " plugin-name "_main_t; + +" plugin-name "_main_t " plugin-name "_main; + +vlib_node_registration_t " plugin-name "_node; + +#endif /* __included_" plugin-name "_h__ */ +") diff --git a/vpp/build-root/emacs-lisp/plugin-main-skel.el b/vpp/build-root/emacs-lisp/plugin-main-skel.el new file mode 100644 index 00000000..47240695 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-main-skel.el @@ -0,0 +1,275 @@ +;;; plugin-main-skel.el - vpp engine plug-in "main.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-main +"Insert a plug-in 'main.c' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * " plugin-name ".c - skeleton vpp engine plug-in + * + * Copyright (c) + * 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 +#include +#include <" plugin-name "/" plugin-name ".h> + +#include +#include +#include + +/* define message IDs */ +#include <" plugin-name "/" plugin-name "_msg_enum.h> + +/* define message structures */ +#define vl_typedefs +#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> +#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> +#undef vl_printfun + +/* Get the API version number */ +#define vl_api_version(n,v) static u32 api_version=(v); +#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 + * rmp - pointer to reply message type + * rv - return value + */ + +#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)+sm->msg_id_base); \\ + rmp->context = mp->context; \\ + rmp->retval = ntohl(rv); \\ + \\ + vl_msg_api_send_shmem (q, (u8 *)&rmp); \\ +} while(0); + + +/* List of message types that this plugin understands */ + +#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 * +vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h, + int from_early_init) +{ + " plugin-name "_main_t * sm = &" plugin-name "_main; + clib_error_t * error = 0; + + sm->vlib_main = vm; + sm->vnet_main = h->vnet_main; + sm->ethernet_main = h->ethernet_main; + + return error; +} + +/* Action function shared between message handler and debug CLI */ + +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; + + /* Utterly wrong? */ + if (pool_is_free_index (sm->vnet_main->interface_main.sw_interfaces, + sw_if_index)) + return VNET_API_ERROR_INVALID_SW_IF_INDEX; + + /* Not a physical port? */ + 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); + + return rv; +} + +static clib_error_t * +" plugin-name "_enable_disable_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + " 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) { + if (unformat (input, \"disable\")) + enable_disable = 0; + else if (unformat (input, \"%U\", unformat_vnet_sw_interface, + sm->vnet_main, &sw_if_index)) + ; + else + break; + } + + 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) { + case 0: + break; + + case VNET_API_ERROR_INVALID_SW_IF_INDEX: + return clib_error_return + (0, \"Invalid interface, only works on physical ports\"); + break; + + case VNET_API_ERROR_UNIMPLEMENTED: + return clib_error_return (0, \"Device driver doesn't support redirection\"); + break; + + default: + return clib_error_return (0, \"" plugin-name "_enable_disable returned %d\", + rv); + } + return 0; +} + +VLIB_CLI_COMMAND (" plugin-name "_enable_disable_command, static) = { + .path = \"" plugin-name " enable-disable\", + .short_help = + \"" plugin-name " enable-disable [disable]\", + .function = " plugin-name "_enable_disable_command_fn, +}; + +/* API message handler */ +static void vl_api_" plugin-name "_enable_disable_t_handler +(vl_api_" plugin-name "_enable_disable_t * mp) +{ + vl_api_" plugin-name "_enable_disable_reply_t * rmp; + " plugin-name "_main_t * sm = &" plugin-name "_main; + int rv; + + rv = " plugin-name "_enable_disable (sm, ntohl(mp->sw_if_index), + (int) (mp->enable_disable)); + + REPLY_MACRO(VL_API_" PLUGIN-NAME "_ENABLE_DISABLE_REPLY); +} + +/* Set up the API message handling tables */ +static clib_error_t * +" plugin-name "_plugin_api_hookup (vlib_main_t *vm) +{ + " plugin-name "_main_t * sm = &" plugin-name "_main; +#define _(N,n) \\ + vl_msg_api_set_handlers((VL_API_##N + sm->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_" 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; + clib_error_t * error = 0; + u8 * name; + + 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 + ((char *) name, VL_MSG_FIRST_AVAILABLE); + + error = " plugin-name "_plugin_api_hookup (vm); + + vec_free(name); + + return error; +} + +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\"), +}; +") + diff --git a/vpp/build-root/emacs-lisp/plugin-makefile-skel.el b/vpp/build-root/emacs-lisp/plugin-makefile-skel.el new file mode 100644 index 00000000..7cb6cbfd --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-makefile-skel.el @@ -0,0 +1,75 @@ +;;; plugin-makefile-skel.el - vpp engine plug-in "main.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-makefile +"Insert a plug-in 'Makefile.am' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +# Copyright (c) +# 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. + +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 + +" plugin-name "_plugin_la_SOURCES = " plugin-name "/" plugin-name ".c \\ + " plugin-name "/node.c \\ + " plugin-name "/" plugin-name "_plugin.api.h +" plugin-name "_plugin_la_LDFLAGS = -module + +BUILT_SOURCES = " plugin-name "/" plugin-name ".api.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 = \\ + " 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 + +# Remove *.la files +install-data-hook: + @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES)) + @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES)) +") diff --git a/vpp/build-root/emacs-lisp/plugin-msg-enum-skel.el b/vpp/build-root/emacs-lisp/plugin-msg-enum-skel.el new file mode 100644 index 00000000..c44af051 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-msg-enum-skel.el @@ -0,0 +1,55 @@ +;;; plugin-msg-enum-skel.el - vpp engine plug-in message enum skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-msg-enum +"Insert a plug-in message enumeration skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * " plugin-name "_msg_enum.h - skeleton vpp engine plug-in message enumeration + * + * Copyright (c) + * 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. + */ +#ifndef included_" plugin-name "_msg_enum_h +#define included_" plugin-name "_msg_enum_h + +#include + +#define vl_msg_id(n,h) n, +typedef enum { +#include <" plugin-name "/" plugin-name "_all_api_h.h> + /* We'll want to know how many messages IDs we need... */ + VL_MSG_FIRST_AVAILABLE, +} vl_msg_id_t; +#undef vl_msg_id + +#endif /* included_" plugin-name "_msg_enum_h */ +") diff --git a/vpp/build-root/emacs-lisp/plugin-node-skel.el b/vpp/build-root/emacs-lisp/plugin-node-skel.el new file mode 100644 index 00000000..ee745c35 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-node-skel.el @@ -0,0 +1,320 @@ +;;; plugin-node-skel.el - vpp engine plug-in "node.c" skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-node +"Insert a plug-in 'node.c' skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * node.c - skeleton vpp engine plug-in dual-loop node skeleton + * + * Copyright (c) + * 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 +#include +#include +#include +#include <" plugin-name "/" plugin-name ".h> + +typedef struct { + u32 next_index; + u32 sw_if_index; + u8 new_src_mac[6]; + u8 new_dst_mac[6]; +} " plugin-name "_trace_t; + +static u8 * +format_mac_address (u8 * s, va_list * args) +{ + u8 *a = va_arg (*args, u8 *); + return format (s, \"%02x:%02x:%02x:%02x:%02x:%02x\", + a[0], a[1], a[2], a[3], a[4], a[5]); +} + +/* packet trace format function */ +static u8 * format_" plugin-name "_trace (u8 * s, va_list * args) +{ + CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); + CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); + " plugin-name "_trace_t * t = va_arg (*args, " plugin-name "_trace_t *); + + s = format (s, \"" PLUGIN-NAME ": sw_if_index %d, next index %d\\n\", + t->sw_if_index, t->next_index); + s = format (s, \" new src %U -> new dst %U\", + format_mac_address, t->new_src_mac, + format_mac_address, t->new_dst_mac); + return s; +} + +vlib_node_registration_t " plugin-name "_node; + +#define foreach_" plugin-name "_error \\ +_(SWAPPED, \"Mac swap packets processed\") + +typedef enum { +#define _(sym,str) " PLUGIN-NAME "_ERROR_##sym, + foreach_" plugin-name "_error +#undef _ + " PLUGIN-NAME "_N_ERROR, +} " plugin-name "_error_t; + +static char * " plugin-name "_error_strings[] = { +#define _(sym,string) string, + foreach_" plugin-name "_error +#undef _ +}; + +typedef enum { + " PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT, + " PLUGIN-NAME "_N_NEXT, +} " plugin-name "_next_t; + +#define foreach_mac_address_offset \\ +_(0) \\ +_(1) \\ +_(2) \\ +_(3) \\ +_(4) \\ +_(5) + +static uword +" plugin-name "_node_fn (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) +{ + u32 n_left_from, * from, * to_next; + " plugin-name "_next_t next_index; + u32 pkts_swapped = 0; + + from = vlib_frame_vector_args (frame); + n_left_from = frame->n_vectors; + next_index = node->cached_next_index; + + while (n_left_from > 0) + { + u32 n_left_to_next; + + vlib_get_next_frame (vm, node, next_index, + to_next, n_left_to_next); + + while (n_left_from >= 4 && n_left_to_next >= 2) + { + u32 next0 = " PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT; + u32 next1 = " PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT; + u32 sw_if_index0, sw_if_index1; + u8 tmp0[6], tmp1[6]; + ethernet_header_t *en0, *en1; + u32 bi0, bi1; + vlib_buffer_t * b0, * b1; + + /* Prefetch next iteration. */ + { + vlib_buffer_t * p2, * p3; + + p2 = vlib_get_buffer (vm, from[2]); + p3 = vlib_get_buffer (vm, from[3]); + + vlib_prefetch_buffer_header (p2, LOAD); + vlib_prefetch_buffer_header (p3, LOAD); + + CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE); + CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE); + } + + /* speculatively enqueue b0 and b1 to the current next frame */ + to_next[0] = bi0 = from[0]; + to_next[1] = bi1 = from[1]; + from += 2; + to_next += 2; + n_left_from -= 2; + n_left_to_next -= 2; + + b0 = vlib_get_buffer (vm, bi0); + b1 = vlib_get_buffer (vm, bi1); + + ASSERT (b0->current_data == 0); + ASSERT (b1->current_data == 0); + + en0 = vlib_buffer_get_current (b0); + en1 = vlib_buffer_get_current (b1); + + /* This is not the fastest way to swap src + dst mac addresses */ +#define _(a) tmp0[a] = en0->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->src_address[a] = en0->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->dst_address[a] = tmp0[a]; + foreach_mac_address_offset; +#undef _ + +#define _(a) tmp1[a] = en1->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en1->src_address[a] = en1->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en1->dst_address[a] = tmp1[a]; + foreach_mac_address_offset; +#undef _ + + + + sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX]; + sw_if_index1 = vnet_buffer(b1)->sw_if_index[VLIB_RX]; + + /* Send pkt back out the RX interface */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0; + vnet_buffer(b1)->sw_if_index[VLIB_TX] = sw_if_index1; + + pkts_swapped += 2; + + if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE))) + { + if (b0->flags & VLIB_BUFFER_IS_TRACED) + { + " plugin-name "_trace_t *t = + vlib_add_trace (vm, node, b0, sizeof (*t)); + t->sw_if_index = sw_if_index0; + t->next_index = next0; + clib_memcpy (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); + } + if (b1->flags & VLIB_BUFFER_IS_TRACED) + { + " plugin-name "_trace_t *t = + vlib_add_trace (vm, node, b1, sizeof (*t)); + t->sw_if_index = sw_if_index1; + t->next_index = next1; + clib_memcpy (t->new_src_mac, en1->src_address, + sizeof (t->new_src_mac)); + clib_memcpy (t->new_dst_mac, en1->dst_address, + sizeof (t->new_dst_mac)); + } + } + + /* verify speculative enqueues, maybe switch current next frame */ + vlib_validate_buffer_enqueue_x2 (vm, node, next_index, + to_next, n_left_to_next, + bi0, bi1, next0, next1); + } + + while (n_left_from > 0 && n_left_to_next > 0) + { + u32 bi0; + vlib_buffer_t * b0; + u32 next0 = " PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT; + u32 sw_if_index0; + u8 tmp0[6]; + ethernet_header_t *en0; + + /* speculatively enqueue b0 to the current next frame */ + bi0 = from[0]; + to_next[0] = bi0; + from += 1; + to_next += 1; + n_left_from -= 1; + n_left_to_next -= 1; + + b0 = vlib_get_buffer (vm, bi0); + /* + * Direct from the driver, we should be at offset 0 + * aka at &b0->data[0] + */ + ASSERT (b0->current_data == 0); + + en0 = vlib_buffer_get_current (b0); + + /* This is not the fastest way to swap src + dst mac addresses */ +#define _(a) tmp0[a] = en0->src_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->src_address[a] = en0->dst_address[a]; + foreach_mac_address_offset; +#undef _ +#define _(a) en0->dst_address[a] = tmp0[a]; + foreach_mac_address_offset; +#undef _ + + sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX]; + + /* Send pkt back out the RX interface */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0; + + if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE) + && (b0->flags & VLIB_BUFFER_IS_TRACED))) { + " plugin-name "_trace_t *t = + vlib_add_trace (vm, node, b0, sizeof (*t)); + t->sw_if_index = sw_if_index0; + t->next_index = next0; + clib_memcpy (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); + } + + pkts_swapped += 1; + + /* verify speculative enqueue, maybe switch current next frame */ + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, + to_next, n_left_to_next, + bi0, next0); + } + + vlib_put_next_frame (vm, node, next_index, n_left_to_next); + } + + vlib_node_increment_counter (vm, " plugin-name "_node.index, + " PLUGIN-NAME "_ERROR_SWAPPED, pkts_swapped); + return frame->n_vectors; +} + +VLIB_REGISTER_NODE (" plugin-name "_node) = { + .function = " plugin-name "_node_fn, + .name = \"" plugin-name "\", + .vector_size = sizeof (u32), + .format_trace = format_" plugin-name "_trace, + .type = VLIB_NODE_TYPE_INTERNAL, + + .n_errors = ARRAY_LEN(" plugin-name "_error_strings), + .error_strings = " plugin-name "_error_strings, + + .n_next_nodes = " PLUGIN-NAME "_N_NEXT, + + /* edit / add dispositions here */ + .next_nodes = { + [" PLUGIN-NAME "_NEXT_INTERFACE_OUTPUT] = \"interface-output\", + }, +}; +") diff --git a/vpp/build-root/emacs-lisp/plugin-test-skel.el b/vpp/build-root/emacs-lisp/plugin-test-skel.el new file mode 100644 index 00000000..5231a236 --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin-test-skel.el @@ -0,0 +1,235 @@ +;;; plugin-test-skel.el - vpp-api-test plug-in skeleton +;;; +;;; 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. + +(require 'skeleton) + +(define-skeleton skel-plugin-test +"Insert a plug-in vpp-api-test skeleton " +nil +'(if (not (boundp 'plugin-name)) + (setq plugin-name (read-string "Plugin name: "))) +'(setq PLUGIN-NAME (upcase plugin-name)) +" +/* + * " plugin-name ".c - skeleton vpp-api-test plug-in + * + * Copyright (c) + * 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 +#include +#include +#include +#include + +uword unformat_sw_if_index (unformat_input_t * input, va_list * args); + +/* Declare message IDs */ +#include <" plugin-name "/" plugin-name "_msg_enum.h> + +/* define message structures */ +#define vl_typedefs +#include <" plugin-name "/" plugin-name "_all_api_h.h> +#undef vl_typedefs + +/* declare message handlers for each api */ + +#define vl_endianfun /* define message structures */ +#include <" plugin-name "/" plugin-name "_all_api_h.h> +#undef vl_endianfun + +/* instantiate all the print functions we know about */ +#define vl_print(handle, ...) +#define vl_printfun +#include <" plugin-name "/" plugin-name "_all_api_h.h> +#undef vl_printfun + +/* Get the API version number. */ +#define vl_api_version(n,v) static u32 api_version=(v); +#include <" plugin-name "/" plugin-name "_all_api_h.h> +#undef vl_api_version + + +typedef struct { + /* API message ID base */ + u16 msg_id_base; + vat_main_t *vat_main; +} " plugin-name "_test_main_t; + +" plugin-name "_test_main_t " plugin-name "_test_main; + +#define foreach_standard_reply_retval_handler \\ +_(" plugin-name "_enable_disable_reply) + +#define _(n) \\ + static void vl_api_##n##_t_handler \\ + (vl_api_##n##_t * mp) \\ + { \\ + vat_main_t * vam = " plugin-name "_test_main.vat_main; \\ + i32 retval = ntohl(mp->retval); \\ + if (vam->async_mode) { \\ + vam->async_errors += (retval < 0); \\ + } else { \\ + vam->retval = retval; \\ + vam->result_ready = 1; \\ + } \\ + } +foreach_standard_reply_retval_handler; +#undef _ + +/* + * Table of message reply handlers, must include boilerplate handlers + * we just generated + */ +#define foreach_vpe_api_reply_msg \\ +_(" PLUGIN-NAME "_ENABLE_DISABLE_REPLY, " plugin-name "_enable_disable_reply) + + +/* M: construct, but don't yet send a message */ + +#define M(T,t) \\ +do { \\ + vam->result_ready = 0; \\ + mp = vl_msg_api_alloc(sizeof(*mp)); \\ + memset (mp, 0, sizeof (*mp)); \\ + mp->_vl_msg_id = ntohs (VL_API_##T + sm->msg_id_base); \\ + mp->client_index = vam->my_client_index; \\ +} while(0); + +#define M2(T,t,n) \\ +do { \\ + vam->result_ready = 0; \\ + mp = vl_msg_api_alloc(sizeof(*mp)+(n)); \\ + memset (mp, 0, sizeof (*mp)); \\ + mp->_vl_msg_id = ntohs (VL_API_##T + sm->msg_id_base); \\ + mp->client_index = vam->my_client_index; \\ +} while(0); + +/* S: send a message */ +#define S (vl_msg_api_send_shmem (vam->vl_input_queue, (u8 *)&mp)) + +/* W: wait for results, with timeout */ +#define W \\ +do { \\ + timeout = vat_time_now (vam) + 1.0; \\ + \\ + while (vat_time_now (vam) < timeout) { \\ + if (vam->result_ready == 1) { \\ + return (vam->retval); \\ + } \\ + } \\ + return -99; \\ +} while(0); + +static int api_" plugin-name "_enable_disable (vat_main_t * vam) +{ + " plugin-name "_test_main_t * sm = &" plugin-name "_test_main; + unformat_input_t * i = vam->input; + f64 timeout; + int enable_disable = 1; + u32 sw_if_index = ~0; + vl_api_" plugin-name "_enable_disable_t * mp; + + /* Parse args required to build the message */ + while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { + if (unformat (i, \"%U\", unformat_sw_if_index, vam, &sw_if_index)) + ; + else if (unformat (i, \"sw_if_index %d\", &sw_if_index)) + ; + else if (unformat (i, \"disable\")) + enable_disable = 0; + else + break; + } + + if (sw_if_index == ~0) { + errmsg (\"missing interface name / explicit sw_if_index number \\n\"); + return -99; + } + + /* Construct the API message */ + M(" PLUGIN-NAME "_ENABLE_DISABLE, " plugin-name "_enable_disable); + mp->sw_if_index = ntohl (sw_if_index); + mp->enable_disable = enable_disable; + + /* send it... */ + S; + + /* Wait for a reply... */ + W; +} + +/* + * List of messages that the api test plugin sends, + * and that the data plane plugin processes + */ +#define foreach_vpe_api_msg \\ +_(" plugin-name "_enable_disable, \" [disable]\") + +void vat_api_hookup (vat_main_t *vam) +{ + " plugin-name "_test_main_t * sm = &" plugin-name "_test_main; + /* Hook up handlers for replies from the data plane plug-in */ +#define _(N,n) \\ + vl_msg_api_set_handlers((VL_API_##N + sm->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_vpe_api_reply_msg; +#undef _ + + /* API messages we can send */ +#define _(n,h) hash_set_mem (vam->function_by_name, #n, api_##n); + foreach_vpe_api_msg; +#undef _ + + /* Help strings */ +#define _(n,h) hash_set_mem (vam->help_by_name, #n, h); + foreach_vpe_api_msg; +#undef _ +} + +clib_error_t * vat_plugin_register (vat_main_t *vam) +{ + " plugin-name "_test_main_t * sm = &" plugin-name "_test_main; + u8 * name; + + sm->vat_main = vam; + + /* Ask the vpp engine for the first assigned message-id */ + name = format (0, \"" plugin-name "_%08x%c\", api_version, 0); + sm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name); + + if (sm->msg_id_base != (u16) ~0) + vat_api_hookup (vam); + + vec_free(name); + + return 0; +} +") diff --git a/vpp/build-root/emacs-lisp/plugin.el b/vpp/build-root/emacs-lisp/plugin.el new file mode 100644 index 00000000..006ae54d --- /dev/null +++ b/vpp/build-root/emacs-lisp/plugin.el @@ -0,0 +1,35 @@ +(defun make-plugin () + "Create a plugin" + (interactive) + (save-excursion + (let (cd-args cmd-args start-dir) + (setq start-dir default-directory) + (makunbound 'plugin-name) + (makunbound 'PLUGIN-NAME) + (setq plugin-name (read-string "Plugin name: ")) + (setq PLUGIN-NAME (upcase plugin-name)) + (setq cmd-args (concat "mkdir -p " plugin-name "-plugin/" plugin-name)) + (shell-command cmd-args) + (setq cd-args (concat start-dir plugin-name "-plugin")) + (setq default-directory cd-args) + (find-file "Makefile.am") + (skel-plugin-makefile) + (find-file "configure.ac") + (skel-plugin-configure) + (setq default-directory (concat cd-args "/" plugin-name)) + (find-file (concat plugin-name ".api")) + (skel-plugin-api) + (find-file (concat plugin-name "_all_api_h.h")) + (skel-plugin-all-apih) + (find-file (concat plugin-name ".h")) + (skel-plugin-h) + (find-file (concat plugin-name ".c")) + (skel-plugin-main) + (find-file (concat plugin-name "_msg_enum.h")) + (skel-plugin-msg-enum) + (find-file "node.c") + (skel-plugin-node) + (find-file (concat plugin-name "_test.c")) + (skel-plugin-test) + (cd start-dir)))) + diff --git a/vpp/build-root/emacs-lisp/tunnel-c-skel.el b/vpp/build-root/emacs-lisp/tunnel-c-skel.el new file mode 100644 index 00000000..aa260e53 --- /dev/null +++ b/vpp/build-root/emacs-lisp/tunnel-c-skel.el @@ -0,0 +1,441 @@ +;;; tunnel-c-skel.el - tunnel encap cli / api + +(require 'skeleton) + +(define-skeleton skel-tunnel-c +"Insert a tunnel cli/api implementation" +nil +'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): ")) +'(setq ENCAP_STACK (upcase encap_stack)) +'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack)) +" +#include + +" encap_stack "_main_t " encap_stack "_main; + +static u8 * format_decap_next (u8 * s, va_list * args) +{ + u32 next_index = va_arg (*args, u32); + + switch (next_index) + { + case " ENCAP_STACK "_INPUT_NEXT_DROP: + return format (s, \"drop\"); + case " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT: + return format (s, \"ip4\"); + case " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT: + return format (s, \"ip6\"); + case " ENCAP_STACK "_INPUT_NEXT_" ENCAP_STACK "_ENCAP: + return format (s, \"" encap-stack "\"); + default: + return format (s, \"unknown %d\", next_index); + } + return s; +} + +u8 * format_" encap_stack "_tunnel (u8 * s, va_list * args) +{ + " encap_stack "_tunnel_t * t = va_arg (*args, " encap_stack "_tunnel_t *); + " encap_stack "_main_t * ngm = &" encap_stack "_main; + + s = format (s, + \"[%d] %U (src) %U (dst) fibs: encap %d, decap %d\", + t - ngm->tunnels, + format_ip4_address, &t->src, + format_ip4_address, &t->dst, + t->encap_fib_index, + t->decap_fib_index); + + s = format (s, \" decap next %U\\n\", format_decap_next, t->decap_next_index); + /* FIXME: add protocol details */ + return s; +} + +static u8 * format_" encap_stack "_name (u8 * s, va_list * args) +{ + u32 dev_instance = va_arg (*args, u32); + return format (s, \"" encap_stack "_tunnel%d\", dev_instance); +} + +static uword dummy_interface_tx (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) +{ + clib_warning (\"you shouldn't be here, leaking buffers...\"); + return frame->n_vectors; +} + +VNET_DEVICE_CLASS (" encap_stack "_device_class,static) = { + .name = "" ENCAP_STACK "", + .format_device_name = format_" encap_stack "_name, + .format_tx_trace = format_" encap_stack "_encap_trace, + .tx_function = dummy_interface_tx, +}; + +static uword dummy_set_rewrite (vnet_main_t * vnm, + u32 sw_if_index, + u32 l3_type, + void * dst_address, + void * rewrite, + uword max_rewrite_bytes) +{ + return 0; +} + +u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args) +{ + " encap_stack "_header_t * h = va_arg (*args, " encap_stack "_header_t *); + u32 max_header_bytes = va_arg (*args, u32); + u32 header_bytes; + + header_bytes = sizeof (h[0]); + if (max_header_bytes != 0 && header_bytes > max_header_bytes) + return format (s, \"" encap-stack "header truncated\"); + + /* FIXME: pretty-print an " encap_stack " header */ + + return s; +} + +VNET_HW_INTERFACE_CLASS (" encap_stack "_hw_class) = { + .name = \"" ENCAP_STACK "\", + .format_header = format_" encap_stack "_header_with_length, + .set_rewrite = dummy_set_rewrite, +}; + +#define foreach_copy_field \ +_(src.as_u32) \ +_(dst.as_u32) \ +_(encap_fib_index) \ +_(decap_fib_index) \ +_(decap_next_index) \ +_(FIXME_ADD_ALL_COPY_FIELDS ) + +static int " encap_stack "_rewrite (" encap_stack "_tunnel_t * t) +{ + u8 *rw = 0; + ip4_header_t * ip0; + " encap_stack "_header_t * h0; + int len; + + len = sizeof (*h0); + + vec_validate_aligned (rw, len-1, CLIB_CACHE_LINE_BYTES); + + h0 = (ip4_udp_" encap_stack "_header_t *) rw; + + /* FIXME: build the actual header here... */ + + /* Fixed portion of the (outer) ip4 header */ + ip0 = &h0->ip4; + ip0->ip_version_and_header_length = 0x45; + ip0->ttl = 254; + ip0->protocol = IP_PROTOCOL_UDP; + + /* we'll fix up the ip4 header length and checksum after-the-fact */ + ip0->src_address.as_u32 = t->src.as_u32; + ip0->dst_address.as_u32 = t->dst.as_u32; + ip0->checksum = ip4_header_checksum (ip0); + + /* UDP header, randomize src port on something, maybe? */ + h0->udp.src_port = clib_host_to_net_u16 (4341); + h0->udp.dst_port = clib_host_to_net_u16 (UDP_DST_PORT_" encap_stack "); + + /* $$$ build a tunnel header here */ + + t->rewrite = rw; + return (0); +} + +int vnet_" encap_stack "_add_del_tunnel +(vnet_" encap_stack "_add_del_tunnel_args_t *a, u32 * hw_if_indexp) +{ + " encap_stack "_main_t * ngm = &" encap_stack "_main; + " encap_stack "_tunnel_t *t = 0; + vnet_main_t * vnm = ngm->vnet_main; + vnet_hw_interface_t * hi; + uword * p; + u32 hw_if_index = ~0; + int rv; + " encap_stack "_tunnel_key_t key, *key_copy; + hash_pair_t *hp; + + key.FIXME = clib_host_to_net_XXX(FIXME); + + p = hash_get_mem (ngm->" encap_stack "_tunnel_by_key, &key); + + if (a->is_add) + { + /* adding a tunnel: tunnel must not already exist */ + if (p) + return VNET_API_ERROR_INVALID_VALUE; + + pool_get_aligned (ngm->tunnels, t, CLIB_CACHE_LINE_BYTES); + memset (t, 0, sizeof (*t)); + + /* copy from arg structure */ +#define _(x) t->x = a->x; + foreach_copy_field; +#undef _ + + rv = " encap_stack "_rewrite (t); + + if (rv) + { + pool_put (ngm->tunnels, t); + return rv; + } + + /* $$$$ use a simple hash if you can ... */ + key_copy = clib_mem_alloc (sizeof (*key_copy)); + clib_memcpy (key_copy, &key, sizeof (*key_copy)); + + hash_set_mem (ngm->" encap_stack "_tunnel_by_key, key_copy, + t - ngm->tunnels); + + /* + * interface freelist / recycle shtik + * This simple implementation rapidly reuses freed tunnel interfaces. + * Consider whether to refcount, etc. etc. + */ + if (vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices) > 0) + { + hw_if_index = ngm->free_" encap_stack "_tunnel_hw_if_indices + [vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices)-1]; + _vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices) -= 1; + + hi = vnet_get_hw_interface (vnm, hw_if_index); + hi->dev_instance = t - ngm->tunnels; + hi->hw_instance = hi->dev_instance; + } + else + { + hw_if_index = vnet_register_interface + (vnm, " encap_stack "_device_class.index, t - ngm->tunnels, + " encap_stack "_hw_class.index, t - ngm->tunnels); + hi = vnet_get_hw_interface (vnm, hw_if_index); + hi->output_node_index = " encap_stack "_encap_node.index; + } + + t->hw_if_index = hw_if_index; + + vnet_sw_interface_set_flags (vnm, hi->sw_if_index, + VNET_SW_INTERFACE_FLAG_ADMIN_UP); + } + else + { + /* deleting a tunnel: tunnel must exist */ + if (!p) + return VNET_API_ERROR_NO_SUCH_ENTRY; + + t = pool_elt_at_index (ngm->tunnels, p[0]); + + vnet_sw_interface_set_flags (vnm, t->hw_if_index, 0 /* down */); + vec_add1 (ngm->free_" encap_stack "_tunnel_hw_if_indices, t->hw_if_index); + + hp = hash_get_pair (ngm->" encap_stack "_tunnel_by_key, &key); + key_copy = (void *)(hp->key); + hash_unset_mem (ngm->" encap_stack "_tunnel_by_key, &key); + clib_mem_free (key_copy); + + vec_free (t->rewrite); + pool_put (ngm->tunnels, t); + } + + if (hw_if_indexp) + *hw_if_indexp = hw_if_index; + + return 0; +} + +static u32 fib_index_from_fib_id (u32 fib_id) +{ + ip4_main_t * im = &ip4_main; + uword * p; + + p = hash_get (im->fib_index_by_table_id, fib_id); + if (!p) + return ~0; + + return p[0]; +} + +static uword unformat_decap_next (unformat_input_t * input, va_list * args) +{ + u32 * result = va_arg (*args, u32 *); + u32 tmp; + + if (unformat (input, \"drop\")) + *result = " ENCAP_STACK "_INPUT_NEXT_DROP; + else if (unformat (input, \"ip4\")) + *result = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT; + else if (unformat (input, \"ip6\")) + *result = " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT; + else if (unformat (input, \"ethernet\")) + *result = " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT; + else if (unformat (input, \"" encap-stack "\")) + *result = " ENCAP_STACK "_INPUT_NEXT_" ENCAP_STACK "_ENCAP; + else if (unformat (input, \"%d\", &tmp)) + *result = tmp; + else + return 0; + return 1; +} + +static clib_error_t * +" encap_stack "_add_del_tunnel_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + unformat_input_t _line_input, * line_input = &_line_input; + ip4_address_t src, dst; + u8 is_add = 1; + u8 src_set = 0; + u8 dst_set = 0; + u32 encap_fib_index = 0; + u32 decap_fib_index = 0; + u8 next_protocol = " ENCAP_STACK "_NEXT_PROTOCOL_IP4; + u32 decap_next_index = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT; + u8 flags = " ENCAP_STACK "_FLAGS_P; + u8 ver_res = 0; + u8 res = 0; + u32 iid = 0; + u8 iid_set = 0; + u32 tmp; + int rv; + vnet_" encap_stack "_add_del_tunnel_args_t _a, * a = &_a; + + /* Get a line of input. */ + if (! unformat_user (input, unformat_line_input, line_input)) + return 0; + + while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { + if (unformat (line_input, \"del\")) + is_add = 0; + else if (unformat (line_input, \"src %U\", + unformat_ip4_address, &src)) + src_set = 1; + else if (unformat (line_input, \"dst %U\", + unformat_ip4_address, &dst)) + dst_set = 1; + else if (unformat (line_input, \"encap-vrf-id %d\", &tmp)) + { + encap_fib_index = fib_index_from_fib_id (tmp); + if (encap_fib_index == ~0) + return clib_error_return (0, \"nonexistent encap fib id %d\", tmp); + } + else if (unformat (line_input, \"decap-vrf-id %d\", &tmp)) + { + decap_fib_index = fib_index_from_fib_id (tmp); + if (decap_fib_index == ~0) + return clib_error_return (0, \"nonexistent decap fib id %d\", tmp); + } + else if (unformat (line_input, \"decap-next %U\", unformat_decap_next, + &decap_next_index)) + ; + else if (unformat(line_input, \"next-ip4\")) + next_protocol = 1; + else if (unformat(line_input, \"next-ip6\")) + next_protocol = 2; + else if (unformat(line_input, \"next-ethernet\")) + next_protocol = 3; + else if (unformat(line_input, \"next-nsh\")) + next_protocol = 4; + /* + * $$$ allow the user to specify anything they want + * in the " ENCAP_STACK " header + */ + else + return clib_error_return (0, \"parse error: '%U'\", + format_unformat_error, line_input); + } + + unformat_free (line_input); + + if (src_set == 0) + return clib_error_return (0, \"tunnel src address not specified\"); + + if (dst_set == 0) + return clib_error_return (0, \"tunnel dst address not specified\"); + + memset (a, 0, sizeof (*a)); + + a->is_add = is_add; + +#define _(x) a->x = x; + foreach_copy_field; +#undef _ + + rv = vnet_" encap_stack "_add_del_tunnel (a, 0 /* hw_if_indexp */); + + switch(rv) + { + case 0: + break; + case VNET_API_ERROR_INVALID_VALUE: + return clib_error_return (0, \"tunnel already exists...\"); + + case VNET_API_ERROR_NO_SUCH_ENTRY: + return clib_error_return (0, \"tunnel does not exist...\"); + + default: + return clib_error_return + (0, \"vnet_" encap_stack "_add_del_tunnel returned %d\", rv); + } + + return 0; +} + +VLIB_CLI_COMMAND (create_" encap_stack "_tunnel_command, static) = { + .path = \"lisp gpe tunnel\", + .short_help = + \" tunnel src dst \\n\" + \" [encap-fib-id ] [decap-fib-id ]\\n\" + \" [decap-next [ip4|ip6|ethernet|nsh-encap|]][del]\\n\", + .function = " encap_stack "_add_del_tunnel_command_fn, +}; + +static clib_error_t * +show_" encap_stack "_tunnel_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + " encap_stack "_main_t * ngm = &" encap_stack "_main; + " encap_stack "_tunnel_t * t; + + if (pool_elts (ngm->tunnels) == 0) + vlib_cli_output (vm, \"No lisp-gpe tunnels configured...\"); + + pool_foreach (t, ngm->tunnels, + ({ + vlib_cli_output (vm, \"%U\", format_" encap_stack "_tunnel); + })); + + return 0; +} + +VLIB_CLI_COMMAND (show_" encap_stack "_tunnel_command, static) = { + .path = \"show lisp gpe tunnel\", + .function = show_" encap_stack "_tunnel_command_fn, +}; + +clib_error_t *" encap_stack "_init (vlib_main_t *vm) +{ + " encap_stack "_main_t *ngm = &" encap_stack "_main; + + ngm->vnet_main = vnet_get_main(); + ngm->vlib_main = vm; + + ngm->" encap_stack "_tunnel_by_key + = hash_create_mem (0, sizeof(" encap_stack "_tunnel_key_t), sizeof (uword)); + + /* YMMV, register with the local netstack */ + udp_register_dst_port (vm, UDP_DST_PORT_" encap_stack ", + " encap_stack "_input_node.index, 1 /* is_ip4 */); + return 0; +} + +VLIB_INIT_FUNCTION(" encap_stack "_init); + +") + diff --git a/vpp/build-root/emacs-lisp/tunnel-decap-skel.el b/vpp/build-root/emacs-lisp/tunnel-decap-skel.el new file mode 100644 index 00000000..380273b6 --- /dev/null +++ b/vpp/build-root/emacs-lisp/tunnel-decap-skel.el @@ -0,0 +1,299 @@ +;;; tunnel-decap-skel.el - tunnel decapsulation skeleton + +(require 'skeleton) + +(define-skeleton skel-tunnel-decap +"Insert a tunnel decap implementation" +nil +'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): ")) +'(setq ENCAP_STACK (upcase encap_stack)) +'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack)) +'(setq ENCAP-STACK (upcase encap-stack)) +" +#include +#include +#include + +typedef struct { + u32 next_index; + u32 tunnel_index; + u32 error; + " encap_stack "_header_t h; +} " encap_stack "_rx_trace_t; + +static u8 * format_" encap_stack "_rx_trace (u8 * s, va_list * args) +{ + CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); + CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); + " encap_stack "_rx_trace_t * t = va_arg (*args, " encap_stack "_rx_trace_t *); + + if (t->tunnel_index != ~0) + { + s = format (s, \"" ENCAP-STACK ": tunnel %d next %d error %d\", + t->tunnel_index, t->next_index, t->error); + } + else + { + s = format (s, \"" ENCAP-STACK ": no tunnel next %d error %d\\n\", + t->next_index, t->error); + } + s = format (s, \"\\n %U\", format_" encap_stack "_header_with_length, &t->h, + (u32) sizeof (t->h) /* max size */); + return s; +} + +static uword +" encap_stack "_input (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * from_frame) +{ + u32 n_left_from, next_index, * from, * to_next; + " encap_stack "_main_t * ngm = &" encap_stack "_main; + u32 last_tunnel_index = ~0; + " encap_stack "_tunnel_key_t last_key; + u32 pkts_decapsulated = 0; + + memset (&last_key, 0xff, sizeof (last_key)); + + from = vlib_frame_vector_args (from_frame); + n_left_from = from_frame->n_vectors; + + next_index = node->cached_next_index; + + while (n_left_from > 0) + { + u32 n_left_to_next; + + vlib_get_next_frame (vm, node, next_index, + to_next, n_left_to_next); + +#if 0 /* $$$ dual loop when the single loop works */ + while (n_left_from >= 4 && n_left_to_next >= 2) + { + u32 bi0, bi1; + vlib_buffer_t * b0, * b1; + nsh_unicast_header_t * h0, * h1; + u32 label0, label1; + u32 next0, next1; + uword * p0, * p1; + + /* Prefetch next iteration. */ + { + vlib_buffer_t * p2, * p3; + + p2 = vlib_get_buffer (vm, from[2]); + p3 = vlib_get_buffer (vm, from[3]); + + vlib_prefetch_buffer_header (p2, LOAD); + vlib_prefetch_buffer_header (p3, LOAD); + + CLIB_PREFETCH (p2->data, 2*CLIB_CACHE_LINE_BYTES, LOAD); + CLIB_PREFETCH (p3->data, 2*CLIB_CACHE_LINE_BYTES, LOAD); + } + + bi0 = from[0]; + bi1 = from[1]; + to_next[0] = bi0; + to_next[1] = bi1; + from += 2; + to_next += 2; + n_left_to_next -= 2; + n_left_from -= 2; + + b0 = vlib_get_buffer (vm, bi0); + b1 = vlib_get_buffer (vm, bi1); + + h0 = vlib_buffer_get_current (b0); + h1 = vlib_buffer_get_current (b1); + + next0 = next1 = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT; + + label0 = clib_net_to_host_u32 (h0->label_exp_s_ttl); + label1 = clib_net_to_host_u32 (h1->label_exp_s_ttl); + + /* + * Translate label contents into a fib index. + * This is a decent sanity check, and guarantees + * a sane FIB for the downstream lookup + */ + label0 = vnet_nsh_uc_get_label (label0); + label1 = vnet_nsh_uc_get_label (label1); + + /* If 2xlabels match, and match the 1-wide cache, use it */ + if (label0 == label1 && rt->last_label == label0) + { + vnet_buffer(b0)->sw_if_index[VLIB_TX] = rt->last_fib_index; + vnet_buffer(b1)->sw_if_index[VLIB_TX] = rt->last_fib_index; + } + else + { + p0 = hash_get (rt->mm->fib_index_by_nsh_label, label0); + if (PREDICT_FALSE (p0 == 0)) + { + next0 = " ENCAP_STACK "_INPUT_NEXT_DROP; + b0->error = node->errors[NSH_ERROR_BAD_LABEL]; + } + else + vnet_buffer(b0)->sw_if_index[VLIB_TX] = p0[0]; + + p1 = hash_get (rt->mm->fib_index_by_nsh_label, label1); + if (PREDICT_FALSE (p1 == 0)) + { + next1 = " ENCAP_STACK "_INPUT_NEXT_DROP; + b1->error = node->errors[NSH_ERROR_BAD_LABEL]; + } + else + { + vnet_buffer(b1)->sw_if_index[VLIB_TX] = p1[0]; + rt->last_fib_index = p1[0]; + rt->last_label = label1; + } + } + + if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) + { + nsh_rx_trace_t *tr = vlib_add_trace (vm, node, + b0, sizeof (*tr)); + tr->label_exp_s_ttl = label0; + } + if (PREDICT_FALSE(b1->flags & VLIB_BUFFER_IS_TRACED)) + { + nsh_rx_trace_t *tr = vlib_add_trace (vm, node, + b1, sizeof (*tr)); + tr->label_exp_s_ttl = label1; + } + + vlib_buffer_advance (b0, sizeof (*h0)); + vlib_buffer_advance (b1, sizeof (*h1)); + + vlib_validate_buffer_enqueue_x2 (vm, node, next_index, + to_next, n_left_to_next, + bi0, bi1, next0, next1); + } +#endif + + while (n_left_from > 0 && n_left_to_next > 0) + { + u32 bi0; + vlib_buffer_t * b0; + u32 next0; + " encap_stack "_header_t * iuX0; + uword * p0; + u32 tunnel_index0; + " encap_stack "_tunnel_t * t0; + " encap_stack "_tunnel_key_t key0; + u32 error0; + + bi0 = from[0]; + to_next[0] = bi0; + from += 1; + to_next += 1; + n_left_from -= 1; + n_left_to_next -= 1; + + b0 = vlib_get_buffer (vm, bi0); + + /* + * udp leaves current_data pointing at the tunnel header + * $$$$ FIXME + */ + vlib_buffer_advance + (b0, -(word)(sizeof(udp_header_t)+sizeof(ip4_header_t))); + + iuX0 = vlib_buffer_get_current (b0); + + /* pop (ip, udp, lisp-gpe) */ + vlib_buffer_advance (b0, sizeof (*iuX0)); + + tunnel_index0 = ~0; + error0 = 0; + next0 = " ENCAP_STACK "_INPUT_NEXT_DROP; + + key0.src = iuX0->ip4.src_address.as_u32; + key0.iid = iuX0->lisp.iid; + + /* $$$ validate key comparison */ + if (PREDICT_FALSE ((key0.as_u64[0] != last_key.as_u64[0]))) + { + p0 = hash_get_mem (ngm->" encap_stack "_tunnel_by_key, &key0); + + if (p0 == 0) + { + error0 = " ENCAP_STACK "_ERROR_NO_SUCH_TUNNEL; + goto trace0; + } + + last_key.as_u64[0] = key0.as_u64[0]; + tunnel_index0 = last_tunnel_index = p0[0]; + } + else + tunnel_index0 = last_tunnel_index; + + t0 = pool_elt_at_index (ngm->tunnels, tunnel_index0); + + next0 = t0->decap_next_index; + + /* Required to make the l2 tag push / pop code work on l2 subifs */ + vnet_update_l2_len (b0); + + /* + * ip[46] lookup in the configured FIB + * " encap-stack ", here's the encap tunnel sw_if_index + */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->decap_fib_index; + pkts_decapsulated ++; + + trace0: + b0->error = error0 ? node->errors[error0] : 0; + + if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) + { + " encap_stack "_rx_trace_t *tr + = vlib_add_trace (vm, node, b0, sizeof (*tr)); + tr->next_index = next0; + tr->error = error0; + tr->tunnel_index = tunnel_index0; + tr->h = iuX0->lisp; + } + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, + to_next, n_left_to_next, + bi0, next0); + } + + vlib_put_next_frame (vm, node, next_index, n_left_to_next); + } + vlib_node_increment_counter (vm, " encap_stack "_input_node.index, + " ENCAP_STACK "_ERROR_DECAPSULATED, + pkts_decapsulated); + return from_frame->n_vectors; +} + +static char * " encap_stack "_error_strings[] = { +#define " encap_stack "_error(n,s) s, +#include +#undef " encap_stack "_error +#undef _ +}; + +VLIB_REGISTER_NODE (" encap_stack "_input_node) = { + .function = \"" encap_stack "_input\", + .name = \"" encap-stack "-input\", + /* Takes a vector of packets. */ + .vector_size = sizeof (u32), + + .n_errors = " ENCAP_STACK "_N_ERROR, + .error_strings = " encap_stack "_error_strings, + + .n_next_nodes = " ENCAP_STACK "_INPUT_N_NEXT, + .next_nodes = { +#define _(s,n) [" ENCAP_STACK "_INPUT_NEXT_##s] = n, + foreach_" encap_stack "_input_next +#undef _ + }, + + .format_buffer = format_" encap_stack "_header_with_length, + .format_trace = format_" encap_stack "_rx_trace, + // $$$$ .unformat_buffer = unformat_" encap_stack "_header, +}; + +") diff --git a/vpp/build-root/emacs-lisp/tunnel-encap-skel.el b/vpp/build-root/emacs-lisp/tunnel-encap-skel.el new file mode 100644 index 00000000..9c98a597 --- /dev/null +++ b/vpp/build-root/emacs-lisp/tunnel-encap-skel.el @@ -0,0 +1,245 @@ +;;; tunnel-encap-skel.el - tunnel interface output skeleton + +(require 'skeleton) + +(define-skeleton skel-tunnel-encap +"Insert a tunnel encap implementation" +nil +'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): ")) +'(setq ENCAP_STACK (upcase encap_stack)) +'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack)) +'(setq ENCAP-STACK (upcase encap-stack)) +" +#include +#include +#include +#include +#include +#include + +/* Statistics (not really errors) */ +#define foreach_" encap_stack "_encap_error \\ +_(ENCAPSULATED, \"good packets encapsulated\") + +static char * " encap_stack "_encap_error_strings[] = { +#define _(sym,string) string, + foreach_" encap_stack "_encap_error +#undef _ +}; + +typedef enum { +#define _(sym,str) " ENCAP_STACK "_ENCAP_ERROR_##sym, + foreach_" encap_stack "_encap_error +#undef _ + " ENCAP_STACK "_ENCAP_N_ERROR, +} " encap_stack "_encap_error_t; + +typedef enum { + " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP, + " ENCAP_STACK "_ENCAP_NEXT_DROP, + " ENCAP_STACK "_ENCAP_N_NEXT, +} " encap_stack "_encap_next_t; + +typedef struct { + u32 tunnel_index; +} " encap_stack "_encap_trace_t; + +u8 * format_" encap_stack "_encap_trace (u8 * s, va_list * args) +{ + CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); + CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); + " encap_stack "_encap_trace_t * t + = va_arg (*args, " encap_stack "_encap_trace_t *); + + s = format (s, \"" ENCAP-STACK ": tunnel %d\", t->tunnel_index); + return s; +} + +/* $$$$ FIXME adjust to match the rewrite string */ +#define foreach_fixed_header_offset \\ +_(0) _(1) _(2) _(3) _(FIXME) + +static uword +" encap_stack "_encap (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * from_frame) +{ + u32 n_left_from, next_index, * from, * to_next; + " encap_stack "_main_t * ngm = &" encap_stack "_main; + vnet_main_t * vnm = ngm->vnet_main; + u32 pkts_encapsulated = 0; + u16 old_l0 = 0, old_l1 = 0; + + from = vlib_frame_vector_args (from_frame); + n_left_from = from_frame->n_vectors; + + next_index = node->cached_next_index; + + while (n_left_from > 0) + { + u32 n_left_to_next; + + vlib_get_next_frame (vm, node, next_index, + to_next, n_left_to_next); + +#if 0 /* $$$ dual loop when the single loop works */ + while (n_left_from >= 4 && n_left_to_next >= 2) + { + u32 bi0, bi1; + vlib_buffer_t * b0, * b1; + nsh_unicast_header_t * h0, * h1; + u32 label0, label1; + u32 next0, next1; + uword * p0, * p1; + + /* Prefetch next iteration. */ + { + vlib_buffer_t * p2, * p3; + + p2 = vlib_get_buffer (vm, from[2]); + p3 = vlib_get_buffer (vm, from[3]); + + vlib_prefetch_buffer_header (p2, LOAD); + vlib_prefetch_buffer_header (p3, LOAD); + + CLIB_PREFETCH (p2->data, 2*CLIB_CACHE_LINE_BYTES, LOAD); + CLIB_PREFETCH (p3->data, 2*CLIB_CACHE_LINE_BYTES, LOAD); + } + + bi0 = from[0]; + bi1 = from[1]; + to_next[0] = bi0; + to_next[1] = bi1; + from += 2; + to_next += 2; + n_left_to_next -= 2; + n_left_from -= 2; + + b0 = vlib_get_buffer (vm, bi0); + b1 = vlib_get_buffer (vm, bi1); + + h0 = vlib_buffer_get_current (b0); + h1 = vlib_buffer_get_current (b1); + + next0 = next1 = " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP; + + vlib_buffer_advance (b0, sizeof (*h0)); + vlib_buffer_advance (b1, sizeof (*h1)); + + vlib_validate_buffer_enqueue_x2 (vm, node, next_index, + to_next, n_left_to_next, + bi0, bi1, next0, next1); + } +#endif + + while (n_left_from > 0 && n_left_to_next > 0) + { + u32 bi0; + vlib_buffer_t * b0; + u32 next0 = " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP; + vnet_hw_interface_t * hi0; + ip4_header_t * ip0; + udp_header_t * udp0; + u64 * copy_src0, * copy_dst0; + u32 * copy_src_last0, * copy_dst_last0; + " encap_stack "_tunnel_t * t0; + u16 new_l0; + ip_csum_t sum0; + + bi0 = from[0]; + to_next[0] = bi0; + from += 1; + to_next += 1; + n_left_from -= 1; + n_left_to_next -= 1; + + b0 = vlib_get_buffer (vm, bi0); + + /* 1-wide cache? */ + hi0 = vnet_get_sup_hw_interface + (vnm, vnet_buffer(b0)->sw_if_index[VLIB_TX]); + + t0 = pool_elt_at_index (ngm->tunnels, hi0->dev_instance); + + ASSERT(vec_len(t0->rewrite) >= 24); + + /* Apply the rewrite string. $$$$ vnet_rewrite? */ + vlib_buffer_advance (b0, -(word)_vec_len(t0->rewrite)); + + ip0 = vlib_buffer_get_current(b0); + /* Copy the fixed header */ + copy_dst0 = (u64 *) ip0; + copy_src0 = (u64 *) t0->rewrite; + + ASSERT (sizeof (ip4_udp_" encap_stack "_header_t) == FIXME); + + /* Copy first N octets 8-bytes at a time */ +#define _(offs) copy_dst0[offs] = copy_src0[offs]; + foreach_fixed_header_offset; +#undef _ +#if 0 /* needed if encap not a multiple of 8 bytes */ + /* Last 4 octets. Hopefully gcc will be our friend */ + copy_dst_last0 = (u32 *)(©_dst0[FIXME]); + copy_src_last0 = (u32 *)(©_src0[FIXME]); + copy_dst_last0[0] = copy_src_last0[0]; + +#endif + /* fix the ing outer-IP checksum */ + sum0 = ip0->checksum; + /* old_l0 always 0, see the rewrite setup */ + new_l0 = + clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0)); + + sum0 = ip_csum_update (sum0, old_l0, new_l0, ip4_header_t, + length /* changed member */); + ip0->checksum = ip_csum_fold (sum0); + ip0->length = new_l0; + + /* Fix UDP length */ + udp0 = (udp_header_t *)(ip0+1); + new_l0 = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0) + - sizeof (*ip0)); + + udp0->length = new_l0; + + /* Reset to look up tunnel partner in the configured FIB */ + vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index; + pkts_encapsulated ++; + + if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) + { + " encap_stack "_encap_trace_t *tr = + vlib_add_trace (vm, node, b0, sizeof (*tr)); + tr->tunnel_index = t0 - ngm->tunnels; + } + vlib_validate_buffer_enqueue_x1 (vm, node, next_index, + to_next, n_left_to_next, + bi0, next0); + } + + vlib_put_next_frame (vm, node, next_index, n_left_to_next); + } + vlib_node_increment_counter (vm, node->node_index, + " ENCAP_STACK "_ENCAP_ERROR_ENCAPSULATED, + pkts_encapsulated); + return from_frame->n_vectors; +} + +VLIB_REGISTER_NODE (" encap_stack "_encap_node) = { + .function = " encap_stack "_encap, + .name = \"" encap-stack "-encap\", + .vector_size = sizeof (u32), + .format_trace = format_" encap_stack "_encap_trace, + .type = VLIB_NODE_TYPE_INTERNAL, + + .n_errors = ARRAY_LEN(" encap_stack "_encap_error_strings), + .error_strings = " encap_stack "_encap_error_strings, + + .n_next_nodes = " ENCAP_STACK "_ENCAP_N_NEXT, + + .next_nodes = { + [" ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP] = \"ip4-lookup\", + [" ENCAP_STACK "_ENCAP_NEXT_DROP] = \"error-drop\", + }, +}; +") diff --git a/vpp/build-root/emacs-lisp/tunnel-h-skel.el b/vpp/build-root/emacs-lisp/tunnel-h-skel.el new file mode 100644 index 00000000..067cf134 --- /dev/null +++ b/vpp/build-root/emacs-lisp/tunnel-h-skel.el @@ -0,0 +1,128 @@ +;;; tunnel-h-skel.el - tunnel encap header file skeleton + +(require 'skeleton) + +(define-skeleton skel-tunnel-h +"Insert a tunnel encap header file" +nil +'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): ")) +'(setq ENCAP_STACK (upcase encap_stack)) +'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack)) +" +#ifndef included_vnet_" encap_stack "_h +#define included_vnet_" encap_stack "_h + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Encap stack built in encap.c */ +typedef CLIB_PACKED (struct { + ip4_header_t ip4; /* 20 bytes */ + udp_header_t udp; /* 8 bytes */ + " encap_stack "_header_t lisp; /* 8 bytes */ +}) " encap_stack "_header_t; + +typedef CLIB_PACKED(struct { + /* + * Key fields: + * all fields in NET byte order + */ + union { + struct { + u32 FIXME_NET_BYTE_ORDER; + }; + u64 as_u64[1]; + }; +}) " encap_stack "_tunnel_key_t; + +typedef struct { + /* Rewrite string. $$$$ maybe: embed vnet_rewrite header */ + u8 * rewrite; + + /* decap next index */ + u32 decap_next_index; + + /* tunnel src and dst addresses */ + ip4_address_t src; + ip4_address_t dst; + + /* FIB indices */ + u32 encap_fib_index; /* tunnel partner lookup here */ + u32 decap_fib_index; /* inner IP lookup here */ + + /* vnet intfc hw/sw_if_index */ + u32 hw_if_index; + + /* encap header fields in HOST byte order */ + u32 FIXME; +} " encap_stack "_tunnel_t; + +#define foreach_" encap_stack "_input_next \\ +_(DROP, \"error-drop\") \\ +_(IP4_INPUT, \"ip4-input\") \\ +_(IP6_INPUT, \"ip6-input\") \\ +_(ETHERNET_INPUT, \"ethernet-input\") \\ +_(" ENCAP_STACK "_ENCAP, \"" encap-stack "-encap\") + +typedef enum { +#define _(s,n) " ENCAP_STACK "_INPUT_NEXT_##s, + foreach_" encap_stack "_input_next +#undef _ + " ENCAP_STACK "_INPUT_N_NEXT, +} " encap_stack "_input_next_t; + +typedef enum { +#define " encap_stack "_error(n,s) " ENCAP_STACK "_ERROR_##n, +#include +#undef " encap_stack "_error + " ENCAP_STACK "_N_ERROR, +} " encap_stack "_input_error_t; + +typedef struct { + /* vector of encap tunnel instances */ + " encap_stack "_tunnel_t *tunnels; + + /* lookup tunnel by key */ + uword * " encap_stack "_tunnel_by_key; + + /* Free vlib hw_if_indices */ + u32 * free_" encap_stack "_tunnel_hw_if_indices; + + /* convenience */ + vlib_main_t * vlib_main; + vnet_main_t * vnet_main; +} " encap_stack "_main_t; + +" encap_stack "_main_t " encap_stack "_main; + +vlib_node_registration_t " encap_stack "_input_node; +vlib_node_registration_t " encap_stack "_encap_node; + +u8 * format_" encap_stack "_encap_trace (u8 * s, va_list * args); +u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args); + +typedef struct { + u8 is_add; + ip4_address_t src, dst; + u32 encap_fib_index; + u32 decap_fib_index; + u32 decap_next_index; + /* encap fields in HOST byte order */ + u8 FIXME_HOST_BYTE_ORDER; +} vnet_" encap_stack "_add_del_tunnel_args_t; + +int vnet_" encap_stack "_add_del_tunnel +(vnet_" encap_stack "_add_del_tunnel_args_t *a, u32 * hw_if_indexp); + +u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args); + +#endif /* included_vnet_" encap_stack "_h */ + +") diff --git a/vpp/build-root/packages/vppapigen.mk b/vpp/build-root/packages/vppapigen.mk new file mode 100644 index 00000000..0d284631 --- /dev/null +++ b/vpp/build-root/packages/vppapigen.mk @@ -0,0 +1,5 @@ +vppapigen_configure_depend = vppinfra-install + +vppapigen_CPPFLAGS = $(call installed_includes_fn, vppinfra) + +vppapigen_LDFLAGS = $(call installed_libs_fn, vppinfra) diff --git a/vpp/build-root/packages/vppinfra.mk b/vpp/build-root/packages/vppinfra.mk new file mode 100644 index 00000000..db48ed58 --- /dev/null +++ b/vpp/build-root/packages/vppinfra.mk @@ -0,0 +1,4 @@ +# nothing + + + diff --git a/vpp/build-root/platforms.mk b/vpp/build-root/platforms.mk new file mode 100644 index 00000000..cb36d1bf --- /dev/null +++ b/vpp/build-root/platforms.mk @@ -0,0 +1,50 @@ +# 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. + +# +# Copyright (c) 2007-2008 Eliot Dresselhaus +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +# Platform selects e.g. Linux config file +PLATFORM = native + +native_arch = native + +# Default for which packages go into read-only image +# used to have pam +default_root_packages = bash coreutils sysvinit util-linux mingetty procps + +# Linux based platforms (PLATFORM=i686 PLATFORM=ppc etc.) +i686_arch = i686 +x86_64_arch = x86_64 +ppc_arch = ppc + diff --git a/vpp/build-root/rpm/vpp.service b/vpp/build-root/rpm/vpp.service new file mode 100644 index 00000000..40bf9d48 --- /dev/null +++ b/vpp/build-root/rpm/vpp.service @@ -0,0 +1,14 @@ +[Unit] +Description=Vector Packet Processing Process +After=syslog.target network.target auditd.service + +[Service] +ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api +ExecStartPre=-/sbin/modprobe uio_pci_generic +ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf +Type=simple +Restart=on-failure +RestartSec=5s + +[Install] +WantedBy=multi-user.target diff --git a/vpp/build-root/rpm/vpp.spec b/vpp/build-root/rpm/vpp.spec new file mode 100644 index 00000000..194d205f --- /dev/null +++ b/vpp/build-root/rpm/vpp.spec @@ -0,0 +1,264 @@ +%define _mu_build_dir %{_mu_build_root_dir} +%define _vpp_install_dir %{_install_dir} +%define _vpp_build_dir build-tool-native +%define _unitdir /lib/systemd/system +%define _topdir %(pwd) +%define _builddir %{_topdir} +%define _version %(../scripts/version rpm-version) +%define _release %(../scripts/version rpm-release) + +# Failsafe backport of Python2-macros for RHEL <= 6 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?python_version: %global python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")} +%{!?__python2: %global __python2 %{__python}} +%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} +%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}} +%{!?python2_version: %global python2_version %{python_version}} + +%{!?python2_minor_version: %define python2_minor_version %(%{__python} -c "import sys ; print sys.version[2:3]")} + +%{?systemd_requires} + +Name: vpp +Summary: Vector Packet Processing +License: MIT +Version: %{_version} +Release: %{_release} +Requires: vpp-lib = %{_version}-%{_release}, net-tools, pciutils, python +BuildRequires: systemd, chrpath + +Source: %{name}-%{_version}-%{_release}.tar.gz + +%description +This package provides VPP executables: vpp, vpp_api_test, vpp_json_test +vpp - the vector packet engine +vpp_api_test - vector packet engine API test tool +vpp_json_test - vector packet engine JSON test tool + +%package lib +Summary: VPP libraries +Group: System Environment/Libraries + +%description lib +This package contains the VPP shared libraries, including: +vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting. +dpdk - DPDK library +svm - vm library +vlib - vector processing library +vlib-api - binary API library +vnet - network stack library + +%package devel +Summary: VPP header files, static libraries +Group: Development/Libraries +Requires: vpp-lib + +%description devel +This package contains the header files for VPP. +Install this package if you want to write a +program for compilation and linking with vpp lib. +vlib +vlibmemory +vnet - devices, classify, dhcp, ethernet flow, gre, ip, etc. +vpp-api +vppinfra + +%package plugins +Summary: Vector Packet Processing--runtime plugins +Group: System Environment/Libraries +Requires: vpp = %{_version}-%{_release} +%description plugins +This package contains VPP plugins + +%package python-api +Summary: VPP api python bindings +Group: Development/Libraries +Requires: vpp = %{_version}-%{_release}, vpp-lib = %{_version}-%{_release}, python-setuptools + +%description python-api +This package contains the python bindings for the vpp api + +%prep +%setup -q -n %{name}-%{_version} + +%build +make bootstrap +make build-release + +%pre +# Add the vpp group +groupadd -f -r vpp + +%install +# +# binaries +# +mkdir -p -m755 %{buildroot}%{_bindir} +mkdir -p -m755 %{buildroot}%{_unitdir} +install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/*/bin/* %{buildroot}%{_bindir} +install -p -m 755 %{_mu_build_dir}/%{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir} + +# core api +mkdir -p -m755 %{buildroot}/usr/share/vpp/api +install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/vpp-api/vpe.api.json %{buildroot}/usr/share/vpp/api +install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/vlib-api/vlibmemory/memclnt.api.json %{buildroot}/usr/share/vpp/api + +# +# configs +# +mkdir -p -m755 %{buildroot}/etc/vpp +mkdir -p -m755 %{buildroot}/etc/sysctl.d +install -p -m 644 %{_mu_build_dir}/rpm/vpp.service %{buildroot}%{_unitdir} +install -p -m 644 %{_mu_build_dir}/../vpp/conf/startup.uiopcigeneric.conf %{buildroot}/etc/vpp/startup.conf +install -p -m 644 %{_mu_build_dir}/../vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d +# +# libraries +# +mkdir -p -m755 %{buildroot}%{_libdir} +for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/lib* -type f -name '*.so.*.*.*' -print ) +do + install -p -m 755 $file %{buildroot}%{_libdir} +done +for file in $(cd %{buildroot}%{_libdir} && find . -type f -print | sed -e 's/^\.\///') +do + # make lib symlinks + ( cd %{buildroot}%{_libdir} && + 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 +for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vnet -type f -name '*.api.json' -print ) +do + install -p -m 644 $file %{buildroot}/usr/share/vpp/api +done + +# Python bindings +mkdir -p -m755 %{buildroot}%{python2_sitelib} +install -p -m 666 %{_mu_build_dir}/%{_vpp_install_dir}/*/lib/python2.7/site-packages/vpp_papi-*.egg %{buildroot}%{python2_sitelib} + +# +# devel +# +for dir in $(find %{_mu_build_dir}/%{_vpp_install_dir}/*/include/ -maxdepth 0 -type d -print | grep -v dpdk) +do + for subdir in $(cd ${dir} && find . -type d -print) + do + mkdir -p -m755 %{buildroot}/usr/include/${subdir} + done + for file in $(cd ${dir} && find . -type f -print) + do + install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file + done +done + +mkdir -p -m755 %{buildroot}%{python2_sitelib}/jvppgen +install -p -m755 %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvpp_gen.py %{buildroot}/usr/bin +for i in $(ls %{_mu_build_dir}/../vpp-api/java/jvpp/gen/jvppgen/*.py); do + install -p -m666 ${i} %{buildroot}%{python2_sitelib}/jvppgen +done; + +# sample plugin +mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample +for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin && git ls-files .) +do + install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/../../plugins/sample-plugin/$file \ + %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file +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 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins && find -type f -print) +do + install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_plugins/$file \ + %{buildroot}/usr/lib/vpp_plugins/$file +done + +for file in $(cd %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins && find -type f -print) +do + install -p -m 644 %{_mu_build_dir}/%{_vpp_install_dir}/plugins/lib64/vpp_api_test_plugins/$file \ + %{buildroot}/usr/lib/vpp_api_test_plugins/$file +done + +for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/plugins -type f -name '*.api.json' -print ) +do + install -p -m 644 $file %{buildroot}/usr/share/vpp/api +done + +# +# remove RPATH from ELF binaries +# +%{_mu_build_dir}/scripts/remove-rpath %{buildroot} + +%post +sysctl --system +%systemd_post vpp.service + +%post python-api +easy_install -z %{python2_sitelib}/vpp_papi-*.egg + +%preun +%systemd_preun vpp.service + +%preun python-api +easy_install -mxNq vpp_papi + +%postun +%systemd_postun + +# Unbind user-mode PCI drivers +removed= +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 + +%files +%defattr(-,bin,bin) +%{_unitdir}/vpp.service +/usr/bin/vpp* +/usr/bin/svm* +/usr/bin/elftool +%config /etc/sysctl.d/80-vpp.conf +%config /etc/vpp/startup.conf +/usr/share/vpp/api/* + +%files lib +%defattr(-,bin,bin) +%exclude %{_libdir}/vpp_plugins +%exclude %{_libdir}/vpp_api_test_plugins +%{_libdir}/* +/usr/share/vpp/api/* + +%files python-api +%defattr(644,root,root) +%{python2_sitelib}/vpp_papi-*.egg + +%files devel +%defattr(-,bin,bin) +/usr/bin/vppapigen +/usr/bin/jvpp_gen.py +%{_includedir}/* +%{python2_sitelib}/jvppgen/* +/usr/share/doc/vpp/examples/sample-plugin + +%files plugins +%defattr(-,bin,bin) +/usr/lib/vpp_plugins/* +/usr/lib/vpp_api_test_plugins/* +/usr/share/vpp/api/* diff --git a/vpp/build-root/scripts/checkstyle.sh b/vpp/build-root/scripts/checkstyle.sh new file mode 100755 index 00000000..60129676 --- /dev/null +++ b/vpp/build-root/scripts/checkstyle.sh @@ -0,0 +1,92 @@ +#!/bin/bash + +VPP_DIR=`dirname $0`/../../ +EXIT_CODE=0 +FIX="0" +FULL="0" +CHECKSTYLED_FILES="" +UNCHECKSTYLED_FILES="" + +# If the user provides --fix, then actually fix things +# Note: this is meant for use outside of the CI Jobs, by users cleaning things up + +while true; do + case ${1} in + --fix) + FIX="1" + ;; + --full) + FULL="1" + ;; + esac + shift || break +done + +if [ "${FULL}" == "1" ]; then + FILELIST=$(git ls-tree -r HEAD --name-only) +else + FILELIST=$((git diff HEAD~1.. --name-only; git ls-files -m ) | sort -u) +fi + +# Check to make sure we have indent. Exit if we don't with an error message, but +# don't *fail*. +command -v indent > /dev/null +if [ $? != 0 ]; then + echo "Cound not find required commend \"indent\". Checkstyle aborted" + exit ${EXIT_CODE} +fi +indent --version + +cd ${VPP_DIR} +git status +for i in ${FILELIST}; do + if [ -f ${i} ] && [ ${i} != "build-root/scripts/checkstyle.sh" ] && [ ${i} != "build-root/emacs-lisp/fix-coding-style.el" ]; then + grep -q "fd.io coding-style-patch-verification: ON" ${i} + if [ $? == 0 ]; then + CHECKSTYLED_FILES="${CHECKSTYLED_FILES} ${i}" + if [ ${FIX} == 0 ]; then + indent ${i} -o ${i}.out1 > /dev/null 2>&1 + indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1 + # Remove trailing whitespace + sed -i -e 's/[[:space:]]*$//' ${i}.out2 + diff -q ${i} ${i}.out2 + else + indent ${i} + indent ${i} + # Remove trailing whitespace + sed -i -e 's/[[:space:]]*$//' ${i} + fi + if [ $? != 0 ]; then + EXIT_CODE=1 + echo + echo "Checkstyle failed for ${i}." + echo "Run indent (twice!) as shown to fix the problem:" + echo "indent ${VPP_DIR}${i}" + echo "indent ${VPP_DIR}${i}" + fi + if [ -f ${i}.out1 ]; then + rm ${i}.out1 + fi + if [ -f ${i}.out2 ]; then + rm ${i}.out2 + fi + else + UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}" + fi + else + UNCHECKSTYLED_FILES="${UNCHECKSTYLED_FILES} ${i}" + fi +done + +if [ ${EXIT_CODE} == 0 ]; then + echo "*******************************************************************" + echo "* VPP CHECKSTYLE SUCCESSFULLY COMPLETED" + echo "*******************************************************************" +else + echo "*******************************************************************" + echo "* VPP CHECKSTYLE FAILED" + echo "* CONSULT FAILURE LOG ABOVE" + echo "* NOTE: Running 'build-root/scripts/checkstyle.sh --fix' *MAY* fix the issue" + echo "*******************************************************************" +fi +exit ${EXIT_CODE} diff --git a/vpp/build-root/scripts/csit-test-branch b/vpp/build-root/scripts/csit-test-branch new file mode 100755 index 00000000..ede63372 --- /dev/null +++ b/vpp/build-root/scripts/csit-test-branch @@ -0,0 +1,2 @@ +#!/bin/sh +echo oper-rls1701-170115 diff --git a/vpp/build-root/scripts/find-api-core-contents b/vpp/build-root/scripts/find-api-core-contents new file mode 100755 index 00000000..f1f96f1f --- /dev/null +++ b/vpp/build-root/scripts/find-api-core-contents @@ -0,0 +1,9 @@ +#!/bin/bash + +for i in $(find ${1}/vpp -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done +for i in $(find ${1}/vlib-api -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done + diff --git a/vpp/build-root/scripts/find-api-lib-contents b/vpp/build-root/scripts/find-api-lib-contents new file mode 100755 index 00000000..562db7b8 --- /dev/null +++ b/vpp/build-root/scripts/find-api-lib-contents @@ -0,0 +1,6 @@ +#!/bin/bash + +for i in $(find ${1}/vnet -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done + diff --git a/vpp/build-root/scripts/find-dev-contents b/vpp/build-root/scripts/find-dev-contents new file mode 100755 index 00000000..2dc6cc4d --- /dev/null +++ b/vpp/build-root/scripts/find-dev-contents @@ -0,0 +1,31 @@ +#!/bin/bash + +# includes +paths=`find $1/*/include -type f -print | grep -v '/dpdk/include/'` +rm -f $2 + +for path in $paths +do + relpath=`echo $path | sed -e 's:.*/include/::'` + dir=`dirname $relpath` + if [ $dir = "." ] ; then + echo ../$path /usr/include >> $2 + else + echo ../$path /usr/include/$dir >> $2 + fi +done + +# sample plugin +paths=`(cd ..; find plugins/sample-plugin -type f -print | grep -v autom4te)` + +for path in $paths +do + relpath=`echo $path | sed -e 's:.*plugins/::'` + dir=`dirname $relpath` + if [ $dir = "sample-plugin" ] ; then + echo ../../$path /usr/share/doc/vpp/examples/plugins/sample-plugin >> $2 + else + echo ../../$path \ + /usr/share/doc/vpp/examples/plugins/$dir >> $2 + fi +done diff --git a/vpp/build-root/scripts/find-dpdk-contents b/vpp/build-root/scripts/find-dpdk-contents new file mode 100755 index 00000000..c7065139 --- /dev/null +++ b/vpp/build-root/scripts/find-dpdk-contents @@ -0,0 +1,29 @@ +#!/bin/bash + +# includes +rm -rf dpdk-includes +mkdir dpdk-includes +(cd $1/dpdk/include; tar cfh - . | (cd ../../../dpdk-includes; tar xf -)) + +# If CDPATH is set, the "Change Directory" builtin (cd) will output the +# destination directory when a relative path is passed as an argument. +# In this case, this has the negative side effect of polluting the "paths" +# variable with the destination directory, breaking the package generation. +# +# Patient: Doctor! Doctor! It hurts when I do this... +# Doctor: Don't do that! +# +unset CDPATH +paths=`cd dpdk-includes; find . -type f -print` +rm -f $2 + +for path in $paths +do + dir=`dirname $path` + if [ $dir = "." ] ; then + echo ../dpdk-includes/$path /usr/include/vpp-dpdk >> $2 + else + echo ../dpdk-includes/$path /usr/include/vpp-dpdk/$dir >> $2 + fi +done + diff --git a/vpp/build-root/scripts/find-plugins-contents b/vpp/build-root/scripts/find-plugins-contents new file mode 100755 index 00000000..a5a52acf --- /dev/null +++ b/vpp/build-root/scripts/find-plugins-contents @@ -0,0 +1,15 @@ +#!/bin/bash + +rm -f $2 + +for i in ${1}/plugins/lib64/vpp_plugins/*.so; do + echo ../${i} /usr/lib/vpp_plugins >> ${2} +done + +for i in ${1}/plugins/lib64/vpp_api_test_plugins/*.so; do + echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2} +done + +for i in $(find ${1}/plugins -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done diff --git a/vpp/build-root/scripts/find-python-api-contents b/vpp/build-root/scripts/find-python-api-contents new file mode 100755 index 00000000..9b390e75 --- /dev/null +++ b/vpp/build-root/scripts/find-python-api-contents @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -f $2 + +for i in $(find ${1}/vpp-api/lib/python2.7/site-packages/ -type f -print); do + echo ../${i} /usr/lib/python2.7/site-packages/vpp_papi >> ${2} +done + diff --git a/vpp/build-root/scripts/generate-deb-changelog b/vpp/build-root/scripts/generate-deb-changelog new file mode 100755 index 00000000..7bdc6337 --- /dev/null +++ b/vpp/build-root/scripts/generate-deb-changelog @@ -0,0 +1,37 @@ +#!/bin/bash + +CHANGELOG=deb/debian/changelog +DIST=unstable +FIRST=1 + +print_changelog_item() { + DATE=$(git log -1 --format=%cD ${TAG}) + DEBFULLNAME=$(git log -1 --format=%an ${TAG}) + DEBEMAIL=$(git log -1 --format=%ae ${TAG}) + + if [ ${FIRST} = 0 ]; then echo >> ${CHANGELOG}; fi + FIRST=0 + + echo "vpp (${VER}) ${DIST}; urgency=low" >> ${CHANGELOG} + echo >> ${CHANGELOG} + echo "${DESC}" >> ${CHANGELOG} + echo >> ${CHANGELOG} + echo " -- ${DEBFULLNAME} <${DEBEMAIL}> ${DATE}" >> ${CHANGELOG} +} + +VER=$(scripts/version) +TAG=HEAD +ADDS=$(echo ${VER} | sed -e 's/~.*//'| cut -s -d- -f2) + +rm -f ${CHANGELOG} + +if [ -n "${ADDS}" ]; then + DESC=" * includes ${ADDS} commits after $(echo ${VER}| cut -d- -f1) release" + print_changelog_item +fi + +for TAG in $(git tag -l 'v[0-9][0-9].[0-9][0-9]' | sort -r ); do + VER=$(echo ${TAG}| sed -e 's/^v//') + DESC=$(git tag -l -n20 ${TAG} | tail -n+2 | sed -e 's/^ */ /') + print_changelog_item +done diff --git a/vpp/build-root/scripts/lsnet b/vpp/build-root/scripts/lsnet new file mode 100755 index 00000000..ed590e53 --- /dev/null +++ b/vpp/build-root/scripts/lsnet @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "PCI Address MAC address Device Name Driver State Speed Port Type" +echo "============ ================= ============== ========== ======== ========== ====================" + +for f in /sys/class/net/*; do + dev=$(basename ${f}) + if [ -e $f/device ] ; then + dev=$(basename ${f}) + pci_addr=$(basename $(readlink $f/device)) + mac=$(cat $f/address) + driver=$(basename $(readlink $f/device/driver)) + oper=$(cat $f/operstate) + speed=$(sudo ethtool $dev | grep Speed | cut -d" " -f2) + port=$(ethtool $dev 2> /dev/null | sed -ne 's/.*Port: \(.*\)/\1/p') + printf "%-12s %-14s %-14s %-10s %-8s %-10s %-20s\n" $pci_addr $mac $dev $driver $oper $speed "$port" + # ethtool $dev | grep Port: + fi +done + diff --git a/vpp/build-root/scripts/make-plugin-toolkit b/vpp/build-root/scripts/make-plugin-toolkit new file mode 100755 index 00000000..e1d6fcfb --- /dev/null +++ b/vpp/build-root/scripts/make-plugin-toolkit @@ -0,0 +1,40 @@ +#!/bin/bash + +set -eux + +build_tarball() { + for dir in vppinfra dpdk svm vlib-api vlib vnet vpp vpp-api-test + do + tar -C install-$1/$dir/include -cf - . | tar -C $tmp_dir/include -xf - + done + tar -C ../sample-plugin -cf - . \ + | tar -C $tmp_dir/src/sample-plugin -xf - + cp tools/bin/vppapigen $tmp_dir/tools/bin + echo Created by `id -u -n` on `hostname` at `date` > \ + $tmp_dir/toolkit-version-stamp + cp scripts/vpp-plugin-toolkit-readme $tmp_dir/README + tar -C $tmp_dir -zcf $PWD/vpp-plugin-toolkit-$1.tar.gz . +} + +if [ `basename $PWD` != "build-root" ] ; then + echo Please run this script from build-root + exit 1 +fi + +echo Pull additional tookit repos +make PLATFORM=vpp sample-plugin-find-source + +make PLATFORM=vpp TAG=vpp wipe-all +echo Build vpp forwarder production package +make PLATFORM=vpp TAG=vpp strip_sumbols=yes install-packages + +tmp_dir="`mktemp -d /tmp/plugin-XXXXXX`" +trap "rm -rf $tmp_dir" err + +echo Create vpp forwarder production plugin toolkit tarball +mkdir -p $tmp_dir/tools/bin $tmp_dir/include $tmp_dir/lib64 \ + $tmp_dir/src/sample-plugin +build_tarball vpp-native +rm -rf $tmp_dir + +exit 0 diff --git a/vpp/build-root/scripts/pci-nic-bind b/vpp/build-root/scripts/pci-nic-bind new file mode 100755 index 00000000..f3a0c264 --- /dev/null +++ b/vpp/build-root/scripts/pci-nic-bind @@ -0,0 +1,94 @@ +#!/bin/bash + +uio_drivers="igb_uio uio_pci_generic vfio-pci" +tmpfile=$(mktemp) + + +function bind_drv() { + addr=$1 + modalias=$(cat $selection/modalias) + native_drv=$(modprobe -R $modalias) + array=() + + for drv in $native_drv $uio_drivers; do + if [ -e /sys/bus/pci/drivers/$drv ]; then + echo driver $drv + drv_desc=$(modinfo $drv | grep description: | sed -e 's/.*:[[:space:]]\+//' ) + array+=("${drv}") + array+=("${drv_desc}") + fi + done + dialog --backtitle "PCI NIC Bind Utility" \ + --clear \ + --menu "Select kernel driver" 18 100 12 \ + "${array[@]}" 2> $tmpfile + retval=$? + selection=$(cat $tmpfile) + rm $tmpfile + if [ $retval -ne 0 ]; then + return + fi + vd=$(cat /sys/bus/pci/devices/${addr}/vendor /sys/bus/pci/devices/${addr}/device) + echo $addr | tee /sys/bus/pci/devices/${addr}/driver/unbind > /dev/null 2> /dev/null + echo $vd | tee /sys/bus/pci/drivers/${selection}/new_id > /dev/null 2> /dev/null + echo $addr | tee /sys/bus/pci/drivers/${selection}/bind > /dev/null 2> /dev/null +} + +function find_pci_slot() { + addr=$1 + [ ! "$(ls -A /sys/bus/pci/slots )" ] && echo "No PCI slot data" && return + for slot in $(find /sys/bus/pci/slots/* -maxdepth 0 -exec basename {} \;); do + slot_addr=$(cat /sys/bus/pci/slots/$slot/address) + if [[ "${addr}" == *"${slot_addr}"* ]]; then + echo "PCI slot: ${slot}" + return + fi + done + echo "Unknown PCI slot" +} + +! type -ap dialog > /dev/null && echo "Please install dialog (apt-get install dialog)" && exit +if [ $USER != "root" ] ; then +echo "Restarting script with sudo..." + sudo $0 ${*} + exit +fi + +cd /sys/bus/pci/devices + +while true; do + array=() + for addr in *; do + class=$(cat ${addr}/class) + if [ "$class" = "0x020000" ]; then + name=$(lspci -s $addr | sed -e 's/.*: //') + if [ -e "/sys/bus/pci/devices/$addr/driver" ]; then + drv=$(basename $(readlink -f /sys/bus/pci/devices/$addr/driver)) + else + drv=" " + fi + slot=$(find_pci_slot ${addr}) + array+=("${addr}") + array+=("${drv}|${name}") + array+=("${slot}") + fi + done + + dialog --backtitle "PCI NIC Bind Utility" \ + --item-help \ + --clear \ + --column-separator '|' \ + --menu "Select NIC" 18 100 12 \ + "${array[@]}" 2> $tmpfile + + retval=$? + selection=$(cat $tmpfile) + rm $tmpfile + if [ $retval -ne 0 ]; then + exit + fi + bind_drv $selection +done + + + diff --git a/vpp/build-root/scripts/pci-nic-bind-to-kernel b/vpp/build-root/scripts/pci-nic-bind-to-kernel new file mode 100755 index 00000000..3d8559e3 --- /dev/null +++ b/vpp/build-root/scripts/pci-nic-bind-to-kernel @@ -0,0 +1,19 @@ +#!/bin/bash + +# Bind all unused PCI devices bound to uio drivers +# back to default kernel driver + +if [ $USER != "root" ] ; then + echo "Restarting script with sudo..." + sudo $0 ${*} + exit +fi + +for f in /sys/bus/pci/drivers/{igb_uio,uio_pci_generic,vfio-pci}/*; do + [ -e ${f}/config ] || continue + fuser -s ${f}/config && continue + echo 1 > ${f}/remove + removed=y +done + +[ -n ${removed} ] && echo 1 > /sys/bus/pci/rescan diff --git a/vpp/build-root/scripts/remove-rpath b/vpp/build-root/scripts/remove-rpath new file mode 100755 index 00000000..bda3d60d --- /dev/null +++ b/vpp/build-root/scripts/remove-rpath @@ -0,0 +1,24 @@ +#!/bin/bash + +if [ -z $1 ]; then + echo "Please specify path" + exit 1 +fi + +which chrpath &> /dev/null + +if [ $? -ne 0 ] ; then + echo "Please install chrpath tool" + exit 1 +fi + +libs=$(find $1 -type f -name \*.so) +execs=$(find $1 -type f -path \*/bin/\* ) + +for i in $libs $execs; do + chrpath $i 2> /dev/null | grep -q build-root + if [ $? -eq 0 ] ; then + chrpath $i + fi +done + diff --git a/vpp/build-root/scripts/verdist b/vpp/build-root/scripts/verdist new file mode 100755 index 00000000..9d1f1b5a --- /dev/null +++ b/vpp/build-root/scripts/verdist @@ -0,0 +1,31 @@ +#!/bin/bash + +# +# Add version to dist tarball. +# +BR=$1 +prefix=$2 +verstring=$3 +BASE=`pwd` + +git rev-parse 2> /dev/null +if [ $? == 0 ]; then + git archive --prefix=${prefix}/ HEAD | gzip -9 > ${verstring}.tar.gz +else + cd .. + tar -c ${prefix} | gzip -9 > ${verstring}.tar.gz + cp ${verstring}.tar.gz $BASE + cd $BASE +fi + +mkdir ${BASE}/tmp +cd ${BASE}/tmp +tar -xzf ${BASE}/${verstring}.tar.gz +rm ${BASE}/${verstring}.tar.gz + +cp ${BR}/scripts/.version ${BASE}/tmp/${prefix}/build-root/scripts +tar -c ${prefix} | gzip -9 > ${verstring}.tar.gz +mv ${verstring}.tar.gz ${BASE} + +cd ${BASE} +rm -rf tmp diff --git a/vpp/build-root/scripts/version b/vpp/build-root/scripts/version new file mode 100755 index 00000000..d92eb8b7 --- /dev/null +++ b/vpp/build-root/scripts/version @@ -0,0 +1,54 @@ +#!/bin/bash + +path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) + +cd "$path" + +git rev-parse 2> /dev/null +if [ $? == 0 ]; then + vstring=$(git describe) +elif [ -f .version ]; then + vstring=$(cat .version) +else + if [ -f ../rpm/*.gz ]; then + vstring=$(ls ../rpm/*.gz) + else + exit 1 + fi +fi + +TAG=$(echo ${vstring} | cut -d- -f1 | sed -e 's/^v//') +ADD=$(echo ${vstring} | cut -s -d- -f2) + +git rev-parse 2> /dev/null +if [ $? == 0 ]; then + CMT=$(git describe --dirty --match 'v*'| cut -s -d- -f3,4) +else + CMT=$(echo ${vstring} | cut -s -d- -f3,4) +fi +CMTR=$(echo $CMT | sed 's/-/_/') + +if [ -n "${BUILD_NUMBER}" ]; then + BLD="~b${BUILD_NUMBER}" +fi + +if [ "$1" = "rpm-version" ]; then + echo ${TAG} + exit +fi + +if [ "$1" = "rpm-release" ]; then + [ -z "${ADD}" ] && echo release && exit + echo ${ADD}${CMTR:+~${CMTR}}${BLD} + exit +fi + + if [ -n "${ADD}" ]; then + if [ "$1" = "rpm-string" ]; then + echo ${TAG}-${ADD}${CMTR:+~${CMTR}}${BLD} + else + echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD} + fi + else + echo ${TAG}-release +fi diff --git a/vpp/build-root/vagrant/.gitignore b/vpp/build-root/vagrant/.gitignore new file mode 100644 index 00000000..a977916f --- /dev/null +++ b/vpp/build-root/vagrant/.gitignore @@ -0,0 +1 @@ +.vagrant/ diff --git a/vpp/build-root/vagrant/README b/vpp/build-root/vagrant/README new file mode 100644 index 00000000..238c90ce --- /dev/null +++ b/vpp/build-root/vagrant/README @@ -0,0 +1,28 @@ +INTRO: + +This is a vagrant environment for VPP. + +VPP currently works under Linux and has support for: + +- Ubuntu 14.04, Ubuntu 16.04 and Centos7.2 + +The VM builds VPP from source which can be located at /vpp + +VM PARTICULARS: +This vagrant environment creates a VM based on environment variables found in ./env.sh +To use, edit env.sh then + source ./env.sh + vagrant up + +By default, the VM created is/has: +- Ubuntu 14.04 +- 2 vCPUs +- 4G of RAM +- 2 NICs (1 x NAT - host access, 1 x VPP DPDK enabled) + +PROVIDERS: + +Supported vagrant providers are: + +- Virtualbox, VMware Fusion/Workstation, Libvirt + diff --git a/vpp/build-root/vagrant/Vagrantfile b/vpp/build-root/vagrant/Vagrantfile new file mode 100644 index 00000000..b463d646 --- /dev/null +++ b/vpp/build-root/vagrant/Vagrantfile @@ -0,0 +1,113 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure(2) do |config| + + # Pick the right distro and bootstrap, default is ubuntu1604 + distro = ( ENV['VPP_VAGRANT_DISTRO'] || "ubuntu1604") + if distro == 'centos7' + config.vm.box = "puppetlabs/centos-7.2-64-nocm" + config.ssh.insert_key = false + elsif distro == 'ubuntu1404' + config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm" + else + config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm" + end + 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__),"build.sh"), :args => "/vpp vagrant" + + post_build = ( ENV['VPP_VAGRANT_POST_BUILD'] ) + if post_build == "test" + config.vm.provision "shell", inline: "echo Testing VPP; cd /vpp; make test" + elsif post_build == "install" + config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp" + config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh") + config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh") + end + + # Add .gnupg dir in so folks can sign patches + # Note, as gnupg puts socket files in that dir, we have + # to be cautious and make sure we are dealing with a plain file + homedir = File.expand_path("~/") + Dir["#{homedir}/.gnupg/**/*"].each do |fname| + if File.file?(fname) + destname = fname.sub(Regexp.escape("#{homedir}/"),'') + config.vm.provision "file", source: fname, destination: destname + end + end + + # Copy in the .gitconfig if it exists + if File.file?(File.expand_path("~/.gitconfig")) + config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" + end + + # vagrant-cachier caches apt/yum etc to speed subsequent + # vagrant up + # to enable, run + # vagrant plugin install vagrant-cachier + # + if Vagrant.has_plugin?("vagrant-cachier") + config.cache.scope = :box + end + + # Define some physical ports for your VMs to be used by DPDK + nics = (ENV['VPP_VAGRANT_NICS'] || "2").to_i(10) + for i in 1..nics + config.vm.network "private_network", type: "dhcp" + end + + # use http proxy if avaiable + if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf") + config.proxy.http = ENV['http_proxy'] + config.proxy.https = ENV['https_proxy'] + config.proxy.no_proxy = "localhost,127.0.0.1" + end + + vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2) + vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096) + + config.ssh.forward_agent = true + config.ssh.forward_x11 = true + + config.vm.provider "virtualbox" do |vb| + vb.customize ["modifyvm", :id, "--ioapic", "on"] + vb.memory = "#{vmram}" + vb.cpus = "#{vmcpu}" + + # rsync the vpp directory if provision hasn't happened yet + unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") + config.vm.synced_folder "../../", "/vpp", type: "rsync", + rsync__auto: false, + rsync__exclude: [ + "build-root/build*/", + "build-root/install*/", + "build-root/images*/", + "build-root/*.deb", + "build-root/*.rpm", + "build-root/*.changes", + "build-root/python", + "build-root/deb/debian/*.dkms", + "build-root/deb/debian/*.install", + "build-root/deb/debian/changes", + "build-root/tools"] + end + + #support for the SSE4.x instruction is required in some versions of VB. + vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"] + vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"] + end + config.vm.provider "vmware_fusion" do |fusion,override| + fusion.vmx["memsize"] = "#{vmram}" + fusion.vmx["numvcpus"] = "#{vmcpu}" + end + config.vm.provider "libvirt" do |lv| + lv.memory = "#{vmram}" + lv.cpus = "#{vmcpu}" + end + config.vm.provider "vmware_workstation" do |vws,override| + vws.vmx["memsize"] = "#{vmram}" + vws.vmx["numvcpus"] = "#{vmcpu}" + end +end diff --git a/vpp/build-root/vagrant/WELCOME b/vpp/build-root/vagrant/WELCOME new file mode 100644 index 00000000..eb6aa2fd --- /dev/null +++ b/vpp/build-root/vagrant/WELCOME @@ -0,0 +1,61 @@ +VPP has now been built, installed, and started. + +To give it a spin, we can create a tap interface and try a simple ping +(with trace). + +Make sure you have run: + +$ vagrant ssh + +To get to the vagrant VM: + +vagrant@localhost:~$ + +Confirm that vpp is running with + +vagrant@localhost:~$ sudo status vpp +vpp start/running, process 25202 + +To create the tap: + +vagrant@localhost:~$ sudo vppctl tap connect foobar +Created tap-0 for Linux tap 'foobar' +vagrant@localhost:~$ sudo vppctl show int + +To assign it an ip address (and 'up' the interface): + +vagrant@localhost:~$ sudo vppctl set int ip address tap-0 192.168.1.1/24 +vagrant@localhost:~$ sudo vppctl set int state tap-0 up + +To turn on packet tracing for the tap interface: +vagrant@localhost:~$ sudo vppctl trace add tapcli-rx 10 + +Now, to set up and try the other end: +vagrant@localhost:~$ sudo ip addr add 192.168.1.2/24 dev foobar +vagrant@localhost:~$ ping -c 3 192.168.1.1 + +To look at the trace: +vagrant@localhost:~$ sudo vppctl show trace + +And to stop tracing: + +vagrant@localhost:~$ sudo vppctl clear trace + +Other fun things to look at: + +The vlib packet processing graph: +vagrant@localhost:~$ sudo vppctl show vlib graph + +which will produce output like: + + Name Next Previous +ip4-icmp-input error-punt [0] ip4-local + ip4-icmp-echo-request [1] + vpe-icmp4-oam [2] + +To read this, the first column (Name) is the name of the node. +The second column (Next) is the name of the children of that node. +The third column (Previous) is the name of the parents of this node. + +To see this README again: +cat /vagrant/README diff --git a/vpp/build-root/vagrant/build.sh b/vpp/build-root/vagrant/build.sh new file mode 100755 index 00000000..76838e28 --- /dev/null +++ b/vpp/build-root/vagrant/build.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Get Command Line arguements if present +VPP_DIR=$1 +if [ "x$1" != "x" ]; then + VPP_DIR=$1 +else + VPP_DIR=`dirname $0`/../../ +fi + +if [ "x$2" != "x" ]; then + SUDOCMD="sudo -H -u $2" +fi +echo 0:$0 +echo 1:$1 +echo 2:$2 +echo VPP_DIR: $VPP_DIR +echo SUDOCMD: $SUDOCMD + +# 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 + +# Install dependencies +cd $VPP_DIR +make UNATTENDED=yes install-dep + +# Really really clean things up so we can be sure +# that the build works even when switching distros +$SUDOCMD make wipe +(cd build-root/;$SUDOCMD make distclean) +rm -f build-root/.bootstrap.ok + +if [ $DISTRIB_ID == "CentOS" ]; then + echo rpm -V apr-devel + rpm -V apr-devel + if [ $? != 0 ]; then sudo yum reinstall -y apr-devel;fi + echo rpm -V ganglia-devel + rpm -V ganglia-devel + if [ $? != 0 ]; then sudo yum reinstall -y ganglia-devel;fi + echo rpm -V libconfuse-devel + rpm -V libconfuse-devel + if [ $? != 0 ]; then sudo yum reinstall -y libconfuse-devel;fi +fi + +# Build and install packaging +$SUDOCMD make bootstrap +if [ $DISTRIB_ID == "Ubuntu" ]; then + $SUDOCMD make pkg-deb +elif [ $DISTRIB_ID == "CentOS" ]; then + (cd $VPP_DIR/vnet ;$SUDOCMD aclocal;$SUDOCMD automake -a) + $SUDOCMD make pkg-rpm +fi + diff --git a/vpp/build-root/vagrant/clearinterfaces.sh b/vpp/build-root/vagrant/clearinterfaces.sh new file mode 100755 index 00000000..78f6705c --- /dev/null +++ b/vpp/build-root/vagrant/clearinterfaces.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Capture all the interface IPs, in case we need them later +ip -o addr show > ~vagrant/ifconfiga +chown vagrant:vagrant ~vagrant/ifconfiga + +# Disable all ethernet interfaces other than the default route +# interface so VPP will use those interfaces. The VPP auto-blacklist +# algorithm prevents the use of any physical interface contained in the +# routing table (i.e. "route --inet --inet6") preventing the theft of +# the management ethernet interface by VPP from the kernel. +for intf in $(ls /sys/class/net) ; do + if [ -d /sys/class/net/$intf/device ] && + [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then + ifconfig $intf down + fi +done diff --git a/vpp/build-root/vagrant/env.sh b/vpp/build-root/vagrant/env.sh new file mode 100644 index 00000000..f0edfd88 --- /dev/null +++ b/vpp/build-root/vagrant/env.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +export VPP_VAGRANT_DISTRO="ubuntu1404" +export VPP_VAGRANT_NICS=2 +export VPP_VAGRANT_VMCPU=4 +export VPP_VAGRANT_VMRAM=4096 diff --git a/vpp/build-root/vagrant/install.sh b/vpp/build-root/vagrant/install.sh new file mode 100644 index 00000000..a53faa4d --- /dev/null +++ b/vpp/build-root/vagrant/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Get Command Line arguements if present +VPP_DIR=$1 +if [ "x$1" != "x" ]; then + VPP_DIR=$1 +else + VPP_DIR=`dirname $0`/../../ +fi + +# 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 +echo DISTRIB_ID: $DISTRIB_ID +echo DISTRIB_RELEASE: $DISTRIB_RELEASE +echo DISTRIB_CODENAME: $DISTRIB_CODENAME +echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION + +if [ $DISTRIB_ID == "Ubuntu" ]; then + (cd ${VPP_DIR}/build-root/;sudo dpkg -i *.deb) +elif [ $DISTRIB_ID == "CentOS" ]; then + (cd ${VPP_DIR}/build-root/;sudo rpm -Uvh *.rpm) +fi \ No newline at end of file diff --git a/vpp/build-root/vagrant/run.sh b/vpp/build-root/vagrant/run.sh new file mode 100755 index 00000000..1cd33826 --- /dev/null +++ b/vpp/build-root/vagrant/run.sh @@ -0,0 +1,23 @@ +#!/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 + 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 + +if [ $DISTRIB_ID == "CentOS" ]; then + # Install uio-pci-generic + modprobe uio_pci_generic +fi +echo "Starting VPP..." +if [ $DISTRIB_ID == "Ubuntu" ] && [ $DISTRIB_CODENAME = "trusty" ] ; then + start vpp +else + service vpp start +fi diff --git a/vpp/build-root/vagrant/update.sh b/vpp/build-root/vagrant/update.sh new file mode 100755 index 00000000..f4139d74 --- /dev/null +++ b/vpp/build-root/vagrant/update.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Make sure that we get the hugepages we need on provision boot +# Note: The package install should take care of this at the end +# But sometimes after all the work of provisioning, we can't +# get the requested number of hugepages without rebooting. +# So do it here just in case +sysctl -w vm.nr_hugepages=1024 +HUGEPAGES=`sysctl -n vm.nr_hugepages` +if [ $HUGEPAGES != 1024 ]; then + echo "ERROR: Unable to get 1024 hugepages, only got $HUGEPAGES. Cannot finish." + exit +fi + +# Figure out what system we are running on +if [ -f /etc/lsb-release ];then + . /etc/lsb-release +elif [ -f /etc/redhat-release ];then + 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 + +# Do initial setup for the system +if [ $DISTRIB_ID == "Ubuntu" ]; then + + export DEBIAN_PRIORITY=critical + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_NONINTERACTIVE_SEEN=true + APT_OPTS="--assume-yes --no-install-suggests --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"" + + # Standard update + upgrade dance + apt-get update ${APT_OPTS} >/dev/null + apt-get upgrade ${APT_OPTS} >/dev/null + + # Fix the silly notion that /bin/sh should point to dash by pointing it to bash + + update-alternatives --install /bin/sh sh /bin/bash 100 + + # Install useful but non-mandatory tools + apt-get install -y emacs x11-utils git-review gdb gdbserver +elif [ $DISTRIB_ID == "CentOS" ]; then + # Standard update + upgrade dance + yum check-update + yum update -y +fi diff --git a/vpp/doxygen/Makefile b/vpp/doxygen/Makefile new file mode 100644 index 00000000..92fa3635 --- /dev/null +++ b/vpp/doxygen/Makefile @@ -0,0 +1,256 @@ +# 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 +# + +# Default target +.PHONY: all +all: doxygen + +# These should be passed in by the root Makefile +WS_ROOT ?= $(CURDIR)/.. +BR ?= $(WS_ROOT)/build-root + +# We support MacOS for docs generation +ifeq ($(shell uname),Darwin) +OS_ID = darwin +endif + +# Work out the OS if we haven't already +OS_ID ?= $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') + +# Package dependencies +DOC_DEB_DEPENDS = doxygen graphviz python-pyparsing python-jinja2 +DOC_RPM_DEPENDS = doxygen graphviz pyparsing python-jinja2 +DOC_MAC_BIN_DEPENDS = doxygen dot git +DOC_MAC_PY_DEPENDS = pyparsing jinja2 + +# Doxygen configuration and our utility scripts +DOXY_DIR ?= $(WS_ROOT)/doxygen + +# Primary source directories +DOXY_SRC_DIRECTORIES = \ + vppinfra \ + svm \ + vlib \ + vlib-api \ + vnet \ + vpp \ + vpp-api + +# Input directories and files +DOXY_INPUT ?= \ + $(wildcard $(WS_ROOT)/*.md) \ + $(wildcard $(DOXY_DIR)/*.md) \ + $(DOXY_SRC_DIRECTORIES) \ + plugins + +# Strip leading workspace path from input names +DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT)) + +# 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. +# These must be left-anchored paths for the regexp below to work. +DOXY_EXCLUDE ?= \ + vlib/vlib/buffer.c \ + vlib/example \ + plugins/sample-plugin + +# Generate a regexp for filenames to exclude +DOXY_EXCLUDE_REGEXP = ($(subst .,\.,$(shell echo '$(strip $(DOXY_EXCLUDE))' | sed -e 's/ /|/g'))) + +# Include all the normal source directories in the include file path +DOXY_INCLUDE_PATH = $(DOXY_SRC_DIRECTORIES) + +# Also include any plugin directories that exist +DOXY_INCLUDE_PATH += \ + $(shell find $(WS_ROOT)/plugins -maxdepth 1 -type d | sed -e 's@^$(WS_ROOT)/*@@') + +# Find API header directories and include them in the header path. +# This is only useful if VPP and plugins are already built; nothing +# here depends on those targets. We don't build documentation for these +# header files, they're just added to the INCLUDE search path for Doxygen. +_vpp_br = $(shell find "$(BR)" -maxdepth 1 -type d \ + '(' -name build-vpp_debug-native -o -name build-vpp-native ')' -print \ + | sed -e 's@^$(WS_ROOT)/*@@' -e 1q) +ifneq ($(strip $(_vpp_br)),) +DOXY_INCLUDE_PATH += \ + $(_vpp_br)/vlib-api \ + $(_vpp_br)/vpp +# Also include any plugin directories that exist +DOXY_INCLUDE_PATH += \ + $(shell find $(WS_ROOT)/$(_vpp_br)/plugins -maxdepth 1 -type d | sed -e 's@^$(WS_ROOT)/*@@') +endif + +# Discover if we have CPP available +_cpp = $(shell which cpp) +ifneq ($(strip $(_cpp)),) +# Add whatever directories CPP normally includes to the header path +DOXY_INCLUDE_PATH += $(shell set -e; $(_cpp) -v &1 | awk 'f&&/^ /{print $$1} /^\#include/{f=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 syscfg + +SIPHON_FILES = $(addprefix $(SIPHON_INPUT)/,$(addsuffix .siphon,$(SIPHONS))) +SIPHON_DOCS = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .md,$(SIPHONS))) +SIPHON_ITEMLIST = $(addprefix $(SIPHON_OUTPUT)/,$(addsuffix .itemlist,$(filter clicmd,$(SIPHONS)))) + +$(BR)/.doxygen-bootstrap.ok: Makefile + @echo "Checking whether dependencies for Doxygen are installed..." +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 update; \ + 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 ifeq ($(OS_ID),darwin) + @set -e; \ + for bin in $(DOC_MAC_BIN_DEPENDS); do \ + which -s $${bin} || (\ + echo "Program '$${bin}' not found, please install it."; \ + false; \ + ); \ + done + @set -e; \ + for py in $(DOC_MAC_PY_DEPENDS); do \ + python -c "import $${py}" >/dev/null 2>&1 || (\ + echo "Python package '$${py}' not found, please install it."; \ + false; \ + ); \ + done +else + $(error "Building documentation currently works only on Ubuntu, CentOS or MacOS systems.") +endif + @touch $@ + +.PHONY: bootstrap-doxygen +bootstrap-doxygen: $(BR)/.doxygen-bootstrap.ok + +.DELETE_ON_ERROR: $(BR)/.doxygen-siphon.dep +$(BR)/.doxygen-siphon.dep: Makefile + @echo "Building siphon dependencies..." + @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_EXCLUDE_REGEXP)' \ + | sed -e "s/^/\$$(SIPHON_FILES): /" \ + >> $@; \ + done + +# Include the source -> siphon dependencies +-include $(BR)/.doxygen-siphon.dep + +# Generate .siphon files that contain fragments of source file that +# relate to the siphons we support. +.NOTPARALLEL: $(SIPHON_FILES) +$(SIPHON_FILES): $(BR)/.doxygen-bootstrap.ok \ + $(DOXY_DIR)/siphon-generate \ + $(wildcard $(DOXY_DIR)/siphon/*.py) + @rm -rf "$(SIPHON_INPUT)" "$(SIPHON_OUTPUT)" + @mkdir -p "$(SIPHON_INPUT)" "$(SIPHON_OUTPUT)" + @touch $(SIPHON_INPUT)/files + @echo "Collating source file list for siphoning..." + @for input in $(DOXY_INPUT); do \ + cd "$(WS_ROOT)"; \ + find "$$input" -type f \ + \( -name '*.[ch]' -or -name '*.dox' \) -print \ + | grep -v -E '^$(DOXY_EXCLUDE_REGEXP)' \ + >> $(SIPHON_INPUT)/files; \ + done + @echo "Generating siphons..." + @set -e; \ + cd "$(WS_ROOT)"; \ + $(DOXY_DIR)/siphon-generate \ + --output="$(SIPHON_INPUT)" \ + "@$(SIPHON_INPUT)/files" + +# Evaluate this to build a siphon doc output target for each desired +# output type: +# $(eval $(call siphon-process,file_extension,output_type_name)) +define siphon-process +$(SIPHON_OUTPUT)/%.$(1): $(SIPHON_INPUT)/%.siphon \ + $(DOXY_DIR)/siphon-process \ + $(wildcard $(DOXY_DIR)/siphon/*.py) \ + $(wildcard $(DOXY_DIR)/siphon_templates/$(2)/*/*.$(1)) + @echo "Processing siphon for $(2) from $$(notdir $$<)..." + @set -e; \ + cd "$(WS_ROOT)"; \ + $(DOXY_DIR)/siphon-process \ + --type=$$(basename $$(notdir $$<)) \ + --format=$(2) \ + --output="$$@" \ + "$$<" +endef + +# Process the .siphon source fragments and render them into doxygen flavored +# markdown documentation +.DELETE_ON_ERROR: $(SIPHON_DOCS) +$(eval $(call siphon-process,md,markdown)) + +# Process the .siphon source fragments and render them into a list of cli +# commands. +.DELETE_ON_ERROR: $(SIPHON_ITEMLIST) +$(eval $(call siphon-process,itemlist,itemlist)) + +# This target can be used just to generate the siphoned things +.PHONY: doxygen-siphon +doxygen-siphon: $(SIPHON_DOCS) $(SIPHON_ITEMLIST) + +# Generate the doxygen docs +.PHONY: doxygen +doxygen: $(SIPHON_DOCS) + @mkdir -p "$(DOXY_OUTPUT)" + @echo "Running Doxygen..." + 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)" \ + EXCLUDE="$(DOXY_EXCLUDE)" \ + HTML=YES \ + VERSION="`git describe --tags --dirty`" \ + doxygen $(DOXY_DIR)/doxygen.cfg + +.PHONY: wipe-doxygen +wipe-doxygen: + rm -rf "$(BR)/docs" "$(BR)/.doxygen-siphon.d" + +.PHONY: clean +clean: wipe-doxygen diff --git a/vpp/doxygen/assets/doxy-vpp.css b/vpp/doxygen/assets/doxy-vpp.css new file mode 100644 index 00000000..3b74eb6f --- /dev/null +++ b/vpp/doxygen/assets/doxy-vpp.css @@ -0,0 +1,47 @@ +/* VPP CSS overrides */ + +body, table, div, p, dl { + font: initial; + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: small; +} + +code, tt { + font: initial; + font-family: Consolas, Courier, monospace; + font-size: small; +} + +pre { + font-size: 105%; +} + + +.title { + font: initial; + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 150%; + font-weight: bold; +} + + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + font-family: Consolas, Courier, monospace; +} + +.memname { + font-family: Consolas, Courier, monospace; + font-weight: bold; + font-size: 105%; +} + +.paramname { + font-family: Consolas, Courier, monospace; + font-weight: bold; +} + +a.el { + font-family: Consolas, Courier, monospace; +} diff --git a/vpp/doxygen/assets/logo_fdio.png b/vpp/doxygen/assets/logo_fdio.png new file mode 100644 index 00000000..ddfef2c7 Binary files /dev/null and b/vpp/doxygen/assets/logo_fdio.png differ diff --git a/vpp/doxygen/dir.dox.sample b/vpp/doxygen/dir.dox.sample new file mode 100644 index 00000000..ccdd095a --- /dev/null +++ b/vpp/doxygen/dir.dox.sample @@ -0,0 +1,30 @@ +/* + * Copyright (c) + * + * 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. + */ + +/* Doxygen directory documentation */ + +/** +@dir +@brief Someone please fix this description. +@todo This directory needs a description. + +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 +for documentation. +*/ +/*? %%clicmd:group_label CLI section description%% ?*/ +/*? %%syscfg:group_label Startup config section description%% ?*/ diff --git a/vpp/doxygen/doxygen.cfg b/vpp/doxygen/doxygen.cfg new file mode 100644 index 00000000..7675b693 --- /dev/null +++ b/vpp/doxygen/doxygen.cfg @@ -0,0 +1,2456 @@ +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "FD.io VPP" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = $(VERSION) + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Vector Packet Processing" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = $(ROOT)/doxygen/assets/logo_fdio.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = $(BUILD_ROOT)/docs + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = YES + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = $(ROOT) + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = $(ROOT) + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +## Indexes VPP graph nodes +ALIASES += "node=@xrefitem nodes \"Node Identifier\" \"Node Identifiers\" @c " + +## Formatting for CLI commands and output +ALIASES += "cli{1}=
\1
" +ALIASES += "clistart=
"
+ALIASES += "cliend=
" + +## Formatting for CLI example paragraphs +ALIASES += "cliexpar=@par Example usage" +ALIASES += "cliexcmd{1}=@clistartvpp# \1@cliend" +ALIASES += "cliexstart{1}=@cliexcmd{\1}@clistart" +ALIASES += "cliexend=@cliend" + +## Formatting for config directives +ALIASES += "cfgcmd{2}=@par
\1 \2
" +ALIASES += "cfgcmd{1}=@par
\1
" + +# 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" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = def=C api=C + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = NO + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = DPDK + +# 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 +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 50 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = $(ROOT)/doxygen/layout.xml + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = $(INPUT) + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + +FILE_PATTERNS = *.md *.c *.h *.def *.inc *.S *.dox *.api + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = $(EXCLUDE) + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = YES + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = */test/* *_test.c test_*.c + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = _ _* + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = *.c *.h + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = $(ROOT)/doxygen/assets + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = \ + *.c=$(ROOT)/doxygen/filter_c.py \ + *.h=$(ROOT)/doxygen/filter_h.py \ + *.api=$(ROOT)/doxygen/filter_api.py + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = $(ROOT)/README.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = $(ROOT)/doxygen/assets/doxy-vpp.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 230 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 255 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "FD.io VPP" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = io.fd.vpp + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = io.fd.vpp + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = YES + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = io.fd.vpp + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /