qcacmn: get NAPI scale factor through ini configuration
NAPI scale factor should be configured based on the board type. for example Hawkeye could have a different scale factor compared to Alder. CRs-Fixed: 3212330 Change-Id: Ie0bad6aade9ca9379997aa974154f9fb903ab93e
This commit is contained in:

committed by
Madan Koyyalamudi

parent
5c0f11603d
commit
204b765390
@@ -3290,6 +3290,7 @@ static QDF_STATUS dp_soc_interrupt_attach(struct cdp_soc_t *txrx_soc)
|
|||||||
int num_irq = 0;
|
int num_irq = 0;
|
||||||
int rx_err_ring_intr_ctxt_id = HIF_MAX_GROUP;
|
int rx_err_ring_intr_ctxt_id = HIF_MAX_GROUP;
|
||||||
int lmac_id = 0;
|
int lmac_id = 0;
|
||||||
|
int napi_scale;
|
||||||
|
|
||||||
qdf_mem_set(&soc->mon_intr_id_lmac_map,
|
qdf_mem_set(&soc->mon_intr_id_lmac_map,
|
||||||
sizeof(soc->mon_intr_id_lmac_map), DP_MON_INVALID_LMAC_ID);
|
sizeof(soc->mon_intr_id_lmac_map), DP_MON_INVALID_LMAC_ID);
|
||||||
@@ -3365,11 +3366,15 @@ static QDF_STATUS dp_soc_interrupt_attach(struct cdp_soc_t *txrx_soc)
|
|||||||
dp_soc_near_full_interrupt_attach(soc, num_irq,
|
dp_soc_near_full_interrupt_attach(soc, num_irq,
|
||||||
irq_id_map, i);
|
irq_id_map, i);
|
||||||
} else {
|
} else {
|
||||||
|
napi_scale = wlan_cfg_get_napi_scale_factor(
|
||||||
|
soc->wlan_cfg_ctx);
|
||||||
|
if (!napi_scale)
|
||||||
|
napi_scale = QCA_NAPI_DEF_SCALE_BIN_SHIFT;
|
||||||
|
|
||||||
ret = hif_register_ext_group(soc->hif_handle,
|
ret = hif_register_ext_group(soc->hif_handle,
|
||||||
num_irq, irq_id_map, dp_service_srngs,
|
num_irq, irq_id_map, dp_service_srngs,
|
||||||
&soc->intr_ctx[i], "dp_intr",
|
&soc->intr_ctx[i], "dp_intr",
|
||||||
HIF_EXEC_NAPI_TYPE,
|
HIF_EXEC_NAPI_TYPE, napi_scale);
|
||||||
QCA_NAPI_DEF_SCALE_BIN_SHIFT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dp_debug(" int ctx %u num_irq %u irq_id_map %u %u",
|
dp_debug(" int ctx %u num_irq %u irq_id_map %u %u",
|
||||||
|
@@ -5269,6 +5269,8 @@ void dp_print_soc_cfg_params(struct dp_soc *soc)
|
|||||||
soc_cfg_ctx->int_batch_threshold_other);
|
soc_cfg_ctx->int_batch_threshold_other);
|
||||||
DP_PRINT_STATS("Int timer threshold other: %u ",
|
DP_PRINT_STATS("Int timer threshold other: %u ",
|
||||||
soc_cfg_ctx->int_timer_threshold_other);
|
soc_cfg_ctx->int_timer_threshold_other);
|
||||||
|
DP_PRINT_STATS("DP NAPI scale factor: %u ",
|
||||||
|
soc_cfg_ctx->napi_scale_factor);
|
||||||
|
|
||||||
for (i = 0; i < num_of_int_contexts; i++) {
|
for (i = 0; i < num_of_int_contexts; i++) {
|
||||||
index += qdf_snprint(&ring_mask[index],
|
index += qdf_snprint(&ring_mask[index],
|
||||||
|
@@ -463,6 +463,10 @@
|
|||||||
#define CFG_DP_MPDU_RETRY_THRESHOLD_MAX 255
|
#define CFG_DP_MPDU_RETRY_THRESHOLD_MAX 255
|
||||||
#define CFG_DP_MPDU_RETRY_THRESHOLD 0
|
#define CFG_DP_MPDU_RETRY_THRESHOLD 0
|
||||||
|
|
||||||
|
#define WLAN_CFG_DP_NAPI_SCALE_FACTOR 0
|
||||||
|
#define WLAN_CFG_DP_NAPI_SCALE_FACTOR_MIN 0
|
||||||
|
#define WLAN_CFG_DP_NAPI_SCALE_FACTOR_MAX 4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* "dp_tx_capt_max_mem_mb"- maximum memory used by Tx capture
|
* "dp_tx_capt_max_mem_mb"- maximum memory used by Tx capture
|
||||||
@@ -1316,6 +1320,14 @@
|
|||||||
#define CFG_DP_PEER_EXT_STATS \
|
#define CFG_DP_PEER_EXT_STATS \
|
||||||
CFG_INI_BOOL("peer_ext_stats", \
|
CFG_INI_BOOL("peer_ext_stats", \
|
||||||
false, "Peer extended stats")
|
false, "Peer extended stats")
|
||||||
|
|
||||||
|
#define CFG_DP_NAPI_SCALE_FACTOR \
|
||||||
|
CFG_INI_UINT("dp_napi_scale_factor", \
|
||||||
|
WLAN_CFG_DP_NAPI_SCALE_FACTOR_MIN, \
|
||||||
|
WLAN_CFG_DP_NAPI_SCALE_FACTOR_MAX, \
|
||||||
|
WLAN_CFG_DP_NAPI_SCALE_FACTOR, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "NAPI scale factor for DP")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* legacy_mode_csum_disable - Disable csum offload for legacy 802.11abg modes
|
* legacy_mode_csum_disable - Disable csum offload for legacy 802.11abg modes
|
||||||
@@ -1808,5 +1820,6 @@
|
|||||||
CFG_DP_MLO_CONFIG \
|
CFG_DP_MLO_CONFIG \
|
||||||
CFG_DP_INI_SECTION_PARAMS \
|
CFG_DP_INI_SECTION_PARAMS \
|
||||||
CFG_DP_VDEV_STATS_HW_OFFLOAD \
|
CFG_DP_VDEV_STATS_HW_OFFLOAD \
|
||||||
CFG(CFG_DP_TX_CAPT_MAX_MEM_MB)
|
CFG(CFG_DP_TX_CAPT_MAX_MEM_MB) \
|
||||||
|
CFG(CFG_DP_NAPI_SCALE_FACTOR)
|
||||||
#endif /* _CFG_DP_H_ */
|
#endif /* _CFG_DP_H_ */
|
||||||
|
@@ -2154,6 +2154,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
|||||||
wlan_cfg_ctx->mpdu_retry_threshold_2 =
|
wlan_cfg_ctx->mpdu_retry_threshold_2 =
|
||||||
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
|
cfg_get(psoc, CFG_DP_MPDU_RETRY_THRESHOLD_2);
|
||||||
|
|
||||||
|
wlan_cfg_ctx->napi_scale_factor = cfg_get(psoc,
|
||||||
|
CFG_DP_NAPI_SCALE_FACTOR);
|
||||||
return wlan_cfg_ctx;
|
return wlan_cfg_ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3401,3 +3403,8 @@ bool wlan_cfg_get_txmon_hw_support(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
|
qdf_export_symbol(wlan_cfg_get_txmon_hw_support);
|
||||||
|
|
||||||
|
uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
|
{
|
||||||
|
return cfg->napi_scale_factor;
|
||||||
|
}
|
||||||
|
@@ -427,6 +427,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||||||
#endif
|
#endif
|
||||||
uint8_t mpdu_retry_threshold_1;
|
uint8_t mpdu_retry_threshold_1;
|
||||||
uint8_t mpdu_retry_threshold_2;
|
uint8_t mpdu_retry_threshold_2;
|
||||||
|
uint8_t napi_scale_factor;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2156,4 +2157,14 @@ wlan_cfg_get_tx_capt_max_mem(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
}
|
}
|
||||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH */
|
#endif /* WLAN_TX_PKT_CAPTURE_ENH */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cfg_get_napi_scale_factor() - Get napi scale factor
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @cfg: soc configuration context
|
||||||
|
*
|
||||||
|
* Return: napi scale factor
|
||||||
|
*/
|
||||||
|
uint8_t wlan_cfg_get_napi_scale_factor(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||||
|
|
||||||
#endif /*__WLAN_CFG_H*/
|
#endif /*__WLAN_CFG_H*/
|
||||||
|
Reference in New Issue
Block a user