History

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.

Jason Wang committed 8 years ago

Commit aff3d701 parent cd5681d2 files · +35 −4Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_tun.h+1−0
@@ -58,6 +58,7 @@ · 57 unmodified lines
58#define TUNSETVNETBE _IOW('T', 222, int)58#define TUNSETVNETBE _IOW('T', 222, int)
59#define TUNGETVNETBE _IOR('T', 223, int)59#define TUNGETVNETBE _IOR('T', 223, int)
60#define TUNSETSTEERINGEBPF _IOR('T', 224, int)60#define TUNSETSTEERINGEBPF _IOR('T', 224, int)
61#define TUNSETFILTEREBPF _IOR('T', 225, int)
61 62
62/* TUNSETIFF ifr flags */63/* TUNSETIFF ifr flags */
63#define IFF_TUN 0x000164#define IFF_TUN 0x0001