DPDK 25.03.0-rc0
|
#include <rte_tm.h>
Data Fields | |
uint32_t | shaper_profile_id |
uint32_t * | shared_shaper_id |
uint32_t | n_shared_shapers |
uint64_t | stats_mask |
int * | wfq_weight_mode |
uint32_t | n_sp_priorities |
struct { | |
int * wfq_weight_mode | |
uint32_t n_sp_priorities | |
} | nonleaf |
enum rte_tm_cman_mode | cman |
uint32_t | wred_profile_id |
uint32_t * | shared_wred_context_id |
uint32_t | n_shared_wred_contexts |
struct { | |
uint32_t wred_profile_id | |
uint32_t * shared_wred_context_id | |
uint32_t n_shared_wred_contexts | |
} | wred |
struct { | |
enum rte_tm_cman_mode cman | |
struct { | |
uint32_t wred_profile_id | |
uint32_t * shared_wred_context_id | |
uint32_t n_shared_wred_contexts | |
} wred | |
} | leaf |
Node parameters
Each non-leaf node has multiple inputs (its children nodes) and single output (which is input to its parent node). It arbitrates its inputs using Strict Priority (SP) and Weighted Fair Queuing (WFQ) algorithms to schedule input packets to its output while observing its shaping (rate limiting) constraints.
Algorithms such as Weighted Round Robin (WRR), Byte-level WRR, Deficit WRR (DWRR), etc. are considered approximations of the WFQ ideal and are assimilated to WFQ, although an associated implementation-dependent trade-off on accuracy, performance and resource usage might exist.
Children nodes with different priorities are scheduled using the SP algorithm based on their priority, with zero (0) as the highest priority. Children with the same priority are scheduled using the WFQ algorithm according to their weights. The WFQ weight of a given child node is relative to the sum of the weights of all its sibling nodes that have the same priority, with one (1) as the lowest weight. For each SP priority, the WFQ weight mode can be set as either byte-based or packet-based.
Each leaf node sits on top of a Tx queue of the current Ethernet port. Hence, the leaf nodes are predefined, with their node IDs set to 0 .. (N-1), where N is the number of Tx queues configured for the current Ethernet port. The non-leaf nodes have their IDs generated by the application.
uint32_t shaper_profile_id |
uint32_t* shared_shaper_id |
uint32_t n_shared_shapers |
int* wfq_weight_mode |
WFQ weight mode for each SP priority. When NULL, it indicates that WFQ is to be used for all priorities. When non-NULL, it points to a pre-allocated array of n_sp_priorities values, with non-zero value for byte-mode and zero for packet-mode.
struct { ... } nonleaf |
Parameters only valid for non-leaf nodes.
enum rte_tm_cman_mode cman |
uint32_t wred_profile_id |
uint32_t* shared_wred_context_id |
uint32_t n_shared_wred_contexts |
struct { ... } wred |
WRED parameters (only valid when cman is set to WRED).
struct { ... } leaf |
Parameters only valid for leaf nodes.
uint64_t stats_mask |
Mask of statistics counter types to be enabled for this node. This needs to be a subset of the statistics counter types available for the current node. Any statistics counter type not included in this set is to be disabled for the current node.