Commit 5d6ac24f authored by Alex Elder's avatar Alex Elder Committed by David S. Miller
Browse files

net: ipa: replenish after delivering payload



Replenishing is now solely driven by whether transactions are
available for a channel, and it doesn't really matter whether
we replenish before or after we deliver received packets to the
network stack.

Replenishing before delivering the payload adds a little latency.
Eliminate that by requesting a replenish after the payload is
delivered.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09b337de
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1341,10 +1341,8 @@ static void ipa_endpoint_rx_complete(struct ipa_endpoint *endpoint,
{
	struct page *page;

	ipa_endpoint_replenish(endpoint);

	if (trans->cancelled)
		return;
		goto done;

	/* Parse or build a socket buffer using the actual received length */
	page = trans->data;
@@ -1352,6 +1350,8 @@ static void ipa_endpoint_rx_complete(struct ipa_endpoint *endpoint,
		ipa_endpoint_status_parse(endpoint, page, trans->len);
	else if (ipa_endpoint_skb_build(endpoint, page, trans->len))
		trans->data = NULL;	/* Pages have been consumed */
done:
	ipa_endpoint_replenish(endpoint);
}

void ipa_endpoint_trans_complete(struct ipa_endpoint *endpoint,