瀏覽代碼

qcacld-3.0: Rate limit excessive logs in DP component per packet path

Excessive error logs in per packet path may flood the system with logs.
Avoid this by rate limiting excessive logs in DP component per packet
path.

Change-Id: I1c06db6e22eb5e234cee19b8c9968c8444792e6c
CRs-Fixed: 3648926
Karthik Kantamneni 1 年之前
父節點
當前提交
a3838b9425
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      components/dp/core/src/wlan_dp_txrx.c

+ 7 - 7
components/dp/core/src/wlan_dp_txrx.c

@@ -49,7 +49,7 @@ uint32_t wlan_dp_intf_get_pkt_type_bitmap_value(void *intf_ctx)
 	struct wlan_dp_intf *dp_intf = (struct wlan_dp_intf *)intf_ctx;
 
 	if (!dp_intf) {
-		dp_err("DP Context is NULL");
+		dp_err_rl("DP Context is NULL");
 		return 0;
 	}
 
@@ -685,7 +685,7 @@ dp_start_xmit(struct wlan_dp_link *dp_link, qdf_nbuf_t nbuf)
 
 	/* check whether need to linearize nbuf, like non-linear udp data */
 	if (dp_nbuf_nontso_linearize(nbuf) != QDF_STATUS_SUCCESS) {
-		dp_err(" nbuf %pK linearize failed. drop the pkt", nbuf);
+		dp_err_rl(" nbuf %pK linearize failed. drop the pkt", nbuf);
 		goto drop_pkt_and_release_nbuf;
 	}
 
@@ -693,7 +693,7 @@ dp_start_xmit(struct wlan_dp_link *dp_link, qdf_nbuf_t nbuf)
 	 * If a transmit function is not registered, drop packet
 	 */
 	if (!dp_intf->txrx_ops.tx.tx) {
-		dp_err("TX function not registered by the data path");
+		dp_err_rl("TX function not registered by the data path");
 		goto drop_pkt_and_release_nbuf;
 	}
 
@@ -849,14 +849,14 @@ QDF_STATUS dp_mon_rx_packet_cbk(void *context, qdf_nbuf_t rxbuf)
 
 	/* Sanity check on inputs */
 	if ((!context) || (!rxbuf)) {
-		dp_err("Null params being passed");
+		dp_err_rl("Null params being passed");
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	dp_link = (struct wlan_dp_link *)context;
 	dp_intf = dp_link->dp_intf;
 	if (!dp_intf) {
-		dp_err("dp_intf is NULL for dp_link %pK", dp_link);
+		dp_err_rl("dp_intf is NULL for dp_link %pK", dp_link);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1375,7 +1375,7 @@ QDF_STATUS dp_rx_pkt_thread_enqueue_cbk(void *link_ctx,
 	qdf_nbuf_t head_ptr;
 
 	if (qdf_unlikely(!link_ctx || !nbuf_list)) {
-		dp_err("Null params being passed");
+		dp_err_rl("Null params being passed");
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1661,7 +1661,7 @@ QDF_STATUS dp_rx_packet_cbk(void *dp_link_context,
 
 	/* Sanity check on inputs */
 	if (qdf_unlikely((!dp_link_context) || (!rxBuf))) {
-		dp_err("Null params being passed");
+		dp_err_rl("Null params being passed");
 		return QDF_STATUS_E_FAILURE;
 	}