Clarified different methods to launch switch agent

Change-Id: I9ab9abb41b51c114f5227b2aa1c1154a2fe7477a
diff --git a/installation.rst b/installation.rst
index 213c71e..a9a4e32 100644
--- a/installation.rst
+++ b/installation.rst
@@ -354,9 +354,16 @@
 Connect Switch to Controller
 ============================
 
+.. caution::
+    We are going to describe two different ways to start OF-DPA and OpenFlow agent in this section.
+    Some vendors use ``ofagentd`` service while others use old ``launcher`` app to start the agent.
+    Please check the `Vendor Specific Information`_ to understand which method you should use before continuing this section.
 
-Start OF-DPA and OpenFlow Agent
--------------------------------
+Use ofagentd service
+--------------------
+
+Launch with ofagentd
+^^^^^^^^^^^^^^^^^^^^
 The OFDPA software and the Indigo agent are now a single process launched by Linux service. First of all, we need to configure **/etc/ofagent/ofagent.conf**.
 Uncomment and edit the following line. Make sure all other lines stay commented.
 
@@ -370,13 +377,13 @@
 
     OPT_ARGS="-d 2 -c 2 -c 4 -t <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid>"
 
-- To start the ofagent, run ``service ofagentd start``
-- To stop the agent, run ``service ofagentd stop``
+- To **start** the ofagent, run ``service ofagentd start``
+- To **stop** the agent, run ``service ofagentd stop``
 - More ``ofagentapp`` options can be found by running ``ofagentapp --help``
 
 
-Start OF-DPA and OpenFlow Agent with listen option
---------------------------------------------------
+Launch in listen mode with ofagentd
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 An optional ``-l`` parameter can be added for switch to listen on specific **IP:port**.
 This allows us to use tools like **ovs-ofctl** or **dpctl** to connect and control the switch.
 
@@ -384,16 +391,41 @@
 
     OPT_ARGS="-t <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid> -l <ip>:<port>"
 
-To connect to the switch using **ovs-ofctl**, you can use commands such as
+Please refer to `Connect to Switch in Listen Mode`_ to learn more about how to access switches in listen mode.
+
+Use launcher app
+----------------
+
+Launch with launcher
+^^^^^^^^^^^^^^^^^^^^
+- To **start** OF-DPA and OpenFlow agent, run:
+
+  .. code-block:: console
+
+      # ./launcher ofagentapp -t <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid>
+
+- We can choose to run OF-DPA in **debug mode**
+
+  .. code-block:: console
+
+     # ./launcher ofagentapp -d 2 -c 2 -c 4 -t <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid>
+
+- To **stop** OF-DPA and OpenFlow agent, run:
+
+  .. code-block:: consol
+
+     # killall ofagentapp
+
+Launch in listen mode with launcher
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+An optional ``-l`` parameter can be added for switch to listen on specific **IP:port**.
+This allows us to use tools like **ovs-ofctl** or **dpctl** to connect and control the switch.
 
 .. code-block:: console
 
-    $ ovs-ofctl -O OpenFlow13 show tcp:<ip>:<port>
-    $ ovs-ofctl -O OpenFlow13 dump-flows tcp:<ip>:<port>
-    $ ovs-ofctl -O OpenFlow13 dump-groups tcp:<ip>:<port>
-    $ ovs-ofctl -O OpenFlow13 add-flow tcp:<ip>:<port> table=60,priority=40000,eth_type=0x0800,ip_dst=55.55.55.55,actions=controller
+    # ./launcher ofagentapp <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid> -l <ip>:<port>
 
-For more command, please see ``ovs-ofctl --help`` or the post `OpenvSwitch ovs-ofctl and OF-DPA <https://blog.pichuang.com.tw/20170106-ovs-ofctl-and-ofdpa/>`_.
+Please refer to `Connect to Switch in Listen Mode`_ to learn more about how to access switches in listen mode.
 
 
 Vendor Specific Information
@@ -403,10 +435,13 @@
 Edgecore
 --------
 
-- OF-DPA Image
+- **OF-DPA Image**
     - `EdgeCore 5712-54X / 5812-54X / 6712-32X / 7712-32X <https://raw.githubusercontent.com/onfsdn/atrium-docs/master/16A/ONOS/builds/ofdpa_3.0.5.5%2Baccton1.7-1_amd64.deb>`_ - **Checksum**: *sha256:db228b6e79fb15f77497b59689235606b60abc157e72fc3356071bcc8dc4c01f*
 
-- Configure Port Speed and Breakout
+- **Start OF-DPA and OpenFlow agent**
+    - Please refer to `Use ofagentd service`_
+
+- **Configure Port Speed and Breakout**
     - By default all the switch ports are running at maximum speed. The port speed can be modified in **/etc/accton/ofdpa.conf**
 
       .. code-block:: text
