Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +4 −0 Original line number Diff line number Diff line Loading @@ -6271,6 +6271,10 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, ipa3_ctx->wan_rx_ring_size = resource_p->wan_rx_ring_size; ipa3_ctx->lan_rx_ring_size = resource_p->lan_rx_ring_size; ipa3_ctx->ipa_wan_skb_page = resource_p->ipa_wan_skb_page; ipa3_ctx->stats.page_recycle_stats[0].total_replenished = 0; ipa3_ctx->stats.page_recycle_stats[0].tmp_alloc = 0; ipa3_ctx->stats.page_recycle_stats[1].total_replenished = 0; ipa3_ctx->stats.page_recycle_stats[1].tmp_alloc = 0; ipa3_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset; ipa3_ctx->tethered_flow_control = resource_p->tethered_flow_control; ipa3_ctx->ee = resource_p->ee; Loading drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +24 −0 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,26 @@ static ssize_t ipa3_read_odlstats(struct file *file, char __user *ubuf, return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt); } static ssize_t ipa3_read_page_recycle_stats(struct file *file, char __user *ubuf, size_t count, loff_t *ppos) { int nbytes; int cnt = 0; nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN, "COAL : Total number of packets replenished =%llu\n" "COAL : Number of tmp alloc packets =%llu\n" "DEF : Total number of packets replenished =%llu\n" "DEF : Number of tmp alloc packets =%llu\n", ipa3_ctx->stats.page_recycle_stats[0].total_replenished, ipa3_ctx->stats.page_recycle_stats[0].tmp_alloc, ipa3_ctx->stats.page_recycle_stats[1].total_replenished, ipa3_ctx->stats.page_recycle_stats[1].tmp_alloc); cnt += nbytes; return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt); } static ssize_t ipa3_read_wstats(struct file *file, char __user *ubuf, size_t count, loff_t *ppos) { Loading Loading @@ -2374,6 +2394,10 @@ static const struct ipa3_debugfs_file debugfs_files[] = { "odlstats", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_odlstats, } }, { "page_recycle_stats", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_page_recycle_stats, } }, { "wdi", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_wdi, Loading drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +4 −0 Original line number Diff line number Diff line Loading @@ -1949,10 +1949,12 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) u32 curr_wq; int idx = 0; struct page *cur_page; u32 stats_i = 0; /* start replenish only when buffers go lower than the threshold */ if (sys->rx_pool_sz - sys->len < IPA_REPL_XFER_THRESH) return; stats_i = (sys->ep->client == IPA_CLIENT_APPS_WAN_COAL_CONS) ? 0 : 1; spin_lock_bh(&sys->spinlock); rx_len_cached = sys->len; Loading @@ -1972,6 +1974,7 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) * Could not find idle page at curr index. * Allocate a new one. */ ipa3_ctx->stats.page_recycle_stats[stats_i].tmp_alloc++; if (curr_wq == atomic_read(&sys->repl->tail_idx)) break; rx_pkt = sys->repl->cache[curr_wq]; Loading @@ -1992,6 +1995,7 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) gsi_xfer_elem_array[idx].xfer_user_data = rx_pkt; rx_len_cached++; idx++; ipa3_ctx->stats.page_recycle_stats[stats_i].total_replenished++; /* * gsi_xfer_elem_buffer has a size of IPA_REPL_XFER_THRESH. * If this size is reached we need to queue the xfers. Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +5 −0 Original line number Diff line number Diff line Loading @@ -1259,6 +1259,10 @@ enum ipa3_config_this_ep { IPA_DO_NOT_CONFIGURE_THIS_EP, }; struct ipa3_page_recycle_stats { u64 total_replenished; u64 tmp_alloc; }; struct ipa3_stats { u32 tx_sw_pkts; u32 tx_hw_pkts; Loading @@ -1279,6 +1283,7 @@ struct ipa3_stats { u32 flow_enable; u32 flow_disable; u32 tx_non_linear; struct ipa3_page_recycle_stats page_recycle_stats[2]; }; /* offset for each stats */ Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +4 −0 Original line number Diff line number Diff line Loading @@ -6271,6 +6271,10 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, ipa3_ctx->wan_rx_ring_size = resource_p->wan_rx_ring_size; ipa3_ctx->lan_rx_ring_size = resource_p->lan_rx_ring_size; ipa3_ctx->ipa_wan_skb_page = resource_p->ipa_wan_skb_page; ipa3_ctx->stats.page_recycle_stats[0].total_replenished = 0; ipa3_ctx->stats.page_recycle_stats[0].tmp_alloc = 0; ipa3_ctx->stats.page_recycle_stats[1].total_replenished = 0; ipa3_ctx->stats.page_recycle_stats[1].tmp_alloc = 0; ipa3_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset; ipa3_ctx->tethered_flow_control = resource_p->tethered_flow_control; ipa3_ctx->ee = resource_p->ee; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +24 −0 Original line number Diff line number Diff line Loading @@ -1189,6 +1189,26 @@ static ssize_t ipa3_read_odlstats(struct file *file, char __user *ubuf, return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt); } static ssize_t ipa3_read_page_recycle_stats(struct file *file, char __user *ubuf, size_t count, loff_t *ppos) { int nbytes; int cnt = 0; nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN, "COAL : Total number of packets replenished =%llu\n" "COAL : Number of tmp alloc packets =%llu\n" "DEF : Total number of packets replenished =%llu\n" "DEF : Number of tmp alloc packets =%llu\n", ipa3_ctx->stats.page_recycle_stats[0].total_replenished, ipa3_ctx->stats.page_recycle_stats[0].tmp_alloc, ipa3_ctx->stats.page_recycle_stats[1].total_replenished, ipa3_ctx->stats.page_recycle_stats[1].tmp_alloc); cnt += nbytes; return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt); } static ssize_t ipa3_read_wstats(struct file *file, char __user *ubuf, size_t count, loff_t *ppos) { Loading Loading @@ -2374,6 +2394,10 @@ static const struct ipa3_debugfs_file debugfs_files[] = { "odlstats", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_odlstats, } }, { "page_recycle_stats", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_page_recycle_stats, } }, { "wdi", IPA_READ_ONLY_MODE, NULL, { .read = ipa3_read_wdi, Loading
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +4 −0 Original line number Diff line number Diff line Loading @@ -1949,10 +1949,12 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) u32 curr_wq; int idx = 0; struct page *cur_page; u32 stats_i = 0; /* start replenish only when buffers go lower than the threshold */ if (sys->rx_pool_sz - sys->len < IPA_REPL_XFER_THRESH) return; stats_i = (sys->ep->client == IPA_CLIENT_APPS_WAN_COAL_CONS) ? 0 : 1; spin_lock_bh(&sys->spinlock); rx_len_cached = sys->len; Loading @@ -1972,6 +1974,7 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) * Could not find idle page at curr index. * Allocate a new one. */ ipa3_ctx->stats.page_recycle_stats[stats_i].tmp_alloc++; if (curr_wq == atomic_read(&sys->repl->tail_idx)) break; rx_pkt = sys->repl->cache[curr_wq]; Loading @@ -1992,6 +1995,7 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys) gsi_xfer_elem_array[idx].xfer_user_data = rx_pkt; rx_len_cached++; idx++; ipa3_ctx->stats.page_recycle_stats[stats_i].total_replenished++; /* * gsi_xfer_elem_buffer has a size of IPA_REPL_XFER_THRESH. * If this size is reached we need to queue the xfers. Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +5 −0 Original line number Diff line number Diff line Loading @@ -1259,6 +1259,10 @@ enum ipa3_config_this_ep { IPA_DO_NOT_CONFIGURE_THIS_EP, }; struct ipa3_page_recycle_stats { u64 total_replenished; u64 tmp_alloc; }; struct ipa3_stats { u32 tx_sw_pkts; u32 tx_hw_pkts; Loading @@ -1279,6 +1283,7 @@ struct ipa3_stats { u32 flow_enable; u32 flow_disable; u32 tx_non_linear; struct ipa3_page_recycle_stats page_recycle_stats[2]; }; /* offset for each stats */ Loading