aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-11-19 14:04:59 +0100
committerDavid S. Miller <davem@davemloft.net>2014-11-21 14:20:17 -0500
commit5968250c868ceee680aa77395b24e6ddcae17d36 (patch)
tree2275b3b1db667b6362d7b528a66337f5f1f96eb7 /net/core/dev.c
parentvlan: rename __vlan_put_tag to vlan_insert_tag_set_proto (diff)
downloadlinux-dev-5968250c868ceee680aa77395b24e6ddcae17d36.tar.xz
linux-dev-5968250c868ceee680aa77395b24e6ddcae17d36.zip
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3611e60df407..ac4836241a96 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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;
}