[spp] [PATCH 1/2] docs: add explanation of port number check

x-fn-spp at sl.ntt-tx.co.jp x-fn-spp at sl.ntt-tx.co.jp
Tue Feb 12 13:39:27 CET 2019


From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>

There is a conditions where components of spp_vf and spp_mirror
starts packet forwarding. This patch adds those descriptions
into design section and also add explanation of check when adding port
to components in command reference section.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki at lab.ntt.co.jp>
---
 docs/guides/commands/secondary/spp_mirror.rst | 13 +++++++++++++
 docs/guides/commands/secondary/spp_vf.rst     | 18 ++++++++++++++++++
 docs/guides/spp_vf/design.rst                 | 10 ++++++++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/docs/guides/commands/secondary/spp_mirror.rst b/docs/guides/commands/secondary/spp_mirror.rst
index f81d3a9..bb60f05 100644
--- a/docs/guides/commands/secondary/spp_mirror.rst
+++ b/docs/guides/commands/secondary/spp_mirror.rst
@@ -198,6 +198,13 @@ by duplicating the packets.
     spp > mirror 2; port add vhost:0 tx mr1
     spp > mirror 2; port add vhost:1 tx mr1
 
+Adding port may cause component to start packet forwarding. Please see
+detail in
+:ref:`design spp_mirror<spp_vf_design_spp_mirror>`.
+
+Until one rx and two tx ports are registered, ``spp_mirror`` does not start
+forwarding. If it is requested to add more than one rx and two tx ports, it
+replies an error message.
 
 Deleting port
 ~~~~~~~~~~~~~
@@ -219,6 +226,12 @@ Here is some examples.
     # delete tx port 'vhost:1' from 'mr1'
     spp > mirror 2; port del vhost:1 tx mr1
 
+
+.. note::
+
+  Deleting port may cause component to stop packet forwarding.
+  Please see detail in :ref:`design spp_mirror<spp_vf_design_spp_mirror>`.
+
 exit
 ----
 
diff --git a/docs/guides/commands/secondary/spp_vf.rst b/docs/guides/commands/secondary/spp_vf.rst
index 6f1824b..d31688e 100644
--- a/docs/guides/commands/secondary/spp_vf.rst
+++ b/docs/guides/commands/secondary/spp_vf.rst
@@ -276,6 +276,20 @@ adds VLAN tag before sending packet outside.
     # add VLAN tag with VLAN ID and PCP in forwarder 'fw2'
     spp > vf 2; port add phy:1 tx fw2 add_vlantag 101 3
 
+Adding port may cause component to start packet forwarding. Please see
+detail in
+:ref:`design spp_vf<spp_vf_design_spp_vf>`.
+
+Until one rx port and one tx port are added, forwarder does not start packet
+forwarding. If it is requested to add more than one rx and one tx port, it
+replies an error message.
+Until at least one rx port and two tx ports are added, classifier does not
+start packet forwarding. If it is requested to add more than two rx ports, it
+replies an error message.
+Until at least two rx ports and one tx port are added, merger does not start
+packet forwarding. If it is requested to add more than two tx ports, it replies
+an error message.
+
 Deleting port
 ~~~~~~~~~~~~~
 
@@ -298,6 +312,10 @@ Here is an example.
     # delete tx port 'vhost:1' from 'mgr1'
     spp > vf 2; port del vhost:1 tx mgr1
 
+.. note::
+
+   Deleting port may cause component to stop packet forwarding.
+   Please see detail in :ref:`design spp_vf<spp_vf_design_spp_vf>`.
 
 .. _commands_spp_vf_classifier_table:
 
diff --git a/docs/guides/spp_vf/design.rst b/docs/guides/spp_vf/design.rst
index 23246ba..4774ef7 100644
--- a/docs/guides/spp_vf/design.rst
+++ b/docs/guides/spp_vf/design.rst
@@ -1,5 +1,5 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
-    Copyright(c) 2019 Nippon Telegraph and Telephone Corporation
+    Copyright(c) 2010-2014 Intel Corporation
 
 .. _spp_vf_design:
 
@@ -37,12 +37,16 @@ Forwarder
 ^^^^^^^^^
 
 Simply forwards packets from rx to tx port.
+Forwarder does not start forwarding until when at least one rx and one tx are
+added.
 
 Merger
 ^^^^^^
 
 Receives packets from multiple rx ports to aggregate
 packets and sends to a desctination port.
+Merger does not start forwarding until when at least two rx and one tx are
+added.
 
 Classifier
 ^^^^^^^^^^
@@ -56,6 +60,8 @@ Classifier prepares tables for each of VLAN ID and decides
 which of table is referred
 if TPID (Tag Protocol Indetifier) is included in a packet and
 equals to 0x8100 as defined in IEEE 802.1Q standard.
+Classifier does not start forwarding until when at least one rx and two tx are
+added.
 
 .. _spp_vf_design_spp_mirror:
 
@@ -107,7 +113,7 @@ spp_pcap
 the second smallest ID and ``wirter`` threads on the rest of cores. You should
 have enough cores if you need to capture large amount of packets.
 
-``spp_pcap`` has 4 types of command. ``start``,``stop``,``exit`` and ``status``
+``spp_pcap`` has 4 types of command. ``start``, ``stop``, ``exit`` and ``status``
 to control behavior of ``spp_pcap``.
 
 With ``start`` command, you can start capturing.
-- 
2.17.1



More information about the spp mailing list