diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2018-11-07 18:07:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-07 22:41:19 -0800 |
commit | c8accd5a0a6abfc0405a331afa5bfc06ee92623a (patch) | |
tree | e6d66509b387cb384d4d4eb42c14f2bbad8a1cb9 | |
parent | 1295e2cf3065a55f35d112e4dfeb2c7322823249 (diff) |
net/vlan: introduce __vlan_hwaccel_clear_tag() helper
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/if_vlan.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 83ea4df6ab81..c438fa0a1c6a 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -461,6 +461,17 @@ static inline struct sk_buff *vlan_insert_tag_set_proto(struct sk_buff *skb, return skb; } +/** + * __vlan_hwaccel_clear_tag - clear hardware accelerated VLAN info + * @skb: skbuff to clear + * + * Clears the VLAN information from @skb + */ +static inline void __vlan_hwaccel_clear_tag(struct sk_buff *skb) +{ + skb->vlan_tci = 0; +} + /* * __vlan_hwaccel_push_inside - pushes vlan tag to the payload * @skb: skbuff to tag @@ -475,7 +486,7 @@ static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb) skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, skb_vlan_tag_get(skb)); if (likely(skb)) - skb->vlan_tci = 0; + __vlan_hwaccel_clear_tag(skb); return skb; } |