summaryrefslogtreecommitdiffstats
path: root/docs/gettingstarted/developers
diff options
context:
space:
mode:
authorjdenisco <jdenisco@cisco.com>2018-10-31 14:24:31 -0400
committerDamjan Marion <dmarion@me.com>2018-11-06 17:44:18 +0000
commit390036e0d075c632491beeb37aba4e5d07132e06 (patch)
tree9a4a296110acbad6de2d574404f04993cb69ac41 /docs/gettingstarted/developers
parent0f7af53e73c47a96cc0546671a0d0a5fb5f4366c (diff)
docs: Small changes to plugin, updated the requirements
Change-Id: I3c05a28991d01e726d4fa8580a720359a2d4ce91 Signed-off-by: jdenisco <jdenisco@cisco.com>
Diffstat (limited to 'docs/gettingstarted/developers')
-rw-r--r--docs/gettingstarted/developers/add_plugin.rst23
-rw-r--r--docs/gettingstarted/developers/index.rst2
2 files changed, 17 insertions, 8 deletions
diff --git a/docs/gettingstarted/developers/add_plugin.rst b/docs/gettingstarted/developers/add_plugin.rst
index eb9113a2efc..16952e8f036 100644
--- a/docs/gettingstarted/developers/add_plugin.rst
+++ b/docs/gettingstarted/developers/add_plugin.rst
@@ -9,20 +9,20 @@ Overview
________
This section shows how a VPP developer can create a new plugin, and
-add it to VPP.
+add it to VPP. We assume that we are starting from the VPP <top-of-workspace>.
As an example, we will use the **make-plugin.sh** tool found in
-**.../extras/emacs**. make-plugin.sh is a simple wrapper for a comprehensive
+**./extras/emacs**. make-plugin.sh is a simple wrapper for a comprehensive
plugin generator constructed from a set of emacs-lisp skeletons.
Create your new plugin
----------------------
-Change directory to **.../src/plugins**, and run the plugin generator:
+Change directory to **./src/plugins**, and run the plugin generator:
.. code-block:: console
- $ cd .../src/plugins
+ $ cd ./src/plugins
$ ../../extras/emacs/make-plugin.sh
<snip>
Loading /scratch/vpp-docs/extras/emacs/tunnel-c-skel.el (source)...
@@ -63,7 +63,7 @@ Here are the generated files. We'll go through them in a moment.
.. code-block:: console
- $ cd .../src/plugins/myplugin
+ $ cd ./myplugin
$ ls
CMakeLists.txt myplugin.c myplugin_periodic.c setup.pg
myplugin_all_api_h.h myplugin.h myplugin_test.c
@@ -191,11 +191,16 @@ instance of this data structure.
You can enable or disable specific vpp plugins from the command
line. By default, plugins are loaded. To change that behavior, set
-default_disabled in the vlib_plugin_macro:
+default_disabled in the macro VLIB_PLUGIN_REGISTER:
.. code-block:: console
- .default_disabled = 1
+ VLIB_PLUGIN_REGISTER () =
+ {
+ .version = VPP_BUILD_VER,
+ .default_disabled = 1
+ .description = "myplugin plugin description goes here",
+ };
The boilerplate generator places the graph node dispatch function
onto the "device-input" feature arc. This may or may not be useful.
@@ -273,3 +278,7 @@ vlib_plugin_get_symbol(...) API:
void *p = vlib_get_plugin_symbol ("plugin_name", "symbol");
+More Examples
+-------------
+
+For more information you can read many example plugins in the directory "./src/plugins".
diff --git a/docs/gettingstarted/developers/index.rst b/docs/gettingstarted/developers/index.rst
index 3520ed377f5..525f1b72305 100644
--- a/docs/gettingstarted/developers/index.rst
+++ b/docs/gettingstarted/developers/index.rst
@@ -21,6 +21,7 @@ The Developers section covers the following areas:
building
running_vpp
gdb_examples
+ add_plugin
gitreview
softwarearchitecture
infrastructure
@@ -34,5 +35,4 @@ The Developers section covers the following areas:
binary_api_support
buildsystem/index.rst
eventviewer
- add_plugin
fib20/index.rst