]> git.baikalelectronics.ru Git - 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)
commitbf9146cd76d4f461f2c506b7905f94cc802179ce
tree2129c92584e1e80b460bb6ee7f9691d4bfe3b4f8
parentb2d6c4c9ffb85fdfe5cf594473400a075e017ba9
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