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

Function rte_pie_enqueue

dpdk/lib/sched/rte_pie.h:324–338  ·  view source on GitHub ↗

* @brief Decides if new packet should be enqueued or dropped * Updates run time data and gives verdict whether to enqueue or drop the packet. * * @param pie_cfg [in] config pointer to a PIE configuration parameter structure * @param pie [in,out] data pointer to PIE runtime data * @param qlen [in] queue length * @param pkt_len [in] packet length in bytes * @param time [in] current time stamp

Source from the content-addressed store, hash-verified

322 * @retval 1 drop the packet based on drop probability criteria
323 */
324static inline int
325rte_pie_enqueue(const struct rte_pie_config *pie_cfg,
326 struct rte_pie *pie,
327 const unsigned int qlen,
328 uint32_t pkt_len,
329 const uint64_t time)
330{
331 RTE_ASSERT(pie_cfg != NULL);
332 RTE_ASSERT(pie != NULL);
333
334 if (qlen != 0)
335 return rte_pie_enqueue_nonempty(pie_cfg, pie, pkt_len, time);
336 else
337 return rte_pie_enqueue_empty(pie_cfg, pie, pkt_len);
338}
339
340/**
341 * @brief PIE rate estimation method

Callers 4

rte_sched_port_cman_dropFunction · 0.85
increase_qsizeFunction · 0.85
enqueue_dequeue_funcFunction · 0.85
enqueue_dequeue_perfFunction · 0.85

Calls 2

rte_pie_enqueue_nonemptyFunction · 0.85
rte_pie_enqueue_emptyFunction · 0.85

Tested by 3

increase_qsizeFunction · 0.68
enqueue_dequeue_funcFunction · 0.68
enqueue_dequeue_perfFunction · 0.68