Skip to content

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

Open
zhuhangtian wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
zhuhangtian:qcom-6.18.y
Open

[PATCH 0/2] genirq/ath12k: fallback to threaded NAPI when IRQ affinity is unavailable#595
zhuhangtian wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
zhuhangtian:qcom-6.18.y

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/
@zhuhangtian zhuhangtian requested review from a team, knaveen-qc, quicAspratap and rrnayak May 19, 2026 01:44
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4498064 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4498064

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@knaveen-qc
Copy link
Copy Markdown

PR #595 — validate-patch

PR: #595

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

Patch Validation Report

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


Step 1 — Lore Link Check

PR changes files kernel/irq/manage.c and drivers/net/wireless/ath/ath12k/pci.c.

Both commits carry a Link: tag pointing to lore.kernel.org. However:

  • Commit 1/2 (genirq: export irq_can_set_affinity()) → links to message-id …713068-1-… ✅ correct (this is the first patch of the series).
  • Commit 2/2 (ath12k: enable threaded NAPI) → also links to …713068-1-… ❌ wrong. In a 2-patch series the second patch carries message-id …713068-2-…. The correct link for commit 2 should be https://lore.kernel.org/all/20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com/.

Step 2 — Fetch Upstream Lore Patch

Network access is unavailable in this environment (curl exits with code 6 — host unreachable). Lore patches could not be fetched. Diff comparison (Steps 5–8) is performed by reasoning from the PR patch content and the lore message-id structure alone.


Step 3 — Upstream Patch Status

The lore series was posted on 2026-05-19 01:16 UTC — the same day as this PR (checker run at 02:29 UTC, ~73 minutes later). No acceptance signals (Reviewed-by, Acked-by, "applied" reply) could be verified due to network restrictions.

Community verdict: ⏳ Decision Pending — series posted 2026-05-19; no merge evidence available; verify manually at https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/.


Step 4 — PR Diff Summary

File Hunks Description
kernel/irq/manage.c 1 Adds EXPORT_SYMBOL_GPL(irq_can_set_affinity) after the function body
drivers/net/wireless/ath/ath12k/pci.c 5 Adds #include <linux/interrupt.h>, hoists int irq to function scope, probes affinity capability of the base DP MSI vector, conditionally calls netif_threaded_enable() per NAPI group, converts inner-loop int irq = … to assignment

Step 5 — Normalisation

Lore fetch unavailable; normalisation via filterdiff/interdiff could not be run. Analysis proceeds from patch content inspection.


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

Commit Message

Check Status Note
Subject matches upstream (with FROMLIST: prefix) FROMLIST: prefix correctly prepended; base subject matches the lore series title
Body preserves rationale Explains hierarchical IRQ path lacking .irq_set_affinity() and the need for a fallback policy
Fixes: tag N/A Not a bug-fix export; no Fixes: tag expected
Authorship (FROMLIST: rule) From: is the lore author (Hangtian Zhu); Signed-off-by: matches — correct for a self-submitted FROMLIST:
Backport note N/A Not a backport
Co-developed-by: misuse Not present; no issue
Link: tag points to correct message-id …713068-1-… is the correct message-id for patch 1/2

Diff

File Status Notes
kernel/irq/manage.c Single-line EXPORT_SYMBOL_GPL(irq_can_set_affinity); added immediately after the closing } of irq_can_set_affinity() — correct placement, correct macro

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

Commit Message

Check Status Note
Subject matches upstream (with FROMLIST: prefix) FROMLIST: prefix correctly prepended
Body preserves rationale Explains the RB3Gen2 scenario, the affinity-unavailable condition, and the throughput improvement (802 Mbps → 2.58 Gbps)
Fixes: tag N/A New feature, not a fix
Authorship (FROMLIST: rule) From: and Signed-off-by: are the lore author
Backport note N/A Not a backport
Co-developed-by: misuse Not present
Link: tag points to correct message-id Points to …713068-1-… (the genirq patch). Should be …713068-2-… for this second patch of the series

Diff

File Status Notes
drivers/net/wireless/ath/ath12k/pci.c#include hunk <linux/interrupt.h> added correctly (needed for irq_can_set_affinity())
drivers/net/wireless/ath/ath12k/pci.c — variable declarations hunk bool threaded_napi = false and int irq hoisted to function scope cleanly
drivers/net/wireless/ath/ath12k/pci.c — affinity probe hunk irq_can_set_affinity() called on base_vector MSI IRQ before the loop; logic is sound
drivers/net/wireless/ath/ath12k/pci.cnetif_threaded_enable hunk Called per napi_ndev after netif_napi_add(), guarded by threaded_napi flag
drivers/net/wireless/ath/ath12k/pci.c — inner-loop irq assignment hunk int irq = … correctly converted to plain irq = … after hoisting; no semantic change

Upstream Patch Status

Commit Community Verdict
genirq: export irq_can_set_affinity() for module drivers ⏳ Decision Pending — posted 2026-05-19; network unavailable to verify replies
wifi: ath12k: enable threaded NAPI when DP IRQ affinity is unavailable ⏳ Decision Pending — posted 2026-05-19; network unavailable to verify replies

Dependency Check

  • ✅ Commit 2 depends on the EXPORT_SYMBOL_GPL(irq_can_set_affinity) added by Commit 1 — both are present in the PR in the correct order.
  • ✅ No missing header or helper changes identified.
  • <linux/interrupt.h> (which declares irq_can_set_affinity()) is added in Commit 2's diff.

