浏览代码

qcacmn: Fix nbuf sanity failure handling in wbm error path

Currently when processing the WBM error entries, if there
is an nbuf sanity check failure, i.e. paddr in the srng
entry does not match the paddr from the rx_descriptor, then
the rx_desc flag "unmapped" is being set, without the nbuf
being unmapped and the rx_desc is getting added to the freelist.
This results in the rx_descriptor being replenished with a
new buffer, and the existing nbuf is leaked (without being unmapped).

In order to fix this issue, do not modify any fields of the
rx_desc, since it will be moved to err_state, due to the
sanity failure. Also this rx_desc will not be added to the
freelist, since it should not be replenished due to err_state.

Change-Id: I394cbf884488e75423ada2ad69087c5280bc0ab0
CRs-Fixed: 3656509
Rakesh Pillai 1 年之前
父节点
当前提交
b9881b700b
共有 2 个文件被更改,包括 0 次插入14 次删除
  1. 0 7
      dp/wifi3.0/be/dp_be_rx.c
  2. 0 7
      dp/wifi3.0/li/dp_li_rx.c

+ 0 - 7
dp/wifi3.0/be/dp_be_rx.c

@@ -1923,13 +1923,6 @@ dp_rx_wbm_err_reap_desc_be(struct dp_intr *int_ctx, struct dp_soc *soc,
 			dp_info_rl("Rx error Nbuf %pK sanity check failure!",
 				   rx_desc->nbuf);
 			rx_desc->in_err_state = 1;
-			rx_desc->unmapped = 1;
-			rx_bufs_reaped[rx_desc->chip_id][rx_desc->pool_id]++;
-
-			dp_rx_add_to_free_desc_list(
-				&head[rx_desc->chip_id][rx_desc->pool_id],
-				&tail[rx_desc->chip_id][rx_desc->pool_id],
-				rx_desc);
 			continue;
 		}
 

+ 0 - 7
dp/wifi3.0/li/dp_li_rx.c

@@ -1196,13 +1196,6 @@ dp_rx_wbm_err_reap_desc_li(struct dp_intr *int_ctx, struct dp_soc *soc,
 			dp_info_rl("Rx error Nbuf %pk sanity check failure!",
 				   nbuf);
 			rx_desc->in_err_state = 1;
-			rx_desc->unmapped = 1;
-			rx_bufs_reaped[rx_desc->pool_id]++;
-
-			dp_rx_add_to_free_desc_list(
-				&head[rx_desc->pool_id],
-				&tail[rx_desc->pool_id],
-				rx_desc);
 			continue;
 		}