5#ifndef __RTE_PIE_H_INCLUDED__
6#define __RTE_PIE_H_INCLUDED__
19#include <rte_compat.h>
24#define RTE_DQ_THRESHOLD 16384
27#define RTE_DQ_WEIGHT 0.25
28#define RTE_ALPHA 0.125
30#define RTE_RAND_MAX ~0LLU
102 const uint16_t qdelay_ref,
103 const uint16_t dp_update_interval,
104 const uint16_t max_burst,
105 const uint16_t tailq_th);
126 RTE_ASSERT(pkt_len != 0);
155 struct rte_pie *pie, uint64_t time)
164 double p =
RTE_ALPHA * (current_qdelay - qdelay_ref) +
168 p = p * 0.00048828125;
185 double qdelay = qdelay_ref * 0.5;
188 if ((
double)current_qdelay < qdelay && pie->qdelay_old < qdelay)
337 const unsigned int qlen,
341 RTE_ASSERT(pie_cfg != NULL);
342 RTE_ASSERT(pie != NULL);
int __rte_experimental rte_pie_config_init(struct rte_pie_config *pie_cfg, const uint16_t qdelay_ref, const uint16_t dp_update_interval, const uint16_t max_burst, const uint16_t tailq_th)
Configures a single PIE configuration parameter structure.
static void __rte_experimental rte_pie_dequeue(struct rte_pie *pie, uint32_t pkt_len, uint64_t time)
PIE rate estimation method Called on each packet departure.
static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie, uint32_t pkt_len)
Decides packet enqueue when queue is empty.
static int __rte_experimental rte_pie_enqueue(const struct rte_pie_config *pie_cfg, struct rte_pie *pie, const unsigned int qlen, uint32_t pkt_len, const uint64_t time)
Decides if new packet should be enqueued or dropped Updates run time data and gives verdict whether t...
static void __rte_experimental _calc_drop_probability(const struct rte_pie_config *pie_cfg, struct rte_pie *pie, uint64_t time)
make a decision to drop or enqueue a packet based on probability criteria
static int __rte_experimental rte_pie_enqueue_nonempty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie, uint32_t pkt_len, const uint64_t time)
Decides if new packet should be enqueued or dropped for non-empty queue.
static int __rte_experimental _rte_pie_drop(const struct rte_pie_config *pie_cfg, struct rte_pie *pie)
make a decision to drop or enqueue a packet based on probability criteria
int __rte_experimental rte_pie_rt_data_init(struct rte_pie *pie)
Initialises run-time data.
__rte_experimental double rte_drand(void)
uint64_t dp_update_interval
uint16_t dp_update_interval
uint32_t departed_bytes_count
uint64_t last_measurement
uint64_t start_measurement