Skip to content

Commit

Permalink
virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
Browse files Browse the repository at this point in the history
This gives small but noticeable rx performance improvement (2-3%)
and will allow exploiting future napi improvement.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Paolo Abeni authored and Michael S. Tsirkin committed Mar 17, 2016
1 parent 0308813 commit c67f5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
p = page_address(page) + offset;

/* copy small packet so we can reuse these pages for small data */
skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN);
skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN);
if (unlikely(!skb))
return NULL;

Expand Down

0 comments on commit c67f5db

Please sign in to comment.