Skip to content

Commit

Permalink
xen-netfront: convert to GRO API
Browse files Browse the repository at this point in the history
Anirban was seeing netfront received MTU size packets, which downgraded
throughput. The following patch makes netfront use GRO API which
improves throughput for that case.

Signed-off-by: Wei Liu <[email protected]>
Cc: Anirban Chakraborty <[email protected]>
Cc: Ian Campbell <[email protected]>
Acked-by: Konrad Wilk <[email protected]>
Acked-by: Ian Campbell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Liu authored and davem330 committed Oct 2, 2013
1 parent ee002b6 commit 99d3d58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ static int handle_incoming_queue(struct net_device *dev,
u64_stats_update_end(&stats->syncp);

/* Pass it up. */
netif_receive_skb(skb);
napi_gro_receive(&np->napi, skb);
}

return packets_dropped;
Expand Down Expand Up @@ -1051,6 +1051,8 @@ static int xennet_poll(struct napi_struct *napi, int budget)
if (work_done < budget) {
int more_to_do = 0;

napi_gro_flush(napi, false);

local_irq_save(flags);

RING_FINAL_CHECK_FOR_RESPONSES(&np->rx, more_to_do);
Expand Down

0 comments on commit 99d3d58

Please sign in to comment.