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 297CDA31F3 for ; Sat, 19 Oct 2019 19:04:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23B1D1BEF5; Sat, 19 Oct 2019 19:04:56 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by dpdk.org (Postfix) with ESMTP id 43FBA1BEF5 for ; Sat, 19 Oct 2019 19:04:55 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id a2so5738345pfo.10 for ; Sat, 19 Oct 2019 10:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=KUXv7GczS1KuZIAi8srpl9OBkVf1p1+lrZvP7Rs11aQ=; b=GCdUfVXuIIYVKMKl2jd7K7IFeBbIbLPtEi/UtmRmO+p1l8ji1FkvXd+KLsXTbFMKrR 1+1tXeL+XLOJyqyRu7hG8hpwmqP9nQz1f41uxXsZlzq2tsQbuLxaGdzT7j3Qk7r7uOQZ W5htWfmtptG+JThU+nqmbRxTWKHwAucPnMxLpDhhkPNtXSkgMVTc18aTLa4ao1p7df2k iCOX+7t73K/5gEX8q2dpl+F/GcVeqvzgB0mScWTqCxQfrc1PvSrDKJdmkn3Saem/bvqi /k3ZKVYpZd0syzFdTDFAznjaHQZZ0hwHAHp1uoahhVa7Q+ugXjGN6rvdAt+H4FPdzhJ3 0ygA== 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:in-reply-to :references; bh=KUXv7GczS1KuZIAi8srpl9OBkVf1p1+lrZvP7Rs11aQ=; b=Eo5gq/qO8LT0ToBtJLaMQeSD2ZZKwX9IBJTs5tgpwkAFzk8Vrf63QMfAVI6TaPXk9g TEttDAHZFihgegsqI8r1KP0sBDqgzFAVI5gcBIxsmowGVytuqKFEoAPXIhKIvF8Lf79r vwlkzMw+Ba4AzLnZNH+YEwnLqXbVpzjT8Dr61cdRVVN171sdoqCIWRhbk8FKZC5NneW5 6ZHUjvqTwxmPdQ6ei/wH7/Yu7wtG4v9Uluwygo3/IyaEFTT9DzP2mSwYETCUPt4b2oO+ QwIfQbbJcLK7tXlaBYoAxnp2eJ2vJRTz1FDGsITE0ki7LYJJNsyD2E5XcFfNYlFmf0jZ tklA== X-Gm-Message-State: APjAAAWAritUKAJyWq5p8Vl/ZrYq3Ctsy8xlpUvHNQt7QTNptMo9Gs5I m3oIPaRPXE9Ogw6z0aK2vQZ/ENyICqE= X-Google-Smtp-Source: APXvYqwcFElCy68okUXa6mKKq990ULFW1aGfN/s9zu7QHSf/u7KbQzhxgpoPj+qzUNZrO7lmjf0eHw== X-Received: by 2002:a17:90a:23b0:: with SMTP id g45mr17325372pje.127.1571504694268; Sat, 19 Oct 2019 10:04:54 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c8c2:de00:188c:998e:6041:844a]) by smtp.gmail.com with ESMTPSA id 206sm9493122pge.80.2019.10.19.10.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 10:04:53 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Sun, 20 Oct 2019 02:04:42 +0900 Message-Id: <20191019170443.23225-5-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191019170443.23225-1-yasufum.o@gmail.com> References: <20191019170443.23225-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 4/5] docs: add desc for using worker thread of pri 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" Add description for using spp_primary with worker thread in `How to Use`. Signed-off-by: Yasufumi Ogawa --- docs/guides/design/spp_primary.rst | 4 +-- docs/guides/gsg/howto_use.rst | 41 +++++++++++++++++++----------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/docs/guides/design/spp_primary.rst b/docs/guides/design/spp_primary.rst index bfd1f65..35e4bbb 100644 --- a/docs/guides/design/spp_primary.rst +++ b/docs/guides/design/spp_primary.rst @@ -37,8 +37,8 @@ as worker, and running on slave lcore. Only slave thread requires dedicated core for running in pole mode, and launched from ``rte_eal_remote_launch()`` or ``rte_eal_mp_remote_launch()``. -``spp_primary`` is able to run with or without worker thread selectively -, and requires at least one lcore for server process. +``spp_primary`` is able to run with or without worker thread selectively, +and requires at least one lcore for server process. Using worker thread or not depends on your usecases. ``spp_primary`` provides two types of workers currently. diff --git a/docs/guides/gsg/howto_use.rst b/docs/guides/gsg/howto_use.rst index 5e461eb..b0824d4 100644 --- a/docs/guides/gsg/howto_use.rst +++ b/docs/guides/gsg/howto_use.rst @@ -335,7 +335,7 @@ To launch SPP primary, run ``spp_primary`` with specific options. # terminal 3 $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \ - -l 1 -n 4 \ + -l 0 -n 4 \ --socket-mem 512,512 \ --huge-dir /dev/hugepages \ --proc-type primary \ @@ -349,9 +349,9 @@ SPP primary takes EAL options and application specific options. Core list option ``-l`` is for assigining cores and SPP primary requires just one core. You can use core mask option ``-c`` instead of ``-l``. -You can use ``-m 1024`` for memory reservation instead of -``--socket-mem 1024,0`` if you use single NUMA node. In this case, 512 MB is -reserved on each of nodes. +For memory, this example is for reserving 512 MB on each of two NUMA nodes +hardware, so you use ``-m 1024`` simply, or ``--socket-mem 1024,0`` +if you run the process on single NUMA node. .. note:: @@ -372,15 +372,25 @@ reserved on each of nodes. If you use DPDK v18.11 or later, ``--base-virtaddr 0x100000000`` is enabled in default. You need to use this option only for changing the default value. +If ``spp_primary`` is launched with two or more lcores, forwarder or monitor +is activated. The default is forwarder and monitor is optional in this case. +If you use monitor thread, additional option ``--disp-stat`` is required. +Here is an example for launching ``spp_primary`` with monitor thread. -In general, one lcore is enough for ``spp_primary``. If you give two or -more, it uses second lcore to display statistics periodically and does not -use others. - -.. note:: +.. code-block:: console - Anyway, you can get statistics in SPP CLI with ``pri; status`` command - actually even if you give only one core. + # terminal 3 + $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \ + -l 0-1 -n 4 \ # two lcores + --socket-mem 512,512 \ + --huge-dir /dev/hugepages \ + --proc-type primary \ + --base-virtaddr 0x100000000 + -- \ + -p 0x03 \ + -n 10 \ + -s 192.168.1.100:5555 + --disp-stats Primary process sets up physical ports of given port mask with ``-p`` option and ring ports of the number of ``-n`` option. Ports of ``-p`` option is for @@ -393,7 +403,7 @@ secondary processes. # terminal 3 $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \ - -l 1 -n 4 \ + -l 0 -n 4 \ --socket-mem 512,512 \ --huge-dir=/dev/hugepages \ --vdev eth_vhost1,iface=/tmp/sock1 # used as 1st phy port @@ -412,6 +422,7 @@ secondary processes. - ``--huge-dir``: Path of hugepage dir. - ``--proc-type``: Process type. - ``--base-virtaddr``: Specify base virtual address. + - ``--disp-stats``: Show statistics periodically. - Application options: @@ -476,7 +487,7 @@ spp_vf .. code-block:: console $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \ - -l 0,2-13 -n 4 \ + -l 2-13 -n 4 \ --proc-type secondary \ -- \ --client-id 1 \ @@ -500,7 +511,7 @@ and options are same as ``spp_vf``. .. code-block:: console $ sudo ./src/mirror/x86_64-native-linuxapp-gcc/spp_mirror \ - -l 1,2 -n 4 \ + -l 2,3 -n 4 \ --proc-type secondary \ -- \ --client-id 1 \ @@ -526,7 +537,7 @@ SPP provides ``spp_pcap`` for capturing comparatively heavy traffic. .. code-block:: console $ sudo ./src/pcap/x86_64-native-linuxapp-gcc/spp_pcap \ - -l 0-3 -n 4 \ + -l 2-5 -n 4 \ --proc-type secondary \ -- \ --client-id 1 \ -- 2.17.1