Re: [PATCH v3 03/12] ath11k: modify dp_rx desc access wrapper calls inline
From: Kalle Valo <hidden>
Date: 2021-11-12 08:38:55
Also in:
ath11k
P Praneesh [off-list ref] writes:
quoted hunk ↗ jump to hunk
In data path, to reduce the CPU cycles spending on descriptor access wrapper function, changed those functions as static inline. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01695-QCAHKSWPL_SILICONZ-1 Co-developed-by: Sriram R <redacted> Signed-off-by: Sriram R <redacted> Signed-off-by: Jouni Malinen <redacted> Signed-off-by: P Praneesh <redacted> --- drivers/net/wireless/ath/ath11k/dp_rx.c | 114 +++++++++++++++++--------------- 1 file changed, 59 insertions(+), 55 deletions(-)diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 9a22481..b84c2db 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c@@ -20,13 +20,15 @@ #define ATH11K_DP_RX_FRAGMENT_TIMEOUT_MS (2 * HZ) -static u8 *ath11k_dp_rx_h_80211_hdr(struct ath11k_base *ab, struct hal_rx_desc *desc) +static inline +u8 *ath11k_dp_rx_h_80211_hdr(struct ath11k_base *ab, struct hal_rx_desc *desc) { return ab->hw_params.hw_ops->rx_desc_get_hdr_status(desc); }
The compiler does not optimise small static functions like this automatically to inline? I'm surprised. Or are you using some really old compiler? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches