vlan: introduce *vlan_hwaccel_push_inside helpers
Use them to push skb->vlan_tci into the payload and avoid code duplication. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
62749e2cb3
commit
5968250c86
@@ -2644,12 +2644,8 @@ static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb,
|
||||
netdev_features_t features)
|
||||
{
|
||||
if (vlan_tx_tag_present(skb) &&
|
||||
!vlan_hw_offload_capable(features, skb->vlan_proto)) {
|
||||
skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
|
||||
vlan_tx_tag_get(skb));
|
||||
if (skb)
|
||||
skb->vlan_tci = 0;
|
||||
}
|
||||
!vlan_hw_offload_capable(features, skb->vlan_proto))
|
||||
skb = __vlan_hwaccel_push_inside(skb);
|
||||
return skb;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user