| rte_sched.h(3) | Library Functions Manual | rte_sched.h(3) |
rte_sched.h
#include <rte_mbuf.h>
#include <rte_meter.h>
#include 'rte_red.h'
#include 'rte_pie.h'
struct rte_sched_subport_stats
struct rte_sched_queue_stats
struct rte_sched_port_params
#define RTE_SCHED_QUEUES_PER_PIPE 16
#define RTE_SCHED_BE_QUEUES_PER_PIPE 4
#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE
(RTE_SCHED_QUEUES_PER_PIPE - RTE_SCHED_BE_QUEUES_PER_PIPE + 1)
#define RTE_SCHED_TRAFFIC_CLASS_BE
(RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE - 1)
enum rte_sched_cman_mode { RTE_SCHED_CMAN_RED,
RTE_SCHED_CMAN_PIE }
struct rte_sched_port * rte_sched_port_config (struct
rte_sched_port_params *params)
void rte_sched_port_free (struct rte_sched_port *port)
int rte_sched_subport_pipe_profile_add (struct rte_sched_port *port,
uint32_t subport_id, struct rte_sched_pipe_params *params, uint32_t
*pipe_profile_id)
int rte_sched_port_subport_profile_add (struct rte_sched_port *port,
struct rte_sched_subport_profile_params *profile, uint32_t
*subport_profile_id)
int rte_sched_subport_config (struct rte_sched_port *port, uint32_t
subport_id, struct rte_sched_subport_params *params, uint32_t
subport_profile_id)
int rte_sched_pipe_config (struct rte_sched_port *port, uint32_t
subport_id, uint32_t pipe_id, int32_t pipe_profile)
uint32_t rte_sched_port_get_memory_footprint (struct
rte_sched_port_params *port_params, struct rte_sched_subport_params
**subport_params)
int rte_sched_subport_read_stats (struct rte_sched_port *port, uint32_t
subport_id, struct rte_sched_subport_stats *stats, uint32_t *tc_ov)
int rte_sched_queue_read_stats (struct rte_sched_port *port, uint32_t
queue_id, struct rte_sched_queue_stats *stats, uint16_t *qlen)
void rte_sched_port_pkt_write (struct rte_sched_port *port, struct
rte_mbuf *pkt, uint32_t subport, uint32_t pipe, uint32_t
traffic_class, uint32_t queue, enum rte_color color)
void rte_sched_port_pkt_read_tree_path (struct rte_sched_port *port,
const struct rte_mbuf *pkt, uint32_t *subport, uint32_t *pipe,
uint32_t *traffic_class, uint32_t *queue)
int rte_sched_port_enqueue (struct rte_sched_port *port, struct
rte_mbuf **pkts, uint32_t n_pkts)
int rte_sched_port_dequeue (struct rte_sched_port *port, struct
rte_mbuf **pkts, uint32_t n_pkts)
int rte_sched_subport_tc_ov_config (struct rte_sched_port *port,
uint32_t subport_id, bool tc_ov_enable)
RTE Hierarchical Scheduler
The hierarchical scheduler prioritizes the transmission of packets from different users and traffic classes according to the Service Level Agreements (SLAs) defined for the current network node.
The scheduler supports thousands of packet queues grouped under a 5-level hierarchy:
Definition in file rte_sched.h.
Congestion Management Maximum number of queues per pipe. Note that the multiple queues (power of 2) can only be assigned to lowest priority (best-effort) traffic class. Other higher priority traffic classes can only have one queue. Can not change.
See also
Definition at line 73 of file rte_sched.h.
Number of WRR queues for best-effort traffic class per pipe.
See also
Definition at line 79 of file rte_sched.h.
Number of traffic classes per pipe (as well as subport).
See also
struct rte_sched_pipe_params
Definition at line 85 of file rte_sched.h.
Best-effort traffic class ID Can not change.
Definition at line 91 of file rte_sched.h.
Congestion Management (CMAN) mode
This is used for controlling the admission of packets into a packet queue or group of packet queues on congestion.
The Random Early Detection (RED) algorithm works by proactively dropping more and more input packets as the queue occupancy builds up. When the queue is full or almost full, RED effectively works as tail drop. The Weighted RED algorithm uses a separate set of RED thresholds for each packet color.
Similar to RED, Proportional Integral Controller Enhanced (PIE) randomly drops a packet at the onset of the congestion and tries to control the latency around the target value. The congestion detection, however, is based on the queueing latency instead of the queue length like RED. For more information, refer RFC8033.
Enumerator
Definition at line 126 of file rte_sched.h.
Hierarchical scheduler port configuration
Parameters
Returns
Hierarchical scheduler port free
Parameters
Hierarchical scheduler pipe profile add
Parameters
Returns
Hierarchical scheduler subport bandwidth profile add Note that this function is safe to use in runtime for adding new subport bandwidth profile as it doesn't have any impact on hierarchical structure of the scheduler.
Parameters
Returns
Hierarchical scheduler subport configuration Note that this function is safe to use at runtime to configure subport bandwidth profile.
Parameters
Returns
Hierarchical scheduler pipe configuration
Parameters
Returns
Hierarchical scheduler memory footprint size per port
Parameters
Returns
Hierarchical scheduler subport statistics read
Parameters
Returns
Hierarchical scheduler queue statistics read
Parameters
Returns
Scheduler hierarchy path write to packet descriptor. Typically called by the packet classification stage.
Parameters
Scheduler hierarchy path read from packet descriptor (struct rte_mbuf). Typically called as part of the hierarchical scheduler enqueue operation. The subport, pipe, traffic class and queue parameters need to be pre-allocated by the caller.
Parameters
Hierarchical scheduler port enqueue. Writes up to n_pkts to port scheduler and returns the number of packets actually written. For each packet, the port scheduler queue to write the packet to is identified by reading the hierarchy path from the packet descriptor; if the queue is full or congested and the packet is not written to the queue, then the packet is automatically dropped without any action required from the caller.
Parameters
Returns
Hierarchical scheduler port dequeue. Reads up to n_pkts from the port scheduler and stores them in the pkts array and returns the number of packets actually read. The pkts array needs to be pre-allocated by the caller with at least n_pkts entries.
Parameters
Returns
Hierarchical scheduler subport traffic class oversubscription enable/disable. This function should be called at the time of subport initialization.
Parameters
Returns
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |