qcacmn: Fixes for monitor ring stall issues

STATUS_DONE is missing sometimes in monitor status ring,
causing stalled processing in host and backpressure to RXDMA.
Adding a WAR to skip such entries.
Also increased the size of monitor link descriptor ring since
multiple descriptors are used for large MPDUs.

Change-Id: I556b4196482ed738471afc1f7e7b73cf3f8fbc51
This commit is contained in:
Karunakar Dasineni
2018-02-06 12:37:30 -08:00
committed by snandini
parent dc82a77896
commit 37995ac196
3 changed files with 21 additions and 9 deletions

View File

@@ -564,7 +564,8 @@ static int dp_srng_setup(struct dp_soc *soc, struct dp_srng *srng,
* monitor buffer rings. * monitor buffer rings.
* TODO: See if this is required for any other ring * TODO: See if this is required for any other ring
*/ */
if ((ring_type == RXDMA_BUF) || (ring_type == RXDMA_MONITOR_BUF)) { if ((ring_type == RXDMA_BUF) || (ring_type == RXDMA_MONITOR_BUF) ||
(ring_type == RXDMA_MONITOR_STATUS)) {
/* TODO: Setting low threshold to 1/8th of ring size /* TODO: Setting low threshold to 1/8th of ring size
* see if this needs to be configurable * see if this needs to be configurable
*/ */
@@ -914,6 +915,9 @@ static void dp_soc_interrupt_map_calculate_integrated(struct dp_soc *soc,
irq_id_map[num_irq++] = irq_id_map[num_irq++] =
ppdu_end_interrupts_mac1 - ppdu_end_interrupts_mac1 -
wlan_cfg_get_hw_mac_idx(soc->wlan_cfg_ctx, j); wlan_cfg_get_hw_mac_idx(soc->wlan_cfg_ctx, j);
irq_id_map[num_irq++] =
rxdma2host_monitor_status_ring_mac1 -
wlan_cfg_get_hw_mac_idx(soc->wlan_cfg_ctx, j);
} }
if (rx_wbm_rel_ring_mask & (1 << j)) if (rx_wbm_rel_ring_mask & (1 << j))
@@ -1423,7 +1427,7 @@ static void dp_hw_link_desc_pool_cleanup(struct dp_soc *soc)
#define RXDMA_MONITOR_BUF_RING_SIZE 4096 #define RXDMA_MONITOR_BUF_RING_SIZE 4096
#define RXDMA_MONITOR_DST_RING_SIZE 2048 #define RXDMA_MONITOR_DST_RING_SIZE 2048
#define RXDMA_MONITOR_STATUS_RING_SIZE 1024 #define RXDMA_MONITOR_STATUS_RING_SIZE 1024
#define RXDMA_MONITOR_DESC_RING_SIZE 2048 #define RXDMA_MONITOR_DESC_RING_SIZE 4096
#define RXDMA_ERR_DST_RING_SIZE 1024 #define RXDMA_ERR_DST_RING_SIZE 1024
/* /*

View File

@@ -294,7 +294,11 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
hal_rx_mon_next_link_desc_get(rx_msdu_link_desc, &buf_info, hal_rx_mon_next_link_desc_get(rx_msdu_link_desc, &buf_info,
&p_buf_addr_info); &p_buf_addr_info);
dp_rx_mon_link_desc_return(dp_pdev, p_last_buf_addr_info); if (dp_rx_mon_link_desc_return(dp_pdev, p_last_buf_addr_info)
!= QDF_STATUS_SUCCESS) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
"dp_rx_mon_link_desc_return failed\n");
}
p_last_buf_addr_info = p_buf_addr_info; p_last_buf_addr_info = p_buf_addr_info;
} while (buf_info.paddr && msdu_cnt); } while (buf_info.paddr && msdu_cnt);

View File

@@ -452,11 +452,16 @@ dp_rx_mon_status_srng_process(struct dp_soc *soc, uint32_t mac_id,
status = hal_get_rx_status_done(status_buf); status = hal_get_rx_status_done(status_buf);
if (status != QDF_STATUS_SUCCESS) { if (status != QDF_STATUS_SUCCESS) {
uint32_t hp, tp;
hal_api_get_tphp(hal_soc, mon_status_srng,
&tp, &hp);
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE(QDF_MODULE_ID_DP,
QDF_TRACE_LEVEL_WARN, QDF_TRACE_LEVEL_ERROR,
"[%s][%d] status not done", "[%s][%d] status not done - hp:%u, tp:%u",
__func__, __LINE__); __func__, __LINE__, hp, tp);
break; /* WAR for missing status: Skip status entry */
hal_srng_src_get_next(hal_soc, mon_status_srng);
continue;
} }
qdf_nbuf_set_pktlen(status_nbuf, RX_BUFFER_SIZE); qdf_nbuf_set_pktlen(status_nbuf, RX_BUFFER_SIZE);
@@ -501,8 +506,7 @@ dp_rx_mon_status_srng_process(struct dp_soc *soc, uint32_t mac_id,
hal_rxdma_buff_addr_info_set(rxdma_mon_status_ring_entry, hal_rxdma_buff_addr_info_set(rxdma_mon_status_ring_entry,
paddr, rx_desc->cookie, HAL_RX_BUF_RBM_SW3_BM); paddr, rx_desc->cookie, HAL_RX_BUF_RBM_SW3_BM);
rxdma_mon_status_ring_entry = hal_srng_src_get_next(hal_soc, mon_status_srng);
hal_srng_src_get_next(hal_soc, mon_status_srng);
work_done++; work_done++;
} }
done: done: