From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw1016.ocn.ad.jp (mogw1016.ocn.ad.jp [153.149.231.22]) by dpdk.org (Postfix) with ESMTP id 8B24F12001 for ; Tue, 23 Jan 2018 01:29:00 +0100 (CET) Received: from mf-smf-ucb006.ocn.ad.jp (mf-smf-ucb006.ocn.ad.jp [153.149.231.5]) by mogw1016.ocn.ad.jp (Postfix) with ESMTP id 9C0A3100237; Tue, 23 Jan 2018 09:28:59 +0900 (JST) Received: from mf-smf-ucb006.ocn.ad.jp (mf-smf-ucb006 [153.149.231.5]) by mf-smf-ucb006.ocn.ad.jp (Postfix) with ESMTP id 81F7020693; Tue, 23 Jan 2018 09:28:59 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb023 (mv-mta-ucb023.ocn.ad.jp [153.149.142.86]) by mf-smf-ucb006.ocn.ad.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id w0N0SjBb043801; Tue, 23 Jan 2018 09:28:59 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.133]) by ntt.pod01.mv-mta-ucb023 with id 1cUy1x00A2tKTyH01cUySG; Tue, 23 Jan 2018 00:28:59 +0000 Received: from mugwort.jp (p1247-ipngn8903marunouchi.tokyo.ocn.ne.jp [153.221.64.247]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Tue, 23 Jan 2018 09:28:58 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, x-fn-spp@sl.ntt-tx.co.jp Cc: Hiroyuki Nakamura , Kentaro Watanabe , Naoki Takada Date: Tue, 23 Jan 2018 09:29:06 +0900 Message-Id: <20180123002907.28414-9-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20180123002907.28414-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180123002907.28414-1-ogawa.yasufumi@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [spp] [PATCH 18/28] doc: update description for the latest spp version 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: , X-List-Received-Date: Tue, 23 Jan 2018 00:29:01 -0000 From: Hiroyuki Nakamura Update description for the latest version of spp. * Update syntax and procedures (nic->phy态ring0->ring:0 etc.) * Change filename spp.py to spp_vf.py. * Change how to register MAC in Classifier_table. Signed-off-by: Kentaro Watanabe Signed-off-by: Naoki Takada --- docs/spp_vf/config_manual.md | 58 +++++++++++++++++++++--------------------- docs/spp_vf/how_to_use.md | 2 +- docs/spp_vf/sample_usage.md | 60 +++++++++----------------------------------- 3 files changed, 42 insertions(+), 78 deletions(-) diff --git a/docs/spp_vf/config_manual.md b/docs/spp_vf/config_manual.md index 370dfdb..f049407 100644 --- a/docs/spp_vf/config_manual.md +++ b/docs/spp_vf/config_manual.md @@ -17,12 +17,12 @@ There are three types of forwarder for 1:1, 1:N and N:1. There are three port types. - * nic: Physical NIC + * phy: Physical NIC * vhost: Vhost PMD for VMs * ring: Ring PMD for spp components Each of ports is identified as resource ID with port type and resource ID. -For example, resource ID of physical NIC of ID 0 is described as `nic0`. +For example, resource ID of physical NIC of ID 0 is described as `phy:0`. ## Config Format @@ -66,76 +66,76 @@ Here is default config `spp.json` and network diagram of it. { "core": 2, // Core ID "type": "merge", // Forwarder type - "rx_port": ["nic0", "nic1"], // Rx port, It MUST be a list for merge type - "tx_port": "ring8" // Tx port + "rx_port": ["phy:0", "phy:1"], // Rx port, It MUST be a list for merge type + "tx_port": "ring:8" // Tx port }, { "core": 3, "type": "classifier_mac", - "rx_port": "ring8", // Rx port, It is not a list because type is classifier_mac + "rx_port": "ring:8", // Rx port, It is not a list because type is classifier_mac "tx_port_table": "classifier_mac_table" // If type is classifier_mac, tx is classifier_mac_table }, { "core": 4, "type": "forward", - "rx_port": "ring0", - "tx_port": "vhost0" + "rx_port": "ring:0", + "tx_port": "vhost:0" }, { "core": 5, "type": "forward", - "rx_port": "ring1", - "tx_port": "vhost2" + "rx_port": "ring:1", + "tx_port": "vhost:2" }, { "core": 6, "type": "forward", - "rx_port": "vhost0", - "tx_port": "ring2" + "rx_port": "vhost:0", + "tx_port": "ring:2" }, { "core": 7, "type": "forward", - "rx_port": "vhost2", - "tx_port": "ring3" + "rx_port": "vhost:2", + "tx_port": "ring:3" }, { "core": 8, "type": "merge", - "rx_port": ["ring2", "ring3"], - "tx_port": "nic0" + "rx_port": ["ring:2", "ring:3"], + "tx_port": "phy:0" }, { "core": 9, "type": "forward", - "rx_port": "ring4", - "tx_port": "vhost1" + "rx_port": "ring:4", + "tx_port": "vhost:1" }, { "core": 10, "type": "forward", - "rx_port": "ring5", - "tx_port": "vhost3" + "rx_port": "ring:5", + "tx_port": "vhost:3" }, { "core": 11, "type": "forward", - "rx_port": "vhost1", - "tx_port": "ring6" + "rx_port": "vhost:1", + "tx_port": "ring:6" }, { "core": 12, "type": "forward", - "rx_port": "vhost3", - "tx_port": "ring7" + "rx_port": "vhost:3", + "tx_port": "ring:7" }, { "core": 13, "type": "merge", - "rx_port": ["ring6", "ring7"], - "tx_port": "nic1" + "rx_port": ["ring:6", "ring:7"], + "tx_port": "phy:1" } ] } @@ -145,19 +145,19 @@ Here is default config `spp.json` and network diagram of it. "table": [ { "mac":"52:54:00:12:34:56", - "port":"ring0" + "port":"ring:0" }, { "mac":"52:54:00:12:34:57", - "port":"ring4" + "port":"ring:4" }, { "mac":"52:54:00:12:34:58", - "port":"ring1" + "port":"ring:1" }, { "mac":"52:54:00:12:34:59", - "port":"ring5" + "port":"ring:5" } ] } diff --git a/docs/spp_vf/how_to_use.md b/docs/spp_vf/how_to_use.md index e9b752d..5cf464c 100644 --- a/docs/spp_vf/how_to_use.md +++ b/docs/spp_vf/how_to_use.md @@ -21,7 +21,7 @@ Before launching spp, you need to setup described as [setup guide](setup_guide.m First, run SPP Controller with port numbers for spp primary and secondary. ```sh -$ python ./src/spp.py -p 5555 -s 6666 +$ python ./src/spp_vf.py -p 5555 -s 6666 ``` ### SPP Primary diff --git a/docs/spp_vf/sample_usage.md b/docs/spp_vf/sample_usage.md index 8653a49..abab4d4 100644 --- a/docs/spp_vf/sample_usage.md +++ b/docs/spp_vf/sample_usage.md @@ -24,7 +24,7 @@ First, launch spp controller and primary process. /path/to/Soft-Patch-Panel # SPP controller - $ python ./src/spp.py -p 5555 -s 6666 + $ python ./src/spp_vf.py -p 5555 -s 6666 # SPP primary $ sudo ./src/primary/x86_64-native-linuxapp-gcc/spp_primary \ @@ -34,18 +34,9 @@ First, launch spp controller and primary process. -p 0x03 -n 8 -s 127.0.0.1:5555 ``` -After primary process is launched, run nc command for each of -seconrdary processes and itselves. -In this sample, commands for secondary are sent from nc because -`spp.py` does not support commands for spp_vf. -nc is a network utility and it can open TCP connections, send UDP -packets, listen on arbitrary TCP and UDP ports, do port scanning, -and deal with both IPv4 and IPv6. +launch secondary process after launch primary process. ```sh - # run nc for secondary 1 with port 11111 - $ while true; do nc -l 11111; done - # start secondary 1 $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \ -c 0x00fd -n 4 --proc-type=secondary \ @@ -54,9 +45,6 @@ and deal with both IPv4 and IPv6. --config /path/to/spp_vf1_without_cmtab.json \ -s 127.0.0.1:11111 - # run nc for secondary 2 with port 11112 - $ while true; do nc -l 11112; done - # start secondary 2 $ sudo ./src/vf/x86_64-native-linuxapp-gcc/spp_vf \ -c 0x3f01 -n 4 --proc-type=secondary \ @@ -126,48 +114,20 @@ discarding packets. ## Test Application -TODO(yasufum) json-based steps will be deprecated. - ### Register MAC address to Classifier Register MAC addresses to classifier. ```sh - { - "commands": [ - { - "command": "classifier_table", - "type": "mac", - "value": "52:54:00:12:34:56", - "port": "ring0" - }, - { - "command": "classifier_table", - "type": "mac", - "value": "52:54:00:12:34:58", - "port": "ring1" - }, - { - "command": "flush" - } - ] - } + spp > classifier_table mac 52:54:00:12:34:56 ring:0 + spp > classifier_table mac 52:54:00:12:34:58 ring:1 + spp > flush ``` ```sh - { - "commands": [ - { - "command": "classifier_table", - "type": "mac", - "value": "52:54:00:12:34:57", - "port": "ring4" - }, - { - "command": "flush" - } - ] - } + spp > classifier_table mac 52:54:00:12:34:57 ring:4 + spp > classifier_table mac 52:54:00:12:34:59 ring:5 + spp > flush ``` ### Login to VMs @@ -201,6 +161,10 @@ The flush command is required to reflect the setting. ```sh spp > classifier_table mac 52:54:00:12:34:56 unuse spp > classifier_table mac 52:54:00:12:34:58 unuse + + spp > classifier_table mac 52:54:00:12:34:57 unuse + spp > classifier_table mac 52:54:00:12:34:59 unuse + spp > flush ``` -- 2.13.1