qcacmn: Reuse the tx descriptors in direct switch
Reuse the tx descriptors released in tx completions without releasing the associated skbs to reduce the cpu utilization in direct switch mode. Change-Id: I4ab3ac58977a626344877b8a818a4dbc4864aaf3 CRs-Fixed: 3393968
此提交包含在:

提交者
Madan Koyyalamudi

父節點
87f6016da2
當前提交
0a7d729a98
@@ -1787,11 +1787,10 @@ static QDF_STATUS dp_soc_ppeds_srng_init(struct dp_soc *soc)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlan_minidump_remove(be_soc->ppeds_wbm_release_ring.base_vaddr_unaligned,
|
wlan_minidump_log(be_soc->ppeds_wbm_release_ring.base_vaddr_unaligned,
|
||||||
be_soc->ppeds_wbm_release_ring.alloc_size,
|
be_soc->ppeds_wbm_release_ring.alloc_size,
|
||||||
soc->ctrl_psoc,
|
soc->ctrl_psoc, WLAN_MD_DP_SRNG_PPE_WBM2SW_RELEASE,
|
||||||
WLAN_MD_DP_SRNG_PPE_WBM2SW_RELEASE,
|
"ppeds_wbm_release_ring");
|
||||||
"ppeds_wbm_release_ring");
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
fail:
|
fail:
|
||||||
|
@@ -252,8 +252,10 @@ struct dp_ppe_vp_profile {
|
|||||||
/**
|
/**
|
||||||
* struct dp_ppeds_tx_desc_pool_s - PPEDS Tx Descriptor Pool
|
* struct dp_ppeds_tx_desc_pool_s - PPEDS Tx Descriptor Pool
|
||||||
* @elem_size: Size of each descriptor
|
* @elem_size: Size of each descriptor
|
||||||
|
* @hot_list_len: Length of hotlist chain
|
||||||
* @num_allocated: Number of used descriptors
|
* @num_allocated: Number of used descriptors
|
||||||
* @freelist: Chain of free descriptors
|
* @freelist: Chain of free descriptors
|
||||||
|
* @hotlist: Chain of descriptors with attached nbufs
|
||||||
* @desc_pages: multiple page allocation information for actual descriptors
|
* @desc_pages: multiple page allocation information for actual descriptors
|
||||||
* @elem_count: Number of descriptors in the pool
|
* @elem_count: Number of descriptors in the pool
|
||||||
* @num_free: Number of free descriptors
|
* @num_free: Number of free descriptors
|
||||||
@@ -262,7 +264,9 @@ struct dp_ppe_vp_profile {
|
|||||||
struct dp_ppeds_tx_desc_pool_s {
|
struct dp_ppeds_tx_desc_pool_s {
|
||||||
uint16_t elem_size;
|
uint16_t elem_size;
|
||||||
uint32_t num_allocated;
|
uint32_t num_allocated;
|
||||||
|
uint32_t hot_list_len;
|
||||||
struct dp_tx_desc_s *freelist;
|
struct dp_tx_desc_s *freelist;
|
||||||
|
struct dp_tx_desc_s *hotlist;
|
||||||
struct qdf_mem_multi_page_t desc_pages;
|
struct qdf_mem_multi_page_t desc_pages;
|
||||||
uint16_t elem_count;
|
uint16_t elem_count;
|
||||||
uint32_t num_free;
|
uint32_t num_free;
|
||||||
@@ -303,6 +307,7 @@ struct dp_ppeds_napi {
|
|||||||
* @ppeds_tx_desc: PPEDS tx desc pool
|
* @ppeds_tx_desc: PPEDS tx desc pool
|
||||||
* @ppeds_napi_ctxt:
|
* @ppeds_napi_ctxt:
|
||||||
* @ppeds_handle: PPEDS soc instance handle
|
* @ppeds_handle: PPEDS soc instance handle
|
||||||
|
* @dp_ppeds_txdesc_hotlist_len: PPEDS tx desc hotlist length
|
||||||
* @ppe_vp_tbl_lock: PPE VP table lock
|
* @ppe_vp_tbl_lock: PPE VP table lock
|
||||||
* @num_ppe_vp_entries: Number of PPE VP entries
|
* @num_ppe_vp_entries: Number of PPE VP entries
|
||||||
* @num_ppe_vp_search_idx_entries: PPEDS VP search idx entries
|
* @num_ppe_vp_search_idx_entries: PPEDS VP search idx entries
|
||||||
@@ -342,6 +347,7 @@ struct dp_soc_be {
|
|||||||
struct dp_ppeds_tx_desc_pool_s ppeds_tx_desc;
|
struct dp_ppeds_tx_desc_pool_s ppeds_tx_desc;
|
||||||
struct dp_ppeds_napi ppeds_napi_ctxt;
|
struct dp_ppeds_napi ppeds_napi_ctxt;
|
||||||
void *ppeds_handle;
|
void *ppeds_handle;
|
||||||
|
int dp_ppeds_txdesc_hotlist_len;
|
||||||
qdf_mutex_t ppe_vp_tbl_lock;
|
qdf_mutex_t ppe_vp_tbl_lock;
|
||||||
uint8_t num_ppe_vp_entries;
|
uint8_t num_ppe_vp_entries;
|
||||||
uint8_t num_ppe_vp_search_idx_entries;
|
uint8_t num_ppe_vp_search_idx_entries;
|
||||||
|
@@ -993,6 +993,7 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|||||||
struct dp_soc *soc = &be_soc->soc;
|
struct dp_soc *soc = &be_soc->soc;
|
||||||
void *last_prefetch_hw_desc = NULL;
|
void *last_prefetch_hw_desc = NULL;
|
||||||
struct dp_tx_desc_s *last_prefetch_sw_desc = NULL;
|
struct dp_tx_desc_s *last_prefetch_sw_desc = NULL;
|
||||||
|
qdf_nbuf_t nbuf;
|
||||||
hal_soc_handle_t hal_soc = soc->hal_soc;
|
hal_soc_handle_t hal_soc = soc->hal_soc;
|
||||||
hal_ring_handle_t hal_ring_hdl =
|
hal_ring_handle_t hal_ring_hdl =
|
||||||
be_soc->ppeds_wbm_release_ring.hal_srng;
|
be_soc->ppeds_wbm_release_ring.hal_srng;
|
||||||
@@ -1050,8 +1051,8 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|||||||
if (status != HTT_TX_FW2WBM_TX_STATUS_OK)
|
if (status != HTT_TX_FW2WBM_TX_STATUS_OK)
|
||||||
dp_ppeds_stats(soc, tx_desc->peer_id);
|
dp_ppeds_stats(soc, tx_desc->peer_id);
|
||||||
|
|
||||||
qdf_nbuf_free(tx_desc->nbuf);
|
nbuf = dp_ppeds_tx_desc_free(soc, tx_desc);
|
||||||
dp_ppeds_tx_desc_free(soc, tx_desc);
|
qdf_nbuf_free(nbuf);
|
||||||
} else {
|
} else {
|
||||||
tx_desc->tx_status =
|
tx_desc->tx_status =
|
||||||
hal_tx_comp_get_tx_status(tx_comp_hal_desc);
|
hal_tx_comp_get_tx_status(tx_comp_hal_desc);
|
||||||
|
@@ -5420,6 +5420,19 @@ dp_tx_nbuf_dev_queue_free(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
|||||||
qdf_nbuf_free(nbuf);
|
qdf_nbuf_free(nbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
dp_tx_nbuf_dev_queue_free_no_flag(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
||||||
|
qdf_nbuf_t nbuf)
|
||||||
|
{
|
||||||
|
if (!nbuf)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (nbuf->is_from_recycler)
|
||||||
|
qdf_nbuf_dev_queue_head(nbuf_queue_head, nbuf);
|
||||||
|
else
|
||||||
|
qdf_nbuf_free(nbuf);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
dp_tx_nbuf_dev_kfree_list(qdf_nbuf_queue_head_t *nbuf_queue_head)
|
dp_tx_nbuf_dev_kfree_list(qdf_nbuf_queue_head_t *nbuf_queue_head)
|
||||||
{
|
{
|
||||||
@@ -5438,6 +5451,13 @@ dp_tx_nbuf_dev_queue_free(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
|||||||
qdf_nbuf_free(desc->nbuf);
|
qdf_nbuf_free(desc->nbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
dp_tx_nbuf_dev_queue_free_no_flag(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
||||||
|
qdf_nbuf_t nbuf)
|
||||||
|
{
|
||||||
|
qdf_nbuf_free(nbuf);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
dp_tx_nbuf_dev_kfree_list(qdf_nbuf_queue_head_t *nbuf_queue_head)
|
dp_tx_nbuf_dev_kfree_list(qdf_nbuf_queue_head_t *nbuf_queue_head)
|
||||||
{
|
{
|
||||||
@@ -5481,13 +5501,15 @@ dp_tx_comp_process_desc_list(struct dp_soc *soc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (desc->flags & DP_TX_DESC_FLAG_PPEDS) {
|
if (desc->flags & DP_TX_DESC_FLAG_PPEDS) {
|
||||||
|
qdf_nbuf_t nbuf;
|
||||||
|
|
||||||
if (qdf_likely(txrx_peer))
|
if (qdf_likely(txrx_peer))
|
||||||
dp_tx_update_peer_basic_stats(txrx_peer,
|
dp_tx_update_peer_basic_stats(txrx_peer,
|
||||||
desc->length,
|
desc->length,
|
||||||
desc->tx_status,
|
desc->tx_status,
|
||||||
false);
|
false);
|
||||||
dp_tx_nbuf_dev_queue_free(&h, desc);
|
nbuf = dp_ppeds_tx_desc_free(soc, desc);
|
||||||
dp_ppeds_tx_desc_free(soc, desc);
|
dp_tx_nbuf_dev_queue_free_no_flag(&h, nbuf);
|
||||||
desc = next;
|
desc = next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -410,11 +410,13 @@ qdf_nbuf_t dp_tx_exc_drop(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
|||||||
struct cdp_tx_exception_metadata *tx_exc_metadata);
|
struct cdp_tx_exception_metadata *tx_exc_metadata);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_SUPPORT_PPEDS
|
#ifdef WLAN_SUPPORT_PPEDS
|
||||||
void dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc);
|
qdf_nbuf_t
|
||||||
|
dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc);
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline qdf_nbuf_t
|
||||||
void dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc)
|
dp_ppeds_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc)
|
||||||
{
|
{
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
||||||
|
@@ -1699,6 +1699,10 @@
|
|||||||
#define WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI_MAX 256
|
#define WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI_MAX 256
|
||||||
#define WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI 64
|
#define WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI 64
|
||||||
|
|
||||||
|
#define WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN_MIN 0
|
||||||
|
#define WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN_MAX 0x2000
|
||||||
|
#define WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN 0x400
|
||||||
|
|
||||||
#define CFG_DP_PPEDS_TX_DESC \
|
#define CFG_DP_PPEDS_TX_DESC \
|
||||||
CFG_INI_UINT("dp_ppeds_tx_desc", \
|
CFG_INI_UINT("dp_ppeds_tx_desc", \
|
||||||
WLAN_CFG_NUM_PPEDS_TX_DESC_MIN, \
|
WLAN_CFG_NUM_PPEDS_TX_DESC_MIN, \
|
||||||
@@ -1706,6 +1710,13 @@
|
|||||||
WLAN_CFG_NUM_PPEDS_TX_DESC, \
|
WLAN_CFG_NUM_PPEDS_TX_DESC, \
|
||||||
CFG_VALUE_OR_DEFAULT, "DP PPEDS Tx Descriptors")
|
CFG_VALUE_OR_DEFAULT, "DP PPEDS Tx Descriptors")
|
||||||
|
|
||||||
|
#define CFG_DP_PPEDS_TX_DESC_HOTLIST_LEN \
|
||||||
|
CFG_INI_UINT("dp_ppeds_tx_desc_hotlist_len", \
|
||||||
|
WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN_MIN, \
|
||||||
|
WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN_MAX, \
|
||||||
|
WLAN_CFG_PPEDS_TX_DESC_HOTLIST_LEN, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "DP PPEDS Tx Desc hotlist length")
|
||||||
|
|
||||||
#define CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET \
|
#define CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET \
|
||||||
CFG_INI_UINT("dp_ppeds_tx_cmp_napi_budget", \
|
CFG_INI_UINT("dp_ppeds_tx_cmp_napi_budget", \
|
||||||
WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI_MIN, \
|
WLAN_CFG_NUM_PPEDS_TX_CMP_NAPI_MIN, \
|
||||||
@@ -1733,6 +1744,7 @@
|
|||||||
|
|
||||||
#define CFG_DP_PPEDS_CONFIG \
|
#define CFG_DP_PPEDS_CONFIG \
|
||||||
CFG(CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET) \
|
CFG(CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET) \
|
||||||
|
CFG(CFG_DP_PPEDS_TX_DESC_HOTLIST_LEN) \
|
||||||
CFG(CFG_DP_PPEDS_TX_DESC) \
|
CFG(CFG_DP_PPEDS_TX_DESC) \
|
||||||
CFG(CFG_DP_PPEDS_ENABLE) \
|
CFG(CFG_DP_PPEDS_ENABLE) \
|
||||||
CFG(CFG_DP_REO2PPE_RING) \
|
CFG(CFG_DP_REO2PPE_RING) \
|
||||||
|
@@ -2668,6 +2668,8 @@ wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
|||||||
wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
|
wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
|
||||||
wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
|
wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
|
||||||
wlan_cfg_ctx->ppeds_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC);
|
wlan_cfg_ctx->ppeds_num_tx_desc = cfg_get(psoc, CFG_DP_PPEDS_TX_DESC);
|
||||||
|
wlan_cfg_ctx->ppeds_tx_desc_hotlist_len =
|
||||||
|
cfg_get(psoc, CFG_DP_PPEDS_TX_DESC_HOTLIST_LEN);
|
||||||
wlan_cfg_ctx->ppeds_tx_comp_napi_budget =
|
wlan_cfg_ctx->ppeds_tx_comp_napi_budget =
|
||||||
cfg_get(psoc, CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET);
|
cfg_get(psoc, CFG_DP_PPEDS_TX_CMP_NAPI_BUDGET);
|
||||||
}
|
}
|
||||||
@@ -4230,6 +4232,12 @@ wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
{
|
{
|
||||||
return cfg->ppeds_tx_comp_napi_budget;
|
return cfg->ppeds_tx_comp_napi_budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return cfg->ppeds_tx_desc_hotlist_len;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -309,6 +309,7 @@ struct wlan_srng_cfg {
|
|||||||
* @ppe2tcl_ring: PPE2TCL ring size
|
* @ppe2tcl_ring: PPE2TCL ring size
|
||||||
* @ppeds_num_tx_desc: Number of tx descs for PPE DS
|
* @ppeds_num_tx_desc: Number of tx descs for PPE DS
|
||||||
* @ppeds_tx_comp_napi_budget: Napi budget for tx completions
|
* @ppeds_tx_comp_napi_budget: Napi budget for tx completions
|
||||||
|
* @ppeds_tx_desc_hotlist_len: PPE DS tx desc hotlist max length
|
||||||
* @pkt_capture_mode: Packet capture mode config
|
* @pkt_capture_mode: Packet capture mode config
|
||||||
* @rx_mon_buf_ring_size: Rx monitor buf ring size
|
* @rx_mon_buf_ring_size: Rx monitor buf ring size
|
||||||
* @tx_mon_buf_ring_size: Tx monitor buf ring size
|
* @tx_mon_buf_ring_size: Tx monitor buf ring size
|
||||||
@@ -491,6 +492,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
int ppe2tcl_ring;
|
int ppe2tcl_ring;
|
||||||
int ppeds_num_tx_desc;
|
int ppeds_num_tx_desc;
|
||||||
int ppeds_tx_comp_napi_budget;
|
int ppeds_tx_comp_napi_budget;
|
||||||
|
int ppeds_tx_desc_hotlist_len;
|
||||||
#endif
|
#endif
|
||||||
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2
|
||||||
uint32_t pkt_capture_mode;
|
uint32_t pkt_capture_mode;
|
||||||
@@ -2138,6 +2140,14 @@ wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
|||||||
int
|
int
|
||||||
wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg);
|
wlan_cfg_get_dp_soc_ppeds_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len() - Max hotlist len of tx descs
|
||||||
|
* @cfg: Configuration Handle
|
||||||
|
*
|
||||||
|
* Return: hotlist len
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
/**
|
/**
|
||||||
* wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget() - ppeds Tx comp napi budget
|
* wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget() - ppeds Tx comp napi budget
|
||||||
* @cfg: Configuration Handle
|
* @cfg: Configuration Handle
|
||||||
@@ -2176,6 +2186,12 @@ wlan_cfg_get_dp_soc_ppeds_tx_comp_napi_budget(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
wlan_cfg_get_dp_soc_ppeds_tx_desc_hotlist_len(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
新增問題並參考
封鎖使用者