[PATCH v1 0/4] wifi: ath11k: enable airtime queue limits and fairness

Julius Bairaktaris <[email protected]>
Newsgroups org.kernel.vger.linux-wireless,org.infradead.lists.ath11k
Message-ID <[email protected]>
ath11k advertises neither NL80211_EXT_FEATURE_AQL nor the airtime
fairness bit, and every user of either inside mac80211 is gated on the
corresponding feature. Both are inert on this driver.

AQL matters here more than it would for a driver with its own TXQ
scheduler, because it is the only brake. ath11k uses
ieee80211_handle_wake_tx_queue(), whose wake_tx_push_queue() drains a
selected txq whole into the driver, and the check at the top of
ieee80211_tx_dequeue() is what stops that drain. Without the feature bit
mac80211 holds no backlog at all: on a saturated download every queued
byte sits in the hardware TX rings, where there is no AQM and no flow
separation.

Measured on an IPQ8074 AP against one HE 160 MHz station at MCS 11
receiving 280 Mbit/s, read from that station's own aql file: its BE queue
depth reaches 6356 us of the 12000 us default limit, and 2972 us when the
limit is lowered to 500/1000 us. Without patch 2 that file is not created
and the limits are never consulted.

Patch 1 converts the last tx completion path in dp_tx.c that still frees a
frame with dev_kfree_skb_any(), leaking the ack-status clone and its idr
entry. It is independent of the rest and carries Cc: stable.

Patch 2 advertises AQL. The rate its estimator needs is already kept in
arsta->last_txrate and already reaches mac80211.

Patch 3 exposes the outstanding-MSDU count the driver already keeps, so
soc_dp_stats can report how deep the transmit path is and not only when it
overflowed.

Patch 4 registers per-station tx airtime and advertises airtime fairness.
Unlike AQL there is no estimator fallback for the deficit, so the bit
cannot be set without the reporting. The fairness it delivers is coarse
for reasons stated in that patch, and it is last so the first three can be
applied without it.

An AQL enable was proposed once before and left at changes-requested for a
commit message that did not say why or show a measurement. This series
answers both, and needs no custom .wake_tx_queue: ieee80211_tx_dequeue()
performs the check itself. It is orthogonal to the in-flight
"ath11k/ath12k: implement TX flow control" series, which replaces that
callback for an unrelated reason and leaves the check where it is.

ath10k and mt76 set both feature bits.

Julius Bairaktaris (4):
  wifi: ath11k: free tx skbs through ieee80211_free_txskb()
  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

 drivers/net/wireless/ath/ath11k/debugfs.c | 12 ++++++++++++
 drivers/net/wireless/ath/ath11k/dp_rx.c   | 10 ++++++++++
 drivers/net/wireless/ath/ath11k/dp_tx.c   |  3 ++-
 drivers/net/wireless/ath/ath11k/mac.c     |  3 +++
 4 files changed, 27 insertions(+), 1 deletion(-)

base-commit: ca800a9302764c445de0da0e84d2252400a770ee
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.