summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov2015-03-17 02:06:02 +0100
committerDavid S. Miller2015-03-17 20:06:31 +0100
commitc24973957975403521ca76a776c2dfd12fbe9add (patch)
tree0a05287480110f113d719a1e3852b4f5e647685d /include/uapi/linux/bpf.h
parentMerge branch 'const_of_device_id' (diff)
downloadkernel-qcow2-linux-c24973957975403521ca76a776c2dfd12fbe9add.tar.gz
kernel-qcow2-linux-c24973957975403521ca76a776c2dfd12fbe9add.tar.xz
kernel-qcow2-linux-c24973957975403521ca76a776c2dfd12fbe9add.zip
bpf: allow BPF programs access 'protocol' and 'vlan_tci' fields
as a follow on to patch 70006af95515 ("bpf: allow eBPF access skb fields") this patch allows 'protocol' and 'vlan_tci' fields to be accessible from extended BPF programs. The usage of 'protocol', 'vlan_present' and 'vlan_tci' fields is the same as corresponding SKF_AD_PROTOCOL, SKF_AD_VLAN_TAG_PRESENT and SKF_AD_VLAN_TAG accesses in classic BPF. Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 929545a27546..1623047af463 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -178,6 +178,9 @@ struct __sk_buff {
__u32 pkt_type;
__u32 mark;
__u32 queue_mapping;
+ __u32 protocol;
+ __u32 vlan_present;
+ __u32 vlan_tci;
};
#endif /* _UAPI__LINUX_BPF_H__ */