path: root/Documentation/networking
diff options
authorMichal Sekletar <>2015-03-24 14:48:41 +0100
committerDavid S. Miller <>2015-03-24 15:25:15 -0400
commit27cd5452476978283decb19e429e81fc6c71e74b (patch)
treea147d4576190e18580589e6faaf08e1b7050ef2d /Documentation/networking
parentf6bb76cd4d8552bada1e454c291419f893e1af7b (diff)
filter: introduce SKF_AD_VLAN_TPID BPF extension
If vlan offloading takes place then vlan header is removed from frame and its contents, both vlan_tci and vlan_proto, is available to user space via TPACKET interface. However, only vlan_tci can be used in BPF filters. This commit introduces a new BPF extension. It makes possible to load the value of vlan_proto (vlan TPID) to register A. Support for classic BPF and eBPF is being added, analogous to skb->protocol. Cc: Daniel Borkmann <> Cc: Alexei Starovoitov <> Cc: Jiri Pirko <> Signed-off-by: Michal Sekletar <> Acked-by: Daniel Borkmann <> Acked-by: Alexei Starovoitov <> Reviewed-by: Jiri Pirko <> Signed-off-by: David S. Miller <>
Diffstat (limited to 'Documentation/networking')
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index 9930ecfbb465..135581f015e1 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -280,7 +280,8 @@ Possible BPF extensions are shown in the following table:
rxhash skb->hash
cpu raw_smp_processor_id()
vlan_tci skb_vlan_tag_get(skb)
- vlan_pr skb_vlan_tag_present(skb)
+ vlan_avail skb_vlan_tag_present(skb)
+ vlan_tpid skb->vlan_proto
rand prandom_u32()
These extensions can also be prefixed with '#'.