History

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.

Alexei Starovoitov committed 11 years ago

Commit c2497391 parent 9cf78673 files · +62 −22Browse files

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

Unified · Split

include/uapi/linux/bpf.h+3−0
@@ -178,6 +178,9 @@ struct __sk_buff { · 177 unmodified lines
178178 __u32 pkt_type;
179179 __u32 mark;
180180 __u32 queue_mapping;
181+ __u32 protocol;
182+ __u32 vlan_present;
183+ __u32 vlan_tci;
181184 };
182185
183186 #endif /* _UAPI__LINUX_BPF_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t