diff mbox series

ath11k: Increase Tx idr size to avoid Tx fail

Message ID 1557153162-15342-1-git-send-email-periyasa@codeaurora.org (mailing list archive)
State Accepted
Commit d75d0ebd2a7b6e300ec23448051f0ceecae750bd
Delegated to: Kalle Valo
Headers show
Series ath11k: Increase Tx idr size to avoid Tx fail | expand

Commit Message

Karthikeyan periyasamy May 6, 2019, 2:32 p.m. UTC
In data traffic, encounter below warn due to idr resource unavailable.
we found that idr alloc size is not good enough to pump the traffic.
so increased the idr size by double the TX completion ring size.

Warn:
ath11k c000000.wifi1: failed to transmit frame -28

Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp.h    | 1 +
 drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo May 8, 2019, 9:47 a.m. UTC | #1
Karthikeyan Periyasamy <periyasa@codeaurora.org> wrote:

> In data traffic, encounter below warn due to idr resource unavailable.
> we found that idr alloc size is not good enough to pump the traffic.
> so increased the idr size by double the TX completion ring size.
> 
> Warn:
> ath11k c000000.wifi1: failed to transmit frame -28
> 
> Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org>

Patch applied to ath.git, thanks.

d75d0ebd2a7b ath11k: Increase Tx idr size to avoid Tx fail
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h
index d4a68a8..3a69f66 100644
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -114,6 +114,7 @@  struct dp_link_desc_bank {
 #define DP_WBM_RELEASE_RING_SIZE	64
 #define DP_TCL_DATA_RING_SIZE		512
 #define DP_TX_COMP_RING_SIZE		8192
+#define DP_TX_IDR_SIZE			(DP_TX_COMP_RING_SIZE << 1)
 #define DP_TCL_CMD_RING_SIZE		32
 #define DP_TCL_STATUS_RING_SIZE		32
 #define DP_REO_DST_RING_MAX		4
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 86e9d01..123985e 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -97,7 +97,7 @@  int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
 
 	spin_lock_bh(&tx_ring->tx_idr_lock);
 	ret = idr_alloc(&tx_ring->txbuf_idr, skb, 0,
-			DP_TX_COMP_RING_SIZE, GFP_ATOMIC);
+			DP_TX_IDR_SIZE - 1, GFP_ATOMIC);
 	spin_unlock_bh(&tx_ring->tx_idr_lock);
 
 	if (ret < 0)