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 681DAA057B for ; Mon, 13 Apr 2020 01:02:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E7641B53; Mon, 13 Apr 2020 01:02:13 +0200 (CEST) Received: from mail.valinux.co.jp (mail.valinux.co.jp [210.128.90.3]) by dpdk.org (Postfix) with ESMTP id 1403C1B53 for ; Mon, 13 Apr 2020 01:02:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.valinux.co.jp (Postfix) with ESMTP id D5CC99FC90; Mon, 13 Apr 2020 08:02:10 +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 FCKAHIBWE0CW; Mon, 13 Apr 2020 08:02:10 +0900 (JST) Received: from valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with ESMTP id B163E9F6FC; Mon, 13 Apr 2020 08:02:10 +0900 (JST) From: Itsuro Oda To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 13 Apr 2020 08:02:10 +0900 Message-Id: <20200412230210.28685-1-oda@valinux.co.jp> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] docs: add document of vdev_test tool 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 vdev_test tool. Signed-off-by: Itsuro Oda --- .../vdev_test/vdev_test_example_pipe.svg | 611 ++++++++++++++++++ .../vdev_test/vdev_test_example_vhost.svg | 564 ++++++++++++++++ docs/guides/tools/index.rst | 1 + docs/guides/tools/vdev_test.rst | 86 +++ 4 files changed, 1262 insertions(+) create mode 100644 docs/guides/images/tools/vdev_test/vdev_test_example_pipe.svg create mode 100644 docs/guides/images/tools/vdev_test/vdev_test_example_vhost.svg create mode 100644 docs/guides/tools/vdev_test.rst diff --git a/docs/guides/images/tools/vdev_test/vdev_test_example_pipe.svg b/docs/guides/images/tools/vdev_test/vdev_test_example_pipe.svg new file mode 100644 index 0000000..72f5919 --- /dev/null +++ b/docs/guides/images/tools/vdev_test/vdev_test_example_pipe.svg @@ -0,0 +1,611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + vdev_test + pipe:1 + + + + + + + + + vdev_test + host + ring:0 + ring:1 + pipe:0 + + diff --git a/docs/guides/images/tools/vdev_test/vdev_test_example_vhost.svg b/docs/guides/images/tools/vdev_test/vdev_test_example_vhost.svg new file mode 100644 index 0000000..924e7bf --- /dev/null +++ b/docs/guides/images/tools/vdev_test/vdev_test_example_vhost.svg @@ -0,0 +1,564 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + vdev_test + virtio_user0 + + + + + + eth_vhost0 + + + vdev_test + host + + diff --git a/docs/guides/tools/index.rst b/docs/guides/tools/index.rst index c739d79..495b9a8 100644 --- a/docs/guides/tools/index.rst +++ b/docs/guides/tools/index.rst @@ -12,3 +12,4 @@ Tools sppc/index helpers/index + vdev_test.rst diff --git a/docs/guides/tools/vdev_test.rst b/docs/guides/tools/vdev_test.rst new file mode 100644 index 0000000..10d6924 --- /dev/null +++ b/docs/guides/tools/vdev_test.rst @@ -0,0 +1,86 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2020 Nippon Telegraph and Telephone Corporation + +.. _spp_tools_vdev_test: + +Vdev_test +========= + +Vdev_test is a simple application that it forwards packets received +from rx queue to tx queue on the main core. It can become a secondary +process of the spp_primary. It is mainly used for testing spp_pipe +but it can be used to test any virtual Ethernet devices as well. + +Usage +----- + +.. code-block:: none + + vdev_test [EAL options] -- [--send] [--create devargs] device-name + +Vdev_test runs foreground and stops when Ctrl-C is pressed. If ``--send`` +option specified a packet is sent first. The virtual Ethernet device can +be created to specify ``--create`` option. + +.. note:: + + Since the device can be created by EAL ``--vdev`` option for a + primary process, ``--create`` option mainly used by a secondary + process. + +Examples +-------- + +Examining spp_pipe +~~~~~~~~~~~~~~~~~~ + +.. _figure_vdev_test_example_pipe: + +.. figure:: ../images/tools/vdev_test/vdev_test_example_pipe.* + :width: 50% + +It is assumed that pipe ports were created beforehand. First run vdev_test +without ``--send`` option. + +.. code-block:: console + + # terminal 1 + $ sudo vdev_test -l 8 -n 4 --proc-type secondary -- spp_pipe0 + +Then run vdev_test with ``--send`` option on another terminal. + +.. code-block:: console + + # terminal 2 + $ sudo vdev_test -l 9 -n 4 --proc-type secondary -- --send spp_pipe1 + +Press Ctrl-C to stop processes on both terminals after for a while. + +Examining vhost +~~~~~~~~~~~~~~~ + +.. _figure_vdev_test_example_vhost: + +.. figure:: ../images/tools/vdev_test/vdev_test_example_vhost.* + :width: 50% + +This example is independent of SPP. First run vdev_test using eth_vhost0 +without ``--send`` option. + +.. code-block:: console + + # terminal 1 + $ sudo vdev_test -l 8 -n 4 --vdev eht_vhost0,iface=/tmp/sock0,client=1 \ + --file-prefix=app1 -- eth_vhost0 + +Then run vdev_test using virtio_user0 with ``--send`` option on another +terminal. + +.. code-block:: console + + # terminal 1 + $ sudo vdev_test -l 9 -n 4 --vdev virtio_user0,path=/tmp/sock0,server=1 \ + --file-prefix=app2 --single-file-segments -- --send virtio_user0 + +Press Ctrl-C to stop processes on both terminals after for a while. + -- 2.17.0