+/* Struct to store Traffic Manager node configuration. */
+struct iavf_tm_node {
+ TAILQ_ENTRY(iavf_tm_node) node;
+ uint32_t id;
+ uint32_t tc;
+ uint32_t priority;
+ uint32_t weight;
+ uint32_t reference_count;
+ struct iavf_tm_node *parent;
+ struct iavf_tm_shaper_profile *shaper_profile;
+ struct rte_tm_node_params params;
+};
+
+TAILQ_HEAD(iavf_tm_node_list, iavf_tm_node);
+
+struct iavf_tm_shaper_profile {
+ TAILQ_ENTRY(iavf_tm_shaper_profile) node;
+ uint32_t shaper_profile_id;
+ uint32_t reference_count;
+ struct rte_tm_shaper_params profile;
+};
+
+TAILQ_HEAD(iavf_shaper_profile_list, iavf_tm_shaper_profile);
+
+/* node type of Traffic Manager */
+enum iavf_tm_node_type {
+ IAVF_TM_NODE_TYPE_PORT,
+ IAVF_TM_NODE_TYPE_TC,
+ IAVF_TM_NODE_TYPE_QUEUE,
+ IAVF_TM_NODE_TYPE_MAX,
+};
+
+/* Struct to store all the Traffic Manager configuration. */
+struct iavf_tm_conf {
+ struct iavf_tm_node *root; /* root node - vf vsi */
+ struct iavf_tm_node_list tc_list; /* node list for all the TCs */
+ struct iavf_tm_node_list queue_list; /* node list for all the queues */
+ struct iavf_shaper_profile_list shaper_profile_list;
+ uint32_t nb_tc_node;
+ uint32_t nb_queue_node;
+ bool committed;
+};
+
+/* Struct to store queue TC mapping. Queue is continuous in one TC */
+struct iavf_qtc_map {
+ uint8_t tc;
+ uint16_t start_queue_id;
+ uint16_t queue_count;
+};
+