[PATCH ath-next v1 00/10] wifi: ath11k: cut the per-packet cost of the RX path

From: Julius Bairaktaris

Date: Mon Nov 23 2026 - 08:42:36 EST


The ath11k RX path spends a part of its time per received frame on work
that the hardware or a cheaper structure already provides: an allocation,
a DMA map and unmap and an IDR walk per buffer, a peer lookup done twice,
a cache invalidation per ring entry and per full buffer, bottom-half
toggles inside a region that already has them off, PPDU stats TLVs nobody
parses, and a flow hash computed again in software. This series removes
these one at a time:

1-2 give the refill ring a page_pool and replace the buffer IDR with a
table of ids;
3 asks the firmware only for the PPDU stats TLVs the driver parses;
4 sets the skb hash from the receive engine's Toeplitz hash;
5-6 sync the new entries of a cached ring once per head read and
prefetch the buffers of the entries ahead (cached rings only, that is
IPQ8074, IPQ6018, QCN9074 and IPQ5018);
7 looks the peer of an MSDU up once;
8 drops a nested bottom-half disable in the reap and refill loops;
9 invalidates only the part of a page pool buffer the device wrote;
10 takes the buffer table lock once per chunk of refill buffers.

None of them changes interrupt placement or adds work on another CPU;
each takes work away from the CPU that already handles the frame.

The profile shares in the commit messages come from perf on an IPQ8074
access point (Xiaomi AX3600, 4x Cortex-A53, 5 GHz HE160, one station at
850-900 Mbit/s TCP), one run each, with OpenWrt's version of these
patches.

On a Xiaomi AX3600 (IPQ8074 hw2.0, firmware
WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1) running OpenWrt's wireless
backports with the RX fixes, with one HE160 station at 830-940 Mbit/s
TCP and 3 runs per cell, the series lowered the share of the four
cores the traffic takes in the cells where the station sends: bridged
IPv4 33.0 -> 27.6 %, bridged IPv6 32.8 -> 27.7 %, routed IPv4
33.7 -> 27.6 %, and routed IPv6 31.2 -> 27.9 %, which is within the
spread between runs. Where the station receives, the change was
between -1.4 and +0.8 points, also within that spread. The share is the time idle-priority spinners lose
on each core. Switching pktlog (lite and full) and the extended TX
stats on and off, adding and removing a monitor interface on both
radios, and unloading and reloading the modules left traffic and dmesg
clean.

The series applies on top of the RX correctness fixes https://lore.kernel.org/all/20261122210525.2076058-1-julius@xxxxxxxxxxxxxx/: its
4/10 uses the msdu_start_info2 accessor that series adds.

I used Claude (Anthropic) to help write these patches.

Julius Bairaktaris (10):
wifi: ath11k: use page_pool for the RX refill ring
wifi: ath11k: replace the RX buffer IDR with a table
wifi: ath11k: request only the PPDU stats TLVs it reads
wifi: ath11k: set the skb hash of a received frame from the hardware
wifi: ath11k: sync a cached ring's new entries once per head read
wifi: ath11k: prefetch the buffers of the REO entries ahead of their
reap
wifi: ath11k: look the peer of a received MSDU up once
wifi: ath11k: take the refill buffer lock without a second BH disable
wifi: ath11k: hand the CPU only the part of a REO buffer the device
wrote
wifi: ath11k: give the refill buffers their ids a chunk at a time

drivers/net/wireless/ath/ath11k/Kconfig | 1 +
drivers/net/wireless/ath/ath11k/core.h | 5 +
drivers/net/wireless/ath/ath11k/debugfs.c | 15 +-
drivers/net/wireless/ath/ath11k/debugfs.h | 10 +
drivers/net/wireless/ath/ath11k/dp.c | 9 +-
drivers/net/wireless/ath/ath11k/dp.h | 27 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 712 +++++++++++++++++-----
drivers/net/wireless/ath/ath11k/dp_tx.c | 34 ++
drivers/net/wireless/ath/ath11k/dp_tx.h | 1 +
drivers/net/wireless/ath/ath11k/hal.c | 107 +++-
drivers/net/wireless/ath/ath11k/hal.h | 1 +
drivers/net/wireless/ath/ath11k/hw.c | 22 +
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/mac.c | 13 +-
14 files changed, 765 insertions(+), 193 deletions(-)


base-commit: 1983b40acfcb3c3464b291c85977290a785bcfdc
prerequisite-patch-id: ed566369a9bbda0ac9a48357261e8cfe1cc0f1d1
prerequisite-patch-id: 726d7737c833da0842192eccececad4a0dedb1a6
prerequisite-patch-id: cf0b8ff1ac6cef681433247e4b937a3e23af78a3
prerequisite-patch-id: 03c89df01745ac9a80653431261f9a003dbca7db
prerequisite-patch-id: cb48c0eddbe0c2fe176e8edc94c6bc40be3c48a9
prerequisite-patch-id: 1956ec85ad80b68868538070fc0e89c29603467a
--
2.53.0