diff options
author | Maciej Żenczykowski <maze@google.com> | 2020-08-18 18:07:10 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-08-19 14:02:49 -0700 |
commit | 596b5ef458f903d4362fb3c69967b6d8a23334bd (patch) | |
tree | fd3ad5165cdb78b0e52481b349157d08930d1d27 /drivers/net/tun.c | |
parent | b558b6c24068d87ffcd95dad3bf0d9bd2ac290e9 (diff) | |
download | linux-596b5ef458f903d4362fb3c69967b6d8a23334bd.tar.gz |
net-tun: Eliminate two tun/xdp related function calls from vhost-net
This provides a minor performance boost by virtue of inlining
instead of cross module function calls.
Test: builds
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200819010710.3959310-2-zenczykowski@gmail.com
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 5dd7f353eeef..efaef83b8897 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -219,24 +219,6 @@ struct veth { __be16 h_vlan_TCI; }; -bool tun_is_xdp_frame(void *ptr) -{ - return (unsigned long)ptr & TUN_XDP_FLAG; -} -EXPORT_SYMBOL(tun_is_xdp_frame); - -void *tun_xdp_to_ptr(struct xdp_frame *xdp) -{ - return (void *)((unsigned long)xdp | TUN_XDP_FLAG); -} -EXPORT_SYMBOL(tun_xdp_to_ptr); - -struct xdp_frame *tun_ptr_to_xdp(void *ptr) -{ - return (void *)((unsigned long)ptr & ~TUN_XDP_FLAG); -} -EXPORT_SYMBOL(tun_ptr_to_xdp); - static int tun_napi_receive(struct napi_struct *napi, int budget) { struct tun_file *tfile = container_of(napi, struct tun_file, napi); |