ath11k: optimise ath11k_dp_tx_completion_handler
authorJohn Crispin <john@phrozen.org>
Fri, 13 Dec 2019 15:38:38 +0000 (16:38 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 18 Dec 2019 17:39:59 +0000 (19:39 +0200)
commitd0998eb84ed3cc02c15f92b07223735ddbbe9b06
tree986ca99cf9a78b0d8ff4779b85d05bbed9486f28
parent8cfa7ef8127b00de1ce0275a85220c331fe9a4d0
ath11k: optimise ath11k_dp_tx_completion_handler

the current code does 4 memcpys for each completion frame.
1) duplicate the desc
2 + 3) inside kfifo insertion
4) kfifo remove

The code simply drops the kfifo and uses a trivial ring buffer. This
requires a single memcpy for insertion. There is no removal needed as
we can simply use the inserted data for processing. As the code runs
inside the NAPI context it is atomic and there is no need for most of
the locking.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/dp.c
drivers/net/wireless/ath/ath11k/dp.h
drivers/net/wireless/ath/ath11k/dp_tx.c
drivers/net/wireless/ath/ath11k/hal_tx.c
drivers/net/wireless/ath/ath11k/hal_tx.h