From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37D68A0487 for ; Wed, 3 Jul 2019 06:34:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F08B72BC8; Wed, 3 Jul 2019 06:34:09 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by dpdk.org (Postfix) with ESMTP id 919C32BC8 for ; Wed, 3 Jul 2019 06:34:08 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id t7so476964plr.11 for ; Tue, 02 Jul 2019 21:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=qZJNoyHVaCRGVbkmG+a1bAoCDJTHhFpJdXZImgHNhxs=; b=tbI+ZT1SZmNe0rI4Eb9qsXudKJGMrB5fxNkDrOjpYZlWYPnPcKjJzX9Uoik6wtxy1m pUxkyQPFyrC4jrSt/eHvws6MdiYveJriNkMU7L2rAnEVDHV+P2Wqv+v6jWeDrwDu1Bf6 0MpIYYqleNFfHKgqHQHJhX8zzWXA1+ruZPPchGRO2MchDJd55jsDkjRU8U3SMaQ3A6K9 uAkYxFBgwIINznPloq2RRT5jqbwb5wCFo/lHfA4x9dvLuc9pvjkXtCM2vaN8Mkl+4xUx 84RwDqmrpEr0T93Aj/pl0eTrFKyGH7xxmaHSxr1D6++JUl6aTDY8iNMlP0TOZKMQSnRK fXWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=qZJNoyHVaCRGVbkmG+a1bAoCDJTHhFpJdXZImgHNhxs=; b=n1MJIlhMOprvvzkOH0/WmjzzMvsLKnew4s8Wy0kmPDzOgIgjqA40GTRBgrklKwQvDw vHJKwuwFfo9pVwsRZZ7bI8O1KJT7EeU9C1kC4k5QcaAO0h15aHYBBDO6ouOc3X8Bw0Kb lF1bhtzXXQyyiDBqfgb7gbRsMVwL7FByU8k6tO0XI5RhBpBFdKYF46JYFEIvAZUDO6Lx qtWS+tirx8vywIvMnf+oAibRIf9/FBce7mpKWg10WErnqd2ZxpCV74YyMr+L3l9h6lmA 8lfbiLWStzKHdAouK8APjBluK3ISkGILalKL1XpWBsfJLiDgB51uE1KW2aQevxmkICPO gsNA== X-Gm-Message-State: APjAAAWvrh2AA4lyOOsbm0GFYWDG2LN2ohNdU9Pquwd0evKXIg7gxSLR F4cYrS7jqC75EGrZKNhvOxwZe/kz X-Google-Smtp-Source: APXvYqxf2V3xujIzo2jysOJC4XjJ68BdR9/ZXPQDN1tTVAM2+aD5mJXtI+1mVmQ66R28wr1aF1xSag== X-Received: by 2002:a17:902:3225:: with SMTP id y34mr38818470plb.135.1562128447521; Tue, 02 Jul 2019 21:34:07 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id 14sm668617pfy.40.2019.07.02.21.34.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 21:34:06 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Wed, 3 Jul 2019 13:34:02 +0900 Message-Id: <20190703043402.32579-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] docs: add section of quick start in gsg 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: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa As startup script is introduced, add descriptions for the script in `How to Use` section `Getting Started Guide`. Signed-off-by: Yasufumi Ogawa --- docs/guides/gsg/howto_use.rst | 107 ++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 5 deletions(-) diff --git a/docs/guides/gsg/howto_use.rst b/docs/guides/gsg/howto_use.rst index 3579c75..dee0a84 100644 --- a/docs/guides/gsg/howto_use.rst +++ b/docs/guides/gsg/howto_use.rst @@ -11,8 +11,101 @@ primary process for managing resources, secondary processes for forwarding packet, and SPP controller to accept user commands and send it to SPP processes. -You should keep in mind the order of launching processes. -Primary process must be launched before secondary processes. +You should keep in mind the order of launching processes if you do it +manually, or you can use startup script. This start script is for launching +``spp-ctl``, ``spp_primary`` and SPP CLI. + + +.. _spp_gsg_howto_quick_start: + +Quick Start +----------- + +Run ``bin/start.sh`` with configuration file ``bin/config.sh``. +First time you run the script, it does not lanch processes but create a +template configuration file and asks you to edit this file. +After that, you can run the startup script for launching processes. All of +options for the processes are defined in the configuration. + +.. code-block:: console + + # launch with default URL http://127.0.0.1:7777 + $ bin/start.sh + Start spp-ctl + Start spp_primary + Waiting for spp-ctl is ready ... + Welcome to the SPP CLI. Type `help` or `?` to list commands. + + spp > + +Check status of ``spp_primary`` because it takes several seconds to be ready. +Confirm that the status is ``running``. + +.. code-block:: none + + spp > status + - spp-ctl: + - address: 127.0.0.1:7777 + - primary: + - status: running + - secondary: + - processes: + +Now you are ready to launch secondary processes from ``pri; launch`` +command, or another terminal. Here is an example for launching ``spp_nfv`` +with options from ``pri; launch``. Log file of this process is created as +``log/spp_nfv1.log``. + +.. code-block:: none + + spp > pri; launch nfv 1 -l 1,2 -m 512 -- -n 1 -s 127.0.0.1:6666 + +This ``launch`` command supports TAB completion. Parameters for ``spp_nfv`` +are completed after secondary ID ``1``. + +.. code-block:: none + + spp > pri; launch nfv 1 + + # Press TAB + spp > pri; launch nfv 1 -l 1,2 -m 512 -- -n 1 -s 127.0.0.1:6666 + + +It is same as following options launching from terminal. + +.. code-block:: console + + $ sudo ./src/nfv/x86_64-native-linuxapp-gcc/spp_nfv \ + -l 1,2 -n 4 -m 512 \ + --proc-type secondary \ + -- \ + -n 1 \ + -s 127.0.0.1:6666 + +Parameters for completion are defined in SPP CLI, and you can find +parameters with ``config`` command. + +.. code-block:: none + + spp > config + - max_secondary: "16" # The maximum number of secondary processes + - prompt: "spp > " # Command prompt + - topo_size: "60%" # Percentage or ratio of topo + - sec_mem: "-m 512" # Mem size + ... + +You can launch consequence secondary processes from CLI for your usage. +If you just patch two DPDK applications on host, it is enough to use one +``spp_nfv``, or use ``spp_vf`` if you need to classify packets. + +.. code-block:: none + + spp > pri; launch nfv 2 -l 1,3 -m 512 -- -n 2 -s 127.0.0.1:6666 + spp > pri; launch vf 3 -l 1,4,5,6 -m 512 -- -n 3 -s 127.0.0.1:6666 + ... + +If you launch processes by yourself, ``spp_primary`` must be launched +before secondary processes. ``spp-ctl`` need to be launched before SPP CLI, but no need to be launched before other processes. SPP CLI is launched from ``spp.py``. If ``spp-ctl`` is not running after primary and @@ -21,9 +114,13 @@ secondary processes are launched, processes wait ``spp-ctl`` is launched. In general, ``spp-ctl`` should be launched first, then SPP CLI and ``spp_primary`` in each of terminals without running as background process. After ``spp_primary``, you launch secondary processes for your usage. -If you just patch two DPDK applications on host, it is enough to use one -``spp_nfv``, or use ``spp_vf`` if you need to classify packets. -How to use of these secondary processes is described in next chapters. + +In the rest of this chapter is for explaining how to launch each of processes +options and usages for the all of processes. +How to connect to VMs is also described in this chapter. + +How to use of these secondary processes is described as usecases +in the next chapter. .. _spp_gsg_howto_controller: -- 2.17.1