34 #ifndef __INCLUDE_RTE_SCHED_H__
35 #define __INCLUDE_RTE_SCHED_H__
79 #include <sys/types.h>
89 #define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE 4
92 #define RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS 4
95 #define RTE_SCHED_QUEUES_PER_PIPE \
96 (RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE * \
97 RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS)
100 #ifndef RTE_SCHED_PIPE_PROFILES_PER_PORT
101 #define RTE_SCHED_PIPE_PROFILES_PER_PORT 256
111 #ifndef RTE_SCHED_FRAME_OVERHEAD_DEFAULT
112 #define RTE_SCHED_FRAME_OVERHEAD_DEFAULT 24
158 #ifdef RTE_SCHED_SUBPORT_TC_OV
159 uint8_t tc_ov_weight;
204 struct rte_sched_port_hierarchy {
206 uint32_t traffic_class:2;
210 } __attribute__ ((deprecated));
225 struct rte_sched_port *
272 int32_t pipe_profile);
352 uint32_t subport, uint32_t pipe, uint32_t traffic_class,
374 uint32_t *subport, uint32_t *pipe,
375 uint32_t *traffic_class, uint32_t *queue);
378 rte_sched_port_pkt_read_color(
const struct rte_mbuf *pkt);
void rte_sched_port_pkt_read_tree_path(const struct rte_mbuf *pkt, uint32_t *subport, uint32_t *pipe, uint32_t *traffic_class, uint32_t *queue)
void rte_sched_port_pkt_write(struct rte_mbuf *pkt, uint32_t subport, uint32_t pipe, uint32_t traffic_class, uint32_t queue, enum rte_meter_color color)
uint32_t n_bytes_tc_dropped[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
uint32_t n_subports_per_port
uint32_t tc_rate[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
uint32_t n_pkts_tc[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
int rte_sched_port_dequeue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint32_t n_pkts)
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
int rte_sched_port_enqueue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint32_t n_pkts)
uint32_t n_bytes_tc[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
struct rte_sched_port * rte_sched_port_config(struct rte_sched_port_params *params)
uint32_t rte_sched_port_get_memory_footprint(struct rte_sched_port_params *params)
uint8_t wrr_weights[RTE_SCHED_QUEUES_PER_PIPE]
#define RTE_SCHED_QUEUES_PER_PIPE
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)
void rte_sched_port_free(struct rte_sched_port *port)
int rte_sched_queue_read_stats(struct rte_sched_port *port, uint32_t queue_id, struct rte_sched_queue_stats *stats, uint16_t *qlen)
struct rte_sched_pipe_params * pipe_profiles
#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE
uint32_t n_pkts_tc_dropped[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
uint32_t n_pipes_per_subport
uint32_t tc_rate[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]
int rte_sched_pipe_config(struct rte_sched_port *port, uint32_t subport_id, uint32_t pipe_id, int32_t pipe_profile)
int rte_sched_subport_config(struct rte_sched_port *port, uint32_t subport_id, struct rte_sched_subport_params *params)