Lines Matching refs:pool
48 dp_tx_initialize_threshold(struct dp_tx_desc_pool_s *pool, in dp_tx_initialize_threshold() argument
54 pool->start_th[DP_TH_BE_BK] = (start_threshold in dp_tx_initialize_threshold()
56 pool->stop_th[DP_TH_BE_BK] = (stop_threshold in dp_tx_initialize_threshold()
60 pool->start_th[DP_TH_VI] = (pool->start_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
62 pool->stop_th[DP_TH_VI] = (pool->stop_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
66 pool->start_th[DP_TH_VO] = (pool->start_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
68 pool->stop_th[DP_TH_VO] = (pool->stop_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
72 pool->start_th[DP_TH_HI] = (pool->start_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
74 pool->stop_th[DP_TH_HI] = (pool->stop_th[DP_TH_BE_BK] in dp_tx_initialize_threshold()
88 dp_tx_flow_pool_reattach(struct dp_tx_desc_pool_s *pool) in dp_tx_flow_pool_reattach() argument
92 __func__, pool->pool_create_cnt); in dp_tx_flow_pool_reattach()
94 pool->status = FLOW_POOL_ACTIVE_UNPAUSED_REATTACH; in dp_tx_flow_pool_reattach()
95 pool->pool_create_cnt++; in dp_tx_flow_pool_reattach()
105 dp_tx_flow_pool_dump_threshold(struct dp_tx_desc_pool_s *pool) in dp_tx_flow_pool_dump_threshold() argument
112 i, pool->start_th[i], pool->stop_th[i]); in dp_tx_flow_pool_dump_threshold()
115 i, pool->max_pause_time[i]); in dp_tx_flow_pool_dump_threshold()
118 i, pool->latest_pause_time[i]); in dp_tx_flow_pool_dump_threshold()
132 struct dp_tx_desc_pool_s *pool, in dp_tx_flow_ctrl_reset_subqueues() argument
137 soc->pause_cb(pool->flow_pool_id, in dp_tx_flow_ctrl_reset_subqueues()
143 soc->pause_cb(pool->flow_pool_id, in dp_tx_flow_ctrl_reset_subqueues()
149 soc->pause_cb(pool->flow_pool_id, in dp_tx_flow_ctrl_reset_subqueues()
155 soc->pause_cb(pool->flow_pool_id, in dp_tx_flow_ctrl_reset_subqueues()
166 dp_tx_initialize_threshold(struct dp_tx_desc_pool_s *pool, in dp_tx_initialize_threshold() argument
173 pool->start_th = (start_threshold * flow_pool_size) / 100; in dp_tx_initialize_threshold()
174 pool->stop_th = (stop_threshold * flow_pool_size) / 100; in dp_tx_initialize_threshold()
178 dp_tx_flow_pool_reattach(struct dp_tx_desc_pool_s *pool) in dp_tx_flow_pool_reattach() argument
182 __func__, pool->pool_create_cnt); in dp_tx_flow_pool_reattach()
183 if (pool->avail_desc > pool->start_th) in dp_tx_flow_pool_reattach()
184 pool->status = FLOW_POOL_ACTIVE_UNPAUSED; in dp_tx_flow_pool_reattach()
186 pool->status = FLOW_POOL_ACTIVE_PAUSED; in dp_tx_flow_pool_reattach()
188 pool->pool_create_cnt++; in dp_tx_flow_pool_reattach()
192 dp_tx_flow_pool_dump_threshold(struct dp_tx_desc_pool_s *pool) in dp_tx_flow_pool_dump_threshold() argument
196 pool->start_th, pool->stop_th); in dp_tx_flow_pool_dump_threshold()
201 struct dp_tx_desc_pool_s *pool, in dp_tx_flow_ctrl_reset_subqueues() argument
212 struct dp_tx_desc_pool_s *pool = NULL; in dp_tx_dump_flow_pool_info() local
231 pool = &soc->tx_desc[i]; in dp_tx_dump_flow_pool_info()
232 if (pool->status > FLOW_POOL_INVALID) in dp_tx_dump_flow_pool_info()
234 qdf_spin_lock_bh(&pool->flow_pool_lock); in dp_tx_dump_flow_pool_info()
235 qdf_mem_copy(&tmp_pool, pool, sizeof(tmp_pool)); in dp_tx_dump_flow_pool_info()
236 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_dump_flow_pool_info()
260 struct dp_tx_desc_pool_s *pool = NULL; in dp_tx_dump_flow_pool_info_compact() local
279 pool = &soc->tx_desc[i]; in dp_tx_dump_flow_pool_info_compact()
280 if (pool->status > FLOW_POOL_INVALID) in dp_tx_dump_flow_pool_info_compact()
286 pool->flow_pool_id, pool->status, in dp_tx_dump_flow_pool_info_compact()
287 pool->pool_size, pool->avail_desc, in dp_tx_dump_flow_pool_info_compact()
288 pool->pkt_drop_no_desc); in dp_tx_dump_flow_pool_info_compact()
326 struct dp_tx_desc_pool_s *pool; in dp_tx_create_flow_pool() local
334 pool = &soc->tx_desc[flow_pool_id]; in dp_tx_create_flow_pool()
335 qdf_spin_lock_bh(&pool->flow_pool_lock); in dp_tx_create_flow_pool()
336 if ((pool->status != FLOW_POOL_INACTIVE) || pool->pool_create_cnt) { in dp_tx_create_flow_pool()
337 dp_tx_flow_pool_reattach(pool); in dp_tx_create_flow_pool()
338 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_create_flow_pool()
340 pool->status, pool->pool_create_cnt); in dp_tx_create_flow_pool()
341 return pool; in dp_tx_create_flow_pool()
345 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_create_flow_pool()
353 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_create_flow_pool()
363 pool->flow_pool_id = flow_pool_id; in dp_tx_create_flow_pool()
364 pool->pool_size = flow_pool_size; in dp_tx_create_flow_pool()
365 pool->avail_desc = flow_pool_size; in dp_tx_create_flow_pool()
366 pool->status = FLOW_POOL_ACTIVE_UNPAUSED; in dp_tx_create_flow_pool()
367 dp_tx_initialize_threshold(pool, start_threshold, stop_threshold, in dp_tx_create_flow_pool()
369 pool->pool_create_cnt++; in dp_tx_create_flow_pool()
371 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_create_flow_pool()
373 return pool; in dp_tx_create_flow_pool()
438 int dp_tx_delete_flow_pool(struct dp_soc *soc, struct dp_tx_desc_pool_s *pool, in dp_tx_delete_flow_pool() argument
444 if (!soc || !pool) { in dp_tx_delete_flow_pool()
451 pool->flow_pool_id, pool->pool_create_cnt, pool->avail_desc, in dp_tx_delete_flow_pool()
452 pool->pool_size, pool->status); in dp_tx_delete_flow_pool()
454 if (!dp_is_tx_flow_pool_delete_allowed(soc, pool->flow_pool_id)) { in dp_tx_delete_flow_pool()
456 pool->flow_pool_id); in dp_tx_delete_flow_pool()
460 qdf_spin_lock_bh(&pool->flow_pool_lock); in dp_tx_delete_flow_pool()
461 if (!pool->pool_create_cnt) { in dp_tx_delete_flow_pool()
462 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_delete_flow_pool()
466 pool->pool_create_cnt--; in dp_tx_delete_flow_pool()
467 if (pool->pool_create_cnt) { in dp_tx_delete_flow_pool()
468 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_delete_flow_pool()
470 pool->pool_create_cnt); in dp_tx_delete_flow_pool()
474 if (pool->avail_desc < pool->pool_size) { in dp_tx_delete_flow_pool()
475 pool_status = pool->status; in dp_tx_delete_flow_pool()
476 pool->status = FLOW_POOL_INVALID; in dp_tx_delete_flow_pool()
477 dp_tx_flow_ctrl_reset_subqueues(soc, pool, pool_status); in dp_tx_delete_flow_pool()
479 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_delete_flow_pool()
481 vdev = dp_vdev_get_ref_by_id(soc, pool->flow_pool_id, in dp_tx_delete_flow_pool()
493 dp_tx_desc_pool_deinit(soc, pool->flow_pool_id, false); in dp_tx_delete_flow_pool()
494 dp_tx_desc_pool_free(soc, pool->flow_pool_id, false); in dp_tx_delete_flow_pool()
495 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_delete_flow_pool()
508 struct dp_tx_desc_pool_s *pool, uint8_t vdev_id) in dp_tx_flow_pool_vdev_map() argument
521 vdev->pool = pool; in dp_tx_flow_pool_vdev_map()
522 qdf_spin_lock_bh(&pool->flow_pool_lock); in dp_tx_flow_pool_vdev_map()
523 pool->pool_owner_ctx = soc; in dp_tx_flow_pool_vdev_map()
524 pool->flow_pool_id = vdev_id; in dp_tx_flow_pool_vdev_map()
525 qdf_spin_unlock_bh(&pool->flow_pool_lock); in dp_tx_flow_pool_vdev_map()
538 struct dp_tx_desc_pool_s *pool, uint8_t vdev_id) in dp_tx_flow_pool_vdev_unmap() argument
551 vdev->pool = NULL; in dp_tx_flow_pool_vdev_unmap()
572 struct dp_tx_desc_pool_s *pool; in dp_tx_flow_pool_map_handler() local
585 pool = dp_tx_create_flow_pool(soc, flow_pool_id, in dp_tx_flow_pool_map_handler()
587 if (!pool) { in dp_tx_flow_pool_map_handler()
596 dp_tx_flow_pool_vdev_map(pdev, pool, flow_id); in dp_tx_flow_pool_map_handler()
622 struct dp_tx_desc_pool_s *pool; in dp_tx_flow_pool_unmap_handler() local
634 pool = &soc->tx_desc[flow_pool_id]; in dp_tx_flow_pool_unmap_handler()
635 dp_info("pool status: %d", pool->status); in dp_tx_flow_pool_unmap_handler()
637 if (pool->status == FLOW_POOL_INACTIVE) { in dp_tx_flow_pool_unmap_handler()
646 dp_tx_flow_pool_vdev_unmap(pdev, pool, flow_id); in dp_tx_flow_pool_unmap_handler()
656 dp_tx_delete_flow_pool(soc, pool, false); in dp_tx_flow_pool_unmap_handler()