summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-07-12 04:44:25 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-07-12 04:47:57 +0800
commita58fe672a839372a576d204ec38aa0d20e28b9ed (patch)
tree3b12310ca5c1bcdd2acb01d548285ddce8ee10a3
parentbe26f88e6e80c142a44418cd01c2f9b20b5e27a4 (diff)
Update NSH patches
1. update from commit ID 307b06d Change-Id: Iba4dce7a2564bd8787b1eefb01d06798258750b5 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 12 Jul 2016 04:56:41 +0000 Reviewed-on: https://review.openstack.org/340682 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch2
-rw-r--r--ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch2
-rw-r--r--ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch2
-rw-r--r--ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch2
-rw-r--r--ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch2
-rw-r--r--ovs_build/patches/0006-Fix-VxLAN-gpe-Eth-NSH-issues.patch82
-rw-r--r--ovs_build/patches/README2
7 files changed, 88 insertions, 6 deletions
diff --git a/ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch b/ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch
index ae0e269..c172320 100644
--- a/ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch
+++ b/ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch
@@ -1,7 +1,7 @@
1From 5d79831435ec4e5bea20cc36c3f83eacf6fd065c Mon Sep 17 00:00:00 2001 1From 5d79831435ec4e5bea20cc36c3f83eacf6fd065c Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com> 2From: Yi Yang <yi.y.yang@intel.com>
3Date: Mon, 11 Apr 2016 15:58:14 +0800 3Date: Mon, 11 Apr 2016 15:58:14 +0800
4Subject: [PATCH 1/5] ovs-vxlan-gpe: vxlan extension to support vxlan-gpe 4Subject: [PATCH 1/6] ovs-vxlan-gpe: vxlan extension to support vxlan-gpe
5 tunnel port 5 tunnel port
6 6
7Signed-off-by: Mengke Liu <mengke.liu@intel.com> 7Signed-off-by: Mengke Liu <mengke.liu@intel.com>
diff --git a/ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch b/ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch
index 3e9e3dc..24f8e59 100644
--- a/ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch
+++ b/ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch
@@ -1,7 +1,7 @@
1From bd251cb247ac44e4362215da826e9bf1d6c61f27 Mon Sep 17 00:00:00 2001 1From bd251cb247ac44e4362215da826e9bf1d6c61f27 Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com> 2From: Yi Yang <yi.y.yang@intel.com>
3Date: Wed, 13 Apr 2016 11:15:42 +0800 3Date: Wed, 13 Apr 2016 11:15:42 +0800
4Subject: [PATCH 2/5] ovs-nsh: support push and pop actions for vxlan-gpe and 4Subject: [PATCH 2/6] ovs-nsh: support push and pop actions for vxlan-gpe and
5 Ethernet nsh 5 Ethernet nsh
6 6
7Signed-off-by: Mengke Liu <mengke.liu@intel.com> 7Signed-off-by: Mengke Liu <mengke.liu@intel.com>
diff --git a/ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch b/ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch
index 7e17861..905eccd 100644
--- a/ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch
+++ b/ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch
@@ -1,7 +1,7 @@
1From ec5272ed6684bbd0ae8c38a5e6488414347a941f Mon Sep 17 00:00:00 2001 1From ec5272ed6684bbd0ae8c38a5e6488414347a941f Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com> 2From: Yi Yang <yi.y.yang@intel.com>
3Date: Wed, 13 Apr 2016 16:39:27 +0800 3Date: Wed, 13 Apr 2016 16:39:27 +0800
4Subject: [PATCH 3/5] Add userspace dataplane nsh support and remove push_eth 4Subject: [PATCH 3/6] Add userspace dataplane nsh support and remove push_eth
5 and pop_eth actions 5 and pop_eth actions
6 6
7Signed-off-by: Mengke Liu <mengke.liu@intel.com> 7Signed-off-by: Mengke Liu <mengke.liu@intel.com>
diff --git a/ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch b/ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch
index e11ae9c..08faf9e 100644
--- a/ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch
+++ b/ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch
@@ -1,7 +1,7 @@
1From e6f9b1f96a3ac4066c9d7d4c0a9da7e8abb1597f Mon Sep 17 00:00:00 2001 1From e6f9b1f96a3ac4066c9d7d4c0a9da7e8abb1597f Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com> 2From: Yi Yang <yi.y.yang@intel.com>
3Date: Wed, 13 Apr 2016 18:17:21 +0800 3Date: Wed, 13 Apr 2016 18:17:21 +0800
4Subject: [PATCH 4/5] Fix too large stack frame size 4Subject: [PATCH 4/6] Fix too large stack frame size
5 5
6Signed-off-by: Yi Yang <yi.y.yang@intel.com> 6Signed-off-by: Yi Yang <yi.y.yang@intel.com>
7--- 7---
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
index bfc62a9..80c5628 100644
--- 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
@@ -1,7 +1,7 @@
1From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001 1From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com> 2From: Yi Yang <yi.y.yang@intel.com>
3Date: Fri, 15 Apr 2016 14:17:54 +0800 3Date: Fri, 15 Apr 2016 14:17:54 +0800
4Subject: [PATCH 5/5] Ethernet header must be kept in VxLAN-gpe + eth + NSH for 4Subject: [PATCH 5/6] Ethernet header must be kept in VxLAN-gpe + eth + NSH for
5 new ovs lwtunnel implementation 5 new ovs lwtunnel implementation
6 6
7Signed-off-by: Yi Yang <yi.y.yang@intel.com> 7Signed-off-by: Yi Yang <yi.y.yang@intel.com>
diff --git a/ovs_build/patches/0006-Fix-VxLAN-gpe-Eth-NSH-issues.patch b/ovs_build/patches/0006-Fix-VxLAN-gpe-Eth-NSH-issues.patch
new file mode 100644
index 0000000..d7d9365
--- /dev/null
+++ b/ovs_build/patches/0006-Fix-VxLAN-gpe-Eth-NSH-issues.patch
@@ -0,0 +1,82 @@
1From 16982ccaf9249550d01d1ef5d298f97ee6537eb0 Mon Sep 17 00:00:00 2001
2From: Yi Yang <yi.y.yang@intel.com>
3Date: Wed, 27 Apr 2016 14:50:29 +0800
4Subject: [PATCH 6/6] Fix VxLAN-gpe + Eth + NSH issues
5
6 - Set encap_eth_type to 0x894F on doing push_nsh
7 in kernel data path
8 - Set VxLAN-gpe next protocol present bit
9
10Signed-off-by: Yi Yang <yi.y.yang@intel.com>
11---
12 datapath/actions.c | 1 +
13 datapath/linux/compat/vxlan.c | 8 ++++----
14 lib/flow.c | 2 +-
15 lib/odp-util.c | 2 +-
16 4 files changed, 7 insertions(+), 6 deletions(-)
17
18diff --git a/datapath/actions.c b/datapath/actions.c
19index 7072638..ffa1f04 100644
20--- a/datapath/actions.c
21+++ b/datapath/actions.c
22@@ -275,6 +275,7 @@ static int push_nsh(struct sk_buff *skb, struct sw_flow_key *key,
23 OVS_CB(skb)->encap_eth_header = (struct encap_eth_hdr *)skb->data;
24 OVS_CB(skb)->nsh_header = (struct nsh_hdr *)(skb->data + ENCAP_ETH_LEN);
25 memcpy(skb->data, nsh->header, ETH_NSH_TYPE1_HEADER_SIZE);
26+ OVS_CB(skb)->encap_eth_header->encap_eth_type = htons(ETH_P_NSH);
27 }
28 else
29 return -EINVAL;
30diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
31index 3c05141..05fb226 100644
32--- a/datapath/linux/compat/vxlan.c
33+++ b/datapath/linux/compat/vxlan.c
34@@ -1051,15 +1051,15 @@ static void vxlan_build_gpe_hdr(struct vxlanhdr *vxh, u32 vxflags,
35 {
36 struct vxlanhdr_gpe *gpe;
37
38- if (!md->gpe)
39- return;
40-
41 gpe = (struct vxlanhdr_gpe*)vxh;
42 vxh->vx_flags |= htonl(VXLAN_HF_GPE);
43
44 if (md->gpe & VXLAN_GPE_OAM_FLAG)
45 gpe->oam_flag = 1;
46- gpe->next_proto = md->gpe & VXLAN_GPE_NP_MASK;
47+ if (md->gpe == 0)
48+ gpe->next_proto = VXLAN_GPE_NP_NSH;
49+ else
50+ gpe->next_proto = md->gpe & VXLAN_GPE_NP_MASK;
51 }
52
53 #if IS_ENABLED(CONFIG_IPV6)
54diff --git a/lib/flow.c b/lib/flow.c
55index 887b023..6710e20 100644
56--- a/lib/flow.c
57+++ b/lib/flow.c
58@@ -915,7 +915,7 @@ flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
59 if (flow->tunnel.gbp_flags) {
60 match_set_tun_gbp_flags(flow_metadata, flow->tunnel.gbp_flags);
61 }
62- if (flow->tunnel.gpe_np != htons(0)) {
63+ if (flow->tunnel.gpe_np != 0) {
64 match_set_tun_gpe_np(flow_metadata, flow->tunnel.gpe_np);
65 }
66 if (flow->tunnel.gpe_flags) {
67diff --git a/lib/odp-util.c b/lib/odp-util.c
68index 7721cc4..51f0545 100644
69--- a/lib/odp-util.c
70+++ b/lib/odp-util.c
71@@ -1982,7 +1982,7 @@ odp_tun_key_from_attr__(const struct nlattr *attr,
72 };
73 struct nlattr *ext[ARRAY_SIZE(vxlan_opts_policy)];
74
75- if (!nl_parse_nested(a, vxlan_opts_policy, ext, ARRAY_SIZE(ext))) {
76+ if (!nl_parse_nested(a, vxlan_opts_policy, ext, ARRAY_SIZE(vxlan_opts_policy))) {
77 return ODP_FIT_ERROR;
78 }
79
80--
811.9.3
82
diff --git a/ovs_build/patches/README b/ovs_build/patches/README
index ba52bb2..be28380 100644
--- a/ovs_build/patches/README
+++ b/ovs_build/patches/README
@@ -1 +1 @@
The patches were copied from https://github.com/yyang13/ovs_nsh_patches The patches were copied from commit id 307b06d986a49698c01caa3d6ed62fd7dac83e87 in https://github.com/yyang13/ovs_nsh_patches