qcacmn: ini config to allocate special TX descriptors of pdev
An INI dp_tx_spl_desc is defined and can be used to configure the limit of TX descriptors that can reserved on the pdev to handle special frames like EAPOL. CRs-Fixed: 3343209 Change-Id: I6578bddd1f4ea07528c9f66f778b113ec6fb9e61
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f5eca8f1a9
commit
88124ec9b4
@@ -17204,8 +17204,10 @@ static QDF_STATUS dp_pdev_init(struct cdp_soc_t *txrx_soc,
|
|||||||
qdf_event_create(&pdev->fw_obss_stats_event);
|
qdf_event_create(&pdev->fw_obss_stats_event);
|
||||||
|
|
||||||
pdev->num_tx_allowed = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
pdev->num_tx_allowed = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||||
pdev->num_reg_tx_allowed = pdev->num_tx_allowed - MAX_TX_SPL_DESC;
|
pdev->num_tx_spl_allowed =
|
||||||
|
wlan_cfg_get_num_tx_spl_desc(soc->wlan_cfg_ctx);
|
||||||
|
pdev->num_reg_tx_allowed =
|
||||||
|
pdev->num_tx_allowed - pdev->num_tx_spl_allowed;
|
||||||
if (dp_rxdma_ring_setup(soc, pdev)) {
|
if (dp_rxdma_ring_setup(soc, pdev)) {
|
||||||
dp_init_err("%pK: RXDMA ring config failed", soc);
|
dp_init_err("%pK: RXDMA ring config failed", soc);
|
||||||
goto fail3;
|
goto fail3;
|
||||||
|
@@ -3153,6 +3153,9 @@ struct dp_pdev {
|
|||||||
*/
|
*/
|
||||||
uint32_t num_reg_tx_allowed;
|
uint32_t num_reg_tx_allowed;
|
||||||
|
|
||||||
|
/* User configured max number of tx buffers for the special frames*/
|
||||||
|
uint32_t num_tx_spl_allowed;
|
||||||
|
|
||||||
/* unique cookie required for peer session */
|
/* unique cookie required for peer session */
|
||||||
uint32_t next_peer_cookie;
|
uint32_t next_peer_cookie;
|
||||||
|
|
||||||
|
@@ -184,6 +184,10 @@
|
|||||||
#define WLAN_CFG_NUM_TX_DESC_MIN 16
|
#define WLAN_CFG_NUM_TX_DESC_MIN 16
|
||||||
#define WLAN_CFG_NUM_TX_DESC_MAX 0x10000
|
#define WLAN_CFG_NUM_TX_DESC_MAX 0x10000
|
||||||
|
|
||||||
|
#define WLAN_CFG_NUM_TX_SPL_DESC 1024
|
||||||
|
#define WLAN_CFG_NUM_TX_SPL_DESC_MIN 0
|
||||||
|
#define WLAN_CFG_NUM_TX_SPL_DESC_MAX 0x1000
|
||||||
|
|
||||||
#define WLAN_CFG_NUM_TX_EXT_DESC_MIN 16
|
#define WLAN_CFG_NUM_TX_EXT_DESC_MIN 16
|
||||||
#define WLAN_CFG_NUM_TX_EXT_DESC_MAX 0x80000
|
#define WLAN_CFG_NUM_TX_EXT_DESC_MAX 0x80000
|
||||||
|
|
||||||
@@ -661,6 +665,13 @@
|
|||||||
WLAN_CFG_NUM_TX_DESC, \
|
WLAN_CFG_NUM_TX_DESC, \
|
||||||
CFG_VALUE_OR_DEFAULT, "DP Tx Descriptors")
|
CFG_VALUE_OR_DEFAULT, "DP Tx Descriptors")
|
||||||
|
|
||||||
|
#define CFG_DP_TX_SPL_DESC \
|
||||||
|
CFG_INI_UINT("dp_tx_spl_desc", \
|
||||||
|
WLAN_CFG_NUM_TX_SPL_DESC_MIN, \
|
||||||
|
WLAN_CFG_NUM_TX_SPL_DESC_MAX, \
|
||||||
|
WLAN_CFG_NUM_TX_SPL_DESC, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "DP Tx Special Descriptors")
|
||||||
|
|
||||||
#define CFG_DP_TX_EXT_DESC \
|
#define CFG_DP_TX_EXT_DESC \
|
||||||
CFG_INI_UINT("dp_tx_ext_desc", \
|
CFG_INI_UINT("dp_tx_ext_desc", \
|
||||||
WLAN_CFG_NUM_TX_EXT_DESC_MIN, \
|
WLAN_CFG_NUM_TX_EXT_DESC_MIN, \
|
||||||
@@ -1810,6 +1821,7 @@
|
|||||||
CFG(CFG_DP_NSS_REO_DEST_RINGS) \
|
CFG(CFG_DP_NSS_REO_DEST_RINGS) \
|
||||||
CFG(CFG_DP_NSS_TCL_DATA_RINGS) \
|
CFG(CFG_DP_NSS_TCL_DATA_RINGS) \
|
||||||
CFG(CFG_DP_TX_DESC) \
|
CFG(CFG_DP_TX_DESC) \
|
||||||
|
CFG(CFG_DP_TX_SPL_DESC) \
|
||||||
CFG(CFG_DP_TX_EXT_DESC) \
|
CFG(CFG_DP_TX_EXT_DESC) \
|
||||||
CFG(CFG_DP_TX_EXT_DESC_POOLS) \
|
CFG(CFG_DP_TX_EXT_DESC_POOLS) \
|
||||||
CFG(CFG_DP_PDEV_RX_RING) \
|
CFG(CFG_DP_PDEV_RX_RING) \
|
||||||
|
@@ -2863,6 +2863,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
|||||||
wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
|
wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
|
||||||
CFG_DP_TX_EXT_DESC_POOLS);
|
CFG_DP_TX_EXT_DESC_POOLS);
|
||||||
wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
|
wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
|
||||||
|
wlan_cfg_ctx->num_tx_spl_desc = cfg_get(psoc, CFG_DP_TX_SPL_DESC);
|
||||||
wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
|
wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
|
||||||
wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
|
wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
|
||||||
wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
|
wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
|
||||||
@@ -3526,6 +3527,11 @@ int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
return cfg->num_tx_desc;
|
return cfg->num_tx_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return cfg->num_tx_spl_desc;
|
||||||
|
}
|
||||||
|
|
||||||
void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
|
void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
|
||||||
{
|
{
|
||||||
cfg->num_tx_desc = num_desc;
|
cfg->num_tx_desc = num_desc;
|
||||||
|
@@ -154,6 +154,7 @@ struct wlan_srng_cfg {
|
|||||||
* @num_tx_desc_pool: Number of Tx Descriptor pools
|
* @num_tx_desc_pool: Number of Tx Descriptor pools
|
||||||
* @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
|
* @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
|
||||||
* @num_tx_desc: Number of Tx Descriptors per pool
|
* @num_tx_desc: Number of Tx Descriptors per pool
|
||||||
|
* @num_tx_spl_desc: Number of Tx Descriptors per pool to handle special frames
|
||||||
* @min_tx_desc: Minimum number of Tx Descriptors per pool
|
* @min_tx_desc: Minimum number of Tx Descriptors per pool
|
||||||
* @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
|
* @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
|
||||||
* @max_peer_id: Maximum value of peer id that FW can assign for a client
|
* @max_peer_id: Maximum value of peer id that FW can assign for a client
|
||||||
@@ -341,6 +342,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
int num_tx_desc_pool;
|
int num_tx_desc_pool;
|
||||||
int num_tx_ext_desc_pool;
|
int num_tx_ext_desc_pool;
|
||||||
int num_tx_desc;
|
int num_tx_desc;
|
||||||
|
int num_tx_spl_desc;
|
||||||
int min_tx_desc;
|
int min_tx_desc;
|
||||||
int num_tx_ext_desc;
|
int num_tx_ext_desc;
|
||||||
int max_peer_id;
|
int max_peer_id;
|
||||||
@@ -1184,6 +1186,15 @@ void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num
|
|||||||
*/
|
*/
|
||||||
int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cfg_get_num_tx_spl_desc() - Number of Tx Descriptors for special
|
||||||
|
* frames per pool
|
||||||
|
* @wlan_cfg_ctx: Configuration Handle
|
||||||
|
*
|
||||||
|
* Return: num_tx_desc
|
||||||
|
*/
|
||||||
|
int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
|
* wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
|
||||||
* @wlan_cfg_ctx: Configuration Handle
|
* @wlan_cfg_ctx: Configuration Handle
|
||||||
|
Reference in New Issue
Block a user