]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
tuntap: tweak on the path of skb XDP case in tun_build_skb()
authorJason Wang <jasowang@redhat.com>
Wed, 12 Sep 2018 03:17:03 +0000 (11:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Sep 2018 16:25:40 +0000 (09:25 -0700)
commitac1f1f6c5ae8352a39afea7b0786c59bcd730712
tree2c4820e906b8f4ea4de60d99046172e3d1f6a702
parentf7053b6ccb65a36fdfed6ad92b808464839f0eb6
tuntap: tweak on the path of skb XDP case in tun_build_skb()

If we're sure not to go native XDP, there's no need for several things
like bh and rcu stuffs. So this patch introduces a helper to build skb
and hold page refcnt. When we found we will go through skb path, build
skb directly.

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