1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
9 GREEN = e_RTE_METER_GREEN,
10 YELLOW = e_RTE_METER_YELLOW,
11 RED = e_RTE_METER_RED,
15 enum policer_action policer_table[e_RTE_METER_COLORS][e_RTE_METER_COLORS] =
22 #if APP_MODE == APP_MODE_FWD
24 #define FUNC_METER(a,b,c,d) color, flow_id=flow_id, pkt_len=pkt_len, time=time
25 #define FUNC_CONFIG(a, b) 0
26 #define PARAMS app_srtcm_params
27 #define FLOW_METER int
29 #elif APP_MODE == APP_MODE_SRTCM_COLOR_BLIND
31 #define FUNC_METER(a,b,c,d) rte_meter_srtcm_color_blind_check(a,b,c)
32 #define FUNC_CONFIG rte_meter_srtcm_config
33 #define PARAMS app_srtcm_params
34 #define FLOW_METER struct rte_meter_srtcm
36 #elif (APP_MODE == APP_MODE_SRTCM_COLOR_AWARE)
38 #define FUNC_METER rte_meter_srtcm_color_aware_check
39 #define FUNC_CONFIG rte_meter_srtcm_config
40 #define PARAMS app_srtcm_params
41 #define FLOW_METER struct rte_meter_srtcm
43 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_BLIND)
45 #define FUNC_METER(a,b,c,d) rte_meter_trtcm_color_blind_check(a,b,c)
46 #define FUNC_CONFIG rte_meter_trtcm_config
47 #define PARAMS app_trtcm_params
48 #define FLOW_METER struct rte_meter_trtcm
50 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_AWARE)
52 #define FUNC_METER rte_meter_trtcm_color_aware_check
53 #define FUNC_CONFIG rte_meter_trtcm_config
54 #define PARAMS app_trtcm_params
55 #define FLOW_METER struct rte_meter_trtcm
58 #error Invalid value for APP_MODE