qcacmn: Defer IPA SMMU mapping to OPT_DP reserve

Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
This commit is contained in:
Namita Nair
2023-06-20 15:40:49 -07:00
zatwierdzone przez Rahul Choudhary
rodzic 7830b92b9d
commit b50ceeee79
12 zmienionych plików z 247 dodań i 38 usunięć

Wyświetl plik

@@ -743,6 +743,64 @@ cdp_ipa_tx_buf_smmu_unmapping(ol_txrx_soc_handle soc, uint8_t pdev_id,
return QDF_STATUS_SUCCESS;
}
/**
* cdp_ipa_rx_buf_smmu_pool_mapping() - Create SMMU mappings for Rx pool
* @soc: data path soc handle
* @pdev_id: pdev id
* @create: Map/unmap
* @line: line number
* @func: function name
*
* Create SMMU map/unmap for Rx buffers allocated to IPA
*
* return QDF_STATUS_SUCCESS
*/
static inline QDF_STATUS
cdp_ipa_rx_buf_smmu_pool_mapping(ol_txrx_soc_handle soc, uint8_t pdev_id,
bool create, const char *func, uint32_t line)
{
if (!soc || !soc->ops || !soc->ops->ipa_ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
return QDF_STATUS_E_FAILURE;
}
if (soc->ops->ipa_ops->ipa_rx_buf_smmu_pool_mapping)
return soc->ops->ipa_ops->ipa_rx_buf_smmu_pool_mapping(soc,
pdev_id, create, func, line);
return QDF_STATUS_SUCCESS;
}
static inline QDF_STATUS cdp_ipa_set_smmu_mapped(ol_txrx_soc_handle soc,
int val)
{
if (!soc || !soc->ops || !soc->ops->ipa_ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
return QDF_STATUS_E_FAILURE;
}
if (soc->ops->ipa_ops->ipa_set_smmu_mapped)
return soc->ops->ipa_ops->ipa_set_smmu_mapped(soc, val);
return QDF_STATUS_SUCCESS;
}
static inline int cdp_ipa_get_smmu_mapped(ol_txrx_soc_handle soc)
{
if (!soc || !soc->ops || !soc->ops->ipa_ops) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
"%s invalid instance", __func__);
return QDF_STATUS_E_FAILURE;
}
if (soc->ops->ipa_ops->ipa_get_smmu_mapped)
return soc->ops->ipa_ops->ipa_get_smmu_mapped(soc);
return QDF_STATUS_SUCCESS;
}
#ifdef IPA_WDS_EASYMESH_FEATURE
/**
* cdp_ipa_ast_create() - Create/update AST entry in AST table

Wyświetl plik

@@ -2156,6 +2156,9 @@ struct cdp_throttle_ops {
* @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx
* @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx
* buffers to IPA
* @ipa_rx_buf_smmu_pool_mapping: Create SMMU mapping for Rx
* @ipa_set_smmu_mapped: Set IPA SMMU mapped value
* @ipa_get_smmu_mapped: Get IPA SMMU mapped value
* @ipa_rx_super_rule_setup: Setup cce super rules based on filter tuple
* @ipa_ast_create: Create/Update ast entry
* @ipa_get_wdi_version: Get WDI version
@@ -2251,6 +2254,15 @@ struct cdp_ipa_ops {
uint8_t pdev_id,
const char *func,
uint32_t line);
QDF_STATUS (*ipa_rx_buf_smmu_pool_mapping)(
struct cdp_soc_t *soc_hdl,
uint8_t pdev_id,
bool create,
const char *func,
uint32_t line);
QDF_STATUS (*ipa_set_smmu_mapped)(struct cdp_soc_t *soc_hdl, int val);
int (*ipa_get_smmu_mapped)(struct cdp_soc_t *soc_hdl);
#ifdef IPA_OPT_WIFI_DP
QDF_STATUS (*ipa_rx_super_rule_setup)(struct cdp_soc_t *soc_hdl,
void *flt_params);