All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Throughput fixes for WCN6750
@ 2022-07-20 13:51 ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Fix throughput issues on WCN6750. This includes 160 MHz
throughput fixes in both TX & RX directions.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Manikanta Pubbisetty (3):
  ath11k: Enable threaded NAPI on WCN6750
  ath11k: Add multi TX ring support for WCN6750
  ath11k: Increase TCL data ring size for WCN6750

 drivers/net/wireless/ath/ath11k/ahb.c    |   1 +
 drivers/net/wireless/ath/ath11k/core.c   |  20 +++-
 drivers/net/wireless/ath/ath11k/dp.c     |  26 ++---
 drivers/net/wireless/ath/ath11k/dp.h     |   4 +
 drivers/net/wireless/ath/ath11k/dp_tx.c  |  19 ++--
 drivers/net/wireless/ath/ath11k/hal.c    |   2 +-
 drivers/net/wireless/ath/ath11k/hal.h    |   2 +
 drivers/net/wireless/ath/ath11k/hal_tx.c |   4 +-
 drivers/net/wireless/ath/ath11k/hal_tx.h |   2 +
 drivers/net/wireless/ath/ath11k/hw.c     | 117 ++++++++++++++++++++++-
 drivers/net/wireless/ath/ath11k/hw.h     |  12 +++
 drivers/net/wireless/ath/ath11k/pcic.c   |   1 +
 12 files changed, 179 insertions(+), 31 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 0/3] Throughput fixes for WCN6750
@ 2022-07-20 13:51 ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Fix throughput issues on WCN6750. This includes 160 MHz
throughput fixes in both TX & RX directions.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Manikanta Pubbisetty (3):
  ath11k: Enable threaded NAPI on WCN6750
  ath11k: Add multi TX ring support for WCN6750
  ath11k: Increase TCL data ring size for WCN6750

 drivers/net/wireless/ath/ath11k/ahb.c    |   1 +
 drivers/net/wireless/ath/ath11k/core.c   |  20 +++-
 drivers/net/wireless/ath/ath11k/dp.c     |  26 ++---
 drivers/net/wireless/ath/ath11k/dp.h     |   4 +
 drivers/net/wireless/ath/ath11k/dp_tx.c  |  19 ++--
 drivers/net/wireless/ath/ath11k/hal.c    |   2 +-
 drivers/net/wireless/ath/ath11k/hal.h    |   2 +
 drivers/net/wireless/ath/ath11k/hal_tx.c |   4 +-
 drivers/net/wireless/ath/ath11k/hal_tx.h |   2 +
 drivers/net/wireless/ath/ath11k/hw.c     | 117 ++++++++++++++++++++++-
 drivers/net/wireless/ath/ath11k/hw.h     |  12 +++
 drivers/net/wireless/ath/ath11k/pcic.c   |   1 +
 12 files changed, 179 insertions(+), 31 deletions(-)

-- 
2.35.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-07-20 13:51 ` Manikanta Pubbisetty
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
runs in softirq context and on the core which scheduled the NAPI,
threaded NAPI makes use of kernel threads which are under direct
control of the scheduler and helps in balancing the NAPI processing
load across multiple CPUs thereby improving throughput.

In the case of WCN6750, enabling threaded NAPI has improved
160 MHz RX throughput by nearly 400 Mbps. This should give similar
gains for other ath11k devices as well, therefore enable threaded
NAPI on all other devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
 drivers/net/wireless/ath/ath11k/pcic.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index d7d33d5cdfc5..e44e2f29a88f 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
+			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
index cf12b98c480d..c703db19de51 100644
--- a/drivers/net/wireless/ath/ath11k/pcic.c
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
@@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
+			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
runs in softirq context and on the core which scheduled the NAPI,
threaded NAPI makes use of kernel threads which are under direct
control of the scheduler and helps in balancing the NAPI processing
load across multiple CPUs thereby improving throughput.

In the case of WCN6750, enabling threaded NAPI has improved
160 MHz RX throughput by nearly 400 Mbps. This should give similar
gains for other ath11k devices as well, therefore enable threaded
NAPI on all other devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
 drivers/net/wireless/ath/ath11k/pcic.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index d7d33d5cdfc5..e44e2f29a88f 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
+			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
index cf12b98c480d..c703db19de51 100644
--- a/drivers/net/wireless/ath/ath11k/pcic.c
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
@@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
 		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
 		if (!irq_grp->napi_enabled) {
+			dev_set_threaded(&irq_grp->napi_ndev, true);
 			napi_enable(&irq_grp->napi);
 			irq_grp->napi_enabled = true;
 		}
-- 
2.35.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
  2022-07-20 13:51 ` Manikanta Pubbisetty
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Currently in the case of WCN6750, only one TCL ring is used for TX,
this is limiting the TX throughput in 160 MHz case, enabling multiple
TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
the case of TCP TX, therefore add the support of multi TX ring for
WCN6750.

Currently TCL ring is selected based on CPU ID, this logic cannot be
applied for WCN6750 as there is chance of out of order TX of packets
and to avoid this, choose TCL ring based on flow hash so that packets
of the same flow will end up on same TCL ring. For the same reason,
TCL ring retry logic is also not applicable for WCN6750.

Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.

Change does not impact existing ath11k devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c   |  13 ++-
 drivers/net/wireless/ath/ath11k/dp.c     |  24 +++--
 drivers/net/wireless/ath/ath11k/dp.h     |   2 +
 drivers/net/wireless/ath/ath11k/dp_tx.c  |  19 ++--
 drivers/net/wireless/ath/ath11k/hal.c    |   2 +-
 drivers/net/wireless/ath/ath11k/hal.h    |   2 +
 drivers/net/wireless/ath/ath11k/hal_tx.c |   4 +-
 drivers/net/wireless/ath/ath11k/hal_tx.h |   2 +
 drivers/net/wireless/ath/ath11k/hw.c     | 117 ++++++++++++++++++++++-
 drivers/net/wireless/ath/ath11k/hw.h     |  11 +++
 10 files changed, 166 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index c8e0bc935838..a7eaec5798a0 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -111,6 +111,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -187,6 +188,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -262,6 +264,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -337,6 +340,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 2,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -412,6 +416,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6855 hw2.1",
@@ -486,6 +491,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6750 hw1.0",
@@ -498,7 +504,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.max_radios = 1,
 		.bdf_addr = 0x4B0C0000,
 		.hw_ops = &wcn6750_ops,
-		.ring_mask = &ath11k_hw_ring_mask_qca6390,
+		.ring_mask = &ath11k_hw_ring_mask_wcn6750,
 		.internal_sleep_clock = false,
 		.regs = &wcn6750_regs,
 		.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750,
@@ -541,8 +547,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.supports_regdb = true,
 		.fix_l1ss = false,
 		.credit_flow = true,
-		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
-		.hal_params = &ath11k_hw_hal_params_qca6390,
+		.max_tx_ring = DP_TCL_NUM_RING_MAX,
+		.hal_params = &ath11k_hw_hal_params_wcn6750,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = false,
 		.supports_rssi_stats = true,
@@ -560,6 +566,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 2,
 		.fixed_fw_mem = true,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = false,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 8b790ce72e5d..4f7381719840 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <crypto/hash.h>
