qcacmn: Allocate pdev attach bufs from page frag

Use page frag init time rx buffer allocation for efficient usage of memory.
Add ini dp_bufs_page_frag_allocs to disable and revert to original slab
nbuf allocations.

Change-Id: Iac78895addfe9da0118bc071c691a26216d6fda1
CRs-Fixed: 3553800
This commit is contained in:
Prakash Manjunathappa
2023-07-08 00:33:26 -07:00
committed by Rahul Choudhary
부모 02622819d0
커밋 fab64e0adc
4개의 변경된 파일49개의 추가작업 그리고 6개의 파일을 삭제

파일 보기

@@ -289,6 +289,8 @@ struct wlan_srng_cfg {
* pool support
* @is_rx_refill_buff_pool_enabled: flag to enable/disable RX refill buffer
* pool support
* @enable_dp_buf_page_frag_alloc: Flag to control DP allocation from page frag
* cache.
* @rx_refill_buff_pool_size: RX refill buffer pool size
* @rx_pending_high_threshold: threshold of starting pkt drop
* @rx_pending_low_threshold: threshold of stopping pkt drop
@@ -477,6 +479,7 @@ struct wlan_cfg_dp_soc_ctxt {
bool pext_stats_enabled;
bool is_rx_buff_pool_enabled;
bool is_rx_refill_buff_pool_enabled;
bool enable_dp_buf_page_frag_alloc;
int rx_refill_buff_pool_size;
uint32_t rx_pending_high_threshold;
uint32_t rx_pending_low_threshold;
@@ -2001,6 +2004,18 @@ bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
*/
bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_is_dp_buf_page_frag_alloc_enable() - Get nbuf allocations from page
* frags.
*
* @cfg: soc configuration context
*
* Return: true if enabled, false otherwise.
*/
bool
wlan_cfg_is_dp_buf_page_frag_alloc_enable(struct wlan_cfg_dp_soc_ctxt *cfg);
#ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
/**
* wlan_cfg_get_rx_refill_buf_pool_size() - Get Rx refill buf pool size