summaryrefslogtreecommitdiff
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2016-03-17 17:44:00 +0300
committerMichael S. Tsirkin <mst@redhat.com>2016-03-17 18:42:00 +0300
commitc67f5db82027ba6d2ea4ac9176bc45996a03ae6a (patch)
tree68017c0702f3f0fed3a2b700325dbaf7dd0a54cd /drivers/net/virtio_net.c
parent0308813724606549436d30efd877a80c8e00790e (diff)
downloadlinux-c67f5db82027ba6d2ea4ac9176bc45996a03ae6a.tar.xz
virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 767ab11a6e9f..a43631696bcb 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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;