Skip to content

Commit

Permalink
net: ipa: replenish after delivering payload
Browse files Browse the repository at this point in the history
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: Alex Elder <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Alex Elder authored and davem330 committed Feb 4, 2022
1 parent 09b337d commit 5d6ac24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ipa/ipa_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,17 +1341,17 @@ 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;
if (endpoint->data->status_enable)
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,
Expand Down

0 comments on commit 5d6ac24

Please sign in to comment.