Soft Patch Panel
 help / color / Atom feed
From: Itsuro Oda <oda@valinux.co.jp>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 2/3] docs: add REST API for pipe PMD
Date: Mon, 13 Apr 2020 08:00:56 +0900
Message-ID: <20200412230057.28631-3-oda@valinux.co.jp> (raw)
In-Reply-To: <20200412230057.28631-1-oda@valinux.co.jp>

This patch adds description about REST API for pipe PMD.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
 docs/guides/api_ref/spp_primary.rst | 54 ++++++++++++++++++++++++-----
 1 file changed, 46 insertions(+), 8 deletions(-)

diff --git a/docs/guides/api_ref/spp_primary.rst b/docs/guides/api_ref/spp_primary.rst
index fbf8874..28596cb 100644
--- a/docs/guides/api_ref/spp_primary.rst
+++ b/docs/guides/api_ref/spp_primary.rst
@@ -41,6 +41,8 @@ Response
     +------------+-------+----------------------------------------+
     | ring_ports | array | Array of statistics of ring ports.     |
     +------------+-------+----------------------------------------+
+    | pipes      | array | Array of pipe ports.                   |
+    +------------+-------+----------------------------------------+
 
 Physical port object.
 
@@ -84,6 +86,23 @@ Ring port object.
     | tx_drop | integer | The total number of dropped packets of transferred. |
     +---------+---------+-----------------------------------------------------+
 
+Pipe port object.
+
+.. _table_spp_ctl_primary_status_pipe:
+
+.. table:: Attributes of pipe port of primary status.
+
+    +---------+---------+-----------------------------------------------------+
+    | Name    | Type    | Description                                         |
+    |         |         |                                                     |
+    +=========+=========+=====================================================+
+    | id      | integer | Port ID of the pipe port.                           |
+    +---------+---------+-----------------------------------------------------+
+    | rx      | integer | Port ID of the ring port for rx.                    |
+    +---------+---------+-----------------------------------------------------+
+    | tx      | integer | Port ID of the ring port for tx.                    |
+    +---------+---------+-----------------------------------------------------+
+
 
 Response example
 ~~~~~~~~~~~~~~~~
@@ -132,6 +151,13 @@ Response example
           "tx": 0,
           "tx_drop": 0
         }
+      ],
+      "pipes": [
+        {
+          "id": 0,
+          "rx": 0,
+          "tx": 1
+        }
       ]
     }
 
@@ -192,14 +218,18 @@ Request (body)
 
 .. table:: Request body params of ports of ``spp_primary``.
 
-    +--------+--------+--------------------------------------------------+
-    | Name   | Type   | Description                                      |
-    |        |        |                                                  |
-    +========+========+==================================================+
-    | action | string | ``add`` or ``del``.                              |
-    +--------+--------+--------------------------------------------------+
-    | port   | string | Resource UID of {port_type}:{port_id}.           |
-    +--------+--------+--------------------------------------------------+
+    +--------+--------+---------------------------------------------------------+
+    | Name   | Type   | Description                                             |
+    |        |        |                                                         |
+    +========+========+=========================================================+
+    | action | string | ``add`` or ``del``.                                     |
+    +--------+--------+---------------------------------------------------------+
+    | port   | string | Resource UID of {port_type}:{port_id}.                  |
+    +--------+--------+---------------------------------------------------------+
+    | rx     | string | Rx ring for pipe. It is necessary for adding pipe only. |
+    +--------+--------+---------------------------------------------------------+
+    | tx     | string | Tx ring for pipe. It is necessary for adding pipe only. |
+    +--------+--------+---------------------------------------------------------+
 
 
 Request example
@@ -211,6 +241,14 @@ Request example
       -d '{"action": "add", "port": "ring:0"}' \
       http://127.0.0.1:7777/v1/primary/ports
 
+For adding pipe.
+
+.. code-block:: console
+
+    $ curl -X PUT -H 'application/json' \
+      -d '{"action": "add", "port": "pipe:0", \
+      "rx": "ring:0", "tx": "ring:1"}' \
+      http://127.0.0.1:7777/v1/primary/ports
 
 Response
 ~~~~~~~~
-- 
2.17.0


  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12 23:00 [spp] [PATCH 0/3] add document of " Itsuro Oda
2020-04-12 23:00 ` [spp] [PATCH 1/3] docs: add CLI for " Itsuro Oda
2020-04-12 23:00 ` Itsuro Oda [this message]
2020-04-12 23:00 ` [spp] [PATCH 3/3] docs: add document of pipe PMD usecase Itsuro Oda
2020-04-30  2:38 ` [spp] (x-fn-spp-ml 671) [PATCH 0/3] add document of pipe PMD Hideyuki Yamashita
2020-05-25  3:07 ` [spp] " Yasufumi Ogawa

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200412230057.28631-3-oda@valinux.co.jp \
    --to=oda@valinux.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    --cc=yasufum.o@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/ public-inbox