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 <nakamura.hioryuki@po.ntt-tx.co.jp>,
Naoki Takada <takada.naoki@lab.ntt.co.jp>
Subject: [spp] [PATCH 03/28] doc: add config_manual.md
Date: Tue, 23 Jan 2018 09:28:48 +0900 [thread overview]
Message-ID: <20180123002854.28345-3-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20180123002854.28345-1-ogawa.yasufumi@lab.ntt.co.jp>
From: Hiroyuki Nakamura <nakamura.hioryuki@po.ntt-tx.co.jp>
config_manual.md is a detailed manual for JSON config file.
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
docs/spp_vf/config_manual.md | 214 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 214 insertions(+)
create mode 100644 docs/spp_vf/config_manual.md
diff --git a/docs/spp_vf/config_manual.md b/docs/spp_vf/config_manual.md
new file mode 100644
index 0000000..370dfdb
--- /dev/null
+++ b/docs/spp_vf/config_manual.md
@@ -0,0 +1,214 @@
+# SPP_VF Config Manual
+
+## Forwarder Type
+
+There are three types of forwarder for 1:1, 1:N and N:1.
+
+ * forward: 1:1
+ * classifier_mac: 1:N (Destination is determined by MAC address)
+ * merge: N:1
+
+### Restrictions
+
+ * Different types of forwarder cannot assing on same core.
+ * Only one classifier_mac is allowed (Cannot use two or more).
+
+## Port Type
+
+There are three port types.
+
+ * nic: 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`.
+
+## Config Format
+
+Config files is described in JSON format.
+It consists of `vfs` and `classifier_table`.
+`vfs` defines each of spp_vf attributes and
+`classifier_table` defines MAC address and correnpond port for
+determining destination.
+
+### Attributes in Config
+
+ * vfs
+ * name: Name of spp_vf component.
+ * num_vhost: Number of vhosts spp_vf use.
+ * num_ring: Number of rings spp_vf use.
+ * functions: List of forwarders and its attributes (function means a forwarder).
+ * core: Core ID forwarder running on.
+ * type: Forwarder type (`forward`, `classifier_mac`, or `merger`).
+ * rx_port: Resource ID(s) of rx port.
+ * tx_port: Resource ID of tx port. If 1:N, which means the dest is `classifier_mac`,
+ directly described as `classifier_mac_table`.
+
+ * classifier_table
+ * name: Table name for classifier_mac, It MUST be "classifier_mac_table" in current implementation
+ * table: Set of MAC address and port for destination
+ * mac: MAC address
+ * port: Resource ID of port
+
+## Sample Config
+
+Here is default config `spp.json` and network diagram of it.
+
+```json
+{
+ "vfs": [
+ {
+ "name": "vf0",
+ "num_vhost": 4, // Number of vhosts
+ "num_ring": 9, // Number of rings
+ "functions":[ // Attributes of forward,merge or classifier_mac
+ {
+ "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
+ },
+ {
+ "core": 3,
+ "type": "classifier_mac",
+ "rx_port": "ring8", // 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"
+ },
+ {
+ "core": 5,
+ "type": "forward",
+ "rx_port": "ring1",
+ "tx_port": "vhost2"
+ },
+ {
+ "core": 6,
+ "type": "forward",
+ "rx_port": "vhost0",
+ "tx_port": "ring2"
+ },
+ {
+ "core": 7,
+ "type": "forward",
+ "rx_port": "vhost2",
+ "tx_port": "ring3"
+ },
+ {
+ "core": 8,
+ "type": "merge",
+ "rx_port": ["ring2", "ring3"],
+ "tx_port": "nic0"
+ },
+
+ {
+ "core": 9,
+ "type": "forward",
+ "rx_port": "ring4",
+ "tx_port": "vhost1"
+ },
+ {
+ "core": 10,
+ "type": "forward",
+ "rx_port": "ring5",
+ "tx_port": "vhost3"
+ },
+ {
+ "core": 11,
+ "type": "forward",
+ "rx_port": "vhost1",
+ "tx_port": "ring6"
+ },
+ {
+ "core": 12,
+ "type": "forward",
+ "rx_port": "vhost3",
+ "tx_port": "ring7"
+ },
+ {
+ "core": 13,
+ "type": "merge",
+ "rx_port": ["ring6", "ring7"],
+ "tx_port": "nic1"
+ }
+ ]
+ }
+ ],
+ "classifier_table": {
+ "name":"classifier_mac_table",
+ "table": [
+ {
+ "mac":"52:54:00:12:34:56",
+ "port":"ring0"
+ },
+ {
+ "mac":"52:54:00:12:34:57",
+ "port":"ring4"
+ },
+ {
+ "mac":"52:54:00:12:34:58",
+ "port":"ring1"
+ },
+ {
+ "mac":"52:54:00:12:34:59",
+ "port":"ring5"
+ }
+ ]
+ }
+}
+```
+
+Network diagram
+[TODO] Replace it to more readable SVG img.
+
+```
++---------+ +-----------------------------------------------------------------------------------------------+
+| host2 | | Host1 |
+| | | +------------------------------------------------------+ +-------------------+ |
+| | | | spp_vf | | | |
+| +-----+ | | +--------+ | +---+ +----+ +---+ +----+ +---+ +----------+ | | +----------+ | |
+| | nic <------> nic0 +-----> M +--> r8 +--> C +-----> r0 +--> F +--> +------> | | |
+| +-----+ | | +----+---+ | +-^-+ +----+ +-+-+ +----+ +---+ | | | | | | | |
+| | | ^ | | | | vhost0 | | | | nic | | |
+| | | | | | | +----+ +---+ | | | | | | | |
+| | | | | | +--------------+ r2 <--+ F <--+ <------+ | | |
+| | | | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | | | | | spp vm| |
+| | | | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | | +-------> r4 +--+ F +--> +------> | | |
+| | | | | | +--v--+ | +----+ +---+ | | | | | | | |
+| | | +----------------+ M | | | vhost1 | | | | nic | | |
+| | | | | +--^--+ | +----+ +---+ | | | | | | | |
+| | | | | | +------------+ r6 +--+ F <--+ <------+ | | |
+| | | | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | | | | | | |
+| | | | | | | | | +-------------------+ |
+| | | | | | | | | |
+| | | | | | | | | +-------------------+ |
+| | | | | | | | | | | |
+| +-----+ | | +--------+ | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | nic <------> nic1 +-------+ | | +-------> r1 +--+ F +--> +------> | | |
+| +-----+ | | +----+---+ | | | | +----+ +---+ | | | | | | | |
+| | | ^ | | | | | vhost2 | | | | nic | | |
+| | | | | | | | +----+ +---+ | | | | | | | |
+| | | | | +--------------+ r3 +--+ F <--+ <------+ | | |
+| | | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | | | | spp vm| |
+| | | | | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | +-------> r5 +--+ F +--> +------> | | |
+| | | | | +----v+ +----+ +---+ | | | | | | | |
+| | | +----------------+ M | | vhost3 | | | | nic | | |
+| | | | +--^--+ +----+ +---+ | | | | | | | |
+| | | | +--------------+ r7 +--+ F <--+ <------+ | | |
+| | | | +----+ +---+ +----------+ | | +----------+ | |
+| | | | | | | |
+| | | +------------------------------------------------------+ +-------------------+ |
+| | | |
++---------+ +-----------------------------------------------------------------------------------------------+
+```
--
2.13.1
next prev parent reply other threads:[~2018-01-23 0:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 0:28 [spp] [PATCH 01/28] doc: add setup guide ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 02/28] doc: add how_to_use.md ogawa.yasufumi
2018-01-23 0:28 ` ogawa.yasufumi [this message]
2018-01-23 0:28 ` [spp] [PATCH 04/28] doc: add spp_vf.md ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 05/28] doc: revise spp_vf.md ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 06/28] doc: add config section ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 07/28] doc: update jp setup manual ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 08/28] doc: modify figure in spp_vf_overview ogawa.yasufumi
2018-01-23 0:28 ` [spp] [PATCH 09/28] doc: add sample usage ogawa.yasufumi
2018-02-01 11:57 ` [spp] [PATCH 01/28] doc: add setup guide Ferruh Yigit
Reply instructions:
You may reply publicly 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=20180123002854.28345-3-ogawa.yasufumi@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=nakamura.hioryuki@po.ntt-tx.co.jp \
--cc=spp@dpdk.org \
--cc=takada.naoki@lab.ntt.co.jp \
--cc=x-fn-spp@sl.ntt-tx.co.jp \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).