summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuichi Ito <ito.yuichi0@gmail.com>2014-06-23 14:47:01 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-06-23 17:10:25 +0900
commitdd960c9c18d64e6b3f6581444cf09574493479e8 (patch)
treeaa3f1d430bbb7618e6de6b2c0b1a63609789f1f4
parent1319010d817c09768a9325b9984ca972ff5c164d (diff)
sw test tool: Add default test files (of14: meter)
These test files aim to examine 'meter instruction' of FlowMod message. This patch only copies ryu/tests/switch/of13/meter. Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_00_KBPS_00_1M.json257
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_00_KBPS_01_10M.json257
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_00_KBPS_02_100M.json257
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_00_100.json260
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_01_1000.json260
-rw-r--r--ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_02_10000.json260
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_00_1M.json334
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_01_10M.json334
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_02_100M.json334
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_00_100.json337
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_01_1000.json337
-rw-r--r--ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_02_10000.json337
12 files changed, 3564 insertions, 0 deletions
diff --git a/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_00_1M.json b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_00_1M.json
new file mode 100644
index 00000000..bcfb44fa
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_00_1M.json
@@ -0,0 +1,257 @@
+[
+ "meter: 01_DROP_00_KBPS_00_1M",
+ {
+ "description":"2Mbps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:1Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2Mbps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:1Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2Mbps(ethernet/arp)-->'in_port=1,actions=meter:1Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_01_10M.json b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_01_10M.json
new file mode 100644
index 00000000..5385ba13
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_01_10M.json
@@ -0,0 +1,257 @@
+[
+ "meter: 01_DROP_00_KBPS_01_10M",
+ {
+ "description":"20Mbps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:10Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20Mbps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:10Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20Mbps(ethernet/arp)-->'in_port=1,actions=meter:10Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_02_100M.json b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_02_100M.json
new file mode 100644
index 00000000..4c1b551d
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_00_KBPS_02_100M.json
@@ -0,0 +1,257 @@
+[
+ "meter: 01_DROP_00_KBPS_02_100M",
+ {
+ "description":"200Mbps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:100Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200Mbps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:100Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200Mbps(ethernet/arp)-->'in_port=1,actions=meter:100Mbps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_00_100.json b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_00_100.json
new file mode 100644
index 00000000..1ab9d086
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_00_100.json
@@ -0,0 +1,260 @@
+[
+ "meter: 01_DROP_01_PKTPS_00_100",
+ {
+ "description":"200pktps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:100pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":100
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200pktps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:100pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":100
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200pktps(ethernet/arp)-->'in_port=1,actions=meter:100pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":100
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":100
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_01_1000.json b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_01_1000.json
new file mode 100644
index 00000000..d67d89fd
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_01_1000.json
@@ -0,0 +1,260 @@
+[
+ "meter: 01_DROP_01_PKTPS_01_1000",
+ {
+ "description":"2000pktps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:1000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2000pktps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:1000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2000pktps(ethernet/arp)-->'in_port=1,actions=meter:1000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":1000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_02_10000.json b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_02_10000.json
new file mode 100644
index 00000000..a2dfc47c
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/01_DROP_01_PKTPS_02_10000.json
@@ -0,0 +1,260 @@
+[
+ "meter: 01_DROP_01_PKTPS_02_10000",
+ {
+ "description":"20000pktps(ethernet/ipv4/tcp)-->'in_port=1,actions=meter:10000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20000pktps(ethernet/ipv6/tcp)-->'in_port=1,actions=meter:10000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20000pktps(ethernet/arp)-->'in_port=1,actions=meter:10000pktps(drop),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDrop":{
+ "rate":10000
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_00_1M.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_00_1M.json
new file mode 100644
index 00000000..c3e5fe21
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_00_1M.json
@@ -0,0 +1,334 @@
+[
+ "meter: 02_DSCP_REMARK_00_KBPS_00_1M",
+ {
+ "description":"2Mbps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:1Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2Mbps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:1Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2Mbps(ethernet/arp)-->'in_port=1,actions=meter:2Mbps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":175,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":2000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_01_10M.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_01_10M.json
new file mode 100644
index 00000000..5bf32c02
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_01_10M.json
@@ -0,0 +1,334 @@
+[
+ "meter: 02_DSCP_REMARK_00_KBPS_01_10M",
+ {
+ "description":"20Mbps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:10Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20Mbps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:10Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20Mbps(ethernet/arp)-->'in_port=1,actions=meter:20Mbps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":20000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_02_100M.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_02_100M.json
new file mode 100644
index 00000000..67326205
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_00_KBPS_02_100M.json
@@ -0,0 +1,334 @@
+[
+ "meter: 02_DSCP_REMARK_00_KBPS_02_100M",
+ {
+ "description":"200Mbps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:100Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200Mbps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:100Mbps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "kbps":100000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200Mbps(ethernet/arp)-->'in_port=1,actions=meter:200Mbps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":17500,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":200000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_00_100.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_00_100.json
new file mode 100644
index 00000000..131c73f2
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_00_100.json
@@ -0,0 +1,337 @@
+[
+ "meter: 02_DSCP_REMARK_01_PKTPS_00_100",
+ {
+ "description":"200pktps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:100pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":100
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":100
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200pktps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:100pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":100
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":100
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"200pktps(ethernet/arp)-->'in_port=1,actions=meter:200pktps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":100,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":200,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":200
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_01_1000.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_01_1000.json
new file mode 100644
index 00000000..b3008eaf
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_01_1000.json
@@ -0,0 +1,337 @@
+[
+ "meter: 02_DSCP_REMARK_01_PKTPS_01_1000",
+ {
+ "description":"2000pktps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:1000pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2000pktps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:1000pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":1000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"2000pktps(ethernet/arp)-->'in_port=1,actions=meter:2000pktps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":1000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":2000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":2000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]
diff --git a/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_02_10000.json b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_02_10000.json
new file mode 100644
index 00000000..ff4dee40
--- /dev/null
+++ b/ryu/tests/switch/of14/meter/02_DSCP_REMARK_01_PKTPS_02_10000.json
@@ -0,0 +1,337 @@
+[
+ "meter: 02_DSCP_REMARK_01_PKTPS_02_10000",
+ {
+ "description":"20000pktps(ethernet/ipv4(dscp=24)/tcp)-->'in_port=1,actions=meter:10000pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
+ "ipv4(proto=6, tos=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 54))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":2048
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20000pktps(ethernet/ipv6(dscp=24)/tcp)-->'in_port=1,actions=meter:10000pktps(dscp_remark:ip_dscp=16),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
+ "ipv6(nxt=6, traffic_class=96)",
+ "tcp()",
+ "str('\\x11' * (1500 - 74))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":24
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ },
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"eth_type",
+ "value":34525
+ }
+ },
+ {
+ "OXMTlv":{
+ "field":"ip_dscp",
+ "value":16
+ }
+ }
+ ]
+ },
+ "pktps":10000
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "description":"20000pktps(ethernet/arp)-->'in_port=1,actions=meter:20000pktps(dscp_remark:prec_level=1),output:2'",
+ "prerequisite":[
+ {
+ "OFPMeterMod":{
+ "flags":2,
+ "meter_id":1,
+ "bands":[
+ {
+ "OFPMeterBandDscpRemark":{
+ "rate":10000,
+ "prec_level":1
+ }
+ }
+ ]
+ }
+ },
+ {
+ "OFPFlowMod":{
+ "match":{
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":1
+ }
+ }
+ ]
+ }
+ },
+ "instructions":[
+ {
+ "OFPInstructionMeter":{
+ "meter_id":1
+ }
+ },
+ {
+ "OFPInstructionActions":{
+ "actions":[
+ {
+ "OFPActionOutput":{
+ "port":2
+ }
+ }
+ ],
+ "type":4
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "tests":[
+ {
+ "ingress":{
+ "packets":{
+ "data":[
+ "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
+ "arp(dst_mac='22:22:22:22:22:22', src_mac='12:11:11:11:11:11')",
+ "str('\\x11' * (1500 - 42))"
+ ],
+ "pktps":20000,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "pktps":20000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]