summaryrefslogtreecommitdiff
path: root/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch')
-rw-r--r--ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch b/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
deleted file mode 100644
index 80c5628..0000000
--- a/ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com>
3Date: Fri, 15 Apr 2016 14:17:54 +0800
4Subject: [PATCH 5/6] Ethernet header must be kept in VxLAN-gpe + eth + NSH for
5 new ovs lwtunnel implementation
6
7Signed-off-by: Yi Yang <yi.y.yang@intel.com>
8---
9 datapath/linux/compat/vxlan.c | 16 ++++++++++------
10 1 file changed, 10 insertions(+), 6 deletions(-)
11
12diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
13index 888d431..3c05141 100644
14--- a/datapath/linux/compat/vxlan.c
15+++ b/datapath/linux/compat/vxlan.c
16@@ -821,7 +821,7 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
17 struct vxlan_dev *vxlan;
18 struct pcpu_sw_netstats *stats;
19 union vxlan_addr saddr;
20- struct eth_nsh_hdr *eth_nsh_header = NULL;
21+ //struct eth_nsh_hdr *eth_nsh_header = NULL;
22 int err = 0;
23
24 /* For flow based devices, map all packets to VNI 0 */
25@@ -891,12 +891,13 @@ static void vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb,
26 u64_stats_update_end(&stats->syncp);
27
28 /* Add a faked encap_eth_header for NSH */
29- if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
30+ /* ovs changes have ensured it is here, so needn't add it any more */
31+ /*if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
32 skb_push(skb, ENCAP_ETH_LEN);
33 eth_nsh_header = (struct eth_nsh_hdr *)skb->data;
34 memmove(eth_nsh_header->encap_eth_header.encap_eth_dst, skb_mac_header(skb), ENCAP_ETH_LEN);
35 eth_nsh_header->encap_eth_header.encap_eth_type = htons(ETH_P_NSH);
36- }
37+ }*/
38
39 netdev_port_receive(skb, skb_tunnel_info(skb));
40 return;
41@@ -985,7 +986,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
42 struct vxlanhdr_gpe *gpe;
43
44 gpe = (struct vxlanhdr_gpe *)vxh;
45- md->gpe = ntohs(gpe->next_proto);
46+ md->gpe = gpe->next_proto;
47
48 buf.dst.u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT;
49
50@@ -1189,9 +1190,10 @@ static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk
51 }
52
53 /* Skip encap_eth_header on sending Eth+NSH to vxlan-gpe port */
54- if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
55+ /* ovs needs to keep eth header here */
56+ /*if (md && ((md->gpe & VXLAN_GPE_NP_MASK) == VXLAN_GPE_NP_NSH)) {
57 skb_pull(skb, ENCAP_ETH_LEN);
58- }
59+ }*/
60
61 min_headroom = LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len
62 + VXLAN_HLEN + sizeof(struct iphdr)
63@@ -1236,6 +1238,8 @@ static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk
64 }
65 if (vxflags & VXLAN_F_GBP)
66 vxlan_build_gbp_hdr(vxh, vxflags, md);
67+ else if (vxflags & VXLAN_F_GPE)
68+ vxlan_build_gpe_hdr(vxh, vxflags, md);
69
70 ovs_skb_set_inner_protocol(skb, htons(ETH_P_TEB));
71
72--
731.9.3
74