Pārlūkot izejas kodu

qcacmn: Support INI cfg for mon dst interrupt

Monitor destination ring interrupt processing is configurable.
For improved CPU utilization the batch counter threshold and
timer threshold is updated and also an option is provided to make
this values configurable through INI.

Change-Id: Ibe671927f53f3e8fac7f17540c21a2c7edae427b
CRs-Fixed: 3569505
Santosh Anbu 1 gadu atpakaļ
vecāks
revīzija
ba59a82e83
3 mainītis faili ar 65 papildinājumiem un 0 dzēšanām
  1. 25 0
      wlan_cfg/cfg_dp.h
  2. 18 0
      wlan_cfg/wlan_cfg.c
  3. 22 0
      wlan_cfg/wlan_cfg.h

+ 25 - 0
wlan_cfg/cfg_dp.h

@@ -145,6 +145,9 @@
 #endif
 #endif /* WLAN_MAX_PDEVS */
 
+#define WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST 1
+#define WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST 256
+
 #define WLAN_CFG_INT_BATCH_THRESHOLD_PPE2TCL 0
 #define WLAN_CFG_INT_TIMER_THRESHOLD_PPE2TCL 30
 
@@ -214,6 +217,9 @@
 #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MIN 1
 #define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER_MAX 1
 
+#define WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST_MIN 1
+#define WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST_MAX 64
+
 #define WLAN_CFG_INT_TIMER_THRESHOLD_TX_MIN 8
 #define WLAN_CFG_INT_TIMER_THRESHOLD_TX_MAX 1000
 
@@ -226,6 +232,9 @@
 #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MIN 8
 #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER_MAX 1000
 
+#define WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST_MIN 256
+#define WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST_MAX 1000
+
 #define WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING_MIN 8
 #define WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING_MAX 512
 
@@ -600,6 +609,13 @@
 		WLAN_CFG_INT_BATCH_THRESHOLD_OTHER, \
 		CFG_VALUE_OR_DEFAULT, "DP INT batch threshold Other")
 
+#define CFG_DP_INT_BATCH_THRESHOLD_MON_DEST \
+		CFG_INI_UINT("dp_int_batch_threshold_mon_dest", \
+		WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST_MIN, \
+		WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST_MAX, \
+		WLAN_CFG_INT_BATCH_THRESHOLD_MON_DEST, \
+		CFG_VALUE_OR_DEFAULT, "DP INT batch threshold mon_dest")
+
 #define CFG_DP_INT_BATCH_THRESHOLD_RX \
 		CFG_INI_UINT("dp_int_batch_threshold_rx", \
 		WLAN_CFG_INT_BATCH_THRESHOLD_RX_MIN, \
@@ -635,6 +651,13 @@
 		WLAN_CFG_INT_TIMER_THRESHOLD_OTHER, \
 		CFG_VALUE_OR_DEFAULT, "DP INT timer threshold Other")
 
