tun: allow to attach ebpf socket filter
authorJason Wang <jasowang@redhat.com>
Tue, 16 Jan 2018 08:31:02 +0000 (16:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jan 2018 20:32:10 +0000 (15:32 -0500)
commitaff3d70a07fffc0abb53663e4a4acb059d2f36af
tree6274d9253d5cd93105e5759e616212876ceb2ec9
parentcd5681d7d8903bf43a571aaf96cf6d2e2e00118c
tun: allow to attach ebpf socket filter

This patch allows userspace to attach eBPF filter to tun. This will
allow to implement VM dataplane filtering in a more efficient way
compared to cBPF filter by allowing either qemu or libvirt to
attach eBPF filter to tun.

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