]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tun: reserve extra headroom only when XDP is set
authorJason Wang <jasowang@redhat.com>
Mon, 4 Sep 2017 03:36:08 +0000 (11:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Sep 2017 21:26:41 +0000 (14:26 -0700)
commit7df13219d757054c49b62417479a3724621ca8ae
tree2129c92584e1e80b460bb6ee7f9691d4bfe3b4f8
parent9e776f225dcf741ff7e91d866be752d1660d2073
tun: reserve extra headroom only when XDP is set

We reserve headroom unconditionally which could cause unnecessary
stress on socket memory accounting because of increased trusesize. Fix
this by only reserve extra headroom when XDP is set.

Cc: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c