Browse Source

qcacmn: Use dp_verbose_debug() to print msgs which come excessively

Some of the print messages in Data-path module come very excessively.
Use dp_verbose_debug() API to print them.

CRs-fixed: 2376998
Change-Id: Ibaec3751ce3cbe98492c531548e613c7d17db898
Krunal Soni 6 years ago
parent
commit
c96a1167f8
5 changed files with 53 additions and 71 deletions
  1. 22 28
      dp/wifi3.0/dp_main.c
  2. 1 1
      dp/wifi3.0/dp_peer.c
  3. 17 17
      dp/wifi3.0/dp_rx.c
  4. 1 1
      dp/wifi3.0/dp_rx_err.c
  5. 12 24
      dp/wifi3.0/dp_tx.c

+ 22 - 28
dp/wifi3.0/dp_main.c

@@ -1179,23 +1179,22 @@ static int dp_srng_setup(struct dp_soc *soc, struct dp_srng *srng,
 		(unsigned long)srng->base_vaddr_unaligned);
 	ring_params.num_entries = num_entries;
 
-	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_LOW,
-		  FL("Ring type: %d, num:%d vaddr %pK paddr %pK entries %u"),
-		  ring_type, ring_num, (void *)ring_params.ring_base_vaddr,
-		  (void *)ring_params.ring_base_paddr, ring_params.num_entries);
+	dp_verbose_debug("Ring type: %d, num:%d vaddr %pK paddr %pK entries %u",
+			 ring_type, ring_num,
+			 (void *)ring_params.ring_base_vaddr,
+			 (void *)ring_params.ring_base_paddr,
+			 ring_params.num_entries);
 
 	if (soc->intr_mode == DP_INTR_MSI) {
 		dp_srng_msi_setup(soc, &ring_params, ring_type, ring_num);
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
-			  FL("Using MSI for ring_type: %d, ring_num %d"),
-			  ring_type, ring_num);
+		dp_verbose_debug("Using MSI for ring_type: %d, ring_num %d",
+				 ring_type, ring_num);
 
 	} else {
 		ring_params.msi_data = 0;
 		ring_params.msi_addr = 0;
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
-			  FL("Skipping MSI for ring_type: %d, ring_num %d"),
-			  ring_type, ring_num);
+		dp_verbose_debug("Skipping MSI for ring_type: %d, ring_num %d",
+				 ring_type, ring_num);
 	}
 
 	/*
@@ -1335,9 +1334,8 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
 					soc->tx_comp_ring[ring].hal_srng,
 					remaining_quota);
 
-			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-				  "tx mask 0x%x ring %d, budget %d, work_done %d",
-				  tx_mask, ring, budget, work_done);
+			dp_verbose_debug("tx mask 0x%x ring %d, budget %d, work_done %d",
+					 tx_mask, ring, budget, work_done);
 
 			budget -= work_done;
 			if (budget <= 0)
@@ -1356,9 +1354,8 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
 				soc->reo_exception_ring.hal_srng,
 				remaining_quota);
 
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"REO Exception Ring: work_done %d budget %d",
-			work_done, budget);
+		dp_verbose_debug("REO Exception Ring: work_done %d budget %d",
+				 work_done, budget);
 
 		budget -=  work_done;
 		if (budget <= 0) {
@@ -1372,9 +1369,8 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
 		work_done = dp_rx_wbm_err_process(soc,
 				soc->rx_rel_ring.hal_srng, remaining_quota);
 
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"WBM Release Ring: work_done %d budget %d",
-			work_done, budget);
+		dp_verbose_debug("WBM Release Ring: work_done %d budget %d",
+				 work_done, budget);
 
 		budget -=  work_done;
 		if (budget <= 0) {
@@ -1392,9 +1388,9 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
 					    ring,
 					    remaining_quota);
 
-				QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-					"rx mask 0x%x ring %d, work_done %d budget %d",
-					rx_mask, ring, work_done, budget);
+				dp_verbose_debug("rx mask 0x%x ring %d, work_done %d budget %d",
+						 rx_mask, ring,
+						 work_done, budget);
 
 				budget -=  work_done;
 				if (budget <= 0)
@@ -2946,9 +2942,7 @@ static int dp_rxdma_ring_setup(struct dp_soc *soc,
 	max_mac_rings = wlan_cfg_get_num_mac_rings(pdev_cfg_ctx);
 
 	for (i = 0; i < max_mac_rings; i++) {
-		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
-			 "%s: pdev_id %d mac_id %d",
-			 __func__, pdev->pdev_id, i);
+		dp_verbose_debug("pdev_id %d mac_id %d", pdev->pdev_id, i);
 		if (dp_srng_setup(soc, &pdev->rx_mac_buf_ring[i],
 			RXDMA_BUF, 1, i,
 			wlan_cfg_get_rx_dma_buf_ring_size(pdev_cfg_ctx))) {
@@ -5303,8 +5297,8 @@ void dp_peer_unref_delete(void *peer_handle)
 		if (peer_id != HTT_INVALID_PEER)
 			soc->peer_id_to_obj_map[peer_id] = NULL;
 
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH,
-			"Deleting peer %pK (%pM)", peer, peer->mac_addr.raw);
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
+			  "Deleting peer %pK (%pM)", peer, peer->mac_addr.raw);
 
 		/* remove the reference to the peer from the hash table */
 		dp_peer_find_hash_remove(soc, peer);
