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 358D6A055A for ; Wed, 26 Feb 2020 12:43:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BF04C1BFD2; Wed, 26 Feb 2020 12:43:42 +0100 (CET) Received: from dish-sg.nttdocomo.co.jp (dish-sg.nttdocomo.co.jp [202.19.227.74]) by dpdk.org (Postfix) with ESMTP id 0EC6C1BFB5 for ; Wed, 26 Feb 2020 12:43:42 +0100 (CET) X-dD-Source: Outbound Received: from zssg-mailmd104.ddreams.local (zssg-mailmd900.ddreams.local [10.160.172.63]) by zssg-mailou101.ddreams.local (Postfix) with ESMTP id 3B5FB1200D3; Wed, 26 Feb 2020 20:43:41 +0900 (JST) Received: from zssg-mailmf106.ddreams.local (zssg-mailmf900.ddreams.local [10.160.172.84]) by zssg-mailmd104.ddreams.local (dDREAMS) with ESMTP id <0Q6B006MK4KT8NB0@dDREAMS>; Wed, 26 Feb 2020 20:43:41 +0900 (JST) Received: from zssg-mailmf106.ddreams.local (unknown [127.0.0.1]) by zssg-mailmf106.ddreams.local (Postfix) with ESMTP id 14CE07E6032; Wed, 26 Feb 2020 20:43:41 +0900 (JST) Received: from zssg-mailmf106.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 13C708E6055; Wed, 26 Feb 2020 20:43:41 +0900 (JST) Received: from localhost (unknown [127.0.0.1]) by IMSVA (Postfix) with SMTP id 12AEA8E6042; Wed, 26 Feb 2020 20:43:41 +0900 (JST) X-IMSS-HAND-OFF-DIRECTIVE: localhost:10026 Received: from zssg-mailmf106.ddreams.local (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA38F8E6057; Wed, 26 Feb 2020 20:43:40 +0900 (JST) Received: from davinci.ntt-tx.co.jp (unknown [10.160.183.139]) by zssg-mailmf106.ddreams.local (Postfix) with ESMTP; Wed, 26 Feb 2020 20:43:40 +0900 (JST) From: x-fn-spp-ml@ntt-tx.co.jp To: ferruh.yigit@intel.com, yasufum.o@gmail.com Cc: spp@dpdk.org Date: Wed, 26 Feb 2020 20:43:29 +0900 Message-id: <20200226114335.3865-6-x-fn-spp-ml@ntt-tx.co.jp> X-Mailer: git-send-email 2.18.0 In-reply-to: <20200226114335.3865-1-x-fn-spp-ml@ntt-tx.co.jp> References: <20200226114335.3865-1-x-fn-spp-ml@ntt-tx.co.jp> X-TM-AS-GCONF: 00 Subject: [spp] [PATCH 05/11] docs: support flow syntax in primary command 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" From: Hideyuki Yamashita This patch adds description of flow syntax in primary command. Signed-off-by: Hideyuki Yamashita Signed-off-by: Naoki Takada --- 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..fd799e3 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 ``commmand 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 paraemters 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