@@ -131,13 +132,11 @@ static int ath11k_dp_srng_calculate_msi_group(struct ath11k_base *ab,
 
 	switch (type) {
 	case HAL_WBM2SW_RELEASE:
-		if (ring_num < 3) {
-			grp_mask = &ab->hw_params.ring_mask->tx[0];
-		} else if (ring_num == 3) {
+		if (ring_num == DP_RX_RELEASE_RING_NUM) {
 			grp_mask = &ab->hw_params.ring_mask->rx_wbm_rel[0];
 			ring_num = 0;
 		} else {
-			return -ENOENT;
+			grp_mask = &ab->hw_params.ring_mask->tx[0];
 		}
 		break;
 	case HAL_REO_EXCEPTION:
@@ -371,6 +370,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	struct ath11k_dp *dp = &ab->dp;
 	struct hal_srng *srng;
 	int i, ret;
+	u8 tcl_num, wbm_num;
 
 	ret = ath11k_dp_srng_setup(ab, &dp->wbm_desc_rel_ring,
 				   HAL_SW2WBM_RELEASE, 0, 0,
@@ -396,8 +396,11 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	}
 
 	for (i = 0; i < ab->hw_params.max_tx_ring; i++) {
+		tcl_num = ab->hw_params.hal_params->tcl2wbm_rbm_map[i].tcl_ring_num;
+		wbm_num = ab->hw_params.hal_params->tcl2wbm_rbm_map[i].wbm_ring_num;
+
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_data_ring,
-					   HAL_TCL_DATA, i, 0,
+					   HAL_TCL_DATA, tcl_num, 0,
 					   DP_TCL_DATA_RING_SIZE);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_data ring (%d) :%d\n",
@@ -406,7 +409,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 		}
 
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_comp_ring,
-					   HAL_WBM2SW_RELEASE, i, 0,
+					   HAL_WBM2SW_RELEASE, wbm_num, 0,
 					   DP_TX_COMP_RING_SIZE);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_comp ring (%d) :%d\n",
@@ -431,7 +434,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	}
 
 	ret = ath11k_dp_srng_setup(ab, &dp->rx_rel_ring, HAL_WBM2SW_RELEASE,
-				   3, 0, DP_RX_RELEASE_RING_SIZE);
+				   DP_RX_RELEASE_RING_NUM, 0, DP_RX_RELEASE_RING_SIZE);
 	if (ret) {
 		ath11k_warn(ab, "failed to set up rx_rel ring :%d\n", ret);
 		goto err;
@@ -774,9 +777,10 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
 	int i, j;
 	int tot_work_done = 0;
 
-	if (ab->hw_params.ring_mask->tx[grp_id]) {
-		i = __fls(ab->hw_params.ring_mask->tx[grp_id]);
-		ath11k_dp_tx_completion_handler(ab, i);
+	for (i = 0; i < ab->hw_params.max_tx_ring; i++) {
+		if (BIT(ab->hw_params.hal_params->tcl2wbm_rbm_map[i].wbm_ring_num) &
+		    ab->hw_params.ring_mask->tx[grp_id])
+			ath11k_dp_tx_completion_handler(ab, i);
 	}
 
 	if (ab->hw_params.ring_mask->rx_err[grp_id]) {
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index e9dfa209098b..8af2985ca2d9 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -222,6 +222,8 @@ struct ath11k_pdev_dp {
 #define DP_RXDMA_MONITOR_DST_RING_SIZE	2048
 #define DP_RXDMA_MONITOR_DESC_RING_SIZE	4096
 
+#define DP_RX_RELEASE_RING_NUM	3
+
 #define DP_RX_BUFFER_SIZE	2048
 #define	DP_RX_BUFFER_SIZE_LITE  1024
 #define DP_RX_BUFFER_ALIGN_SIZE	128
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index c17a2620aad7..862605858a80 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "core.h"
@@ -93,7 +94,8 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 	u8 pool_id;
 	u8 hal_ring_id;
 	int ret;
-	u8 ring_selector = 0, ring_map = 0;
+	u32 ring_selector = 0;
+	u8 ring_map = 0;
 	bool tcl_ring_retry;
 
 	if (unlikely(test_bit(ATH11K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)))
@@ -105,19 +107,13 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 
 	pool_id = skb_get_queue_mapping(skb) & (ATH11K_HW_MAX_QUEUES - 1);
 
-	/* Let the default ring selection be based on current processor
-	 * number, where one of the 3 tcl rings are selected based on
-	 * the smp_processor_id(). In case that ring
-	 * is full/busy, we resort to other available rings.
-	 * If all rings are full, we drop the packet.
-	 * //TODO Add throttling logic when all rings are full
-	 */
-	ring_selector = smp_processor_id();
+	ring_selector = ab->hw_params.hw_ops->get_ring_selector(skb);
 
 tcl_ring_sel:
 	tcl_ring_retry = false;
 
 	ti.ring_id = ring_selector % ab->hw_params.max_tx_ring;
+	ti.rbm_id = ab->hw_params.hal_params->tcl2wbm_rbm_map[ti.ring_id].rbm_id;
 
 	ring_map |= BIT(ti.ring_id);
 
@@ -129,7 +125,8 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 	spin_unlock_bh(&tx_ring->tx_idr_lock);
 
 	if (unlikely(ret < 0)) {
-		if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1)) {
+		if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1) ||
+		    !ab->hw_params.tcl_ring_retry) {
 			atomic_inc(&ab->soc_stats.tx_err.misc_fail);
 			return -ENOSPC;
 		}
@@ -247,7 +244,7 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 		 * Restart ring selection if some rings are not checked yet.
 		 */
 		if (unlikely(ring_map != (BIT(ab->hw_params.max_tx_ring)) - 1) &&
-		    ab->hw_params.max_tx_ring > 1) {
+		    ab->hw_params.tcl_ring_retry && ab->hw_params.max_tx_ring > 1) {
 			tcl_ring_retry = true;
 			ring_selector++;
 		}
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index bda71ab5a1f2..db8b191c7a4c 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -126,7 +126,7 @@ static const struct hal_srng_config hw_srng_config_template[] = {
 	},
 	{ /* WBM2SW_RELEASE */
 		.start_ring_id = HAL_SRNG_RING_ID_WBM2SW0_RELEASE,
-		.max_rings = 4,
+		.max_rings = 5,
 		.entry_size = sizeof(struct hal_wbm_release_ring) >> 2,
 		.lmac_ring = false,
 		.ring_dir = HAL_SRNG_DIR_DST,
diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h
index 110c337ddf33..e0358062ca2b 100644
--- a/drivers/net/wireless/ath/ath11k/hal.h
+++ b/drivers/net/wireless/ath/ath11k/hal.h
@@ -389,6 +389,7 @@ enum hal_srng_ring_id {
 	HAL_SRNG_RING_ID_WBM2SW1_RELEASE,
 	HAL_SRNG_RING_ID_WBM2SW2_RELEASE,
 	HAL_SRNG_RING_ID_WBM2SW3_RELEASE,
+	HAL_SRNG_RING_ID_WBM2SW4_RELEASE,
 
 	HAL_SRNG_RING_ID_UMAC_ID_END = 127,
 	HAL_SRNG_RING_ID_LMAC1_ID_START,
@@ -678,6 +679,7 @@ enum hal_rx_buf_return_buf_manager {
 	HAL_RX_BUF_RBM_SW1_BM,
 	HAL_RX_BUF_RBM_SW2_BM,
 	HAL_RX_BUF_RBM_SW3_BM,
+	HAL_RX_BUF_RBM_SW4_BM,
 };
 
 #define HAL_SRNG_DESC_LOOP_CNT		0xf0000000
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.c b/drivers/net/wireless/ath/ath11k/hal_tx.c
index c8929de8ce6c..d1b0e36e04a9 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "hal_desc.h"
@@ -44,8 +45,7 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd,
 		FIELD_PREP(BUFFER_ADDR_INFO1_ADDR,
 			   ((uint64_t)ti->paddr >> HAL_ADDR_MSB_REG_SHIFT));
 	tcl_cmd->buf_addr_info.info1 |=
-		FIELD_PREP(BUFFER_ADDR_INFO1_RET_BUF_MGR,
-			   (ti->ring_id + HAL_RX_BUF_RBM_SW0_BM)) |
+		FIELD_PREP(BUFFER_ADDR_INFO1_RET_BUF_MGR, ti->rbm_id) |
 		FIELD_PREP(BUFFER_ADDR_INFO1_SW_COOKIE, ti->desc_id);
 
 	tcl_cmd->info0 =
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h b/drivers/net/wireless/ath/ath11k/hal_tx.h
index 36f4f6f6cbc2..c5e88364afe5 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_HAL_TX_H
@@ -35,6 +36,7 @@ struct hal_tx_info {
 	u8 lmac_id;
 	u8 dscp_tid_tbl_idx;
 	bool enable_mesh;
+	u8 rbm_id;
 };
 
 /* TODO: Check if the actual desc macros can be used instead */
diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index 96db85c55585..ec682f7da172 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -820,6 +820,29 @@ static bool ath11k_hw_wcn6855_rx_desc_get_ldpc_support(struct hal_rx_desc *desc)
 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info2));
 }
 
+static u32 ath11k_hw_ipq8074_get_tcl_ring_selector(struct sk_buff *skb)
+{
+	/* Let the default ring selection be based on current processor
+	 * number, where one of the 3 tcl rings are selected based on
+	 * the smp_processor_id(). In case that ring
+	 * is full/busy, we resort to other available rings.
+	 * If all rings are full, we drop the packet.
+	 * //TODO Add throttling logic when all rings are full
+	 */
+	return smp_processor_id();
+}
+
+static u32 ath11k_hw_wcn6750_get_tcl_ring_selector(struct sk_buff *skb)
+{
+	/* Select the TCL ring based on the flow hash of the SKB instead
+	 * of CPU ID. Since applications pumping the traffic can be scheduled
+	 * on multiple CPUs, there is a chance that packets of the same flow
+	 * could end on different TCL rings, this could sometimes results in
+	 * an out of order arrival of the packets at the receiver.
+	 */
+	return skb_get_hash(skb);
+}
+
 const struct ath11k_hw_ops ipq8074_ops = {
 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
 	.wmi_init_config = ath11k_init_wmi_config_ipq8074,
@@ -857,6 +880,7 @@ const struct ath11k_hw_ops ipq8074_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops ipq6018_ops = {
@@ -896,6 +920,7 @@ const struct ath11k_hw_ops ipq6018_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops qca6390_ops = {
@@ -935,6 +960,7 @@ const struct ath11k_hw_ops qca6390_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops qcn9074_ops = {
@@ -974,6 +1000,7 @@ const struct ath11k_hw_ops qcn9074_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops wcn6855_ops = {
@@ -1013,6 +1040,7 @@ const struct ath11k_hw_ops wcn6855_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_wcn6855_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_wcn6855_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops wcn6750_ops = {
@@ -1052,11 +1080,14 @@ const struct ath11k_hw_ops wcn6750_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_wcn6750_get_tcl_ring_selector,
 };
 
-#define ATH11K_TX_RING_MASK_0 0x1
-#define ATH11K_TX_RING_MASK_1 0x2
-#define ATH11K_TX_RING_MASK_2 0x4
+#define ATH11K_TX_RING_MASK_0 BIT(0)
+#define ATH11K_TX_RING_MASK_1 BIT(1)
+#define ATH11K_TX_RING_MASK_2 BIT(2)
+#define ATH11K_TX_RING_MASK_3 BIT(3)
+#define ATH11K_TX_RING_MASK_4 BIT(4)
 
 #define ATH11K_RX_RING_MASK_0 0x1
 #define ATH11K_RX_RING_MASK_1 0x2
@@ -1903,6 +1934,43 @@ const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074 = {
 	},
 };
 
+const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750 = {
+	.tx  = {
+		ATH11K_TX_RING_MASK_0,
+		0,
+		ATH11K_TX_RING_MASK_2,
+		0,
+		ATH11K_TX_RING_MASK_4,
+	},
+	.rx_mon_status = {
+		0, 0, 0, 0, 0, 0,
+		ATH11K_RX_MON_STATUS_RING_MASK_0,
+	},
+	.rx = {
+		0, 0, 0, 0, 0, 0, 0,
+		ATH11K_RX_RING_MASK_0,
+		ATH11K_RX_RING_MASK_1,
+		ATH11K_RX_RING_MASK_2,
+		ATH11K_RX_RING_MASK_3,
+	},
+	.rx_err = {
+		0, ATH11K_RX_ERR_RING_MASK_0,
+	},
+	.rx_wbm_rel = {
+		0, ATH11K_RX_WBM_REL_RING_MASK_0,
+	},
+	.reo_status = {
+		0, ATH11K_REO_STATUS_RING_MASK_0,
+	},
+	.rxdma2host = {
+		ATH11K_RXDMA2HOST_RING_MASK_0,
+		ATH11K_RXDMA2HOST_RING_MASK_1,
+		ATH11K_RXDMA2HOST_RING_MASK_2,
+	},
+	.host2rxdma = {
+	},
+};
+
 const struct ath11k_hw_regs ipq8074_regs = {
 	/* SW2TCL(x) R0 ring configuration address */
 	.hal_tcl1_ring_base_lsb = 0x00000510,
@@ -2332,12 +2400,55 @@ const struct ath11k_hw_regs wcn6750_regs = {
 	.hal_reo1_misc_ctl = 0x000005d8,
 };
 
+static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_ipq8074[] = {
+	{
+		.tcl_ring_num = 0,
+		.wbm_ring_num = 0,
+		.rbm_id = HAL_RX_BUF_RBM_SW0_BM,
+	},
+	{
+		.tcl_ring_num = 1,
+		.wbm_ring_num = 1,
+		.rbm_id = HAL_RX_BUF_RBM_SW1_BM,
+	},
+	{
+		.tcl_ring_num = 2,
+		.wbm_ring_num = 2,
+		.rbm_id = HAL_RX_BUF_RBM_SW2_BM,
+	},
+};
+
+static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_wcn6750[] = {
+	{
+		.tcl_ring_num = 0,
+		.wbm_ring_num = 0,
+		.rbm_id = HAL_RX_BUF_RBM_SW0_BM,
+	},
+	{
+		.tcl_ring_num = 1,
+		.wbm_ring_num = 4,
+		.rbm_id = HAL_RX_BUF_RBM_SW4_BM,
+	},
+	{
+		.tcl_ring_num = 2,
+		.wbm_ring_num = 2,
+		.rbm_id = HAL_RX_BUF_RBM_SW2_BM,
+	},
+};
+
 const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 = {
 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
 };
 
 const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390 = {
 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
+};
+
+const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750 = {
+	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_wcn6750,
 };
 
 static const struct cfg80211_sar_freq_ranges ath11k_hw_sar_freq_ranges_wcn6855[] = {
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 77dc5c851c9b..9adfd6622c5f 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -122,8 +122,15 @@ struct ath11k_hw_ring_mask {
 	u8 host2rxdma[ATH11K_EXT_IRQ_GRP_NUM_MAX];
 };
 
+struct ath11k_hw_tcl2wbm_rbm_map {
+	u8 tcl_ring_num;
+	u8 wbm_ring_num;
+	u8 rbm_id;
+};
+
 struct ath11k_hw_hal_params {
 	enum hal_rx_buf_return_buf_manager rx_buf_rbm;
+	const struct ath11k_hw_tcl2wbm_rbm_map *tcl2wbm_rbm_map;
 };
 
 struct ath11k_hw_params {
@@ -205,6 +212,7 @@ struct ath11k_hw_params {
 	u8 ce_window_idx;
 	bool fixed_fw_mem;
 	bool support_off_channel_tx;
+	bool tcl_ring_retry;
 };
 
 struct ath11k_hw_ops {
@@ -247,6 +255,7 @@ struct ath11k_hw_ops {
 	u16 (*mpdu_info_get_peerid)(u8 *tlv_data);
 	bool (*rx_desc_mac_addr2_valid)(struct hal_rx_desc *desc);
 	u8* (*rx_desc_mpdu_start_addr2)(struct hal_rx_desc *desc);
+	u32 (*get_ring_selector)(struct sk_buff *skb);
 };
 
 extern const struct ath11k_hw_ops ipq8074_ops;
@@ -259,9 +268,11 @@ extern const struct ath11k_hw_ops wcn6750_ops;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074;
+extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750;
 
 extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074;
 extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390;
+extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750;
 
 static inline
 int ath11k_hw_get_mac_from_pdev_id(struct ath11k_hw_params *hw,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Currently in the case of WCN6750, only one TCL ring is used for TX,
this is limiting the TX throughput in 160 MHz case, enabling multiple
TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
the case of TCP TX, therefore add the support of multi TX ring for
WCN6750.

Currently TCL ring is selected based on CPU ID, this logic cannot be
applied for WCN6750 as there is chance of out of order TX of packets
and to avoid this, choose TCL ring based on flow hash so that packets
of the same flow will end up on same TCL ring. For the same reason,
TCL ring retry logic is also not applicable for WCN6750.

Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.

Change does not impact existing ath11k devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c   |  13 ++-
 drivers/net/wireless/ath/ath11k/dp.c     |  24 +++--
 drivers/net/wireless/ath/ath11k/dp.h     |   2 +
 drivers/net/wireless/ath/ath11k/dp_tx.c  |  19 ++--
 drivers/net/wireless/ath/ath11k/hal.c    |   2 +-
 drivers/net/wireless/ath/ath11k/hal.h    |   2 +
 drivers/net/wireless/ath/ath11k/hal_tx.c |   4 +-
 drivers/net/wireless/ath/ath11k/hal_tx.h |   2 +
 drivers/net/wireless/ath/ath11k/hw.c     | 117 ++++++++++++++++++++++-
 drivers/net/wireless/ath/ath11k/hw.h     |  11 +++
 10 files changed, 166 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index c8e0bc935838..a7eaec5798a0 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -111,6 +111,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -187,6 +188,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -262,6 +264,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -337,6 +340,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 2,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -412,6 +416,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6855 hw2.1",
@@ -486,6 +491,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 0,
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
+		.tcl_ring_retry = true,
 	},
 	{
 		.name = "wcn6750 hw1.0",
@@ -498,7 +504,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.max_radios = 1,
 		.bdf_addr = 0x4B0C0000,
 		.hw_ops = &wcn6750_ops,
-		.ring_mask = &ath11k_hw_ring_mask_qca6390,
+		.ring_mask = &ath11k_hw_ring_mask_wcn6750,
 		.internal_sleep_clock = false,
 		.regs = &wcn6750_regs,
 		.qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750,
@@ -541,8 +547,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.supports_regdb = true,
 		.fix_l1ss = false,
 		.credit_flow = true,
-		.max_tx_ring = DP_TCL_NUM_RING_MAX_QCA6390,
-		.hal_params = &ath11k_hw_hal_params_qca6390,
+		.max_tx_ring = DP_TCL_NUM_RING_MAX,
+		.hal_params = &ath11k_hw_hal_params_wcn6750,
 		.supports_dynamic_smps_6ghz = false,
 		.alloc_cacheable_memory = false,
 		.supports_rssi_stats = true,
@@ -560,6 +566,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.ce_window_idx = 2,
 		.fixed_fw_mem = true,
 		.support_off_channel_tx = false,
+		.tcl_ring_retry = false,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 8b790ce72e5d..4f7381719840 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <crypto/hash.h>
@@ -131,13 +132,11 @@ static int ath11k_dp_srng_calculate_msi_group(struct ath11k_base *ab,
 
 	switch (type) {
 	case HAL_WBM2SW_RELEASE:
-		if (ring_num < 3) {
-			grp_mask = &ab->hw_params.ring_mask->tx[0];
-		} else if (ring_num == 3) {
+		if (ring_num == DP_RX_RELEASE_RING_NUM) {
 			grp_mask = &ab->hw_params.ring_mask->rx_wbm_rel[0];
 			ring_num = 0;
 		} else {
-			return -ENOENT;
+			grp_mask = &ab->hw_params.ring_mask->tx[0];
 		}
 		break;
 	case HAL_REO_EXCEPTION:
@@ -371,6 +370,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	struct ath11k_dp *dp = &ab->dp;
 	struct hal_srng *srng;
 	int i, ret;
+	u8 tcl_num, wbm_num;
 
 	ret = ath11k_dp_srng_setup(ab, &dp->wbm_desc_rel_ring,
 				   HAL_SW2WBM_RELEASE, 0, 0,
@@ -396,8 +396,11 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	}
 
 	for (i = 0; i < ab->hw_params.max_tx_ring; i++) {
+		tcl_num = ab->hw_params.hal_params->tcl2wbm_rbm_map[i].tcl_ring_num;
+		wbm_num = ab->hw_params.hal_params->tcl2wbm_rbm_map[i].wbm_ring_num;
+
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_data_ring,
-					   HAL_TCL_DATA, i, 0,
+					   HAL_TCL_DATA, tcl_num, 0,
 					   DP_TCL_DATA_RING_SIZE);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_data ring (%d) :%d\n",
@@ -406,7 +409,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 		}
 
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_comp_ring,
-					   HAL_WBM2SW_RELEASE, i, 0,
+					   HAL_WBM2SW_RELEASE, wbm_num, 0,
 					   DP_TX_COMP_RING_SIZE);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_comp ring (%d) :%d\n",
@@ -431,7 +434,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 	}
 
 	ret = ath11k_dp_srng_setup(ab, &dp->rx_rel_ring, HAL_WBM2SW_RELEASE,
-				   3, 0, DP_RX_RELEASE_RING_SIZE);
+				   DP_RX_RELEASE_RING_NUM, 0, DP_RX_RELEASE_RING_SIZE);
 	if (ret) {
 		ath11k_warn(ab, "failed to set up rx_rel ring :%d\n", ret);
 		goto err;
@@ -774,9 +777,10 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
 	int i, j;
 	int tot_work_done = 0;
 
-	if (ab->hw_params.ring_mask->tx[grp_id]) {
-		i = __fls(ab->hw_params.ring_mask->tx[grp_id]);
-		ath11k_dp_tx_completion_handler(ab, i);
+	for (i = 0; i < ab->hw_params.max_tx_ring; i++) {
+		if (BIT(ab->hw_params.hal_params->tcl2wbm_rbm_map[i].wbm_ring_num) &
+		    ab->hw_params.ring_mask->tx[grp_id])
+			ath11k_dp_tx_completion_handler(ab, i);
 	}
 
 	if (ab->hw_params.ring_mask->rx_err[grp_id]) {
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index e9dfa209098b..8af2985ca2d9 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -222,6 +222,8 @@ struct ath11k_pdev_dp {
 #define DP_RXDMA_MONITOR_DST_RING_SIZE	2048
 #define DP_RXDMA_MONITOR_DESC_RING_SIZE	4096
 
+#define DP_RX_RELEASE_RING_NUM	3
+
 #define DP_RX_BUFFER_SIZE	2048
 #define	DP_RX_BUFFER_SIZE_LITE  1024
 #define DP_RX_BUFFER_ALIGN_SIZE	128
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index c17a2620aad7..862605858a80 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "core.h"
@@ -93,7 +94,8 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 	u8 pool_id;
 	u8 hal_ring_id;
 	int ret;
-	u8 ring_selector = 0, ring_map = 0;
+	u32 ring_selector = 0;
+	u8 ring_map = 0;
 	bool tcl_ring_retry;
 
 	if (unlikely(test_bit(ATH11K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)))
@@ -105,19 +107,13 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 
 	pool_id = skb_get_queue_mapping(skb) & (ATH11K_HW_MAX_QUEUES - 1);
 
-	/* Let the default ring selection be based on current processor
-	 * number, where one of the 3 tcl rings are selected based on
-	 * the smp_processor_id(). In case that ring
-	 * is full/busy, we resort to other available rings.
-	 * If all rings are full, we drop the packet.
-	 * //TODO Add throttling logic when all rings are full
-	 */
-	ring_selector = smp_processor_id();
+	ring_selector = ab->hw_params.hw_ops->get_ring_selector(skb);
 
 tcl_ring_sel:
 	tcl_ring_retry = false;
 
 	ti.ring_id = ring_selector % ab->hw_params.max_tx_ring;
+	ti.rbm_id = ab->hw_params.hal_params->tcl2wbm_rbm_map[ti.ring_id].rbm_id;
 
 	ring_map |= BIT(ti.ring_id);
 
@@ -129,7 +125,8 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 	spin_unlock_bh(&tx_ring->tx_idr_lock);
 
 	if (unlikely(ret < 0)) {
-		if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1)) {
+		if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1) ||
+		    !ab->hw_params.tcl_ring_retry) {
 			atomic_inc(&ab->soc_stats.tx_err.misc_fail);
 			return -ENOSPC;
 		}
@@ -247,7 +244,7 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 		 * Restart ring selection if some rings are not checked yet.
 		 */
 		if (unlikely(ring_map != (BIT(ab->hw_params.max_tx_ring)) - 1) &&
-		    ab->hw_params.max_tx_ring > 1) {
+		    ab->hw_params.tcl_ring_retry && ab->hw_params.max_tx_ring > 1) {
 			tcl_ring_retry = true;
 			ring_selector++;
 		}
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index bda71ab5a1f2..db8b191c7a4c 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -126,7 +126,7 @@ static const struct hal_srng_config hw_srng_config_template[] = {
 	},
 	{ /* WBM2SW_RELEASE */
 		.start_ring_id = HAL_SRNG_RING_ID_WBM2SW0_RELEASE,
-		.max_rings = 4,
+		.max_rings = 5,
 		.entry_size = sizeof(struct hal_wbm_release_ring) >> 2,
 		.lmac_ring = false,
 		.ring_dir = HAL_SRNG_DIR_DST,
diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h
index 110c337ddf33..e0358062ca2b 100644
--- a/drivers/net/wireless/ath/ath11k/hal.h
+++ b/drivers/net/wireless/ath/ath11k/hal.h
@@ -389,6 +389,7 @@ enum hal_srng_ring_id {
 	HAL_SRNG_RING_ID_WBM2SW1_RELEASE,
 	HAL_SRNG_RING_ID_WBM2SW2_RELEASE,
 	HAL_SRNG_RING_ID_WBM2SW3_RELEASE,
+	HAL_SRNG_RING_ID_WBM2SW4_RELEASE,
 
 	HAL_SRNG_RING_ID_UMAC_ID_END = 127,
 	HAL_SRNG_RING_ID_LMAC1_ID_START,
@@ -678,6 +679,7 @@ enum hal_rx_buf_return_buf_manager {
 	HAL_RX_BUF_RBM_SW1_BM,
 	HAL_RX_BUF_RBM_SW2_BM,
 	HAL_RX_BUF_RBM_SW3_BM,
+	HAL_RX_BUF_RBM_SW4_BM,
 };
 
 #define HAL_SRNG_DESC_LOOP_CNT		0xf0000000
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.c b/drivers/net/wireless/ath/ath11k/hal_tx.c
index c8929de8ce6c..d1b0e36e04a9 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.c
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "hal_desc.h"
@@ -44,8 +45,7 @@ void ath11k_hal_tx_cmd_desc_setup(struct ath11k_base *ab, void *cmd,
 		FIELD_PREP(BUFFER_ADDR_INFO1_ADDR,
 			   ((uint64_t)ti->paddr >> HAL_ADDR_MSB_REG_SHIFT));
 	tcl_cmd->buf_addr_info.info1 |=
-		FIELD_PREP(BUFFER_ADDR_INFO1_RET_BUF_MGR,
-			   (ti->ring_id + HAL_RX_BUF_RBM_SW0_BM)) |
+		FIELD_PREP(BUFFER_ADDR_INFO1_RET_BUF_MGR, ti->rbm_id) |
 		FIELD_PREP(BUFFER_ADDR_INFO1_SW_COOKIE, ti->desc_id);
 
 	tcl_cmd->info0 =
diff --git a/drivers/net/wireless/ath/ath11k/hal_tx.h b/drivers/net/wireless/ath/ath11k/hal_tx.h
index 36f4f6f6cbc2..c5e88364afe5 100644
--- a/drivers/net/wireless/ath/ath11k/hal_tx.h
+++ b/drivers/net/wireless/ath/ath11k/hal_tx.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_HAL_TX_H
@@ -35,6 +36,7 @@ struct hal_tx_info {
 	u8 lmac_id;
 	u8 dscp_tid_tbl_idx;
 	bool enable_mesh;
+	u8 rbm_id;
 };
 
 /* TODO: Check if the actual desc macros can be used instead */
diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index 96db85c55585..ec682f7da172 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -820,6 +820,29 @@ static bool ath11k_hw_wcn6855_rx_desc_get_ldpc_support(struct hal_rx_desc *desc)
 			 __le32_to_cpu(desc->u.wcn6855.msdu_start.info2));
 }
 
+static u32 ath11k_hw_ipq8074_get_tcl_ring_selector(struct sk_buff *skb)
+{
+	/* Let the default ring selection be based on current processor
+	 * number, where one of the 3 tcl rings are selected based on
+	 * the smp_processor_id(). In case that ring
+	 * is full/busy, we resort to other available rings.
+	 * If all rings are full, we drop the packet.
+	 * //TODO Add throttling logic when all rings are full
+	 */
+	return smp_processor_id();
+}
+
+static u32 ath11k_hw_wcn6750_get_tcl_ring_selector(struct sk_buff *skb)
+{
+	/* Select the TCL ring based on the flow hash of the SKB instead
+	 * of CPU ID. Since applications pumping the traffic can be scheduled
+	 * on multiple CPUs, there is a chance that packets of the same flow
+	 * could end on different TCL rings, this could sometimes results in
+	 * an out of order arrival of the packets at the receiver.
+	 */
+	return skb_get_hash(skb);
+}
+
 const struct ath11k_hw_ops ipq8074_ops = {
 	.get_hw_mac_from_pdev_id = ath11k_hw_ipq8074_mac_from_pdev_id,
 	.wmi_init_config = ath11k_init_wmi_config_ipq8074,
@@ -857,6 +880,7 @@ const struct ath11k_hw_ops ipq8074_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops ipq6018_ops = {
@@ -896,6 +920,7 @@ const struct ath11k_hw_ops ipq6018_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops qca6390_ops = {
@@ -935,6 +960,7 @@ const struct ath11k_hw_ops qca6390_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq8074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq8074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops qcn9074_ops = {
@@ -974,6 +1000,7 @@ const struct ath11k_hw_ops qcn9074_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops wcn6855_ops = {
@@ -1013,6 +1040,7 @@ const struct ath11k_hw_ops wcn6855_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_wcn6855_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_wcn6855_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_wcn6855_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
 };
 
 const struct ath11k_hw_ops wcn6750_ops = {
@@ -1052,11 +1080,14 @@ const struct ath11k_hw_ops wcn6750_ops = {
 	.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
 	.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
 	.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
+	.get_ring_selector = ath11k_hw_wcn6750_get_tcl_ring_selector,
 };
 
-#define ATH11K_TX_RING_MASK_0 0x1
-#define ATH11K_TX_RING_MASK_1 0x2
-#define ATH11K_TX_RING_MASK_2 0x4
+#define ATH11K_TX_RING_MASK_0 BIT(0)
+#define ATH11K_TX_RING_MASK_1 BIT(1)
+#define ATH11K_TX_RING_MASK_2 BIT(2)
+#define ATH11K_TX_RING_MASK_3 BIT(3)
+#define ATH11K_TX_RING_MASK_4 BIT(4)
 
 #define ATH11K_RX_RING_MASK_0 0x1
 #define ATH11K_RX_RING_MASK_1 0x2
@@ -1903,6 +1934,43 @@ const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074 = {
 	},
 };
 
+const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750 = {
+	.tx  = {
+		ATH11K_TX_RING_MASK_0,
+		0,
+		ATH11K_TX_RING_MASK_2,
+		0,
+		ATH11K_TX_RING_MASK_4,
+	},
+	.rx_mon_status = {
+		0, 0, 0, 0, 0, 0,
+		ATH11K_RX_MON_STATUS_RING_MASK_0,
+	},
+	.rx = {
+		0, 0, 0, 0, 0, 0, 0,
+		ATH11K_RX_RING_MASK_0,
+		ATH11K_RX_RING_MASK_1,
+		ATH11K_RX_RING_MASK_2,
+		ATH11K_RX_RING_MASK_3,
+	},
+	.rx_err = {
+		0, ATH11K_RX_ERR_RING_MASK_0,
+	},
+	.rx_wbm_rel = {
+		0, ATH11K_RX_WBM_REL_RING_MASK_0,
+	},
+	.reo_status = {
+		0, ATH11K_REO_STATUS_RING_MASK_0,
+	},
+	.rxdma2host = {
+		ATH11K_RXDMA2HOST_RING_MASK_0,
+		ATH11K_RXDMA2HOST_RING_MASK_1,
+		ATH11K_RXDMA2HOST_RING_MASK_2,
+	},
+	.host2rxdma = {
+	},
+};
+
 const struct ath11k_hw_regs ipq8074_regs = {
 	/* SW2TCL(x) R0 ring configuration address */
 	.hal_tcl1_ring_base_lsb = 0x00000510,
@@ -2332,12 +2400,55 @@ const struct ath11k_hw_regs wcn6750_regs = {
 	.hal_reo1_misc_ctl = 0x000005d8,
 };
 
+static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_ipq8074[] = {
+	{
+		.tcl_ring_num = 0,
+		.wbm_ring_num = 0,
+		.rbm_id = HAL_RX_BUF_RBM_SW0_BM,
+	},
+	{
+		.tcl_ring_num = 1,
+		.wbm_ring_num = 1,
+		.rbm_id = HAL_RX_BUF_RBM_SW1_BM,
+	},
+	{
+		.tcl_ring_num = 2,
+		.wbm_ring_num = 2,
+		.rbm_id = HAL_RX_BUF_RBM_SW2_BM,
+	},
+};
+
+static const struct ath11k_hw_tcl2wbm_rbm_map ath11k_hw_tcl2wbm_rbm_map_wcn6750[] = {
+	{
+		.tcl_ring_num = 0,
+		.wbm_ring_num = 0,
+		.rbm_id = HAL_RX_BUF_RBM_SW0_BM,
+	},
+	{
+		.tcl_ring_num = 1,
+		.wbm_ring_num = 4,
+		.rbm_id = HAL_RX_BUF_RBM_SW4_BM,
+	},
+	{
+		.tcl_ring_num = 2,
+		.wbm_ring_num = 2,
+		.rbm_id = HAL_RX_BUF_RBM_SW2_BM,
+	},
+};
+
 const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 = {
 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW3_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
 };
 
 const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390 = {
 	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_ipq8074,
+};
+
+const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750 = {
+	.rx_buf_rbm = HAL_RX_BUF_RBM_SW1_BM,
+	.tcl2wbm_rbm_map = ath11k_hw_tcl2wbm_rbm_map_wcn6750,
 };
 
 static const struct cfg80211_sar_freq_ranges ath11k_hw_sar_freq_ranges_wcn6855[] = {
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 77dc5c851c9b..9adfd6622c5f 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -122,8 +122,15 @@ struct ath11k_hw_ring_mask {
 	u8 host2rxdma[ATH11K_EXT_IRQ_GRP_NUM_MAX];
 };
 
+struct ath11k_hw_tcl2wbm_rbm_map {
+	u8 tcl_ring_num;
+	u8 wbm_ring_num;
+	u8 rbm_id;
+};
+
 struct ath11k_hw_hal_params {
 	enum hal_rx_buf_return_buf_manager rx_buf_rbm;
+	const struct ath11k_hw_tcl2wbm_rbm_map *tcl2wbm_rbm_map;
 };
 
 struct ath11k_hw_params {
@@ -205,6 +212,7 @@ struct ath11k_hw_params {
 	u8 ce_window_idx;
 	bool fixed_fw_mem;
 	bool support_off_channel_tx;
+	bool tcl_ring_retry;
 };
 
 struct ath11k_hw_ops {
@@ -247,6 +255,7 @@ struct ath11k_hw_ops {
 	u16 (*mpdu_info_get_peerid)(u8 *tlv_data);
 	bool (*rx_desc_mac_addr2_valid)(struct hal_rx_desc *desc);
 	u8* (*rx_desc_mpdu_start_addr2)(struct hal_rx_desc *desc);
+	u32 (*get_ring_selector)(struct sk_buff *skb);
 };
 
 extern const struct ath11k_hw_ops ipq8074_ops;
@@ -259,9 +268,11 @@ extern const struct ath11k_hw_ops wcn6750_ops;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;
 extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074;
+extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750;
 
 extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074;
 extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390;
+extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750;
 
 static inline
 int ath11k_hw_get_mac_from_pdev_id(struct ath11k_hw_params *hw,
-- 
2.35.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/3] ath11k: Increase TCL data ring size for WCN6750
  2022-07-20 13:51 ` Manikanta Pubbisetty
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Increase TCL data ring size to 2048 for WCN6750. This is
needed to meet 160 MHz TX throughput.

Add a new hw_param to indicate the TX ring size for
individual devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c | 7 +++++++
 drivers/net/wireless/ath/ath11k/dp.c   | 2 +-
 drivers/net/wireless/ath/ath11k/dp.h   | 2 ++
 drivers/net/wireless/ath/ath11k/hw.h   | 1 +
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index a7eaec5798a0..4e1fe062c3c9 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -112,6 +112,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -189,6 +190,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -265,6 +267,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -341,6 +344,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -417,6 +421,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6855 hw2.1",
@@ -492,6 +497,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6750 hw1.0",
@@ -567,6 +573,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = true,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = false,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 4f7381719840..fff8decf311b 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -401,7 +401,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_data_ring,
 					   HAL_TCL_DATA, tcl_num, 0,
-					   DP_TCL_DATA_RING_SIZE);
+					   ab->hw_params.tx_ring_size);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_data ring (%d) :%d\n",
 				    i, ret);
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index 8af2985ca2d9..16fb536da5cf 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_DP_H
@@ -203,6 +204,7 @@ struct ath11k_pdev_dp {
 
 #define DP_WBM_RELEASE_RING_SIZE	64
 #define DP_TCL_DATA_RING_SIZE		512
+#define DP_TCL_DATA_RING_SIZE_WCN6750	2048
 #define DP_TX_COMP_RING_SIZE		32768
 #define DP_TX_IDR_SIZE			DP_TX_COMP_RING_SIZE
 #define DP_TCL_CMD_RING_SIZE		32
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 9adfd6622c5f..a3b2df51c5b7 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -213,6 +213,7 @@ struct ath11k_hw_params {
 	bool fixed_fw_mem;
 	bool support_off_channel_tx;
 	bool tcl_ring_retry;
+	u32 tx_ring_size;
 };
 
 struct ath11k_hw_ops {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/3] ath11k: Increase TCL data ring size for WCN6750
@ 2022-07-20 13:51   ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-07-20 13:51 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Manikanta Pubbisetty

Increase TCL data ring size to 2048 for WCN6750. This is
needed to meet 160 MHz TX throughput.

Add a new hw_param to indicate the TX ring size for
individual devices.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c | 7 +++++++
 drivers/net/wireless/ath/ath11k/dp.c   | 2 +-
 drivers/net/wireless/ath/ath11k/dp.h   | 2 ++
 drivers/net/wireless/ath/ath11k/hw.h   | 1 +
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index a7eaec5798a0..4e1fe062c3c9 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -112,6 +112,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -189,6 +190,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -265,6 +267,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "qcn9074 hw1.0",
@@ -341,6 +344,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6855 hw2.0",
@@ -417,6 +421,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6855 hw2.1",
@@ -492,6 +497,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = false,
 		.support_off_channel_tx = true,
 		.tcl_ring_retry = true,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE,
 	},
 	{
 		.name = "wcn6750 hw1.0",
@@ -567,6 +573,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.fixed_fw_mem = true,
 		.support_off_channel_tx = false,
 		.tcl_ring_retry = false,
+		.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c
index 4f7381719840..fff8decf311b 100644
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -401,7 +401,7 @@ static int ath11k_dp_srng_common_setup(struct ath11k_base *ab)
 
 		ret = ath11k_dp_srng_setup(ab, &dp->tx_ring[i].tcl_data_ring,
 					   HAL_TCL_DATA, tcl_num, 0,
-					   DP_TCL_DATA_RING_SIZE);
+					   ab->hw_params.tx_ring_size);
 		if (ret) {
 			ath11k_warn(ab, "failed to set up tcl_data ring (%d) :%d\n",
 				    i, ret);
diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index 8af2985ca2d9..16fb536da5cf 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef ATH11K_DP_H
@@ -203,6 +204,7 @@ struct ath11k_pdev_dp {
 
 #define DP_WBM_RELEASE_RING_SIZE	64
 #define DP_TCL_DATA_RING_SIZE		512
+#define DP_TCL_DATA_RING_SIZE_WCN6750	2048
 #define DP_TX_COMP_RING_SIZE		32768
 #define DP_TX_IDR_SIZE			DP_TX_COMP_RING_SIZE
 #define DP_TCL_CMD_RING_SIZE		32
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 9adfd6622c5f..a3b2df51c5b7 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -213,6 +213,7 @@ struct ath11k_hw_params {
 	bool fixed_fw_mem;
 	bool support_off_channel_tx;
 	bool tcl_ring_retry;
+	u32 tx_ring_size;
 };
 
 struct ath11k_hw_ops {
-- 
2.35.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-07-20 13:51   ` Manikanta Pubbisetty
@ 2022-09-02 12:37     ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:37 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless, Manikanta Pubbisetty

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> wrote:

> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> runs in softirq context and on the core which scheduled the NAPI,
> threaded NAPI makes use of kernel threads which are under direct
> control of the scheduler and helps in balancing the NAPI processing
> load across multiple CPUs thereby improving throughput.
> 
> In the case of WCN6750, enabling threaded NAPI has improved
> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> gains for other ath11k devices as well, therefore enable threaded
> NAPI on all other devices.
> 
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> 
> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>

Fails to apply and no base commit provided, so please rebase.

error: patch failed: drivers/net/wireless/ath/ath11k/core.c:111
error: drivers/net/wireless/ath/ath11k/core.c: patch does not apply
error: patch failed: drivers/net/wireless/ath/ath11k/hw.h:205
error: drivers/net/wireless/ath/ath11k/hw.h: patch does not apply
stg import: Diff does not apply cleanly

3 patches set to Changes Requested.

12924009 [1/3] ath11k: Enable threaded NAPI on WCN6750
12924011 [2/3] ath11k: Add multi TX ring support for WCN6750
12924010 [3/3] ath11k: Increase TCL data ring size for WCN6750

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220720135113.15755-2-quic_mpubbise@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 12:37     ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:37 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless, Manikanta Pubbisetty

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> wrote:

> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> runs in softirq context and on the core which scheduled the NAPI,
> threaded NAPI makes use of kernel threads which are under direct
> control of the scheduler and helps in balancing the NAPI processing
> load across multiple CPUs thereby improving throughput.
> 
> In the case of WCN6750, enabling threaded NAPI has improved
> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> gains for other ath11k devices as well, therefore enable threaded
> NAPI on all other devices.
> 
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> 
> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>

Fails to apply and no base commit provided, so please rebase.

error: patch failed: drivers/net/wireless/ath/ath11k/core.c:111
error: drivers/net/wireless/ath/ath11k/core.c: patch does not apply
error: patch failed: drivers/net/wireless/ath/ath11k/hw.h:205
error: drivers/net/wireless/ath/ath11k/hw.h: patch does not apply
stg import: Diff does not apply cleanly

3 patches set to Changes Requested.

12924009 [1/3] ath11k: Enable threaded NAPI on WCN6750
12924011 [2/3] ath11k: Add multi TX ring support for WCN6750
12924010 [3/3] ath11k: Increase TCL data ring size for WCN6750

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220720135113.15755-2-quic_mpubbise@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-07-20 13:51   ` Manikanta Pubbisetty
@ 2022-09-02 12:48     ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:48 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> runs in softirq context and on the core which scheduled the NAPI,
> threaded NAPI makes use of kernel threads which are under direct
> control of the scheduler and helps in balancing the NAPI processing
> load across multiple CPUs thereby improving throughput.
>
> In the case of WCN6750, enabling threaded NAPI has improved
> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> gains for other ath11k devices as well, therefore enable threaded
> NAPI on all other devices.
>
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>
> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>  drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index d7d33d5cdfc5..e44e2f29a88f 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>  		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>  
>  		if (!irq_grp->napi_enabled) {
> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>  			napi_enable(&irq_grp->napi);
>  			irq_grp->napi_enabled = true;
>  		}
> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> index cf12b98c480d..c703db19de51 100644
> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>  		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>  
>  		if (!irq_grp->napi_enabled) {
> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>  			napi_enable(&irq_grp->napi);
>  			irq_grp->napi_enabled = true;
>  		}

The commit log claims that this enabled _only_ on WCN6750 but aren't we
enabling it on all ath11k hardware, or am I missing something? I admit I
didn't check this very carefully.

(reads the commit log one more time)

Ah, in the last sentence you mention that it's enabled on all hardware.
That's quite easy to miss and the commit log is quite misleading, please
emphasise already in the title and the first sentence that this is for
all hardware.

Also more testing would be nice. Enabling something like this with
testing only on one hardware family (WCN7850) can be risky. I always get
warm fuzzy feelings if a patch is tested with all three hardware
families we currently support:

* IPQ8074 etc
* QCA6390 etc
* WCN7850

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 12:48     ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:48 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> runs in softirq context and on the core which scheduled the NAPI,
> threaded NAPI makes use of kernel threads which are under direct
> control of the scheduler and helps in balancing the NAPI processing
> load across multiple CPUs thereby improving throughput.
>
> In the case of WCN6750, enabling threaded NAPI has improved
> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> gains for other ath11k devices as well, therefore enable threaded
> NAPI on all other devices.
>
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>
> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> ---
>  drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>  drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index d7d33d5cdfc5..e44e2f29a88f 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>  		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>  
>  		if (!irq_grp->napi_enabled) {
> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>  			napi_enable(&irq_grp->napi);
>  			irq_grp->napi_enabled = true;
>  		}
> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> index cf12b98c480d..c703db19de51 100644
> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>  		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>  
>  		if (!irq_grp->napi_enabled) {
> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>  			napi_enable(&irq_grp->napi);
>  			irq_grp->napi_enabled = true;
>  		}

The commit log claims that this enabled _only_ on WCN6750 but aren't we
enabling it on all ath11k hardware, or am I missing something? I admit I
didn't check this very carefully.

(reads the commit log one more time)

Ah, in the last sentence you mention that it's enabled on all hardware.
That's quite easy to miss and the commit log is quite misleading, please
emphasise already in the title and the first sentence that this is for
all hardware.

Also more testing would be nice. Enabling something like this with
testing only on one hardware family (WCN7850) can be risky. I always get
warm fuzzy feelings if a patch is tested with all three hardware
families we currently support:

* IPQ8074 etc
* QCA6390 etc
* WCN7850

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
  2022-07-20 13:51   ` Manikanta Pubbisetty
@ 2022-09-02 12:49     ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:49 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> Currently in the case of WCN6750, only one TCL ring is used for TX,
> this is limiting the TX throughput in 160 MHz case, enabling multiple
> TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
> the case of TCP TX, therefore add the support of multi TX ring for
> WCN6750.
>
> Currently TCL ring is selected based on CPU ID, this logic cannot be
> applied for WCN6750 as there is chance of out of order TX of packets
> and to avoid this, choose TCL ring based on flow hash so that packets
> of the same flow will end up on same TCL ring. For the same reason,
> TCL ring retry logic is also not applicable for WCN6750.
>
> Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
> existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.
>
> Change does not impact existing ath11k devices.

It would also nice to document _why_ it doesn't impact existing (or do
you mean "other"?) devices.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
@ 2022-09-02 12:49     ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-02 12:49 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> Currently in the case of WCN6750, only one TCL ring is used for TX,
> this is limiting the TX throughput in 160 MHz case, enabling multiple
> TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
> the case of TCP TX, therefore add the support of multi TX ring for
> WCN6750.
>
> Currently TCL ring is selected based on CPU ID, this logic cannot be
> applied for WCN6750 as there is chance of out of order TX of packets
> and to avoid this, choose TCL ring based on flow hash so that packets
> of the same flow will end up on same TCL ring. For the same reason,
> TCL ring retry logic is also not applicable for WCN6750.
>
> Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
> existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.
>
> Change does not impact existing ath11k devices.

It would also nice to document _why_ it doesn't impact existing (or do
you mean "other"?) devices.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 12:37     ` Kalle Valo
@ 2022-09-02 12:54       ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 12:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:07 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> wrote:
> 
>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>> runs in softirq context and on the core which scheduled the NAPI,
>> threaded NAPI makes use of kernel threads which are under direct
>> control of the scheduler and helps in balancing the NAPI processing
>> load across multiple CPUs thereby improving throughput.
>>
>> In the case of WCN6750, enabling threaded NAPI has improved
>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>> gains for other ath11k devices as well, therefore enable threaded
>> NAPI on all other devices.
>>
>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>
>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> 
> Fails to apply and no base commit provided, so please rebase.
> 
> error: patch failed: drivers/net/wireless/ath/ath11k/core.c:111
> error: drivers/net/wireless/ath/ath11k/core.c: patch does not apply
> error: patch failed: drivers/net/wireless/ath/ath11k/hw.h:205
> error: drivers/net/wireless/ath/ath11k/hw.h: patch does not apply
> stg import: Diff does not apply cleanly
> 
> 3 patches set to Changes Requested.
> 
> 12924009 [1/3] ath11k: Enable threaded NAPI on WCN6750
> 12924011 [2/3] ath11k: Add multi TX ring support for WCN6750
> 12924010 [3/3] ath11k: Increase TCL data ring size for WCN6750
> 

Sure, thanks!

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 12:54       ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 12:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:07 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> wrote:
> 
>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>> runs in softirq context and on the core which scheduled the NAPI,
>> threaded NAPI makes use of kernel threads which are under direct
>> control of the scheduler and helps in balancing the NAPI processing
>> load across multiple CPUs thereby improving throughput.
>>
>> In the case of WCN6750, enabling threaded NAPI has improved
>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>> gains for other ath11k devices as well, therefore enable threaded
>> NAPI on all other devices.
>>
>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>
>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> 
> Fails to apply and no base commit provided, so please rebase.
> 
> error: patch failed: drivers/net/wireless/ath/ath11k/core.c:111
> error: drivers/net/wireless/ath/ath11k/core.c: patch does not apply
> error: patch failed: drivers/net/wireless/ath/ath11k/hw.h:205
> error: drivers/net/wireless/ath/ath11k/hw.h: patch does not apply
> stg import: Diff does not apply cleanly
> 
> 3 patches set to Changes Requested.
> 
> 12924009 [1/3] ath11k: Enable threaded NAPI on WCN6750
> 12924011 [2/3] ath11k: Add multi TX ring support for WCN6750
> 12924010 [3/3] ath11k: Increase TCL data ring size for WCN6750
> 

Sure, thanks!

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 12:48     ` Kalle Valo
@ 2022-09-02 13:17       ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:17 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:18 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> 
>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>> runs in softirq context and on the core which scheduled the NAPI,
>> threaded NAPI makes use of kernel threads which are under direct
>> control of the scheduler and helps in balancing the NAPI processing
>> load across multiple CPUs thereby improving throughput.
>>
>> In the case of WCN6750, enabling threaded NAPI has improved
>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>> gains for other ath11k devices as well, therefore enable threaded
>> NAPI on all other devices.
>>
>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>
>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>   drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>   2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>> index d7d33d5cdfc5..e44e2f29a88f 100644
>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>   		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>   
>>   		if (!irq_grp->napi_enabled) {
>> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>>   			napi_enable(&irq_grp->napi);
>>   			irq_grp->napi_enabled = true;
>>   		}
>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>> index cf12b98c480d..c703db19de51 100644
>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>   		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>   
>>   		if (!irq_grp->napi_enabled) {
>> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>>   			napi_enable(&irq_grp->napi);
>>   			irq_grp->napi_enabled = true;
>>   		}
> 
> The commit log claims that this enabled _only_ on WCN6750 but aren't we
> enabling it on all ath11k hardware, or am I missing something? I admit I
> didn't check this very carefully.
> 
> (reads the commit log one more time)
> 
> Ah, in the last sentence you mention that it's enabled on all hardware.
> That's quite easy to miss and the commit log is quite misleading, please
> emphasise already in the title and the first sentence that this is for
> all hardware.

My Bad, yes you right. The patch was made initially only for WCN6750 and
was enabled later for all devices.

> 
> Also more testing would be nice. Enabling something like this with
> testing only on one hardware family (WCN7850) can be risky. I always get
> warm fuzzy feelings if a patch is tested with all three hardware
> families we currently support:
> 
> * IPQ8074 etc
> * QCA6390 etc
> * WCN7850
> 

WCN7850 should be an ath12k device If I'm correct.

Regardless of the chip family, even I feel that the tput changes like 
these should be tested on all the chipsets. Availability of the hardware 
and time are something which are stopping me in testing the changes on 
all supported targets.

As I said, I had made the changes only to WCN6750 initially (using a 
hw_param). Can we take that approach for now and enable this for other 
targets only if required & upon thorough testing?

Thanks,
Manikanta

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 13:17       ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:17 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:18 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> 
>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>> runs in softirq context and on the core which scheduled the NAPI,
>> threaded NAPI makes use of kernel threads which are under direct
>> control of the scheduler and helps in balancing the NAPI processing
>> load across multiple CPUs thereby improving throughput.
>>
>> In the case of WCN6750, enabling threaded NAPI has improved
>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>> gains for other ath11k devices as well, therefore enable threaded
>> NAPI on all other devices.
>>
>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>
>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>> ---
>>   drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>   drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>   2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>> index d7d33d5cdfc5..e44e2f29a88f 100644
>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>   		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>   
>>   		if (!irq_grp->napi_enabled) {
>> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>>   			napi_enable(&irq_grp->napi);
>>   			irq_grp->napi_enabled = true;
>>   		}
>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>> index cf12b98c480d..c703db19de51 100644
>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>   		struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>   
>>   		if (!irq_grp->napi_enabled) {
>> +			dev_set_threaded(&irq_grp->napi_ndev, true);
>>   			napi_enable(&irq_grp->napi);
>>   			irq_grp->napi_enabled = true;
>>   		}
> 
> The commit log claims that this enabled _only_ on WCN6750 but aren't we
> enabling it on all ath11k hardware, or am I missing something? I admit I
> didn't check this very carefully.
> 
> (reads the commit log one more time)
> 
> Ah, in the last sentence you mention that it's enabled on all hardware.
> That's quite easy to miss and the commit log is quite misleading, please
> emphasise already in the title and the first sentence that this is for
> all hardware.

My Bad, yes you right. The patch was made initially only for WCN6750 and
was enabled later for all devices.

> 
> Also more testing would be nice. Enabling something like this with
> testing only on one hardware family (WCN7850) can be risky. I always get
> warm fuzzy feelings if a patch is tested with all three hardware
> families we currently support:
> 
> * IPQ8074 etc
> * QCA6390 etc
> * WCN7850
> 

WCN7850 should be an ath12k device If I'm correct.

Regardless of the chip family, even I feel that the tput changes like 
these should be tested on all the chipsets. Availability of the hardware 
and time are something which are stopping me in testing the changes on 
all supported targets.

As I said, I had made the changes only to WCN6750 initially (using a 
hw_param). Can we take that approach for now and enable this for other 
targets only if required & upon thorough testing?

Thanks,
Manikanta

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 13:17       ` Manikanta Pubbisetty
@ 2022-09-02 13:20         ` Robert Marko
  -1 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-02 13:20 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Kalle Valo, ath11k, linux-wireless

On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
<quic_mpubbise@quicinc.com> wrote:
>
> On 9/2/2022 6:18 PM, Kalle Valo wrote:
> > Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> >
> >> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> >> runs in softirq context and on the core which scheduled the NAPI,
> >> threaded NAPI makes use of kernel threads which are under direct
> >> control of the scheduler and helps in balancing the NAPI processing
> >> load across multiple CPUs thereby improving throughput.
> >>
> >> In the case of WCN6750, enabling threaded NAPI has improved
> >> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> >> gains for other ath11k devices as well, therefore enable threaded
> >> NAPI on all other devices.
> >>
> >> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> >>
> >> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> >> ---
> >>   drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
> >>   drivers/net/wireless/ath/ath11k/pcic.c | 1 +
> >>   2 files changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> >> index d7d33d5cdfc5..e44e2f29a88f 100644
> >> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> >> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> >> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
> >>              struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>
> >>              if (!irq_grp->napi_enabled) {
> >> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>                      napi_enable(&irq_grp->napi);
> >>                      irq_grp->napi_enabled = true;
> >>              }
> >> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> >> index cf12b98c480d..c703db19de51 100644
> >> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> >> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> >> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
> >>              struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>
> >>              if (!irq_grp->napi_enabled) {
> >> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>                      napi_enable(&irq_grp->napi);
> >>                      irq_grp->napi_enabled = true;
> >>              }
> >
> > The commit log claims that this enabled _only_ on WCN6750 but aren't we
> > enabling it on all ath11k hardware, or am I missing something? I admit I
> > didn't check this very carefully.
> >
> > (reads the commit log one more time)
> >
> > Ah, in the last sentence you mention that it's enabled on all hardware.
> > That's quite easy to miss and the commit log is quite misleading, please
> > emphasise already in the title and the first sentence that this is for
> > all hardware.
>
> My Bad, yes you right. The patch was made initially only for WCN6750 and
> was enabled later for all devices.
>
> >
> > Also more testing would be nice. Enabling something like this with
> > testing only on one hardware family (WCN7850) can be risky. I always get
> > warm fuzzy feelings if a patch is tested with all three hardware
> > families we currently support:
> >
> > * IPQ8074 etc
> > * QCA6390 etc
> > * WCN7850
> >
>
> WCN7850 should be an ath12k device If I'm correct.
>
> Regardless of the chip family, even I feel that the tput changes like
> these should be tested on all the chipsets. Availability of the hardware
> and time are something which are stopping me in testing the changes on
> all supported targets.
>
> As I said, I had made the changes only to WCN6750 initially (using a
> hw_param). Can we take that approach for now and enable this for other
> targets only if required & upon thorough testing?

I can tell you that on IPQ8074 threaded NAPI really improves perfromance.

Regards,
Robert
>
> Thanks,
> Manikanta
>
> --
> ath11k mailing list
> ath11k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath11k



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 13:20         ` Robert Marko
  0 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-02 13:20 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Kalle Valo, ath11k, linux-wireless

On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
<quic_mpubbise@quicinc.com> wrote:
>
> On 9/2/2022 6:18 PM, Kalle Valo wrote:
> > Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> >
> >> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> >> runs in softirq context and on the core which scheduled the NAPI,
> >> threaded NAPI makes use of kernel threads which are under direct
> >> control of the scheduler and helps in balancing the NAPI processing
> >> load across multiple CPUs thereby improving throughput.
> >>
> >> In the case of WCN6750, enabling threaded NAPI has improved
> >> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> >> gains for other ath11k devices as well, therefore enable threaded
> >> NAPI on all other devices.
> >>
> >> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> >>
> >> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> >> ---
> >>   drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
> >>   drivers/net/wireless/ath/ath11k/pcic.c | 1 +
> >>   2 files changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> >> index d7d33d5cdfc5..e44e2f29a88f 100644
> >> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> >> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> >> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
> >>              struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>
> >>              if (!irq_grp->napi_enabled) {
> >> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>                      napi_enable(&irq_grp->napi);
> >>                      irq_grp->napi_enabled = true;
> >>              }
> >> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> >> index cf12b98c480d..c703db19de51 100644
> >> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> >> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> >> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
> >>              struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>
> >>              if (!irq_grp->napi_enabled) {
> >> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>                      napi_enable(&irq_grp->napi);
> >>                      irq_grp->napi_enabled = true;
> >>              }
> >
> > The commit log claims that this enabled _only_ on WCN6750 but aren't we
> > enabling it on all ath11k hardware, or am I missing something? I admit I
> > didn't check this very carefully.
> >
> > (reads the commit log one more time)
> >
> > Ah, in the last sentence you mention that it's enabled on all hardware.
> > That's quite easy to miss and the commit log is quite misleading, please
> > emphasise already in the title and the first sentence that this is for
> > all hardware.
>
> My Bad, yes you right. The patch was made initially only for WCN6750 and
> was enabled later for all devices.
>
> >
> > Also more testing would be nice. Enabling something like this with
> > testing only on one hardware family (WCN7850) can be risky. I always get
> > warm fuzzy feelings if a patch is tested with all three hardware
> > families we currently support:
> >
> > * IPQ8074 etc
> > * QCA6390 etc
> > * WCN7850
> >
>
> WCN7850 should be an ath12k device If I'm correct.
>
> Regardless of the chip family, even I feel that the tput changes like
> these should be tested on all the chipsets. Availability of the hardware
> and time are something which are stopping me in testing the changes on
> all supported targets.
>
> As I said, I had made the changes only to WCN6750 initially (using a
> hw_param). Can we take that approach for now and enable this for other
> targets only if required & upon thorough testing?

I can tell you that on IPQ8074 threaded NAPI really improves perfromance.

Regards,
Robert
>
> Thanks,
> Manikanta
>
> --
> ath11k mailing list
> ath11k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath11k



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 13:20         ` Robert Marko
@ 2022-09-02 13:42           ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:42 UTC (permalink / raw)
  To: Robert Marko; +Cc: Kalle Valo, ath11k, linux-wireless

On 9/2/2022 6:50 PM, Robert Marko wrote:
> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> <quic_mpubbise@quicinc.com> wrote:
>>
>> On 9/2/2022 6:18 PM, Kalle Valo wrote:
>>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>>
>>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>>>> runs in softirq context and on the core which scheduled the NAPI,
>>>> threaded NAPI makes use of kernel threads which are under direct
>>>> control of the scheduler and helps in balancing the NAPI processing
>>>> load across multiple CPUs thereby improving throughput.
>>>>
>>>> In the case of WCN6750, enabling threaded NAPI has improved
>>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>>>> gains for other ath11k devices as well, therefore enable threaded
>>>> NAPI on all other devices.
>>>>
>>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>>>
>>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>>>> ---
>>>>    drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>>>    drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>>>    2 files changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>>>> index d7d33d5cdfc5..e44e2f29a88f 100644
>>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>
>>>>               if (!irq_grp->napi_enabled) {
>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>                       napi_enable(&irq_grp->napi);
>>>>                       irq_grp->napi_enabled = true;
>>>>               }
>>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>>>> index cf12b98c480d..c703db19de51 100644
>>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>
>>>>               if (!irq_grp->napi_enabled) {
>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>                       napi_enable(&irq_grp->napi);
>>>>                       irq_grp->napi_enabled = true;
>>>>               }
>>>
>>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
>>> enabling it on all ath11k hardware, or am I missing something? I admit I
>>> didn't check this very carefully.
>>>
>>> (reads the commit log one more time)
>>>
>>> Ah, in the last sentence you mention that it's enabled on all hardware.
>>> That's quite easy to miss and the commit log is quite misleading, please
>>> emphasise already in the title and the first sentence that this is for
>>> all hardware.
>>
>> My Bad, yes you right. The patch was made initially only for WCN6750 and
>> was enabled later for all devices.
>>
>>>
>>> Also more testing would be nice. Enabling something like this with
>>> testing only on one hardware family (WCN7850) can be risky. I always get
>>> warm fuzzy feelings if a patch is tested with all three hardware
>>> families we currently support:
>>>
>>> * IPQ8074 etc
>>> * QCA6390 etc
>>> * WCN7850
>>>
>>
>> WCN7850 should be an ath12k device If I'm correct.
>>
>> Regardless of the chip family, even I feel that the tput changes like
>> these should be tested on all the chipsets. Availability of the hardware
>> and time are something which are stopping me in testing the changes on
>> all supported targets.
>>
>> As I said, I had made the changes only to WCN6750 initially (using a
>> hw_param). Can we take that approach for now and enable this for other
>> targets only if required & upon thorough testing?
> 
> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> 

Great. Do you have any test results on IPQ8074?

Thanks,
Manikanta

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 13:42           ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:42 UTC (permalink / raw)
  To: Robert Marko; +Cc: Kalle Valo, ath11k, linux-wireless

On 9/2/2022 6:50 PM, Robert Marko wrote:
> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> <quic_mpubbise@quicinc.com> wrote:
>>
>> On 9/2/2022 6:18 PM, Kalle Valo wrote:
>>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>>
>>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>>>> runs in softirq context and on the core which scheduled the NAPI,
>>>> threaded NAPI makes use of kernel threads which are under direct
>>>> control of the scheduler and helps in balancing the NAPI processing
>>>> load across multiple CPUs thereby improving throughput.
>>>>
>>>> In the case of WCN6750, enabling threaded NAPI has improved
>>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>>>> gains for other ath11k devices as well, therefore enable threaded
>>>> NAPI on all other devices.
>>>>
>>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>>>
>>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>>>> ---
>>>>    drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>>>    drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>>>    2 files changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>>>> index d7d33d5cdfc5..e44e2f29a88f 100644
>>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>
>>>>               if (!irq_grp->napi_enabled) {
>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>                       napi_enable(&irq_grp->napi);
>>>>                       irq_grp->napi_enabled = true;
>>>>               }
>>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>>>> index cf12b98c480d..c703db19de51 100644
>>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>
>>>>               if (!irq_grp->napi_enabled) {
>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>                       napi_enable(&irq_grp->napi);
>>>>                       irq_grp->napi_enabled = true;
>>>>               }
>>>
>>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
>>> enabling it on all ath11k hardware, or am I missing something? I admit I
>>> didn't check this very carefully.
>>>
>>> (reads the commit log one more time)
>>>
>>> Ah, in the last sentence you mention that it's enabled on all hardware.
>>> That's quite easy to miss and the commit log is quite misleading, please
>>> emphasise already in the title and the first sentence that this is for
>>> all hardware.
>>
>> My Bad, yes you right. The patch was made initially only for WCN6750 and
>> was enabled later for all devices.
>>
>>>
>>> Also more testing would be nice. Enabling something like this with
>>> testing only on one hardware family (WCN7850) can be risky. I always get
>>> warm fuzzy feelings if a patch is tested with all three hardware
>>> families we currently support:
>>>
>>> * IPQ8074 etc
>>> * QCA6390 etc
>>> * WCN7850
>>>
>>
>> WCN7850 should be an ath12k device If I'm correct.
>>
>> Regardless of the chip family, even I feel that the tput changes like
>> these should be tested on all the chipsets. Availability of the hardware
>> and time are something which are stopping me in testing the changes on
>> all supported targets.
>>
>> As I said, I had made the changes only to WCN6750 initially (using a
>> hw_param). Can we take that approach for now and enable this for other
>> targets only if required & upon thorough testing?
> 
> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> 

Great. Do you have any test results on IPQ8074?

Thanks,
Manikanta

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
  2022-09-02 12:49     ` Kalle Valo
@ 2022-09-02 13:44       ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:44 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:19 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> 
>> Currently in the case of WCN6750, only one TCL ring is used for TX,
>> this is limiting the TX throughput in 160 MHz case, enabling multiple
>> TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
>> the case of TCP TX, therefore add the support of multi TX ring for
>> WCN6750.
>>
>> Currently TCL ring is selected based on CPU ID, this logic cannot be
>> applied for WCN6750 as there is chance of out of order TX of packets
>> and to avoid this, choose TCL ring based on flow hash so that packets
>> of the same flow will end up on same TCL ring. For the same reason,
>> TCL ring retry logic is also not applicable for WCN6750.
>>
>> Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
>> existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.
>>
>> Change does not impact existing ath11k devices.
> 
> It would also nice to document _why_ it doesn't impact existing (or do
> you mean "other"?) devices.
> 

Yes, I mean the change doesn't impact other supported ath11k devices.
This will be applicable only for WCN6750.

I'll rephrase it.

Thanks,
Manikanta

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750
@ 2022-09-02 13:44       ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 13:44 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath11k, linux-wireless

On 9/2/2022 6:19 PM, Kalle Valo wrote:
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> 
>> Currently in the case of WCN6750, only one TCL ring is used for TX,
>> this is limiting the TX throughput in 160 MHz case, enabling multiple
>> TCL rings on WCN6750 has shown an improvement of nearly 300 Mbps in
>> the case of TCP TX, therefore add the support of multi TX ring for
>> WCN6750.
>>
>> Currently TCL ring is selected based on CPU ID, this logic cannot be
>> applied for WCN6750 as there is chance of out of order TX of packets
>> and to avoid this, choose TCL ring based on flow hash so that packets
>> of the same flow will end up on same TCL ring. For the same reason,
>> TCL ring retry logic is also not applicable for WCN6750.
>>
>> Also the mapping of TCL, WBM & RBM IDs for WCN6750 is different from
>> existing devices. Create a new TCM/WBM/RBM mapping for WCN6750.
>>
>> Change does not impact existing ath11k devices.
> 
> It would also nice to document _why_ it doesn't impact existing (or do
> you mean "other"?) devices.
> 

Yes, I mean the change doesn't impact other supported ath11k devices.
This will be applicable only for WCN6750.

I'll rephrase it.

Thanks,
Manikanta

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 13:42           ` Manikanta Pubbisetty
@ 2022-09-02 13:46             ` Robert Marko
  -1 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-02 13:46 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Kalle Valo, ath11k, linux-wireless

On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
<quic_mpubbise@quicinc.com> wrote:
>
> On 9/2/2022 6:50 PM, Robert Marko wrote:
> > On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> > <quic_mpubbise@quicinc.com> wrote:
> >>
> >> On 9/2/2022 6:18 PM, Kalle Valo wrote:
> >>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> >>>
> >>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> >>>> runs in softirq context and on the core which scheduled the NAPI,
> >>>> threaded NAPI makes use of kernel threads which are under direct
> >>>> control of the scheduler and helps in balancing the NAPI processing
> >>>> load across multiple CPUs thereby improving throughput.
> >>>>
> >>>> In the case of WCN6750, enabling threaded NAPI has improved
> >>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> >>>> gains for other ath11k devices as well, therefore enable threaded
> >>>> NAPI on all other devices.
> >>>>
> >>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> >>>>
> >>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> >>>> ---
> >>>>    drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
> >>>>    drivers/net/wireless/ath/ath11k/pcic.c | 1 +
> >>>>    2 files changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> index d7d33d5cdfc5..e44e2f29a88f 100644
> >>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
> >>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>>>
> >>>>               if (!irq_grp->napi_enabled) {
> >>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>>>                       napi_enable(&irq_grp->napi);
> >>>>                       irq_grp->napi_enabled = true;
> >>>>               }
> >>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> index cf12b98c480d..c703db19de51 100644
> >>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
> >>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>>>
> >>>>               if (!irq_grp->napi_enabled) {
> >>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>>>                       napi_enable(&irq_grp->napi);
> >>>>                       irq_grp->napi_enabled = true;
> >>>>               }
> >>>
> >>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
> >>> enabling it on all ath11k hardware, or am I missing something? I admit I
> >>> didn't check this very carefully.
> >>>
> >>> (reads the commit log one more time)
> >>>
> >>> Ah, in the last sentence you mention that it's enabled on all hardware.
> >>> That's quite easy to miss and the commit log is quite misleading, please
> >>> emphasise already in the title and the first sentence that this is for
> >>> all hardware.
> >>
> >> My Bad, yes you right. The patch was made initially only for WCN6750 and
> >> was enabled later for all devices.
> >>
> >>>
> >>> Also more testing would be nice. Enabling something like this with
> >>> testing only on one hardware family (WCN7850) can be risky. I always get
> >>> warm fuzzy feelings if a patch is tested with all three hardware
> >>> families we currently support:
> >>>
> >>> * IPQ8074 etc
> >>> * QCA6390 etc
> >>> * WCN7850
> >>>
> >>
> >> WCN7850 should be an ath12k device If I'm correct.
> >>
> >> Regardless of the chip family, even I feel that the tput changes like
> >> these should be tested on all the chipsets. Availability of the hardware
> >> and time are something which are stopping me in testing the changes on
> >> all supported targets.
> >>
> >> As I said, I had made the changes only to WCN6750 initially (using a
> >> hw_param). Can we take that approach for now and enable this for other
> >> targets only if required & upon thorough testing?
> >
> > I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> >
>
> Great. Do you have any test results on IPQ8074?

I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
I got ~720Mbps compared to ~550Mbps before.

I can tell you that in OpenWrt, we have had it enabled for 6+ months
at this point
and its been really good.

Regards,
Robert
>
> Thanks,
> Manikanta



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 13:46             ` Robert Marko
  0 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-02 13:46 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Kalle Valo, ath11k, linux-wireless

On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
<quic_mpubbise@quicinc.com> wrote:
>
> On 9/2/2022 6:50 PM, Robert Marko wrote:
> > On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> > <quic_mpubbise@quicinc.com> wrote:
> >>
> >> On 9/2/2022 6:18 PM, Kalle Valo wrote:
> >>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
> >>>
> >>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
> >>>> runs in softirq context and on the core which scheduled the NAPI,
> >>>> threaded NAPI makes use of kernel threads which are under direct
> >>>> control of the scheduler and helps in balancing the NAPI processing
> >>>> load across multiple CPUs thereby improving throughput.
> >>>>
> >>>> In the case of WCN6750, enabling threaded NAPI has improved
> >>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
> >>>> gains for other ath11k devices as well, therefore enable threaded
> >>>> NAPI on all other devices.
> >>>>
> >>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
> >>>>
> >>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
> >>>> ---
> >>>>    drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
> >>>>    drivers/net/wireless/ath/ath11k/pcic.c | 1 +
> >>>>    2 files changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> index d7d33d5cdfc5..e44e2f29a88f 100644
> >>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> >>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
> >>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>>>
> >>>>               if (!irq_grp->napi_enabled) {
> >>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>>>                       napi_enable(&irq_grp->napi);
> >>>>                       irq_grp->napi_enabled = true;
> >>>>               }
> >>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> index cf12b98c480d..c703db19de51 100644
> >>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
> >>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
> >>>>               struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
> >>>>
> >>>>               if (!irq_grp->napi_enabled) {
> >>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
> >>>>                       napi_enable(&irq_grp->napi);
> >>>>                       irq_grp->napi_enabled = true;
> >>>>               }
> >>>
> >>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
> >>> enabling it on all ath11k hardware, or am I missing something? I admit I
> >>> didn't check this very carefully.
> >>>
> >>> (reads the commit log one more time)
> >>>
> >>> Ah, in the last sentence you mention that it's enabled on all hardware.
> >>> That's quite easy to miss and the commit log is quite misleading, please
> >>> emphasise already in the title and the first sentence that this is for
> >>> all hardware.
> >>
> >> My Bad, yes you right. The patch was made initially only for WCN6750 and
> >> was enabled later for all devices.
> >>
> >>>
> >>> Also more testing would be nice. Enabling something like this with
> >>> testing only on one hardware family (WCN7850) can be risky. I always get
> >>> warm fuzzy feelings if a patch is tested with all three hardware
> >>> families we currently support:
> >>>
> >>> * IPQ8074 etc
> >>> * QCA6390 etc
> >>> * WCN7850
> >>>
> >>
> >> WCN7850 should be an ath12k device If I'm correct.
> >>
> >> Regardless of the chip family, even I feel that the tput changes like
> >> these should be tested on all the chipsets. Availability of the hardware
> >> and time are something which are stopping me in testing the changes on
> >> all supported targets.
> >>
> >> As I said, I had made the changes only to WCN6750 initially (using a
> >> hw_param). Can we take that approach for now and enable this for other
> >> targets only if required & upon thorough testing?
> >
> > I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> >
>
> Great. Do you have any test results on IPQ8074?

I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
I got ~720Mbps compared to ~550Mbps before.

I can tell you that in OpenWrt, we have had it enabled for 6+ months
at this point
and its been really good.

Regards,
Robert
>
> Thanks,
> Manikanta



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 13:46             ` Robert Marko
@ 2022-09-02 14:30               ` Manikanta Pubbisetty
  -1 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 14:30 UTC (permalink / raw)
  To: Robert Marko; +Cc: Kalle Valo, ath11k, linux-wireless

On 9/2/2022 7:16 PM, Robert Marko wrote:
> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
> <quic_mpubbise@quicinc.com> wrote:
>>
>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>>> <quic_mpubbise@quicinc.com> wrote:
>>>>
>>>> On 9/2/2022 6:18 PM, Kalle Valo wrote:
>>>>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>>>>
>>>>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>>>>>> runs in softirq context and on the core which scheduled the NAPI,
>>>>>> threaded NAPI makes use of kernel threads which are under direct
>>>>>> control of the scheduler and helps in balancing the NAPI processing
>>>>>> load across multiple CPUs thereby improving throughput.
>>>>>>
>>>>>> In the case of WCN6750, enabling threaded NAPI has improved
>>>>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>>>>>> gains for other ath11k devices as well, therefore enable threaded
>>>>>> NAPI on all other devices.
>>>>>>
>>>>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>>>>>
>>>>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>>>>>> ---
>>>>>>     drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>>>>>     drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>>>>>     2 files changed, 2 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> index d7d33d5cdfc5..e44e2f29a88f 100644
>>>>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>>>>>                struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>>>
>>>>>>                if (!irq_grp->napi_enabled) {
>>>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>>>                        napi_enable(&irq_grp->napi);
>>>>>>                        irq_grp->napi_enabled = true;
>>>>>>                }
>>>>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> index cf12b98c480d..c703db19de51 100644
>>>>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>>>>>                struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>>>
>>>>>>                if (!irq_grp->napi_enabled) {
>>>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>>>                        napi_enable(&irq_grp->napi);
>>>>>>                        irq_grp->napi_enabled = true;
>>>>>>                }
>>>>>
>>>>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
>>>>> enabling it on all ath11k hardware, or am I missing something? I admit I
>>>>> didn't check this very carefully.
>>>>>
>>>>> (reads the commit log one more time)
>>>>>
>>>>> Ah, in the last sentence you mention that it's enabled on all hardware.
>>>>> That's quite easy to miss and the commit log is quite misleading, please
>>>>> emphasise already in the title and the first sentence that this is for
>>>>> all hardware.
>>>>
>>>> My Bad, yes you right. The patch was made initially only for WCN6750 and
>>>> was enabled later for all devices.
>>>>
>>>>>
>>>>> Also more testing would be nice. Enabling something like this with
>>>>> testing only on one hardware family (WCN7850) can be risky. I always get
>>>>> warm fuzzy feelings if a patch is tested with all three hardware
>>>>> families we currently support:
>>>>>
>>>>> * IPQ8074 etc
>>>>> * QCA6390 etc
>>>>> * WCN7850
>>>>>
>>>>
>>>> WCN7850 should be an ath12k device If I'm correct.
>>>>
>>>> Regardless of the chip family, even I feel that the tput changes like
>>>> these should be tested on all the chipsets. Availability of the hardware
>>>> and time are something which are stopping me in testing the changes on
>>>> all supported targets.
>>>>
>>>> As I said, I had made the changes only to WCN6750 initially (using a
>>>> hw_param). Can we take that approach for now and enable this for other
>>>> targets only if required & upon thorough testing?
>>>
>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>>>
>>
>> Great. Do you have any test results on IPQ8074?
> 
> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
> I got ~720Mbps compared to ~550Mbps before.
> 
> I can tell you that in OpenWrt, we have had it enabled for 6+ months
> at this point
> and its been really good.
> 

That's a significant improvement, great to hear that. We have another 
strong reason to have this change in upstream driver.

Thanks,
Manikanta

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-02 14:30               ` Manikanta Pubbisetty
  0 siblings, 0 replies; 36+ messages in thread
From: Manikanta Pubbisetty @ 2022-09-02 14:30 UTC (permalink / raw)
  To: Robert Marko; +Cc: Kalle Valo, ath11k, linux-wireless

On 9/2/2022 7:16 PM, Robert Marko wrote:
> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
> <quic_mpubbise@quicinc.com> wrote:
>>
>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>>> <quic_mpubbise@quicinc.com> wrote:
>>>>
>>>> On 9/2/2022 6:18 PM, Kalle Valo wrote:
>>>>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>>>>
>>>>>> Enable threaded NAPI on WCN6750. Unlike traditional NAPI poll which
>>>>>> runs in softirq context and on the core which scheduled the NAPI,
>>>>>> threaded NAPI makes use of kernel threads which are under direct
>>>>>> control of the scheduler and helps in balancing the NAPI processing
>>>>>> load across multiple CPUs thereby improving throughput.
>>>>>>
>>>>>> In the case of WCN6750, enabling threaded NAPI has improved
>>>>>> 160 MHz RX throughput by nearly 400 Mbps. This should give similar
>>>>>> gains for other ath11k devices as well, therefore enable threaded
>>>>>> NAPI on all other devices.
>>>>>>
>>>>>> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
>>>>>>
>>>>>> Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
>>>>>> ---
>>>>>>     drivers/net/wireless/ath/ath11k/ahb.c  | 1 +
>>>>>>     drivers/net/wireless/ath/ath11k/pcic.c | 1 +
>>>>>>     2 files changed, 2 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> index d7d33d5cdfc5..e44e2f29a88f 100644
>>>>>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>>>>>> @@ -314,6 +314,7 @@ static void ath11k_ahb_ext_irq_enable(struct ath11k_base *ab)
>>>>>>                struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>>>
>>>>>>                if (!irq_grp->napi_enabled) {
>>>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>>>                        napi_enable(&irq_grp->napi);
>>>>>>                        irq_grp->napi_enabled = true;
>>>>>>                }
>>>>>> diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> index cf12b98c480d..c703db19de51 100644
>>>>>> --- a/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> +++ b/drivers/net/wireless/ath/ath11k/pcic.c
>>>>>> @@ -440,6 +440,7 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
>>>>>>                struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
>>>>>>
>>>>>>                if (!irq_grp->napi_enabled) {
>>>>>> +                    dev_set_threaded(&irq_grp->napi_ndev, true);
>>>>>>                        napi_enable(&irq_grp->napi);
>>>>>>                        irq_grp->napi_enabled = true;
>>>>>>                }
>>>>>
>>>>> The commit log claims that this enabled _only_ on WCN6750 but aren't we
>>>>> enabling it on all ath11k hardware, or am I missing something? I admit I
>>>>> didn't check this very carefully.
>>>>>
>>>>> (reads the commit log one more time)
>>>>>
>>>>> Ah, in the last sentence you mention that it's enabled on all hardware.
>>>>> That's quite easy to miss and the commit log is quite misleading, please
>>>>> emphasise already in the title and the first sentence that this is for
>>>>> all hardware.
>>>>
>>>> My Bad, yes you right. The patch was made initially only for WCN6750 and
>>>> was enabled later for all devices.
>>>>
>>>>>
>>>>> Also more testing would be nice. Enabling something like this with
>>>>> testing only on one hardware family (WCN7850) can be risky. I always get
>>>>> warm fuzzy feelings if a patch is tested with all three hardware
>>>>> families we currently support:
>>>>>
>>>>> * IPQ8074 etc
>>>>> * QCA6390 etc
>>>>> * WCN7850
>>>>>
>>>>
>>>> WCN7850 should be an ath12k device If I'm correct.
>>>>
>>>> Regardless of the chip family, even I feel that the tput changes like
>>>> these should be tested on all the chipsets. Availability of the hardware
>>>> and time are something which are stopping me in testing the changes on
>>>> all supported targets.
>>>>
>>>> As I said, I had made the changes only to WCN6750 initially (using a
>>>> hw_param). Can we take that approach for now and enable this for other
>>>> targets only if required & upon thorough testing?
>>>
>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>>>
>>
>> Great. Do you have any test results on IPQ8074?
> 
> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
> I got ~720Mbps compared to ~550Mbps before.
> 
> I can tell you that in OpenWrt, we have had it enabled for 6+ months
> at this point
> and its been really good.
> 

That's a significant improvement, great to hear that. We have another 
strong reason to have this change in upstream driver.

Thanks,
Manikanta

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 14:30               ` Manikanta Pubbisetty
@ 2022-09-08  6:46                 ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08  6:46 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Robert Marko, ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> On 9/2/2022 7:16 PM, Robert Marko wrote:
>> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
>> <quic_mpubbise@quicinc.com> wrote:
>>>
>>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>>>> <quic_mpubbise@quicinc.com> wrote:
>>>>>
>>>>> Regardless of the chip family, even I feel that the tput changes like
>>>>> these should be tested on all the chipsets. Availability of the hardware
>>>>> and time are something which are stopping me in testing the changes on
>>>>> all supported targets.
>>>>>
>>>>> As I said, I had made the changes only to WCN6750 initially (using a
>>>>> hw_param). Can we take that approach for now and enable this for other
>>>>> targets only if required & upon thorough testing?
>>>>
>>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>>>>
>>>
>>> Great. Do you have any test results on IPQ8074?
>>
>> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
>> I got ~720Mbps compared to ~550Mbps before.
>>
>> I can tell you that in OpenWrt, we have had it enabled for 6+ months
>> at this point
>> and its been really good.
>>
>
> That's a significant improvement, great to hear that. We have another
> strong reason to have this change in upstream driver.

Indeed, thanks Robert. Is the code in openwrt similar as what
Manikanta's patch does?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-08  6:46                 ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08  6:46 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: Robert Marko, ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

> On 9/2/2022 7:16 PM, Robert Marko wrote:
>> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
>> <quic_mpubbise@quicinc.com> wrote:
>>>
>>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>>>> <quic_mpubbise@quicinc.com> wrote:
>>>>>
>>>>> Regardless of the chip family, even I feel that the tput changes like
>>>>> these should be tested on all the chipsets. Availability of the hardware
>>>>> and time are something which are stopping me in testing the changes on
>>>>> all supported targets.
>>>>>
>>>>> As I said, I had made the changes only to WCN6750 initially (using a
>>>>> hw_param). Can we take that approach for now and enable this for other
>>>>> targets only if required & upon thorough testing?
>>>>
>>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>>>>
>>>
>>> Great. Do you have any test results on IPQ8074?
>>
>> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
>> I got ~720Mbps compared to ~550Mbps before.
>>
>> I can tell you that in OpenWrt, we have had it enabled for 6+ months
>> at this point
>> and its been really good.
>>
>
> That's a significant improvement, great to hear that. We have another
> strong reason to have this change in upstream driver.

Indeed, thanks Robert. Is the code in openwrt similar as what
Manikanta's patch does?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-02 13:17       ` Manikanta Pubbisetty
@ 2022-09-08  6:49         ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08  6:49 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

>> Also more testing would be nice. Enabling something like this with
>> testing only on one hardware family (WCN7850) can be risky. I always get
>> warm fuzzy feelings if a patch is tested with all three hardware
>> families we currently support:
>>
>> * IPQ8074 etc
>> * QCA6390 etc
>> * WCN7850
>
> WCN7850 should be an ath12k device If I'm correct.

Sorry, I meant WCN6855. Too many drivers and too many hardware...

> Regardless of the chip family, even I feel that the tput changes like
> these should be tested on all the chipsets. Availability of the
> hardware and time are something which are stopping me in testing the
> changes on all supported targets.

I have the same problem, I cannot test all possible hardware. That's why
I was requsting help here.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-08  6:49         ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08  6:49 UTC (permalink / raw)
  To: Manikanta Pubbisetty; +Cc: ath11k, linux-wireless

Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:

>> Also more testing would be nice. Enabling something like this with
>> testing only on one hardware family (WCN7850) can be risky. I always get
>> warm fuzzy feelings if a patch is tested with all three hardware
>> families we currently support:
>>
>> * IPQ8074 etc
>> * QCA6390 etc
>> * WCN7850
>
> WCN7850 should be an ath12k device If I'm correct.

Sorry, I meant WCN6855. Too many drivers and too many hardware...

> Regardless of the chip family, even I feel that the tput changes like
> these should be tested on all the chipsets. Availability of the
> hardware and time are something which are stopping me in testing the
> changes on all supported targets.

I have the same problem, I cannot test all possible hardware. That's why
I was requsting help here.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-08  6:46                 ` Kalle Valo
@ 2022-09-08  8:49                   ` Robert Marko
  -1 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-08  8:49 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Manikanta Pubbisetty, ath11k, linux-wireless

On Thu, Sep 8, 2022 at 8:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>
> > On 9/2/2022 7:16 PM, Robert Marko wrote:
> >> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
> >> <quic_mpubbise@quicinc.com> wrote:
> >>>
> >>> On 9/2/2022 6:50 PM, Robert Marko wrote:
> >>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> >>>> <quic_mpubbise@quicinc.com> wrote:
> >>>>>
> >>>>> Regardless of the chip family, even I feel that the tput changes like
> >>>>> these should be tested on all the chipsets. Availability of the hardware
> >>>>> and time are something which are stopping me in testing the changes on
> >>>>> all supported targets.
> >>>>>
> >>>>> As I said, I had made the changes only to WCN6750 initially (using a
> >>>>> hw_param). Can we take that approach for now and enable this for other
> >>>>> targets only if required & upon thorough testing?
> >>>>
> >>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> >>>>
> >>>
> >>> Great. Do you have any test results on IPQ8074?
> >>
> >> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
> >> I got ~720Mbps compared to ~550Mbps before.
> >>
> >> I can tell you that in OpenWrt, we have had it enabled for 6+ months
> >> at this point
> >> and its been really good.
> >>
> >
> > That's a significant improvement, great to hear that. We have another
> > strong reason to have this change in upstream driver.
>
> Indeed, thanks Robert. Is the code in openwrt similar as what
> Manikanta's patch does?

Hi,

It's actually identical, we are also just calling dev_set_threaded
before napi_enable.

Regards,
Robert
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-08  8:49                   ` Robert Marko
  0 siblings, 0 replies; 36+ messages in thread
From: Robert Marko @ 2022-09-08  8:49 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Manikanta Pubbisetty, ath11k, linux-wireless

On Thu, Sep 8, 2022 at 8:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>
> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>
> > On 9/2/2022 7:16 PM, Robert Marko wrote:
> >> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
> >> <quic_mpubbise@quicinc.com> wrote:
> >>>
> >>> On 9/2/2022 6:50 PM, Robert Marko wrote:
> >>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
> >>>> <quic_mpubbise@quicinc.com> wrote:
> >>>>>
> >>>>> Regardless of the chip family, even I feel that the tput changes like
> >>>>> these should be tested on all the chipsets. Availability of the hardware
> >>>>> and time are something which are stopping me in testing the changes on
> >>>>> all supported targets.
> >>>>>
> >>>>> As I said, I had made the changes only to WCN6750 initially (using a
> >>>>> hw_param). Can we take that approach for now and enable this for other
> >>>>> targets only if required & upon thorough testing?
> >>>>
> >>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
> >>>>
> >>>
> >>> Great. Do you have any test results on IPQ8074?
> >>
> >> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
> >> I got ~720Mbps compared to ~550Mbps before.
> >>
> >> I can tell you that in OpenWrt, we have had it enabled for 6+ months
> >> at this point
> >> and its been really good.
> >>
> >
> > That's a significant improvement, great to hear that. We have another
> > strong reason to have this change in upstream driver.
>
> Indeed, thanks Robert. Is the code in openwrt similar as what
> Manikanta's patch does?

Hi,

It's actually identical, we are also just calling dev_set_threaded
before napi_enable.

Regards,
Robert
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
  2022-09-08  8:49                   ` Robert Marko
@ 2022-09-08 12:15                     ` Kalle Valo
  -1 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08 12:15 UTC (permalink / raw)
  To: Robert Marko; +Cc: Manikanta Pubbisetty, ath11k, linux-wireless

Robert Marko <robert.marko@sartura.hr> writes:

> On Thu, Sep 8, 2022 at 8:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>
>>
>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>
>> > On 9/2/2022 7:16 PM, Robert Marko wrote:
>> >> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
>> >> <quic_mpubbise@quicinc.com> wrote:
>> >>>
>> >>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>> >>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>> >>>> <quic_mpubbise@quicinc.com> wrote:
>> >>>>>
>> >>>>> Regardless of the chip family, even I feel that the tput changes like
>> >>>>> these should be tested on all the chipsets. Availability of the hardware
>> >>>>> and time are something which are stopping me in testing the changes on
>> >>>>> all supported targets.
>> >>>>>
>> >>>>> As I said, I had made the changes only to WCN6750 initially (using a
>> >>>>> hw_param). Can we take that approach for now and enable this for other
>> >>>>> targets only if required & upon thorough testing?
>> >>>>
>> >>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>> >>>>
>> >>>
>> >>> Great. Do you have any test results on IPQ8074?
>> >>
>> >> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
>> >> I got ~720Mbps compared to ~550Mbps before.
>> >>
>> >> I can tell you that in OpenWrt, we have had it enabled for 6+ months
>> >> at this point
>> >> and its been really good.
>> >>
>> >
>> > That's a significant improvement, great to hear that. We have another
>> > strong reason to have this change in upstream driver.
>>
>> Indeed, thanks Robert. Is the code in openwrt similar as what
>> Manikanta's patch does?
>
> It's actually identical, we are also just calling dev_set_threaded
> before napi_enable.

Nice, even better :)

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750
@ 2022-09-08 12:15                     ` Kalle Valo
  0 siblings, 0 replies; 36+ messages in thread
From: Kalle Valo @ 2022-09-08 12:15 UTC (permalink / raw)
  To: Robert Marko; +Cc: Manikanta Pubbisetty, ath11k, linux-wireless

Robert Marko <robert.marko@sartura.hr> writes:

> On Thu, Sep 8, 2022 at 8:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>
>>
>> Manikanta Pubbisetty <quic_mpubbise@quicinc.com> writes:
>>
>> > On 9/2/2022 7:16 PM, Robert Marko wrote:
>> >> On Fri, Sep 2, 2022 at 3:42 PM Manikanta Pubbisetty
>> >> <quic_mpubbise@quicinc.com> wrote:
>> >>>
>> >>> On 9/2/2022 6:50 PM, Robert Marko wrote:
>> >>>> On Fri, Sep 2, 2022 at 3:18 PM Manikanta Pubbisetty
>> >>>> <quic_mpubbise@quicinc.com> wrote:
>> >>>>>
>> >>>>> Regardless of the chip family, even I feel that the tput changes like
>> >>>>> these should be tested on all the chipsets. Availability of the hardware
>> >>>>> and time are something which are stopping me in testing the changes on
>> >>>>> all supported targets.
>> >>>>>
>> >>>>> As I said, I had made the changes only to WCN6750 initially (using a
>> >>>>> hw_param). Can we take that approach for now and enable this for other
>> >>>>> targets only if required & upon thorough testing?
>> >>>>
>> >>>> I can tell you that on IPQ8074 threaded NAPI really improves perfromance.
>> >>>>
>> >>>
>> >>> Great. Do you have any test results on IPQ8074?
>> >>
>> >> I dont have full test results, but on Poco F2 Pro as the client @80MHz AX
>> >> I got ~720Mbps compared to ~550Mbps before.
>> >>
>> >> I can tell you that in OpenWrt, we have had it enabled for 6+ months
>> >> at this point
>> >> and its been really good.
>> >>
>> >
>> > That's a significant improvement, great to hear that. We have another
>> > strong reason to have this change in upstream driver.
>>
>> Indeed, thanks Robert. Is the code in openwrt similar as what
>> Manikanta's patch does?
>
> It's actually identical, we are also just calling dev_set_threaded
> before napi_enable.

Nice, even better :)

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-09-08 12:15 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 13:51 [PATCH 0/3] Throughput fixes for WCN6750 Manikanta Pubbisetty
2022-07-20 13:51 ` Manikanta Pubbisetty
2022-07-20 13:51 ` [PATCH 1/3] ath11k: Enable threaded NAPI on WCN6750 Manikanta Pubbisetty
2022-07-20 13:51   ` Manikanta Pubbisetty
2022-09-02 12:37   ` Kalle Valo
2022-09-02 12:37     ` Kalle Valo
2022-09-02 12:54     ` Manikanta Pubbisetty
2022-09-02 12:54       ` Manikanta Pubbisetty
2022-09-02 12:48   ` Kalle Valo
2022-09-02 12:48     ` Kalle Valo
2022-09-02 13:17     ` Manikanta Pubbisetty
2022-09-02 13:17       ` Manikanta Pubbisetty
2022-09-02 13:20       ` Robert Marko
2022-09-02 13:20         ` Robert Marko
2022-09-02 13:42         ` Manikanta Pubbisetty
2022-09-02 13:42           ` Manikanta Pubbisetty
2022-09-02 13:46           ` Robert Marko
2022-09-02 13:46             ` Robert Marko
2022-09-02 14:30             ` Manikanta Pubbisetty
2022-09-02 14:30               ` Manikanta Pubbisetty
2022-09-08  6:46               ` Kalle Valo
2022-09-08  6:46                 ` Kalle Valo
2022-09-08  8:49                 ` Robert Marko
2022-09-08  8:49                   ` Robert Marko
2022-09-08 12:15                   ` Kalle Valo
2022-09-08 12:15                     ` Kalle Valo
2022-09-08  6:49       ` Kalle Valo
2022-09-08  6:49         ` Kalle Valo
2022-07-20 13:51 ` [PATCH 2/3] ath11k: Add multi TX ring support for WCN6750 Manikanta Pubbisetty
2022-07-20 13:51   ` Manikanta Pubbisetty
2022-09-02 12:49   ` Kalle Valo
2022-09-02 12:49     ` Kalle Valo
2022-09-02 13:44     ` Manikanta Pubbisetty
2022-09-02 13:44       ` Manikanta Pubbisetty
2022-07-20 13:51 ` [PATCH 3/3] ath11k: Increase TCL data ring size " Manikanta Pubbisetty
2022-07-20 13:51   ` Manikanta Pubbisetty

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.