mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Fix descriptor leak issue in DP
In the DMA descriptor reap code, the check for NAPI quota is after Tail pointer is updated. This is causing a descriptor leak in high load conditions when loop is exited without processing the reaped descriptor. This change moves the quota check to end of while loop. Change-Id: I2f3432bf257947f85abc2216a0f2dfc44813c44c CRs-Fixed: 2137017
This commit is contained in:
parent
be998d8c2d
commit
3379c74969
2 changed files with 10 additions and 11 deletions
|
|
@ -957,9 +957,8 @@ dp_rx_process(struct dp_intr *int_ctx, void *hal_ring, uint32_t quota)
|
|||
* them in per vdev queue.
|
||||
* Process the received pkts in a different per vdev loop.
|
||||
*/
|
||||
while (qdf_likely((ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring))
|
||||
&& quota)) {
|
||||
while (qdf_likely(quota && (ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring)))) {
|
||||
|
||||
error = HAL_RX_ERROR_STATUS_GET(ring_desc);
|
||||
ring_id = hal_srng_ring_id_get(hal_ring);
|
||||
|
|
|
|||
|
|
@ -774,9 +774,9 @@ dp_rx_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota)
|
|||
goto done;
|
||||
}
|
||||
|
||||
while (qdf_likely((ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring))
|
||||
&& quota--)) {
|
||||
while (qdf_likely(quota-- && (ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring)))) {
|
||||
|
||||
DP_STATS_INC(soc, rx.err_ring_pkts, 1);
|
||||
|
||||
error = HAL_RX_ERROR_STATUS_GET(ring_desc);
|
||||
|
|
@ -843,6 +843,7 @@ dp_rx_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota)
|
|||
/* Return link descriptor through WBM ring (SW2WBM)*/
|
||||
dp_rx_link_desc_return(soc, ring_desc,
|
||||
HAL_BM_ACTION_PUT_IN_IDLE_LIST);
|
||||
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
@ -913,9 +914,8 @@ dp_rx_wbm_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota)
|
|||
goto done;
|
||||
}
|
||||
|
||||
while (qdf_likely((ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring))
|
||||
&& quota--)) {
|
||||
while (qdf_likely(quota-- && (ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, hal_ring)))) {
|
||||
|
||||
/* XXX */
|
||||
wbm_err_src = HAL_RX_WBM_ERR_SRC_GET(ring_desc);
|
||||
|
|
@ -1248,8 +1248,8 @@ dp_rxdma_err_process(struct dp_soc *soc, uint32_t mac_id, uint32_t quota)
|
|||
return 0;
|
||||
}
|
||||
|
||||
while (qdf_likely((rxdma_dst_ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, err_dst_srng)) && quota--)) {
|
||||
while (qdf_likely(quota-- && (rxdma_dst_ring_desc =
|
||||
hal_srng_dst_get_next(hal_soc, err_dst_srng)))) {
|
||||
|
||||
rx_bufs_used += dp_rx_err_mpdu_pop(soc, mac_id,
|
||||
rxdma_dst_ring_desc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue