diff --git a/core/hdd/inc/hdd_dp_cfg.h b/core/hdd/inc/hdd_dp_cfg.h
index 6a8acce08305..7592d9ddafc2 100644
--- a/core/hdd/inc/hdd_dp_cfg.h
+++ b/core/hdd/inc/hdd_dp_cfg.h
@@ -43,6 +43,22 @@
#define CFG_RX_MODE_DEFAULT (CFG_ENABLE_RX_THREAD | CFG_ENABLE_NAPI)
#endif
+/* Max # of packets to be processed in 1 tx comp loop */
+#define CFG_DP_TX_COMP_LOOP_PKT_LIMIT_DEFAULT 64
+#define CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX (1024 * 1024)
+
+/*Max # of packets to be processed in 1 rx reap loop */
+#define CFG_DP_RX_REAP_LOOP_PKT_LIMIT_DEFAULT 64
+#define CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX (1024 * 1024)
+
+/* Max # of HP OOS (out of sync) updates */
+#define CFG_DP_RX_HP_OOS_UPDATE_LIMIT_DEFAULT 0
+#define CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX 1024
+
+/* Max Yield time duration for RX Softirq */
+#define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_DEFAULT (500 * 1000)
+#define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX (10 * 1000 * 1000)
+
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
/*
@@ -763,6 +779,81 @@
CFG_VALUE_OR_DEFAULT, \
"Control to decide rx mode for packet procesing")
+/*
+ *
+ * tx_comp_loop_pkt_limit - Control to decide max # of packets to be processed
+ * in 1 tx comp loop
+ *
+ * @Min: 8
+ * @Max: CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_DP_TX_COMP_LOOP_PKT_LIMIT \
+ CFG_INI_UINT("tx_comp_loop_pkt_limit", \
+ 1, CFG_DP_TX_COMP_LOOP_PKT_LIMIT_MAX, \
+ CFG_DP_TX_COMP_LOOP_PKT_LIMIT_DEFAULT, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Control to decide tx comp loop pkt limit")
+/*
+ *
+ * rx_reap_loop_pkt_limit - Control to decide max # of packets to be reaped
+ * in 1 dp_rx_process reap loop
+ *
+ * @Min: 8
+ * @Max: CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_DP_RX_REAP_LOOP_PKT_LIMIT \
+ CFG_INI_UINT("rx_reap_loop_pkt_limit", \
+ 0, CFG_DP_RX_REAP_LOOP_PKT_LIMIT_MAX, \
+ CFG_DP_RX_REAP_LOOP_PKT_LIMIT_DEFAULT, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Control to decide rx reap loop packet limit")
+
+/*
+ *
+ * rx_hp_oos_update_limit - Control to decide max # of HP OOS (out of sync)
+ * updates
+ *
+ * @Min: 0
+ * @Max: CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_DP_RX_HP_OOS_UPDATE_LIMIT \
+ CFG_INI_UINT("rx_hp_oos_update_limit", \
+ 0, CFG_DP_RX_HP_OOS_UPDATE_LIMIT_MAX, \
+ CFG_DP_RX_HP_OOS_UPDATE_LIMIT_DEFAULT, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Control to decide HP OOS update limit")
+
+/*
+ *
+ * rx_softirq_max_yield_duration_ns - Control to decide max duration for RX
+ * softirq
+ *
+ * @Min: 100 * 1000 , 100us
+ * @Max: CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS \
+ CFG_INI_UINT("rx_softirq_max_yield_duration_ns", \
+ 100 * 1000, CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_MAX, \
+ CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS_DEFAULT, \
+ CFG_VALUE_OR_DEFAULT, \
+ "max yield time duration for RX Softirq")
+
/*
*
* enable_multicast_replay_filter - Enable filtering of replayed multicast
@@ -979,6 +1070,10 @@
CFG(CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST) \
CFG(CFG_DP_TX_ORPHAN_ENABLE) \
CFG(CFG_DP_RX_MODE) \
+ CFG(CFG_DP_TX_COMP_LOOP_PKT_LIMIT)\
+ CFG(CFG_DP_RX_REAP_LOOP_PKT_LIMIT)\
+ CFG(CFG_DP_RX_HP_OOS_UPDATE_LIMIT)\
+ CFG(CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS)\
CFG(CFG_DP_CE_SERVICE_MAX_RX_IND_FLUSH) \
CFG(CFG_DP_CE_SERVICE_MAX_YIELD_TIME) \
CFG(CFG_DP_ENABLE_TCP_PARAM_UPDATE) \
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index d7b191f01453..b1bc3bb35456 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -154,7 +154,10 @@ struct hdd_config {
bool enable_packet_log;
#endif
uint32_t rx_mode;
-
+ uint32_t tx_comp_loop_pkt_limit;
+ uint32_t rx_reap_loop_pkt_limit;
+ uint32_t rx_hp_oos_update_limit;
+ uint64_t rx_softirq_max_yield_duration_ns;
#ifdef WLAN_FEATURE_DP_BUS_BANDWIDTH
uint32_t bus_bw_high_threshold;
uint32_t bus_bw_medium_threshold;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 163a0785dab2..f236d111d2e1 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -14115,12 +14115,44 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx)
cfg.enable_self_recovery = self_recovery;
hdd_populate_runtime_cfg(hdd_ctx, &cfg);
+ cfg.rx_softirq_max_yield_duration_ns =
+ cfg_get(hdd_ctx->psoc,
+ CFG_DP_RX_SOFTIRQ_MAX_YIELD_TIME_NS);
+
hif_init_ini_config(scn, &cfg);
if (prevent_link_down)
hif_vote_link_up(scn);
}
+#ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT
+/**
+ * hdd_update_dp_config_rx_softirq_limits() - Update DP rx softirq limit config
+ * datapath
+ * @hdd_ctx: HDD Context
+ * @params: pointer to cdp_config_params to be updated
+ *
+ * Void
+ */
+static
+void hdd_update_dp_config_rx_softirq_limits(struct hdd_context *hdd_ctx,
+ struct cdp_config_params *params)
+{
+ params->tx_comp_loop_pkt_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_TX_COMP_LOOP_PKT_LIMIT);
+ params->rx_reap_loop_pkt_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_RX_REAP_LOOP_PKT_LIMIT);
+ params->rx_hp_oos_update_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_RX_HP_OOS_UPDATE_LIMIT);
+}
+#else
+static
+void hdd_update_dp_config_rx_softirq_limits(struct hdd_context *hdd_ctx,
+ struct cdp_config_params *params)
+{
+}
+#endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
+
/**
* hdd_update_dp_config() - Propagate config parameters to Lithium
* datapath
@@ -14150,6 +14182,13 @@ static int hdd_update_dp_config(struct hdd_context *hdd_ctx)
CFG_DP_TCP_UDP_CKSUM_OFFLOAD);
params.ipa_enable = ucfg_ipa_is_enabled();
params.gro_enable = cfg_get(hdd_ctx->psoc, CFG_DP_GRO);
+ params.tx_comp_loop_pkt_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_TX_COMP_LOOP_PKT_LIMIT);
+ params.rx_reap_loop_pkt_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_RX_REAP_LOOP_PKT_LIMIT);
+ params.rx_hp_oos_update_limit = cfg_get(hdd_ctx->psoc,
+ CFG_DP_RX_HP_OOS_UPDATE_LIMIT);
+ hdd_update_dp_config_rx_softirq_limits(hdd_ctx, ¶ms);
status = cdp_update_config_parameters(soc, ¶ms);
if (status) {