mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>,
	Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable per memory profile
Date: Thu, 8 Oct 2026 21:53:09 +0530	[thread overview]
Message-ID: <cf9dbfc5-5787-4a69-ad04-153afdec1cb4@oss.qualcomm.com> (raw)
In-Reply-To: <20261007-mpp_ws-v1-1-739b1fb87d24@oss.qualcomm.com>

On 10/7/2026 2:53 PM, Aaradhana Sahu wrote:
> 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.


> 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
> 
> Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
> ---
>   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(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
> index e527b59ecba5..764e646d0090 100644
> --- a/drivers/net/wireless/ath/ath12k/core.c
> +++ b/drivers/net/wireless/ath/ath12k/core.c
> @@ -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,
>   		},
>   	},
>   };
> diff --git a/drivers/net/wireless/ath/ath12k/dp.h b/drivers/net/wireless/ath/ath12k/dp.h
> index c53eac20b989..108e27dd5797 100644
> --- a/drivers/net/wireless/ath/ath12k/dp.h
> +++ b/drivers/net/wireless/ath/ath12k/dp.h
> @@ -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);
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index cfaf26ae2720..36be543b7c50 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -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;
> 


-- 
Ramesh

  reply	other threads:[~2026-10-08 16:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  9:23 [PATCH ath-next 0/2] wifi: ath12k: Configure RXDMA buffer ring size " Aaradhana Sahu
2026-10-07  9:23 ` [PATCH ath-next 1/2] wifi: ath12k: Make RXDMA buffer ring size configurable " Aaradhana Sahu
2026-10-08 16:23   ` Rameshkumar Sundaram [this message]
2026-10-08 21:08     ` Jeff Johnson
2026-10-07  9:23 ` [PATCH ath-next 2/2] wifi: ath12k: Increase RXDMA buffer ring size for default " Aaradhana Sahu
2026-10-08 16:24 ` [PATCH ath-next 0/2] wifi: ath12k: Configure RXDMA buffer ring size per " Rameshkumar Sundaram
2026-10-09  1:53 ` Baochen Qiang
2026-10-10 14:48 ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf9dbfc5-5787-4a69-ad04-153afdec1cb4@oss.qualcomm.com \
    --to=rameshkumar.sundaram@oss.qualcomm.com \
    --cc=aaradhana.sahu@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®