Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group
@ 2026-10-06  0:48 John
  2026-10-06  2:15 ` Jeff Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: John @ 2026-10-06  0:48 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]

An RX interrupt group may select multiple receive rings. The Wi-Fi 7
handler currently services only the highest set bit, even when the NAPI
budget has room for work from another selected ring. Walk all selected
bits and retain the shared budget and existing early-exit behavior.

On a locally adapted GL-BE3600/QCN6432, group 5 selects bits 2 and 3. A
host regression built from the actual RX block completes 3 of 6 queued
packets before the fix and 6 of 6 after it. Single-ring, empty-mask and
two-poll budget cases pass. Descending priority is unchanged; this does
not establish fairness under sustained traffic.

Signed-off-by: John <dencity7@gmail.com>

---
RFC validation and limits:

Source applicability and the host regression were checked against
backports 7.2 plus the 230 wireless patches from perceival/openwrt-flint3
commit 2365932733ca8ec3b346621d9cec2eb3df3b2cf3. The new patch applies
with zero fuzz. The same source-block regression and exact patch
application also pass against official ath.git main at
388d3c42e8aba1cfc3c6d2c52877a46d8cf740db (zero fuzz). No full module
build or hardware test was performed against either current revision.

Historical tests on Linux 6.18.39 with local backports 7.2-rc4/QCN6432
changes passed DHCP, DNS, 32 UDP flows and about 181 seconds of traffic
after reboot. These are bounded observations, not throughput or long-term
stability qualification. The contribution was developed with AI assistance.

--- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
@@ -52,8 +52,10 @@
 			goto done;
 	}

-	if (dp->hw_params->ring_mask->rx[grp_id]) {
-		i = fls(dp->hw_params->ring_mask->rx[grp_id]) - 1;
+	ring_mask = dp->hw_params->ring_mask->rx[grp_id];
+	while (ring_mask) {
+		i = fls(ring_mask) - 1;
+		ring_mask &= ~BIT(i);
 		work_done = ath12k_wifi7_dp_rx_process(dp, i, napi, budget);
 		budget -= work_done;
 		tot_work_done += work_done;

[-- Attachment #2: 0001-ath12k-service-all-rx-rings.patch --]
[-- Type: text/plain, Size: 2273 bytes --]

From: John <dencity7@gmail.com>
To: ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group
X-Unsent: 1
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

An RX interrupt group may select multiple receive rings. The Wi-Fi 7
handler currently services only the highest set bit, even when the NAPI
budget has room for work from another selected ring. Walk all selected
bits and retain the shared budget and existing early-exit behavior.

On a locally adapted GL-BE3600/QCN6432, group 5 selects bits 2 and 3. A
host regression built from the actual RX block completes 3 of 6 queued
packets before the fix and 6 of 6 after it. Single-ring, empty-mask and
two-poll budget cases pass. Descending priority is unchanged; this does
not establish fairness under sustained traffic.

Signed-off-by: John <dencity7@gmail.com>

---
RFC validation and limits:

Source applicability and the host regression were checked against
backports 7.2 plus the 230 wireless patches from perceival/openwrt-flint3
commit 2365932733ca8ec3b346621d9cec2eb3df3b2cf3. The new patch applies
with zero fuzz. The same source-block regression and exact patch
application also pass against official ath.git main at
388d3c42e8aba1cfc3c6d2c52877a46d8cf740db (zero fuzz). No full module
build or hardware test was performed against either current revision.

Historical tests on Linux 6.18.39 with local backports 7.2-rc4/QCN6432
changes passed DHCP, DNS, 32 UDP flows and about 181 seconds of traffic
after reboot. These are bounded observations, not throughput or long-term
stability qualification. The contribution was developed with AI assistance.

--- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
@@ -52,8 +52,10 @@
 			goto done;
 	}
 
-	if (dp->hw_params->ring_mask->rx[grp_id]) {
-		i = fls(dp->hw_params->ring_mask->rx[grp_id]) - 1;
+	ring_mask = dp->hw_params->ring_mask->rx[grp_id];
+	while (ring_mask) {
+		i = fls(ring_mask) - 1;
+		ring_mask &= ~BIT(i);
 		work_done = ath12k_wifi7_dp_rx_process(dp, i, napi, budget);
 		budget -= work_done;
 		tot_work_done += work_done;

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

* Re: [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group
  2026-10-06  0:48 [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group John
@ 2026-10-06  2:15 ` Jeff Johnson
  2026-10-07 19:19   ` Zephyr Madera
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Johnson @ 2026-10-06  2:15 UTC (permalink / raw)
  To: John, ath12k; +Cc: linux-wireless

On 10/5/2026 5:48 PM, John wrote:
> An RX interrupt group may select multiple receive rings. The Wi-Fi 7
> handler currently services only the highest set bit, even when the NAPI
> budget has room for work from another selected ring. Walk all selected
> bits and retain the shared budget and existing early-exit behavior.
> 
> On a locally adapted GL-BE3600/QCN6432, group 5 selects bits 2 and 3. A
> host regression built from the actual RX block completes 3 of 6 queued
> packets before the fix and 6 of 6 after it. Single-ring, empty-mask and
> two-poll budget cases pass. Descending priority is unchanged; this does
> not establish fairness under sustained traffic.

see:
https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath12k/submittingpatches.html#tested-on-tag

For a datapath change I'd need Tested-on: tags from both WCN and
QCN chipsets since they have different requirements.

> 
> Signed-off-by: John <dencity7@gmail.com>

See:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

> 
> ---
> RFC validation and limits:
> 
> Source applicability and the host regression were checked against
> backports 7.2 plus the 230 wireless patches from perceival/openwrt-flint3
> commit 2365932733ca8ec3b346621d9cec2eb3df3b2cf3. The new patch applies
> with zero fuzz. The same source-block regression and exact patch
> application also pass against official ath.git main at
> 388d3c42e8aba1cfc3c6d2c52877a46d8cf740db (zero fuzz). No full module
> build or hardware test was performed against either current revision.
> 
> Historical tests on Linux 6.18.39 with local backports 7.2-rc4/QCN6432
> changes passed DHCP, DNS, 32 UDP flows and about 181 seconds of traffic
> after reboot. These are bounded observations, not throughput or long-term
> stability qualification. The contribution was developed with AI assistance.

see:
https://docs.kernel.org/process/coding-assistants.html#attribution

> 
> --- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
> @@ -52,8 +52,10 @@
>  			goto done;
>  	}
> 
> -	if (dp->hw_params->ring_mask->rx[grp_id]) {
> -		i = fls(dp->hw_params->ring_mask->rx[grp_id]) - 1;
> +	ring_mask = dp->hw_params->ring_mask->rx[grp_id];
> +	while (ring_mask) {
> +		i = fls(ring_mask) - 1;
> +		ring_mask &= ~BIT(i);
>  		work_done = ath12k_wifi7_dp_rx_process(dp, i, napi, budget);
>  		budget -= work_done;
>  		tot_work_done += work_done;


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

* Re: [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group
  2026-10-06  2:15 ` Jeff Johnson
