Change-Id: I5a57846db2d4faac1aa24db4629b612657f59afb
Signed-off-by: John DeNisco <jdenisco@cisco.com>
25 files changed:
# -- Project information -----------------------------------------------------
project = u'Vector Packet Processor'
# -- Project information -----------------------------------------------------
project = u'Vector Packet Processor'
-copyright = u'2018, John DeNisco'
+copyright = u'2018, Linux Foundation'
author = u'John DeNisco'
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
author = u'John DeNisco'
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
# -- General configuration ---------------------------------------------------
# -- General configuration ---------------------------------------------------
============
To get started developing with VPP you need to get the sources and build the packages.
============
To get started developing with VPP you need to get the sources and build the packages.
+For more information on the build system please refer to :ref:`buildsystem`.
Get the VPP Sources
-----------------------------------
Get the VPP Sources
-----------------------------------
-To get the VPP sources and get ready to build execute the following:
+To get the VPP sources that are used to create the build, run the following commands:
There should be no output, or packages showing after each of the above commands.
There should be no output, or packages showing after each of the above commands.
-Run these commands to install the dependencies for FD.io VPP.
-If it hangs during downloading at any point, you may need to set up :ref:`proxies for this to work <setupproxies>`.
+Run the following **make** command to install the dependencies for FD.io VPP.
+If it hangs at any point during the download, then you may need to set up
+:ref:`proxies for this to work <setupproxies>`.
Build VPP (Debug)
----------------------------
Build VPP (Debug)
----------------------------
-This build version contains debug symbols which is useful to modify VPP. The command
-below will build debug version of VPP. The binaries when building the debug images
-can be found in /build-root/vpp_debug-native.
+This build version contains debug symbols which are useful for modifying VPP. The
+**make** command below builds a debug version of VPP. The binaries, when building the
+debug images, can be found in /build-root/vpp_debug-native.
To build the release version of FD.io VPP. This build is optimized and will not create debug symbols.
The binaries when building the release images can be found in /build-root/vpp-native.
To build the release version of FD.io VPP. This build is optimized and will not create debug symbols.
The binaries when building the release images can be found in /build-root/vpp-native.
+Use the following **make** command below to build the release version of FD.io VPP. This build is
+optimized and will not create debug symbols. When building the release images, the binaries can
+be found in /build-root/vpp-native.
+
.. code-block:: console
$ make build-release
.. code-block:: console
$ make build-release
Building Necessary Packages
--------------------------------------------
Building Necessary Packages
--------------------------------------------
-To build the debian packages, one of the following commands below depending on the system:
-
Building Debian Packages
^^^^^^^^^^^^^^^^^^^^^^^^^
Building Debian Packages
^^^^^^^^^^^^^^^^^^^^^^^^^
+To build the debian packages, use one of the following commands below, depending on the system:
+
.. code-block:: console
$ make pkg-deb
.. code-block:: console
$ make pkg-deb
Building RPM Packages
^^^^^^^^^^^^^^^^^^^^^^^
Building RPM Packages
^^^^^^^^^^^^^^^^^^^^^^^
+To build the rpm packages, use one of the following commands below, depending on the system:
+
.. code-block:: console
$ make pkg-rpm
.. code-block:: console
$ make pkg-rpm
Build System
============
Build System
============
-This reference guide describes the vpp build system in detail
+This guide describes the vpp build system in detail.
Starting GDB
----------------------------
Starting GDB
----------------------------
-Once at the gdb prompt VPP can be started with the following:
+Once at the gdb prompt, VPP can be started by isuuing the following commands:
----------------------------
If you encounter issues when running VPP, such as VPP terminating due to a segfault
----------------------------
If you encounter issues when running VPP, such as VPP terminating due to a segfault
-or abort signal, you can run the VPP debug binary and then execute **backtrace** or **bt**.
+or abort signal, then you can run the VPP debug binary and then execute **backtrace** or **bt**.
Get to the GDB prompt
---------------------------------------
Get to the GDB prompt
---------------------------------------
-When running VPP is running get to the command prompt with CTRL-c.
+When VPP is running, you can get to the command prompt by entering CTRL-c.
Breakpoints
---------------------------------------
Breakpoints
---------------------------------------
-When at the GDB prompt set a breakpoint like so:
+When at the GDB prompt, set a breakpoint by using the commands below:
$ git clone ssh://YOUR_GERRIT_USERNAME@gerrit.fd.io:29418/vpp
$ cd vpp
$ git clone ssh://YOUR_GERRIT_USERNAME@gerrit.fd.io:29418/vpp
$ cd vpp
-When attempting to clone the repo it will ask if you want to add the Server Host Key to the list of known hosts. Type **yes** and hit enter.
+When attempting to clone the repo Git will prompt you asking if you want to add the Server Host Key to the list of known hosts. Enter **yes** and press the **Enter** key.
-The VPP documents use the gerrit server and git review for submitting and fetching patches.
+The VPP documents use the gerrit server, and git review for submitting and fetching patches.
New patch
-----------------
New patch
-----------------
-When working with new patch use the following to get your patch reviewed.
+When working with a new patch, use the following commands to get your patch reviewed.
-Make sure you have modified the correct files with:
+Make sure you have modified the correct files by issuing the following commands:
$ git diff
Then add and commit the patch. You may want to add a tag to the commit comments.
$ git diff
Then add and commit the patch. You may want to add a tag to the commit comments.
-For example for document only patches you should add the tag **DOCS:**.
+For example for a document with only patches you should add the tag **DOCS:**.
bihash
vpp_api_module
binary_api_support
bihash
vpp_api_module
binary_api_support
Once loaded, the plug-in DLL mechanism uses dlsym to find and verify a
vlib\_plugin\_registration data structure in the newly-loaded plug-in.
Once loaded, the plug-in DLL mechanism uses dlsym to find and verify a
vlib\_plugin\_registration data structure in the newly-loaded plug-in.
+For more on plugins please refer to :ref:`sample_plugin`.
-After build the VPP binaries, there a several to run the images you've built. These is useful when
-if you need to run VPP without installing the packages. For instance if you want to run VPP with GDB.
+After building the VPP binaries, you now have several images that you have built.
+These images are useful when you need to run VPP without installing the packages.
+For instance if you want to run VPP with GDB.
_________________________
_________________________
-To run the VPP images, that you've build without GDB.
+To run the VPP images that you've built without GDB, run the following commands:
Running the release image:
Running the release image:
_________________________
With the following commands you can run VPP and then be dropped into the GDB prompt.
_________________________
With the following commands you can run VPP and then be dropped into the GDB prompt.
+Integrating a plugin
+=====================
-Integrating a complete plugin with VPP
-======================================
.. _gettingstarted:
######################
.. _gettingstarted:
######################
-The Getting Started Guide is comprised of several different sections; a section for Users, another for Developers, and a section for Writing VPP documentation.
+The Getting Started Guide is comprised of several different sections; a User section
+that describes a basic installation and configuration of VPP (either manually or using
+a config utility), another install for Developers, which contains additional code that
+provides tools that are used in a development environment.
-The Users section covers basic VPP installation and configuration operations. This section covers the following areas:
+The Users section covers basic VPP installation and configuration operations; this
+section covers the following areas:
-* Describes the different types of VPP packages
-* Describes how to install VPP Binaries on different OS platforms (Ubuntu, Centos, openSUSE).
-* Explains how to configure, then use VPP.
-* Explains how to use the Configuration Utility.
+* Describes the different types of VPP packages, which are used in both basic and developer installs.
+* Describes how to manually install VPP Binaries on different OS platforms (Ubuntu, Centos, openSUSE) and then how to configure and use VPP.
+* Explains how to use the Configuration Utility to install, and then configure VPP.
The Developers section covers the following areas:
The Developers section covers the following areas:
-VPP requires *'hugepages'* to run. VPP will overwrite existing hugepage settings
-when VPP is installed. By default, VPP sets the number of hugepages on a system
-to 1024 2M hugepages (1G hugepages are no longer supported). This is the number
-of hugepages on the system, not just used by VPP.
+VPP requires *hugepages* to run during VPP operation, to manage large pages of memory.
+During VPP installation, VPP will overwrite the existing hugepage settings. By
+default, VPP sets the number of hugepages on a system to 1024 2M hugepages (1G hugepages
+are no longer supported). This is the number of hugepages on the system, not just used by VPP.
-When VPP is installed, the following file is copied to the system and used to apply the
-hugepage settings on VPP installation and system reboot:
+When VPP is installed, the following configuration file is copied to the system. The
+hugepage settings are applied in the VPP installation and on system reboots. To set
+the hugepage settings, perform the following commands:
# to current shmmax value.
kernel.shmmax=2147483648
# to current shmmax value.
kernel.shmmax=2147483648
-Depending on how the system is being used, this file can be updated to adjust
+Depending on how the system is being used, this configuration file can be updated to adjust
the number of hugepages reserved on a system. Below are some examples of
the number of hugepages reserved on a system. Below are some examples of
For a small VM with minimal workload:
.. code-block:: console
For a small VM with minimal workload:
.. code-block:: console
.. note::
If VPP is being run in a Virtual Machine (VM), the VM must have hugepage
.. note::
If VPP is being run in a Virtual Machine (VM), the VM must have hugepage
- backing. When VPP is installed, it will attempt to overwrite existing
- hugepage setting. If the VM does not have hugepage backing, this will fail,
- but this may go unnoticed. When the VM is rebooted, on system startup,
- *'vm.nr_hugepages'* will be reapplied, will fail, and the VM will abort kernel
+ backing. When VPP is installed, it will attempt to overwrite existing the
+ hugepage setting. If the VM does not have hugepage backing, the install will fail,
+ but the failure may go unnoticed. When the VM is rebooted, on system startup,
+ *'vm.nr_hugepages'* will be reapplied, and will fail, and the VM will abort kernel
boot, locking up the VM. To avoid this scenario, ensure the VM has enough
hugepage backing.
boot, locking up the VM. To avoid this scenario, ensure the VM has enough
hugepage backing.
Configuring VPP
==================
Configuring VPP
==================
-There is some basic configuration that is needed to run FD.io VPP. This section
-describes the basic configuration:
+There is some basic configuration that needs to be performed before running
+FD.io VPP. This section describes the configuration process:
.. toctree::
:maxdepth: 2
.. toctree::
:maxdepth: 2
+The Users section describe a basic VPP installation and configuration operation.
+The installation and configuration of VPP can be done either manually, or by
+using a configuration utility.
+
+This section covers the following areas:
+
The Users section covers basic VPP installation and configuration operations. This
section covers the following areas:
* Describes the different types of VPP packages
The Users section covers basic VPP installation and configuration operations. This
section covers the following areas:
* Describes the different types of VPP packages
-* Describes how to install VPP Binaries on different OS platforms (Ubuntu, Centos, openSUSE)
-* Explains how to configure, then use VPP
-* Explains how to use the Configuration Utility
+* Describes how to manually install VPP Binaries on different OS platforms (Ubuntu, Centos, openSUSE)
+* Explains how to manually configure, then run VPP
+* Explains how to install, then configure VPP using the Configuration Utility
.. toctree::
:maxdepth: 2
.. toctree::
:maxdepth: 2
Update the OS
-------------
Update the OS
-------------
-Before starting the repository setup, it is a good idea to first update and upgrade the OS.
+Before starting the repository setup, it is a good idea to first update and upgrade
+the OS; run the following command to update the OS:
Point to the Repository
-----------------------
Point to the Repository
-----------------------
-For CentOS based systems, there are two respositories to pull VPP binaries
-from.
+For CentOS based systems, there are two respositories to pull VPP binaries from:
* CentOS NFV SIG Repository
* Nexus Repository
* CentOS NFV SIG Repository
* Nexus Repository
CentOS NFV SIG Repository
^^^^^^^^^^^^^^^^^^^^^^^^^
CentOS NFV SIG Repository
^^^^^^^^^^^^^^^^^^^^^^^^^
-VPP is not in the official CentOS 7 distro. However, CentOS has Special
+VPP is not in the official CentOS 7 distro; however, CentOS has Special
Interest Groups (SIG), which are smaller groups within the CentOS community that
focus on a small set of issues. The CentOS NFV (Network Function Virtualization)
SIG was created to provide a CentOS-based stack that will serve as a platform
Interest Groups (SIG), which are smaller groups within the CentOS community that
focus on a small set of issues. The CentOS NFV (Network Function Virtualization)
SIG was created to provide a CentOS-based stack that will serve as a platform
-for the deployment and testing of virtual network functions (VNFs). VPP has been
-included in this SIG.
To install released packages from the CentOS NFV SIG Repository on an updated
To install released packages from the CentOS NFV SIG Repository on an updated
-Centos 7 system, first, install the CentOS NFV SIG FIDO repo file:
+Centos 7 system, first, install the CentOS NFV SIG FIDO repo file by running the
+following command:
""""""""""""""""""
To allow *'yum'* access to the official VPP releases, create the file
""""""""""""""""""
To allow *'yum'* access to the official VPP releases, create the file
-*'/etc/yum.repos.d/fdio-release.repo'* with the following content:
+*'/etc/yum.repos.d/fdio-release.repo'* with the following content.
The *'yum install vpp'* command will install the most recent release. To
install older releases, run the following command to get the list of releases
The *'yum install vpp'* command will install the most recent release. To
install older releases, run the following command to get the list of releases
particular version of the RPMs.
VPP Stable Branch
particular version of the RPMs.
VPP Stable Branch
To allow *yum* access to the build artifacts for a VPP stable branch, create
To allow *yum* access to the build artifacts for a VPP stable branch, create
-the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content:
+the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
To allow *yum* access to the nightly builds from the VPP master branch, create
To allow *yum* access to the nightly builds from the VPP master branch, create
-the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content:
+the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
The *'yum install vpp'* command will install the most recent build on the
branch. Run the following command to get the list of images produce by the
The *'yum install vpp'* command will install the most recent build on the
branch. Run the following command to get the list of images produce by the
Install VPP RPMs
================
Install VPP RPMs
================
-To install the VPP packet engine, run the following:
+To install the VPP packet engine, run the following command:
.. code-block:: console
$ sudo yum install vpp
.. code-block:: console
$ sudo yum install vpp
-The **'vpp'** RPM depend on the **'vpp-lib'** and **'vpp-selinux-policy'**
+The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
RPMs, so they will be installed as well.
.. note::
RPMs, so they will be installed as well.
.. note::
- The **'vpp-selinux-policy'** will not enable SELinux on the system. It
+ The *vpp-selinux-policy* will not enable SELinux on the system. It
will install a Custom VPP SELinux policy that will be used if SELinux is
enabled at any time.
will install a Custom VPP SELinux policy that will be used if SELinux is
enabled at any time.
============
Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
============
Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
+run the following command:
.. code-block:: console
$ sudo systemctl start vpp
.. code-block:: console
$ sudo systemctl start vpp
-Then to enable VPP to start on system reboot:
+Then to enable VPP to start on system reboot, run the following command:
.. code-block:: console
$ sudo systemctl enable vpp
.. code-block:: console
$ sudo systemctl enable vpp
Outside of running VPP as a systemd service, VPP can be started manually or
made to run within GDB for debugging. See :ref:`running` for more details and
ways to tailor VPP to a specific system.
Outside of running VPP as a systemd service, VPP can be started manually or
made to run within GDB for debugging. See :ref:`running` for more details and
ways to tailor VPP to a specific system.
Uninstall the VPP RPMs
======================
Uninstall the VPP RPMs
======================
+To uninstall a VPP RPM, run the following command:
+
.. code-block:: console
$ sudo yum autoremove vpp*
.. code-block:: console
$ sudo yum autoremove vpp*
-Package Descriptions
---------------------
-The following is a brief description of the packages to be installed with VPP.
-
-.. toctree::
-
- packages
-
-Installing VPP Binaries
-----------------------------------
+Installing VPP
+---------------
This section provides directions on how to Install VPP binaries on Ubuntu, Centos,
and openSUSE platforms.
This section provides directions on how to Install VPP binaries on Ubuntu, Centos,
and openSUSE platforms.
+
+Package Descriptions
+--------------------
+The following is a brief description of the packages to be installed with VPP.
+
+.. toctree::
+
+ packages
-To install VPP on openSUSE, first install the following release and then execute
-the appropriate commands.
+
+To install VPP on openSUSE, first install the following release, and then execute
+the associated commands.
openSUSE Tumbleweed (rolling release)
------------------------------------------------------------
openSUSE Tumbleweed (rolling release)
------------------------------------------------------------
+To uninstall the vpp plugins, run the following command:
+
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
openSUSE Tumbleweed (rolling release)
-------------------------------------
openSUSE Tumbleweed (rolling release)
-------------------------------------
+To uninstall the openSUSE Tumbleweed, run the following command:
+
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
.. code-block:: console
sudo zypper remove -u vpp vpp-plugins
Ubuntu 16.04 - Setup the fd.io Repository
==========================================
Ubuntu 16.04 - Setup the fd.io Repository
==========================================
-From the following, choose one of the releases to install.
+Choose one of the following releases to install.
Update the OS
-----------------------
Update the OS
-----------------------
-It is probably a good idea to update and upgrade the OS before starting
+It is a good idea to first update and upgrade the OS before starting; run the following command to update the OS:
Point to the Repository
-----------------------------------
Point to the Repository
-----------------------------------
-Create a file **"/etc/apt/sources.list.d/99fd.io.list"** with the contents that point to
+Create a file **/etc/apt/sources.list.d/99fd.io.list** with contents that point to
the version needed. The contents needed are shown below.
.. _install_vpp:
the version needed. The contents needed are shown below.
.. _install_vpp:
VPP latest Release
^^^^^^^^^^^^^^^^^^^
VPP latest Release
^^^^^^^^^^^^^^^^^^^
-Create the file **/etc/apt/sources.list.d/99fd.io.list** with contents:
+Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the following contents:
VPP stable/1804 Branch
^^^^^^^^^^^^^^^^^^^^^^^
VPP stable/1804 Branch
^^^^^^^^^^^^^^^^^^^^^^^
-Create the file **/etc/apt/sources.list.d/99fd.io.list** with contents:
+Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the following contents:
VPP master Branch
^^^^^^^^^^^^^^^^^^^^
VPP master Branch
^^^^^^^^^^^^^^^^^^^^
-Create the file **/etc/apt/sources.list.d/99fd.io.list** with contents:
+Create the file **/etc/apt/sources.list.d/99fd.io.list** that contain the following contents:
Install the Mandatory Packages
===============================
Install the Mandatory Packages
===============================
+Install the mandatory packages by running the following commands:
+
.. code-block:: console
sudo apt-get update
.. code-block:: console
sudo apt-get update
Install the Optional Packages
==============================
Install the Optional Packages
==============================
+Install the optional packages by running the following command:
+
.. code-block:: console
sudo apt-get install vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
.. code-block:: console
sudo apt-get install vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
Uninstall the Packages
======================
Uninstall the Packages
======================
+Uninstall the packages by running the following command:
+
.. code-block:: console
sudo apt-get remove --purge vpp*
.. code-block:: console
sudo apt-get remove --purge vpp*
.. _writingdocs:
#########################
.. _writingdocs:
#########################
#########################
This section covers the following topics:
#########################
This section covers the following topics:
-This is beta VPP Documentation it is not meant to be complete or accurate yet!!!!
-
FD.io Vector Packet Processing (VPP) is a fast, scalable and multi-platform network stack.
FD.io VPP is, at it's core, a scalable layer 2-4 network stack.
FD.io Vector Packet Processing (VPP) is a fast, scalable and multi-platform network stack.
FD.io VPP is, at it's core, a scalable layer 2-4 network stack.
-#############
-Other Links
-#############
+#############################
+VPP Wiki and Other Links
+#############################
There are several places to find helpful Information regarding FD.io VPP.
There are several places to find helpful Information regarding FD.io VPP.
.. toctree::
:maxdepth: 2
.. toctree::
:maxdepth: 2
readthedocs/index.rst
github/index.rst
readthedocs/index.rst
github/index.rst
- vppvagrant/index.rst
- buildsystem/index.rst
- multiarch/index.rst