virtio-net: switch to use build_skb() for small buffer
authorJason Wang <jasowang@redhat.com>
Tue, 21 Feb 2017 08:46:28 +0000 (16:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2017 17:24:52 +0000 (12:24 -0500)
commitf6b10209b90d48a84f886ab2b317b5d2cbfe3143
tree1ea85a3b2d3e1fa380508ce23917ea4384691ccc
parentca4ef4574f1ee5252e2cd365f8f5d5bafd048f32
virtio-net: switch to use build_skb() for small buffer

This patch switch to use build_skb() for small buffer which can have
better performance for both TCP and XDP (since we can work at page
before skb creation). It also remove lots of XDP codes since both
mergeable and small buffer use page frag during refill now.

                       Before   | After
XDP_DROP(xdp1) 64B  :  11.1Mpps | 14.4Mpps

Tested with xdp1/xdp2/xdp_ip_tx_tunnel and netperf.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c