ソースを参照

qcacmn: Reduce trace level for stats

1. Reduce trace level of stats from fatal to info_high
2. Move stats APIs to dp_stats.c

Change-Id: I0b27a254075610fbbafcc8b09b72403ccb83473a
CRs-Fixed: 2446189
Venkata Sharath Chandra Manchala 6 年 前
コミット
3dfc614c3e
3 ファイル変更360 行追加714 行削除
  1. 34 1
      dp/wifi3.0/dp_internal.h
  2. 1 390
      dp/wifi3.0/dp_main.c
  3. 325 323
      dp/wifi3.0/dp_stats.c

+ 34 - 1
dp/wifi3.0/dp_internal.h

@@ -790,7 +790,40 @@ uint32_t dp_pdev_tid_stats_display(void *pdev_handle,
 void dp_update_delay_stats(struct dp_pdev *pdev, uint32_t delay,
 			   uint8_t tid, uint8_t mode);
 
-/*
+/**
+ * dp_print_ring_stats(): Print tail and head pointer
+ * @pdev: DP_PDEV handle
+ *
+ * Return:void
+ */
+void dp_print_ring_stats(struct dp_pdev *pdev);
+
+/**
+ * dp_print_pdev_cfg_params() - Print the pdev cfg parameters
+ * @pdev_handle: DP pdev handle
+ *
+ * Return - void
+ */
+void dp_print_pdev_cfg_params(struct dp_pdev *pdev);
+
+/**
+ * dp_print_soc_cfg_params()- Dump soc wlan config parameters
+ * @soc_handle: Soc handle
+ *
+ * Return: void
+ */
+void dp_print_soc_cfg_params(struct dp_soc *soc);
+
+/**
+ * dp_srng_get_str_from_ring_type() - Return string name for a ring
+ * @ring_type: Ring
+ *
+ * Return: char const pointer
+ */
+const
+char *dp_srng_get_str_from_hal_ring_type(enum hal_ring_type ring_type);
+
+/**
  * dp_get_mac_id_for_pdev() -  Return mac corresponding to pdev for mac
  *
  * @mac_id: MAC id

+ 1 - 390
dp/wifi3.0/dp_main.c

@@ -114,7 +114,6 @@ bool is_dp_verbose_debug_enabled;
 #define DP_MU_GROUP_LENGTH (6 * DP_MU_GROUP_SHOW)
 
 #define DP_RXDMA_ERR_LENGTH (6*HAL_RXDMA_ERR_MAX)
-#define DP_MAX_INT_CONTEXTS_STRING_LENGTH (6 * WLAN_CFG_INT_NUM_CONTEXTS)
 #define DP_REO_ERR_LENGTH (6*HAL_REO_ERR_MAX)
 #define DP_MAX_MCS_STRING_LEN 30
 #define DP_CURR_FW_STATS_AVAIL 19
@@ -7035,13 +7034,7 @@ dp_print_soc_rx_stats(struct dp_soc *soc)
 	DP_PRINT_STATS("REO Error(0-14):%s", reo_error);
 }
 
-/**
- * dp_srng_get_str_from_ring_type() - Return string name for a ring
- * @ring_type: Ring
- *
- * Return: char const pointer
- */
-static inline const
+const
 char *dp_srng_get_str_from_hal_ring_type(enum hal_ring_type ring_type)
 {
 	switch (ring_type) {
@@ -7082,44 +7075,6 @@ char *dp_srng_get_str_from_hal_ring_type(enum hal_ring_type ring_type)
 	return "Invalid";
 }
 
-/**
- * dp_print_ring_stat_from_hal(): Print hal level ring stats
- * @soc: DP_SOC handle
- * @srng: DP_SRNG handle
- * @ring_name: SRNG name
- * @ring_type: srng src/dst ring
- *
- * Return: void
- */
-static void
-dp_print_ring_stat_from_hal(struct dp_soc *soc,  struct dp_srng *srng,
-			    enum hal_ring_type ring_type)
-{
-	uint32_t tailp;
-	uint32_t headp;
-	int32_t hw_headp = -1;
-	int32_t hw_tailp = -1;
-	const char *ring_name;
-	struct hal_soc *hal_soc;
-
-	if (soc && srng && srng->hal_srng) {
-		hal_soc = (struct hal_soc *)soc->hal_soc;
-		ring_name = dp_srng_get_str_from_hal_ring_type(ring_type);
-
-		hal_get_sw_hptp(soc->hal_soc, srng->hal_srng, &tailp, &headp);
-
-		DP_PRINT_STATS("%s:SW:Head pointer = %d Tail Pointer = %d\n",
-			       ring_name, headp, tailp);
-
-		hal_get_hw_hptp(soc->hal_soc, srng->hal_srng, &hw_headp,
-				&hw_tailp, ring_type);
-
-		DP_PRINT_STATS("%s:HW:Head pointer = %d Tail Pointer = %d\n",
-			       ring_name, hw_headp, hw_tailp);
-	}
-
-}
-
 /*
  * dp_print_napi_stats(): NAPI stats
  * @soc - soc handle
@@ -7129,106 +7084,6 @@ static void dp_print_napi_stats(struct dp_soc *soc)
 	hif_print_napi_stats(soc->hif_handle);
 }
 
-/**
- * dp_print_mon_ring_stats_from_hal() - Print stat for monitor rings based
- *					on target
- * @pdev: physical device handle
- * @mac_id: mac id
- *
- * Return: void
- */
-static inline
-void dp_print_mon_ring_stat_from_hal(struct dp_pdev *pdev, uint8_t mac_id)
-{
-	if (pdev->soc->wlan_cfg_ctx->rxdma1_enable) {
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->rxdma_mon_buf_ring[mac_id],
-					    RXDMA_MONITOR_BUF);
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->rxdma_mon_dst_ring[mac_id],
-					    RXDMA_MONITOR_DST);
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->rxdma_mon_desc_ring[mac_id],
-					    RXDMA_MONITOR_DESC);
-	}
-
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->rxdma_mon_status_ring[mac_id],
-				    RXDMA_MONITOR_STATUS);
-}
-
-/**
- * dp_print_ring_stats(): Print tail and head pointer
- * @pdev: DP_PDEV handle
- *
- * Return:void
- */
-static inline void
-dp_print_ring_stats(struct dp_pdev *pdev)
-{
-	uint32_t i;
-	int mac_id;
-
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->reo_exception_ring,
-				    REO_EXCEPTION);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->reo_reinject_ring,
-				    REO_REINJECT);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->reo_cmd_ring,
-				    REO_CMD);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->reo_status_ring,
-				    REO_STATUS);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->rx_rel_ring,
-				    WBM2SW_RELEASE);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->tcl_cmd_ring,
-				    TCL_CMD);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->tcl_status_ring,
-				    TCL_STATUS);
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->wbm_desc_rel_ring,
-				    SW2WBM_RELEASE);
-	for (i = 0; i < MAX_REO_DEST_RINGS; i++)
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->soc->reo_dest_ring[i],
-					    REO_DST);
-
-	for (i = 0; i < pdev->soc->num_tcl_data_rings; i++)
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->soc->tcl_data_ring[i],
-					    TCL_DATA);
-	for (i = 0; i < MAX_TCL_DATA_RINGS; i++)
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->soc->tx_comp_ring[i],
-					    WBM2SW_RELEASE);
-
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->rx_refill_buf_ring,
-				    RXDMA_BUF);
-
-	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->rx_refill_buf_ring2,
-				    RXDMA_BUF);
-
-	for (i = 0; i < MAX_RX_MAC_RINGS; i++)
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->rx_mac_buf_ring[i],
-					    RXDMA_BUF);
-
-	for (mac_id = 0; mac_id < NUM_RXDMA_RINGS_PER_PDEV; mac_id++)
-		dp_print_mon_ring_stat_from_hal(pdev, mac_id);
-
-	for (i = 0; i < NUM_RXDMA_RINGS_PER_PDEV; i++)
-		dp_print_ring_stat_from_hal(pdev->soc,
-					    &pdev->rxdma_err_dst_ring[i],
-					    RXDMA_DST);
-}
-
 /**
  * dp_txrx_host_stats_clr(): Reinitialize the txrx stats
  * @vdev: DP_VDEV handle
@@ -7675,250 +7530,6 @@ dp_get_host_peer_stats(struct cdp_pdev *pdev_handle, char *mac_addr)
 	dp_peer_rxtid_stats(peer, dp_rx_tid_stats_cb, NULL);
 }
 
-/**
- * dp_print_soc_cfg_params()- Dump soc wlan config parameters
- * @soc_handle: Soc handle
- *
- * Return: void
- */
-static void
-dp_print_soc_cfg_params(struct dp_soc *soc)
-{
-	struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
-	uint8_t index = 0, i = 0;
-	char ring_mask[DP_MAX_INT_CONTEXTS_STRING_LENGTH];
-	int num_of_int_contexts;
-
-	if (!soc) {
-		dp_err("Context is null");
-		return;
-	}
-
-	soc_cfg_ctx = soc->wlan_cfg_ctx;
-
-	if (!soc_cfg_ctx) {
-		dp_err("Context is null");
-		return;
-	}
-
-	num_of_int_contexts =
-			wlan_cfg_get_num_contexts(soc_cfg_ctx);
-
-	DP_TRACE_STATS(DEBUG, "No. of interrupt contexts: %u",
-		       soc_cfg_ctx->num_int_ctxts);
-	DP_TRACE_STATS(DEBUG, "Max clients: %u",
-		       soc_cfg_ctx->max_clients);
-	DP_TRACE_STATS(DEBUG, "Max alloc size: %u ",
-		       soc_cfg_ctx->max_alloc_size);
-	DP_TRACE_STATS(DEBUG, "Per pdev tx ring: %u ",
-		       soc_cfg_ctx->per_pdev_tx_ring);
-	DP_TRACE_STATS(DEBUG, "Num tcl data rings: %u ",
-		       soc_cfg_ctx->num_tcl_data_rings);
-	DP_TRACE_STATS(DEBUG, "Per pdev rx ring: %u ",
-		       soc_cfg_ctx->per_pdev_rx_ring);
-	DP_TRACE_STATS(DEBUG, "Per pdev lmac ring: %u ",
-		       soc_cfg_ctx->per_pdev_lmac_ring);
-	DP_TRACE_STATS(DEBUG, "Num of reo dest rings: %u ",
-		       soc_cfg_ctx->num_reo_dest_rings);
-	DP_TRACE_STATS(DEBUG, "Num tx desc pool: %u ",
-		       soc_cfg_ctx->num_tx_desc_pool);
-	DP_TRACE_STATS(DEBUG, "Num tx ext desc pool: %u ",
-		       soc_cfg_ctx->num_tx_ext_desc_pool);
-	DP_TRACE_STATS(DEBUG, "Num tx desc: %u ",
-		       soc_cfg_ctx->num_tx_desc);
-	DP_TRACE_STATS(DEBUG, "Num tx ext desc: %u ",
-		       soc_cfg_ctx->num_tx_ext_desc);
-	DP_TRACE_STATS(DEBUG, "Htt packet type: %u ",
-		       soc_cfg_ctx->htt_packet_type);
-	DP_TRACE_STATS(DEBUG, "Max peer_ids: %u ",
-		       soc_cfg_ctx->max_peer_id);
-	DP_TRACE_STATS(DEBUG, "Tx ring size: %u ",
-		       soc_cfg_ctx->tx_ring_size);
-	DP_TRACE_STATS(DEBUG, "Tx comp ring size: %u ",
-		       soc_cfg_ctx->tx_comp_ring_size);
-	DP_TRACE_STATS(DEBUG, "Tx comp ring size nss: %u ",
-		       soc_cfg_ctx->tx_comp_ring_size_nss);
-	DP_TRACE_STATS(DEBUG, "Int batch threshold tx: %u ",
-		       soc_cfg_ctx->int_batch_threshold_tx);
-	DP_TRACE_STATS(DEBUG, "Int timer threshold tx: %u ",
-		       soc_cfg_ctx->int_timer_threshold_tx);
-	DP_TRACE_STATS(DEBUG, "Int batch threshold rx: %u ",
-		       soc_cfg_ctx->int_batch_threshold_rx);
-	DP_TRACE_STATS(DEBUG, "Int timer threshold rx: %u ",
-		       soc_cfg_ctx->int_timer_threshold_rx);
-	DP_TRACE_STATS(DEBUG, "Int batch threshold other: %u ",
-		       soc_cfg_ctx->int_batch_threshold_other);
-	DP_TRACE_STATS(DEBUG, "Int timer threshold other: %u ",
-		       soc_cfg_ctx->int_timer_threshold_other);
-
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_tx_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Tx ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_rx_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rx ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_rx_mon_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rx mon ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_rx_err_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rx err ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_rx_wbm_rel_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rx wbm rel ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_reo_status_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Reo ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_rxdma2host_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rxdma2host ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	index = 0;
-	for (i = 0; i < num_of_int_contexts; i++) {
-		index += qdf_snprint(&ring_mask[index],
-				     DP_MAX_INT_CONTEXTS_STRING_LENGTH - index,
-				     " %d",
-				     soc_cfg_ctx->int_host2rxdma_ring_mask[i]);
-	}
-
-	DP_TRACE_STATS(DEBUG, "Host2rxdma ring mask (0-%d):%s",
-		       num_of_int_contexts, ring_mask);
-
-	DP_TRACE_STATS(DEBUG, "Rx hash: %u ",
-		       soc_cfg_ctx->rx_hash);
-	DP_TRACE_STATS(DEBUG, "Tso enabled: %u ",
-		       soc_cfg_ctx->tso_enabled);
-	DP_TRACE_STATS(DEBUG, "Lro enabled: %u ",
-		       soc_cfg_ctx->lro_enabled);
-	DP_TRACE_STATS(DEBUG, "Sg enabled: %u ",
-		       soc_cfg_ctx->sg_enabled);
-	DP_TRACE_STATS(DEBUG, "Gro enabled: %u ",
-		       soc_cfg_ctx->gro_enabled);
-	DP_TRACE_STATS(DEBUG, "rawmode enabled: %u ",
-		       soc_cfg_ctx->rawmode_enabled);
-	DP_TRACE_STATS(DEBUG, "peer flow ctrl enabled: %u ",
-		       soc_cfg_ctx->peer_flow_ctrl_enabled);
-	DP_TRACE_STATS(DEBUG, "napi enabled: %u ",
-		       soc_cfg_ctx->napi_enabled);
-	DP_TRACE_STATS(DEBUG, "Tcp Udp checksum offload: %u ",
-		       soc_cfg_ctx->tcp_udp_checksumoffload);
-	DP_TRACE_STATS(DEBUG, "Defrag timeout check: %u ",
-		       soc_cfg_ctx->defrag_timeout_check);
-	DP_TRACE_STATS(DEBUG, "Rx defrag min timeout: %u ",
-		       soc_cfg_ctx->rx_defrag_min_timeout);
-	DP_TRACE_STATS(DEBUG, "WBM release ring: %u ",
-		       soc_cfg_ctx->wbm_release_ring);
-	DP_TRACE_STATS(DEBUG, "TCL CMD ring: %u ",
-		       soc_cfg_ctx->tcl_cmd_ring);
-	DP_TRACE_STATS(DEBUG, "TCL Status ring: %u ",
-		       soc_cfg_ctx->tcl_status_ring);
-	DP_TRACE_STATS(DEBUG, "REO Reinject ring: %u ",
-		       soc_cfg_ctx->reo_reinject_ring);
-	DP_TRACE_STATS(DEBUG, "RX release ring: %u ",
-		       soc_cfg_ctx->rx_release_ring);
-	DP_TRACE_STATS(DEBUG, "REO Exception ring: %u ",
-		       soc_cfg_ctx->reo_exception_ring);
-	DP_TRACE_STATS(DEBUG, "REO CMD ring: %u ",
-		       soc_cfg_ctx->reo_cmd_ring);
-	DP_TRACE_STATS(DEBUG, "REO STATUS ring: %u ",
-		       soc_cfg_ctx->reo_status_ring);
-	DP_TRACE_STATS(DEBUG, "RXDMA refill ring: %u ",
-		       soc_cfg_ctx->rxdma_refill_ring);
-	DP_TRACE_STATS(DEBUG, "RXDMA err dst ring: %u ",
-		       soc_cfg_ctx->rxdma_err_dst_ring);
-}
-
-/**
- * dp_print_vdev_cfg_params() - Print the pdev cfg parameters
- * @pdev_handle: DP pdev handle
- *
- * Return - void
- */
-static void
-dp_print_pdev_cfg_params(struct dp_pdev *pdev)
-{
-	struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
-
-	if (!pdev) {
-		dp_err("Context is null");
-		return;
-	}
-
-	pdev_cfg_ctx = pdev->wlan_cfg_ctx;
-
-	if (!pdev_cfg_ctx) {
-		dp_err("Context is null");
-		return;
-	}
-
-	DP_TRACE_STATS(DEBUG, "Rx dma buf ring size: %d ",
-		       pdev_cfg_ctx->rx_dma_buf_ring_size);
-	DP_TRACE_STATS(DEBUG, "DMA Mon buf ring size: %d ",
-		       pdev_cfg_ctx->dma_mon_buf_ring_size);
-	DP_TRACE_STATS(DEBUG, "DMA Mon dest ring size: %d ",
-		       pdev_cfg_ctx->dma_mon_dest_ring_size);
-	DP_TRACE_STATS(DEBUG, "DMA Mon status ring size: %d ",
-		       pdev_cfg_ctx->dma_mon_status_ring_size);
-	DP_TRACE_STATS(DEBUG, "Rxdma monitor desc ring: %d",
-		       pdev_cfg_ctx->rxdma_monitor_desc_ring);
-	DP_TRACE_STATS(DEBUG, "Num mac rings: %d ",
-		       pdev_cfg_ctx->num_mac_rings);
-}
-
 /**
  * dp_txrx_stats_help() - Helper function for Txrx_Stats
  *

ファイルの差分が大きいため隠しています
+ 325 - 323
dp/wifi3.0/dp_stats.c


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません