From 1ba1537bfc18daa5b5eb199f860cdee13d109f15 Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Mon, 23 Jan 2017 02:20:10 -0800 Subject: qcacld-3.0: Disable TCP delayed ack if LRO is enabled Coexistence of TCP delayed ack and LRO could be detrimental with a smaller window size. So disable TCP delayed ack dynamically if LRO is enabled. Change-Id: I0660e78269da548bc3a5ad0ed6b8f3865046b8b4 CRs-Fixed: 1114687 --- core/hdd/src/wlan_hdd_lro.c | 19 ++++++++++++++++++- core/hdd/src/wlan_hdd_main.c | 7 +++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index c71ee2860196..57b1c16fac51 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -536,6 +536,11 @@ int hdd_lro_enable(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) ol_register_lro_flush_cb(hdd_lro_flush, hdd_init_lro_mgr); adapter->dev->features |= NETIF_F_LRO; + if (hdd_ctx->config->enable_tcp_delack) { + hdd_ctx->config->enable_tcp_delack = 0; + hdd_reset_tcp_delack(hdd_ctx); + } + hdd_info("LRO Enabled"); return 0; @@ -662,6 +667,11 @@ void hdd_lro_display_stats(hdd_context_t *hdd_ctx) */ void hdd_enable_lro_in_concurrency(hdd_context_t *hdd_ctx) { + if (hdd_ctx->config->enable_tcp_delack) { + hdd_info("Disable TCP delack as LRO is enabled"); + hdd_ctx->config->enable_tcp_delack = 0; + hdd_reset_tcp_delack(hdd_ctx); + } qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 0); } @@ -673,5 +683,12 @@ void hdd_enable_lro_in_concurrency(hdd_context_t *hdd_ctx) */ void hdd_disable_lro_in_concurrency(hdd_context_t *hdd_ctx) { + if (!hdd_ctx->config->enable_tcp_delack) { + hdd_info("Enable TCP delack as LRO disabled in concurrency"); + wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, + WLAN_SVC_WLAN_TP_IND, &hdd_ctx->cur_rx_level, + sizeof(hdd_ctx->cur_rx_level)); + hdd_ctx->config->enable_tcp_delack = 1; + } qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1); } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 57a2a03a1c25..ca24d456f70a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7926,8 +7926,11 @@ int hdd_configure_cds(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) goto hdd_features_deinit; } - dp_cbacks.hdd_en_lro_in_cc_cb = hdd_enable_lro_in_concurrency; - dp_cbacks.hdd_disble_lro_in_cc_cb = hdd_disable_lro_in_concurrency; + if (hdd_ctx->config->lro_enable) { + dp_cbacks.hdd_en_lro_in_cc_cb = hdd_enable_lro_in_concurrency; + dp_cbacks.hdd_disble_lro_in_cc_cb = + hdd_disable_lro_in_concurrency; + } dp_cbacks.ol_txrx_update_mac_id_cb = ol_txrx_update_mac_id; if (cds_register_dp_cb(&dp_cbacks) != QDF_STATUS_SUCCESS) hdd_err("Unable to register datapath callbacks in CDS"); -- cgit v1.2.3