[spp] [PATCH 5/5] docs: add pri commands for forwarder

Yasufumi Ogawa yasufum.o at gmail.com
Sat Oct 19 19:04:43 CEST 2019


This update is to add `add`, `del`, `forward`, `stop` and `patch`
commands for spp_primary in `SPP Commands`.

Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
 docs/guides/commands/primary.rst           | 160 +++++++++++++++++++--
 docs/guides/commands/secondary/spp_nfv.rst |   8 +-
 2 files changed, 151 insertions(+), 17 deletions(-)

diff --git a/docs/guides/commands/primary.rst b/docs/guides/commands/primary.rst
index da60947..54aead4 100644
--- a/docs/guides/commands/primary.rst
+++ b/docs/guides/commands/primary.rst
@@ -44,22 +44,49 @@ All of Sub commands are referred with ``help`` command.
 status
 ------
 
-Show status fo spp_primary and forwarding statistics of each of ports.
+Show status fo ``spp_primary`` and forwarding statistics of each of ports.
 
 .. code-block:: console
 
     spp > pri; status
-    - lcores:
-      - [0]
-    - physical ports:
-        ID          rx          tx     tx_drop  mac_addr
-         0           0           0           0  56:48:4f:53:54:00
-         1           0           0           0  56:48:4f:53:54:01
-    - ring Ports:
-        ID          rx          tx     rx_drop     tx_drop
-         0           0           0           0           0
-         1           0           0           0           0
-         ...
+    - lcore_ids:
+      - master: 0
+    - stats
+      - physical ports:
+          ID          rx          tx    tx_drop  mac_addr
+           0           0           0           0  56:48:4f:53:54:00
+           1           0           0           0  56:48:4f:53:54:01
+      - ring ports:
+          ID          rx          tx     rx_drop     tx_drop
+           0           0           0           0           0
+           1           0           0           0           0
+           2           0           0           0           0
+           ...
+
+If you run ``spp_primary`` with forwarder thread, status of the forwarder is
+also displayed.
+
+.. code-block:: console
+
+    spp > pri; status
+    - lcore_ids:
+      - master: 0
+      - slave: 1
+    - forwarder:
+      - status: idling
+      - ports:
+        - phy:0
+        - phy:1
+    - stats
+      - physical ports:
+          ID          rx          tx    tx_drop  mac_addr
+           0           0           0           0  56:48:4f:53:54:00
+           1           0           0           0  56:48:4f:53:54:01
+      - ring ports:
+          ID          rx          tx     rx_drop     tx_drop
+           0           0           0           0           0
+           1           0           0           0           0
+           ...
 
 
 .. _commands_primary_clear:
@@ -75,12 +102,119 @@ Clear statistics.
     Clear port statistics.
 
 
+.. _commands_primary_add:
+
+add
+---
+
+Add a port with resource ID.
+
+For example, adding ``ring:0`` by
+
+.. code-block:: console
+
+    spp > pri; add ring:0
+    Add ring:0.
+
+Or adding ``vhost:0`` by
+
+.. code-block:: console
+
+    spp > pri; add vhost:0
+    Add vhost:0.
+
+
+.. _commands_primary_patch:
+
+patch
+------
+
+Create a path between two ports, source and destination ports.
+This command just creates a path and does not start forwarding.
+
+.. code-block:: console
+
+    spp > pri; patch phy:0 ring:0
+    Patch ports (phy:0 -> ring:0).
+
+
+.. _commands_primary_forward:
+
+forward
+-------
+
+Start forwarding.
+
+.. code-block:: console
+
+    spp > pri; forward
+    Start forwarding.
+
+Running status is changed from ``idling`` to ``running`` by
+executing it.
+
+.. code-block:: console
+
+    spp > pri; status
+    - lcore_ids:
+      - master: 0
+      - slave: 1
+    - forwarder:
+      - status: running
+      - ports:
+        - phy:0
+        - phy:1
+    ...
+
+
+.. _commands_primary_stop:
+
+stop
+----
+
+Stop forwarding.
+
+.. code-block:: console
+
+    spp > pri; stop
+    Stop forwarding.
+
+Running status is changed from ``running`` to ``idling`` by
+executing it.
+
+.. code-block:: console
+
+    spp > pri; status
+    - lcore_ids:
+      - master: 0
+      - slave: 1
+    - forwarder:
+      - status: idling
+      - ports:
+        - phy:0
+        - phy:1
+    ...
+
+
+.. _commands_primary_del:
+
+del
+---
+
+Delete a port of given resource UID.
+
+.. code-block:: console
+
+    spp > pri; del ring:0
+    Delete ring:0.
+
+
 .. _commands_primary_launch:
 
 launch
 ------
 
-Launch secondary process.
+Launch a secondary process.
 
 Spp_primary is able to launch a secondary process with given type, secondary
 ID and options of EAL and application itself. This is a list of supported type
diff --git a/docs/guides/commands/secondary/spp_nfv.rst b/docs/guides/commands/secondary/spp_nfv.rst
index d6db76e..6389b73 100644
--- a/docs/guides/commands/secondary/spp_nfv.rst
+++ b/docs/guides/commands/secondary/spp_nfv.rst
@@ -72,14 +72,14 @@ For example, adding ``ring:0`` by
 
 .. code-block:: console
 
-    spp> nfv 1; add ring:0
+    spp > nfv 1; add ring:0
     Add ring:0.
 
 Or adding ``vhost:0`` by
 
 .. code-block:: console
 
-    spp> nfv 1; add vhost:0
+    spp > nfv 1; add vhost:0
     Add vhost:0.
 
 
@@ -154,7 +154,7 @@ Delete a port from the secondary.
 
 .. code-block:: console
 
-    spp> nfv 1; del ring:0
+    spp > nfv 1; del ring:0
     Delete ring:0.
 
 
@@ -168,4 +168,4 @@ use ``bye sec`` command instead of it.
 
 .. code-block:: console
 
-    spp> nfv 1; exit
+    spp > nfv 1; exit
-- 
2.17.1



More information about the spp mailing list