Commit c8accd5a authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller

net/vlan: introduce __vlan_hwaccel_clear_tag() helper

Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1295e2cf
...@@ -461,6 +461,17 @@ static inline struct sk_buff *vlan_insert_tag_set_proto(struct sk_buff *skb, ...@@ -461,6 +461,17 @@ static inline struct sk_buff *vlan_insert_tag_set_proto(struct sk_buff *skb,
return 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 * __vlan_hwaccel_push_inside - pushes vlan tag to the payload
* @skb: skbuff to tag * @skb: skbuff to tag
...@@ -475,7 +486,7 @@ static inline struct sk_buff *__vlan_hwaccel_push_inside(struct sk_buff *skb) ...@@ -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_insert_tag_set_proto(skb, skb->vlan_proto,
skb_vlan_tag_get(skb)); skb_vlan_tag_get(skb));
if (likely(skb)) if (likely(skb))
skb->vlan_tci = 0; __vlan_hwaccel_clear_tag(skb);
return skb; return skb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment