qcacmn: optimization changes to improve RX KPI for WIN

done the following changes to improve the RX path KPI
	1. remove the extra invalidate in RX path as
	we no longer dirty the RX TLV cache lines.
	we now store the rx error codes in nbuf cb instead
	of RX TLVs reserved memory bytes.

	2. with features like flow tag and wds extended mode
	enabled by default, the rx_fast_flag is always set
       	to false, this resulted	in lot more instructions
       	being executed in RX path.
	Now we ensured this flag is at least set for other
	features which are not enabled by default.

Change-Id: I04c6bdc52a2b3f1248b822a108d8bd1a70abcc7c
CRs-Fixed: 3406505
This commit is contained in:
Tallapragada Kalyan
2023-03-19 18:08:18 +05:30
committed by Madan Koyyalamudi
parent 45da3822ae
commit e4798ea69b
6 changed files with 60 additions and 53 deletions

View File

@@ -2505,6 +2505,20 @@ void dp_audio_smmu_unmap(qdf_device_t qdf_dev, qdf_dma_addr_t iova,
#endif
#if defined(QCA_DP_RX_NBUF_NO_MAP_UNMAP) && !defined(BUILD_X86)
static inline
void dp_rx_set_err_info(struct dp_soc *soc, qdf_nbuf_t nbuf,
struct hal_wbm_err_desc_info wbm_err_info)
{
QDF_NBUF_CB_RX_ERR_CODES(nbuf) = *((uint32_t *)&wbm_err_info);
}
static inline
struct hal_wbm_err_desc_info dp_rx_get_err_info(struct dp_soc *soc,
qdf_nbuf_t nbuf)
{
return *(struct hal_wbm_err_desc_info *)&QDF_NBUF_CB_RX_ERR_CODES(nbuf);
}
static inline
QDF_STATUS dp_pdev_rx_buffers_attach_simple(struct dp_soc *soc, uint32_t mac_id,
struct dp_srng *rxdma_srng,
@@ -2577,22 +2591,9 @@ qdf_dma_addr_t dp_rx_nbuf_sync_no_dsb(struct dp_soc *dp_soc,
if (unlikely(!nbuf->fast_recycled)) {
qdf_nbuf_dma_inv_range_no_dsb((void *)nbuf->data,
(void *)(nbuf->data + buf_size));
} else {
/*
* In case of fast_recycled is set we can avoid invalidating
* the complete buffer as it would have been invalidated
* by tx driver before giving to recycler.
*
* But we need to still invalidate rx_pkt_tlv_size as this
* area will not be invalidated in TX path
*/
DP_STATS_INC(dp_soc, rx.fast_recycled, 1);
qdf_nbuf_dma_inv_range_no_dsb((void *)nbuf->data,
(void *)(nbuf->data +
dp_soc->rx_pkt_tlv_size +
L3_HEADER_PAD));
}
DP_STATS_INC(dp_soc, rx.fast_recycled, 1);
nbuf->fast_recycled = 0;
return (qdf_dma_addr_t)qdf_mem_virt_to_phys(nbuf->data);
@@ -2672,6 +2673,29 @@ void dp_rx_nbuf_free(qdf_nbuf_t nbuf)
qdf_nbuf_free_simple(nbuf);
}
#else
static inline
void dp_rx_set_err_info(struct dp_soc *soc, qdf_nbuf_t nbuf,
struct hal_wbm_err_desc_info wbm_err_info)
{
hal_rx_priv_info_set_in_tlv(soc->hal_soc,
qdf_nbuf_data(nbuf),
(uint8_t *)&wbm_err_info,
sizeof(wbm_err_info));
}
static inline
struct hal_wbm_err_desc_info dp_rx_get_err_info(struct dp_soc *soc,
qdf_nbuf_t nbuf)
{
struct hal_wbm_err_desc_info wbm_err_info = { 0 };
hal_rx_priv_info_get_from_tlv(soc->hal_soc, qdf_nbuf_data(nbuf),
(uint8_t *)&wbm_err_info,
sizeof(struct hal_wbm_err_desc_info));
return wbm_err_info;
}
static inline
QDF_STATUS dp_pdev_rx_buffers_attach_simple(struct dp_soc *soc, uint32_t mac_id,
struct dp_srng *rxdma_srng,