From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw1101.ocn.ad.jp (mogw1101.ocn.ad.jp [153.149.229.2]) by dpdk.org (Postfix) with ESMTP id B01A41B452 for ; Thu, 14 Feb 2019 18:27:03 +0100 (CET) Received: from mf-smf-ucb023c2 (mf-smf-ucb023c2.ocn.ad.jp [153.153.66.143]) by mogw1101.ocn.ad.jp (Postfix) with ESMTP id 2CAC4A80358; Fri, 15 Feb 2019 02:27:02 +0900 (JST) Received: from ocn-vc-mts-106c1.ocn.ad.jp ([153.138.237.145]) by mf-smf-ucb023c2 with ESMTP id uKj9gjHTTHcBquKmsgxKQ8; Fri, 15 Feb 2019 02:27:02 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.135]) by ocn-vc-mts-106c1.ocn.ad.jp with ESMTP id uKmrgdgzNygxguKmrg4CLW; Fri, 15 Feb 2019 02:27:02 +0900 Received: from localhost.localdomain (unknown [192.47.164.146]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Fri, 15 Feb 2019 02:27:01 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Fri, 15 Feb 2019 02:26:56 +0900 Message-Id: <20190214172700.5816-3-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214172700.5816-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20190214172700.5816-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 2/6] docs: update spp_pcap commands X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 17:27:04 -0000 From: Yasufumi Ogawa * Update old example of `status` command. * Add descriptions for worker threads and its status. Signed-off-by: Yasufumi Ogawa --- docs/guides/commands/secondary/spp_pcap.rst | 109 ++++++++++++-------- 1 file changed, 68 insertions(+), 41 deletions(-) diff --git a/docs/guides/commands/secondary/spp_pcap.rst b/docs/guides/commands/secondary/spp_pcap.rst index 33882f0..b7f04de 100644 --- a/docs/guides/commands/secondary/spp_pcap.rst +++ b/docs/guides/commands/secondary/spp_pcap.rst @@ -1,6 +1,7 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2010-2014 Intel Corporation + .. _commands_spp_pcap: spp_pcap @@ -21,7 +22,7 @@ processes including ``spp_nfv``, ``spp_vm`` and others. and sub command should be separated with delimiter ``;``, or failed to a command error. -.. code-block:: console +.. code-block:: none spp > pcap SEC_ID; SUB_CMD @@ -29,23 +30,23 @@ In this example, ``SEC_ID`` is a secondary ID and ``SUB_CMD`` is one of the following sub commands. Details of each of sub commands are described in the next sections. -* exit -* start * status +* start * stop +* exit ``spp_pcap`` supports TAB completion. You can complete all of the name of commands and its arguments. For instance, you find all of sub commands by pressing TAB after ``pcap SEC_ID;``. -.. code-block:: console +.. code-block:: none spp > pcap 1; # press TAB key exit start status stop It tries to complete all of possible arguments. -.. code-block:: console +.. code-block:: none spp > pcap 1; component st # press TAB key to show args starting 'st' start status stop @@ -54,14 +55,15 @@ If you are reached to the end of arguments, no candidate keyword is displayed. It is a completed statement of ``start`` command, and TAB completion does not work after ``start`` because it is ready to run. -.. code-block:: console +.. code-block:: none spp > pcap 1; start Succeeded to start capture -It is also completed secondary IDs of ``spp_pcap`` and it is helpful if you run several ``spp_pcap`` processes. +It is also completed secondary IDs of ``spp_pcap`` and it is helpful if you +run several ``spp_pcap`` processes. -.. code-block:: console +.. code-block:: none spp > pcap # press TAB after space following 'pcap' 1; 3; # you find two spp_pcap processes of sec ID 1, 3 @@ -70,7 +72,7 @@ By the way, it is also a case of no candidate keyword is displayed if your command statement is wrong. You might be encountered an error if you run the wrong command. Please take care. -.. code-block:: console +.. code-block:: none spp > pcap 1; ste # no candidate shown for wrong command Invalid command "ste". @@ -81,70 +83,95 @@ wrong command. Please take care. status ------ -Show the information of worker threads and its resources. Status information -consists of three parts. +Show the information of worker threads of ``receiver`` and ``writer`` threads +and its resources. -.. code-block:: console +.. code-block:: none spp > pcap 1; status - Basic Information: - - client-id: 3 + - client-id: 1 + - status: idling + - core:2 receive + - rx: phy:0 + - core:3 write + - filename: + - core:4 write + - filename: + - core:5 write + - filename: + - core:6 write + - filename: + +``client-id`` is a secondary ID of the process and ``status`` shows +running status. + +Each of lcore has a role of ``receive`` or ``write``. +``receiver`` has capture port as input and ``write`` has a capture file +as output, but the ``filename`` is empty while ``idling`` status +because capturing is not started yet. + +If you start capturing, you can find each of ``writer`` threads has a +capture file. After capturing is stopped, ``filename`` is returned to +be empty again. + +.. code-block:: none + + spp > pcap 2; status + - client-id: 2 - status: running - - core:2 'receive' + - core:2 receive - rx: phy:0 - - core:3 'write' - - file:/tmp/spp_pcap.20181108110600.phy0.1.1.pcap - - core:4 'write' - - file:/tmp/spp_pcap.20181108110600.phy0.2.1.pcap - - core:5 'write' - - file:/tmp/spp_pcap.20181108110600.phy0.3.1.pcap - -``Basic Information`` is for describing attributes of ``spp_pcap`` itself. -``client-id`` is a secondary ID of the process and ``status`` shows the -status of the process. - -Then lists of core IDs and its role is shown. There are two types of the role -``receive`` and ``write``. If the role is ``receive``, port which ``spp_pcap`` -is attached to is shown. Else if the role iw ``write``, file name in absolute -path is shown. + - core:3 write + - filename: /tmp/spp_pcap.20190214161550.phy0.1.1.pcap.lz4 + - core:4 write + - filename: /tmp/spp_pcap.20190214161550.phy0.2.1.pcap.lz4 + - core:5 write + - filename: /tmp/spp_pcap.20190214161550.phy0.3.1.pcap.lz4 + - core:6 write + - filename: /tmp/spp_pcap.20190214161550.phy0.4.1.pcap.lz4 + .. _commands_spp_pcap_start: start ----- -Start packet capture. No additional arguments are taken. +Start packet capture. -.. code-block:: console +.. code-block:: none # start capture spp > pcap SEC_ID; start -Here is a example of starting capture with ``start`` command. +Here is a example of starting capture. -.. code-block:: console +.. code-block:: none # start capture - spp > pcap 2; start + spp > pcap 1; start + Start packet capture. + .. _commands_spp_pcap_stop: stop ---- -Stop packet capture. No additional arguments are taken. +Stop packet capture. -.. code-block:: console +.. code-block:: none - # start capture + # stop capture spp > pcap SEC_ID; stop -Here is a example of stopping capture with ``stop`` command. +Here is a example of stopping capture. -.. code-block:: console +.. code-block:: none # stop capture spp > pcap 2; stop + Start packet capture. + .. _commands_spp_pcap_exit: @@ -153,6 +180,6 @@ exit Terminate the ``spp_pcap``. -.. code-block:: console +.. code-block:: none spp > pcap 1; exit -- 2.17.1