1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
9 GREEN = RTE_COLOR_GREEN,
10 YELLOW = RTE_COLOR_YELLOW,
15 /* Policy implemented as a static structure. 8< */
16 enum policer_action policer_table[RTE_COLORS][RTE_COLORS] =
22 /* >8 End of policy implemented as a static structure. */
24 #if APP_MODE == APP_MODE_FWD
26 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
36 #define FUNC_CONFIG(a, b) 0
37 #define FLOW_METER int
38 #define PROFILE app_srtcm_profile
40 #elif APP_MODE == APP_MODE_SRTCM_COLOR_BLIND
42 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
43 rte_meter_srtcm_color_blind_check(m, p, time, pkt_len)
44 #define FUNC_CONFIG rte_meter_srtcm_config
45 #define FLOW_METER struct rte_meter_srtcm
46 #define PROFILE app_srtcm_profile
48 #elif (APP_MODE == APP_MODE_SRTCM_COLOR_AWARE)
50 #define FUNC_METER rte_meter_srtcm_color_aware_check
51 #define FUNC_CONFIG rte_meter_srtcm_config
52 #define FLOW_METER struct rte_meter_srtcm
53 #define PROFILE app_srtcm_profile
55 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_BLIND)
57 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
58 rte_meter_trtcm_color_blind_check(m, p, time, pkt_len)
59 #define FUNC_CONFIG rte_meter_trtcm_config
60 #define FLOW_METER struct rte_meter_trtcm
61 #define PROFILE app_trtcm_profile
63 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_AWARE)
65 #define FUNC_METER rte_meter_trtcm_color_aware_check
66 #define FUNC_CONFIG rte_meter_trtcm_config
67 #define FLOW_METER struct rte_meter_trtcm
68 #define PROFILE app_trtcm_profile
71 #error Invalid value for APP_MODE