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
This commit is contained in:
Sushant Butta
2023-09-25 11:29:34 +05:30
committed by Rahul Choudhary
parent d6ee46a496
commit 41e5a457c0
4 changed files with 49 additions and 34 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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,

View File

@@ -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 */