| 80 | } |
| 81 | |
| 82 | void |
| 83 | ixgbe_tm_conf_uninit(struct rte_eth_dev *dev) |
| 84 | { |
| 85 | struct ixgbe_tm_conf *tm_conf = |
| 86 | IXGBE_DEV_PRIVATE_TO_TM_CONF(dev->data->dev_private); |
| 87 | struct ixgbe_tm_shaper_profile *shaper_profile; |
| 88 | struct ixgbe_tm_node *tm_node; |
| 89 | |
| 90 | /* clear node configuration */ |
| 91 | while ((tm_node = TAILQ_FIRST(&tm_conf->queue_list))) { |
| 92 | TAILQ_REMOVE(&tm_conf->queue_list, tm_node, node); |
| 93 | rte_free(tm_node); |
| 94 | } |
| 95 | tm_conf->nb_queue_node = 0; |
| 96 | while ((tm_node = TAILQ_FIRST(&tm_conf->tc_list))) { |
| 97 | TAILQ_REMOVE(&tm_conf->tc_list, tm_node, node); |
| 98 | rte_free(tm_node); |
| 99 | } |
| 100 | tm_conf->nb_tc_node = 0; |
| 101 | if (tm_conf->root) { |
| 102 | rte_free(tm_conf->root); |
| 103 | tm_conf->root = NULL; |
| 104 | } |
| 105 | |
| 106 | /* Remove all shaper profiles */ |
| 107 | while ((shaper_profile = |
| 108 | TAILQ_FIRST(&tm_conf->shaper_profile_list))) { |
| 109 | TAILQ_REMOVE(&tm_conf->shaper_profile_list, |
| 110 | shaper_profile, node); |
| 111 | rte_free(shaper_profile); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | static inline uint8_t |
| 116 | ixgbe_tc_nb_get(struct rte_eth_dev *dev) |
no test coverage detected