Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH v2 2/8] docs: add desc of design of spp_nfv
Date: Thu, 10 Jan 2019 19:25:41 +0900	[thread overview]
Message-ID: <1547115947-27671-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1547115947-27671-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

Add descriptions of overview of design of spp_nfv in design section.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 docs/guides/design/spp_secondary.rst | 52 +++++++++++++++++++++++++++++++++---
 1 file changed, 49 insertions(+), 3 deletions(-)

diff --git a/docs/guides/design/spp_secondary.rst b/docs/guides/design/spp_secondary.rst
index b3bb270..9d11f74 100644
--- a/docs/guides/design/spp_secondary.rst
+++ b/docs/guides/design/spp_secondary.rst
@@ -2,7 +2,7 @@
     Copyright(c) 2019 Nippon Telegraph and Telephone Corporation
 
 
-.. _spp_design_spp_secondary:
+.. _spp_design_spp_sec:
 
 SPP Secondary
 =============
@@ -32,9 +32,55 @@ a simple pseudo SR-IOV feature for classifying or merging packets.
 ``spp_mirror`` is to duplicate incoming packets to several destination ports.
 
 
-.. _spp_design_spp_secondary_nfv:
+.. _spp_design_spp_sec_nfv:
 
 spp_nfv
 -------
 
-``spp_nfv`` is ...
+``spp_nfv`` is the simplest SPP secondary to connect two of processes or other
+feature ports. Each of ``spp_nfv`` processes has a list of entries including
+source and destination ports, and forwards packets by referring the list.
+It means that one ``spp_nfv`` might have several forwarding paths, but
+throughput is gradually decreased if it has too much paths.
+This list is implemented as an array of ``port`` structure and named
+``ports_fwd_array``. The index of ``ports_fwd_array`` is the same as unique
+port ID.
+
+.. code-block:: c
+
+    struct port {
+      int in_port_id;
+      int out_port_id;
+      ...
+    };
+    ...
+
+    /* ports_fwd_array is an array of port */
+    static struct port ports_fwd_array[RTE_MAX_ETHPORTS];
+
+:numref:`figure_design_spp_sec_nfv_port_fwd_array` describes an example of
+forwarding between ports. In this case, ``spp_nfv`` is responsible for
+forwarding from ``port#0`` to ``port#2``. You notice that each of ``out_port``
+entry has the destination port ID.
+
+.. _figure_design_spp_sec_nfv_port_fwd_array:
+
+.. figure:: ../images/design/spp_design_spp_sec_nfv.*
+   :width: 75%
+
+   Forwarding by referring ports_fwd_array
+
+``spp_nfv`` consists of main thread and worker thread to update the entry
+while running the process. Main thread is for waiting user command for
+updating the entry. Worker thread is for dedicating packet forwarding.
+:numref:`figure_design_spp_sec_nfv_threads` describes tasks in each of
+threads. Worker thread is launched from main thread after initialization.
+In worker thread, it starts forwarding if user send forward command and
+main thread accepts it.
+
+.. _figure_design_spp_sec_nfv_threads:
+
+.. figure:: ../images/design/spp_design_spp_sec_nfv_threads.*
+   :width: 70%
+
+   Main thread and worker thread in spp_nfv
-- 
2.7.4

  parent reply	other threads:[~2019-01-10 10:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  2:10 [spp] [PATCH 0/8] Revise documentation ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 1/8] docs: add desc of overview of SPP secondary ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 2/8] docs: add desc of design of spp_nfv ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 3/8] docs: add image of ports_fwd_array ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 4/8] docs: add image of spp_nfv threads ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 5/8] docs: adjust size of images ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 6/8] docs: resize font size in multi nodes example ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 7/8] docs: resize font size in performance test ogawa.yasufumi
2019-01-10  2:10 ` [spp] [PATCH 8/8] docs: resize image of lb in sppc ogawa.yasufumi
2019-01-10 10:25 ` [spp] [PATCH v2 0/8] Revise documentation ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 1/8] docs: add desc of overview of SPP secondary ogawa.yasufumi
2019-01-10 10:25   ` ogawa.yasufumi [this message]
2019-01-10 10:25   ` [spp] [PATCH v2 3/8] docs: add image of ports_fwd_array ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 4/8] docs: add image of spp_nfv threads ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 5/8] docs: adjust size of images ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 6/8] docs: resize font size in multi nodes example ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 7/8] docs: resize font size in performance test ogawa.yasufumi
2019-01-10 10:25   ` [spp] [PATCH v2 8/8] docs: resize image of lb in sppc ogawa.yasufumi

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=1547115947-27671-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --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).