extern "C" {
#endif
-/* New rte_color is defined and used to deprecate rte_mtr_color soon. */
-#define rte_mtr_color rte_color
-#define RTE_MTR_GREEN RTE_COLOR_GREEN
-#define RTE_MTR_YELLOW RTE_COLOR_YELLOW
-#define RTE_MTR_RED RTE_COLOR_RED
-#define RTE_MTR_COLORS RTE_COLORS
-
/**
* Statistics counter type
*/
*/
struct rte_mtr_stats {
/** Number of packets passed by the policer (per color). */
- uint64_t n_pkts[RTE_MTR_COLORS];
+ uint64_t n_pkts[RTE_COLORS];
/** Number of bytes passed by the policer (per color). */
- uint64_t n_bytes[RTE_MTR_COLORS];
+ uint64_t n_bytes[RTE_COLORS];
/** Number of packets dropped by the policer. */
uint64_t n_pkts_dropped;
* at least one yellow or red color element, then the color aware mode
* is configured.
*/
- enum rte_mtr_color *dscp_table;
+ enum rte_color *dscp_table;
/** Non-zero to enable the meter, zero to disable the meter at the time
* of MTR object creation. Ignored when the meter profile indicated by
int meter_enable;
/** Policer actions (per meter output color). */
- enum rte_mtr_policer_action action[RTE_MTR_COLORS];
+ enum rte_mtr_policer_action action[RTE_COLORS];
/** Set of stats counters to be enabled.
* @see enum rte_mtr_stats_type
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_capabilities_get(uint16_t port_id,
struct rte_mtr_capabilities *cap,
struct rte_mtr_error *error);
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_profile_add(uint16_t port_id,
uint32_t meter_profile_id,
struct rte_mtr_meter_profile *profile,
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_profile_delete(uint16_t port_id,
uint32_t meter_profile_id,
struct rte_mtr_error *error);
*
* @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_create(uint16_t port_id,
uint32_t mtr_id,
struct rte_mtr_params *params,
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_destroy(uint16_t port_id,
uint32_t mtr_id,
struct rte_mtr_error *error);
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_disable(uint16_t port_id,
uint32_t mtr_id,
struct rte_mtr_error *error);
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_enable(uint16_t port_id,
uint32_t mtr_id,
struct rte_mtr_error *error);
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_profile_update(uint16_t port_id,
uint32_t mtr_id,
uint32_t meter_profile_id,
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_meter_dscp_table_update(uint16_t port_id,
uint32_t mtr_id,
- enum rte_mtr_color *dscp_table,
+ enum rte_color *dscp_table,
struct rte_mtr_error *error);
/**
* @return
* 0 on success, non-zero error code otherwise.
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_policer_actions_update(uint16_t port_id,
uint32_t mtr_id,
uint32_t action_mask,
*
* @see enum rte_mtr_stats_type
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_stats_update(uint16_t port_id,
uint32_t mtr_id,
uint64_t stats_mask,
*
* @see enum rte_mtr_stats_type
*/
-int __rte_experimental
+__rte_experimental
+int
rte_mtr_stats_read(uint16_t port_id,
uint32_t mtr_id,
struct rte_mtr_stats *stats,