Lines Matching refs:tx_desc_pool

52 dp_tx_desc_pool_counter_initialize(struct dp_tx_desc_pool_s *tx_desc_pool,  in dp_tx_desc_pool_counter_initialize()  argument
58 dp_tx_desc_pool_counter_initialize(struct dp_tx_desc_pool_s *tx_desc_pool, in dp_tx_desc_pool_counter_initialize() argument
61 tx_desc_pool->elem_count = num_elem; in dp_tx_desc_pool_counter_initialize()
62 tx_desc_pool->num_free = num_elem; in dp_tx_desc_pool_counter_initialize()
63 tx_desc_pool->num_allocated = 0; in dp_tx_desc_pool_counter_initialize()
102 struct dp_tx_desc_pool_s *tx_desc_pool = NULL; in dp_tx_desc_pool_cleanup() local
109 tx_desc_pool = dp_get_tx_desc_pool(soc, i); in dp_tx_desc_pool_cleanup()
111 TX_DESC_LOCK_LOCK(&tx_desc_pool->lock); in dp_tx_desc_pool_cleanup()
112 if (tx_desc_pool) in dp_tx_desc_pool_cleanup()
114 &tx_desc_pool->desc_pages, in dp_tx_desc_pool_cleanup()
115 tx_desc_pool->elem_size, in dp_tx_desc_pool_cleanup()
116 tx_desc_pool->elem_count, in dp_tx_desc_pool_cleanup()
120 TX_DESC_LOCK_UNLOCK(&tx_desc_pool->lock); in dp_tx_desc_pool_cleanup()
122 tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, i); in dp_tx_desc_pool_cleanup()
123 TX_DESC_LOCK_LOCK(&tx_desc_pool->lock); in dp_tx_desc_pool_cleanup()
125 if (tx_desc_pool) in dp_tx_desc_pool_cleanup()
127 &tx_desc_pool->desc_pages, in dp_tx_desc_pool_cleanup()
128 tx_desc_pool->elem_size, in dp_tx_desc_pool_cleanup()
129 tx_desc_pool->elem_count, in dp_tx_desc_pool_cleanup()
133 TX_DESC_LOCK_UNLOCK(&tx_desc_pool->lock); in dp_tx_desc_pool_cleanup()
191 struct dp_tx_desc_pool_s *tx_desc_pool; in dp_tx_desc_pool_alloc() local
199 tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_alloc()
203 tx_desc_pool = dp_get_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_alloc()
208 tx_desc_pool->desc_pages.page_size = DP_BLOCKMEM_SIZE; in dp_tx_desc_pool_alloc()
210 &tx_desc_pool->desc_pages, in dp_tx_desc_pool_alloc()
214 if (!tx_desc_pool->desc_pages.num_pages) { in dp_tx_desc_pool_alloc()
232 struct dp_tx_desc_pool_s *tx_desc_pool; in dp_tx_desc_pool_free() local
236 tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_free()
239 tx_desc_pool = dp_get_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_free()
243 if (tx_desc_pool->desc_pages.num_pages) in dp_tx_desc_pool_free()
245 &tx_desc_pool->desc_pages, 0, in dp_tx_desc_pool_free()
256 struct dp_tx_desc_pool_s *tx_desc_pool = NULL; in dp_tx_desc_pool_init() local
262 tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_init()
265 tx_desc_pool = dp_get_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_init()
269 &tx_desc_pool->desc_pages, in dp_tx_desc_pool_init()
275 tx_desc_pool->freelist = (struct dp_tx_desc_s *) in dp_tx_desc_pool_init()
276 *tx_desc_pool->desc_pages.cacheable_pages; in dp_tx_desc_pool_init()
285 tx_desc_pool->elem_size = DP_TX_DESC_SIZE(sizeof(struct dp_tx_desc_s)); in dp_tx_desc_pool_init()
287 dp_tx_desc_pool_counter_initialize(tx_desc_pool, num_elem_t); in dp_tx_desc_pool_init()
288 TX_DESC_LOCK_CREATE(&tx_desc_pool->lock); in dp_tx_desc_pool_init()
296 struct dp_tx_desc_pool_s *tx_desc_pool; in dp_tx_desc_pool_deinit() local
299 tx_desc_pool = dp_get_spcl_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_deinit()
301 tx_desc_pool = dp_get_tx_desc_pool(soc, pool_id); in dp_tx_desc_pool_deinit()
302 soc->arch_ops.dp_tx_desc_pool_deinit(soc, tx_desc_pool, in dp_tx_desc_pool_deinit()
304 TX_DESC_POOL_MEMBER_CLEAN(tx_desc_pool); in dp_tx_desc_pool_deinit()
305 TX_DESC_LOCK_DESTROY(&tx_desc_pool->lock); in dp_tx_desc_pool_deinit()