MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_tm_conf_uninit

Function ice_tm_conf_uninit

dpdk/drivers/net/ice/ice_tm.c:57–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void
58ice_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
97static inline struct ice_tm_node *
98ice_tm_node_search(struct rte_eth_dev *dev,

Callers 2

ice_dev_closeFunction · 0.85
ice_hierarchy_commitFunction · 0.85

Calls 1

rte_freeFunction · 0.85

Tested by

no test coverage detected