浏览代码

qcacmn: Ratelimit the tso descriptor alloc failure

In cases were all the tso tx descriptors are outstanding,
the alloc for any subsequent tso packet will fail.
This failure to get a tso tx descriptor floods the
console with failure logs.

Ratelimit the tso descriptor allocation failure and
increment the alloc failure in stats to get the exact
number of times the allocation failed.

CRs-Fixed: 2572580
Change-Id: I789788b917421be99df5435ad858d715ef0f5c8e
Rakesh Pillai 5 年之前
父节点
当前提交
74368919c5
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 3 0
      dp/inc/cdp_txrx_stats_struct.h
  2. 4 2
      dp/wifi3.0/dp_tx.c

+ 3 - 0
dp/inc/cdp_txrx_stats_struct.h

@@ -505,6 +505,8 @@ struct cdp_tso_info {
  * @num_tso_pkts: Total number of TSO Packets
  * @tso_comp: Total tso packet completions
  * @dropped_host: TSO packets dropped by host
+ * @tso_no_mem_dropped: TSO packets dropped by host due to descriptor
+			unavailablity
  * @dropped_target: TSO packets_dropped by target
  * @tso_info: Per TSO packet counters
  * @seg_histogram: TSO histogram stats
@@ -513,6 +515,7 @@ struct cdp_tso_stats {
 	struct cdp_pkt_info num_tso_pkts;
 	uint32_t tso_comp;
 	struct cdp_pkt_info dropped_host;
+	struct cdp_pkt_info tso_no_mem_dropped;
 	uint32_t dropped_target;
 #ifdef FEATURE_TSO_STATS
 	struct cdp_tso_info tso_info;

+ 4 - 2
dp/wifi3.0/dp_tx.c

@@ -585,8 +585,10 @@ static QDF_STATUS dp_tx_prepare_tso(struct dp_vdev *vdev,
 			tso_info->tso_seg_list = tso_seg;
 			num_seg--;
 		} else {
-			DP_TRACE(ERROR, "%s: Failed to alloc tso seg desc",
-				 __func__);
+			dp_err_rl("Failed to alloc tso seg desc");
+			DP_STATS_INC_PKT(vdev->pdev,
+					 tso_stats.tso_no_mem_dropped, 1,
+					 qdf_nbuf_len(msdu));
 			dp_tx_free_remaining_tso_desc(soc, msdu_info, false);
 
 			return QDF_STATUS_E_NOMEM;