qcacmn: Add framework to configure varying data/monitor buf size

Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.

Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
这个提交包含在:
Shashikala Prabhu
2020-01-28 19:11:30 +05:30
提交者 nshrivas
父节点 b1261d4e0c
当前提交 03a9f5b19c
修改 13 个文件,包含 149 行新增95 行删除

查看文件

@@ -113,8 +113,8 @@ done:
static inline void dp_mon_adjust_frag_len(uint32_t *total_len,
uint32_t *frag_len)
{
if (*total_len >= (RX_BUFFER_SIZE - RX_PKT_TLVS_LEN)) {
*frag_len = RX_BUFFER_SIZE - RX_PKT_TLVS_LEN;
if (*total_len >= (RX_MONITOR_BUFFER_SIZE - RX_PKT_TLVS_LEN)) {
*frag_len = RX_MONITOR_BUFFER_SIZE - RX_PKT_TLVS_LEN;
*total_len -= *frag_len;
} else {
*frag_len = *total_len;
@@ -446,7 +446,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
__func__, total_frag_len, frag_len,
msdu_list.msdu_info[i].msdu_flags);
rx_pkt_offset = HAL_RX_MON_HW_RX_DESC_SIZE();
rx_pkt_offset = SIZE_OF_MONITOR_TLV;
/*
* HW structures call this L3 header padding
* -- even though this is actually the offset
@@ -537,7 +537,7 @@ void dp_rx_msdus_set_payload(struct dp_soc *soc, qdf_nbuf_t msdu)
uint32_t rx_pkt_offset, l2_hdr_offset;
data = qdf_nbuf_data(msdu);
rx_pkt_offset = HAL_RX_MON_HW_RX_DESC_SIZE();
rx_pkt_offset = SIZE_OF_MONITOR_TLV;
l2_hdr_offset = hal_rx_msdu_end_l3_hdr_padding_get(soc->hal_soc, data);
qdf_nbuf_pull_head(msdu, rx_pkt_offset + l2_hdr_offset);
}
@@ -1223,6 +1223,8 @@ dp_rx_pdev_mon_buf_attach(struct dp_pdev *pdev, int mac_id) {
return status;
rx_desc_pool->owner = HAL_RX_BUF_RBM_SW3_BM;
rx_desc_pool->buf_size = RX_MONITOR_BUFFER_SIZE;
rx_desc_pool->buf_alignment = RX_MONITOR_BUFFER_ALIGNMENT;
replenish_size = ((num_entries - 1) < MON_BUF_MIN_ALLOC_ENTRIES) ?
(num_entries - 1) : MON_BUF_MIN_ALLOC_ENTRIES;