Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <>
Subject: [spp] [PATCH 2/5] docs: add desc for primary design
Date: Sun, 20 Oct 2019 02:04:40 +0900	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

As spp_primary is changed to support forwaring packets as similar to
spp_nfv, and user can choose using this forwarder or monitor for
statistics, add descriptions of worker threads and its usecases in
design section.

Signed-off-by: Yasufumi Ogawa <>
 docs/guides/design/spp_primary.rst | 55 +++++++++++++++++++++++++++---
 1 file changed, 50 insertions(+), 5 deletions(-)

diff --git a/docs/guides/design/spp_primary.rst b/docs/guides/design/spp_primary.rst
index 79220e7..bfd1f65 100644
--- a/docs/guides/design/spp_primary.rst
+++ b/docs/guides/design/spp_primary.rst
@@ -15,12 +15,57 @@ of
 `Multi-process Sample Application
 in DPDK's sample applications.
-``spp_primary`` is a server process for other secondary processes and
-basically working as described in
+``spp_primary`` is a server for other secondary processes and
+basically working same as described in
 "How the Application Works" section of the sample application.
-However, there are also differences between ``spp_primary`` and
+However, there are some differences between ``spp_primary`` and
 the server process of the sample application.
 ``spp_primary`` has no limitation of the number of secondary processes.
-It does not work for packet forwaring, but just provide rings and memory pools
-for secondary processes.
+It does not work for packet forwaring without in some usecases, but just
+provide rings and memory pools for secondary processes.
+Master and Worker Threads
+In SPP, Both of primary and secondary processes consist of master thread and
+worker thread as slave. Master thread is for accepting commands from a user
+for doing task, and running on a master lcore. On the other hand,
+slave thread is for packet forwarding or other process specific jobs
+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.
+Using worker thread or not depends on your usecases.
+``spp_primary`` provides two types of workers currently.
+Worker Types
+There are two types of worker thread in ``spp_primary``. First one is
+is forwarder thread, and second one is monitor thread.
+As default, ``spp_primary`` runs packet forwarder if two or more lcores
+are given while launching the process. Behavior of this forwarder is
+same as ``spp_nfv`` described in the next section.
+This forwarder provides features for managing ports, patching them and
+forwarding packets between ports.
+It is useful for very simple usecase in which only few ports are patched
+and no need to do forwarding packets in parallel with several processes.
+.. note::
+    In DPDK v18.11 or later, some of PMDs, such as vhost, do not work for
+    multi-process application. It means that packets cannot forwarded
+    to a VM or container via secondary process in SPP.
+    In this case, you use forwarder in ``spp_primary``.
+Another type is monitor for displaying status of ``spp_primary`` in which
+statistics of RX and TX packets on each of physical ports and ring ports
+are shown periodically in terminal ``spp_primary`` is launched.
+Although statistics can be referred in SPP CLI by using ``pri; status``
+command, running monitor thread is useful if you always watch statistics.

  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 ` Yasufumi Ogawa [this message]
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 ` [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:

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

  git send-email \ \ \ \ \

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