@@ -5328,7 +5322,7 @@ void dp_peer_unref_delete(void *peer_handle)
 				peer_list_elem);
 		} else {
 			/*Ignoring the remove operation as peer not found*/
-			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
+			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
 				  "peer:%pK not found in vdev:%pK peerlist:%pK",
 				  peer, vdev, &peer->vdev->peer_list);
 		}

+ 1 - 1
dp/wifi3.0/dp_peer.c

@@ -1567,7 +1567,7 @@ void *dp_find_peer_by_addr(struct cdp_pdev *dev, uint8_t *peer_mac_addr,
 
 	/* Multiple peer ids? How can know peer id? */
 	*local_id = peer->local_id;
-	DP_TRACE(INFO, "%s: peer %pK id %d", __func__, peer, *local_id);
+	dp_verbose_debug("peer %pK id %d", peer, *local_id);
 
 	/* ref_cnt is incremented inside dp_peer_find_hash_find().
 	 * Decrement it here.

+ 17 - 17
dp/wifi3.0/dp_rx.c

@@ -222,10 +222,10 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
 		dp_rx_desc_prep(&((*desc_list)->rx_desc), rx_netbuf);
 		(*desc_list)->rx_desc.in_use = 1;
 
-		dp_debug("rx_netbuf=%pK, buf=%pK, paddr=0x%llx, cookie=%d",
-			 rx_netbuf, qdf_nbuf_data(rx_netbuf),
-			 (unsigned long long)paddr,
-			 (*desc_list)->rx_desc.cookie);
+		dp_verbose_debug("rx_netbuf=%pK, buf=%pK, paddr=0x%llx, cookie=%d",
+				 rx_netbuf, qdf_nbuf_data(rx_netbuf),
+				 (unsigned long long)paddr,
+				 (*desc_list)->rx_desc.cookie);
 
 		hal_rxdma_buff_addr_info_set(rxdma_ring_entry, paddr,
 						(*desc_list)->rx_desc.cookie,
@@ -236,8 +236,8 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
 
 	hal_srng_access_end(dp_soc->hal_soc, rxdma_srng);
 
-	dp_debug("replenished buffers %d, rx desc added back to free list %u",
-		 num_req_buffers, num_desc_to_free);
+	dp_verbose_debug("replenished buffers %d, rx desc added back to free list %u",
+			 num_req_buffers, num_desc_to_free);
 
 	DP_STATS_INC_PKT(dp_pdev, replenish.pkts, num_req_buffers,
 			(RX_BUFFER_SIZE * num_req_buffers));
@@ -922,17 +922,17 @@ void dp_rx_process_invalid_peer_wrapper(struct dp_soc *soc,
  */
 static void dp_rx_print_offload_info(uint8_t *rx_tlv)
 {
-	dp_debug("----------------------RX DESC LRO/GRO----------------------");
-	dp_debug("lro_eligible 0x%x", HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_tlv));
-	dp_debug("pure_ack 0x%x", HAL_RX_TLV_GET_TCP_PURE_ACK(rx_tlv));
-	dp_debug("chksum 0x%x", HAL_RX_TLV_GET_TCP_CHKSUM(rx_tlv));
-	dp_debug("TCP seq num 0x%x", HAL_RX_TLV_GET_TCP_SEQ(rx_tlv));
-	dp_debug("TCP ack num 0x%x", HAL_RX_TLV_GET_TCP_ACK(rx_tlv));
-	dp_debug("TCP window 0x%x", HAL_RX_TLV_GET_TCP_WIN(rx_tlv));
-	dp_debug("TCP protocol 0x%x", HAL_RX_TLV_GET_TCP_PROTO(rx_tlv));
-	dp_debug("TCP offset 0x%x", HAL_RX_TLV_GET_TCP_OFFSET(rx_tlv));
-	dp_debug("toeplitz 0x%x", HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_tlv));
-	dp_debug("---------------------------------------------------------");
+	dp_verbose_debug("----------------------RX DESC LRO/GRO----------------------");
+	dp_verbose_debug("lro_eligible 0x%x", HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_tlv));
+	dp_verbose_debug("pure_ack 0x%x", HAL_RX_TLV_GET_TCP_PURE_ACK(rx_tlv));
+	dp_verbose_debug("chksum 0x%x", HAL_RX_TLV_GET_TCP_CHKSUM(rx_tlv));
+	dp_verbose_debug("TCP seq num 0x%x", HAL_RX_TLV_GET_TCP_SEQ(rx_tlv));
+	dp_verbose_debug("TCP ack num 0x%x", HAL_RX_TLV_GET_TCP_ACK(rx_tlv));
+	dp_verbose_debug("TCP window 0x%x", HAL_RX_TLV_GET_TCP_WIN(rx_tlv));
+	dp_verbose_debug("TCP protocol 0x%x", HAL_RX_TLV_GET_TCP_PROTO(rx_tlv));
+	dp_verbose_debug("TCP offset 0x%x", HAL_RX_TLV_GET_TCP_OFFSET(rx_tlv));
+	dp_verbose_debug("toeplitz 0x%x", HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_tlv));
+	dp_verbose_debug("---------------------------------------------------------");
 }
 
 /**

+ 1 - 1
dp/wifi3.0/dp_rx_err.c

@@ -600,7 +600,7 @@ dp_rx_null_q_handle_invalid_peer_id_exception(struct dp_soc *soc,
 		peer = dp_find_peer_by_addr((struct cdp_pdev *)pdev,
 					    wh->i_addr2, &local_id);
 	if (peer) {
-		dp_err("MPDU sw_peer_id & ast_idx is corrupted");
+		dp_verbose_debug("MPDU sw_peer_id & ast_idx is corrupted");
 		hal_rx_dump_pkt_tlvs(soc->hal_soc, rx_tlv_hdr,
 				     QDF_TRACE_LEVEL_INFO);
 		DP_STATS_INC_PKT(soc, rx.err.rx_invalid_peer_id,

+ 12 - 24
dp/wifi3.0/dp_tx.c

@@ -1003,10 +1003,9 @@ static QDF_STATUS dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev,
 	hal_tx_desc_set_encrypt_type(hal_tx_desc_cached,
 			sec_type_map[sec_type]);
 
-	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"%s length:%d , type = %d, dma_addr %llx, offset %d desc id %u",
-			__func__, length, type, (uint64_t)dma_addr,
-			tx_desc->pkt_offset, tx_desc->id);
+	dp_verbose_debug("length:%d , type = %d, dma_addr %llx, offset %d desc id %u",
+			 length, type, (uint64_t)dma_addr,
+			 tx_desc->pkt_offset, tx_desc->id);
 
 	if (tx_desc->flags & DP_TX_DESC_FLAG_TO_FW)
 		hal_tx_desc_set_to_fw(hal_tx_desc_cached, 1);
@@ -1033,8 +1032,7 @@ static QDF_STATUS dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev,
 	hal_tx_desc = hal_srng_src_get_next(soc->hal_soc, hal_srng);
 
 	if (!hal_tx_desc) {
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			  "%s TCL ring full ring_id:%d", __func__, ring_id);
+		dp_verbose_debug("TCL ring full ring_id:%d", ring_id);
 		DP_STATS_INC(soc, tx.tcl_ring_full[ring_id], 1);
 		DP_STATS_INC(vdev, tx_i.dropped.enqueue_fail, 1);
 		return QDF_STATUS_E_RESOURCES;
@@ -1877,9 +1875,7 @@ qdf_nbuf_t dp_tx_send_exception(void *vap_dev, qdf_nbuf_t nbuf,
 	msdu_info.tid = tx_exc_metadata->tid;
 
 	eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf);
-	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"%s , skb %pM",
-			__func__, nbuf->data);
+	dp_verbose_debug("skb %pM", nbuf->data);
 
 	DP_STATS_INC_PKT(vdev, tx_i.rcvd, 1, qdf_nbuf_len(nbuf));
 
@@ -1946,8 +1942,7 @@ qdf_nbuf_t dp_tx_send_exception(void *vap_dev, qdf_nbuf_t nbuf,
 	return nbuf;
 
 fail:
-	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"pkt send failed");
+	dp_verbose_debug("pkt send failed");
 	return nbuf;
 }
 
@@ -2055,9 +2050,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 
 	eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf);
 
-	QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"%s , skb %pM",
-			__func__, nbuf->data);
+	dp_verbose_debug("skb %pM", nbuf->data);
 
 	/*
 	 * Set Default Host TID value to invalid TID
@@ -2070,8 +2063,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 		nbuf_mesh = dp_tx_extract_mesh_meta_data(vdev, nbuf,
 								&msdu_info);
 		if (nbuf_mesh == NULL) {
-			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-					"Extracting mesh metadata failed");
+			dp_verbose_debug("Extracting mesh metadata failed");
 			return nbuf;
 		}
 		nbuf = nbuf_mesh;
@@ -2107,8 +2099,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 	 * SW and HW descriptors.
 	 */
 	if (qdf_nbuf_is_tso(nbuf)) {
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			  "%s TSO frame %pK", __func__, vdev);
+		dp_verbose_debug("TSO frame %pK", vdev);
 		DP_STATS_INC_PKT(vdev, tx_i.tso.tso_pkt, 1,
 				qdf_nbuf_len(nbuf));
 
@@ -2128,8 +2119,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 		if (!nbuf)
 			return NULL;
 
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			 "%s non-TSO SG frame %pK", __func__, vdev);
+		dp_verbose_debug("non-TSO SG frame %pK", vdev);
 
 		DP_STATS_INC_PKT(vdev, tx_i.sg.sg_pkt, 1,
 				qdf_nbuf_len(nbuf));
@@ -2143,8 +2133,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 		eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf);
 		if (DP_FRAME_IS_MULTICAST((eh)->ether_dhost) &&
 		    !DP_FRAME_IS_BROADCAST((eh)->ether_dhost)) {
-			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-				  "%s Mcast frm for ME %pK", __func__, vdev);
+			dp_verbose_debug("Mcast frm for ME %pK", vdev);
 
 			DP_STATS_INC_PKT(vdev,
 					tx_i.mcast_en.mcast_pkt, 1,
@@ -2163,8 +2152,7 @@ qdf_nbuf_t dp_tx_send(void *vap_dev, qdf_nbuf_t nbuf)
 		if (nbuf == NULL)
 			return NULL;
 
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			  "%s Raw frame %pK", __func__, vdev);
+		dp_verbose_debug("Raw frame %pK", vdev);
 
 		goto send_multiple;