]> 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)
commit5b883544a60c954b8985cdd3230e5dcb1df9d4f4
tree2129c92584e1e80b460bb6ee7f9691d4bfe3b4f8
parent50a7eec079e63f39b9dab9164f32b31cd0efce3e
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