rte_pie.h(3)

πŸ’– rte_pie.h(3) πŸ’–

okay bestie, sit down, hydrate, because today we're reading the manual page for rte_pie.h β€” she's a DPDK header from the Library Functions Manual, and she's literally all about Proportional Integral controller Enhanced (PIE) 🌸.


✨ NAME ✨

rte_pie.h β€” bestie, that's the whole name. Iconic of her honestly. No extra words. Periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, you gotta pull in the girlies:

#include <stdint.h>
#include <rte_random.h>
#include <rte_debug.h>
#include <rte_cycles.h>

πŸŽ€ Data Structures

  • struct rte_pie_params
  • struct rte_pie_config
  • struct rte_pie

πŸŽ€ Macros

#define RTE_DQ_THRESHOLD   16384
#define RTE_DQ_WEIGHT   0.25
#define RTE_ALPHA   0.125
#define RTE_BETA   1.25
#define RTE_RAND_MAX   ~0LLU

πŸŽ€ Functions

  • int rte_pie_rt_data_init (struct rte_pie *pie) β€” Initialises run-time data.
  • int 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 int 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 void _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_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
  • static int 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_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 to enqueue or drop the packet.
  • static void rte_pie_dequeue (struct rte_pie *pie, uint32_t pkt_len, uint64_t time) β€” PIE rate estimation method Called on each packet departure.

🌈 DETAILED DESCRIPTION 🌈

Proportional Integral controller Enhanced (PIE)

She lives right there, defined in the file rte_pie.h. πŸ’–


πŸ‘‘ MACRO DEFINITION DOCUMENTATION πŸ‘‘

πŸ“ #define RTE_DQ_THRESHOLD 16384

Queue length threshold (2^14) to start measurement cycle (bytes).

Definition at line 23 of file rte_pie.h.


πŸ“ #define RTE_DQ_WEIGHT 0.25

Weight (RTE_DQ_THRESHOLD/2^16) to compute dequeue rate.

Definition at line 26 of file rte_pie.h.


πŸ“ #define RTE_ALPHA 0.125

Weights in drop probability calculations.

Definition at line 27 of file rte_pie.h.


πŸ“ #define RTE_BETA 1.25

Weights in drop probability calculations.

Definition at line 28 of file rte_pie.h.


πŸ“ #define RTE_RAND_MAX ~0LLU

Max value of the random number.

Definition at line 29 of file rte_pie.h.


πŸ’œ FUNCTION DOCUMENTATION πŸ’œ

🧚 int rte_pie_rt_data_init (struct rte_pie * pie)

Initialises run-time data. yes girl, set her up ✨

Parameters

  • pie [in,out] β€” data pointer to PIE runtime data

Returns

Operation status

Return values

  • 0 success
  • !0 error

🧚 int 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. glow-up time πŸ’…

Parameters

  • pie_cfg [in,out] β€” config pointer to a PIE configuration parameter structure
  • qdelay_ref [in] β€” latency target (milliseconds)
  • dp_update_interval [in] β€” update interval for drop probability (milliseconds)
  • max_burst [in] β€” maximum burst allowance (milliseconds)
  • tailq_th [in] β€” tail drop threshold for the queue (number of packets)

Returns

Operation status

Return values

  • 0 success
  • !0 error

🧚 int rte_pie_enqueue_empty (const struct rte_pie_config * pie_cfg, struct rte_pie * pie, uint32_t pkt_len) [static]

Decides packet enqueue when queue is empty. Note: packet is never dropped in this particular case. like, she simply wouldn't 😌

Parameters

  • pie_cfg [in] β€” config pointer to a PIE configuration parameter structure
  • pie [in, out] β€” data pointer to PIE runtime data
  • pkt_len [in] β€” packet length in bytes

Returns

Operation status

Return values

  • 0 enqueue the packet
  • !0 drop the packet

If the queue has been idle for a while, turn off PIE and Reset counters.

Definition at line 116 of file rte_pie.h.


🧚 void _calc_drop_probability (const struct rte_pie_config * pie_cfg, struct rte_pie * pie, uint64_t time) [static]

make a decision to drop or enqueue a packet based on probability criteria.

Parameters

  • pie_cfg [in] β€” config pointer to a PIE configuration parameter structure
  • pie [in, out] β€” data pointer to PIE runtime data
  • time [in] β€” current time (measured in cpu cycles)

Definition at line 147 of file rte_pie.h.


🧚 int _rte_pie_drop (const struct rte_pie_config * pie_cfg, struct rte_pie * pie) [inline], [static]

make a decision to drop or enqueue a packet based on probability criteria.

Parameters

  • pie_cfg [in] β€” config pointer to a PIE configuration parameter structure
  • pie [in, out] β€” data pointer to PIE runtime data

Returns

operation status

Return values

  • 0 enqueue the packet
  • 1 drop the packet

Definition at line 210 of file rte_pie.h.


🧚 int rte_pie_enqueue_nonempty (const struct rte_pie_config * pie_cfg, struct rte_pie * pie, uint32_t pkt_len, const uint64_t time) [inline], [static]

Decides if new packet should be enqueued or dropped for non-empty queue.

Parameters

  • pie_cfg [in] β€” config pointer to a PIE configuration parameter structure
  • pie [in,out] β€” data pointer to PIE runtime data
  • pkt_len [in] β€” packet length in bytes
  • time [in] β€” current time (measured in cpu cycles)

Returns

Operation status

Return values

  • 0 enqueue the packet
  • 1 drop the packet based on max threshold criterion
  • 2 drop the packet based on mark probability criterion

Definition at line 258 of file rte_pie.h.


🧚 int 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) [inline], [static]

Decides if new packet should be enqueued or dropped. Updates run time data and gives verdict whether to enqueue or drop the packet. the moment of truth fr fr πŸ”₯

Parameters

  • pie_cfg [in] β€” config pointer to a PIE configuration parameter structure
  • pie [in,out] β€” data pointer to PIE runtime data
  • qlen [in] β€” queue length
  • pkt_len [in] β€” packet length in bytes
  • time [in] β€” current time stamp (measured in cpu cycles)

Returns

Operation status

Return values

  • 0 enqueue the packet
  • 1 drop the packet based on drop probability criteria

Definition at line 325 of file rte_pie.h.


🧚 void rte_pie_dequeue (struct rte_pie * pie, uint32_t pkt_len, uint64_t time) [inline], [static]

PIE rate estimation method. Called on each packet departure. bye girl, it's been real πŸ‘‹

Parameters

  • pie [in] β€” data pointer to PIE runtime data
  • pkt_len [in] β€” packet length in bytes
  • time [in] β€” current time stamp in cpu cycles

Definition at line 349 of file rte_pie.h.


🫢 AUTHOR 🫢

Generated automatically by Doxygen for DPDK from the source code.

no cap, nobody hand-wrote this one β€” Doxygen did it for DPDK. she said "I'll take it from here" and slayed πŸ’…

alright bestie, that's the whole page 🌸 mwah. this was DPDK, Version 25.11.3, for rte_pie.h(3) β€” go forth and control your probabilities, you're doing amazing sweetie πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from