The mlx5 PMD will support the rte_mtr APIs with type srTCM(IETF RFC 2697) color blind mode.
The metering flow will be composed of three flow tables, the prefix table, the metering table and the suffix table. packet ----> prefix table ----> metering table ----> suffix table The prefix table and suffix table divide the user defined flow actions as some of the actions only make sense after the metering and some need before the metering(mainly for the *_DECAP actions). The metering table validates the packet should pass or not and can be updated independently once the metering policy updating comes. The register with unique flow id for the packet will be used to match the prefix and suffix flow tables for one flow in case messing up with other flows sharing the same metering rule. The color of the packet also uses register match but will be the different register. For the prefix table, mainly two actions, reformat action set the unique flow id, metering action generate the color. packet ----> pattern match ----> user defined actions apply ----> set unique id ----> set color ----> metering table For the metering table, validate the color with the configured policy, send to the next table or dropped. packet ----> color match(drop not matched packet) ----> suffix table For the suffix table, apply the left actions if the id matches the prefix table reformat action has been set. packet ----> id match ----> user defined actions apply The APIs will be supported: rte_mtr_capabilities_get rte_mtr_meter_profile_add rte_mtr_meter_profile_delete rte_mtr_create rte_mtr_destroy rte_mtr_meter_disable rte_mtr_meter_enable rte_mtr_meter_profile_update rte_mtr_stats_update rte_mtr_stats_read The APIs will not be supported: rte_mtr_meter_dscp_table_update rte_mtr_policer_actions_update

