--- /dev/null
+[
+ "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()",
+ "bytes(b'\\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()",
+ "bytes(b'\\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')",
+ "bytes(b'\\x11' * (1500 - 42))"
+ ],
+ "pktps":1750,
+ "duration_time":30
+ }
+ },
+ "egress":{
+ "throughput":[
+ {
+ "OFPMatch":{
+ "oxm_fields":[
+ {
+ "OXMTlv":{
+ "field":"in_port",
+ "value":2
+ }
+ }
+ ]
+ },
+ "kbps":10000
+ }
+ ]
+ }
+ }
+ ]
+ }
+]