qcom-next Presence

Commit Status
genirq: export irq_can_set_affinity() ⏭️ Skipped — network unavailable; verify manually
ath12k: enable threaded NAPI when DP IRQ affinity is unavailable ⏭️ Skipped — network unavailable; verify manually

Issues Found

  1. Wrong Link: in Commit 2/2 — Both commits carry Link: https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/. The second commit in the series should link to its own message-id (…713068-2-…). This makes it impossible to trace Commit 2 back to its canonical lore posting.

    Fix: Update the Link: tag in the second commit to:

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

Recommendation

The code changes in both commits are technically correct and internally consistent. The only issue is a copy-paste error in the Link: tag of Commit 2/2, which points to the first patch's message-id instead of the second. Fix the Link: tag in the ath12k commit and the PR is ready to merge (pending upstream community acceptance of the lore series, which was posted the same day as this PR).


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 incorrectly reuses the Commit 1 message-id (-1-) instead of its own (-2-)
  3. Upstream patch status: ⏳ Decision Pending — series posted 2026-05-19 01:16 UTC, same day as PR; no acceptance signals verifiable
  4. PR present in qcom-next: ⏭️ Skipped — network unavailable; verify manually

@knaveen-qc
Copy link
Copy Markdown

PR #595 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch COMMIT_LOG_LONG_LINE warning in commit 2 (Tested-on: line > 75 chars)
dt-binding-check ⏭️ No changes in Documentation/devicetree/bindings
dtb-check ⏭️ No changes in Devicetree
sparse-check Passed
check-uapi-headers No UAPI header changes
check-patch-compliance Both commits: "Something seems wrong with the provided link" — commit 2 uses the wrong lore URL (patch 1 URL instead of patch 2 URL)
tag-check Both commits carry FROMLIST: prefix

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 #595
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26071159042
Target branch: qcom-6.18.y (not qcom-next / qcom-next-staging → tag-check is mandatory)

Checker Result Summary
checkpatch COMMIT_LOG_LONG_LINE warning in commit 2 (Tested-on: line > 75 chars)
dt-binding-check ⏭️ No changes in Documentation/devicetree/bindings
dtb-check ⏭️ No changes in Devicetree
sparse-check Passed
check-uapi-headers No UAPI header changes
check-patch-compliance Both commits: "Something seems wrong with the provided link" — commit 2 uses the wrong lore URL (patch 1 URL instead of patch 2 URL)
tag-check Both commits carry FROMLIST: prefix

❌ checkpatch

Root cause: Commit 36101204d792 has a commit-log line exceeding 75 characters — the Tested-on: tag line is 80 chars.

Failure details:

Commit 36101204d792 ("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

36101204d792aab9d8eb448e90468bcb85f585df total: 0 errors, 1 warnings, 0 checks, 41 lines checked

Fix: The Tested-on: tag is a structured trailer and its long hardware identifier cannot be meaningfully wrapped. This is a known false positive for hardware identifier tags. The line can be left as-is with a justification comment, or the commit can be amended to move the Tested-on: line to a position where checkpatch does not flag it. If the upstream patch already has this line, it should be kept verbatim.

To suppress: checkpatch treats Tested-on: lines the same as body text. The cleanest fix is to accept the warning as a false positive (hardware IDs cannot be shortened) and document it in the PR description.

Reproduce locally:

./scripts/checkpatch.pl --strict --summary-file --ignore FILE_PATH_CHANGES \
  --git 6964936c9bfc3337aa8ba8a0fb25021d06e5ce04..36101204d792aab9d8eb448e90468bcb85f585df

❌ check-patch-compliance

Root cause: Both commits carry the same Link: URL (713068-1-hangtian.zhu@...) — commit 2 (patch 2/2) must use the per-patch URL ending in 713068-2-hangtian.zhu@..., not the cover-letter/patch-1 URL. Because b4 fetches the wrong message-ID for commit 2, the content comparison fails with "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
Try below command to run locally-
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
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/

Both commits in pr.patch have:

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

Commit 2 (patch 2/2) must instead have:

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

Fix:

  1. Amend commit 2 to correct its Link: trailer:
git rebase -i 6964936c9bfc   # mark commit 2 (36101204d792) as 'edit'
git commit --amend            # change Link: ...713068-1-... → ...713068-2-...
git rebase --continue
  1. Additionally, verify commit 1's link is also reachable (the checker flagged it too — the patch was sent on 2026-05-19 and the lore archive may not have indexed it yet at CI run time). If the lore URL is valid and the patch is indexed, re-triggering CI after the link propagates should resolve commit 1's failure.

Reproduce locally:

b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260519011627.713068-1-hangtian.zhu@oss.qualcomm.com/
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260519011627.713068-2-hangtian.zhu@oss.qualcomm.com/

Verdict

2 blockers to fix before merge:

  1. check-patch-compliance (hard blocker): Fix the Link: URL in commit 2 — change 713068-1713068-2. Also confirm the lore archive has indexed both messages (the patches were sent the same day as the CI run; re-trigger CI once lore propagation is complete).
  2. checkpatch (soft warning): The COMMIT_LOG_LONG_LINE on the Tested-on: line in commit 2 is a false positive for hardware identifier strings — acceptable to leave with a note, but the CI will continue to flag it unless the line is shortened or the checker is configured to ignore it.

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.

2 participants