Skip to content

[PATCH 0/2] genirq/ath12k: fallback to threaded NAPI when IRQ affinity is unavailable#1176

Open
zhuhangtian wants to merge 2 commits into
qualcomm-linux:tech/net/athfrom
zhuhangtian:export_irq_ath12k_thread_napi
Open

[PATCH 0/2] genirq/ath12k: fallback to threaded NAPI when IRQ affinity is unavailable#1176
zhuhangtian wants to merge 2 commits into
qualcomm-linux:tech/net/athfrom
zhuhangtian:export_irq_ath12k_thread_napi

Conversation

@zhuhangtian
Copy link
Copy Markdown

This series improves ath12k datapath behavior on platforms where the
effective IRQ path for WLAN MSI interrupts does not support affinity
setting.

In such setups, DP processing cannot be distributed as intended and can
become CPU-constrained. The ath12k change switches to threaded NAPI when
runtime IRQ capability indicates affinity is unavailable.

Patch 1 exports irq_can_set_affinity() for module drivers so they can
reuse the IRQ core helper instead of open-coding equivalent checks.

Patch 2 uses irq_can_set_affinity() in ath12k PCI to enable threaded NAPI
for DP interrupt groups only when affinity cannot be set.

On RB3Gen2 with QCC2072, EHT160 UDP downlink throughput improved from
802 Mbps to 2.58 Gbps after enabling threaded NAPI.

Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
Link: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
CRs-Fixed: 4498064

Export irq_can_set_affinity() for loadable drivers that need a runtime
check for IRQ affinity capability.

In hierarchical IRQ setups where the effective irqchip path lacks
.irq_set_affinity(), drivers may need to switch to a fallback policy.
Without this export, module drivers cannot use the core helper and have
to open-code equivalent checks.

Signed-off-by: Hangtian Zhu <hangtian.zhu@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
…unavailable

Determine threaded NAPI policy from runtime IRQ capability of the DP MSI
IRQ.

If irq_can_set_affinity() reports that affinity cannot be set, enable
threaded NAPI for DP interrupt groups so datapath processing is not
constrained by a single-CPU softirq context.

On RB3Gen2, where IRQ affinity is unavailable in the effective IRQ path,
EHT160 UDP downlink throughput improved from 802 Mbps to 2.58 Gbps after
enabling threaded NAPI.

Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1

Signed-off-by: Hangtian Zhu <hangtian.zhu@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
@qcomlnxci qcomlnxci requested review from a team and miaoqing-quic and removed request for a team May 19, 2026 01:40
@zhuhangtian zhuhangtian changed the title [RESEND PATCH 0/2] genirq/ath12k: fallback to threaded NAPI when IRQ affinity is unavailable [PATCH 0/2] genirq/ath12k: fallback to threaded NAPI when IRQ affinity is unavailable May 19, 2026
@knaveen-qc
Copy link
Copy Markdown

PR #1176 — validate-patch

PR: #1176

Verdict Issues Detailed Report
⚠️ 0 Full report
Verdict: ⚠️ — click to expand

Patch Validation Report

PR: PR #1176 — "FROMLIST: genirq + ath12k: export irq_can_set_affinity and enable threaded NAPI" (2 commits)
Upstream: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
Verdict: ⚠️ PARTIAL


Commit 1 of 2 — FROMLIST: genirq: export irq_can_set_affinity() for module drivers

Commit Message

Check Status Note
Subject matches upstream FROMLIST: prefix added; core subject unchanged
Body preserves rationale Hierarchical IRQ / fallback policy rationale fully present
Fixes tag present/correct ✅ N/A Not a bug fix; no Fixes: tag needed
Authorship preserved FROMLIST:From: is submitter (Hangtian Zhu); lore author's Signed-off-by: present (same person)
Backport note N/A Not a backport
Co-developed-by misuse Not present; no issue
Link: tag Points to correct message-ID for patch 1/2 of the series

Diff

File Status Notes
kernel/irq/manage.c Single-line addition of EXPORT_SYMBOL_GPL(irq_can_set_affinity); — minimal and correct

