| 55 | } |
| 56 | |
| 57 | void |
| 58 | ice_tm_conf_uninit(struct rte_eth_dev *dev) |
| 59 | { |
| 60 | struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); |
| 61 | struct ice_tm_shaper_profile *shaper_profile; |
| 62 | struct ice_tm_node *tm_node; |
| 63 | |
| 64 | /* clear profile */ |
| 65 | while ((shaper_profile = TAILQ_FIRST(&pf->tm_conf.shaper_profile_list))) { |
| 66 | TAILQ_REMOVE(&pf->tm_conf.shaper_profile_list, shaper_profile, node); |
| 67 | rte_free(shaper_profile); |
| 68 | } |
| 69 | |
| 70 | /* clear node configuration */ |
| 71 | while ((tm_node = TAILQ_FIRST(&pf->tm_conf.queue_list))) { |
| 72 | TAILQ_REMOVE(&pf->tm_conf.queue_list, tm_node, node); |
| 73 | rte_free(tm_node); |
| 74 | } |
| 75 | pf->tm_conf.nb_queue_node = 0; |
| 76 | while ((tm_node = TAILQ_FIRST(&pf->tm_conf.qgroup_list))) { |
| 77 | TAILQ_REMOVE(&pf->tm_conf.qgroup_list, tm_node, node); |
| 78 | rte_free(tm_node); |
| 79 | } |
| 80 | pf->tm_conf.nb_qgroup_node = 0; |
| 81 | while ((tm_node = TAILQ_FIRST(&pf->tm_conf.vsi_list))) { |
| 82 | TAILQ_REMOVE(&pf->tm_conf.vsi_list, tm_node, node); |
| 83 | rte_free(tm_node); |
| 84 | } |
| 85 | pf->tm_conf.nb_vsi_node = 0; |
| 86 | while ((tm_node = TAILQ_FIRST(&pf->tm_conf.tc_list))) { |
| 87 | TAILQ_REMOVE(&pf->tm_conf.tc_list, tm_node, node); |
| 88 | rte_free(tm_node); |
| 89 | } |
| 90 | pf->tm_conf.nb_tc_node = 0; |
| 91 | if (pf->tm_conf.root) { |
| 92 | rte_free(pf->tm_conf.root); |
| 93 | pf->tm_conf.root = NULL; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | static inline struct ice_tm_node * |
| 98 | ice_tm_node_search(struct rte_eth_dev *dev, |
no test coverage detected