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

Function rte_red_enqueue

dpdk/lib/sched/rte_red.h:374–388  ·  view source on GitHub ↗

* @brief Decides if new packet should be enqueued or dropped * Updates run time data based on new queue size value. * Based on new queue average and RED configuration parameters * gives verdict whether to enqueue or drop the packet. * * @param red_cfg [in] config pointer to a RED configuration parameter structure * @param red [in,out] data pointer to RED runtime data * @param q [in] updated

Source from the content-addressed store, hash-verified

372 * @retval 2 drop the packet based on mark probability criteria
373 */
374static inline int
375rte_red_enqueue(const struct rte_red_config *red_cfg,
376 struct rte_red *red,
377 const unsigned q,
378 const uint64_t time)
379{
380 RTE_ASSERT(red_cfg != NULL);
381 RTE_ASSERT(red != NULL);
382
383 if (q != 0) {
384 return rte_red_enqueue_nonempty(red_cfg, red, q);
385 } else {
386 return rte_red_enqueue_empty(red_cfg, red, time);
387 }
388}
389
390/**
391 * @brief Callback to records time that queue became empty

Callers 10

rte_sched_port_cman_dropFunction · 0.85
increase_actual_qsizeFunction · 0.85
increase_average_qsizeFunction · 0.85
enqueue_dequeue_funcFunction · 0.85
func_test3Function · 0.85
func_test4Function · 0.85
func_test6Function · 0.85
enqueue_dequeue_perfFunction · 0.85
perf2_testFunction · 0.85
ovfl_test1Function · 0.85

Calls 2

rte_red_enqueue_nonemptyFunction · 0.85
rte_red_enqueue_emptyFunction · 0.85

Tested by 9

increase_actual_qsizeFunction · 0.68
increase_average_qsizeFunction · 0.68
enqueue_dequeue_funcFunction · 0.68
func_test3Function · 0.68
func_test4Function · 0.68
func_test6Function · 0.68
enqueue_dequeue_perfFunction · 0.68
perf2_testFunction · 0.68
ovfl_test1Function · 0.68