qcacmn: INI param to configure Rx S/W desc count
Rx s/w descriptor count should be configurable from dp_rx_sw_desc_num INI Change-Id: Id4bbe261b985219dad8d129679ab85e2dd1ba084
This commit is contained in:
@@ -2901,7 +2901,7 @@ dp_rx_pdev_desc_pool_alloc(struct dp_pdev *pdev)
|
|||||||
{
|
{
|
||||||
struct dp_soc *soc = pdev->soc;
|
struct dp_soc *soc = pdev->soc;
|
||||||
uint32_t rxdma_entries;
|
uint32_t rxdma_entries;
|
||||||
uint32_t rx_sw_desc_weight;
|
uint32_t rx_sw_desc_num;
|
||||||
struct dp_srng *dp_rxdma_srng;
|
struct dp_srng *dp_rxdma_srng;
|
||||||
struct rx_desc_pool *rx_desc_pool;
|
struct rx_desc_pool *rx_desc_pool;
|
||||||
uint32_t status = QDF_STATUS_SUCCESS;
|
uint32_t status = QDF_STATUS_SUCCESS;
|
||||||
@@ -2918,10 +2918,10 @@ dp_rx_pdev_desc_pool_alloc(struct dp_pdev *pdev)
|
|||||||
rxdma_entries = dp_rxdma_srng->num_entries;
|
rxdma_entries = dp_rxdma_srng->num_entries;
|
||||||
|
|
||||||
rx_desc_pool = &soc->rx_desc_buf[mac_for_pdev];
|
rx_desc_pool = &soc->rx_desc_buf[mac_for_pdev];
|
||||||
rx_sw_desc_weight = wlan_cfg_get_dp_soc_rx_sw_desc_weight(soc->wlan_cfg_ctx);
|
rx_sw_desc_num = wlan_cfg_get_dp_soc_rx_sw_desc_num(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
status = dp_rx_desc_pool_alloc(soc,
|
status = dp_rx_desc_pool_alloc(soc,
|
||||||
rx_sw_desc_weight * rxdma_entries,
|
rx_sw_desc_num,
|
||||||
rx_desc_pool);
|
rx_desc_pool);
|
||||||
if (status != QDF_STATUS_SUCCESS)
|
if (status != QDF_STATUS_SUCCESS)
|
||||||
return status;
|
return status;
|
||||||
@@ -2958,7 +2958,7 @@ QDF_STATUS dp_rx_pdev_desc_pool_init(struct dp_pdev *pdev)
|
|||||||
int mac_for_pdev = pdev->lmac_id;
|
int mac_for_pdev = pdev->lmac_id;
|
||||||
struct dp_soc *soc = pdev->soc;
|
struct dp_soc *soc = pdev->soc;
|
||||||
uint32_t rxdma_entries;
|
uint32_t rxdma_entries;
|
||||||
uint32_t rx_sw_desc_weight;
|
uint32_t rx_sw_desc_num;
|
||||||
struct dp_srng *dp_rxdma_srng;
|
struct dp_srng *dp_rxdma_srng;
|
||||||
struct rx_desc_pool *rx_desc_pool;
|
struct rx_desc_pool *rx_desc_pool;
|
||||||
|
|
||||||
@@ -2977,16 +2977,15 @@ QDF_STATUS dp_rx_pdev_desc_pool_init(struct dp_pdev *pdev)
|
|||||||
|
|
||||||
soc->process_rx_status = CONFIG_PROCESS_RX_STATUS;
|
soc->process_rx_status = CONFIG_PROCESS_RX_STATUS;
|
||||||
|
|
||||||
rx_sw_desc_weight =
|
rx_sw_desc_num =
|
||||||
wlan_cfg_get_dp_soc_rx_sw_desc_weight(soc->wlan_cfg_ctx);
|
wlan_cfg_get_dp_soc_rx_sw_desc_num(soc->wlan_cfg_ctx);
|
||||||
|
|
||||||
rx_desc_pool->owner = DP_WBM2SW_RBM;
|
rx_desc_pool->owner = DP_WBM2SW_RBM;
|
||||||
rx_desc_pool->buf_size = RX_DATA_BUFFER_SIZE;
|
rx_desc_pool->buf_size = RX_DATA_BUFFER_SIZE;
|
||||||
rx_desc_pool->buf_alignment = RX_DATA_BUFFER_ALIGNMENT;
|
rx_desc_pool->buf_alignment = RX_DATA_BUFFER_ALIGNMENT;
|
||||||
|
|
||||||
dp_rx_desc_pool_init(soc, mac_for_pdev,
|
dp_rx_desc_pool_init(soc, mac_for_pdev,
|
||||||
rx_sw_desc_weight * rxdma_entries,
|
rx_sw_desc_num, rx_desc_pool);
|
||||||
rx_desc_pool);
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -311,6 +311,9 @@
|
|||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 1
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 1
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE 4096
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN 4096
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MAX 4096
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For low memory AP cases using 1 will reduce the rx descriptors memory req
|
* For low memory AP cases using 1 will reduce the rx descriptors memory req
|
||||||
@@ -319,6 +322,9 @@
|
|||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 1
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 3
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 3
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE 4096
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN 1024
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MAX 12288
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AP use cases need to allocate more RX Descriptors than the number of
|
* AP use cases need to allocate more RX Descriptors than the number of
|
||||||
@@ -331,6 +337,9 @@
|
|||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 3
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE 3
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MIN 1
|
||||||
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 3
|
#define WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE_MAX 3
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE 12288
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN 4096
|
||||||
|
#define WLAN_CFG_RX_SW_DESC_NUM_SIZE_MAX 12288
|
||||||
#endif //QCA_HOST2FW_RXBUF_RING
|
#endif //QCA_HOST2FW_RXBUF_RING
|
||||||
|
|
||||||
#define WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE 16384
|
#define WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE 16384
|
||||||
@@ -804,6 +813,13 @@
|
|||||||
WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE, \
|
WLAN_CFG_RX_SW_DESC_WEIGHT_SIZE, \
|
||||||
CFG_VALUE_OR_DEFAULT, "DP RX SW DESC weight")
|
CFG_VALUE_OR_DEFAULT, "DP RX SW DESC weight")
|
||||||
|
|
||||||
|
#define CFG_DP_RX_SW_DESC_NUM \
|
||||||
|
CFG_INI_UINT("dp_rx_sw_desc_num", \
|
||||||
|
WLAN_CFG_RX_SW_DESC_NUM_SIZE_MIN, \
|
||||||
|
WLAN_CFG_RX_SW_DESC_NUM_SIZE_MAX, \
|
||||||
|
WLAN_CFG_RX_SW_DESC_NUM_SIZE, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "DP RX SW DESC num")
|
||||||
|
|
||||||
#define CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE \
|
#define CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE \
|
||||||
CFG_INI_UINT("dp_rx_flow_search_table_size", \
|
CFG_INI_UINT("dp_rx_flow_search_table_size", \
|
||||||
WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE_MIN, \
|
WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE_MIN, \
|
||||||
@@ -946,6 +962,7 @@
|
|||||||
CFG(CFG_DP_AP_STA_SECURITY_SEPERATION) \
|
CFG(CFG_DP_AP_STA_SECURITY_SEPERATION) \
|
||||||
CFG(CFG_DP_ENABLE_DATA_STALL_DETECTION) \
|
CFG(CFG_DP_ENABLE_DATA_STALL_DETECTION) \
|
||||||
CFG(CFG_DP_RX_SW_DESC_WEIGHT) \
|
CFG(CFG_DP_RX_SW_DESC_WEIGHT) \
|
||||||
|
CFG(CFG_DP_RX_SW_DESC_NUM) \
|
||||||
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE) \
|
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_SIZE) \
|
||||||
CFG(CFG_DP_RX_FLOW_TAG_ENABLE) \
|
CFG(CFG_DP_RX_FLOW_TAG_ENABLE) \
|
||||||
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV) \
|
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV) \
|
||||||
|
@@ -593,6 +593,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
|||||||
cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
|
cfg_get(psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
|
||||||
wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
|
wlan_cfg_ctx->rx_sw_desc_weight = cfg_get(psoc,
|
||||||
CFG_DP_RX_SW_DESC_WEIGHT);
|
CFG_DP_RX_SW_DESC_WEIGHT);
|
||||||
|
wlan_cfg_ctx->rx_sw_desc_num = cfg_get(psoc,
|
||||||
|
CFG_DP_RX_SW_DESC_NUM);
|
||||||
wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
|
wlan_cfg_ctx->rx_toeplitz_hash_key = (uint8_t *)rx_fst_toeplitz_key;
|
||||||
wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
|
wlan_cfg_ctx->rx_flow_max_search = WLAN_CFG_RX_FST_MAX_SEARCH;
|
||||||
wlan_cfg_ctx->is_rx_flow_tag_enabled =
|
wlan_cfg_ctx->is_rx_flow_tag_enabled =
|
||||||
@@ -1229,6 +1231,12 @@ wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
return cfg->rx_sw_desc_weight;
|
return cfg->rx_sw_desc_weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return cfg->rx_sw_desc_num;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
|
wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
{
|
{
|
||||||
|
@@ -278,6 +278,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
bool tx_comp_enable_eol_data_check;
|
bool tx_comp_enable_eol_data_check;
|
||||||
#endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
|
#endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */
|
||||||
int rx_sw_desc_weight;
|
int rx_sw_desc_weight;
|
||||||
|
int rx_sw_desc_num;
|
||||||
bool is_rx_mon_protocol_flow_tag_enabled;
|
bool is_rx_mon_protocol_flow_tag_enabled;
|
||||||
bool is_rx_flow_tag_enabled;
|
bool is_rx_flow_tag_enabled;
|
||||||
bool is_rx_flow_search_table_per_pdev;
|
bool is_rx_flow_search_table_per_pdev;
|
||||||
@@ -1183,6 +1184,15 @@ wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
|||||||
int
|
int
|
||||||
wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
|
wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* wlan_cfg_get_dp_soc_rx_sw_desc_num - Get rx sw desc num
|
||||||
|
* @wlan_cfg_soc_ctx
|
||||||
|
*
|
||||||
|
* Return: rx_sw_desc_num
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wlan_cfg_get_dp_caps - Get dp capablities
|
* wlan_cfg_get_dp_caps - Get dp capablities
|
||||||
* @wlan_cfg_soc_ctx
|
* @wlan_cfg_soc_ctx
|
||||||
|
Reference in New Issue
Block a user