Browse Source

qcacld-3.0: Disable TCP delack if GRO is enabled

Takecare to disable TCP delack internally if GRO is enabled.
This is required as enabling both will have adverse effect with
smaller window size and noisy scenario.

Change-Id: If91236620d87287c9b71901e9d8e3d176eebc648
CRs-Fixed: 2172652
Manjunathappa Prakash 7 years ago
parent
commit
bfd1276375

+ 2 - 0
core/hdd/inc/wlan_hdd_tx_rx.h

@@ -188,8 +188,10 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb);
 
 #ifdef MSM_PLATFORM
 void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx);
+#define HDD_MSM_CFG(msm_cfg)	msm_cfg
 #else
 static inline void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) {}
+#define HDD_MSM_CFG(msm_cfg)	0
 #endif
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT

+ 1 - 1
core/hdd/src/wlan_hdd_lro.c

@@ -142,7 +142,7 @@ hdd_lro_set_reset(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter,
 		adapter->dev->features &= ~NETIF_F_LRO;
 		hdd_debug("LRO Disabled");
 
-		if (hdd_ctx->en_tcp_delack_no_lro) {
+		if (hdd_ctx->config->enable_tcp_delack) {
 			struct wlan_rx_tp_data rx_tp_data;
 
 			hdd_debug("Enable TCP delack as LRO is disabled");

+ 2 - 2
core/hdd/src/wlan_hdd_main.c

@@ -7140,7 +7140,7 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
 		 * to default delayed ack. Note that this will disable the
 		 * dynamic delayed ack mechanism across the system
 		 */
-		if (hdd_ctx->config->enable_tcp_delack)
+		if (hdd_ctx->en_tcp_delack_no_lro)
 			rx_tp_data.rx_tp_flags |= TCP_DEL_ACK_IND;
 
 		if (hdd_ctx->config->enable_tcp_adv_win_scale)
@@ -7437,7 +7437,7 @@ void wlan_hdd_display_tx_rx_histogram(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->busBandwidthMediumThreshold,
 		hdd_ctx->config->busBandwidthLowThreshold);
 	hdd_debug("Enable TCP DEL ACK: %d",
-		hdd_ctx->config->enable_tcp_delack);
+		hdd_ctx->en_tcp_delack_no_lro);
 	hdd_debug("TCP DEL High TH: %d TCP DEL Low TH: %d",
 		hdd_ctx->config->tcpDelackThresholdHigh,
 		hdd_ctx->config->tcpDelackThresholdLow);

+ 6 - 2
core/hdd/src/wlan_hdd_tx_rx.c

@@ -1620,6 +1620,8 @@ static void hdd_register_rx_ol(void)
 	if  (!hdd_ctx)
 		hdd_err("HDD context is NULL");
 
+	hdd_ctx->en_tcp_delack_no_lro = 0;
+
 	if (hdd_ctx->ol_enable == CFG_LRO_ENABLED) {
 		cdp_register_rx_offld_flush_cb(soc, hdd_qdf_lro_flush);
 		hdd_ctx->receive_offload_cb = hdd_lro_rx;
@@ -1633,6 +1635,8 @@ static void hdd_register_rx_ol(void)
 						       hdd_hif_napi_gro_flush);
 		hdd_ctx->receive_offload_cb = hdd_gro_rx;
 		hdd_debug("GRO is enabled");
+	} else if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) {
+		hdd_ctx->en_tcp_delack_no_lro = 1;
 	}
 }
 
@@ -1685,7 +1689,7 @@ void hdd_disable_rx_ol_in_concurrency(bool disable)
 	}
 
 	if (disable) {
-		if (hdd_ctx->en_tcp_delack_no_lro) {
+		if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) {
 			struct wlan_rx_tp_data rx_tp_data;
 
 			hdd_info("Enable TCP delack as LRO disabled in concurrency");
@@ -1699,7 +1703,7 @@ void hdd_disable_rx_ol_in_concurrency(bool disable)
 		}
 		qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1);
 	} else {
-		if (hdd_ctx->en_tcp_delack_no_lro) {
+		if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) {
 			hdd_info("Disable TCP delack as LRO is enabled");
 			hdd_ctx->en_tcp_delack_no_lro = 0;
 			hdd_reset_tcp_delack(hdd_ctx);