ath11k: Add dynamic tcl ring selection logic with retry mechanism
authorSriram R <srirrama@codeaurora.org>
Mon, 13 Apr 2020 12:57:02 +0000 (18:27 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 15 Apr 2020 08:07:06 +0000 (11:07 +0300)
commitd687275b268b09c350b24b1947d1bf3496f49137
treefe2d0deec7ae4a07260dea90b827519d424f4884
parente190bc05b191ff62157ca63322aedd14c7e87d32
ath11k: Add dynamic tcl ring selection logic with retry mechanism

IPQ8074 HW supports three TCL rings for tx. Currently these rings
are mapped based on the Access categories, viz. VO, VI, BE, BK.
In case, one of the traffic type dominates, then it could stress
the same tcl rings. Rather, it would be optimal to make use of all
the rings in a round robin fashion irrespective of the traffic type
so that the load could be evenly distributed among all the rings.
Also, in case the selected ring is busy or full, a retry mechanism
is used to ensure other available ring is selected without dropping
the packet.

In SMP systems, this change avoids a single CPU from getting hogged
when heavy traffic of same category is transmitted.
The tx completion interrupts corresponding to the used tcl ring
would be more which causes the assigned CPU to get hogged.
Distribution of tx packets to different tcl rings helps balance
this load.

Signed-off-by: Sriram R <srirrama@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1586782622-22570-1-git-send-email-srirrama@codeaurora.org
drivers/net/wireless/ath/ath11k/core.h
drivers/net/wireless/ath/ath11k/dp_tx.c