Upstream Patch Status

Commit Community Verdict
genirq: export irq_can_set_affinity() for module drivers ⏳ Decision Pending (unknown) — patch posted 2026-05-19 (same day as PR); network access blocked, lore thread could not be fetched to confirm merge signals

qcom-next Presence

Commit Status
genirq: export irq_can_set_affinity() for module drivers ⏭️ Skipped — network access blocked; verify manually

Commit 2 of 2 — FROMLIST: wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable

Commit Message

Check Status Note
Subject matches upstream FROMLIST: prefix added; core subject unchanged
Body preserves rationale Hierarchical IRQ fallback, throughput numbers, Tested-on: tag all present
Fixes tag present/correct ✅ N/A Performance improvement, not a bug fix
Authorship preserved FROMLIST:From: is submitter; lore author's Signed-off-by: present (same person)
Backport note N/A Not a backport
Co-developed-by misuse Not present; no issue
Link: tag Points to patch 1/2 message-ID (713068-1-) instead of patch 2/2 (713068-2-). The correct link should be https://lore.kernel.org/all/20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com/

Diff

File Status Notes
drivers/net/wireless/ath/ath12k/pci.c Adds #include <linux/interrupt.h>, hoists irq variable, probes irq_can_set_affinity() before the loop, enables threaded NAPI per group — internally consistent

Upstream Patch Status

Commit Community Verdict
wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable ⏳ Decision Pending (unknown) — patch posted 2026-05-19 (same day as PR); network access blocked, lore thread could not be fetched

qcom-next Presence

Commit Status
wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable ⏭️ Skipped — network access blocked; verify manually

Dependency Check

  • Commit 2 depends on EXPORT_SYMBOL_GPL(irq_can_set_affinity) introduced in Commit 1 — both are in the same PR, dependency satisfied ✅
  • No missing header/helper changes — <linux/interrupt.h> correctly added in Commit 2 ✅

Issues Found

  1. Wrong Link: in Commit 2 — Both commits carry the same Link: pointing to the patch 1/2 message-ID (20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com). Commit 2 should link to patch 2/2: https://lore.kernel.org/all/20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com/

Recommendation

Fix the Link: tag in Commit 2 to point to the correct patch 2/2 message-ID. The diff content of both commits is clean and internally consistent. The upstream status cannot be confirmed (network blocked; patch was posted the same day as the PR), so the FROMLIST: prefix is appropriate. Once the Link: is corrected, the PR is ready for merge pending upstream community review.


Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/ (both commits)
  2. Lore link matches PR commits: Partial — Commit 1 link is correct; Commit 2 link is wrong (points to patch 1/2 instead of patch 2/2)
  3. Upstream patch status: ⏳ Decision Pending (unknown) — patch series posted 2026-05-19, same day as PR; no merge signals could be verified (network blocked)
  4. PR present in qcom-next: ⏭️ Skipped — could not verify (network blocked)

@knaveen-qc
Copy link
Copy Markdown

PR #1176 — checker-log-analyzer

PR: #1176
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26070923795

