Skip to contentSkip to conversation

ath10k: Enable RX batching

PATCH Applied Sujith Manoharan 2 participants 7 messages Dec 29, 2014 – Jan 12, 2015 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Enable RX batching

From: Sujith Manoharan <[email protected]>

This feature allows the FW to batch RX indications, reducing the rate of host interrupt generation, which in turn reduces CPU load. Currently, this is enabled only for the 10.2 firmware.

---
 drivers/net/wireless/ath/ath10k/wmi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +4 -1
index b103122..aad08a2 100644
@@ -3710,7 +3710,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar)
 	struct wmi_init_cmd_10_2 *cmd;
 	struct sk_buff *buf;
 	struct wmi_resource_config_10x config = {};
-	u32 len, val;
+	u32 len, val, features = 0;
 
 	config.num_vdevs = __cpu_to_le32(TARGET_10X_NUM_VDEVS);
 	config.num_peers = __cpu_to_le32(TARGET_10X_NUM_PEERS);
@@ -3764,6 +3764,9 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar)
 
 	cmd = (struct wmi_init_cmd_10_2 *)buf->data;
 
+	features |= WMI_10_2_RX_BATCH_MODE;
+	cmd->resource_config.feature_mask = __cpu_to_le32(features);
+
 	memcpy(&cmd->resource_config.common, &config, sizeof(config));
 	ath10k_wmi_put_host_mem_chunks(ar, &cmd->mem_chunks);
 
Signature · 1 line
2.2.1
#1 lore raw
Quoted 8 lines · Sujith Manoharan

From: Sujith Manoharan <[email protected]>

This feature allows the FW to batch RX indications, reducing the rate of host interrupt generation, which in turn reduces CPU load. Currently, this is enabled only for the 10.2 firmware.

Any throughput improvements?

Also I simplified the patch a bit in ath-next-test:

drivers/net/wireless/ath/ath10k/wmi.c +2 -2
@@ -3710,7 +3710,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar)
        struct wmi_init_cmd_10_2 *cmd;
        struct sk_buff *buf;
        struct wmi_resource_config_10x config = {};
-       u32 len, val, features = 0;
+       u32 len, val, features;
 
        config.num_vdevs = __cpu_to_le32(TARGET_10X_NUM_VDEVS);
        config.num_peers = __cpu_to_le32(TARGET_10X_NUM_PEERS);
@@ -3764,7 +3764,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar)
 
        cmd = (struct wmi_init_cmd_10_2 *)buf->data;
 
-       features |= WMI_10_2_RX_BATCH_MODE;
+       features = WMI_10_2_RX_BATCH_MODE;
        cmd->resource_config.feature_mask = __cpu_to_le32(features);
 
        memcpy(&cmd->resource_config.common, &config, sizeof(config));
Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 1 line · Kalle Valo

Any throughput improvements?

Along with the other patch and an internal fix,
UDP RX increased to about 950 Mbps.

Sujith

#3 lore raw
Quoted 2 lines · Sujith Manoharan

Along with the other patch and an internal fix,
UDP RX increased to about 950 Mbps.

What was the number before?

Signature · 1 line
Kalle Valo
#4 lore raw
Quoted 4 lines · Kalle Valo
Quoted 2 lines

Along with the other patch and an internal fix,
UDP RX increased to about 950 Mbps.

What was the number before?

It was about 600 Mbps. Maybe slightly higher, but the CPU was maxed out by the torrent of tasklets trying to replenish HTT buffers.

Sujith

#5 lore raw
Quoted 9 lines · Sujith Manoharan
Quoted 4 lines · Kalle Valo
Quoted 2 lines

Along with the other patch and an internal fix,
UDP RX increased to about 950 Mbps.

What was the number before?

It was about 600 Mbps. Maybe slightly higher, but the CPU was maxed out by the torrent of tasklets trying to replenish HTT buffers.

Wow, that's a huge improvement.

Signature · 1 line
Kalle Valo