diff options
author | Paolo Abeni <pabeni@redhat.com> | 2016-03-17 10:44:00 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-03-17 11:42:00 -0400 |
commit | c67f5db82027ba6d2ea4ac9176bc45996a03ae6a (patch) | |
tree | 68017c0702f3f0fed3a2b700325dbaf7dd0a54cd | |
parent | 0308813724606549436d30efd877a80c8e00790e (diff) |
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>
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
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, | |||
256 | p = page_address(page) + offset; | 256 | p = page_address(page) + offset; |
257 | 257 | ||
258 | /* copy small packet so we can reuse these pages for small data */ | 258 | /* copy small packet so we can reuse these pages for small data */ |
259 | skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN); | 259 | skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN); |
260 | if (unlikely(!skb)) | 260 | if (unlikely(!skb)) |
261 | return NULL; | 261 | return NULL; |
262 | 262 | ||