wifi: ath12k: Configure RXDMA buffer ring size per memory profile
cover wifi: ath12k: Configure RXDMA buffer ring size per memory profile
The RXDMA buffer ring size is currently hardcoded and shared across all memory profiles. This makes it difficult to tune the ring size based on the requirements of individual profiles.
This series first makes the RXDMA buffer ring size configurable through the memory profile configuration and then increases the ring size for the default profile to improve RX traffic handling.
---
Aaradhana Sahu (1):
wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
Pavankumar Nandeshwar (1):
wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
drivers/net/wireless/ath/ath12k/core.c | 2 ++ drivers/net/wireless/ath/ath12k/dp.h | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)
---
base-commit: a90ebf2176db07c5d91e0a62e15ded1fd50710a0
change-id: 20261007-mpp_ws-a041d5cfac9a
PATCH 1/2 wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
Currently, the RXDMA buffer ring size is hardcoded to 4096 and shared across all memory profiles. This prevents individual profiles from tuning the ring size based on their memory and performance requirements.
Add the RXDMA buffer ring size to the memory profile configuration and implement ath12k_dp_rxdma_buf_ring_size() static inline function to access the configured value. This allows different memory profiles to select an appropriate ring size based on available system resources.
The function follows the pattern established in the previous patch for other DP profile parameters, taking struct ath12k_dp_profile_params pointer as argument.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/core.c | 2 ++ drivers/net/wireless/ath/ath12k/dp.h | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath12k/core.c +2 -0
@@ -54,6 +54,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { .num_pool_tx_desc = 32768, .rx_desc_count = 12288, .rx_release_ring_size = 16384, + .rxdma_buf_ring_size = 4096, }, }, [ATH12K_QMI_MEMORY_MODE_LOW_512_M] = {
@@ -68,6 +69,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { .num_pool_tx_desc = 16384, .rx_desc_count = 6144, .rx_release_ring_size = 8192, + .rxdma_buf_ring_size = 4096, }, }, };
drivers/net/wireless/ath/ath12k/dp.h +7 -1
@@ -31,6 +31,7 @@ struct ath12k_dp_profile_params {u32 num_pool_tx_desc;u32 rx_desc_count;u32 rx_release_ring_size; +u32 rxdma_buf_ring_size; };#define DP_MON_PURGE_TIMEOUT_MS 100
@@ -210,7 +211,6 @@ struct ath12k_pdev_dp {#define DP_REO_EXCEPTION_RING_SIZE 128#define DP_REO_CMD_RING_SIZE 256#define DP_REO_STATUS_RING_SIZE 2048 -#define DP_RXDMA_BUF_RING_SIZE 4096#define DP_RX_MAC_BUF_RING_SIZE 4096#define DP_RXDMA_REFILL_RING_SIZE 2048#define DP_RXDMA_ERR_DST_RING_SIZE 1024
@@ -730,6 +730,12 @@ ath12k_dp_rx_release_ring_size(const struct ath12k_dp_profile_params *p)return p->rx_release_ring_size; } +static inline u32 +ath12k_dp_rxdma_buf_ring_size (const struct ath12k_dp_profile_params *p) +{ +return p->rxdma_buf_ring_size; +} +void ath12k_dp_vdev_tx_attach (struct ath12k *ar,struct ath12k_link_vif *arvif);void ath12k_dp_partner_cc_init (struct ath12k_base *ab);int ath12k_dp_pdev_alloc (struct ath12k_base *ab);
drivers/net/wireless/ath/ath12k/dp_rx.c +1 -1
@@ -1699,7 +1699,7 @@ int ath12k_dp_rx_alloc(struct ath12k_base *ab) ret =ath12k_dp_srng_setup (ab, &dp->rx_refill_buf_ring.refill_buf_ring,HAL_RXDMA_BUF ,0 ,0 , -DP_RXDMA_BUF_RING_SIZE ); +ath12k_dp_rxdma_buf_ring_size (dp_params));if (ret) {ath12k_warn (ab,"failed to setup rx_refill_buf_ring\n" );return ret;
Signature · 1 line
2.34.1
Re: [PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
Quoted 10 lines · Aaradhana Sahu
Currently, the RXDMA buffer ring size is hardcoded to 4096 and shared across all memory profiles. This prevents individual profiles from tuning the ring size based on their memory and performance requirements.
Add the RXDMA buffer ring size to the memory profile configuration and implement
ath12k_dp_rxdma_buf_ring_size()static inline function to access the configured value. This allows different memory profiles to select an appropriate ring size based on available system resources.The function follows the pattern established in the previous patch for
Previous patch? Did you forget to add a reference?
Or maybe we can just say:
"The function follows the existing pattern of DP ring size helpers, taking struct ..."
TBH, I'd prefer to drop this paragraph entirely since it's already apparent from the code.
Quoted 81 lines
other DP profile parameters, taking struct
ath12k_dp_profile_paramspointer as argument.Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1Signed-off-by Aaradhana Sahu <[email protected]>--- drivers/net/wireless/ath/ath12k/core.c | 2 ++ drivers/net/wireless/ath/ath12k/dp.h | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)drivers/net/wireless/ath/ath12k/core.c +2
-0@@ -54,6 +54,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { .num_pool_tx_desc = 32768, .rx_desc_count = 12288, .rx_release_ring_size = 16384, + .rxdma_buf_ring_size = 4096, }, }, [ATH12K_QMI_MEMORY_MODE_LOW_512_M] = {@@ -68,6 +69,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { .num_pool_tx_desc = 16384, .rx_desc_count = 6144, .rx_release_ring_size = 8192, + .rxdma_buf_ring_size = 4096, }, }, };drivers/net/wireless/ath/ath12k/dp.h +7
-1@@ -31,6 +31,7 @@ struct ath12k_dp_profile_params {u32 num_pool_tx_desc;u32 rx_desc_count;u32 rx_release_ring_size; +u32 rxdma_buf_ring_size; };#define DP_MON_PURGE_TIMEOUT_MS 100@@ -210,7 +211,6 @@ struct ath12k_pdev_dp {#define DP_REO_EXCEPTION_RING_SIZE 128#define DP_REO_CMD_RING_SIZE 256#define DP_REO_STATUS_RING_SIZE 2048 -#define DP_RXDMA_BUF_RING_SIZE 4096#define DP_RX_MAC_BUF_RING_SIZE 4096#define DP_RXDMA_REFILL_RING_SIZE 2048#define DP_RXDMA_ERR_DST_RING_SIZE 1024@@ -730,6 +730,12 @@ ath12k_dp_rx_release_ring_size(const struct ath12k_dp_profile_params *p)return p->rx_release_ring_size; } +static inline u32 +ath12k_dp_rxdma_buf_ring_size (const struct ath12k_dp_profile_params *p) +{ +return p->rxdma_buf_ring_size; +} +void ath12k_dp_vdev_tx_attach (struct ath12k *ar,struct ath12k_link_vif *arvif);void ath12k_dp_partner_cc_init (struct ath12k_base *ab);int ath12k_dp_pdev_alloc (struct ath12k_base *ab);drivers/net/wireless/ath/ath12k/dp_rx.c +1
-1@@ -1699,7 +1699,7 @@ int ath12k_dp_rx_alloc(struct ath12k_base *ab) ret =ath12k_dp_srng_setup (ab, &dp->rx_refill_buf_ring.refill_buf_ring,HAL_RXDMA_BUF ,0 ,0 , -DP_RXDMA_BUF_RING_SIZE ); +ath12k_dp_rxdma_buf_ring_size (dp_params));if (ret) {ath12k_warn (ab,"failed to setup rx_refill_buf_ring\n" );return ret;
Signature · 1 line
Ramesh
Re: [PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
Quoted 12 lines · Rameshkumar Sundaram
Quoted 10 lines · Aaradhana Sahu
Currently, the RXDMA buffer ring size is hardcoded to 4096 and shared across all memory profiles. This prevents individual profiles from tuning the ring size based on their memory and performance requirements.
Add the RXDMA buffer ring size to the memory profile configuration and implement
ath12k_dp_rxdma_buf_ring_size()static inline function to access the configured value. This allows different memory profiles to select an appropriate ring size based on available system resources.The function follows the pattern established in the previous patch for
Quoted 8 lines
Previous patch? Did you forget to add a reference?
Or maybe we can just say:
"The function follows the existing pattern of DP ring size helpers, taking struct ..."TBH, I'd prefer to drop this paragraph entirely since it's already apparent from the code.
Concur, I'll drop this paragraph when I pull into 'pending'
Quoted 10 lines
Quoted 10 lines
other DP profile parameters, taking struct
ath12k_dp_profile_paramspointer as argument.Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1Signed-off-by Aaradhana Sahu <[email protected]>
PATCH 2/2 wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
In reply to Aaradhana SahuFrom: Pavankumar Nandeshwar <[email protected]>
The default RXDMA buffer ring size of 4096 entries can become a bottleneck under high RX traffic load, resulting in reduced receive throughput due to limited buffer availability.
Increase the RXDMA buffer ring size to 8192 entries for the default memory profile to provide additional RX buffering and improve RX packet processing efficiency.
This increases memory consumption by approximately 9-10 MiB and improves RX throughput by ~20% with the default memory profile (ATH12K_QMI_MEMORY_MODE_DEFAULT).
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/core.c +1 -1
@@ -54,7 +54,7 @@ ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = { .num_pool_tx_desc = 32768, .rx_desc_count = 12288, .rx_release_ring_size = 16384, - .rxdma_buf_ring_size = 4096, + .rxdma_buf_ring_size = 8192, }, }, [ATH12K_QMI_MEMORY_MODE_LOW_512_M] = {
Signature · 1 line
2.34.1
Quoted 16 lines · Aaradhana Sahu
The RXDMA buffer ring size is currently hardcoded and shared across all memory profiles. This makes it difficult to tune the ring size based on the requirements of individual profiles.
This series first makes the RXDMA buffer ring size configurable through the memory profile configuration and then increases the ring size for the default profile to improve RX traffic handling.
Signed-off-by Aaradhana Sahu <[email protected]>---
Aaradhana Sahu (1):
wifi: ath12k: Make RXDMA buffer ring size configurable per memory profilePavankumar Nandeshwar (1):
wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
Quoted 8 lines
drivers/net/wireless/ath/ath12k/core.c | 2 ++ drivers/net/wireless/ath/ath12k/dp.h | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)---
base-commit:a90ebf2176db07c5d91e0a62e15ded1fd50710a0
change-id: 20261007-mpp_ws-a041d5cfac9a
Other than a commit text nit in 1/2
Quoted 16 lines · Aaradhana Sahu
The RXDMA buffer ring size is currently hardcoded and shared across all memory profiles. This makes it difficult to tune the ring size based on the requirements of individual profiles.
This series first makes the RXDMA buffer ring size configurable through the memory profile configuration and then increases the ring size for the default profile to improve RX traffic handling.
Signed-off-by Aaradhana Sahu <[email protected]>---
Aaradhana Sahu (1):
wifi: ath12k: Make RXDMA buffer ring size configurable per memory profilePavankumar Nandeshwar (1):
wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
Quoted 9 lines
drivers/net/wireless/ath/ath12k/core.c | 2 ++ drivers/net/wireless/ath/ath12k/dp.h | 8 +++++++- drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)---
base-commit:a90ebf2176db07c5d91e0a62e15ded1fd50710a0
change-id: 20261007-mpp_ws-a041d5cfac9a
Jeff Johnson
AppliedQuoted 9 lines · Aaradhana Sahu
The RXDMA buffer ring size is currently hardcoded and shared across all memory profiles. This makes it difficult to tune the ring size based on the requirements of individual profiles.
This series first makes the RXDMA buffer ring size configurable through the memory profile configuration and then increases the ring size for the default profile to improve RX traffic handling.
[...]
Applied, thanks!
[1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
commit: 643f0bf936176c114d5631da7547e991b5d99f10
[2/2] wifi: ath12k: Increase RXDMA buffer ring size for default memory profile
commit: 15f7603b69a83a0acc7fcc8992ecbea6110f9424Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>