vxlan: add additional headroom
authorstephen hemminger <shemminger@vyatta.com>
Tue, 9 Oct 2012 20:35:51 +0000 (20:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2012 02:41:22 +0000 (22:41 -0400)
Tell upper layer protocols to allocate skb with additional headroom.
This avoids allocation and copy in local packet sends.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index 4be2784e7ac2f2422db489e6dd364319b3adab70..0b95d5fffce72094348bdc213a894f595d7f8ca2 100644 (file)
@@ -983,6 +983,7 @@ static void vxlan_setup(struct net_device *dev)
 
        eth_hw_addr_random(dev);
        ether_setup(dev);
+       dev->hard_header_len = ETH_HLEN + VXLAN_HEADROOM;
 
        dev->netdev_ops = &vxlan_netdev_ops;
        dev->destructor = vxlan_free;