]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/tun: implement ndo_set_rx_headroom
authorPaolo Abeni <pabeni@redhat.com>
Fri, 26 Feb 2016 09:45:40 +0000 (10:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2016 20:54:30 +0000 (15:54 -0500)
commiteaea34b23c46bf17b4a5638be69ab3561854f34b
tree1a2182f40f905d60de941bda9513864eb22fe9ab
parent3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7
net/tun: implement ndo_set_rx_headroom

ndo_set_rx_headroom controls the align value used by tun devices to
allocate skbs on frame reception.
When the xmit device adds a large encapsulation, this avoids an skb
head reallocation on forwarding.

The measured improvement when forwarding towards a vxlan dev with
frame size below the egress device MTU is as follow:

vxlan over ipv6, bridged: +6%
vxlan over ipv6, ovs: +7%

In case of ipv4 tunnels there is no improvement, since the tun
device default alignment provides enough headroom to avoid the skb
head reallocation.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c