qcacmn: Add support for Rx refill ring history
Add support for Rx refill ring history, maintain records of refill info during RXDMA ring replenish. Change-Id: I034014eacfc510ec6f416fca601fa864326de9c2 CRs-Fixed: 2930005
此提交包含在:
@@ -197,6 +197,51 @@ dp_pdev_frag_alloc_and_map(struct dp_soc *dp_soc,
|
||||
}
|
||||
#endif /* DP_RX_MON_MEM_FRAG */
|
||||
|
||||
#ifdef WLAN_FEATURE_DP_RX_RING_HISTORY
|
||||
/**
|
||||
* dp_rx_refill_ring_record_entry() - Record an entry into refill_ring history
|
||||
* @soc: Datapath soc structure
|
||||
* @ring_num: Refill ring number
|
||||
* @num_req: number of buffers requested for refill
|
||||
* @num_refill: number of buffers refilled
|
||||
*
|
||||
* Returns: None
|
||||
*/
|
||||
static inline void
|
||||
dp_rx_refill_ring_record_entry(struct dp_soc *soc, uint8_t ring_num,
|
||||
hal_ring_handle_t hal_ring_hdl,
|
||||
uint32_t num_req, uint32_t num_refill)
|
||||
{
|
||||
struct dp_refill_info_record *record;
|
||||
uint32_t idx;
|
||||
uint32_t tp;
|
||||
uint32_t hp;
|
||||
|
||||
if (qdf_unlikely(!soc->rx_refill_ring_history[ring_num]))
|
||||
return;
|
||||
|
||||
idx = dp_history_get_next_index(&soc->rx_refill_ring_history[ring_num]->index,
|
||||
DP_RX_REFILL_HIST_MAX);
|
||||
|
||||
/* No NULL check needed for record since its an array */
|
||||
record = &soc->rx_refill_ring_history[ring_num]->entry[idx];
|
||||
|
||||
hal_get_sw_hptp(soc->hal_soc, hal_ring_hdl, &tp, &hp);
|
||||
record->timestamp = qdf_get_log_timestamp();
|
||||
record->num_req = num_req;
|
||||
record->num_refill = num_refill;
|
||||
record->hp = hp;
|
||||
record->tp = tp;
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
dp_rx_refill_ring_record_entry(struct dp_soc *soc, uint8_t ring_num,
|
||||
hal_ring_handle_t hal_ring_hdl,
|
||||
uint32_t num_req, uint32_t num_refill)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* dp_pdev_nbuf_alloc_and_map() - Allocate nbuf for desc buffer and map
|
||||
*
|
||||
@@ -415,6 +460,9 @@ QDF_STATUS __dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
|
||||
|
||||
dp_rx_refill_buff_pool_unlock(dp_soc);
|
||||
|
||||
dp_rx_refill_ring_record_entry(dp_soc, mac_id, rxdma_srng,
|
||||
num_req_buffers, count);
|
||||
|
||||
hal_srng_access_end(dp_soc->hal_soc, rxdma_srng);
|
||||
|
||||
dp_rx_schedule_refill_thread(dp_soc);
|
||||
@@ -3259,6 +3307,8 @@ dp_pdev_rx_buffers_attach(struct dp_soc *dp_soc, uint32_t mac_id,
|
||||
desc_list = next;
|
||||
}
|
||||
|
||||
dp_rx_refill_ring_record_entry(dp_soc, mac_id, rxdma_srng,
|
||||
nr_nbuf, nr_nbuf);
|
||||
hal_srng_access_end(dp_soc->hal_soc, rxdma_srng);
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者