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 4/5] docs: add desc for using worker thread of pri
Date: Sun, 20 Oct 2019 02:04:42 +0900	[thread overview]
Message-ID: <20191019170443.23225-5-yasufum.o@gmail.com> (raw)
In-Reply-To: <20191019170443.23225-1-yasufum.o@gmail.com>

Add description for using spp_primary with worker thread in `How to
Use`.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 docs/guides/design/spp_primary.rst |  4 +--
 docs/guides/gsg/howto_use.rst      | 41 +++++++++++++++++++-----------
 2 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/docs/guides/design/spp_primary.rst b/docs/guides/design/spp_primary.rst
index bfd1f65..35e4bbb 100644
--- a/docs/guides/design/spp_primary.rst
+++ b/docs/guides/design/spp_primary.rst
@@ -37,8 +37,8 @@ as worker, and running on slave lcore. Only slave thread requires
 dedicated core for running in pole mode, and launched from
 ``rte_eal_remote_launch()`` or ``rte_eal_mp_remote_launch()``.
 
-``spp_primary`` is able to run with or without worker thread selectively
-, and requires at least one lcore for server process.
+``spp_primary`` is able to run with or without worker thread selectively,
+and requires at least one lcore for server process.
 Using worker thread or not depends on your usecases.
 ``spp_primary`` provides two types of workers currently.
 
diff --git a/docs/guides/gsg/howto_use.rst b/docs/guides/gsg/howto_use.rst
index 5e461eb..b0824d4 100644
--- a/docs/guides/gsg/howto_use.rst
+++ b/docs/guides/gsg/howto_use.rst
@@ -335,7 +335,7 @@ To launch SPP primary, run ``spp_primary`` with specific options.
 
     # terminal 3
     $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \
-        -l 1 -n 4 \
+        -l 0 -n 4 \
         --socket-mem 512,512 \
         --huge-dir /dev/hugepages \
         --proc-type primary \
@@ -349,9 +349,9 @@ SPP primary takes EAL options and application specific options.
 
 Core list option ``-l`` is for assigining cores and SPP primary requires just
 one core. You can use core mask option ``-c`` instead of ``-l``.
-You can use ``-m 1024`` for memory reservation instead of
-``--socket-mem 1024,0`` if you use single NUMA node. In this case, 512 MB is
-reserved on each of nodes.
+For memory, this example is for reserving 512 MB on each of two NUMA nodes
+hardware, so you use ``-m 1024`` simply, or ``--socket-mem 1024,0``
+if you run the process on single NUMA node.
 
 .. note::
 
@@ -372,15 +372,25 @@ reserved on each of nodes.
    If you use DPDK v18.11 or later, ``--base-virtaddr 0x100000000`` is enabled
    in default. You need to use this option only for changing the default value.
 
+If ``spp_primary`` is launched with two or more lcores, forwarder or monitor
+is activated. The default is forwarder and monitor is optional in this case.
+If you use monitor thread, additional option ``--disp-stat`` is required.
+Here is an example for launching ``spp_primary`` with monitor thread.
 
-In general, one lcore is enough for ``spp_primary``. If you give two or
-more, it uses second lcore to display statistics periodically and does not
-use others.
-
-.. note::
+.. code-block:: console
 
-    Anyway, you can get statistics in SPP CLI with ``pri; status`` command
-    actually even if you give only one core.
+    # terminal 3
+    $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \
+        -l 0-1 -n 4 \   # two lcores
+        --socket-mem 512,512 \
+        --huge-dir /dev/hugepages \
+        --proc-type primary \
+        --base-virtaddr 0x100000000
+        -- \
+        -p 0x03 \
+        -n 10 \
+        -s 192.168.1.100:5555
+        --disp-stats
 
 Primary process sets up physical ports of given port mask with ``-p`` option
 and ring ports of the number of ``-n`` option. Ports of  ``-p`` option is for
@@ -393,7 +403,7 @@ secondary processes.
 
     # terminal 3
     $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \
-        -l 1 -n 4 \
+        -l 0 -n 4 \
         --socket-mem 512,512 \
         --huge-dir=/dev/hugepages \
         --vdev eth_vhost1,iface=/tmp/sock1  # used as 1st phy port
@@ -412,6 +422,7 @@ secondary processes.
   - ``--huge-dir``: Path of hugepage dir.
   - ``--proc-type``: Process type.
   - ``--base-virtaddr``: Specify base virtual address.
+  - ``--disp-stats``: Show statistics periodically.
 
 - Application options:
 
@@ -476,7 +487,7 @@ spp_vf
 .. code-block:: console
 
     $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \
-      -l 0,2-13 -n 4 \
+      -l 2-13 -n 4 \
       --proc-type secondary \
       -- \
       --client-id 1 \
@@ -500,7 +511,7 @@ and options are same as ``spp_vf``.
 .. code-block:: console
 
     $ sudo ./src/mirror/x86_64-native-linuxapp-gcc/spp_mirror \
-      -l 1,2 -n 4 \
+      -l 2,3 -n 4 \
       --proc-type secondary \
       -- \
       --client-id 1 \
@@ -526,7 +537,7 @@ SPP provides ``spp_pcap`` for capturing comparatively heavy traffic.
 .. code-block:: console
 
     $ sudo ./src/pcap/x86_64-native-linuxapp-gcc/spp_pcap \
-      -l 0-3 -n 4 \
+      -l 2-5 -n 4 \
       --proc-type secondary \
       -- \
       --client-id 1 \
-- 
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 ` Yasufumi Ogawa [this message]
2019-10-19 17:04 ` [spp] [PATCH 5/5] docs: add pri commands for forwarder Yasufumi Ogawa

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-5-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).