@@ -429,6 +464,39 @@
     - `QuantaMesh T3048-LY8 <https://raw.githubusercontent.com/onfsdn/atrium-docs/master/16A/ONOS/builds/ofdpa-ag7648_0.3.0.5.6_amd64.deb>`_ - **Checksum**: *sha256:f8201530b1452145c1a0956ea1d3c0402c3568d090553d0d7b3c91a79137da9e*
     - `QuantaMesh T7032-IX1 / IX1B <https://raw.githubusercontent.com/onfsdn/atrium-docs/master/16A/ONOS/builds/ofdpa-ix1_0.3.0.5.0-EA5-qct-01.00_amd64.deb>`_ **Checksum**: *sha256:278b8ffed8a8fc705a1b60d16f8e70377e78342a27a11568a1d80b1efd706a46*
 
+- **Start OF-DPA and OpenFlow agent**
+    - Please refer to `Use launcher app`_
+
+- Configure Port Speed and Breakout
+    The command ``client_drivshell`` can be used to configure the port speed.
+    Use the parameter ``ps`` to list all ports or ``ps <port number>`` to list one specific port.
+
+    .. code-block:: console
+
+        # client_drivshell ps 1
+        Calling ofdpaBcmCommand rpc with command = "ps 1 ".
+                         ena/    speed/ link auto    STP                  lrn  inter   max  loop
+                   port  link    duplex scan neg?   state   pause  discrd ops   face frame  back
+               xe0(  1)  down   10G  FD   SW  No   Forward         Untag    F    SFI  9412
+
+        Returned from ofdpaBcmCommand rpc with rc = 0.
+
+    Then use the parameter ``port <port number> sp=<port speed>`` to change the port speed.
+
+    .. code-block:: console
+
+        # client_drivshell port xe0 sp=1000
+        Calling ofdpaBcmCommand rpc with command = "port xe0 sp=1000 ".
+
+        Returned from ofdpaBcmCommand rpc with rc = 0.
+
+        # client_drivshell ps 1
+        Calling ofdpaBcmCommand rpc with command = "ps 1 ".
+                         ena/    speed/ link auto    STP                  lrn  inter   max  loop
+                   port  link    duplex scan neg?   state   pause  discrd ops   face frame  back
+               xe0(  1)  down    1G  FD   SW  No   Forward         Untag    F   GMII  9412
+
+        Returned from ofdpaBcmCommand rpc with rc = 0.
 
 Delta
 -----
@@ -436,6 +504,9 @@
 - OF-DPA Image
     - `Delta AG7648 <https://raw.githubusercontent.com/onfsdn/atrium-docs/master/16A/ONOS/builds/ofdpa-ly8_0.3.0.5.0-EA5-qct-01.01_amd64.deb>`_ - **Checksum**: *sha256:ddfc13cb98ca47291dce5e6938b1d65f0b99bbe77f0585e36ac0007017397f23*
 
+- **Start OF-DPA and OpenFlow agent**
+    - Please refer to `Use launcher app`_
+
 - Special instructions to install ONL
     Make sure ``/etc/machine.conf`` looks like the following in ONIE before running ONL installation script:
 
@@ -450,17 +521,10 @@
 
         # export PATH=$PATH:/usr/bin
 
-- Special instructions to use optical SFP cables
-    If optical SFP cables are not coming up, please use the following command to launch OF-DPA:
-
-    .. code-block:: console
-
-        # ./launcher ofagentapp -t <controller_ip_1> -t <controller_ip_2> -t <controller_ip_3> -i <dpid>
 
 Useful Information
 ==================
 
-
 OF-DPA Commands
 ---------------
 There are some useful OF-DPA commands under ``/usr/bin/``
@@ -567,6 +631,20 @@
 Once back at the ONIE prompt, you can try to install ONL by following the same steps again.
 
 
+Connect to Switch in Listen Mode
+--------------------------------
+To connect to the switch in Listen Mode using **ovs-ofctl**, you can use commands such as
+
+.. code-block:: console
+
+    $ ovs-ofctl -O OpenFlow13 show tcp:<ip>:<port>
+    $ ovs-ofctl -O OpenFlow13 dump-flows tcp:<ip>:<port>
+    $ ovs-ofctl -O OpenFlow13 dump-groups tcp:<ip>:<port>
+    $ ovs-ofctl -O OpenFlow13 add-flow tcp:<ip>:<port> table=60,priority=40000,eth_type=0x0800,ip_dst=55.55.55.55,actions=controller
+
+For more command, please see ``ovs-ofctl --help`` or the post `OpenvSwitch ovs-ofctl and OF-DPA <https://blog.pichuang.com.tw/20170106-ovs-ofctl-and-ofdpa/>`_.
+
+
 Reference
 ---------
 - `ONL/OF-DPA installation guide by Edgecore Networks <https://www.youtube.com/watch?v=mCUtkIc_hVI>`_