Soft Patch Panel
 help / color / Atom feed
From: x-fn-spp-ml@ntt-tx.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH v2 05/11] docs: support flow syntax in primary command
Date: Fri, 27 Mar 2020 13:57:26 +0900
Message-ID: <20200327045732.18463-6-x-fn-spp-ml@ntt-tx.co.jp> (raw)
In-Reply-To: <20200226113521.3787-1-x-fn-spp-ml@ntt-tx.co.jp>

From: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>

This patch adds description of flow syntax
in primary command.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>
Signed-off-by: Naoki Takada <ntakada14@gmail.com>
---
 docs/guides/commands/primary.rst | 99 +++++++++++++++++++++++++++++++-
 1 file changed, 96 insertions(+), 3 deletions(-)

diff --git a/docs/guides/commands/primary.rst b/docs/guides/commands/primary.rst
index 54aead4..bc89c65 100644
--- a/docs/guides/commands/primary.rst
+++ b/docs/guides/commands/primary.rst
@@ -53,9 +53,10 @@ Show status fo ``spp_primary`` and forwarding statistics of each of ports.
       - master: 0
     - stats
       - physical ports:
-          ID          rx          tx    tx_drop  mac_addr
-           0           0           0           0  56:48:4f:53:54:00
-           1           0           0           0  56:48:4f:53:54:01
+          ID          rx          tx    tx_drop   rxq  txq mac_addr
+           0           0           0           0   16   16 3c:fd:fe:b6:c4:28
+           1           0           0           0 1024 1024 3c:fd:fe:b6:c4:29
+           2           0           0           0    1    1 3c:fd:fe:b6:c4:30
       - ring ports:
           ID          rx          tx     rx_drop     tx_drop
            0           0           0           0           0
@@ -247,3 +248,95 @@ In terms of log, each of secondary processes are output its log messages to
 files under ``log`` directory of project root. The name of log file is defined
 with type of process and secondary ID. For instance, ``nfv 2``, the path of log
 file is ``log/spp_nfv-2.log``.
+
+.. _commands_primary_flow:
+
+flow
+----
+
+Manipulate flow rules.
+
+You can request ``validate`` before creating flow rule.
+
+.. code-block:: console
+
+   spp > pri; flow validate phy:0 ingress group 1 pattern eth dst is
+         10:22:33:44:55:66 / vlan vid is 100 / end actions queue index 0 /
+         of_pop_vlan / end
+   Flow rule validated
+
+
+You can create rules by using ``create`` request.
+
+.. code-block:: console
+
+   spp > pri; flow create phy:0 ingress group 1 pattern eth dst is
+         10:22:33:44:55:66 / vlan vid is 100 / end actions queue index 0 /
+         of_pop_vlan / end
+   Flow rule #0 created
+
+.. note::
+
+   ``validate`` and/or ``create`` in flow command tends to take long
+   parameters. But you should enter it as one line.
+   CLI assumes that new line means ``command is entered``. So command
+   should be entered without using new line.
+
+You can delete specific flow rule.
+
+.. code-block:: console
+
+   spp > pri; flow destroy phy:0 0
+   Flow rule #0 destroyed
+
+Listing flow rules per physical port is supported.
+
+.. code-block:: console
+
+   spp > pri; flow list phy:0
+   ID      Group   Prio    Attr    Rule
+   0       1       0       -e-     ETH => OF_PUSH_VLAN OF_SET_VLAN_VID OF_SET_VLAN_PCP
+   1       1       0       i--     ETH VLAN => QUEUE OF_POP_VLAN
+   2       0       0       i--     ETH => JUMP
+
+The following is the parameters to be displayed.
+
+* ``ID``: Identifier of the rule which is unique per physical port.
+* ``Group``: Group number the rule belongs.
+* ``Prio``: Priority value of the rule.
+* ``Attr``: Attributes for the rule which is independent each other.
+  The possible values of ``Attr`` are ``i`` or ``e`` or ``t``. ``i`` means
+  ingress. ``e`` means egress and ``t`` means transfer.
+* ``Rule``: Rule notation.
+
+Flow detail can be listed.
+
+.. code-block:: console
+
+   spp > pri; flow status phy:0 0
+   Attribute:
+     Group   Priority Ingress Egress Transfer
+     1       0        true    false  false
+   Patterns:
+     - eth:
+       - spec:
+         - dst: 10:22:33:44:55:66
+         - src: 00:00:00:00:00:00
+         - type: 0xffff
+       - last:
+       - mask:
+         - dst: ff:ff:ff:ff:ff:ff
+         - src: 00:00:00:00:00:00
+         - type: 0xffff
+     - vlan:
+       - spec:
+         - tci: 0x0064
+         - inner_type: 0x0000
+       - last:
+       - mask:
+         - tci: 0xffff
+         - inner_type: 0x0000
+   Actions:
+     - queue:
+       - index: 0
+     - of_pop_vlan:
-- 
2.17.1


  parent reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200226113521.3787-1-x-fn-spp-ml@ntt-tx.co.jp>
2020-03-27  4:57 ` [spp] [PATCH v2 00/11] Add Hardware offload document x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 01/11] docs: add support for rte_flow x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 02/11] docs: add support of MLX5 PMD support in DPDK x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 03/11] docs: change primary process startup parameter x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 04/11] docs: add description of REST-APIs for flow rules x-fn-spp-ml
2020-03-27  4:57 ` x-fn-spp-ml [this message]
2020-03-27  4:57 ` [spp] [PATCH v2 06/11] docs: support multi-queue in spp_vf command x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 07/11] docs: add svg for classify case of hardware offload x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 08/11] docs: add svg for vlan " x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 09/11] docs: add svg for vm " x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 10/11] docs: add usecase for " x-fn-spp-ml
2020-03-27  4:57 ` [spp] [PATCH v2 11/11] docs: add install drivers for Mellanox NIC x-fn-spp-ml

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=20200327045732.18463-6-x-fn-spp-ml@ntt-tx.co.jp \
    --to=x-fn-spp-ml@ntt-tx.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