+#define CFG_DP_INT_TIMER_THRESHOLD_MON_DEST \
+		CFG_INI_UINT("dp_int_timer_threshold_mon_dest", \
+		WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST_MIN, \
+		WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST_MAX, \
+		WLAN_CFG_INT_TIMER_THRESHOLD_MON_DEST, \
+		CFG_VALUE_OR_DEFAULT, "DP INT timer threshold mon dest")
+
 #define CFG_DP_INT_TIMER_THRESHOLD_RX \
 		CFG_INI_UINT("dp_int_timer_threshold_rx", \
 		WLAN_CFG_INT_TIMER_THRESHOLD_RX_MIN, \
@@ -2002,11 +2025,13 @@
 #define CFG_DP \
 		CFG(CFG_DP_HTT_PACKET_TYPE) \
 		CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
+		CFG(CFG_DP_INT_BATCH_THRESHOLD_MON_DEST) \
 		CFG(CFG_DP_INT_BATCH_THRESHOLD_PPE2TCL) \
 		CFG(CFG_DP_INT_BATCH_THRESHOLD_RX) \
 		CFG(CFG_DP_INT_BATCH_THRESHOLD_TX) \
 		CFG(CFG_DP_INT_TIMER_THRESHOLD_PPE2TCL) \
 		CFG(CFG_DP_INT_TIMER_THRESHOLD_OTHER) \
+		CFG(CFG_DP_INT_TIMER_THRESHOLD_MON_DEST) \
 		CFG(CFG_DP_INT_TIMER_THRESHOLD_RX) \
 		CFG(CFG_DP_INT_TIMER_THRESHOLD_TX) \
 		CFG(CFG_DP_MAX_ALLOC_SIZE) \

+ 18 - 0
wlan_cfg/wlan_cfg.c

@@ -4046,6 +4046,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
 		cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
 	wlan_cfg_ctx->int_timer_threshold_other =
 		cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
+	wlan_cfg_ctx->int_batch_threshold_mon_dest =
+		cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
+	wlan_cfg_ctx->int_timer_threshold_mon_dest =
+		cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
 	wlan_cfg_ctx->pktlog_buffer_size =
 		cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
 
@@ -4246,6 +4250,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
 		cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
 	wlan_cfg_ctx->int_timer_threshold_other =
 		cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
+	wlan_cfg_ctx->int_batch_threshold_mon_dest =
+		cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_MON_DEST);
+	wlan_cfg_ctx->int_timer_threshold_mon_dest =
+		cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_MON_DEST);
 	wlan_cfg_ctx->int_batch_threshold_ppe2tcl =
 			cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_PPE2TCL);
 	wlan_cfg_ctx->int_timer_threshold_ppe2tcl =
@@ -5136,6 +5144,16 @@ int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
 	return cfg->int_timer_threshold_other;
 }
 
+int wlan_cfg_get_int_batch_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return cfg->int_batch_threshold_mon_dest;
+}
+
+int wlan_cfg_get_int_timer_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return cfg->int_timer_threshold_mon_dest;
+}
+
 int wlan_cfg_get_p2p_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg)
 {
 	return cfg->p2p_tcp_udp_checksumoffload;

+ 22 - 0
wlan_cfg/wlan_cfg.h

@@ -173,6 +173,8 @@ struct wlan_srng_cfg {
  * @int_timer_threshold_rx:
  * @int_batch_threshold_other:
  * @int_timer_threshold_other:
+ * @int_batch_threshold_mon_dest: Batch threshold counter for monitor dest
+ * @int_timer_threshold_mon_dest: Timer threshold counter for monitor dest
  * @tx_ring_size:
  * @time_control_bp:
  * @qref_control_size: list size for memory history arrays
@@ -380,6 +382,8 @@ struct wlan_cfg_dp_soc_ctxt {
 	int int_timer_threshold_rx;
 	int int_batch_threshold_other;
 	int int_timer_threshold_other;
+	int int_batch_threshold_mon_dest;
+	int int_timer_threshold_mon_dest;
 	int tx_ring_size;
 	int time_control_bp;
 	int qref_control_size;
@@ -1535,6 +1539,24 @@ int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  */
 int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
 
+/**
+ * wlan_cfg_get_int_batch_threshold_mon_dest - Get interrupt mitigation cfg for
+ * monitor destination srng
+ * @cfg: soc configuration context
+ *
+ * Return: Batch threshold
+ */
+int wlan_cfg_get_int_batch_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg);
+
+/**
+ * wlan_cfg_get_int_timer_threshold_mon_dest - Get interrupt mitigation cfg for
+ * monitor destination srngs
+ * @cfg: soc configuration context
+ *
+ * Return: Timer threshold
+ */
+int wlan_cfg_get_int_timer_threshold_mon_dest(struct wlan_cfg_dp_soc_ctxt *cfg);
+
 /**
  * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status
  * @cfg: soc configuration context