Skip to content

Commit

Permalink
virtio_net: Defer skb allocation in receive path Date: Wed, 13 Jan 20…
Browse files Browse the repository at this point in the history
…10 12:53:38 -0800

virtio_net receives packets from its pre-allocated vring buffers, then it
delivers these packets to upper layer protocols as skb buffs. So it's not
necessary to pre-allocate skb for each mergable buffer, then frees extra
skbs when buffers are merged into a large packet. This patch has deferred
skb allocation in receiving packets for both big packets and mergeable buffers
to reduce skb pre-allocations and skb frees. It frees unused buffers by calling
detach_unused_buf in vring, so recv skb queue is not needed.

Signed-off-by: Shirley Ma <xma@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shirley Ma authored and David S. Miller committed Feb 2, 2010
1 parent f9bfbeb commit 9ab86bb
Showing 1 changed file with 248 additions and 179 deletions.
Loading

0 comments on commit 9ab86bb

Please sign in to comment.