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 3DC4AA057B for ; Mon, 13 Apr 2020 01:01:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A2E22A5D; Mon, 13 Apr 2020 01:01:03 +0200 (CEST) Received: from mail.valinux.co.jp (mail.valinux.co.jp [210.128.90.3]) by dpdk.org (Postfix) with ESMTP id 5001D2A5D for ; Mon, 13 Apr 2020 01:00:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.valinux.co.jp (Postfix) with ESMTP id 74FC09FC90; Mon, 13 Apr 2020 08:00:58 +0900 (JST) X-Virus-Scanned: Debian amavisd-new at valinux.co.jp Received: from mail.valinux.co.jp ([127.0.0.1]) by localhost (mail.valinux.co.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oTkh3VYfv52q; Mon, 13 Apr 2020 08:00:58 +0900 (JST) Received: from valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with ESMTP id 23F6C9FC99; Mon, 13 Apr 2020 08:00:58 +0900 (JST) From: Itsuro Oda To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 13 Apr 2020 08:00:57 +0900 Message-Id: <20200412230057.28631-4-oda@valinux.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200412230057.28631-1-oda@valinux.co.jp> References: <20200412230057.28631-1-oda@valinux.co.jp> Subject: [spp] [PATCH 3/3] docs: add document of pipe PMD usecase 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" This patch adds a document of usecase of pipe PMD. Signed-off-by: Itsuro Oda --- docs/guides/api_ref/spp_primary.rst | 2 + .../images/usecases/pipe_usecase_pipe.svg | 611 ++++++++++++ .../images/usecases/pipe_usecase_sfc_nfv.svg | 722 ++++++++++++++ .../images/usecases/pipe_usecase_sfc_vf.svg | 933 ++++++++++++++++++ docs/guides/usecases/index.rst | 1 + docs/guides/usecases/pipe_pmd.rst | 133 +++ 6 files changed, 2402 insertions(+) create mode 100644 docs/guides/images/usecases/pipe_usecase_pipe.svg create mode 100644 docs/guides/images/usecases/pipe_usecase_sfc_nfv.svg create mode 100644 docs/guides/images/usecases/pipe_usecase_sfc_vf.svg create mode 100644 docs/guides/usecases/pipe_pmd.rst diff --git a/docs/guides/api_ref/spp_primary.rst b/docs/guides/api_ref/spp_primary.rst index 28596cb..f22a1cc 100644 --- a/docs/guides/api_ref/spp_primary.rst +++ b/docs/guides/api_ref/spp_primary.rst @@ -202,6 +202,8 @@ Action is ``stop``. spp > pri; stop +.. _api_spp_ctl_spp_primary_put_ports: + PUT /v1/primary/ports --------------------- diff --git a/docs/guides/images/usecases/pipe_usecase_pipe.svg b/docs/guides/images/usecases/pipe_usecase_pipe.svg new file mode 100644 index 0000000..35e89c5 --- /dev/null +++ b/docs/guides/images/usecases/pipe_usecase_pipe.svg @@ -0,0 +1,611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + app 2 + pipe:1 + + + + + + + + + app 1 + host + ring:0 + ring:1 + pipe:0 + + diff --git a/docs/guides/images/usecases/pipe_usecase_sfc_nfv.svg b/docs/guides/images/usecases/pipe_usecase_sfc_nfv.svg new file mode 100644 index 0000000..7b59c40 --- /dev/null +++ b/docs/guides/images/usecases/pipe_usecase_sfc_nfv.svg @@ -0,0 +1,722 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + spp_nfv + app 2 + ring:2 + pipe:1 + + + + + + + + + + + + spp_nfv + app 1 + phy:0 + phy:1 + host + ring:0 + ring:1 + pipe:0 + + diff --git a/docs/guides/images/usecases/pipe_usecase_sfc_vf.svg b/docs/guides/images/usecases/pipe_usecase_sfc_vf.svg new file mode 100644 index 0000000..dc92bad --- /dev/null +++ b/docs/guides/images/usecases/pipe_usecase_sfc_vf.svg @@ -0,0 +1,933 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + app 3 + pipe:2 + + + + + + + + + + + + + + + + + app 2 + pipe:1 + + + ring:2 + ring:3 + + + ring:4 + ring:5 + + fwd1 + + fwd3 + + fwd2 + + fwd4 + + + + + + + + + + + + + + + + spp_vf + app 1 + phy:0 + phy:1 + host + ring:0 + ring:1 + pipe:0 + + diff --git a/docs/guides/usecases/index.rst b/docs/guides/usecases/index.rst index 6508610..2e8293e 100644 --- a/docs/guides/usecases/index.rst +++ b/docs/guides/usecases/index.rst @@ -32,3 +32,4 @@ or via REST API from :ref:`API Reference`. spp_pcap multi_nodes hardware-offload + pipe_pmd diff --git a/docs/guides/usecases/pipe_pmd.rst b/docs/guides/usecases/pipe_pmd.rst new file mode 100644 index 0000000..b196880 --- /dev/null +++ b/docs/guides/usecases/pipe_pmd.rst @@ -0,0 +1,133 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2020 Nippon Telegraph and Telephone Corporation + + +.. _usecase_pipe_pmd: + +Pipe PMD +======== + +Pipe PMD constitutes a virtual Ethernet device (named spp_pipe) using +rings which the spp_primary allocated. + +It is necessary for the DPDK application using spp_pipe to implement +it as the secondary process under the spp_primary as the primary +process. + +Using spp_pipe enables high-speed packet transfer through rings +among DPDK applications using spp_pipe and SPP secondary processes +such as spp_nfv and spp_vf. + +Using pipe PMD +-------------- + +Create a pipe port by requesting to the spp_primary to use spp_pipe +beforehand. +There are :ref:`CLI` and +:ref:`REST API` to create a pipe +port. +A ring used for rx transfer and a ring used for tx transfer are +specified at a pipe port creation. + +For example creating ``pipe:0`` with ``ring:0`` for rx and +``ring:1`` for tx by CLI as follows. + +.. code-block:: none + + spp > pri; add pipe:0 ring:0 ring:1 + +The name as the Ethernet device of ``pipe:N`` is ``spp_pipeN``. +DPDK application which is the secondary process of the spp_primary +can get the port id of the device using ``rte_eth_dev_get_port_by_name``. + +Requirement of DPDK application using spp_pipe +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is necessary to use the common mbuf mempool of the SPP processes. + +.. code-block:: C + + #define PKTMBUF_POOL_NAME "Mproc_pktmbuf_pool" + + struct rte_mempool *mbuf_pool; + + mbuf_pool = rte_mempool_lookup(PKTBBUF_POOL_NAME); + +Use cases +--------- + +Here are some examples using spp_pipe. + +.. note:: + + A ring allocated by the spp_primary assumes it is single + producer and single consumer. It is user responsibility + that each ring in the model has single producer and single + consumer. + +Direct communication between applications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _figure_pipe_usecase_pipe: + +.. figure:: ../images/usecases/pipe_usecase_pipe.* + :width: 50% + +To create pipe ports by CLI before running applications as follows. + +.. code-block:: none + + spp > pri; add pipe:0 ring:0 ring:1 + spp > pri; add pipe:1 ring:1 ring:0 + +Fixed application chain using spp_nfv +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _figure_pipe_usecase_sfc_nfv: + +.. figure:: ../images/usecases/pipe_usecase_sfc_nfv.* + :width: 50% + +To construct the model by CLI before running applications as follows. + +.. code-block:: none + + spp > pri; add pipe:0 ring:0 ring:1 + spp > pri; add pipe:1 ring:1 ring:2 + spp > nfv 1; add ring:0 + spp > nfv 1; patch phy:0 ring:0 + spp > nfv 1; forward + spp > nfv 2; add ring:2 + spp > nfv 2; patch ring:2 phy:1 + spp > nfv 2; forward + +Service function chaining using spp_vf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _figure_pipe_usecase_sfc_vf: + +.. figure:: ../images/usecases/pipe_usecase_sfc_vf.* + :width: 80% + +To construct the model by CLI before running applications as follows. + +.. code-block:: none + + spp > pri; add pipe:0 ring:0 ring:1 + spp > pri; add pipe:1 ring:2 ring:3 + spp > pri; add pipe:2 ring:4 ring:5 + spp > vf 1; component start fwd1 2 forward + spp > vf 1; component start fwd2 3 forward + spp > vf 1; component start fwd3 4 forward + spp > vf 1; component start fwd4 5 forward + spp > vf 1; port add phy:0 rx fwd1 + spp > vf 1; port add ring:0 tx fwd1 + spp > vf 1; port add ring:1 rx fwd2 + spp > vf 1; port add ring:2 tx fwd2 + spp > vf 1; port add ring:3 rx fwd3 + spp > vf 1; port add ring:4 tx fwd3 + spp > vf 1; port add ring:5 rx fwd4 + spp > vf 1; port add phy:1 tx fwd4 + +Since applications are connected not directly but through spp_vf, +service chaining can be modified without restarting applications. -- 2.17.0