Browse Source

qcacmn: cdp support enable/disable dp debug logging

Added cdp support to get/set
dp debug logging in per packet path.
Enable debug logs only if dp debug logging
is enabled.
With this change there is benefit of all CPU
average around 1% to 1.5%

Change-Id: Ibe0ca4c75211cace4c5fca9ec0bce1c594ca8a6b
CRs-Fixed: 3623910
Sushant Butta 1 năm trước cách đây
mục cha
commit
41e5a457c0
4 tập tin đã thay đổi với 49 bổ sung34 xóa
  1. 3 0
      dp/inc/cdp_txrx_cmn_struct.h
  2. 6 0
      dp/wifi3.0/dp_main.c
  3. 37 34
      dp/wifi3.0/dp_tx.c
  4. 3 0
      dp/wifi3.0/dp_types.h

+ 3 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -1569,6 +1569,7 @@ typedef union cdp_config_param_t {
 	int cdp_psoc_param_preferred_hw_mode;
 	bool cdp_psoc_param_pext_stats;
 	bool cdp_psoc_param_jitter_stats;
+	bool cdp_psoc_param_dp_debug_log;
 
 	bool cdp_skip_bar_update;
 	bool cdp_ipa_enabled;
@@ -1776,6 +1777,7 @@ enum cdp_vdev_param_type {
  * @CDP_CFG_AST_INDICATION_DISABLE: AST indication disable
  * @CDP_CFG_GET_MLO_OPER_MODE: Get MLO operation mode
  * @CDP_CFG_PEER_JITTER_STATS: Peer Jitter Stats
+ * @CDP_CONFIG_DP_DEBUG_LOG: set/get dp debug logging
  */
 enum cdp_psoc_param_type {
 	CDP_ENABLE_RATE_STATS,
@@ -1805,6 +1807,7 @@ enum cdp_psoc_param_type {
 	CDP_CFG_AST_INDICATION_DISABLE,
 	CDP_CFG_GET_MLO_OPER_MODE,
 	CDP_CFG_PEER_JITTER_STATS,
+	CDP_CONFIG_DP_DEBUG_LOG,
 };
 
 #ifdef CONFIG_AP_PLATFORM

+ 6 - 0
dp/wifi3.0/dp_main.c

@@ -9048,6 +9048,9 @@ dp_set_psoc_param(struct cdp_soc_t *cdp_soc,
 		wlan_cfg_set_ast_indication_disable
 			(wlan_cfg_ctx, val.cdp_ast_indication_disable);
 		break;
+	case CDP_CONFIG_DP_DEBUG_LOG:
+		soc->dp_debug_log_en = val.cdp_psoc_param_dp_debug_log;
+		break;
 	default:
 		break;
 	}
@@ -9160,6 +9163,9 @@ static QDF_STATUS dp_get_psoc_param(struct cdp_soc_t *cdp_soc,
 		val->cdp_psoc_param_jitter_stats =
 			wlan_cfg_is_peer_jitter_stats_enabled(soc->wlan_cfg_ctx);
 		break;
+	case CDP_CONFIG_DP_DEBUG_LOG:
+		val->cdp_psoc_param_dp_debug_log = soc->dp_debug_log_en;
+		break;
 	default:
 		dp_warn("Invalid param: %u", param);
 		break;

+ 37 - 34
dp/wifi3.0/dp_tx.c

@@ -417,10 +417,11 @@ dp_tx_desc_release(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
 							     soc->hal_soc);
 	else
 		comp_status = HAL_TX_COMP_RELEASE_REASON_FW;
-
-	dp_tx_debug("Tx Completion Release desc %d status %d outstanding %d",
-		    tx_desc->id, comp_status,
-		    qdf_atomic_read(&pdev->num_tx_outstanding));
+	if (soc->dp_debug_log_en) {
+		dp_tx_debug("Tx Completion Release desc %d status %d outstanding %d",
+			    tx_desc->id, comp_status,
+			    qdf_atomic_read(&pdev->num_tx_outstanding));
+	}
 
 	if (tx_desc->flags & DP_TX_DESC_FLAG_SPECIAL)
 		dp_tx_spcl_desc_free(soc, tx_desc, desc_pool_id);
@@ -6025,36 +6026,38 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc,
 	length = dp_tx_get_pkt_len(tx_desc);
 
 	dp_status = dp_tx_hw_to_qdf(ts->status);
-	dp_tx_comp_debug("-------------------- \n"
-			 "Tx Completion Stats: \n"
-			 "-------------------- \n"
-			 "ack_frame_rssi = %d \n"
-			 "first_msdu = %d \n"
-			 "last_msdu = %d \n"
-			 "msdu_part_of_amsdu = %d \n"
-			 "rate_stats valid = %d \n"
-			 "bw = %d \n"
-			 "pkt_type = %d \n"
-			 "stbc = %d \n"
-			 "ldpc = %d \n"
-			 "sgi = %d \n"
-			 "mcs = %d \n"
-			 "ofdma = %d \n"
-			 "tones_in_ru = %d \n"
-			 "tsf = %d \n"
-			 "ppdu_id = %d \n"
-			 "transmit_cnt = %d \n"
-			 "tid = %d \n"
-			 "peer_id = %d\n"
-			 "tx_status = %d\n"
-			 "tx_release_source = %d\n",
-			 ts->ack_frame_rssi, ts->first_msdu,
-			 ts->last_msdu, ts->msdu_part_of_amsdu,
-			 ts->valid, ts->bw, ts->pkt_type, ts->stbc,
-			 ts->ldpc, ts->sgi, ts->mcs, ts->ofdma,
-			 ts->tones_in_ru, ts->tsf, ts->ppdu_id,
-			 ts->transmit_cnt, ts->tid, ts->peer_id,
-			 ts->status, ts->release_src);
+	if (soc->dp_debug_log_en) {
+		dp_tx_comp_debug("--------------------\n"
+				 "Tx Completion Stats:\n"
+				 "--------------------\n"
+				 "ack_frame_rssi = %d\n"
+				 "first_msdu = %d\n"
+				 "last_msdu = %d\n"
+				 "msdu_part_of_amsdu = %d\n"
+				 "rate_stats valid = %d\n"
+				 "bw = %d\n"
+				 "pkt_type = %d\n"
+				 "stbc = %d\n"
+				 "ldpc = %d\n"
+				 "sgi = %d\n"
+				 "mcs = %d\n"
+				 "ofdma = %d\n"
+				 "tones_in_ru = %d\n"
+				 "tsf = %d\n"
+				 "ppdu_id = %d\n"
+				 "transmit_cnt = %d\n"
+				 "tid = %d\n"
+				 "peer_id = %d\n"
+				 "tx_status = %d\n"
+				 "tx_release_source = %d\n",
+				 ts->ack_frame_rssi, ts->first_msdu,
+				 ts->last_msdu, ts->msdu_part_of_amsdu,
+				 ts->valid, ts->bw, ts->pkt_type, ts->stbc,
+				 ts->ldpc, ts->sgi, ts->mcs, ts->ofdma,
+				 ts->tones_in_ru, ts->tsf, ts->ppdu_id,
+				 ts->transmit_cnt, ts->tid, ts->peer_id,
+				 ts->status, ts->release_src);
+	}
 
 	/* Update SoC level stats */
 	DP_STATS_INCC(soc, tx.dropped_fw_removed, 1,

+ 3 - 0
dp/wifi3.0/dp_types.h

@@ -2715,6 +2715,9 @@ struct dp_soc {
 	/* rx pkt tlv size in current operation mode */
 	uint16_t curr_rx_pkt_tlv_size;
 
+	/* enable/disable dp debug logs */
+	bool dp_debug_log_en;
+
 	struct dp_arch_ops arch_ops;
 
 	/* Device ID coming from Bus sub-system */