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

Function i40e_res_pool_destroy

dpdk/drivers/net/i40e/i40e_ethdev.c:4946–4973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4944}
4945
4946static void
4947i40e_res_pool_destroy(struct i40e_res_pool_info *pool)
4948{
4949 struct pool_entry *entry, *next_entry;
4950
4951 if (pool == NULL)
4952 return;
4953
4954 for (entry = LIST_FIRST(&pool->alloc_list);
4955 entry && (next_entry = LIST_NEXT(entry, next), 1);
4956 entry = next_entry) {
4957 LIST_REMOVE(entry, next);
4958 rte_free(entry);
4959 }
4960
4961 for (entry = LIST_FIRST(&pool->free_list);
4962 entry && (next_entry = LIST_NEXT(entry, next), 1);
4963 entry = next_entry) {
4964 LIST_REMOVE(entry, next);
4965 rte_free(entry);
4966 }
4967
4968 pool->num_free = 0;
4969 pool->num_alloc = 0;
4970 pool->base = 0;
4971 LIST_INIT(&pool->alloc_list);
4972 LIST_INIT(&pool->free_list);
4973}
4974
4975static int
4976i40e_res_pool_free(struct i40e_res_pool_info *pool,

Callers 2

eth_i40e_dev_initFunction · 0.85
i40e_dev_closeFunction · 0.85

Calls 1

rte_freeFunction · 0.85

Tested by

no test coverage detected