Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c67f5db8 authored by Paolo Abeni's avatar Paolo Abeni Committed by Michael S. Tsirkin
Browse files

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: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 03088137
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;