5 #ifndef __INCLUDE_RTE_ETH_SOFTNIC_INTERNALS_H__ 6 #define __INCLUDE_RTE_ETH_SOFTNIC_INTERNALS_H__ 15 #include "rte_eth_softnic.h" 64 #ifndef DEFAULT_BURST_SIZE 65 #define DEFAULT_BURST_SIZE 32 68 #ifndef FLUSH_COUNT_THRESHOLD 69 #define FLUSH_COUNT_THRESHOLD (1 << 17) 72 struct default_internals {
83 #ifndef TM_MAX_SUBPORTS 84 #define TM_MAX_SUBPORTS 8 87 #ifndef TM_MAX_PIPES_PER_SUBPORT 88 #define TM_MAX_PIPES_PER_SUBPORT 4096 94 struct rte_sched_subport_params subport_params[TM_MAX_SUBPORTS];
96 struct rte_sched_pipe_params
98 uint32_t n_pipe_profiles;
99 uint32_t pipe_to_profile[TM_MAX_SUBPORTS * TM_MAX_PIPES_PER_SUBPORT];
104 TM_NODE_LEVEL_PORT = 0,
105 TM_NODE_LEVEL_SUBPORT,
113 struct tm_shaper_profile {
114 TAILQ_ENTRY(tm_shaper_profile) node;
115 uint32_t shaper_profile_id;
120 TAILQ_HEAD(tm_shaper_profile_list, tm_shaper_profile);
123 struct tm_shared_shaper {
124 TAILQ_ENTRY(tm_shared_shaper) node;
125 uint32_t shared_shaper_id;
127 uint32_t shaper_profile_id;
130 TAILQ_HEAD(tm_shared_shaper_list, tm_shared_shaper);
133 struct tm_wred_profile {
134 TAILQ_ENTRY(tm_wred_profile) node;
135 uint32_t wred_profile_id;
140 TAILQ_HEAD(tm_wred_profile_list, tm_wred_profile);
144 TAILQ_ENTRY(tm_node) node;
146 uint32_t parent_node_id;
150 struct tm_node *parent_node;
151 struct tm_shaper_profile *shaper_profile;
152 struct tm_wred_profile *wred_profile;
161 struct tm_hierarchy {
162 struct tm_shaper_profile_list shaper_profiles;
163 struct tm_shared_shaper_list shared_shapers;
164 struct tm_wred_profile_list wred_profiles;
165 struct tm_node_list nodes;
167 uint32_t n_shaper_profiles;
168 uint32_t n_shared_shapers;
169 uint32_t n_wred_profiles;
172 uint32_t n_tm_nodes[TM_NODE_LEVEL_MAX];
175 struct tm_internals {
183 struct tm_hierarchy h;
184 int hierarchy_frozen;
187 struct tm_params params;
190 struct rte_sched_port *sched;
193 uint32_t pkts_enq_len;
195 uint32_t flush_count;
207 struct default_internals
def;
208 struct tm_internals
tm;
217 struct pmd_rx_queue {
221 uint16_t rx_queue_id;
228 extern const struct rte_tm_ops pmd_tm_ops;
231 tm_params_check(
struct pmd_params *params, uint32_t hard_rate);
234 tm_init(
struct pmd_internals *p,
struct pmd_params *params,
int numa_node);
246 tm_enabled(
struct rte_eth_dev *dev)
250 return (p->
params.soft.flags & PMD_FEATURE_TM);
254 tm_used(
struct rte_eth_dev *dev)
258 return (p->
params.soft.flags & PMD_FEATURE_TM) &&
259 p->
soft.
tm.h.n_tm_nodes[TM_NODE_LEVEL_PORT];
TAILQ_HEAD(rte_bus_list, rte_bus)
struct pmd_internals::@8 hard
#define RTE_SCHED_PIPE_PROFILES_PER_PORT
struct pmd_internals::@7 soft
struct default_internals def
#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE