summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>2019-09-10 10:32:28 +0900
committerYasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>2019-09-10 18:11:59 +0900
commit867abf108dfe1aac855d8e30cc7b8bb6aac6a224 (patch)
tree2049be03427f38899a17028814b46533b5da17a0
parent10849407630116d629d30058f84bcaf7edadcc69 (diff)
downloadspp-867abf108dfe1aac855d8e30cc7b8bb6aac6a224.zip
spp-867abf108dfe1aac855d8e30cc7b8bb6aac6a224.tar.gz
spp-867abf108dfe1aac855d8e30cc7b8bb6aac6a224.tar.xz
recipes: add spp_vf usecases
This patch is to provide recipe scripts for usecase of spp_vf "Classify ICMP Packets". Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp> Signed-off-by: Naoki Takada <ntakada14@gmail.com> Acked-by: Yasufumi Ogawa <yasufum.o@gmail.com>
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/1_start_comp.rcps5
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/2_add_ports.rcps15
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/3_reg_mac.rcps3
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/4_del_mac.rcps3
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/5_del_ports.rcps15
-rw-r--r--recipes/usecases/spp_vf/classify_icmp/6_stop_comp.rcps8
6 files changed, 49 insertions, 0 deletions
diff --git a/recipes/usecases/spp_vf/classify_icmp/1_start_comp.rcps b/recipes/usecases/spp_vf/classify_icmp/1_start_comp.rcps
new file mode 100644
index 0000000..273805e
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/1_start_comp.rcps
@@ -0,0 +1,5 @@
+# Start components
+vf 1; component start cls 3 classifier
+vf 1; component start fwd1 4 forward
+vf 1; component start fwd2 5 forward
+vf 1; component start mgr 6 merge
diff --git a/recipes/usecases/spp_vf/classify_icmp/2_add_ports.rcps b/recipes/usecases/spp_vf/classify_icmp/2_add_ports.rcps
new file mode 100644
index 0000000..e2960f6
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/2_add_ports.rcps
@@ -0,0 +1,15 @@
+# Configures classifier
+vf 1; port add phy:0 rx cls
+vf 1; port add ring:0 tx cls
+vf 1; port add ring:1 tx cls
+
+# Configures forwarders
+vf 1; port add ring:0 rx fwd1
+vf 1; port add ring:2 tx fwd1
+vf 1; port add ring:1 rx fwd2
+vf 1; port add ring:3 tx fwd2
+
+# Configures merger
+vf 1; port add ring:2 rx mgr
+vf 1; port add ring:3 rx mgr
+vf 1; port add phy:1 tx mgr
diff --git a/recipes/usecases/spp_vf/classify_icmp/3_reg_mac.rcps b/recipes/usecases/spp_vf/classify_icmp/3_reg_mac.rcps
new file mode 100644
index 0000000..6f5de7b
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/3_reg_mac.rcps
@@ -0,0 +1,3 @@
+# Register MAC address to classifier
+vf 1; classifier_table add mac 52:54:00:12:34:56 ring:0
+vf 1; classifier_table add mac 52:54:00:12:34:58 ring:1
diff --git a/recipes/usecases/spp_vf/classify_icmp/4_del_mac.rcps b/recipes/usecases/spp_vf/classify_icmp/4_del_mac.rcps
new file mode 100644
index 0000000..54c0446
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/4_del_mac.rcps
@@ -0,0 +1,3 @@
+# Delete MAC addresses from table
+vf 1; classifier_table del mac 52:54:00:12:34:56 ring:0
+vf 1; classifier_table del mac 52:54:00:12:34:58 ring:1
diff --git a/recipes/usecases/spp_vf/classify_icmp/5_del_ports.rcps b/recipes/usecases/spp_vf/classify_icmp/5_del_ports.rcps
new file mode 100644
index 0000000..2f2ff5b
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/5_del_ports.rcps
@@ -0,0 +1,15 @@
+# Delete ports classifier
+vf 1; port del phy:0 rx cls
+vf 1; port del ring:0 tx cls
+vf 1; port del ring:1 tx cls
+
+# Delete ports forwarders
+vf 1; port del ring:0 rx fwd1
+vf 1; port del ring:2 tx fwd1
+vf 1; port del ring:1 rx fwd2
+vf 1; port del ring:3 tx fwd2
+
+# Delete ports merger
+vf 1; port del ring:2 rx mgr
+vf 1; port del ring:3 rx mgr
+vf 1; port del phy:1 tx mgr
diff --git a/recipes/usecases/spp_vf/classify_icmp/6_stop_comp.rcps b/recipes/usecases/spp_vf/classify_icmp/6_stop_comp.rcps
new file mode 100644
index 0000000..24aae4c
--- /dev/null
+++ b/recipes/usecases/spp_vf/classify_icmp/6_stop_comp.rcps
@@ -0,0 +1,8 @@
+# Stop component
+vf 1; component stop cls
+vf 1; component stop fwd1
+vf 1; component stop fwd2
+vf 1; component stop mgr
+
+# exit spp_vf
+vf 1; exit