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.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -178,6 +178,9 @@ struct __sk_buff { · 177 unmodified lines | ||
| 178 | 178 | __u32 pkt_type; |
| 179 | 179 | __u32 mark; |
| 180 | 180 | __u32 queue_mapping; |
| 181 | + __u32 protocol; | |
| 182 | + __u32 vlan_present; | |
| 183 | + __u32 vlan_tci; | |
| 181 | 184 | }; |
| 182 | 185 | |
| 183 | 186 | #endif /* _UAPI__LINUX_BPF_H__ */ |