qcacmn: Add API for unmap with physical and virtual addr of nbuf
Tx data transfer in host mode with nbuf map_unmap debug frmwk enabled and enhanced stats disabled results in an assert. This is because on Tx completion path, nbuf unmap is done using API qdf_mem_unmap_nbytes_single which takes physical address of nbuf for unmap and does not remove nbuf from map_unmap tracking list and when nbuf is freed, it results in assert as the tracking list still contains that nbuf entry. In order to fix this, define a new API for nbuf unmap passing physical and virtual address of nbuf as arguments. Physical address is passed as an argument in order to avoid cache miss in per packet path which eventually helps in improving the KPI. Change-Id: I77ab6ac3ac98556b9caff8aa3ee82bc23cd26de7 CRs-Fixed: 3006671
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c96d5d2592
commit
43da5b8892
@@ -862,6 +862,16 @@ void qdf_nbuf_unmap_nbytes_single_debug(qdf_device_t osdev,
|
||||
qdf_nbuf_unmap_nbytes_single_debug(osdev, buf, dir, nbytes, \
|
||||
__func__, __LINE__)
|
||||
|
||||
void qdf_nbuf_unmap_nbytes_single_paddr_debug(qdf_device_t osdev,
|
||||
qdf_nbuf_t buf,
|
||||
qdf_dma_addr_t phy_addr,
|
||||
qdf_dma_dir_t dir, int nbytes,
|
||||
const char *func, uint32_t line);
|
||||
|
||||
#define qdf_nbuf_unmap_nbytes_single_paddr(osdev, buf, phy_addr, dir, nbytes) \
|
||||
qdf_nbuf_unmap_nbytes_single_paddr_debug(osdev, buf, phy_addr, \
|
||||
dir, nbytes, __func__, \
|
||||
__LINE__)
|
||||
#else /* NBUF_MAP_UNMAP_DEBUG */
|
||||
|
||||
static inline void qdf_nbuf_map_check_for_leaks(void) {}
|
||||
@@ -917,6 +927,14 @@ qdf_nbuf_unmap_nbytes_single(
|
||||
{
|
||||
return __qdf_nbuf_unmap_nbytes_single(osdev, buf, dir, nbytes);
|
||||
}
|
||||
|
||||
static inline void
|
||||
qdf_nbuf_unmap_nbytes_single_paddr(qdf_device_t osdev, qdf_nbuf_t buf,
|
||||
qdf_dma_addr_t phy_addr, qdf_dma_dir_t dir,
|
||||
int nbytes)
|
||||
{
|
||||
__qdf_mem_unmap_nbytes_single(osdev, phy_addr, dir, nbytes);
|
||||
}
|
||||
#endif /* NBUF_MAP_UNMAP_DEBUG */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user