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 enum policer_action policer_table[RTE_COLORS][RTE_COLORS] =
22 #if APP_MODE == APP_MODE_FWD
24 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
34 #define FUNC_CONFIG(a, b) 0
35 #define FLOW_METER int
36 #define PROFILE app_srtcm_profile
38 #elif APP_MODE == APP_MODE_SRTCM_COLOR_BLIND
40 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
41 rte_meter_srtcm_color_blind_check(m, p, time, pkt_len)
42 #define FUNC_CONFIG rte_meter_srtcm_config
43 #define FLOW_METER struct rte_meter_srtcm
44 #define PROFILE app_srtcm_profile
46 #elif (APP_MODE == APP_MODE_SRTCM_COLOR_AWARE)
48 #define FUNC_METER rte_meter_srtcm_color_aware_check
49 #define FUNC_CONFIG rte_meter_srtcm_config
50 #define FLOW_METER struct rte_meter_srtcm
51 #define PROFILE app_srtcm_profile
53 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_BLIND)
55 #define FUNC_METER(m, p, time, pkt_len, pkt_color) \
56 rte_meter_trtcm_color_blind_check(m, p, time, pkt_len)
57 #define FUNC_CONFIG rte_meter_trtcm_config
58 #define FLOW_METER struct rte_meter_trtcm
59 #define PROFILE app_trtcm_profile
61 #elif (APP_MODE == APP_MODE_TRTCM_COLOR_AWARE)
63 #define FUNC_METER rte_meter_trtcm_color_aware_check
64 #define FUNC_CONFIG rte_meter_trtcm_config
65 #define FLOW_METER struct rte_meter_trtcm
66 #define PROFILE app_trtcm_profile
69 #error Invalid value for APP_MODE