wifi: ath12k: change MAC buffer ring size to 2048
authorBaochen Qiang <quic_bqiang@quicinc.com>
Wed, 17 Jan 2024 12:05:39 +0000 (14:05 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 18 Jan 2024 05:52:02 +0000 (07:52 +0200)
commit955df16f2a4c3023753680925e71e099818c2329
tree3b30adf92400f6d6a63679537e1eb5d6d0ac8e1b
parentb0970f50839ecbb71d43914fe88ea7eeb3416a21
wifi: ath12k: change MAC buffer ring size to 2048

For WCN7850, there is a SRNG named MAC buffer ring, i.e.,
dp->rx_mac_buf_ring. During initialization, it is setup
by host and then under control of firmware. During RX
process, firmware fetches buffers from
dp->rx_refill_buf_ring to fill that MAC buffer ring,
and those buffers are taken by RXDMA to carry real WLAN
frames received from air.

Currently a low RX throughput is observed. Checking
firmware log, lots of errors are reported by MAC buffer
ring, complaining that it is running out of buffers,
which further indicates that RXDMA is suffering from
starvation. Currently the size of dp->rx_mac_buf_ring
is configured as 1024. After changing it to 2048, those
error messages are reduced, and a 6.4% increase is seen
in peak throughput. Note that 2048 is an empirical
value. It is chosen here because the RX throughput
meets our expectation after the change.

This change only applies to WCN7850 since other
chips don't have a MAC buffer ring.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20231129020414.56425-4-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath12k/dp.h
drivers/net/wireless/ath/ath12k/dp_rx.c