| 966 | }; |
| 967 | |
| 968 | static enum test_result func_test5(struct test_config *tcfg) |
| 969 | { |
| 970 | enum test_result result = PASS; |
| 971 | uint32_t j = 0; |
| 972 | |
| 973 | printf("%s", tcfg->msg); |
| 974 | |
| 975 | if (test_rte_red_init(tcfg) != PASS) { |
| 976 | result = FAIL; |
| 977 | goto out; |
| 978 | } |
| 979 | |
| 980 | printf("%s", tcfg->htxt); |
| 981 | |
| 982 | for (j = 0; j < tcfg->tqueue->num_queues; j++) { |
| 983 | rte_red_rt_data_init(&tcfg->tqueue->rdata[j]); |
| 984 | tcfg->tqueue->q[j] = 0; |
| 985 | |
| 986 | if (increase_actual_qsize(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]], |
| 987 | &tcfg->tqueue->rdata[j], |
| 988 | &tcfg->tqueue->q[j], |
| 989 | *tcfg->tlevel, |
| 990 | tcfg->tqueue->q_ramp_up) != 0) { |
| 991 | result = FAIL; |
| 992 | goto out; |
| 993 | } |
| 994 | |
| 995 | if (increase_average_qsize(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]], |
| 996 | &tcfg->tqueue->rdata[j], |
| 997 | &tcfg->tqueue->q[j], |
| 998 | *tcfg->tlevel, |
| 999 | tcfg->tqueue->avg_ramp_up) != 0) { |
| 1000 | result = FAIL; |
| 1001 | goto out; |
| 1002 | } |
| 1003 | } |
| 1004 | |
| 1005 | for (j = 0; j < tcfg->tqueue->num_queues; j++) { |
| 1006 | uint32_t avg = 0; |
| 1007 | double drop_rate = 0.0; |
| 1008 | double drop_prob = 0.0; |
| 1009 | double diff = 0.0; |
| 1010 | |
| 1011 | tcfg->tvar->dropped[j] = 0; |
| 1012 | tcfg->tvar->enqueued[j] = 0; |
| 1013 | |
| 1014 | enqueue_dequeue_func(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]], |
| 1015 | &tcfg->tqueue->rdata[j], |
| 1016 | &tcfg->tqueue->q[j], |
| 1017 | tcfg->tvar->num_ops, |
| 1018 | &tcfg->tvar->enqueued[j], |
| 1019 | &tcfg->tvar->dropped[j]); |
| 1020 | |
| 1021 | avg = rte_red_get_avg_int(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]], |
| 1022 | &tcfg->tqueue->rdata[j]); |
| 1023 | if (avg != *tcfg->tlevel) |
| 1024 | result = FAIL; |
| 1025 |
nothing calls this directly
no test coverage detected