qcacld-3.0: Add credit tracking for HL Data Path

Add credit tracking for HL Data Path in DPTRACE.
Also update proto_bitmap to dynamically enable/disable
credit tracking.

Change-Id: Idd9216b634586f3a81c2194ea4bd2122a472154a
CRs-Fixed: 2574053
This commit is contained in:
Nirav Shah 2019-11-05 08:30:53 +05:30 • committed by nshrivas
commit 7d75434e39
6 changed files with 42 additions and 3 deletions

View file

@ -28,6 +28,11 @@ CONFIG_WLAN_FEATURE_P2P_DEBUG := n
CONFIG_WLAN_LOG_ENTER := n
CONFIG_WLAN_LOG_EXIT := n
ifeq ($(CONFIG_DEBUG_FS), y)
CONFIG_WLAN_DEBUGFS := y
CONFIG_WLAN_POWER_DEBUGFS := y
endif
# Features gets enabled on slub debug
CONFIG_WLAN_DEBUG_CRASH_INJECT := n
CONFIG_FEATURE_MEMDUMP_ENABLE := n

View file

@ -38,6 +38,7 @@
#include <cds_api.h>
#include "hif.h"
#include <cdp_txrx_handle.h>
#include <ol_txrx_peer_find.h>
#define HTT_HTC_PKT_POOL_INIT_SIZE 100 /* enough for a large A-MPDU */
@ -570,6 +571,13 @@ htt_attach(struct htt_pdev_t *pdev, int desc_pool_size)
ol_tx_target_credit_update(
pdev->txrx_pdev, ol_cfg_target_tx_credit(
pdev->ctrl_pdev));
DPTRACE(qdf_dp_trace_credit_record(QDF_HTT_ATTACH,
QDF_CREDIT_INC,
ol_cfg_target_tx_credit(pdev->ctrl_pdev),
qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit),
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit),
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit)));
} else {
enum wlan_frm_fmt frm_type;

View file

@ -484,6 +484,11 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
pdev->txrx_pdev, compl_msg->desc_id, 1,
0, compl_msg->status);
DPTRACE(qdf_dp_trace_credit_record(QDF_TX_COMP, QDF_CREDIT_INC,
1, qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit),
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit),
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit)));
if (!ol_tx_get_is_mgmt_over_wmi_enabled()) {
ol_tx_single_completion_handler(pdev->txrx_pdev,
compl_msg->status,
@ -553,6 +558,13 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
htt_credit_delta =
htt_t2h_adjust_bus_target_delta(pdev, htt_credit_delta);
htt_tx_group_credit_process(pdev, msg_word);
DPTRACE(qdf_dp_trace_credit_record(QDF_TX_CREDIT_UPDATE,
QDF_CREDIT_INC, htt_credit_delta,
qdf_atomic_read(&pdev->txrx_pdev->target_tx_credit) +
htt_credit_delta,
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[0].credit),
qdf_atomic_read(&pdev->txrx_pdev->txq_grps[1].credit)));
ol_tx_credit_completion_handler(pdev->txrx_pdev,
htt_credit_delta);
break;

View file

@ -1526,6 +1526,13 @@ ol_tx_sched(struct ol_txrx_pdev_t *pdev)
qdf_atomic_read(&pdev->target_tx_credit) -
num_credits);
#endif
DPTRACE(qdf_dp_trace_credit_record(QDF_TX_SCHED,
QDF_CREDIT_DEC, num_credits,
qdf_atomic_read(&pdev->target_tx_credit) -
num_credits,
qdf_atomic_read(&pdev->txq_grps[0].credit),
qdf_atomic_read(&pdev->txq_grps[1].credit)));
qdf_atomic_add(-num_credits, &pdev->target_tx_credit);
}
qdf_spin_unlock_bh(&pdev->tx_queue_spinlock);

View file

@ -400,7 +400,14 @@ int ol_tx_deduct_one_credit(struct ol_txrx_pdev_t *pdev)
if (!pdev->cfg.default_tx_comp_req) {
ol_tx_target_credit_update(pdev, -1);
ol_tx_deduct_one_any_group_credit(pdev);
DPTRACE(qdf_dp_trace_credit_record(QDF_TX_HTT_MSG,
QDF_CREDIT_DEC, 1,
qdf_atomic_read(&pdev->target_tx_credit),
qdf_atomic_read(&pdev->txq_grps[0].credit),
qdf_atomic_read(&pdev->txq_grps[1].credit)));
}
return 0;
}
#endif /* CONFIG_HL_SUPPORT */

View file

@ -12488,7 +12488,7 @@ void hdd_dp_trace_init(struct hdd_config *config)
uint8_t thresh = DP_TRACE_CONFIG_DEFAULT_THRESH;
uint16_t thresh_time_limit = DP_TRACE_CONFIG_DEFAULT_THRESH_TIME_LIMIT;
uint8_t verbosity = DP_TRACE_CONFIG_DEFAULT_VERBOSTY;
uint8_t proto_bitmap = DP_TRACE_CONFIG_DEFAULT_BITMAP;
uint32_t proto_bitmap = DP_TRACE_CONFIG_DEFAULT_BITMAP;
uint8_t config_params[DP_TRACE_CONFIG_NUM_PARAMS];
uint8_t num_entries = 0;
uint32_t bw_compute_interval;
@ -12803,6 +12803,8 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
hdd_driver_memdump_init();
hdd_bus_bandwidth_init(hdd_ctx);
hdd_dp_trace_init(hdd_ctx->config);
errno = hdd_wlan_start_modules(hdd_ctx, false);
if (errno) {
hdd_err("Failed to start modules; errno:%d", errno);
@ -12826,8 +12828,6 @@ int hdd_wlan_startup(struct hdd_context *hdd_ctx)
goto stop_modules;
}
hdd_dp_trace_init(hdd_ctx->config);
errno = hdd_initialize_mac_address(hdd_ctx);
if (errno) {
hdd_err("MAC initializtion failed: %d", errno);