From e73e3b57dbc8368bb7ecbd56f2ec933e0c730605 Mon Sep 17 00:00:00 2001 From: Prakash Manjunathappa Date: Tue, 27 Feb 2018 18:56:22 -0800 Subject: [PATCH] qcacld-3.0: Add INI to control tcp_limit_output_bytes tuning Current driver posts the high and low Tx TPUT indications to cnss-daemon to tune the tcp_limit_output_byte system parameter. Add option to disable it. Change-Id: Ic65fe0bd762024425cabf2f1f07123211dce5dce CRs-Fixed: 2197112 --- core/hdd/inc/wlan_hdd_cfg.h | 24 ++++++++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 10 ++++++++++ core/hdd/src/wlan_hdd_main.c | 3 ++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 978a44d685d4..97285fe7d35a 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -8267,6 +8267,29 @@ enum hdd_link_speed_rpt_type { #define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_DEFAULT (100) #define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MIN (0) #define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX (10000) + +/* + * + * gEnableTcpLimitOutput - Control to enable TCP limit output byte + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to enable dynamic configuration of TCP limit output bytes + * tcp_limit_output_bytes param. Enabling this will let driver post message to + * cnss-daemon, accordingly cnss-daemon will modify the tcp_limit_output_bytes. + * + * Supported Feature: Tcp limit output bytes + * + * Usage: Internal + * + * + */ +#define CFG_ENABLE_TCP_LIMIT_OUTPUT "gTcpLimitOutputEnable" +#define CFG_ENABLE_TCP_LIMIT_OUTPUT_DEFAULT (1) +#define CFG_ENABLE_TCP_LIMIT_OUTPUT_MIN (0) +#define CFG_ENABLE_TCP_LIMIT_OUTPUT_MAX (1) + /* * * gTcpAdvWinScaleEnable - Control to enable TCP adv window scaling @@ -14883,6 +14906,7 @@ struct hdd_config { uint32_t busBandwidthLowThreshold; uint32_t busBandwidthComputeInterval; uint32_t enable_tcp_delack; + bool enable_tcp_limit_output; uint32_t enable_tcp_adv_win_scale; uint32_t tcpDelackThresholdHigh; uint32_t tcpDelackThresholdLow; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index de2d782023d0..ffca7be43680 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3217,6 +3217,13 @@ struct reg_table_entry g_registry_table[] = { CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MIN, CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX), + REG_VARIABLE(CFG_ENABLE_TCP_LIMIT_OUTPUT, WLAN_PARAM_Integer, + struct hdd_config, enable_tcp_limit_output, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ENABLE_TCP_LIMIT_OUTPUT_DEFAULT, + CFG_ENABLE_TCP_LIMIT_OUTPUT_MIN, + CFG_ENABLE_TCP_LIMIT_OUTPUT_MAX), + REG_VARIABLE(CFG_ENABLE_TCP_ADV_WIN_SCALE, WLAN_PARAM_Integer, struct hdd_config, enable_tcp_adv_win_scale, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -6877,6 +6884,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) hdd_ctx->config->busBandwidthLowThreshold); hdd_debug("Name = [gbusBandwidthComputeInterval] Value = [%u] ", hdd_ctx->config->busBandwidthComputeInterval); + hdd_debug("Name = [%s] Value = [%u] ", + CFG_ENABLE_TCP_LIMIT_OUTPUT, + hdd_ctx->config->enable_tcp_limit_output); hdd_debug("Name = [%s] Value = [%u] ", CFG_ENABLE_TCP_ADV_WIN_SCALE, hdd_ctx->config->enable_tcp_adv_win_scale); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index f4ae64a05844..c029c28695b2 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6931,7 +6931,8 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, else next_tx_level = WLAN_SVC_TP_LOW; - if (hdd_ctx->cur_tx_level != next_tx_level) { + if ((hdd_ctx->config->enable_tcp_limit_output) && + (hdd_ctx->cur_tx_level != next_tx_level)) { hdd_debug("change TCP TX trigger level %d, average_tx: %llu", next_tx_level, temp_tx); hdd_ctx->cur_tx_level = next_tx_level;