[PATCH ath-next 0/9] wifi: ath11k: hardware TSO and scatter-gather with Ethernet encapsulation

From: Julius Bairaktaris

Date: Sun Nov 22 2026 - 13:12:33 EST


With Ethernet encap, the TCL of IPQ8074 can send a TCP batch from MSDU
extension descriptors: one descriptor per segment lists the shared
headers and the segment's payload, and the TCL writes the IP length, IP
ID, TCP sequence number, flags and checksums into each segment. This
series uses that for TSO and scatter-gather.

Patches 1 to 4 rework the TX path the series builds on: completions
freed and their peers looked up once per run, the TCL ring taken once
per dequeue run, TXQs pushed from BH work after the receive poll, and
the TX buffer ids kept in a table. Patch 5 sends TCP batches and frames
with fragments from extension descriptors, patch 6 offers SG, TSO and
TSO6 through the mac80211 encap features, and patch 7 takes batches of
up to 64 segments, as GRO builds them on a forwarding path. Patches 8
and 9 take work out of each segment's completion.

Only IPQ8074 sets hw_params.tx_tso, the chip this ran on; Qualcomm's
open-source WLAN host driver on CodeLinaro uses one layout of this
descriptor for the whole hardware generation, and each further chip
needs its own run before its flag is set. TSO and SG take effect only in
Ethernet mode, frame_mode=2.

This depends on Jose Ignacio Tornos Martinez's TX flow control series
[1], on my airtime queue limits series [2] and on patch 1 of [3]
(mac80211 encap features); base-commit and prerequisite-patch-id below.

Tested on a Xiaomi AX3600 (IPQ8074 hw2.0, firmware WLAN.HK.2.12-01460)
as an AP with Ethernet encap, on OpenWrt's 6.18 kernel with wireless
backports 7.2 and further ath11k receive changes, with routed and
bridged TCP over IPv4 and IPv6 to one HE160 station, 3 runs per cell.
Over a full run of the eight cells the TCL segmented 2,609,390 batches
of 14,450,235 segments, and none was segmented in software. Forwarded
UDP saw no loss, and the kernel log stayed clean.

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

[1] https://lore.kernel.org/r/20261021060725.242681-1-jtornosm@xxxxxxxxxx
[2] https://lore.kernel.org/all/20261122181145.1015729-1-julius@xxxxxxxxxxxxxx/
[3] https://lore.kernel.org/all/20261122134228.956044-1-julius@xxxxxxxxxxxxxx/

Julius Bairaktaris (9):
wifi: ath11k: batch TX completion frees and peer lookups
wifi: ath11k: fill the TCL ring once per dequeue run
wifi: ath11k: push TXQs from BH work
wifi: ath11k: replace the TX buffer IDR with a table
wifi: ath11k: let the TCL segment TCP batches
wifi: ath11k: offer scatter-gather and TSO with Ethernet encap
wifi: ath11k: take TCP batches as long as GRO builds them
wifi: ath11k: give an extension descriptor the number of its buffer id
wifi: ath11k: count the segments of a TX batch without an atomic

drivers/net/wireless/ath/ath11k/core.c | 1 +
drivers/net/wireless/ath/ath11k/core.h | 22 +
drivers/net/wireless/ath/ath11k/debugfs.c | 7 +
drivers/net/wireless/ath/ath11k/dp.c | 30 +-
drivers/net/wireless/ath/ath11k/dp.h | 54 +-
drivers/net/wireless/ath/ath11k/dp_tx.c | 976 +++++++++++++++++++--
drivers/net/wireless/ath/ath11k/dp_tx.h | 16 +-
drivers/net/wireless/ath/ath11k/hal_desc.h | 46 +
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/mac.c | 156 +++-
10 files changed, 1161 insertions(+), 148 deletions(-)


base-commit: 1983b40acfcb3c3464b291c85977290a785bcfdc
prerequisite-patch-id: ff44eb6f1d673e75bc013e3ffc870d7d30252c17
prerequisite-patch-id: 2cde5e2a788f79e4b8c858a60ec11cd120b1b97e
prerequisite-patch-id: c86d3c9047c851f45b5d46398850c9d810d82258
prerequisite-patch-id: c3c9a2d5971c3e294bbef307df3befb0ff6678fd
prerequisite-patch-id: 013f4003b682991301e1f6e4c381b30ba7ef38c7
prerequisite-patch-id: a3d4787acbb5c0739313b5f098bfb19add947ba7
prerequisite-patch-id: 0118167889d6928ea3b7922b59cd92c629d8ee1a
prerequisite-patch-id: f04db5549c465332f7abd795b0b3ed0984ca3444
prerequisite-patch-id: f0e6efbc4fce124f2b272bc3329a1903fdfef382
prerequisite-patch-id: 46dda0c1aa2552cbd23ab02fc8478d76bc8c8e99
prerequisite-patch-id: 383da58791500dcdad9357108b629eb40b25585e
prerequisite-patch-id: 603dbe7c8c57bd2d47c82087c7b4c45331e50e74
prerequisite-patch-id: 2d25128eaea6ab74b040b0334d0ca670a030870a
prerequisite-patch-id: 510f2063d0566c28ff6f72e99d607dcfd61c0e4c
--
2.53.0