qcacld-3.0: Enable/Disable LRO for low throughput based on rx packet count

It is observed that LRO is affecting the throughput in low TPUT noisy
scenario as by its nature LRO suppresses the TCP acks.

Change-Id: I9f74418b53492ae12934fc09277aafa0c002ae0b
CRs-Fixed: 2056706
This commit is contained in:
Poddar, Siddarth 2017-10-25 12:17:39 +05:30 • committed by snandini
commit 47c2340287
4 changed files with 31 additions and 1 deletions

View file

@ -51,6 +51,16 @@ enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter, struct sk_buff *skb);
void hdd_lro_display_stats(struct hdd_context *hdd_ctx);
void hdd_disable_lro_in_concurrency(bool);
/**
* hdd_disable_lro_for_low_tput() - enable/disable LRO based on tput
* hdd_ctx: hdd context
* disable: boolean to enable/disable LRO
*
* This API enables/disables LRO based on tput.
*
* Return: void
*/
void hdd_disable_lro_for_low_tput(struct hdd_context *hdd_ctx, bool disable);
#else
static inline int hdd_lro_init(struct hdd_context *hdd_ctx)
{
@ -70,5 +80,10 @@ static inline void hdd_lro_display_stats(struct hdd_context *hdd_ctx)
static inline void hdd_disable_lro_in_concurrency(bool disable)
{
}
static inline void
hdd_disable_lro_for_low_tput(struct hdd_context *hdd_ctx, bool disable)
{
}
#endif /* FEATURE_LRO */
#endif /* __WLAN_HDD_LRO_H__ */

View file

@ -1719,6 +1719,7 @@ struct hdd_context {
int user_configured_pkt_filter_rules;
bool is_fils_roaming_supported;
qdf_atomic_t disable_lro_in_concurrency;
qdf_atomic_t disable_lro_in_low_tput;
bool en_tcp_delack_no_lro;
};

View file

@ -148,7 +148,8 @@ enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx,
if (((adapter->dev->features & NETIF_F_LRO) != NETIF_F_LRO) ||
!QDF_NBUF_CB_RX_TCP_PROTO(skb) ||
QDF_NBUF_CB_RX_PEER_CACHED_FRM(skb) ||
qdf_atomic_read(&hdd_ctx->disable_lro_in_concurrency))
qdf_atomic_read(&hdd_ctx->disable_lro_in_concurrency) ||
qdf_atomic_read(&hdd_ctx->disable_lro_in_low_tput))
return HDD_LRO_NO_RX;
{
@ -237,3 +238,11 @@ void hdd_disable_lro_in_concurrency(bool disable)
qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 0);
}
}
void hdd_disable_lro_for_low_tput(struct hdd_context *hdd_ctx, bool disable)
{
if (disable)
qdf_atomic_set(&hdd_ctx->disable_lro_in_low_tput, 1);
else
qdf_atomic_set(&hdd_ctx->disable_lro_in_low_tput, 0);
}

View file

@ -6406,6 +6406,11 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
hdd_ctx->prev_rx = rx_packets;
if (temp_rx < hdd_ctx->config->busBandwidthLowThreshold)
hdd_disable_lro_for_low_tput(hdd_ctx, true);
else
hdd_disable_lro_for_low_tput(hdd_ctx, false);
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)) {