Checker Result Summary
Checker Result Summary
checkpatch COMMIT_LOG_LONG_LINE warning on commit 8f770bb9b2dd
dt-binding-check ⏭️ No changes in Documentation/devicetree/bindings
dtb-check ⏭️ No changes in Devicetree
sparse-check sparse-check.sh passed
check-uapi-headers No changes to UAPI headers
check-patch-compliance Link b4-fetch fails for both commits — cover-letter URL used instead of per-patch message-ID
tag-check Both commits carry FROMLIST: prefix
qcom-next-check N/A Target is tech/net/ath, not qcom-next

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: FROMLIST: wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable (PR #1176)
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26070923795
Target branch: tech/net/ath (tag-check mandatory)

Checker Result Summary
checkpatch COMMIT_LOG_LONG_LINE warning on commit 8f770bb9b2dd
dt-binding-check ⏭️ No changes in Documentation/devicetree/bindings
dtb-check ⏭️ No changes in Devicetree
sparse-check sparse-check.sh passed
check-uapi-headers No changes to UAPI headers
check-patch-compliance Link b4-fetch fails for both commits — cover-letter URL used instead of per-patch message-ID
tag-check Both commits carry FROMLIST: prefix
qcom-next-check N/A Target is tech/net/ath, not qcom-next

❌ checkpatch

Root cause: Commit 8f770bb9b2dd has a Tested-on: trailer line exceeding 75 characters in the commit log body.

Failure details:

Commit 8f770bb9b2dd ("FROMLIST: wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable")
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#18:
Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1

8f770bb9b2dd total: 0 errors, 1 warnings, 0 checks, 41 lines checked

Fix: The Tested-on: line is a structured tag (similar to Link:). Checkpatch's COMMIT_LOG_LONG_LINE check does not exempt Tested-on: lines the way it exempts Link: lines. Wrap or shorten the firmware string, or suppress the warning if the project policy allows long Tested-on: tags:

git rebase -i <base_sha>   # mark commit 8f770bb9b2dd as 'edit'
# Shorten the Tested-on line, e.g.:
# Tested-on: QCC2072 hw1.0 PCI WLAN.COL.1.0.c2-00074-QCACOLSWPL_V1_TO_SILICONZ-1
# (if the string cannot be shortened, confirm with maintainer whether to suppress)
git commit --amend
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --summary-file --ignore FILE_PATH_CHANGES --git 9f3cbcbfaa5a143d339bcabf1a6a6ac98107e084..780ac65843535824f6e02549ad7d6436551e2dbc

❌ check-patch-compliance

Root cause: Both commits use the cover-letter message-ID (-1- URL) as their Link: tag instead of their individual per-patch message-IDs; b4 am --single-message cannot fetch a single patch from a cover-letter URL, so the checker reports "Something seems wrong with the provided link."

Failure details:

Checking commit: FROMLIST: genirq: export irq_can_set_affinity() for module drivers
Something seems wrong with the provided link. Please verify it
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/

Checking commit: FROMLIST: wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable
Something seems wrong with the provided link. Please verify it
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/

Both commits share the same Link: URL:

Link: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/

The -1- suffix identifies the cover letter of the series, not an individual patch. The checker uses b4 am --single-message which requires a direct patch message-ID.

Fix: Replace the Link: in each commit with the correct per-patch lore message-ID:

  • Patch 1/2 (genirq: export irq_can_set_affinity()): use the message-ID ending in -1-hangtian.zhu@... only if that is truly patch 1; otherwise find the correct ID from lore. For a 2-patch series posted on 2026-05-19, the individual IDs typically follow the pattern:

    • Patch 1: 20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com
    • Patch 2: 20260519011627.713068-3-hangtian.zhu@oss.qualcomm.com

    Verify with:

    b4 am https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
    # then inspect the fetched .mbx to find the per-patch Message-IDs

    Then amend each commit:

    git rebase -i <base_sha>   # mark each commit as 'edit'
    # For patch 1 (genirq):
    git commit --amend
    # Change Link: to the correct per-patch message-ID URL, e.g.:
    # Link: https://lore.kernel.org/all/20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com/
    git rebase --continue
    # For patch 2 (ath12k):
    git commit --amend
    # Link: https://lore.kernel.org/all/20260519011627.713068-3-hangtian.zhu@oss.qualcomm.com/
    git rebase --continue

Reproduce locally:

b4 am --single-message -C -l -3 https://lore.kernel.org/all/<per-patch-message-id>/

Verdict

2 blockers to fix before merge:

  1. checkpatchCOMMIT_LOG_LONG_LINE warning on the Tested-on: trailer in commit 8f770bb9b2dd. Shorten the firmware string or confirm with the maintainer whether this tag is exempt.
  2. check-patch-compliance — Both commits link to the cover-letter URL instead of their individual per-patch lore message-IDs. Update each Link: tag to the correct per-patch message-ID so b4 am --single-message can fetch and verify the patch content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants