소스 검색

qcacld-3.0: Calculate HDD TX stats correctly for TSO packets

Currently the number of TX packets sent is simply calculated by the
number of times hard_xmit_function is called. We use the number of TX
(and Rx) packets in a 100ms interval, to tweak the system for high
bandwidth scenarios.
For, TSO jumbo packets, in high throughput scenarios, the number of TX
packets received in 100ms interval remains low because of aggregation.
This causes the driver to incorrectly detect the throughput mode(low).

Calculate total TX packet (in 100 ms interval) based on the size of the TSO
jumbo packet. This will allow the driver to trigger high throughput mode
and tweak system parameters correctly.

Change-Id: I3c7a3c3992b41d3a00ff903e6317a62394c1c0fe
CRs-Fixed: 2002971
Mohit Khanna 8 년 전
부모
커밋
b1dd1e8749
3개의 변경된 파일13개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 1
      core/hdd/src/wlan_hdd_main.c
  2. 6 1
      core/hdd/src/wlan_hdd_softap_tx_rx.c
  3. 5 1
      core/hdd/src/wlan_hdd_tx_rx.c

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

@@ -5842,13 +5842,14 @@ static void hdd_pld_request_bus_bandwidth(hdd_context_t *hdd_ctx,
 	temp_rx = (rx_packets + hdd_ctx->prev_rx) / 2;
 
 	hdd_ctx->prev_rx = rx_packets;
+
+	next_rx_level = WLAN_SVC_TP_LOW;
 	if (temp_rx > hdd_ctx->config->tcpDelackThresholdHigh) {
 		if ((hdd_ctx->cur_rx_level != WLAN_SVC_TP_HIGH) &&
 		   (++hdd_ctx->rx_high_ind_cnt == delack_timer_cnt)) {
 			next_rx_level = WLAN_SVC_TP_HIGH;
 		}
 	} else {
-		next_rx_level = WLAN_SVC_TP_LOW;
 		hdd_ctx->rx_high_ind_cnt = 0;
 	}
 

+ 6 - 1
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -374,7 +374,12 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
 #endif
 
 	pAdapter->stats.tx_bytes += skb->len;
-	++pAdapter->stats.tx_packets;
+
+	if (qdf_nbuf_is_tso(skb))
+		pAdapter->stats.tx_packets += qdf_nbuf_get_tso_num_seg(skb);
+	else {
+		++pAdapter->stats.tx_packets;
+	}
 
 	hdd_event_eapol_log(skb, QDF_TX);
 	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);

+ 5 - 1
core/hdd/src/wlan_hdd_tx_rx.c

@@ -627,7 +627,11 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	wlan_hdd_tdls_update_tx_pkt_cnt(pAdapter, skb);
 
-	++pAdapter->stats.tx_packets;
+	if (qdf_nbuf_is_tso(skb))
+		pAdapter->stats.tx_packets += qdf_nbuf_get_tso_num_seg(skb);
+	else {
+		++pAdapter->stats.tx_packets;
+	}
 
 	hdd_event_eapol_log(skb, QDF_TX);
 	qdf_dp_trace_log_pkt(pAdapter->sessionId, skb, QDF_TX);