msm: ipa: update wan pool size on napi enable
check for napi enable to update wan pipe pool size not recycle flag. Fix the dtsi property value. Change-Id: Ifb8ff50d0eab96eca6f9ca45beb6d1dff9cd3292 CRs-Fixed: 1076097 Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
This commit is contained in:
parent
6bbaf84de6
commit
cd5f5121db
4 changed files with 42 additions and 40 deletions
|
@ -3152,23 +3152,23 @@ static int ipa_assign_policy_v2(struct ipa_sys_connect_params *in,
|
|||
} else if (in->client ==
|
||||
IPA_CLIENT_APPS_WAN_CONS) {
|
||||
sys->pyld_hdlr = ipa_wan_rx_pyld_hdlr;
|
||||
if (in->recycle_enabled) {
|
||||
sys->rx_pool_sz = ipa_ctx->wan_rx_ring_size;
|
||||
if (nr_cpu_ids > 1) {
|
||||
sys->repl_hdlr =
|
||||
ipa_replenish_rx_cache_recycle;
|
||||
sys->rx_pool_sz =
|
||||
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
|
||||
ipa_fast_replenish_rx_cache;
|
||||
sys->repl_trig_thresh =
|
||||
sys->rx_pool_sz / 8;
|
||||
} else {
|
||||
if (nr_cpu_ids > 1) {
|
||||
sys->repl_hdlr =
|
||||
ipa_fast_replenish_rx_cache;
|
||||
sys->repl_trig_thresh =
|
||||
sys->rx_pool_sz / 8;
|
||||
} else {
|
||||
sys->repl_hdlr =
|
||||
ipa_replenish_rx_cache;
|
||||
}
|
||||
sys->repl_hdlr =
|
||||
ipa_replenish_rx_cache;
|
||||
}
|
||||
if (in->napi_enabled) {
|
||||
sys->rx_pool_sz =
|
||||
ipa_ctx->wan_rx_ring_size;
|
||||
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
|
||||
if (in->recycle_enabled) {
|
||||
sys->repl_hdlr =
|
||||
ipa_replenish_rx_cache_recycle;
|
||||
}
|
||||
}
|
||||
sys->ep->wakelock_client =
|
||||
IPA_WAKELOCK_REF_CLIENT_WAN_RX;
|
||||
|
|
|
@ -1259,11 +1259,13 @@ static int handle_ingress_format(struct net_device *dev,
|
|||
ipa_to_apps_ep_cfg.ipa_ep_cfg.aggr.aggr_pkt_limit =
|
||||
in->u.ingress_format.agg_count;
|
||||
|
||||
ipa_to_apps_ep_cfg.recycle_enabled = true;
|
||||
ep_cfg = (struct rmnet_phys_ep_conf_s *)
|
||||
rcu_dereference(dev->rx_handler_data);
|
||||
ep_cfg->recycle = ipa_recycle_wan_skb;
|
||||
pr_info("Wan Recycle Enabled\n");
|
||||
if (ipa_rmnet_res.ipa_napi_enable) {
|
||||
ipa_to_apps_ep_cfg.recycle_enabled = true;
|
||||
ep_cfg = (struct rmnet_phys_ep_conf_s *)
|
||||
rcu_dereference(dev->rx_handler_data);
|
||||
ep_cfg->recycle = ipa_recycle_wan_skb;
|
||||
pr_info("Wan Recycle Enabled\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3180,22 +3180,20 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
|
|||
IPA_CLIENT_APPS_WAN_CONS) {
|
||||
sys->pyld_hdlr = ipa3_wan_rx_pyld_hdlr;
|
||||
sys->free_rx_wrapper = ipa3_free_rx_wrapper;
|
||||
if (in->recycle_enabled) {
|
||||
sys->rx_pool_sz = ipa3_ctx->wan_rx_ring_size;
|
||||
if (nr_cpu_ids > 1) {
|
||||
sys->repl_hdlr =
|
||||
ipa3_replenish_rx_cache_recycle;
|
||||
ipa3_fast_replenish_rx_cache;
|
||||
} else {
|
||||
sys->repl_hdlr =
|
||||
ipa3_replenish_rx_cache;
|
||||
}
|
||||
if (in->napi_enabled)
|
||||
sys->rx_pool_sz =
|
||||
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
|
||||
} else {
|
||||
if (nr_cpu_ids > 1) {
|
||||
sys->repl_hdlr =
|
||||
ipa3_fast_replenish_rx_cache;
|
||||
} else {
|
||||
sys->repl_hdlr =
|
||||
ipa3_replenish_rx_cache;
|
||||
}
|
||||
sys->rx_pool_sz =
|
||||
ipa3_ctx->wan_rx_ring_size;
|
||||
}
|
||||
if (in->napi_enabled && in->recycle_enabled)
|
||||
sys->repl_hdlr =
|
||||
ipa3_replenish_rx_cache_recycle;
|
||||
in->ipa_ep_cfg.aggr.aggr_sw_eof_active
|
||||
= true;
|
||||
if (ipa3_ctx->
|
||||
|
|
|
@ -1271,11 +1271,13 @@ static int handle3_ingress_format(struct net_device *dev,
|
|||
ipa_wan_ep_cfg->ipa_ep_cfg.aggr.aggr_pkt_limit =
|
||||
in->u.ingress_format.agg_count;
|
||||
|
||||
ipa_wan_ep_cfg->recycle_enabled = true;
|
||||
ep_cfg = (struct rmnet_phys_ep_conf_s *)
|
||||
rcu_dereference(dev->rx_handler_data);
|
||||
ep_cfg->recycle = ipa_recycle_wan_skb;
|
||||
pr_info("Wan Recycle Enabled\n");
|
||||
if (ipa_wan_ep_cfg->napi_enabled) {
|
||||
ipa_wan_ep_cfg->recycle_enabled = true;
|
||||
ep_cfg = (struct rmnet_phys_ep_conf_s *)
|
||||
rcu_dereference(dev->rx_handler_data);
|
||||
ep_cfg->recycle = ipa_recycle_wan_skb;
|
||||
pr_info("Wan Recycle Enabled\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1969,9 +1971,9 @@ static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev,
|
|||
ipa_rmnet_drv_res->ipa_advertise_sg_support ? "True" : "False");
|
||||
|
||||
ipa_rmnet_drv_res->ipa_napi_enable =
|
||||
of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,napi");
|
||||
pr_info("IPA napi = %s\n",
|
||||
of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,ipa-napi-enable");
|
||||
pr_info("IPA Napi Enable = %s\n",
|
||||
ipa_rmnet_drv_res->ipa_napi_enable ? "True" : "False");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue