summaryrefslogtreecommitdiffstats
path: root/net/ipv4/geneve.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/ipv4/geneve.c
parent62749e2cb3c4a7da3eaa5c01a7e787aebeff8536 (diff)
downloadlinux-5968250c868ceee680aa77395b24e6ddcae17d36.tar.bz2
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/ipv4/geneve.c')
-rw-r--r--net/ipv4/geneve.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index fd430a6a1c37..a457232f0131 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -131,14 +131,9 @@ int geneve_xmit_skb(struct geneve_sock *gs, struct rtable *rt,
if (unlikely(err))
return err;
- if (vlan_tx_tag_present(skb)) {
- skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto,
- vlan_tx_tag_get(skb));
- if (unlikely(!skb)
- return -ENOMEM;
-
- skb->vlan_tci = 0;
- }
+ skb = vlan_hwaccel_push_inside(skb);
+ if (unlikely(!skb))
+ return -ENOMEM;
gnvh = (struct genevehdr *)__skb_push(skb, sizeof(*gnvh) + opt_len);
geneve_build_header(gnvh, tun_flags, vni, opt_len, opt);