MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_rte_red_init

Function test_rte_red_init

dpdk/app/test/test_red.c:274–296  ·  view source on GitHub ↗

* initialize the test rte_red config */

Source from the content-addressed store, hash-verified

272 * initialize the test rte_red config
273 */
274static enum test_result
275test_rte_red_init(struct test_config *tcfg)
276{
277 unsigned i = 0;
278
279 tcfg->tvar->clk_freq = rte_get_timer_hz();
280 init_port_ts( tcfg->tvar->clk_freq );
281
282 for (i = 0; i < tcfg->tconfig->num_cfg; i++) {
283 if (rte_red_config_init(&tcfg->tconfig->rconfig[i],
284 (uint16_t)tcfg->tconfig->wq_log2[i],
285 (uint16_t)tcfg->tconfig->min_th,
286 (uint16_t)tcfg->tconfig->max_th,
287 (uint16_t)tcfg->tconfig->maxp_inv[i]) != 0) {
288 return FAIL;
289 }
290 }
291
292 *tcfg->tqueue->q = 0;
293 *tcfg->tvar->dropped = 0;
294 *tcfg->tvar->enqueued = 0;
295 return PASS;
296}
297
298/**
299 * enqueue until actual queue size reaches target level

Callers 9

func_test1Function · 0.85
func_test2Function · 0.85
func_test3Function · 0.85
func_test4Function · 0.85
func_test5Function · 0.85
func_test6Function · 0.85
perf1_testFunction · 0.85
perf2_testFunction · 0.85
ovfl_test1Function · 0.85

Calls 2

rte_red_config_initFunction · 0.85
init_port_tsFunction · 0.70

Tested by

no test coverage detected