Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bcb0e6f authored by Bojun Pan's avatar Bojun Pan Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Replenish buffer once only in ipa3_rx_poll



We don't have to replenish buffer every time for each skb chain,
instead we can only do it once per NAPI poll since replenish is
also in NAPI context.

Change-Id: I800324121887a2696ea8cc042e4908de0ef142bf
Signed-off-by: default avatarBojun Pan <bojunp@codeaurora.org>
parent 99080dfb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3122,7 +3122,6 @@ static void ipa3_wq_rx_napi_chain(struct ipa3_sys_context *sys,
		if (prev_skb) {
			skb_shinfo(prev_skb)->frag_list = NULL;
			sys->pyld_hdlr(first_skb, sys);
			sys->repl_hdlr(sys);
		}

	/* TODO: add chaining for coal case */
@@ -3145,7 +3144,6 @@ static void ipa3_wq_rx_napi_chain(struct ipa3_sys_context *sys,
				}
				wan_def_sys = ipa3_ctx->ep[ipa_ep_idx].sys;
				wan_def_sys->repl_hdlr(wan_def_sys);
				sys->repl_hdlr(sys);
			}
		}
	}
@@ -4461,6 +4459,9 @@ int ipa3_rx_poll(u32 clnt_hdl, int weight)
		}
	}
	cnt += weight - remain_aggr_weight * IPA_WAN_AGGR_PKT_CNT;
	/* call repl_hdlr before napi_reschedule / napi_complete */
	if (cnt)
		ep->sys->repl_hdlr(ep->sys);
	if (cnt < weight) {
		napi_complete(ep->sys->napi_obj);
		ret = ipa3_rx_switch_to_intr_mode(ep->sys);