qcacmn: introduce simple nbuf_free API in RX path
simple Alloc is being used in RX path which avoids certain debug logic. during free of nbuf we should avoid this debug logic else it will report it as double free, this will be triggered only when debug is enabled Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
Esse commit está contido em:

commit de
Madan Koyyalamudi

pai
e4d9b0c2d7
commit
b265fdd7fc
@@ -2230,6 +2230,16 @@ void dp_rx_nbuf_unmap(struct dp_soc *soc,
|
||||
qdf_nbuf_dma_inv_range((void *)nbuf->data,
|
||||
(void *)(nbuf->data + rx_desc_pool->buf_size));
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_nbuf_unmap_pool(struct dp_soc *soc,
|
||||
struct rx_desc_pool *rx_desc_pool,
|
||||
qdf_nbuf_t nbuf)
|
||||
{
|
||||
qdf_nbuf_dma_inv_range((void *)nbuf->data,
|
||||
(void *)(nbuf->data + rx_desc_pool->buf_size));
|
||||
}
|
||||
|
||||
#else
|
||||
static inline
|
||||
void dp_rx_nbuf_unmap(struct dp_soc *soc,
|
||||
@@ -2237,6 +2247,13 @@ void dp_rx_nbuf_unmap(struct dp_soc *soc,
|
||||
uint8_t reo_ring_num)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_nbuf_unmap_pool(struct dp_soc *soc,
|
||||
struct rx_desc_pool *rx_desc_pool,
|
||||
qdf_nbuf_t nbuf)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline
|
||||
@@ -2252,6 +2269,11 @@ qdf_nbuf_t dp_rx_nbuf_alloc(struct dp_soc *soc,
|
||||
return qdf_nbuf_alloc_simple(soc->osdev, rx_desc_pool->buf_size);
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_nbuf_free(qdf_nbuf_t nbuf)
|
||||
{
|
||||
qdf_nbuf_free_simple(nbuf);
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
QDF_STATUS dp_pdev_rx_buffers_attach_simple(struct dp_soc *soc, uint32_t mac_id,
|
||||
@@ -2325,6 +2347,17 @@ void dp_rx_nbuf_unmap(struct dp_soc *soc,
|
||||
dp_ipa_reo_ctx_buf_mapping_unlock(soc, reo_ring_num);
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_nbuf_unmap_pool(struct dp_soc *soc,
|
||||
struct rx_desc_pool *rx_desc_pool,
|
||||
qdf_nbuf_t nbuf)
|
||||
{
|
||||
dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf, rx_desc_pool->buf_size,
|
||||
false);
|
||||
qdf_nbuf_unmap_nbytes_single(soc->osdev, nbuf, QDF_DMA_FROM_DEVICE,
|
||||
rx_desc_pool->buf_size);
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_per_core_stats_update(struct dp_soc *soc, uint8_t ring_id,
|
||||
uint32_t bufs_reaped)
|
||||
@@ -2341,6 +2374,12 @@ qdf_nbuf_t dp_rx_nbuf_alloc(struct dp_soc *soc,
|
||||
RX_BUFFER_RESERVATION,
|
||||
rx_desc_pool->buf_alignment, FALSE);
|
||||
}
|
||||
|
||||
static inline
|
||||
void dp_rx_nbuf_free(qdf_nbuf_t nbuf)
|
||||
{
|
||||
qdf_nbuf_free(nbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline
|
||||
|
Referência em uma nova issue
Block a user