* initialize the test rte_pie config */
| 225 | * initialize the test rte_pie config |
| 226 | */ |
| 227 | static enum test_result |
| 228 | test_rte_pie_init(struct test_config *tcfg) |
| 229 | { |
| 230 | unsigned int i = 0; |
| 231 | |
| 232 | tcfg->tvar->clk_freq = rte_get_timer_hz(); |
| 233 | init_port_ts(tcfg->tvar->clk_freq); |
| 234 | |
| 235 | for (i = 0; i < tcfg->tconfig->num_cfg; i++) { |
| 236 | if (rte_pie_config_init(&tcfg->tconfig->pconfig[i], |
| 237 | (uint16_t)tcfg->tconfig->qdelay_ref, |
| 238 | (uint16_t)tcfg->tconfig->dp_update_interval[i], |
| 239 | (uint16_t)tcfg->tconfig->max_burst[i], |
| 240 | (uint16_t)tcfg->tconfig->tailq_th) != 0) { |
| 241 | return FAIL; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | *tcfg->tqueue->qlen = 0; |
| 246 | *tcfg->tvar->dropped = 0; |
| 247 | *tcfg->tvar->enqueued = 0; |
| 248 | |
| 249 | return PASS; |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * enqueue until actual queue size reaches target level |
no test coverage detected