Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 5/5] docs: add pri commands for forwarder
Date: Sun, 20 Oct 2019 02:04:43 +0900	[thread overview]
Message-ID: <20191019170443.23225-6-yasufum.o@gmail.com> (raw)
In-Reply-To: <20191019170443.23225-1-yasufum.o@gmail.com>

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@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


      parent reply	other threads:[~2019-10-19 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 17:04 [spp] [PATCH 0/5] Add descriptions for forwarder commands in spp_primary Yasufumi Ogawa
2019-10-19 17:04 ` [spp] [PATCH 1/5] docs: add pri APIs for forwarder Yasufumi Ogawa
2019-10-19 17:04 ` [spp] [PATCH 2/5] docs: add desc for primary design Yasufumi Ogawa
2019-10-19 17:04 ` [spp] [PATCH 3/5] docs: add intro in usecases Yasufumi Ogawa
2019-10-19 17:04 ` [spp] [PATCH 4/5] docs: add desc for using worker thread of pri Yasufumi Ogawa
2019-10-19 17:04 ` Yasufumi Ogawa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191019170443.23225-6-yasufum.o@gmail.com \
    --to=yasufum.o@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).