[
    "meter: 02_DSCP_REMARK_01_PKTPS_01_1000",
    {
        "description":"2000pktps(ethernet/ipv4(dscp=18)/tcp)-->'in_port=1,actions=meter:1000pktps(dscp_remark:ip_dscp=20),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=72)",
                            "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":20
                                        }
                                    }
                                ]
                            },
                            "pktps":1000
                        },
                        {
                            "OFPMatch":{
                                "oxm_fields":[
                                    {
                                        "OXMTlv":{
                                            "field":"in_port",
                                            "value":2
                                        }
                                    },
                                    {
                                        "OXMTlv":{
                                            "field":"eth_type",
                                            "value":2048
                                        }
                                    },
                                    {
                                        "OXMTlv":{
                                            "field":"ip_dscp",
                                            "value":18
                                        }
                                    }
                                ]
                            },
                            "pktps":1000
                        }
                    ]
                }
            }
        ]
    },
    {
        "description":"2000pktps(ethernet/ipv6(dscp=18)/tcp)-->'in_port=1,actions=meter:1000pktps(dscp_remark:ip_dscp=20),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=72)",
                            "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":20
                                        }
                                    }
                                ]
                            },
                            "pktps":1000
                        },
                        {
                            "OFPMatch":{
                                "oxm_fields":[
                                    {
                                        "OXMTlv":{
                                            "field":"in_port",
                                            "value":2
                                        }
                                    },
                                    {
                                        "OXMTlv":{
                                            "field":"eth_type",
                                            "value":34525
                                        }
                                    },
                                    {
                                        "OXMTlv":{
                                            "field":"ip_dscp",
                                            "value":18
                                        }
                                    }
                                ]
                            },
                            "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
                        }
                    ]
                }
            }
        ]
    }
]
