5 #ifndef __INCLUDE_RTE_SCHED_H__ 6 #define __INCLUDE_RTE_SCHED_H__ 58 #include <rte_compat.h> 74 #define RTE_SCHED_QUEUES_PER_PIPE 16 80 #define RTE_SCHED_BE_QUEUES_PER_PIPE 4 86 #define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE \ 87 (RTE_SCHED_QUEUES_PER_PIPE - RTE_SCHED_BE_QUEUES_PER_PIPE + 1) 92 #define RTE_SCHED_TRAFFIC_CLASS_BE (RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE - 1) 106 #ifndef RTE_SCHED_FRAME_OVERHEAD_DEFAULT 107 #define RTE_SCHED_FRAME_OVERHEAD_DEFAULT 24 141 struct rte_sched_pipe_params {
155 uint8_t tc_ov_weight;
164 struct rte_sched_cman_params {
170 struct rte_red_params red_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
173 struct rte_pie_params pie_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
186 struct rte_sched_subport_params {
193 uint32_t n_pipes_per_subport_enabled;
204 struct rte_sched_pipe_params *pipe_profiles;
207 uint32_t n_pipe_profiles;
210 uint32_t n_max_pipe_profiles;
216 struct rte_sched_cman_params *cman_params;
219 struct rte_sched_subport_profile_params {
322 struct rte_sched_port *
352 struct rte_sched_pipe_params *params,
353 uint32_t *pipe_profile_id);
375 struct rte_sched_subport_profile_params *profile,
376 uint32_t *subport_profile_id);
399 struct rte_sched_subport_params *params,
400 uint32_t subport_profile_id);
420 int32_t pipe_profile);
434 struct rte_sched_subport_params **subport_params);
508 uint32_t subport, uint32_t pipe, uint32_t traffic_class,
534 uint32_t *subport, uint32_t *pipe,
535 uint32_t *traffic_class, uint32_t *queue);
538 rte_sched_port_pkt_read_color(
const struct rte_mbuf *pkt);
uint32_t n_subports_per_port
uint64_t n_pkts_cman_dropped
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)
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)
uint32_t n_subport_profiles
int rte_sched_port_dequeue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint32_t n_pkts)
__rte_experimental int rte_sched_subport_tc_ov_config(struct rte_sched_port *port, uint32_t subport_id, bool tc_ov_enable)
#define RTE_SCHED_BE_QUEUES_PER_PIPE
int rte_sched_port_enqueue(struct rte_sched_port *port, struct rte_mbuf **pkts, uint32_t n_pkts)
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)
struct rte_sched_subport_profile_params * subport_profiles
uint32_t rte_sched_port_get_memory_footprint(struct rte_sched_port_params *port_params, struct rte_sched_subport_params **subport_params)
__rte_experimental 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_pipe_profile_add(struct rte_sched_port *port, uint32_t subport_id, struct rte_sched_pipe_params *params, uint32_t *pipe_profile_id)
struct rte_sched_port * rte_sched_port_config(struct rte_sched_port_params *params)
uint32_t n_max_subport_profiles
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)
#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE
uint32_t n_pipes_per_subport
int rte_sched_pipe_config(struct rte_sched_port *port, uint32_t subport_id, uint32_t pipe_id, int32_t pipe_profile)