[PATCH v3 03/12] ath11k: modify dp_rx desc access wrapper calls inline

Kalle Valo kvalo at codeaurora.org
Fri Nov 12 00:35:30 PST 2021


P Praneesh <ppranees at codeaurora.org> writes:

> 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 <srirrama at codeaurora.org>
> Signed-off-by: Sriram R <srirrama at codeaurora.org>
> Signed-off-by: Jouni Malinen <jouni at codeaurora.org>
> Signed-off-by: P Praneesh <ppranees at codeaurora.org>
> ---
>  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



More information about the ath11k mailing list