@ 2026-10-07 19:19   ` Zephyr Madera
  0 siblings, 0 replies; 3+ messages in thread
From: Zephyr Madera @ 2026-10-07 19:19 UTC (permalink / raw)
  To: Jeff Johnson; +Cc: ath12k, linux-wireless

Hi Jeff,

Thanks for clarifying the need for QCN and WCN coverage. I understand
the concern about changing a shared datapath.

I have access to QCN-based hardware, but no WCN7850 device. Could you
clarify the minimum testing you would need for this particular RX-ring
change?

Since the initial submission, I have checked the patch against ath.git
main at 17e4b9ea527b6c9491bed60f646bb2eff7d8db7b. The baseline and
patched x86_64 driver builds pass, along with source-matched
regression fixtures covering multiple rings, a single ring, an empty
mask and shared-budget handling. These are compilation and
host-fixture results, not a substitute for hardware testing.

In particular:

- Which QCN/WCN receive-path differences or failure cases should the
tests exercise?
- What traffic tests, operating modes, duration and instrumentation
would provide sufficient coverage?
- Is there a preferred firmware version or kernel baseline for that testing?
- Could a maintainer or community member with WCN7850 hardware help
test the patch and provide the appropriate testing attribution?
- Can source review continue while that hardware coverage is arranged,
with the limitation stated explicitly?

I can document the testing performed on the hardware available to me
and provide the focused patch and reproduction details. I want to meet
the acceptance criteria without claiming coverage I cannot verify.

Thanks,
John

On Mon, 05 Oct 2026 19:15:52 -0700, Jeff Johnson
<jeff.johnson@oss.qualcomm.com> wrote:
> On 10/5/2026 5:48 PM, John wrote:
> > An RX interrupt group may select multiple receive rings. The Wi-Fi 7
> > handler currently services only the highest set bit, even when the NAPI
> > budget has room for work from another selected ring. Walk all selected
> > bits and retain the shared budget and existing early-exit behavior.
> >
> > On a locally adapted GL-BE3600/QCN6432, group 5 selects bits 2 and 3. A
> > host regression built from the actual RX block completes 3 of 6 queued
> > packets before the fix and 6 of 6 after it. Single-ring, empty-mask and
> > two-poll budget cases pass. Descending priority is unchanged; this does
> > not establish fairness under sustained traffic.
>
> see:
> https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath12k/submittingpatches.html#tested-on-tag
>
> For a datapath change I'd need Tested-on: tags from both WCN and
> QCN chipsets since they have different requirements.
>
> >
> > Signed-off-by: John <dencity7@gmail.com>
>
> See:
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
>
> >
> > ---
> > RFC validation and limits:
> >
> > Source applicability and the host regression were checked against
> > backports 7.2 plus the 230 wireless patches from perceival/openwrt-flint3
> > commit 2365932733ca8ec3b346621d9cec2eb3df3b2cf3. The new patch applies
> > with zero fuzz. The same source-block regression and exact patch
> > application also pass against official ath.git main at
> > 388d3c42e8aba1cfc3c6d2c52877a46d8cf740db (zero fuzz). No full module
> > build or hardware test was performed against either current revision.
> >
> > Historical tests on Linux 6.18.39 with local backports 7.2-rc4/QCN6432
> > changes passed DHCP, DNS, 32 UDP flows and about 181 seconds of traffic
> > after reboot. These are bounded observations, not throughput or long-term
> > stability qualification. The contribution was developed with AI assistance.
>
> see:
> https://docs.kernel.org/process/coding-assistants.html#attribution
>
> >
> > --- a/drivers/net/wireless/ath/ath12k/wifi7/dp.c
> > +++ b/drivers/net/wireless/ath/ath12k/wifi7/dp.c
> > @@ -52,8 +52,10 @@
> >  			goto done;
> >  	}
> >
> > -	if (dp->hw_params->ring_mask->rx[grp_id]) {
> > -		i = fls(dp->hw_params->ring_mask->rx[grp_id]) - 1;
> > +	ring_mask = dp->hw_params->ring_mask->rx[grp_id];
> > +	while (ring_mask) {
> > +		i = fls(ring_mask) - 1;
> > +		ring_mask &= ~BIT(i);
> >  		work_done = ath12k_wifi7_dp_rx_process(dp, i, napi, budget);
> >  		budget -= work_done;
> >  		tot_work_done += work_done;

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

end of thread, other threads:[~2026-10-07 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  0:48 [RFC PATCH] wifi: ath12k: service all RX rings in an interrupt group John
2026-10-06  2:15 ` Jeff Johnson
2026-10-07 19:19   ` Zephyr Madera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox