time = rte_get_tsc_cycles() + hz;
if (rte_meter_srtcm_color_blind_check(
&sm, &sp, time, TM_TEST_SRTCM_CBS_DF - 1)
- != e_RTE_METER_GREEN)
+ != RTE_COLOR_GREEN)
melog(SRTCM_BLIND_CHECK_MSG" GREEN");
/* Test yellow */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_srtcm_color_blind_check(
&sm, &sp, time, TM_TEST_SRTCM_CBS_DF + 1)
- != e_RTE_METER_YELLOW)
+ != RTE_COLOR_YELLOW)
melog(SRTCM_BLIND_CHECK_MSG" YELLOW");
if (rte_meter_srtcm_profile_config(&sp, &sparams) != 0)
melog(SRTCM_BLIND_CHECK_MSG);
time = rte_get_tsc_cycles() + hz;
if (rte_meter_srtcm_color_blind_check(
- &sm, &sp, time, (uint32_t)sp.ebs - 1) != e_RTE_METER_YELLOW)
+ &sm, &sp, time, (uint32_t)sp.ebs - 1) != RTE_COLOR_YELLOW)
melog(SRTCM_BLIND_CHECK_MSG" YELLOW");
/* Test red */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_srtcm_color_blind_check(
&sm, &sp, time, TM_TEST_SRTCM_EBS_DF + 1)
- != e_RTE_METER_RED)
+ != RTE_COLOR_RED)
melog(SRTCM_BLIND_CHECK_MSG" RED");
return 0;
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_CBS_DF - 1)
- != e_RTE_METER_GREEN)
+ != RTE_COLOR_GREEN)
melog(TRTCM_BLIND_CHECK_MSG" GREEN");
/* Test yellow */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_CBS_DF + 1)
- != e_RTE_METER_YELLOW)
+ != RTE_COLOR_YELLOW)
melog(TRTCM_BLIND_CHECK_MSG" YELLOW");
if (rte_meter_trtcm_profile_config(&tp, &tparams) != 0)
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_PBS_DF - 1)
- != e_RTE_METER_YELLOW)
+ != RTE_COLOR_YELLOW)
melog(TRTCM_BLIND_CHECK_MSG" YELLOW");
/* Test red */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_PBS_DF + 1)
- != e_RTE_METER_RED)
+ != RTE_COLOR_RED)
melog(TRTCM_BLIND_CHECK_MSG" RED");
return 0;
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_rfc4115_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_CBS_DF - 1)
- != e_RTE_METER_GREEN)
+ != RTE_COLOR_GREEN)
melog(TRTCM_RFC4115_BLIND_CHECK_MSG" GREEN");
/* Test yellow */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_rfc4115_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_CBS_DF + 1)
- != e_RTE_METER_YELLOW)
+ != RTE_COLOR_YELLOW)
melog(TRTCM_RFC4115_BLIND_CHECK_MSG" YELLOW");
if (rte_meter_trtcm_rfc4115_profile_config(&tp, &rfc4115params) != 0)
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_rfc4115_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_EBS_DF - 1)
- != e_RTE_METER_YELLOW)
+ != RTE_COLOR_YELLOW)
melog(TRTCM_RFC4115_BLIND_CHECK_MSG" YELLOW");
/* Test red */
time = rte_get_tsc_cycles() + hz;
if (rte_meter_trtcm_rfc4115_color_blind_check(
&tm, &tp, time, TM_TEST_TRTCM_EBS_DF + 1)
- != e_RTE_METER_RED)
+ != RTE_COLOR_RED)
melog(TRTCM_RFC4115_BLIND_CHECK_MSG" RED");
return 0;
static inline int
tm_test_srtcm_aware_check
-(enum rte_meter_color in[4], enum rte_meter_color out[4])
+(enum rte_color in[4], enum rte_color out[4])
{
#define SRTCM_AWARE_CHECK_MSG "srtcm_aware_check"
struct rte_meter_srtcm_profile sp;
static inline int
tm_test_srtcm_color_aware_check(void)
{
- enum rte_meter_color in[4], out[4];
+ enum rte_color in[4], out[4];
/**
* test 4 points that will produce green, yellow, yellow, red flag
*/
/* previouly have a green, test points should keep unchanged */
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_GREEN;
- out[0] = e_RTE_METER_GREEN;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
+ out[0] = RTE_COLOR_GREEN;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_srtcm_aware_check(in, out) != 0)
return -1;
* previously have a yellow, green & yellow = yellow
* yellow & red = red
*/
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_YELLOW;
- out[0] = e_RTE_METER_YELLOW;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_YELLOW;
+ out[0] = RTE_COLOR_YELLOW;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_srtcm_aware_check(in, out) != 0)
return -1;
* previously have a red, red & green = red
* red & yellow = red
*/
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_RED;
- out[0] = e_RTE_METER_RED;
- out[1] = e_RTE_METER_RED;
- out[2] = e_RTE_METER_RED;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_RED;
+ out[0] = RTE_COLOR_RED;
+ out[1] = RTE_COLOR_RED;
+ out[2] = RTE_COLOR_RED;
+ out[3] = RTE_COLOR_RED;
if (tm_test_srtcm_aware_check(in, out) != 0)
return -1;
*/
static inline int
tm_test_trtcm_aware_check
-(enum rte_meter_color in[4], enum rte_meter_color out[4])
+(enum rte_color in[4], enum rte_color out[4])
{
#define TRTCM_AWARE_CHECK_MSG "trtcm_aware_check"
struct rte_meter_trtcm_profile tp;
static inline int
tm_test_trtcm_color_aware_check(void)
{
- enum rte_meter_color in[4], out[4];
+ enum rte_color in[4], out[4];
/**
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
*/
/* previouly have a green, test points should keep unchanged */
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_GREEN;
- out[0] = e_RTE_METER_GREEN;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
+ out[0] = RTE_COLOR_GREEN;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_aware_check(in, out) != 0)
return -1;
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_YELLOW;
- out[0] = e_RTE_METER_YELLOW;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_YELLOW;
+ out[0] = RTE_COLOR_YELLOW;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_aware_check(in, out) != 0)
return -1;
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_RED;
- out[0] = e_RTE_METER_RED;
- out[1] = e_RTE_METER_RED;
- out[2] = e_RTE_METER_RED;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_RED;
+ out[0] = RTE_COLOR_RED;
+ out[1] = RTE_COLOR_RED;
+ out[2] = RTE_COLOR_RED;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_aware_check(in, out) != 0)
return -1;
*/
static inline int
tm_test_trtcm_rfc4115_aware_check
-(enum rte_meter_color in[4], enum rte_meter_color out[4])
+(enum rte_color in[4], enum rte_color out[4])
{
#define TRTCM_RFC4115_AWARE_CHECK_MSG "trtcm_rfc4115_aware_check"
struct rte_meter_trtcm_rfc4115_profile tp;
static inline int
tm_test_trtcm_rfc4115_color_aware_check(void)
{
- enum rte_meter_color in[4], out[4];
+ enum rte_color in[4], out[4];
/**
* test 4 points that will produce green, yellow, yellow, red flag
* if using blind check
*/
/* previouly have a green, test points should keep unchanged */
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_GREEN;
- out[0] = e_RTE_METER_GREEN;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_GREEN;
+ out[0] = RTE_COLOR_GREEN;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_rfc4115_aware_check(in, out) != 0)
return -1;
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_YELLOW;
- out[0] = e_RTE_METER_YELLOW;
- out[1] = e_RTE_METER_YELLOW;
- out[2] = e_RTE_METER_YELLOW;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_YELLOW;
+ out[0] = RTE_COLOR_YELLOW;
+ out[1] = RTE_COLOR_YELLOW;
+ out[2] = RTE_COLOR_YELLOW;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_rfc4115_aware_check(in, out) != 0)
return -1;
- in[0] = in[1] = in[2] = in[3] = e_RTE_METER_RED;
- out[0] = e_RTE_METER_RED;
- out[1] = e_RTE_METER_RED;
- out[2] = e_RTE_METER_RED;
- out[3] = e_RTE_METER_RED;
+ in[0] = in[1] = in[2] = in[3] = RTE_COLOR_RED;
+ out[0] = RTE_COLOR_RED;
+ out[1] = RTE_COLOR_RED;
+ out[2] = RTE_COLOR_RED;
+ out[3] = RTE_COLOR_RED;
if (tm_test_trtcm_rfc4115_aware_check(in, out) != 0)
return -1;