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
这个提交包含在:
@@ -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;
|
||||
|
在新工单中引用
屏蔽一个用户