mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 02:25:58 +00:00
wifi: ath12k: Optimize NAPI budget by adjusting PPDU processing
In the current implementation, when PPDU spans multiple ring descriptors, leading to inefficient use of the NAPI budget. The budget counter is decremented for each ring descriptor, causing rapid depletion of the budget even though the processing of a single PPDU might not be complete. To address this issue, modify the code to decrement the budget counter only when the driver receives HAL_MON_END_OF_PPDU as the end reason. This change ensures that the budget is decremented only once per PPDU, resulting in more efficient utilization of the NAPI budget and better handling of monitor destination ring. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh <quic_ppranees@quicinc.com> Link: https://patch.msgid.link/20241223060132.3506372-11-quic_ppranees@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
8520ba9bb8
commit
394a3fa7c5
@ -2388,6 +2388,13 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budget,
|
||||
goto move_next;
|
||||
}
|
||||
|
||||
/* Calculate the budget when the ring descriptor with the
|
||||
* HAL_MON_END_OF_PPDU to ensure that one PPDU worth of data is always
|
||||
* reaped. This helps to efficiently utilize the NAPI budget.
|
||||
*/
|
||||
if (end_reason == HAL_MON_END_OF_PPDU)
|
||||
*budget -= 1;
|
||||
|
||||
end_offset = u32_get_bits(info0, HAL_MON_DEST_INFO0_END_OFFSET);
|
||||
if (likely(end_offset <= DP_RX_BUFFER_SIZE)) {
|
||||
skb_put(skb, end_offset);
|
||||
|
Loading…
Reference in New Issue
Block a user