[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442510338-10180-1-git-send-email-linville@tuxdriver.com>
Date: Thu, 17 Sep 2015 13:18:58 -0400
From: "John W. Linville" <linville@...driver.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, Pravin B Shelar <pshelar@...ira.com>,
"John W. Linville" <linville@...driver.com>
Subject: [PATCH] geneve: restore vlan bits in xmit path
These seem to have been accidentally dropped in commit 371bd1061d29
("geneve: Consolidate Geneve functionality in single module.").
Signed-off-by: John W. Linville <linville@...driver.com>
---
drivers/net/geneve.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index a917ae1cfbf3..0aaf302cc31b 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
+#include <linux/if_vlan.h>
#include <linux/hash.h>
#include <net/dst_metadata.h>
#include <net/gro_cells.h>
@@ -532,13 +533,20 @@ static int geneve_build_skb(struct rtable *rt, struct sk_buff *skb,
int err;
min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
- + GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr);
+ + GENEVE_BASE_HLEN + opt_len + sizeof(struct iphdr)
+ + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
err = skb_cow_head(skb, min_headroom);
if (unlikely(err)) {
kfree_skb(skb);
goto free_rt;
}
+ skb = vlan_hwaccel_push_inside(skb);
+ if (unlikely(!skb)) {
+ err = -ENOMEM;
+ goto free_rt;
+ }
+
skb = udp_tunnel_handle_offloads(skb, csum);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists