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 0D77BA31F3 for ; Sat, 19 Oct 2019 19:04:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02C8C1BEBF; Sat, 19 Oct 2019 19:04:53 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 1E6101BEBF for ; Sat, 19 Oct 2019 19:04:52 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id j11so4410505plk.3 for ; Sat, 19 Oct 2019 10:04:52 -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=2EZkLzEikxxGemrbIb92bbdsHbYB95jXkLqxRVwUsOo=; b=LA6jiZ8RSkE0F9ktlFPtSjg06g0tzk4UWqxuEhGvhHXg/QffzrnlByXGltWgm1Gd+j nQ7pYE1qehMKEfU1HYHeh0f6Z5AGP055zC6qP8Rn+zz6LXWeJ1+X4UA5r5N5/sOZR5D5 NnOPvxDIETdQBnTJwWMchDf1q3FigeUwFPODDJjTe2HtLGfBN6Q//V50fbraCitJlzQh YrQVkxVsJ/3gk+hzlFsdLgZinXD9BUNvJIEY1O16Rm7Uxc/Jov83mgLHii55dmcnQMdL WLhX9P1zKMh4nDYy3Q0ooZTm8zC8meBGMd20S0Spz6UFCoMWpLbxPMC143wqZ2Sa2N4p ex/w== 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=2EZkLzEikxxGemrbIb92bbdsHbYB95jXkLqxRVwUsOo=; b=t7B/jwqBoP9rVq3NkhedTc6QOO1m+nOES6kN6r/8kTNyZyUAE8kUzZQPZApaOmZx2o sm6czhJ5P/dE8SsPJjV9DvZJV8BZoIWiDum757UmOUT/DNf5ux+L4M1xmiumNsMfXZj0 M4mqFWjM+nkksPOON1SXwTNeL3EDUXssxAKCkvjhOzY15+gQT1q7GvE1zB3B5VYa3KcK J5Jvu1gttD1XYK8sfMRjwYjyYc1aQU9VxUymtwsKn8gWgUF+s6Gh4rdFf4z96YXtJPu9 TyKBgGsToVD4Lo2czv35Kj/NA+Arqd9AhAcpiK20g/9DkEA+8NRVeOE0Ul8ktbf/1Qyn 1ZTQ== X-Gm-Message-State: APjAAAUEpOuGmd2MZB6GxyO81fIo7sz/0o4+gm+AcLMdR2FzoJd59Lrj +nST/OBGNsULgoVNJ7KOjqk7R4aMYsg= X-Google-Smtp-Source: APXvYqw9BBO+4Ogpg23+Va1GJ4xB3AaRgS/1WYlZ/O6BCVkqqdRgBAl+DI+bAXgda+OzH41T/bcbFg== X-Received: by 2002:a17:902:7787:: with SMTP id o7mr5745678pll.212.1571504691198; Sat, 19 Oct 2019 10:04:51 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 10:04:50 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Sun, 20 Oct 2019 02:04:40 +0900 Message-Id: <20191019170443.23225-3-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 2/5] docs: add desc for primary design 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" As spp_primary is changed to support forwaring packets as similar to spp_nfv, and user can choose using this forwarder or monitor for statistics, add descriptions of worker threads and its usecases in design section. Signed-off-by: Yasufumi Ogawa --- docs/guides/design/spp_primary.rst | 55 +++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/docs/guides/design/spp_primary.rst b/docs/guides/design/spp_primary.rst index 79220e7..bfd1f65 100644 --- a/docs/guides/design/spp_primary.rst +++ b/docs/guides/design/spp_primary.rst @@ -15,12 +15,57 @@ of `Multi-process Sample Application `_ in DPDK's sample applications. -``spp_primary`` is a server process for other secondary processes and -basically working as described in +``spp_primary`` is a server for other secondary processes and +basically working same as described in "How the Application Works" section of the sample application. -However, there are also differences between ``spp_primary`` and +However, there are some differences between ``spp_primary`` and the server process of the sample application. ``spp_primary`` has no limitation of the number of secondary processes. -It does not work for packet forwaring, but just provide rings and memory pools -for secondary processes. +It does not work for packet forwaring without in some usecases, but just +provide rings and memory pools for secondary processes. + + +Master and Worker Threads +------------------------- + +In SPP, Both of primary and secondary processes consist of master thread and +worker thread as slave. Master thread is for accepting commands from a user +for doing task, and running on a master lcore. On the other hand, +slave thread is for packet forwarding or other process specific jobs +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. +Using worker thread or not depends on your usecases. +``spp_primary`` provides two types of workers currently. + + +Worker Types +------------ + +There are two types of worker thread in ``spp_primary``. First one is +is forwarder thread, and second one is monitor thread. + +As default, ``spp_primary`` runs packet forwarder if two or more lcores +are given while launching the process. Behavior of this forwarder is +same as ``spp_nfv`` described in the next section. +This forwarder provides features for managing ports, patching them and +forwarding packets between ports. +It is useful for very simple usecase in which only few ports are patched +and no need to do forwarding packets in parallel with several processes. + +.. note:: + + In DPDK v18.11 or later, some of PMDs, such as vhost, do not work for + multi-process application. It means that packets cannot forwarded + to a VM or container via secondary process in SPP. + In this case, you use forwarder in ``spp_primary``. + +Another type is monitor for displaying status of ``spp_primary`` in which +statistics of RX and TX packets on each of physical ports and ring ports +are shown periodically in terminal ``spp_primary`` is launched. +Although statistics can be referred in SPP CLI by using ``pri; status`` +command, running monitor thread is useful if you always watch statistics. -- 2.17.1