Browse Source

Update NSH patches

1. update from commit ID 307b06d

Change-Id: Iba4dce7a2564bd8787b1eefb01d06798258750b5
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Guo Ruijing 2 years ago
parent
commit
a58fe672a8

+ 1
- 1
ovs_build/patches/0001-ovs-vxlan-gpe-vxlan-extension-to-support-vxlan-gpe-t.patch View File

@@ -1,7 +1,7 @@
1 1
 From 5d79831435ec4e5bea20cc36c3f83eacf6fd065c Mon Sep 17 00:00:00 2001
2 2
 From: Yi Yang <yi.y.yang@intel.com>
3 3
 Date: Mon, 11 Apr 2016 15:58:14 +0800
4
-Subject: [PATCH 1/5] ovs-vxlan-gpe: vxlan extension to support vxlan-gpe
4
+Subject: [PATCH 1/6] ovs-vxlan-gpe: vxlan extension to support vxlan-gpe
5 5
  tunnel port
6 6
 
7 7
 Signed-off-by: Mengke Liu <mengke.liu@intel.com>

+ 1
- 1
ovs_build/patches/0002-ovs-nsh-support-push-and-pop-actions-for-vxlan-gpe-a.patch View File

@@ -1,7 +1,7 @@
1 1
 From bd251cb247ac44e4362215da826e9bf1d6c61f27 Mon Sep 17 00:00:00 2001
2 2
 From: Yi Yang <yi.y.yang@intel.com>
3 3
 Date: Wed, 13 Apr 2016 11:15:42 +0800
4
-Subject: [PATCH 2/5] ovs-nsh: support push and pop actions for vxlan-gpe and
4
+Subject: [PATCH 2/6] ovs-nsh: support push and pop actions for vxlan-gpe and
5 5
  Ethernet nsh
6 6
 
7 7
 Signed-off-by: Mengke Liu <mengke.liu@intel.com>

+ 1
- 1
ovs_build/patches/0003-Add-userspace-dataplane-nsh-support-and-remove-push_.patch View File

@@ -1,7 +1,7 @@
1 1
 From ec5272ed6684bbd0ae8c38a5e6488414347a941f Mon Sep 17 00:00:00 2001
2 2
 From: Yi Yang <yi.y.yang@intel.com>
3 3
 Date: Wed, 13 Apr 2016 16:39:27 +0800
4
-Subject: [PATCH 3/5] Add userspace dataplane nsh support and remove push_eth
4
+Subject: [PATCH 3/6] Add userspace dataplane nsh support and remove push_eth
5 5
  and pop_eth actions
6 6
 
7 7
 Signed-off-by: Mengke Liu <mengke.liu@intel.com>

+ 1
- 1
ovs_build/patches/0004-Fix-too-large-stack-frame-size.patch View File

@@ -1,7 +1,7 @@
1 1
 From e6f9b1f96a3ac4066c9d7d4c0a9da7e8abb1597f Mon Sep 17 00:00:00 2001
2 2
 From: Yi Yang <yi.y.yang@intel.com>
3 3
 Date: Wed, 13 Apr 2016 18:17:21 +0800
4
-Subject: [PATCH 4/5] Fix too large stack frame size
4
+Subject: [PATCH 4/6] Fix too large stack frame size
5 5
 
6 6
 Signed-off-by: Yi Yang <yi.y.yang@intel.com>
7 7
 ---

+ 1
- 1
ovs_build/patches/0005-Ethernet-header-must-be-kept-in-VxLAN-gpe-eth-NSH-fo.patch View File

@@ -1,7 +1,7 @@
1 1
 From 604bcfaf5211513f665ca05a370bc7f0c0dab39f Mon Sep 17 00:00:00 2001
2 2
 From: Yi Yang <yi.y.yang@intel.com>
3 3
 Date: Fri, 15 Apr 2016 14:17:54 +0800
4
-Subject: [PATCH 5/5] Ethernet header must be kept in VxLAN-gpe + eth + NSH for
4
+Subject: [PATCH 5/6] Ethernet header must be kept in VxLAN-gpe + eth + NSH for
5 5
  new ovs lwtunnel implementation
6 6
 
7 7
 Signed-off-by: Yi Yang <yi.y.yang@intel.com>

+ 82
- 0
ovs_build/patches/0006-Fix-VxLAN-gpe-Eth-NSH-issues.patch View File

@@ -0,0 +1,82 @@
1
+From 16982ccaf9249550d01d1ef5d298f97ee6537eb0 Mon Sep 17 00:00:00 2001
2
+From: Yi Yang <yi.y.yang@intel.com>
3
+Date: Wed, 27 Apr 2016 14:50:29 +0800
4
+Subject: [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
+
10
+Signed-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
+
18
+diff --git a/datapath/actions.c b/datapath/actions.c
19
+index 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;
30
+diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
31
+index 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)
54
+diff --git a/lib/flow.c b/lib/flow.c
55
+index 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) {
67
+diff --git a/lib/odp-util.c b/lib/odp-util.c
68
+index 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
+-- 
81
+1.9.3
82
+

+ 1
- 1
ovs_build/patches/README View File

@@ -1 +1 @@
1
-The patches were copied from https://github.com/yyang13/ovs_nsh_patches
1
+The patches were copied from commit id 307b06d986a49698c01caa3d6ed62fd7dac83e87 in https://github.com/yyang13/ovs_nsh_patches

Loading…
Cancel
Save