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:
Sunil Paidimarri 2016-10-07 16:30:19 -07:00
parent 6bbaf84de6
commit cd5f5121db
4 changed files with 42 additions and 40 deletions

View file

@ -3152,12 +3152,7 @@ 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->repl_hdlr =
ipa_replenish_rx_cache_recycle;
sys->rx_pool_sz =
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
} else {
sys->rx_pool_sz = ipa_ctx->wan_rx_ring_size;
if (nr_cpu_ids > 1) {
sys->repl_hdlr =
ipa_fast_replenish_rx_cache;
@ -3167,8 +3162,13 @@ static int ipa_assign_policy_v2(struct ipa_sys_connect_params *in,
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;

View file

@ -1259,6 +1259,7 @@ 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;
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);
@ -1266,6 +1267,7 @@ static int handle_ingress_format(struct net_device *dev,
pr_info("Wan Recycle Enabled\n");
}
}
}
ipa_to_apps_ep_cfg.ipa_ep_cfg.hdr.hdr_len = 4;
ipa_to_apps_ep_cfg.ipa_ep_cfg.hdr.hdr_ofst_metadata_valid = 1;

View file

@ -3180,12 +3180,7 @@ 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->repl_hdlr =
ipa3_replenish_rx_cache_recycle;
sys->rx_pool_sz =
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
} else {
sys->rx_pool_sz = ipa3_ctx->wan_rx_ring_size;
if (nr_cpu_ids > 1) {
sys->repl_hdlr =
ipa3_fast_replenish_rx_cache;
@ -3193,9 +3188,12 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
sys->repl_hdlr =
ipa3_replenish_rx_cache;
}
if (in->napi_enabled)
sys->rx_pool_sz =
ipa3_ctx->wan_rx_ring_size;
}
IPA_WAN_NAPI_CONS_RX_POOL_SZ;
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->

View file

@ -1271,6 +1271,7 @@ 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;
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);
@ -1278,6 +1279,7 @@ static int handle3_ingress_format(struct net_device *dev,
pr_info("Wan Recycle Enabled\n");
}
}
}
ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 4;
ipa_wan_ep_cfg->ipa_ep_cfg.hdr.hdr_ofst_metadata_valid = 1;
@ -1970,8 +1972,8 @@ static int get_ipa_rmnet_dts_configuration(struct platform_device *pdev,
ipa_rmnet_drv_res->ipa_napi_enable =
of_property_read_bool(pdev->dev.of_node,
"qcom,napi");
pr_info("IPA napi = %s\n",
"qcom,ipa-napi-enable");
pr_info("IPA Napi Enable = %s\n",
ipa_rmnet_drv_res->ipa_napi_enable ? "True" : "False");
return 0;
}