summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2018-09-12 05:17:00 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-13 18:25:40 +0200
commit4f23aff8713c1f98735f7290a2cde63845b7ec88 (patch)
tree1d4d89009c6f82838219d40ec3781b5e4a2fb384 /drivers/net/tun.c
parentnet: sock: introduce SOCK_XDP (diff)
downloadlinux-4f23aff8713c1f98735f7290a2cde63845b7ec88.tar.xz
linux-4f23aff8713c1f98735f7290a2cde63845b7ec88.zip
tuntap: switch to use XDP_PACKET_HEADROOM
Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 2c548bd20393..d3677a544b56 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -113,7 +113,6 @@ do { \
} while (0)
#endif
-#define TUN_HEADROOM 256
#define TUN_RX_PAD (NET_IP_ALIGN + NET_SKB_PAD)
/* TUN device flags */
@@ -1654,7 +1653,7 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
rcu_read_lock();
xdp_prog = rcu_dereference(tun->xdp_prog);
if (xdp_prog)
- pad += TUN_HEADROOM;
+ pad += XDP_PACKET_HEADROOM;
buflen += SKB_DATA_ALIGN(len + pad);
rcu_read_unlock();