Browse Source

qcacld-3.0: Force flush of gro_list not required

gro_list is flushed based on timing constraint, no need to force flush
when we dynamically disable the GRO.
Other need for force flush may be to account out of order processing due to
dynamic disable/enable of GRO. But for TCP it is not an issue as TCP stack
makes sure they are delivered in order.

Change-Id: Ie66ca41563dd2b7a4d9c5bf6f4aefdd1b901f2d1
CRs-Fixed: 2389842
Manjunathappa Prakash 6 years ago
parent
commit
a0d3809b49
3 changed files with 4 additions and 22 deletions
  1. 1 0
      core/hdd/inc/wlan_hdd_main.h
  2. 1 1
      core/hdd/src/wlan_hdd_stats.c
  3. 2 21
      core/hdd/src/wlan_hdd_tx_rx.c

+ 1 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -477,6 +477,7 @@ struct hdd_tx_rx_stats {
 	__u32 rx_aggregated;
 	__u32 rx_non_aggregated;
 	__u32 rx_gro_flushes;
+	/* Dynamic GRO disable/enable, flush may be required for UDP GRO */
 	__u32 rx_gro_force_flushes;
 
 	/* txflow stats */

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

@@ -6191,7 +6191,7 @@ void wlan_hdd_display_txrx_stats(struct hdd_context *ctx)
 				  i, stats->rx_packets[i], stats->rx_dropped[i],
 				  stats->rx_delivered[i], stats->rx_refused[i]);
 		}
-		hdd_debug("RX - packets %u, dropped %u, delivered %u, refused %u\nGRO - agg %u non-agg %u flushes(%u %u) disabled(conc %u low-tput %u)",
+		hdd_debug("RX - packets %u, dropped %u, delivered %u, refused %u GRO - agg %u non-agg %u flushes(%u %u) disabled(conc %u low-tput %u)",
 			  total_rx_pkt, total_rx_dropped, total_rx_delv,
 			  total_rx_refused, stats->rx_aggregated,
 			  stats->rx_non_aggregated, stats->rx_gro_flushes,

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

@@ -1592,12 +1592,10 @@ QDF_STATUS hdd_gro_rx_dp_thread(struct hdd_adapter *adapter,
 {
 	struct napi_struct *napi_to_use = NULL;
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	bool gro_disabled_temp = false;
 	struct hdd_context *hdd_ctx = adapter->hdd_ctx;
 
 	if (!adapter->hdd_ctx->enable_dp_rx_threads) {
 		hdd_dp_err_rl("gro not supported without DP RX thread!");
-		status = QDF_STATUS_E_FAILURE;
 		return status;
 	}
 
@@ -1607,28 +1605,11 @@ QDF_STATUS hdd_gro_rx_dp_thread(struct hdd_adapter *adapter,
 
 	if (!napi_to_use) {
 		hdd_dp_err_rl("no napi to use for GRO!");
-		status = QDF_STATUS_E_FAILURE;
 		return status;
 	}
 
-	gro_disabled_temp =
-		qdf_atomic_read(&hdd_ctx->disable_rx_ol_in_low_tput);
-
-	if (!gro_disabled_temp) {
-		/* nothing to do */
-	} else {
-		/*
-		 * GRO is disabled temporarily, but there is a pending
-		 * gro_list, flush it.
-		 */
-		if (napi_to_use->gro_list) {
-			QDF_NBUF_CB_RX_FLUSH_IND(skb) = 1;
-			adapter->hdd_stats.tx_rx_stats.rx_gro_force_flushes++;
-		} else {
-			status = QDF_STATUS_E_FAILURE;
-			return status;
-		}
-	}
+	if (qdf_atomic_read(&hdd_ctx->disable_rx_ol_in_low_tput))
+		return status;
 
 	status = hdd_gro_rx_bh_disable(adapter, napi_to_use, skb);