Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH ath-next v7 00/10] wifi: ath11k: airtime queue limits, airtime fairness and a driver TXQ scheduler
@ 2026-11-28 23:40 Julius Bairaktaris
  2026-11-28 23:40 ` [PATCH ath-next v7 01/10] wifi: ath11k: free tx skbs through ieee80211_free_txskb() Julius Bairaktaris
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Julius Bairaktaris @ 2026-11-28 23:40 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: linux-wireless, ath11k, linux-kernel, Felix Fietkau, tamizh.raja,
	jtornosm, baochen.qiang, rameshkumar.sundaram,
	vasanthakumar.thiagarajan, sriram.ramachandran, yaojiale02,
	quic_pradeepc, quic_msinada, quic_vnaralas, slakkavalli, kvalo,
	sven, john, toke, Christopher Griffin

ath11k sets neither NL80211_EXT_FEATURE_AQL nor
NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, so a saturated download queues
every frame in the hardware TX rings, where there is no AQM. This series
sets both, registers tx and rx airtime, and runs the TXQ scheduler from
the driver and from tx completion.

IPQ8074 AP, TCP download from a wired host to one 1x1 VHT80 station,
default limits, 20 s, three interleaved runs per arm, measured on v5:

                        Mbit/s              sender RTT mean ms
  auto rate  without    92.9, 94.4, 94.3    111, 232, 231
             with       93.7, 88.0, 93.6    124,  51, 167
  VHT MCS 0  without    21.4, 22.3, 22.6    587, 550, 526
             with       22.9, 22.2, 22.3     44,  42,  43

The v6 changes to 5/10 (the share of a multi-user PPDU) and 9/10 (ending
a round on a full MSDU idr) do not act with one single-user station
below the idr limit, so the table stands. On v6, a routed TCP download
to one HE160 station at 883 to 923 Mbit/s logged no "failed to transmit
frame", six runs with aql_enable set to 0 in debugfs and six with it set
to 1 (IPQ8074 hw2.0, WLAN.HK.2.9.0.1-02146).

On v5, airtime weights are accepted but leave a 2x2 HE160 station at 45
to 49% of the airtime against a 1x1 VHT80 station at 1:1, 4:1 and 1:4,
because the firmware serves every station with frames queued in turn.
Ending the round at 256 MSDUs in flight, as Toke suggested, gives the
HE160 station 65 to 80% at 4:1, but at 1:1 its aggregates shrink from
258 to 100 MSDUs (one run) and the two-station throughput drops by a
third, so the series leaves it out.

2/10 is new. With the AQL flag set by 3/10, mac80211 charges each frame's
airtime to its station; ath11k freed a dropped encap offloaded frame
with ieee80211_free_txskb(), which finds the station only from an
802.11 header, so the charge stayed with the station. v6 carried a
mac80211 patch for this [2]; Felix asked for the driver to pass the
station instead [3], and 2/10 does that. A station hits this when
ath11k_dp_tx() refuses its frames ("failed to transmit frame"), as on a
full MSDU idr or while a firmware crash is flushed: once the leaked
charge reaches the 12000 us high limit, its queue gets no frame until
it reassociates. Mainline is not affected, since only this series sets
the AQL flag. Found by an LLM review of the tx status paths.

The series is based on "wifi: ath11k/ath12k: implement TX flow control"
v8 [1], patches 1-3, which is not in ath-next yet; it applies after them.

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

Changes in v7:
 - new patch 2: return a dropped encap frame to mac80211 with its
   station through ieee80211_tx_status_ext(), replacing the mac80211
   patch [2], as Felix Fietkau asked [3]
 - patch 1: commit message names patch 2 for the charge of an encap
   frame
 - rebased onto ath-next 18d0bedbb5f0
 - v6: https://lore.kernel.org/all/20261122181145.1015729-1-julius@bairaktaris.de/

Changes in v6 (v6 patch numbers):
 - patch 1: return the frames in flight to mac80211 on firmware recovery
 - patch 2: report the tx completion rate on single pdev chips, which
   stayed at the 4 us airtime floor
 - patch 4: charge each user of a downlink OFDMA or MU-MIMO PPDU its
   share of the PPDU duration, the duration divided by num_users, not
   the whole duration; reported by Christopher Griffin
 - patch 7: register rx airtime under ab->base_lock; mac80211 frees the
   station without a grace period after the peer drops it
 - patch 8: end a round also when the ring's MSDU idr is full, so no
   frame is dequeued only to be dropped; reported by Christopher Griffin
 - patch 8: end a round only while a frame is pending, and mark the
   access category before reading the pending counts, so a completion
   cannot miss the mark
 - patch 8: drop the management queue from the commit message; ath11k
   has no management TXQ
 - rebased onto ath-next 1983b40acfcb
 - v5: https://lore.kernel.org/all/20261018174904.1757161-1-julius@bairaktaris.de/

[1] https://lore.kernel.org/all/20261021060725.242681-1-jtornosm@redhat.com/
[2] https://lore.kernel.org/all/20261122150541.3117507-1-julius@bairaktaris.de/
[3] https://lore.kernel.org/all/8d674f7c-68db-474f-8cb1-5645542db0ac@nbd.name/

Julius Bairaktaris (10):
  wifi: ath11k: free tx skbs through ieee80211_free_txskb()
  wifi: ath11k: report a dropped frame with its station
  wifi: ath11k: enable airtime queue limits
  wifi: ath11k: report the pending tx MSDU count in soc_dp_stats
  wifi: ath11k: report tx airtime and enable airtime fairness
  wifi: ath11k: schedule TXQs from the driver
  wifi: ath11k: run the TXQ scheduler on tx completion
  wifi: ath11k: charge received airtime to the station deficit
  wifi: ath11k: stop a scheduling round when the hardware is full
  wifi: ath11k: budget the tx completion handler

 drivers/net/wireless/ath/ath11k/core.c    |   1 +
 drivers/net/wireless/ath/ath11k/core.h    |   9 +
 drivers/net/wireless/ath/ath11k/debugfs.c |  10 +
 drivers/net/wireless/ath/ath11k/dp.c      |  11 +-
 drivers/net/wireless/ath/ath11k/dp.h      |   6 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c   |  34 +++-
 drivers/net/wireless/ath/ath11k/dp_tx.c   | 229 ++++++++++++++++++++--
 drivers/net/wireless/ath/ath11k/dp_tx.h   |   7 +-
 drivers/net/wireless/ath/ath11k/mac.c     | 112 +++++++++--
 drivers/net/wireless/ath/ath11k/mac.h     |   1 +
 10 files changed, 383 insertions(+), 37 deletions(-)


base-commit: 18d0bedbb5f0538396cb7f763ed9cd1dd69c5b23
prerequisite-message-id: <20261021060725.242681-1-jtornosm@redhat.com>
prerequisite-patch-id: ff44eb6f1d673e75bc013e3ffc870d7d30252c17
prerequisite-patch-id: 2cde5e2a788f79e4b8c858a60ec11cd120b1b97e
prerequisite-patch-id: c86d3c9047c851f45b5d46398850c9d810d82258
-- 
2.53.0


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

end of thread, other threads:[~2026-11-29 22:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 23:40 [PATCH ath-next v7 00/10] wifi: ath11k: airtime queue limits, airtime fairness and a driver TXQ scheduler Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 01/10] wifi: ath11k: free tx skbs through ieee80211_free_txskb() Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 02/10] wifi: ath11k: report a dropped frame with its station Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 03/10] wifi: ath11k: enable airtime queue limits Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 04/10] wifi: ath11k: report the pending tx MSDU count in soc_dp_stats Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 05/10] wifi: ath11k: report tx airtime and enable airtime fairness Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 06/10] wifi: ath11k: schedule TXQs from the driver Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 07/10] wifi: ath11k: run the TXQ scheduler on tx completion Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 08/10] wifi: ath11k: charge received airtime to the station deficit Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 09/10] wifi: ath11k: stop a scheduling round when the hardware is full Julius Bairaktaris
2026-11-28 23:40 ` [PATCH ath-next v7 10/10] wifi: ath11k: budget the tx completion handler Julius Bairaktaris
2026-11-29 22:43 ` [PATCH ath-next v7 00/10] wifi: ath11k: airtime queue limits, airtime fairness and a driver TXQ scheduler Giuseppe Piscitelli

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