summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhargav Shah <c_bhargv@qti.qualcomm.com>2016-06-16 14:35:59 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-06-20 16:10:53 +0530
commite9dca751fd151b4f025e00c47039e23c17495c2f (patch)
treef6918b933bdbf3d6a25148f46c704c710c270531
parent633eed970909a49821dc16f2d9b8e9d77ac134ba (diff)
qcacld-2.0: Check consistency in throughput before setting delack
Presently, throughput is measured in every 100ms. Delack is set to 20 if throughput for this time duration is greater then threshold (57 Mbps). In the case of packet drop, tcp takes more time to rampup. In this change, check the throughput consistency for three second and then set tcp delack to 20. CRs-Fixed: 1028085 Change-Id: I155bc141087104ad1443d250711423d5fa936254
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h6
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h1
-rw-r--r--CORE/HDD/inc/wlan_hdd_tx_rx.h10
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c10
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c15
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c24
7 files changed, 63 insertions, 4 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 515e61f1e43d..3163873cd198 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -2901,6 +2901,11 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_TCP_DELACK_THRESHOLD_LOW_MIN ( 0 )
#define CFG_TCP_DELACK_THRESHOLD_LOW_MAX ( 10000 )
+#define CFG_TCP_DELACK_TIMER_COUNT "gTcpDelAckTimerCount"
+#define CFG_TCP_DELACK_TIMER_COUNT_DEFAULT ( 30 )
+#define CFG_TCP_DELACK_TIMER_COUNT_MIN ( 1 )
+#define CFG_TCP_DELACK_TIMER_COUNT_MAX ( 1000 )
+
/* TCP_TX_HIGH_TPUT_THRESHOLD specifies the threshold of packets transmitted
* over a period of 100 ms beyond which TCP can be considered to have a high
@@ -4451,6 +4456,7 @@ struct hdd_config {
v_U32_t busBandwidthComputeInterval;
v_U32_t tcpDelackThresholdHigh;
v_U32_t tcpDelackThresholdLow;
+ uint32_t tcpDelackTimerCount;
uint32_t tcp_tx_high_tput_thres;
#endif /* FEATURE_BUS_BANDWIDTH */
#ifdef QCA_SUPPORT_TXRX_HL_BUNDLE
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 7e9e60d8e1d4..7e3a85a3b86c 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1819,6 +1819,7 @@ struct hdd_context_s
* at runtime and intersecting it with target capab before updating.
*/
uint32_t fine_time_meas_cap_target;
+ uint32_t rx_high_ind_cnt;
int radio_index;
diff --git a/CORE/HDD/inc/wlan_hdd_tx_rx.h b/CORE/HDD/inc/wlan_hdd_tx_rx.h
index 5d6a83e97baf..df434b1da0b1 100644
--- a/CORE/HDD/inc/wlan_hdd_tx_rx.h
+++ b/CORE/HDD/inc/wlan_hdd_tx_rx.h
@@ -244,6 +244,16 @@ void hdd_tx_resume_timer_expired_handler(void *adapter_context);
#endif /* QCA_LL_TX_FLOW_CT */
/**
+ * hdd_rst_tcp_delack() - Reset tcp delack value to original level.
+ * @hdd_context_t : HDD context
+ *
+ * HDD will call this API on unloading path to clear delack value.
+ *
+ * Return: None
+ */
+void hdd_rst_tcp_delack(hdd_context_t *hdd_ctx);
+
+/**
* hdd_mon_rx_packet_cbk() - Receive callback registered with TL.
* @vosContext: [in] pointer to VOS context
* @staId: [in] Station Id
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index af88009372fb..2d25ef888138 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3546,6 +3546,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_TCP_DELACK_THRESHOLD_LOW_MIN,
CFG_TCP_DELACK_THRESHOLD_LOW_MAX ),
+ REG_VARIABLE( CFG_TCP_DELACK_TIMER_COUNT, WLAN_PARAM_Integer,
+ hdd_config_t, tcpDelackTimerCount,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_TCP_DELACK_TIMER_COUNT_DEFAULT,
+ CFG_TCP_DELACK_TIMER_COUNT_MIN,
+ CFG_TCP_DELACK_TIMER_COUNT_MAX ),
+
REG_VARIABLE( CFG_TCP_TX_HIGH_TPUT_THRESHOLD_NAME, WLAN_PARAM_Integer,
hdd_config_t, tcp_tx_high_tput_thres,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5199,6 +5206,9 @@ void print_hdd_cfg(hdd_context_t *pHddCtx)
"Name = [gTcpDelAckThresholdLow] Value = [%u] ",
pHddCtx->cfg_ini->tcpDelackThresholdLow);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [tcpDelackTimerCount] Value = [%u] ",
+ pHddCtx->cfg_ini->tcpDelackTimerCount);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
"Name = [%s] Value = [%u] ", CFG_TCP_TX_HIGH_TPUT_THRESHOLD_NAME,
pHddCtx->cfg_ini->tcp_tx_high_tput_thres);
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 48e8bc4b067d..56d90e678936 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1962,6 +1962,7 @@ VOS_STATUS hdd_wlan_shutdown(void)
vos_timer_getCurrentState(&pHddCtx->bus_bw_timer))
{
vos_timer_stop(&pHddCtx->bus_bw_timer);
+ hdd_rst_tcp_delack(pHddCtx);
}
#endif
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index f262a5a188cc..c891412a9b5a 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -12922,6 +12922,7 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
vos_timer_getCurrentState(&pHddCtx->bus_bw_timer))
{
vos_timer_stop(&pHddCtx->bus_bw_timer);
+ hdd_rst_tcp_delack(pHddCtx);
}
if (!VOS_IS_STATUS_SUCCESS(vos_timer_destroy(
@@ -13659,10 +13660,15 @@ void hdd_cnss_request_bus_bandwidth(hdd_context_t *pHddCtx,
/* fine-tuning parameters for RX Flows */
temp_rx = (rx_packets + pHddCtx->prev_rx) / 2;
pHddCtx->prev_rx = rx_packets;
- if (temp_rx > pHddCtx->cfg_ini->tcpDelackThresholdHigh)
- next_rx_level = WLAN_SVC_TP_HIGH;
- else
- next_rx_level = WLAN_SVC_TP_LOW;
+ if (temp_rx > pHddCtx->cfg_ini->tcpDelackThresholdHigh) {
+ if ((pHddCtx->cur_rx_level != WLAN_SVC_TP_HIGH) &&
+ (++pHddCtx->rx_high_ind_cnt == pHddCtx->cfg_ini->tcpDelackTimerCount)) {
+ next_rx_level = WLAN_SVC_TP_HIGH;
+ }
+ } else {
+ next_rx_level = WLAN_SVC_TP_LOW;
+ pHddCtx->rx_high_ind_cnt = 0;
+ }
pHddCtx->hdd_txrx_hist[pHddCtx->hdd_txrx_hist_idx].next_rx_level
= next_rx_level;
@@ -17384,6 +17390,7 @@ void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *pAdapter)
if (can_stop == VOS_TRUE) {
vos_timer_stop(&pHddCtx->bus_bw_timer);
+ hdd_rst_tcp_delack(pHddCtx);
tlshim_reset_bundle_require();
}
}
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index e7138c51e0ac..f86e99f5cf28 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -1624,3 +1624,27 @@ void hdd_dhcp_pkt_trace_buf_update (struct sk_buff *skb, int is_transmission,
}
}
#endif
+#ifdef FEATURE_BUS_BANDWIDTH
+/**
+ * hdd_rst_tcp_delack() - Reset tcp delack value to original level
+ * @hdd_context_t : HDD context
+ *
+ * This is single function which is used for reseting TCP delack
+ * value to its original value.
+ *
+ * Return: None
+ */
+void hdd_rst_tcp_delack(hdd_context_t *hdd_ctx)
+{
+ enum cnss_bus_width_type next_level = CNSS_BUS_WIDTH_LOW;
+
+ hdd_ctx->rx_high_ind_cnt = 0;
+ wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, WLAN_SVC_WLAN_TP_IND,
+ &next_level, sizeof(next_level));
+}
+#else
+void hdd_rst_tcp_delack(hdd_context_t *hdd_ctx)
+{
+ return;
+}
+#endif /* FEATURE_BUS_BANDWIDTH */